]> git.sur5r.net Git - openldap/blob - configure
Changes to support FreeBSD LinuxThreads port. Namely don't rely
[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-wrappers   enable tcp wrapper 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-bdb2       enable bdb2 backend (no)"
67 ac_help="$ac_help
68     --enable-ldbm       enable ldbm backend (yes)"
69 ac_help="$ac_help
70       --with-ldbm-api   use LDBM API (auto)"
71 ac_help="$ac_help
72       --with-ldbm-type  use LDBM type (auto)"
73 ac_help="$ac_help
74     --enable-passwd     enable passwd backend (no)"
75 ac_help="$ac_help
76     --enable-perl       enable perl backend (no)"
77 ac_help="$ac_help
78     --enable-shell      enable shell backend (no)"
79 ac_help="$ac_help
80     --enable-tcl        enable tcl backend (no)"
81 ac_help="$ac_help
82 SLURPD Options:"
83 ac_help="$ac_help
84   --enable-slurpd       enable building slurpd (auto)"
85 ac_help="$ac_help
86 Library Generation & Linking Options"
87 ac_help="$ac_help
88   --enable-static         build static libraries [default=yes]
89   --enable-static=PKGS    only build shared libraries if the current package
90                           appears as an element in the PKGS list"
91 ac_help="$ac_help
92   --enable-shared         build shared libraries [default=yes]
93   --enable-shared=PKGS    only build shared libraries if the current package
94                           appears as an element in the PKGS list"
95 ac_help="$ac_help
96   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
97
98 # Initialize some variables set by options.
99 # The variables have the same names as the options, with
100 # dashes changed to underlines.
101 build=NONE
102 cache_file=./config.cache
103 exec_prefix=NONE
104 host=NONE
105 no_create=
106 nonopt=NONE
107 no_recursion=
108 prefix=NONE
109 program_prefix=NONE
110 program_suffix=NONE
111 program_transform_name=s,x,x,
112 silent=
113 site=
114 srcdir=
115 target=NONE
116 verbose=
117 x_includes=NONE
118 x_libraries=NONE
119 bindir='${exec_prefix}/bin'
120 sbindir='${exec_prefix}/sbin'
121 libexecdir='${exec_prefix}/libexec'
122 datadir='${prefix}/share'
123 sysconfdir='${prefix}/etc'
124 sharedstatedir='${prefix}/com'
125 localstatedir='${prefix}/var'
126 libdir='${exec_prefix}/lib'
127 includedir='${prefix}/include'
128 oldincludedir='/usr/include'
129 infodir='${prefix}/info'
130 mandir='${prefix}/man'
131
132 # Initialize some other variables.
133 subdirs=
134 MFLAGS= MAKEFLAGS=
135 SHELL=${CONFIG_SHELL-/bin/sh}
136 # Maximum number of lines to put in a shell here document.
137 ac_max_here_lines=12
138
139 ac_prev=
140 for ac_option
141 do
142
143   # If the previous option needs an argument, assign it.
144   if test -n "$ac_prev"; then
145     eval "$ac_prev=\$ac_option"
146     ac_prev=
147     continue
148   fi
149
150   case "$ac_option" in
151   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
152   *) ac_optarg= ;;
153   esac
154
155   # Accept the important Cygnus configure options, so we can diagnose typos.
156
157   case "$ac_option" in
158
159   -bindir | --bindir | --bindi | --bind | --bin | --bi)
160     ac_prev=bindir ;;
161   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
162     bindir="$ac_optarg" ;;
163
164   -build | --build | --buil | --bui | --bu)
165     ac_prev=build ;;
166   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
167     build="$ac_optarg" ;;
168
169   -cache-file | --cache-file | --cache-fil | --cache-fi \
170   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
171     ac_prev=cache_file ;;
172   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
173   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
174     cache_file="$ac_optarg" ;;
175
176   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
177     ac_prev=datadir ;;
178   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
179   | --da=*)
180     datadir="$ac_optarg" ;;
181
182   -disable-* | --disable-*)
183     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
184     # Reject names that are not valid shell variable names.
185     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
186       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
187     fi
188     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
189     eval "enable_${ac_feature}=no" ;;
190
191   -enable-* | --enable-*)
192     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
193     # Reject names that are not valid shell variable names.
194     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
195       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
196     fi
197     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
198     case "$ac_option" in
199       *=*) ;;
200       *) ac_optarg=yes ;;
201     esac
202     eval "enable_${ac_feature}='$ac_optarg'" ;;
203
204   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
205   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
206   | --exec | --exe | --ex)
207     ac_prev=exec_prefix ;;
208   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
209   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
210   | --exec=* | --exe=* | --ex=*)
211     exec_prefix="$ac_optarg" ;;
212
213   -gas | --gas | --ga | --g)
214     # Obsolete; use --with-gas.
215     with_gas=yes ;;
216
217   -help | --help | --hel | --he)
218     # Omit some internal or obsolete options to make the list less imposing.
219     # This message is too long to be a string in the A/UX 3.1 sh.
220     cat << EOF
221 Usage: configure [options] [host]
222 Options: [defaults in brackets after descriptions]
223 Configuration:
224   --cache-file=FILE       cache test results in FILE
225   --help                  print this message
226   --no-create             do not create output files
227   --quiet, --silent       do not print \`checking...' messages
228   --version               print the version of autoconf that created configure
229 Directory and file names:
230   --prefix=PREFIX         install architecture-independent files in PREFIX
231                           [$ac_default_prefix]
232   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
233                           [same as prefix]
234   --bindir=DIR            user executables in DIR [EPREFIX/bin]
235   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
236   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
237   --datadir=DIR           read-only architecture-independent data in DIR
238                           [PREFIX/share]
239   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
240   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
241                           [PREFIX/com]
242   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
243   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
244   --includedir=DIR        C header files in DIR [PREFIX/include]
245   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
246   --infodir=DIR           info documentation in DIR [PREFIX/info]
247   --mandir=DIR            man documentation in DIR [PREFIX/man]
248   --srcdir=DIR            find the sources in DIR [configure dir or ..]
249   --program-prefix=PREFIX prepend PREFIX to installed program names
250   --program-suffix=SUFFIX append SUFFIX to installed program names
251   --program-transform-name=PROGRAM
252                           run sed PROGRAM on installed program names
253 EOF
254     cat << EOF
255 Host type:
256   --build=BUILD           configure for building on BUILD [BUILD=HOST]
257   --host=HOST             configure for HOST [guessed]
258   --target=TARGET         configure for TARGET [TARGET=HOST]
259 Features and packages:
260   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
261   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
262   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
263   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
264   --x-includes=DIR        X include files are in DIR
265   --x-libraries=DIR       X library files are in DIR
266 EOF
267     if test -n "$ac_help"; then
268       echo "--enable and --with options recognized:$ac_help"
269     fi
270     exit 0 ;;
271
272   -host | --host | --hos | --ho)
273     ac_prev=host ;;
274   -host=* | --host=* | --hos=* | --ho=*)
275     host="$ac_optarg" ;;
276
277   -includedir | --includedir | --includedi | --included | --include \
278   | --includ | --inclu | --incl | --inc)
279     ac_prev=includedir ;;
280   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
281   | --includ=* | --inclu=* | --incl=* | --inc=*)
282     includedir="$ac_optarg" ;;
283
284   -infodir | --infodir | --infodi | --infod | --info | --inf)
285     ac_prev=infodir ;;
286   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
287     infodir="$ac_optarg" ;;
288
289   -libdir | --libdir | --libdi | --libd)
290     ac_prev=libdir ;;
291   -libdir=* | --libdir=* | --libdi=* | --libd=*)
292     libdir="$ac_optarg" ;;
293
294   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
295   | --libexe | --libex | --libe)
296     ac_prev=libexecdir ;;
297   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
298   | --libexe=* | --libex=* | --libe=*)
299     libexecdir="$ac_optarg" ;;
300
301   -localstatedir | --localstatedir | --localstatedi | --localstated \
302   | --localstate | --localstat | --localsta | --localst \
303   | --locals | --local | --loca | --loc | --lo)
304     ac_prev=localstatedir ;;
305   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
306   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
307   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
308     localstatedir="$ac_optarg" ;;
309
310   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
311     ac_prev=mandir ;;
312   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
313     mandir="$ac_optarg" ;;
314
315   -nfp | --nfp | --nf)
316     # Obsolete; use --without-fp.
317     with_fp=no ;;
318
319   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
320   | --no-cr | --no-c)
321     no_create=yes ;;
322
323   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
324   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
325     no_recursion=yes ;;
326
327   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
328   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
329   | --oldin | --oldi | --old | --ol | --o)
330     ac_prev=oldincludedir ;;
331   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
332   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
333   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
334     oldincludedir="$ac_optarg" ;;
335
336   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
337     ac_prev=prefix ;;
338   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
339     prefix="$ac_optarg" ;;
340
341   -program-prefix | --program-prefix | --program-prefi | --program-pref \
342   | --program-pre | --program-pr | --program-p)
343     ac_prev=program_prefix ;;
344   -program-prefix=* | --program-prefix=* | --program-prefi=* \
345   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
346     program_prefix="$ac_optarg" ;;
347
348   -program-suffix | --program-suffix | --program-suffi | --program-suff \
349   | --program-suf | --program-su | --program-s)
350     ac_prev=program_suffix ;;
351   -program-suffix=* | --program-suffix=* | --program-suffi=* \
352   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
353     program_suffix="$ac_optarg" ;;
354
355   -program-transform-name | --program-transform-name \
356   | --program-transform-nam | --program-transform-na \
357   | --program-transform-n | --program-transform- \
358   | --program-transform | --program-transfor \
359   | --program-transfo | --program-transf \
360   | --program-trans | --program-tran \
361   | --progr-tra | --program-tr | --program-t)
362     ac_prev=program_transform_name ;;
363   -program-transform-name=* | --program-transform-name=* \
364   | --program-transform-nam=* | --program-transform-na=* \
365   | --program-transform-n=* | --program-transform-=* \
366   | --program-transform=* | --program-transfor=* \
367   | --program-transfo=* | --program-transf=* \
368   | --program-trans=* | --program-tran=* \
369   | --progr-tra=* | --program-tr=* | --program-t=*)
370     program_transform_name="$ac_optarg" ;;
371
372   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
373   | -silent | --silent | --silen | --sile | --sil)
374     silent=yes ;;
375
376   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
377     ac_prev=sbindir ;;
378   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
379   | --sbi=* | --sb=*)
380     sbindir="$ac_optarg" ;;
381
382   -sharedstatedir | --sharedstatedir | --sharedstatedi \
383   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
384   | --sharedst | --shareds | --shared | --share | --shar \
385   | --sha | --sh)
386     ac_prev=sharedstatedir ;;
387   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
388   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
389   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
390   | --sha=* | --sh=*)
391     sharedstatedir="$ac_optarg" ;;
392
393   -site | --site | --sit)
394     ac_prev=site ;;
395   -site=* | --site=* | --sit=*)
396     site="$ac_optarg" ;;
397
398   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
399     ac_prev=srcdir ;;
400   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
401     srcdir="$ac_optarg" ;;
402
403   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
404   | --syscon | --sysco | --sysc | --sys | --sy)
405     ac_prev=sysconfdir ;;
406   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
407   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
408     sysconfdir="$ac_optarg" ;;
409
410   -target | --target | --targe | --targ | --tar | --ta | --t)
411     ac_prev=target ;;
412   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
413     target="$ac_optarg" ;;
414
415   -v | -verbose | --verbose | --verbos | --verbo | --verb)
416     verbose=yes ;;
417
418   -version | --version | --versio | --versi | --vers)
419     echo "configure generated by autoconf version 2.13"
420     exit 0 ;;
421
422   -with-* | --with-*)
423     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
426       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
427     fi
428     ac_package=`echo $ac_package| sed 's/-/_/g'`
429     case "$ac_option" in
430       *=*) ;;
431       *) ac_optarg=yes ;;
432     esac
433     eval "with_${ac_package}='$ac_optarg'" ;;
434
435   -without-* | --without-*)
436     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
437     # Reject names that are not valid shell variable names.
438     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
439       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440     fi
441     ac_package=`echo $ac_package| sed 's/-/_/g'`
442     eval "with_${ac_package}=no" ;;
443
444   --x)
445     # Obsolete; use --with-x.
446     with_x=yes ;;
447
448   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
449   | --x-incl | --x-inc | --x-in | --x-i)
450     ac_prev=x_includes ;;
451   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
452   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
453     x_includes="$ac_optarg" ;;
454
455   -x-libraries | --x-libraries | --x-librarie | --x-librari \
456   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
457     ac_prev=x_libraries ;;
458   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
459   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
460     x_libraries="$ac_optarg" ;;
461
462   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
463     ;;
464
465   *)
466     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
467       echo "configure: warning: $ac_option: invalid host type" 1>&2
468     fi
469     if test "x$nonopt" != xNONE; then
470       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
471     fi
472     nonopt="$ac_option"
473     ;;
474
475   esac
476 done
477
478 if test -n "$ac_prev"; then
479   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
480 fi
481
482 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
483
484 # File descriptor usage:
485 # 0 standard input
486 # 1 file creation
487 # 2 errors and warnings
488 # 3 some systems may open it to /dev/tty
489 # 4 used on the Kubota Titan
490 # 6 checking for... messages and results
491 # 5 compiler messages saved in config.log
492 if test "$silent" = yes; then
493   exec 6>/dev/null
494 else
495   exec 6>&1
496 fi
497 exec 5>./config.log
498
499 echo "\
500 This file contains any messages produced by compilers while
501 running configure, to aid debugging if configure makes a mistake.
502 " 1>&5
503
504 # Strip out --no-create and --no-recursion so they do not pile up.
505 # Also quote any args containing shell metacharacters.
506 ac_configure_args=
507 for ac_arg
508 do
509   case "$ac_arg" in
510   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
511   | --no-cr | --no-c) ;;
512   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
513   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
514   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
515   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
516   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
517   esac
518 done
519
520 # NLS nuisances.
521 # Only set these to C if already set.  These must not be set unconditionally
522 # because not all systems understand e.g. LANG=C (notably SCO).
523 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
524 # Non-C LC_CTYPE values break the ctype check.
525 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
526 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
527 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
528 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
529
530 # confdefs.h avoids OS command line length limits that DEFS can exceed.
531 rm -rf conftest* confdefs.h
532 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
533 echo > confdefs.h
534
535 # A filename unique to this package, relative to the directory that
536 # configure is in, which we can look for to find out if srcdir is correct.
537 ac_unique_file=include/ldap.h
538
539 # Find the source files, if location was not specified.
540 if test -z "$srcdir"; then
541   ac_srcdir_defaulted=yes
542   # Try the directory containing this script, then its parent.
543   ac_prog=$0
544   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
545   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
546   srcdir=$ac_confdir
547   if test ! -r $srcdir/$ac_unique_file; then
548     srcdir=..
549   fi
550 else
551   ac_srcdir_defaulted=no
552 fi
553 if test ! -r $srcdir/$ac_unique_file; then
554   if test "$ac_srcdir_defaulted" = yes; then
555     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
556   else
557     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
558   fi
559 fi
560 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
561
562 # Prefer explicitly selected file to automatically selected ones.
563 if test -z "$CONFIG_SITE"; then
564   if test "x$prefix" != xNONE; then
565     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
566   else
567     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
568   fi
569 fi
570 for ac_site_file in $CONFIG_SITE; do
571   if test -r "$ac_site_file"; then
572     echo "loading site script $ac_site_file"
573     . "$ac_site_file"
574   fi
575 done
576
577 if test -r "$cache_file"; then
578   echo "loading cache $cache_file"
579   . $cache_file
580 else
581   echo "creating cache $cache_file"
582   > $cache_file
583 fi
584
585 ac_ext=c
586 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
587 ac_cpp='$CPP $CPPFLAGS'
588 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
589 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
590 cross_compiling=$ac_cv_prog_cc_cross
591
592 ac_exeext=
593 ac_objext=o
594 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
595   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
596   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
597     ac_n= ac_c='
598 ' ac_t='        '
599   else
600     ac_n=-n ac_c= ac_t=
601   fi
602 else
603   ac_n= ac_c='\c' ac_t=
604 fi
605
606 ac_aux_dir=
607 for ac_dir in build $srcdir/build; do
608   if test -f $ac_dir/install-sh; then
609     ac_aux_dir=$ac_dir
610     ac_install_sh="$ac_aux_dir/install-sh -c"
611     break
612   elif test -f $ac_dir/install.sh; then
613     ac_aux_dir=$ac_dir
614     ac_install_sh="$ac_aux_dir/install.sh -c"
615     break
616   fi
617 done
618 if test -z "$ac_aux_dir"; then
619   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
620 fi
621 ac_config_guess=$ac_aux_dir/config.guess
622 ac_config_sub=$ac_aux_dir/config.sub
623 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
624 # Find a good install program.  We prefer a C program (faster),
625 # so one script is as good as another.  But avoid the broken or
626 # incompatible versions:
627 # SysV /etc/install, /usr/sbin/install
628 # SunOS /usr/etc/install
629 # IRIX /sbin/install
630 # AIX /bin/install
631 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
632 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
633 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
634 # ./install, which can be erroneously created by make from ./install.sh.
635 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
636 echo "configure:637: checking for a BSD compatible install" >&5
637 if test -z "$INSTALL"; then
638 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
639   echo $ac_n "(cached) $ac_c" 1>&6
640 else
641     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
642   for ac_dir in $PATH; do
643     # Account for people who put trailing slashes in PATH elements.
644     case "$ac_dir/" in
645     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
646     *)
647       # OSF1 and SCO ODT 3.0 have their own names for install.
648       # Don't use installbsd from OSF since it installs stuff as root
649       # by default.
650       for ac_prog in ginstall scoinst install; do
651         if test -f $ac_dir/$ac_prog; then
652           if test $ac_prog = install &&
653             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
654             # AIX install.  It has an incompatible calling convention.
655             :
656           else
657             ac_cv_path_install="$ac_dir/$ac_prog -c"
658             break 2
659           fi
660         fi
661       done
662       ;;
663     esac
664   done
665   IFS="$ac_save_IFS"
666
667 fi
668   if test "${ac_cv_path_install+set}" = set; then
669     INSTALL="$ac_cv_path_install"
670   else
671     # As a last resort, use the slow shell script.  We don't cache a
672     # path for INSTALL within a source directory, because that will
673     # break other packages using the cache if that directory is
674     # removed, or if the path is relative.
675     INSTALL="$ac_install_sh"
676   fi
677 fi
678 echo "$ac_t""$INSTALL" 1>&6
679
680 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
681 # It thinks the first close brace ends the variable substitution.
682 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
683
684 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
685
686 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
687
688 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
689 echo "configure:690: checking whether build environment is sane" >&5
690 # Just in case
691 sleep 1
692 echo timestamp > conftestfile
693 # Do `set' in a subshell so we don't clobber the current shell's
694 # arguments.  Must try -L first in case configure is actually a
695 # symlink; some systems play weird games with the mod time of symlinks
696 # (eg FreeBSD returns the mod time of the symlink's containing
697 # directory).
698 if (
699    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
700    if test "$*" = "X"; then
701       # -L didn't work.
702       set X `ls -t $srcdir/configure conftestfile`
703    fi
704    if test "$*" != "X $srcdir/configure conftestfile" \
705       && test "$*" != "X conftestfile $srcdir/configure"; then
706
707       # If neither matched, then we have a broken ls.  This can happen
708       # if, for instance, CONFIG_SHELL is bash and it inherits a
709       # broken ls alias from the environment.  This has actually
710       # happened.  Such a system could not be considered "sane".
711       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
712 alias in your environment" 1>&2; exit 1; }
713    fi
714
715    test "$2" = conftestfile
716    )
717 then
718    # Ok.
719    :
720 else
721    { echo "configure: error: newly created file is older than distributed files!
722 Check your system clock" 1>&2; exit 1; }
723 fi
724 rm -f conftest*
725 echo "$ac_t""yes" 1>&6
726 if test "$program_transform_name" = s,x,x,; then
727   program_transform_name=
728 else
729   # Double any \ or $.  echo might interpret backslashes.
730   cat <<\EOF_SED > conftestsed
731 s,\\,\\\\,g; s,\$,$$,g
732 EOF_SED
733   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
734   rm -f conftestsed
735 fi
736 test "$program_prefix" != NONE &&
737   program_transform_name="s,^,${program_prefix},; $program_transform_name"
738 # Use a double $ so make ignores it.
739 test "$program_suffix" != NONE &&
740   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
741
742 # sed with no file args requires a program.
743 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
744
745 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
746 echo "configure:747: checking whether ${MAKE-make} sets \${MAKE}" >&5
747 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
748 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
749   echo $ac_n "(cached) $ac_c" 1>&6
750 else
751   cat > conftestmake <<\EOF
752 all:
753         @echo 'ac_maketemp="${MAKE}"'
754 EOF
755 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
756 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
757 if test -n "$ac_maketemp"; then
758   eval ac_cv_prog_make_${ac_make}_set=yes
759 else
760   eval ac_cv_prog_make_${ac_make}_set=no
761 fi
762 rm -f conftestmake
763 fi
764 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
765   echo "$ac_t""yes" 1>&6
766   SET_MAKE=
767 else
768   echo "$ac_t""no" 1>&6
769   SET_MAKE="MAKE=${MAKE-make}"
770 fi
771
772
773 PACKAGE=OpenLDAP
774
775 VERSION=2.0-devel
776
777 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
778   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
779 fi
780
781
782
783 missing_dir=`cd $ac_aux_dir && pwd`
784 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
785 echo "configure:786: checking for working aclocal" >&5
786 # Run test in a subshell; some versions of sh will print an error if
787 # an executable is not found, even if stderr is redirected.
788 # Redirect stdin to placate older versions of autoconf.  Sigh.
789 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
790    ACLOCAL=aclocal
791    echo "$ac_t""found" 1>&6
792 else
793    ACLOCAL="$missing_dir/missing aclocal"
794    echo "$ac_t""missing" 1>&6
795 fi
796
797 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
798 echo "configure:799: checking for working autoconf" >&5
799 # Run test in a subshell; some versions of sh will print an error if
800 # an executable is not found, even if stderr is redirected.
801 # Redirect stdin to placate older versions of autoconf.  Sigh.
802 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
803    AUTOCONF=autoconf
804    echo "$ac_t""found" 1>&6
805 else
806    AUTOCONF="$missing_dir/missing autoconf"
807    echo "$ac_t""missing" 1>&6
808 fi
809
810 echo $ac_n "checking for working automake""... $ac_c" 1>&6
811 echo "configure:812: checking for working automake" >&5
812 # Run test in a subshell; some versions of sh will print an error if
813 # an executable is not found, even if stderr is redirected.
814 # Redirect stdin to placate older versions of autoconf.  Sigh.
815 if (automake --version) < /dev/null > /dev/null 2>&1; then
816    AUTOMAKE=automake
817    echo "$ac_t""found" 1>&6
818 else
819    AUTOMAKE="$missing_dir/missing automake"
820    echo "$ac_t""missing" 1>&6
821 fi
822
823 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
824 echo "configure:825: checking for working autoheader" >&5
825 # Run test in a subshell; some versions of sh will print an error if
826 # an executable is not found, even if stderr is redirected.
827 # Redirect stdin to placate older versions of autoconf.  Sigh.
828 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
829    AUTOHEADER=autoheader
830    echo "$ac_t""found" 1>&6
831 else
832    AUTOHEADER="$missing_dir/missing autoheader"
833    echo "$ac_t""missing" 1>&6
834 fi
835
836 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
837 echo "configure:838: checking for working makeinfo" >&5
838 # Run test in a subshell; some versions of sh will print an error if
839 # an executable is not found, even if stderr is redirected.
840 # Redirect stdin to placate older versions of autoconf.  Sigh.
841 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
842    MAKEINFO=makeinfo
843    echo "$ac_t""found" 1>&6
844 else
845    MAKEINFO="$missing_dir/missing makeinfo"
846    echo "$ac_t""missing" 1>&6
847 fi
848
849
850
851
852 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
853 echo "configure:854: checking configure arguments" >&5
854
855
856 top_builddir=`pwd`
857
858 ldap_subdir="openldap"
859
860 # Check whether --with-subdir or --without-subdir was given.
861 if test "${with_subdir+set}" = set; then
862   withval="$with_subdir"
863   
864         if test "$withval" = "no"; then
865                 ldap_subdir=""
866         elif test "$withval" != "yes"; then
867                 ldap_subdir="$withval"
868         fi
869
870 fi
871
872
873 # OpenLDAP --enable-debug
874         # Check whether --enable-debug or --disable-debug was given.
875 if test "${enable_debug+set}" = set; then
876   enableval="$enable_debug"
877   
878         ol_arg=invalid
879         for ol_val in auto yes no ; do
880                 if test "$enableval" = "$ol_val" ; then
881                         ol_arg="$ol_val"
882                 fi
883         done
884         if test "$ol_arg" = "invalid" ; then
885                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
886         fi
887         ol_enable_debug="$ol_arg"
888
889 else
890         ol_enable_debug="yes"
891 fi
892 # end --enable-debug
893 # OpenLDAP --enable-syslog
894         # Check whether --enable-syslog or --disable-syslog was given.
895 if test "${enable_syslog+set}" = set; then
896   enableval="$enable_syslog"
897   
898         ol_arg=invalid
899         for ol_val in auto yes no ; do
900                 if test "$enableval" = "$ol_val" ; then
901                         ol_arg="$ol_val"
902                 fi
903         done
904         if test "$ol_arg" = "invalid" ; then
905                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
906         fi
907         ol_enable_syslog="$ol_arg"
908
909 else
910         ol_enable_syslog="auto"
911 fi
912 # end --enable-syslog
913 # OpenLDAP --enable-proctitle
914         # Check whether --enable-proctitle or --disable-proctitle was given.
915 if test "${enable_proctitle+set}" = set; then
916   enableval="$enable_proctitle"
917   
918         ol_arg=invalid
919         for ol_val in auto yes no ; do
920                 if test "$enableval" = "$ol_val" ; then
921                         ol_arg="$ol_val"
922                 fi
923         done
924         if test "$ol_arg" = "invalid" ; then
925                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
926         fi
927         ol_enable_proctitle="$ol_arg"
928
929 else
930         ol_enable_proctitle="yes"
931 fi
932 # end --enable-proctitle
933 # OpenLDAP --enable-cache
934         # Check whether --enable-cache or --disable-cache was given.
935 if test "${enable_cache+set}" = set; then
936   enableval="$enable_cache"
937   
938         ol_arg=invalid
939         for ol_val in auto yes no ; do
940                 if test "$enableval" = "$ol_val" ; then
941                         ol_arg="$ol_val"
942                 fi
943         done
944         if test "$ol_arg" = "invalid" ; then
945                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
946         fi
947         ol_enable_cache="$ol_arg"
948
949 else
950         ol_enable_cache="yes"
951 fi
952 # end --enable-cache
953 # OpenLDAP --enable-dns
954         # Check whether --enable-dns or --disable-dns was given.
955 if test "${enable_dns+set}" = set; then
956   enableval="$enable_dns"
957   
958         ol_arg=invalid
959         for ol_val in auto yes no ; do
960                 if test "$enableval" = "$ol_val" ; then
961                         ol_arg="$ol_val"
962                 fi
963         done
964         if test "$ol_arg" = "invalid" ; then
965                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
966         fi
967         ol_enable_dns="$ol_arg"
968
969 else
970         ol_enable_dns="no"
971 fi
972 # end --enable-dns
973 # OpenLDAP --enable-referrals
974         # Check whether --enable-referrals or --disable-referrals was given.
975 if test "${enable_referrals+set}" = set; then
976   enableval="$enable_referrals"
977   
978         ol_arg=invalid
979         for ol_val in auto yes no ; do
980                 if test "$enableval" = "$ol_val" ; then
981                         ol_arg="$ol_val"
982                 fi
983         done
984         if test "$ol_arg" = "invalid" ; then
985                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
986         fi
987         ol_enable_referrals="$ol_arg"
988
989 else
990         ol_enable_referrals="yes"
991 fi
992 # end --enable-referrals
993 # OpenLDAP --enable-cldap
994         # Check whether --enable-cldap or --disable-cldap was given.
995 if test "${enable_cldap+set}" = set; then
996   enableval="$enable_cldap"
997   
998         ol_arg=invalid
999         for ol_val in auto yes no ; do
1000                 if test "$enableval" = "$ol_val" ; then
1001                         ol_arg="$ol_val"
1002                 fi
1003         done
1004         if test "$ol_arg" = "invalid" ; then
1005                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1006         fi
1007         ol_enable_cldap="$ol_arg"
1008
1009 else
1010         ol_enable_cldap="no"
1011 fi
1012 # end --enable-cldap
1013 # OpenLDAP --enable-x_compile
1014         # Check whether --enable-x_compile or --disable-x_compile was given.
1015 if test "${enable_x_compile+set}" = set; then
1016   enableval="$enable_x_compile"
1017   
1018         ol_arg=invalid
1019         for ol_val in yes no ; do
1020                 if test "$enableval" = "$ol_val" ; then
1021                         ol_arg="$ol_val"
1022                 fi
1023         done
1024         if test "$ol_arg" = "invalid" ; then
1025                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1026         fi
1027         ol_enable_x_compile="$ol_arg"
1028
1029 else
1030         ol_enable_x_compile="no"
1031 fi
1032 # end --enable-x_compile
1033
1034 # OpenLDAP --enable-dmalloc
1035         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1036 if test "${enable_dmalloc+set}" = set; then
1037   enableval="$enable_dmalloc"
1038   
1039         ol_arg=invalid
1040         for ol_val in auto yes no ; do
1041                 if test "$enableval" = "$ol_val" ; then
1042                         ol_arg="$ol_val"
1043                 fi
1044         done
1045         if test "$ol_arg" = "invalid" ; then
1046                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1047         fi
1048         ol_enable_dmalloc="$ol_arg"
1049
1050 else
1051         ol_enable_dmalloc="no"
1052 fi
1053 # end --enable-dmalloc
1054
1055 # OpenLDAP --with-kerberos
1056         # Check whether --with-kerberos or --without-kerberos was given.
1057 if test "${with_kerberos+set}" = set; then
1058   withval="$with_kerberos"
1059   
1060         ol_arg=invalid
1061         for ol_val in auto k5 k4 afs yes no ; do
1062                 if test "$withval" = "$ol_val" ; then
1063                         ol_arg="$ol_val"
1064                 fi
1065         done
1066         if test "$ol_arg" = "invalid" ; then
1067                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1068         fi
1069         ol_with_kerberos="$ol_arg"
1070
1071 else
1072         ol_with_kerberos="auto"
1073 fi
1074 # end --with-kerberos
1075
1076 # OpenLDAP --with-readline
1077         # Check whether --with-readline or --without-readline was given.
1078 if test "${with_readline+set}" = set; then
1079   withval="$with_readline"
1080   
1081         ol_arg=invalid
1082         for ol_val in auto yes no  ; do
1083                 if test "$withval" = "$ol_val" ; then
1084                         ol_arg="$ol_val"
1085                 fi
1086         done
1087         if test "$ol_arg" = "invalid" ; then
1088                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1089         fi
1090         ol_with_readline="$ol_arg"
1091
1092 else
1093         ol_with_readline="auto"
1094 fi
1095 # end --with-readline
1096
1097 # OpenLDAP --with-threads
1098         # Check whether --with-threads or --without-threads was given.
1099 if test "${with_threads+set}" = set; then
1100   withval="$with_threads"
1101   
1102         ol_arg=invalid
1103         for ol_val in auto posix mach lwp yes no manual  ; do
1104                 if test "$withval" = "$ol_val" ; then
1105                         ol_arg="$ol_val"
1106                 fi
1107         done
1108         if test "$ol_arg" = "invalid" ; then
1109                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1110         fi
1111         ol_with_threads="$ol_arg"
1112
1113 else
1114         ol_with_threads="auto"
1115 fi
1116 # end --with-threads
1117
1118 # OpenLDAP --with-tls
1119         # Check whether --with-tls or --without-tls was given.
1120 if test "${with_tls+set}" = set; then
1121   withval="$with_tls"
1122   
1123         ol_arg=invalid
1124         for ol_val in auto ssleay openssl yes no  ; do
1125                 if test "$withval" = "$ol_val" ; then
1126                         ol_arg="$ol_val"
1127                 fi
1128         done
1129         if test "$ol_arg" = "invalid" ; then
1130                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1131         fi
1132         ol_with_tls="$ol_arg"
1133
1134 else
1135         ol_with_tls="auto"
1136 fi
1137 # end --with-tls
1138
1139 # OpenLDAP --with-yielding_select
1140         # Check whether --with-yielding_select or --without-yielding_select was given.
1141 if test "${with_yielding_select+set}" = set; then
1142   withval="$with_yielding_select"
1143   
1144         ol_arg=invalid
1145         for ol_val in auto yes no manual  ; do
1146                 if test "$withval" = "$ol_val" ; then
1147                         ol_arg="$ol_val"
1148                 fi
1149         done
1150         if test "$ol_arg" = "invalid" ; then
1151                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1152         fi
1153         ol_with_yielding_select="$ol_arg"
1154
1155 else
1156         ol_with_yielding_select="auto"
1157 fi
1158 # end --with-yielding_select
1159
1160
1161
1162 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1163 if test "${with_xxldapdoptions+set}" = set; then
1164   withval="$with_xxldapdoptions"
1165   :
1166 fi
1167
1168 # OpenLDAP --enable-ldapd
1169         # Check whether --enable-ldapd or --disable-ldapd was given.
1170 if test "${enable_ldapd+set}" = set; then
1171   enableval="$enable_ldapd"
1172   
1173         ol_arg=invalid
1174         for ol_val in auto yes no ; do
1175                 if test "$enableval" = "$ol_val" ; then
1176                         ol_arg="$ol_val"
1177                 fi
1178         done
1179         if test "$ol_arg" = "invalid" ; then
1180                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1181         fi
1182         ol_enable_ldapd="$ol_arg"
1183
1184 else
1185         ol_enable_ldapd="no"
1186 fi
1187 # end --enable-ldapd
1188
1189 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1190 if test "${with_xxslapdoptions+set}" = set; then
1191   withval="$with_xxslapdoptions"
1192   :
1193 fi
1194
1195 # OpenLDAP --enable-slapd
1196         # Check whether --enable-slapd or --disable-slapd was given.
1197 if test "${enable_slapd+set}" = set; then
1198   enableval="$enable_slapd"
1199   
1200         ol_arg=invalid
1201         for ol_val in auto yes no ; do
1202                 if test "$enableval" = "$ol_val" ; then
1203                         ol_arg="$ol_val"
1204                 fi
1205         done
1206         if test "$ol_arg" = "invalid" ; then
1207                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1208         fi
1209         ol_enable_slapd="$ol_arg"
1210
1211 else
1212         ol_enable_slapd="yes"
1213 fi
1214 # end --enable-slapd
1215 # OpenLDAP --enable-aclgroups
1216         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1217 if test "${enable_aclgroups+set}" = set; then
1218   enableval="$enable_aclgroups"
1219   
1220         ol_arg=invalid
1221         for ol_val in auto yes no ; do
1222                 if test "$enableval" = "$ol_val" ; then
1223                         ol_arg="$ol_val"
1224                 fi
1225         done
1226         if test "$ol_arg" = "invalid" ; then
1227                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1228         fi
1229         ol_enable_aclgroups="$ol_arg"
1230
1231 else
1232         ol_enable_aclgroups="auto"
1233 fi
1234 # end --enable-aclgroups
1235 # OpenLDAP --enable-cleartext
1236         # Check whether --enable-cleartext or --disable-cleartext was given.
1237 if test "${enable_cleartext+set}" = set; then
1238   enableval="$enable_cleartext"
1239   
1240         ol_arg=invalid
1241         for ol_val in auto yes no ; do
1242                 if test "$enableval" = "$ol_val" ; then
1243                         ol_arg="$ol_val"
1244                 fi
1245         done
1246         if test "$ol_arg" = "invalid" ; then
1247                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1248         fi
1249         ol_enable_cleartext="$ol_arg"
1250
1251 else
1252         ol_enable_cleartext="yes"
1253 fi
1254 # end --enable-cleartext
1255 # OpenLDAP --enable-crypt
1256         # Check whether --enable-crypt or --disable-crypt was given.
1257 if test "${enable_crypt+set}" = set; then
1258   enableval="$enable_crypt"
1259   
1260         ol_arg=invalid
1261         for ol_val in auto yes no ; do
1262                 if test "$enableval" = "$ol_val" ; then
1263                         ol_arg="$ol_val"
1264                 fi
1265         done
1266         if test "$ol_arg" = "invalid" ; then
1267                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1268         fi
1269         ol_enable_crypt="$ol_arg"
1270
1271 else
1272         ol_enable_crypt="auto"
1273 fi
1274 # end --enable-crypt
1275 # OpenLDAP --enable-wrappers
1276         # Check whether --enable-wrappers or --disable-wrappers was given.
1277 if test "${enable_wrappers+set}" = set; then
1278   enableval="$enable_wrappers"
1279   
1280         ol_arg=invalid
1281         for ol_val in auto yes no ; do
1282                 if test "$enableval" = "$ol_val" ; then
1283                         ol_arg="$ol_val"
1284                 fi
1285         done
1286         if test "$ol_arg" = "invalid" ; then
1287                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1288         fi
1289         ol_enable_wrappers="$ol_arg"
1290
1291 else
1292         ol_enable_wrappers="no"
1293 fi
1294 # end --enable-wrappers
1295 # OpenLDAP --enable-phonetic
1296         # Check whether --enable-phonetic or --disable-phonetic was given.
1297 if test "${enable_phonetic+set}" = set; then
1298   enableval="$enable_phonetic"
1299   
1300         ol_arg=invalid
1301         for ol_val in auto yes no ; do
1302                 if test "$enableval" = "$ol_val" ; then
1303                         ol_arg="$ol_val"
1304                 fi
1305         done
1306         if test "$ol_arg" = "invalid" ; then
1307                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1308         fi
1309         ol_enable_phonetic="$ol_arg"
1310
1311 else
1312         ol_enable_phonetic="no"
1313 fi
1314 # end --enable-phonetic
1315 # OpenLDAP --enable-rlookups
1316         # Check whether --enable-rlookups or --disable-rlookups was given.
1317 if test "${enable_rlookups+set}" = set; then
1318   enableval="$enable_rlookups"
1319   
1320         ol_arg=invalid
1321         for ol_val in auto yes no ; do
1322                 if test "$enableval" = "$ol_val" ; then
1323                         ol_arg="$ol_val"
1324                 fi
1325         done
1326         if test "$ol_arg" = "invalid" ; then
1327                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1328         fi
1329         ol_enable_rlookups="$ol_arg"
1330
1331 else
1332         ol_enable_rlookups="auto"
1333 fi
1334 # end --enable-rlookups
1335
1336 # OpenLDAP --enable-bdb2
1337         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1338 if test "${enable_bdb2+set}" = set; then
1339   enableval="$enable_bdb2"
1340   
1341         ol_arg=invalid
1342         for ol_val in auto yes no ; do
1343                 if test "$enableval" = "$ol_val" ; then
1344                         ol_arg="$ol_val"
1345                 fi
1346         done
1347         if test "$ol_arg" = "invalid" ; then
1348                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1349         fi
1350         ol_enable_bdb2="$ol_arg"
1351
1352 else
1353         ol_enable_bdb2="no"
1354 fi
1355 # end --enable-bdb2
1356 # OpenLDAP --enable-ldbm
1357         # Check whether --enable-ldbm or --disable-ldbm was given.
1358 if test "${enable_ldbm+set}" = set; then
1359   enableval="$enable_ldbm"
1360   
1361         ol_arg=invalid
1362         for ol_val in auto yes no ; do
1363                 if test "$enableval" = "$ol_val" ; then
1364                         ol_arg="$ol_val"
1365                 fi
1366         done
1367         if test "$ol_arg" = "invalid" ; then
1368                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1369         fi
1370         ol_enable_ldbm="$ol_arg"
1371
1372 else
1373         ol_enable_ldbm="yes"
1374 fi
1375 # end --enable-ldbm
1376 # OpenLDAP --with-ldbm_api
1377         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1378 if test "${with_ldbm_api+set}" = set; then
1379   withval="$with_ldbm_api"
1380   
1381         ol_arg=invalid
1382         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1383                 if test "$withval" = "$ol_val" ; then
1384                         ol_arg="$ol_val"
1385                 fi
1386         done
1387         if test "$ol_arg" = "invalid" ; then
1388                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1389         fi
1390         ol_with_ldbm_api="$ol_arg"
1391
1392 else
1393         ol_with_ldbm_api="auto"
1394 fi
1395 # end --with-ldbm_api
1396
1397 # OpenLDAP --with-ldbm_type
1398         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1399 if test "${with_ldbm_type+set}" = set; then
1400   withval="$with_ldbm_type"
1401   
1402         ol_arg=invalid
1403         for ol_val in auto btree hash ; do
1404                 if test "$withval" = "$ol_val" ; then
1405                         ol_arg="$ol_val"
1406                 fi
1407         done
1408         if test "$ol_arg" = "invalid" ; then
1409                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1410         fi
1411         ol_with_ldbm_type="$ol_arg"
1412
1413 else
1414         ol_with_ldbm_type="auto"
1415 fi
1416 # end --with-ldbm_type
1417
1418
1419 # OpenLDAP --enable-passwd
1420         # Check whether --enable-passwd or --disable-passwd was given.
1421 if test "${enable_passwd+set}" = set; then
1422   enableval="$enable_passwd"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto yes no ; do
1426                 if test "$enableval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1432         fi
1433         ol_enable_passwd="$ol_arg"
1434
1435 else
1436         ol_enable_passwd="no"
1437 fi
1438 # end --enable-passwd
1439 # OpenLDAP --enable-perl
1440         # Check whether --enable-perl or --disable-perl was given.
1441 if test "${enable_perl+set}" = set; then
1442   enableval="$enable_perl"
1443   
1444         ol_arg=invalid
1445         for ol_val in auto yes no ; do
1446                 if test "$enableval" = "$ol_val" ; then
1447                         ol_arg="$ol_val"
1448                 fi
1449         done
1450         if test "$ol_arg" = "invalid" ; then
1451                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1452         fi
1453         ol_enable_perl="$ol_arg"
1454
1455 else
1456         ol_enable_perl="no"
1457 fi
1458 # end --enable-perl
1459 # OpenLDAP --enable-shell
1460         # Check whether --enable-shell or --disable-shell was given.
1461 if test "${enable_shell+set}" = set; then
1462   enableval="$enable_shell"
1463   
1464         ol_arg=invalid
1465         for ol_val in auto yes no ; do
1466                 if test "$enableval" = "$ol_val" ; then
1467                         ol_arg="$ol_val"
1468                 fi
1469         done
1470         if test "$ol_arg" = "invalid" ; then
1471                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1472         fi
1473         ol_enable_shell="$ol_arg"
1474
1475 else
1476         ol_enable_shell="no"
1477 fi
1478 # end --enable-shell
1479 # OpenLDAP --enable-tcl
1480         # Check whether --enable-tcl or --disable-tcl was given.
1481 if test "${enable_tcl+set}" = set; then
1482   enableval="$enable_tcl"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto yes no ; do
1486                 if test "$enableval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1492         fi
1493         ol_enable_tcl="$ol_arg"
1494
1495 else
1496         ol_enable_tcl="no"
1497 fi
1498 # end --enable-tcl
1499
1500 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1501 if test "${with_xxslurpdoptions+set}" = set; then
1502   withval="$with_xxslurpdoptions"
1503   :
1504 fi
1505
1506 # OpenLDAP --enable-slurpd
1507         # Check whether --enable-slurpd or --disable-slurpd was given.
1508 if test "${enable_slurpd+set}" = set; then
1509   enableval="$enable_slurpd"
1510   
1511         ol_arg=invalid
1512         for ol_val in auto yes no ; do
1513                 if test "$enableval" = "$ol_val" ; then
1514                         ol_arg="$ol_val"
1515                 fi
1516         done
1517         if test "$ol_arg" = "invalid" ; then
1518                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1519         fi
1520         ol_enable_slurpd="$ol_arg"
1521
1522 else
1523         ol_enable_slurpd="auto"
1524 fi
1525 # end --enable-slurpd
1526
1527 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1528 if test "${with_xxliboptions+set}" = set; then
1529   withval="$with_xxliboptions"
1530   :
1531 fi
1532
1533 # Check whether --enable-static or --disable-static was given.
1534 if test "${enable_static+set}" = set; then
1535   enableval="$enable_static"
1536   p=${PACKAGE-default}
1537 case "$enableval" in
1538 yes) enable_static=yes ;;
1539 no) enable_static=no ;;
1540 *)
1541   enable_static=no
1542   # Look at the argument we got.  We use all the common list separators.
1543   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1544   for pkg in $enableval; do
1545     if test "X$pkg" = "X$p"; then
1546       enable_static=yes
1547     fi
1548   done
1549   IFS="$ac_save_ifs"
1550   ;;
1551 esac
1552 else
1553   enable_static=yes
1554 fi
1555
1556 # Check whether --enable-shared or --disable-shared was given.
1557 if test "${enable_shared+set}" = set; then
1558   enableval="$enable_shared"
1559   p=${PACKAGE-default}
1560 case "$enableval" in
1561 yes) enable_shared=yes ;;
1562 no) enable_shared=no ;;
1563 *)
1564   enable_shared=no
1565   # Look at the argument we got.  We use all the common list separators.
1566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1567   for pkg in $enableval; do
1568     if test "X$pkg" = "X$p"; then
1569       enable_shared=yes
1570     fi
1571   done
1572   IFS="$ac_save_ifs"
1573   ;;
1574 esac
1575 else
1576   enable_shared=yes
1577 fi
1578
1579
1580 # validate options
1581 if test $ol_enable_dns = yes ; then
1582         if test $ol_enable_referrals = no ; then
1583                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1584         fi
1585         if test $ol_enable_referrals = auto ; then
1586                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1587                 ol_enable_referrals=yes
1588         fi
1589 fi
1590
1591 if test $ol_enable_slapd = no ; then
1592                 if test $ol_enable_bdb2 = yes ; then
1593                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1594         fi
1595         if test $ol_enable_ldbm = yes ; then
1596                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1597         fi
1598         if test $ol_enable_passwd = yes ; then
1599                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1600         fi
1601         if test $ol_enable_perl = yes ; then
1602                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1603         fi
1604         if test $ol_enable_shell = yes ; then
1605                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1606         fi
1607         if test $ol_enable_tcl = yes ; then
1608                 echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2
1609         fi
1610         if test $ol_enable_aclgroups = yes ; then
1611                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1612         fi
1613         if test $ol_enable_wrappers = yes ; then
1614                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1615         fi
1616         if test $ol_enable_phonetic = yes ; then
1617                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1618         fi
1619         if test $ol_enable_rlookups = yes ; then
1620                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1621         fi
1622         if test $ol_with_ldbm_api != auto ; then
1623                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1624         fi
1625         if test $ol_with_ldbm_type != auto ; then
1626                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1627         fi
1628         if test $ol_enable_slurpd = yes ; then
1629                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1630         fi
1631
1632         # force settings to no
1633         ol_enable_bdb2=no
1634         ol_enable_ldbm=no
1635         ol_enable_passwd=no
1636         ol_enable_perl=no
1637         ol_enable_shell=no
1638         ol_enable_tcl=no
1639         ol_enable_aclgroups=no
1640         ol_enable_wrappers=no
1641         ol_enable_phonetic=no
1642         ol_enable_rlookups=no
1643         ol_with_ldbm_api=no
1644         ol_with_ldbm_type=no
1645         ol_enable_slurpd=no
1646
1647 elif test $ol_enable_ldbm = no ; then
1648         
1649         if test $ol_with_ldbm_api != auto ; then
1650                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1651         fi
1652
1653         if test $ol_with_ldbm_type != auto ; then
1654                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1655         fi
1656
1657         if test $ol_enable_bdb2 = yes ; then
1658                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1659         fi
1660
1661         if test $ol_enable_passwd = no -a \
1662                 $ol_enable_perl = no -a \
1663                 $ol_enable_shell = no -a \
1664                 $ol_enable_tcl = no ; then
1665                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1666         fi
1667
1668         ol_with_ldbm_api=no
1669         ol_with_ldbm_type=no
1670
1671 elif test $ol_enable_bdb2 = yes ; then
1672         
1673         if test $ol_with_ldbm_api != auto -a \
1674                 $ol_with_ldbm_api != db2 ; then
1675                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1676         fi
1677
1678         ol_with_ldbm_api=db2
1679
1680 else
1681         
1682         if test $ol_enable_bdb2 != no ; then
1683                 if test $ol_with_ldbm_api != auto -a \
1684                         $ol_with_ldbm_api != db2 ; then
1685                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1686                         ol_enable_bdb2=no
1687                 fi
1688         fi
1689
1690         if test $ol_with_ldbm_api = gdbm -a \
1691                 $ol_with_ldbm_type = btree ; then
1692                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1693         fi
1694         if test $ol_with_ldbm_api = mdbm -a \
1695                 $ol_with_ldbm_type = btree ; then
1696                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1697         fi
1698         if test $ol_with_ldbm_api = ndbm -a \
1699                 $ol_with_ldbm_type = btree ; then
1700                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1701         fi
1702 fi
1703
1704 if test $ol_enable_slurpd = yes ; then
1705                 if test $ol_with_threads = no ; then
1706                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1707         fi
1708 fi
1709
1710 echo "$ac_t""done" 1>&6
1711
1712 ## Initialize vars
1713 LDAP_LIBS=
1714 LDBM_LIBS=
1715 LTHREAD_LIBS=
1716 LUTIL_LIBS=
1717
1718 LDAPD_LIBS=
1719 SLAPD_LIBS=
1720 SLURPD_LIBS=
1721
1722 BUILD_LDAPD=no
1723 BUILD_SLAPD=no
1724 BUILD_SLURPD=no
1725
1726 BUILD_BDB2=no
1727 BUILD_LDBM=no
1728 BUILD_PASSWD=no
1729 BUILD_PERL=no
1730 BUILD_SHELL=no
1731 BUILD_TCL=no
1732 BUILD_THREAD=no
1733
1734 SLAPD_PERL_LDFLAGS=
1735 SLAPD_PERL_CPPFLAGS=
1736
1737 KRB_LIBS=
1738 READLINE_LIBS=
1739 TERMCAP_LIBS=
1740 TLS_LIBS=
1741
1742
1743 # Find a good install program.  We prefer a C program (faster),
1744 # so one script is as good as another.  But avoid the broken or
1745 # incompatible versions:
1746 # SysV /etc/install, /usr/sbin/install
1747 # SunOS /usr/etc/install
1748 # IRIX /sbin/install
1749 # AIX /bin/install
1750 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1751 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1752 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1753 # ./install, which can be erroneously created by make from ./install.sh.
1754 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1755 echo "configure:1756: checking for a BSD compatible install" >&5
1756 if test -z "$INSTALL"; then
1757 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1758   echo $ac_n "(cached) $ac_c" 1>&6
1759 else
1760     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1761   for ac_dir in $PATH; do
1762     # Account for people who put trailing slashes in PATH elements.
1763     case "$ac_dir/" in
1764     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1765     *)
1766       # OSF1 and SCO ODT 3.0 have their own names for install.
1767       # Don't use installbsd from OSF since it installs stuff as root
1768       # by default.
1769       for ac_prog in ginstall scoinst install; do
1770         if test -f $ac_dir/$ac_prog; then
1771           if test $ac_prog = install &&
1772             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1773             # AIX install.  It has an incompatible calling convention.
1774             :
1775           else
1776             ac_cv_path_install="$ac_dir/$ac_prog -c"
1777             break 2
1778           fi
1779         fi
1780       done
1781       ;;
1782     esac
1783   done
1784   IFS="$ac_save_IFS"
1785
1786 fi
1787   if test "${ac_cv_path_install+set}" = set; then
1788     INSTALL="$ac_cv_path_install"
1789   else
1790     # As a last resort, use the slow shell script.  We don't cache a
1791     # path for INSTALL within a source directory, because that will
1792     # break other packages using the cache if that directory is
1793     # removed, or if the path is relative.
1794     INSTALL="$ac_install_sh"
1795   fi
1796 fi
1797 echo "$ac_t""$INSTALL" 1>&6
1798
1799 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1800 # It thinks the first close brace ends the variable substitution.
1801 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1802
1803 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1804
1805 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1806
1807
1808 CC=${CC-"cc"}
1809
1810
1811 # Make sure we can run config.sub.
1812 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1813 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1814 fi
1815
1816 echo $ac_n "checking host system type""... $ac_c" 1>&6
1817 echo "configure:1818: checking host system type" >&5
1818
1819 host_alias=$host
1820 case "$host_alias" in
1821 NONE)
1822   case $nonopt in
1823   NONE)
1824     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1825     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1826     fi ;;
1827   *) host_alias=$nonopt ;;
1828   esac ;;
1829 esac
1830
1831 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1832 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1833 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1834 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1835 echo "$ac_t""$host" 1>&6
1836
1837 # Extract the first word of "ranlib", so it can be a program name with args.
1838 set dummy ranlib; ac_word=$2
1839 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1840 echo "configure:1841: checking for $ac_word" >&5
1841 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1842   echo $ac_n "(cached) $ac_c" 1>&6
1843 else
1844   if test -n "$RANLIB"; then
1845   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1846 else
1847   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1848   ac_dummy="$PATH"
1849   for ac_dir in $ac_dummy; do
1850     test -z "$ac_dir" && ac_dir=.
1851     if test -f $ac_dir/$ac_word; then
1852       ac_cv_prog_RANLIB="ranlib"
1853       break
1854     fi
1855   done
1856   IFS="$ac_save_ifs"
1857   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1858 fi
1859 fi
1860 RANLIB="$ac_cv_prog_RANLIB"
1861 if test -n "$RANLIB"; then
1862   echo "$ac_t""$RANLIB" 1>&6
1863 else
1864   echo "$ac_t""no" 1>&6
1865 fi
1866
1867 # Extract the first word of "gcc", so it can be a program name with args.
1868 set dummy gcc; ac_word=$2
1869 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1870 echo "configure:1871: checking for $ac_word" >&5
1871 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1872   echo $ac_n "(cached) $ac_c" 1>&6
1873 else
1874   if test -n "$CC"; then
1875   ac_cv_prog_CC="$CC" # Let the user override the test.
1876 else
1877   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1878   ac_dummy="$PATH"
1879   for ac_dir in $ac_dummy; do
1880     test -z "$ac_dir" && ac_dir=.
1881     if test -f $ac_dir/$ac_word; then
1882       ac_cv_prog_CC="gcc"
1883       break
1884     fi
1885   done
1886   IFS="$ac_save_ifs"
1887 fi
1888 fi
1889 CC="$ac_cv_prog_CC"
1890 if test -n "$CC"; then
1891   echo "$ac_t""$CC" 1>&6
1892 else
1893   echo "$ac_t""no" 1>&6
1894 fi
1895
1896 if test -z "$CC"; then
1897   # Extract the first word of "cc", so it can be a program name with args.
1898 set dummy cc; ac_word=$2
1899 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1900 echo "configure:1901: checking for $ac_word" >&5
1901 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1902   echo $ac_n "(cached) $ac_c" 1>&6
1903 else
1904   if test -n "$CC"; then
1905   ac_cv_prog_CC="$CC" # Let the user override the test.
1906 else
1907   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1908   ac_prog_rejected=no
1909   ac_dummy="$PATH"
1910   for ac_dir in $ac_dummy; do
1911     test -z "$ac_dir" && ac_dir=.
1912     if test -f $ac_dir/$ac_word; then
1913       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1914         ac_prog_rejected=yes
1915         continue
1916       fi
1917       ac_cv_prog_CC="cc"
1918       break
1919     fi
1920   done
1921   IFS="$ac_save_ifs"
1922 if test $ac_prog_rejected = yes; then
1923   # We found a bogon in the path, so make sure we never use it.
1924   set dummy $ac_cv_prog_CC
1925   shift
1926   if test $# -gt 0; then
1927     # We chose a different compiler from the bogus one.
1928     # However, it has the same basename, so the bogon will be chosen
1929     # first if we set CC to just the basename; use the full file name.
1930     shift
1931     set dummy "$ac_dir/$ac_word" "$@"
1932     shift
1933     ac_cv_prog_CC="$@"
1934   fi
1935 fi
1936 fi
1937 fi
1938 CC="$ac_cv_prog_CC"
1939 if test -n "$CC"; then
1940   echo "$ac_t""$CC" 1>&6
1941 else
1942   echo "$ac_t""no" 1>&6
1943 fi
1944
1945   if test -z "$CC"; then
1946     case "`uname -s`" in
1947     *win32* | *WIN32*)
1948       # Extract the first word of "cl", so it can be a program name with args.
1949 set dummy cl; ac_word=$2
1950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1951 echo "configure:1952: checking for $ac_word" >&5
1952 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1953   echo $ac_n "(cached) $ac_c" 1>&6
1954 else
1955   if test -n "$CC"; then
1956   ac_cv_prog_CC="$CC" # Let the user override the test.
1957 else
1958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1959   ac_dummy="$PATH"
1960   for ac_dir in $ac_dummy; do
1961     test -z "$ac_dir" && ac_dir=.
1962     if test -f $ac_dir/$ac_word; then
1963       ac_cv_prog_CC="cl"
1964       break
1965     fi
1966   done
1967   IFS="$ac_save_ifs"
1968 fi
1969 fi
1970 CC="$ac_cv_prog_CC"
1971 if test -n "$CC"; then
1972   echo "$ac_t""$CC" 1>&6
1973 else
1974   echo "$ac_t""no" 1>&6
1975 fi
1976  ;;
1977     esac
1978   fi
1979   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1980 fi
1981
1982 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1983 echo "configure:1984: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1984
1985 ac_ext=c
1986 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1987 ac_cpp='$CPP $CPPFLAGS'
1988 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1989 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1990 cross_compiling=$ac_cv_prog_cc_cross
1991
1992 cat > conftest.$ac_ext << EOF
1993
1994 #line 1995 "configure"
1995 #include "confdefs.h"
1996
1997 main(){return(0);}
1998 EOF
1999 if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000   ac_cv_prog_cc_works=yes
2001   # If we can't run a trivial program, we are probably using a cross compiler.
2002   if (./conftest; exit) 2>/dev/null; then
2003     ac_cv_prog_cc_cross=no
2004   else
2005     ac_cv_prog_cc_cross=yes
2006   fi
2007 else
2008   echo "configure: failed program was:" >&5
2009   cat conftest.$ac_ext >&5
2010   ac_cv_prog_cc_works=no
2011 fi
2012 rm -fr conftest*
2013 ac_ext=c
2014 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2015 ac_cpp='$CPP $CPPFLAGS'
2016 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2017 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2018 cross_compiling=$ac_cv_prog_cc_cross
2019
2020 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2021 if test $ac_cv_prog_cc_works = no; then
2022   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2023 fi
2024 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2025 echo "configure:2026: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2026 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2027 cross_compiling=$ac_cv_prog_cc_cross
2028
2029 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2030 echo "configure:2031: checking whether we are using GNU C" >&5
2031 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2032   echo $ac_n "(cached) $ac_c" 1>&6
2033 else
2034   cat > conftest.c <<EOF
2035 #ifdef __GNUC__
2036   yes;
2037 #endif
2038 EOF
2039 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2040   ac_cv_prog_gcc=yes
2041 else
2042   ac_cv_prog_gcc=no
2043 fi
2044 fi
2045
2046 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2047
2048 if test $ac_cv_prog_gcc = yes; then
2049   GCC=yes
2050 else
2051   GCC=
2052 fi
2053
2054 ac_test_CFLAGS="${CFLAGS+set}"
2055 ac_save_CFLAGS="$CFLAGS"
2056 CFLAGS=
2057 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2058 echo "configure:2059: checking whether ${CC-cc} accepts -g" >&5
2059 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2060   echo $ac_n "(cached) $ac_c" 1>&6
2061 else
2062   echo 'void f(){}' > conftest.c
2063 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2064   ac_cv_prog_cc_g=yes
2065 else
2066   ac_cv_prog_cc_g=no
2067 fi
2068 rm -f conftest*
2069
2070 fi
2071
2072 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2073 if test "$ac_test_CFLAGS" = set; then
2074   CFLAGS="$ac_save_CFLAGS"
2075 elif test $ac_cv_prog_cc_g = yes; then
2076   if test "$GCC" = yes; then
2077     CFLAGS="-g -O2"
2078   else
2079     CFLAGS="-g"
2080   fi
2081 else
2082   if test "$GCC" = yes; then
2083     CFLAGS="-O2"
2084   else
2085     CFLAGS=
2086   fi
2087 fi
2088
2089 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2090 if test "${with_gnu_ld+set}" = set; then
2091   withval="$with_gnu_ld"
2092   test "$withval" = no || with_gnu_ld=yes
2093 else
2094   with_gnu_ld=no
2095 fi
2096
2097
2098 ac_prog=ld
2099 if test "$ac_cv_prog_gcc" = yes; then
2100   # Check if gcc -print-prog-name=ld gives a path.
2101   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2102 echo "configure:2103: checking for ld used by GCC" >&5
2103   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2104   case "$ac_prog" in
2105   # Accept absolute paths.
2106   /* | A-Za-z:\\*)
2107     test -z "$LD" && LD="$ac_prog"
2108     ;;
2109   "")
2110     # If it fails, then pretend we aren't using GCC.
2111     ac_prog=ld
2112     ;;
2113   *)
2114     # If it is relative, then search for the first ld in PATH.
2115     with_gnu_ld=unknown
2116     ;;
2117   esac
2118 elif test "$with_gnu_ld" = yes; then
2119   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2120 echo "configure:2121: checking for GNU ld" >&5
2121 else
2122   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2123 echo "configure:2124: checking for non-GNU ld" >&5
2124 fi
2125 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2126   echo $ac_n "(cached) $ac_c" 1>&6
2127 else
2128   if test -z "$LD"; then
2129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2130   for ac_dir in $PATH; do
2131     test -z "$ac_dir" && ac_dir=.
2132     if test -f "$ac_dir/$ac_prog"; then
2133       ac_cv_path_LD="$ac_dir/$ac_prog"
2134       # Check to see if the program is GNU ld.  I'd rather use --version,
2135       # but apparently some GNU ld's only accept -v.
2136       # Break only if it was the GNU/non-GNU ld that we prefer.
2137       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2138         test "$with_gnu_ld" != no && break
2139       else
2140         test "$with_gnu_ld" != yes && break
2141       fi
2142     fi
2143   done
2144   IFS="$ac_save_ifs"
2145 else
2146   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2147 fi
2148 fi
2149
2150 LD="$ac_cv_path_LD"
2151 if test -n "$LD"; then
2152   echo "$ac_t""$LD" 1>&6
2153 else
2154   echo "$ac_t""no" 1>&6
2155 fi
2156 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2157
2158 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2159 echo "configure:2160: checking if the linker ($LD) is GNU ld" >&5
2160 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2161   echo $ac_n "(cached) $ac_c" 1>&6
2162 else
2163   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2164 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2165   ac_cv_prog_gnu_ld=yes
2166 else
2167   ac_cv_prog_gnu_ld=no
2168 fi
2169 fi
2170
2171 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2172
2173
2174 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2175 echo "configure:2176: checking for BSD-compatible nm" >&5
2176 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2177   echo $ac_n "(cached) $ac_c" 1>&6
2178 else
2179   case "$NM" in
2180 /* | A-Za-z:\\*)
2181   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2182   ;;
2183 *)
2184   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2185   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2186     test -z "$ac_dir" && ac_dir=.
2187     if test -f $ac_dir/nm; then
2188       # Check to see if the nm accepts a BSD-compat flag.
2189       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2190       #   nm: unknown option "B" ignored
2191       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2192         ac_cv_path_NM="$ac_dir/nm -B"
2193       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2194         ac_cv_path_NM="$ac_dir/nm -p"
2195       else
2196         ac_cv_path_NM="$ac_dir/nm"
2197       fi
2198       break
2199     fi
2200   done
2201   IFS="$ac_save_ifs"
2202   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2203   ;;
2204 esac
2205 fi
2206
2207 NM="$ac_cv_path_NM"
2208 echo "$ac_t""$NM" 1>&6
2209
2210
2211 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2212 echo "configure:2213: checking whether ln -s works" >&5
2213 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2214   echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216   rm -f conftestdata
2217 if ln -s X conftestdata 2>/dev/null
2218 then
2219   rm -f conftestdata
2220   ac_cv_prog_LN_S="ln -s"
2221 else
2222   ac_cv_prog_LN_S=ln
2223 fi
2224 fi
2225 LN_S="$ac_cv_prog_LN_S"
2226 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2227   echo "$ac_t""yes" 1>&6
2228 else
2229   echo "$ac_t""no" 1>&6
2230 fi
2231
2232 # Always use our own libtool.
2233 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2234
2235 # Check for any special flags to pass to ltconfig.
2236 libtool_flags=
2237 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2238 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2239 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2240 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2241 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2242
2243 # Some flags need to be propagated to the compiler or linker for good
2244 # libtool support.
2245 case "$host" in
2246 *-*-irix6*)
2247   # Find out which ABI we are using.
2248   echo '#line 2249 "configure"' > conftest.$ac_ext
2249   if { (eval echo configure:2250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2250     case "`/usr/bin/file conftest.o`" in
2251     *32-bit*)
2252       LD="${LD-ld} -32"
2253       ;;
2254     *N32*)
2255       LD="${LD-ld} -n32"
2256       ;;
2257     *64-bit*)
2258       LD="${LD-ld} -64"
2259       ;;
2260     esac
2261   fi
2262   rm -rf conftest*
2263   ;;
2264
2265 *-*-sco3.2v5*)
2266   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2267   CFLAGS="$CFLAGS -belf"
2268   ;;
2269 esac
2270
2271 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2272 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2273 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2274 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2275 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2276 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2277
2278
2279 for ac_prog in mawk gawk nawk awk
2280 do
2281 # Extract the first word of "$ac_prog", so it can be a program name with args.
2282 set dummy $ac_prog; ac_word=$2
2283 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2284 echo "configure:2285: checking for $ac_word" >&5
2285 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2286   echo $ac_n "(cached) $ac_c" 1>&6
2287 else
2288   if test -n "$AWK"; then
2289   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2290 else
2291   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2292   ac_dummy="$PATH"
2293   for ac_dir in $ac_dummy; do
2294     test -z "$ac_dir" && ac_dir=.
2295     if test -f $ac_dir/$ac_word; then
2296       ac_cv_prog_AWK="$ac_prog"
2297       break
2298     fi
2299   done
2300   IFS="$ac_save_ifs"
2301 fi
2302 fi
2303 AWK="$ac_cv_prog_AWK"
2304 if test -n "$AWK"; then
2305   echo "$ac_t""$AWK" 1>&6
2306 else
2307   echo "$ac_t""no" 1>&6
2308 fi
2309
2310 test -n "$AWK" && break
2311 done
2312
2313 # test for ln hardlink support
2314 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2315 echo "configure:2316: checking whether ln works" >&5
2316 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   rm -f conftest.src conftest.dst
2320 echo "conftest" > conftest.src
2321 if ln conftest.src conftest.dst 2>/dev/null
2322 then
2323   ol_cv_prog_LN_H="ln"
2324 else
2325   ol_cv_prog_LN_H="cp"
2326 fi
2327 rm -f conftest.src conftest.dst
2328
2329 fi
2330 LN_H="$ol_cv_prog_LN_H"
2331 if test "$ol_cv_prog_LN_H" = "ln"; then
2332         echo "$ac_t""yes" 1>&6
2333 else
2334         echo "$ac_t""no" 1>&6
2335 fi
2336
2337 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2338 echo "configure:2339: checking whether ln -s works" >&5
2339 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2340   echo $ac_n "(cached) $ac_c" 1>&6
2341 else
2342   rm -f conftestdata
2343 if ln -s X conftestdata 2>/dev/null
2344 then
2345   rm -f conftestdata
2346   ac_cv_prog_LN_S="ln -s"
2347 else
2348   ac_cv_prog_LN_S=ln
2349 fi
2350 fi
2351 LN_S="$ac_cv_prog_LN_S"
2352 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2353   echo "$ac_t""yes" 1>&6
2354 else
2355   echo "$ac_t""no" 1>&6
2356 fi
2357
2358
2359 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2360         LN_S="$LN_H"
2361 fi
2362
2363 # Extract the first word of "sendmail", so it can be a program name with args.
2364 set dummy sendmail; ac_word=$2
2365 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2366 echo "configure:2367: checking for $ac_word" >&5
2367 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2368   echo $ac_n "(cached) $ac_c" 1>&6
2369 else
2370   case "$SENDMAIL" in
2371   /*)
2372   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2373   ;;
2374   ?:/*)                  
2375   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2376   ;;
2377   *)
2378   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2379   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2380   for ac_dir in $ac_dummy; do 
2381     test -z "$ac_dir" && ac_dir=.
2382     if test -f $ac_dir/$ac_word; then
2383       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2384       break
2385     fi
2386   done
2387   IFS="$ac_save_ifs"
2388   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2389   ;;
2390 esac
2391 fi
2392 SENDMAIL="$ac_cv_path_SENDMAIL"
2393 if test -n "$SENDMAIL"; then
2394   echo "$ac_t""$SENDMAIL" 1>&6
2395 else
2396   echo "$ac_t""no" 1>&6
2397 fi
2398
2399 # Extract the first word of "vi", so it can be a program name with args.
2400 set dummy vi; ac_word=$2
2401 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2402 echo "configure:2403: checking for $ac_word" >&5
2403 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2404   echo $ac_n "(cached) $ac_c" 1>&6
2405 else
2406   case "$EDITOR" in
2407   /*)
2408   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2409   ;;
2410   ?:/*)                  
2411   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2412   ;;
2413   *)
2414   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2415   ac_dummy="$PATH:/usr/ucb"
2416   for ac_dir in $ac_dummy; do 
2417     test -z "$ac_dir" && ac_dir=.
2418     if test -f $ac_dir/$ac_word; then
2419       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2420       break
2421     fi
2422   done
2423   IFS="$ac_save_ifs"
2424   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2425   ;;
2426 esac
2427 fi
2428 EDITOR="$ac_cv_path_EDITOR"
2429 if test -n "$EDITOR"; then
2430   echo "$ac_t""$EDITOR" 1>&6
2431 else
2432   echo "$ac_t""no" 1>&6
2433 fi
2434
2435 # Extract the first word of "finger", so it can be a program name with args.
2436 set dummy finger; ac_word=$2
2437 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2438 echo "configure:2439: checking for $ac_word" >&5
2439 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   case "$FINGER" in
2443   /*)
2444   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2445   ;;
2446   ?:/*)                  
2447   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2448   ;;
2449   *)
2450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2451   ac_dummy="$PATH:/usr/ucb"
2452   for ac_dir in $ac_dummy; do 
2453     test -z "$ac_dir" && ac_dir=.
2454     if test -f $ac_dir/$ac_word; then
2455       ac_cv_path_FINGER="$ac_dir/$ac_word"
2456       break
2457     fi
2458   done
2459   IFS="$ac_save_ifs"
2460   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2461   ;;
2462 esac
2463 fi
2464 FINGER="$ac_cv_path_FINGER"
2465 if test -n "$FINGER"; then
2466   echo "$ac_t""$FINGER" 1>&6
2467 else
2468   echo "$ac_t""no" 1>&6
2469 fi
2470
2471
2472 if test $ol_enable_perl = yes ; then
2473         # Extract the first word of "perl", so it can be a program name with args.
2474 set dummy perl; ac_word=$2
2475 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2476 echo "configure:2477: checking for $ac_word" >&5
2477 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   case "$PERLBIN" in
2481   /*)
2482   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2483   ;;
2484   ?:/*)                  
2485   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2486   ;;
2487   *)
2488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2489   ac_dummy="$PATH"
2490   for ac_dir in $ac_dummy; do 
2491     test -z "$ac_dir" && ac_dir=.
2492     if test -f $ac_dir/$ac_word; then
2493       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2494       break
2495     fi
2496   done
2497   IFS="$ac_save_ifs"
2498   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2499   ;;
2500 esac
2501 fi
2502 PERLBIN="$ac_cv_path_PERLBIN"
2503 if test -n "$PERLBIN"; then
2504   echo "$ac_t""$PERLBIN" 1>&6
2505 else
2506   echo "$ac_t""no" 1>&6
2507 fi
2508
2509
2510         if test "no$PERLBIN" = "no" ; then
2511                 ol_enable_perl=no
2512         fi
2513
2514         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2515         SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2516 fi
2517
2518 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2519 echo "configure:2520: checking how to run the C preprocessor" >&5
2520 # On Suns, sometimes $CPP names a directory.
2521 if test -n "$CPP" && test -d "$CPP"; then
2522   CPP=
2523 fi
2524 if test -z "$CPP"; then
2525 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2526   echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528     # This must be in double quotes, not single quotes, because CPP may get
2529   # substituted into the Makefile and "${CC-cc}" will confuse make.
2530   CPP="${CC-cc} -E"
2531   # On the NeXT, cc -E runs the code through the compiler's parser,
2532   # not just through cpp.
2533   cat > conftest.$ac_ext <<EOF
2534 #line 2535 "configure"
2535 #include "confdefs.h"
2536 #include <assert.h>
2537 Syntax Error
2538 EOF
2539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2540 { (eval echo configure:2541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2542 if test -z "$ac_err"; then
2543   :
2544 else
2545   echo "$ac_err" >&5
2546   echo "configure: failed program was:" >&5
2547   cat conftest.$ac_ext >&5
2548   rm -rf conftest*
2549   CPP="${CC-cc} -E -traditional-cpp"
2550   cat > conftest.$ac_ext <<EOF
2551 #line 2552 "configure"
2552 #include "confdefs.h"
2553 #include <assert.h>
2554 Syntax Error
2555 EOF
2556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2557 { (eval echo configure:2558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2559 if test -z "$ac_err"; then
2560   :
2561 else
2562   echo "$ac_err" >&5
2563   echo "configure: failed program was:" >&5
2564   cat conftest.$ac_ext >&5
2565   rm -rf conftest*
2566   CPP="${CC-cc} -nologo -E"
2567   cat > conftest.$ac_ext <<EOF
2568 #line 2569 "configure"
2569 #include "confdefs.h"
2570 #include <assert.h>
2571 Syntax Error
2572 EOF
2573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2574 { (eval echo configure:2575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2576 if test -z "$ac_err"; then
2577   :
2578 else
2579   echo "$ac_err" >&5
2580   echo "configure: failed program was:" >&5
2581   cat conftest.$ac_ext >&5
2582   rm -rf conftest*
2583   CPP=/lib/cpp
2584 fi
2585 rm -f conftest*
2586 fi
2587 rm -f conftest*
2588 fi
2589 rm -f conftest*
2590   ac_cv_prog_CPP="$CPP"
2591 fi
2592   CPP="$ac_cv_prog_CPP"
2593 else
2594   ac_cv_prog_CPP="$CPP"
2595 fi
2596 echo "$ac_t""$CPP" 1>&6
2597
2598
2599 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2600         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2601
2602 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2603         echo "configure: warning: programs compiled here do run here..." 1>&2
2604         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2605
2606 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2607         echo "configure: warning: programs compiled here do not run here..." 1>&2
2608         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2609 fi
2610
2611 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2612 echo "configure:2613: checking for AIX" >&5
2613 cat > conftest.$ac_ext <<EOF
2614 #line 2615 "configure"
2615 #include "confdefs.h"
2616 #ifdef _AIX
2617   yes
2618 #endif
2619
2620 EOF
2621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2622   egrep "yes" >/dev/null 2>&1; then
2623   rm -rf conftest*
2624   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2625 #define _ALL_SOURCE 1
2626 EOF
2627
2628 else
2629   rm -rf conftest*
2630   echo "$ac_t""no" 1>&6
2631 fi
2632 rm -f conftest*
2633
2634
2635 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2636 echo "configure:2637: checking for POSIXized ISC" >&5
2637 if test -d /etc/conf/kconfig.d &&
2638   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2639 then
2640   echo "$ac_t""yes" 1>&6
2641   ISC=yes # If later tests want to check for ISC.
2642   cat >> confdefs.h <<\EOF
2643 #define _POSIX_SOURCE 1
2644 EOF
2645
2646   if test "$GCC" = yes; then
2647     CC="$CC -posix"
2648   else
2649     CC="$CC -Xp"
2650   fi
2651 else
2652   echo "$ac_t""no" 1>&6
2653   ISC=
2654 fi
2655
2656 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2657 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2658 echo "configure:2659: checking for minix/config.h" >&5
2659 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   cat > conftest.$ac_ext <<EOF
2663 #line 2664 "configure"
2664 #include "confdefs.h"
2665 #include <minix/config.h>
2666 EOF
2667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2668 { (eval echo configure:2669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2670 if test -z "$ac_err"; then
2671   rm -rf conftest*
2672   eval "ac_cv_header_$ac_safe=yes"
2673 else
2674   echo "$ac_err" >&5
2675   echo "configure: failed program was:" >&5
2676   cat conftest.$ac_ext >&5
2677   rm -rf conftest*
2678   eval "ac_cv_header_$ac_safe=no"
2679 fi
2680 rm -f conftest*
2681 fi
2682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2683   echo "$ac_t""yes" 1>&6
2684   MINIX=yes
2685 else
2686   echo "$ac_t""no" 1>&6
2687 MINIX=
2688 fi
2689
2690 if test "$MINIX" = yes; then
2691   cat >> confdefs.h <<\EOF
2692 #define _POSIX_SOURCE 1
2693 EOF
2694
2695   cat >> confdefs.h <<\EOF
2696 #define _POSIX_1_SOURCE 2
2697 EOF
2698
2699   cat >> confdefs.h <<\EOF
2700 #define _MINIX 1
2701 EOF
2702
2703 fi
2704
2705
2706 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2707 echo "configure:2708: checking for be_app in -lbe" >&5
2708 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2710   echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712   ac_save_LIBS="$LIBS"
2713 LIBS="-lbe -lroot $LIBS"
2714 cat > conftest.$ac_ext <<EOF
2715 #line 2716 "configure"
2716 #include "confdefs.h"
2717 /* Override any gcc2 internal prototype to avoid an error.  */
2718 /* We use char because int might match the return type of a gcc2
2719     builtin and then its argument prototype would still apply.  */
2720 char be_app();
2721
2722 int main() {
2723 be_app()
2724 ; return 0; }
2725 EOF
2726 if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2727   rm -rf conftest*
2728   eval "ac_cv_lib_$ac_lib_var=yes"
2729 else
2730   echo "configure: failed program was:" >&5
2731   cat conftest.$ac_ext >&5
2732   rm -rf conftest*
2733   eval "ac_cv_lib_$ac_lib_var=no"
2734 fi
2735 rm -f conftest*
2736 LIBS="$ac_save_LIBS"
2737
2738 fi
2739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2740   echo "$ac_t""yes" 1>&6
2741   LIBS="$LIBS -lbe -lroot"
2742 else
2743   echo "$ac_t""no" 1>&6
2744 :
2745 fi
2746
2747
2748 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2749 echo "configure:2750: checking for Cygwin environment" >&5
2750 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756
2757 int main() {
2758
2759 #ifndef __CYGWIN__
2760 #define __CYGWIN__ __CYGWIN32__
2761 #endif
2762 return __CYGWIN__;
2763 ; return 0; }
2764 EOF
2765 if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2766   rm -rf conftest*
2767   ac_cv_cygwin=yes
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   rm -rf conftest*
2772   ac_cv_cygwin=no
2773 fi
2774 rm -f conftest*
2775 rm -f conftest*
2776 fi
2777
2778 echo "$ac_t""$ac_cv_cygwin" 1>&6
2779 CYGWIN=
2780 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2781 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2782 echo "configure:2783: checking for mingw32 environment" >&5
2783 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2784   echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786   cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789
2790 int main() {
2791 return __MINGW32__;
2792 ; return 0; }
2793 EOF
2794 if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2795   rm -rf conftest*
2796   ac_cv_mingw32=yes
2797 else
2798   echo "configure: failed program was:" >&5
2799   cat conftest.$ac_ext >&5
2800   rm -rf conftest*
2801   ac_cv_mingw32=no
2802 fi
2803 rm -f conftest*
2804 rm -f conftest*
2805 fi
2806
2807 echo "$ac_t""$ac_cv_mingw32" 1>&6
2808 MINGW32=
2809 test "$ac_cv_mingw32" = yes && MINGW32=yes
2810
2811
2812 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2813 echo "configure:2814: checking for executable suffix" >&5
2814 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2815   echo $ac_n "(cached) $ac_c" 1>&6
2816 else
2817   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2818   ac_cv_exeext=.exe
2819 else
2820   rm -f conftest*
2821   echo 'int main () { return 0; }' > conftest.$ac_ext
2822   ac_cv_exeext=
2823   if { (eval echo configure:2824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2824     for file in conftest.*; do
2825       case $file in
2826       *.c | *.o | *.obj) ;;
2827       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2828       esac
2829     done
2830   else
2831     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2832   fi
2833   rm -f conftest*
2834   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2835 fi
2836 fi
2837
2838 EXEEXT=""
2839 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2840 echo "$ac_t""${ac_cv_exeext}" 1>&6
2841 ac_exeext=$EXEEXT
2842
2843 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2844 echo "configure:2845: checking for object suffix" >&5
2845 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2846   echo $ac_n "(cached) $ac_c" 1>&6
2847 else
2848   rm -f conftest*
2849 echo 'int i = 1;' > conftest.$ac_ext
2850 if { (eval echo configure:2851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2851   for ac_file in conftest.*; do
2852     case $ac_file in
2853     *.c) ;;
2854     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2855     esac
2856   done
2857 else
2858   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2859 fi
2860 rm -f conftest*
2861 fi
2862
2863 echo "$ac_t""$ac_cv_objext" 1>&6
2864 OBJEXT=$ac_cv_objext
2865 ac_objext=$ac_cv_objext
2866
2867
2868
2869
2870
2871 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2872 echo "configure:2873: checking for ${CC-cc} option to accept ANSI C" >&5
2873 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   am_cv_prog_cc_stdc=no
2877 ac_save_CC="$CC"
2878 # Don't try gcc -ansi; that turns off useful extensions and
2879 # breaks some systems' header files.
2880 # AIX                   -qlanglvl=ansi
2881 # Ultrix and OSF/1      -std1
2882 # HP-UX                 -Aa -D_HPUX_SOURCE
2883 # SVR4                  -Xc -D__EXTENSIONS__
2884 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2885 do
2886   CC="$ac_save_CC $ac_arg"
2887   cat > conftest.$ac_ext <<EOF
2888 #line 2889 "configure"
2889 #include "confdefs.h"
2890 #include <stdarg.h>
2891 #include <stdio.h>
2892 #include <sys/types.h>
2893 #include <sys/stat.h>
2894 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2895 struct buf { int x; };
2896 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2897 static char *e (p, i)
2898      char **p;
2899      int i;
2900 {
2901   return p[i];
2902 }
2903 static char *f (char * (*g) (char **, int), char **p, ...)
2904 {
2905   char *s;
2906   va_list v;
2907   va_start (v,p);
2908   s = g (p, va_arg (v,int));
2909   va_end (v);
2910   return s;
2911 }
2912 int test (int i, double x);
2913 struct s1 {int (*f) (int a);};
2914 struct s2 {int (*f) (double a);};
2915 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2916 int argc;
2917 char **argv;
2918
2919 int main() {
2920
2921 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2922
2923 ; return 0; }
2924 EOF
2925 if { (eval echo configure:2926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2926   rm -rf conftest*
2927   am_cv_prog_cc_stdc="$ac_arg"; break
2928 else
2929   echo "configure: failed program was:" >&5
2930   cat conftest.$ac_ext >&5
2931 fi
2932 rm -f conftest*
2933 done
2934 CC="$ac_save_CC"
2935
2936 fi
2937
2938 if test -z "$am_cv_prog_cc_stdc"; then
2939   echo "$ac_t""none needed" 1>&6
2940 else
2941   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2942 fi
2943 case "x$am_cv_prog_cc_stdc" in
2944   x|xno) ;;
2945   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2946 esac
2947
2948 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2949         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2950 fi
2951
2952
2953
2954
2955 echo $ac_n "checking for socket""... $ac_c" 1>&6
2956 echo "configure:2957: checking for socket" >&5
2957 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2958   echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960   cat > conftest.$ac_ext <<EOF
2961 #line 2962 "configure"
2962 #include "confdefs.h"
2963 /* System header to define __stub macros and hopefully few prototypes,
2964     which can conflict with char socket(); below.  */
2965 #include <assert.h>
2966 /* Override any gcc2 internal prototype to avoid an error.  */
2967 /* We use char because int might match the return type of a gcc2
2968     builtin and then its argument prototype would still apply.  */
2969 char socket();
2970
2971 int main() {
2972
2973 /* The GNU C library defines this for functions which it implements
2974     to always fail with ENOSYS.  Some functions are actually named
2975     something starting with __ and the normal name is an alias.  */
2976 #if defined (__stub_socket) || defined (__stub___socket)
2977 choke me
2978 #else
2979 socket();
2980 #endif
2981
2982 ; return 0; }
2983 EOF
2984 if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2985   rm -rf conftest*
2986   eval "ac_cv_func_socket=yes"
2987 else
2988   echo "configure: failed program was:" >&5
2989   cat conftest.$ac_ext >&5
2990   rm -rf conftest*
2991   eval "ac_cv_func_socket=no"
2992 fi
2993 rm -f conftest*
2994 fi
2995
2996 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2997   echo "$ac_t""yes" 1>&6
2998   :
2999 else
3000   echo "$ac_t""no" 1>&6
3001         
3002         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3003 echo "configure:3004: checking for main in -lsocket" >&5
3004 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3005 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3006   echo $ac_n "(cached) $ac_c" 1>&6
3007 else
3008   ac_save_LIBS="$LIBS"
3009 LIBS="-lsocket  $LIBS"
3010 cat > conftest.$ac_ext <<EOF
3011 #line 3012 "configure"
3012 #include "confdefs.h"
3013
3014 int main() {
3015 main()
3016 ; return 0; }
3017 EOF
3018 if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3019   rm -rf conftest*
3020   eval "ac_cv_lib_$ac_lib_var=yes"
3021 else
3022   echo "configure: failed program was:" >&5
3023   cat conftest.$ac_ext >&5
3024   rm -rf conftest*
3025   eval "ac_cv_lib_$ac_lib_var=no"
3026 fi
3027 rm -f conftest*
3028 LIBS="$ac_save_LIBS"
3029
3030 fi
3031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3032   echo "$ac_t""yes" 1>&6
3033     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3035   cat >> confdefs.h <<EOF
3036 #define $ac_tr_lib 1
3037 EOF
3038
3039   LIBS="-lsocket $LIBS"
3040
3041 else
3042   echo "$ac_t""no" 1>&6
3043 fi
3044
3045         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3046 echo "configure:3047: checking for main in -lnet" >&5
3047 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3048 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   ac_save_LIBS="$LIBS"
3052 LIBS="-lnet  $LIBS"
3053 cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056
3057 int main() {
3058 main()
3059 ; return 0; }
3060 EOF
3061 if { (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3062   rm -rf conftest*
3063   eval "ac_cv_lib_$ac_lib_var=yes"
3064 else
3065   echo "configure: failed program was:" >&5
3066   cat conftest.$ac_ext >&5
3067   rm -rf conftest*
3068   eval "ac_cv_lib_$ac_lib_var=no"
3069 fi
3070 rm -f conftest*
3071 LIBS="$ac_save_LIBS"
3072
3073 fi
3074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3075   echo "$ac_t""yes" 1>&6
3076     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3077     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3078   cat >> confdefs.h <<EOF
3079 #define $ac_tr_lib 1
3080 EOF
3081
3082   LIBS="-lnet $LIBS"
3083
3084 else
3085   echo "$ac_t""no" 1>&6
3086 fi
3087
3088         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3089 echo "configure:3090: checking for main in -lnsl_s" >&5
3090 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3091 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094   ac_save_LIBS="$LIBS"
3095 LIBS="-lnsl_s  $LIBS"
3096 cat > conftest.$ac_ext <<EOF
3097 #line 3098 "configure"
3098 #include "confdefs.h"
3099
3100 int main() {
3101 main()
3102 ; return 0; }
3103 EOF
3104 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3105   rm -rf conftest*
3106   eval "ac_cv_lib_$ac_lib_var=yes"
3107 else
3108   echo "configure: failed program was:" >&5
3109   cat conftest.$ac_ext >&5
3110   rm -rf conftest*
3111   eval "ac_cv_lib_$ac_lib_var=no"
3112 fi
3113 rm -f conftest*
3114 LIBS="$ac_save_LIBS"
3115
3116 fi
3117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3118   echo "$ac_t""yes" 1>&6
3119     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3121   cat >> confdefs.h <<EOF
3122 #define $ac_tr_lib 1
3123 EOF
3124
3125   LIBS="-lnsl_s $LIBS"
3126
3127 else
3128   echo "$ac_t""no" 1>&6
3129 fi
3130
3131         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3132 echo "configure:3133: checking for main in -lnsl" >&5
3133 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3134 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3135   echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137   ac_save_LIBS="$LIBS"
3138 LIBS="-lnsl  $LIBS"
3139 cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142
3143 int main() {
3144 main()
3145 ; return 0; }
3146 EOF
3147 if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3148   rm -rf conftest*
3149   eval "ac_cv_lib_$ac_lib_var=yes"
3150 else
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153   rm -rf conftest*
3154   eval "ac_cv_lib_$ac_lib_var=no"
3155 fi
3156 rm -f conftest*
3157 LIBS="$ac_save_LIBS"
3158
3159 fi
3160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3161   echo "$ac_t""yes" 1>&6
3162     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3163     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3164   cat >> confdefs.h <<EOF
3165 #define $ac_tr_lib 1
3166 EOF
3167
3168   LIBS="-lnsl $LIBS"
3169
3170 else
3171   echo "$ac_t""no" 1>&6
3172 fi
3173
3174         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3175 echo "configure:3176: checking for socket in -linet" >&5
3176 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3177 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   ac_save_LIBS="$LIBS"
3181 LIBS="-linet  $LIBS"
3182 cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185 /* Override any gcc2 internal prototype to avoid an error.  */
3186 /* We use char because int might match the return type of a gcc2
3187     builtin and then its argument prototype would still apply.  */
3188 char socket();
3189
3190 int main() {
3191 socket()
3192 ; return 0; }
3193 EOF
3194 if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3195   rm -rf conftest*
3196   eval "ac_cv_lib_$ac_lib_var=yes"
3197 else
3198   echo "configure: failed program was:" >&5
3199   cat conftest.$ac_ext >&5
3200   rm -rf conftest*
3201   eval "ac_cv_lib_$ac_lib_var=no"
3202 fi
3203 rm -f conftest*
3204 LIBS="$ac_save_LIBS"
3205
3206 fi
3207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3208   echo "$ac_t""yes" 1>&6
3209     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3211   cat >> confdefs.h <<EOF
3212 #define $ac_tr_lib 1
3213 EOF
3214
3215   LIBS="-linet $LIBS"
3216
3217 else
3218   echo "$ac_t""no" 1>&6
3219 fi
3220
3221         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3222 echo "configure:3223: checking for main in -lgen" >&5
3223 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3224 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227   ac_save_LIBS="$LIBS"
3228 LIBS="-lgen  $LIBS"
3229 cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232
3233 int main() {
3234 main()
3235 ; return 0; }
3236 EOF
3237 if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3238   rm -rf conftest*
3239   eval "ac_cv_lib_$ac_lib_var=yes"
3240 else
3241   echo "configure: failed program was:" >&5
3242   cat conftest.$ac_ext >&5
3243   rm -rf conftest*
3244   eval "ac_cv_lib_$ac_lib_var=no"
3245 fi
3246 rm -f conftest*
3247 LIBS="$ac_save_LIBS"
3248
3249 fi
3250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3251   echo "$ac_t""yes" 1>&6
3252     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3253     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3254   cat >> confdefs.h <<EOF
3255 #define $ac_tr_lib 1
3256 EOF
3257
3258   LIBS="-lgen $LIBS"
3259
3260 else
3261   echo "$ac_t""no" 1>&6
3262 fi
3263
3264
3265 fi
3266
3267
3268 for ac_func in res_search
3269 do
3270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3271 echo "configure:3272: checking for $ac_func" >&5
3272 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3273   echo $ac_n "(cached) $ac_c" 1>&6
3274 else
3275   cat > conftest.$ac_ext <<EOF
3276 #line 3277 "configure"
3277 #include "confdefs.h"
3278 /* System header to define __stub macros and hopefully few prototypes,
3279     which can conflict with char $ac_func(); below.  */
3280 #include <assert.h>
3281 /* Override any gcc2 internal prototype to avoid an error.  */
3282 /* We use char because int might match the return type of a gcc2
3283     builtin and then its argument prototype would still apply.  */
3284 char $ac_func();
3285
3286 int main() {
3287
3288 /* The GNU C library defines this for functions which it implements
3289     to always fail with ENOSYS.  Some functions are actually named
3290     something starting with __ and the normal name is an alias.  */
3291 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3292 choke me
3293 #else
3294 $ac_func();
3295 #endif
3296
3297 ; return 0; }
3298 EOF
3299 if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3300   rm -rf conftest*
3301   eval "ac_cv_func_$ac_func=yes"
3302 else
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -rf conftest*
3306   eval "ac_cv_func_$ac_func=no"
3307 fi
3308 rm -f conftest*
3309 fi
3310
3311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3312   echo "$ac_t""yes" 1>&6
3313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3314   cat >> confdefs.h <<EOF
3315 #define $ac_tr_func 1
3316 EOF
3317  
3318 else
3319   echo "$ac_t""no" 1>&6
3320 fi
3321 done
3322
3323 if test $ac_cv_func_res_search = "no" ; then 
3324         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3325 echo "configure:3326: checking for res_search in -lbind" >&5
3326 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3327 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3328   echo $ac_n "(cached) $ac_c" 1>&6
3329 else
3330   ac_save_LIBS="$LIBS"
3331 LIBS="-lbind  $LIBS"
3332 cat > conftest.$ac_ext <<EOF
3333 #line 3334 "configure"
3334 #include "confdefs.h"
3335 /* Override any gcc2 internal prototype to avoid an error.  */
3336 /* We use char because int might match the return type of a gcc2
3337     builtin and then its argument prototype would still apply.  */
3338 char res_search();
3339
3340 int main() {
3341 res_search()
3342 ; return 0; }
3343 EOF
3344 if { (eval echo configure:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3345   rm -rf conftest*
3346   eval "ac_cv_lib_$ac_lib_var=yes"
3347 else
3348   echo "configure: failed program was:" >&5
3349   cat conftest.$ac_ext >&5
3350   rm -rf conftest*
3351   eval "ac_cv_lib_$ac_lib_var=no"
3352 fi
3353 rm -f conftest*
3354 LIBS="$ac_save_LIBS"
3355
3356 fi
3357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3358   echo "$ac_t""yes" 1>&6
3359     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3361   cat >> confdefs.h <<EOF
3362 #define $ac_tr_lib 1
3363 EOF
3364
3365   LIBS="-lbind $LIBS"
3366
3367 else
3368   echo "$ac_t""no" 1>&6
3369 fi
3370
3371         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3372                 cat >> confdefs.h <<\EOF
3373 #define HAVE_RES_SEARCH 1
3374 EOF
3375
3376         else
3377                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3378 echo "configure:3379: checking for res_search in -lresolv" >&5
3379 ac_lib_var=`echo resolv'_'res_search | 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="-lresolv  $LIBS"
3385 cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388 /* Override any gcc2 internal prototype to avoid an error.  */
3389 /* We use char because int might match the return type of a gcc2
3390     builtin and then its argument prototype would still apply.  */
3391 char res_search();
3392
3393 int main() {
3394 res_search()
3395 ; return 0; }
3396 EOF
3397 if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3398   rm -rf conftest*
3399   eval "ac_cv_lib_$ac_lib_var=yes"
3400 else
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   eval "ac_cv_lib_$ac_lib_var=no"
3405 fi
3406 rm -f conftest*
3407 LIBS="$ac_save_LIBS"
3408
3409 fi
3410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3411   echo "$ac_t""yes" 1>&6
3412     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3413     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3414   cat >> confdefs.h <<EOF
3415 #define $ac_tr_lib 1
3416 EOF
3417
3418   LIBS="-lresolv $LIBS"
3419
3420 else
3421   echo "$ac_t""no" 1>&6
3422 fi
3423
3424                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3425                         cat >> confdefs.h <<\EOF
3426 #define HAVE_RES_SEARCH 1
3427 EOF
3428
3429                 fi
3430         fi
3431 fi
3432
3433 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3434 echo "configure:3435: checking for sigset in -lV3" >&5
3435 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3436 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3437   echo $ac_n "(cached) $ac_c" 1>&6
3438 else
3439   ac_save_LIBS="$LIBS"
3440 LIBS="-lV3  $LIBS"
3441 cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444 /* Override any gcc2 internal prototype to avoid an error.  */
3445 /* We use char because int might match the return type of a gcc2
3446     builtin and then its argument prototype would still apply.  */
3447 char sigset();
3448
3449 int main() {
3450 sigset()
3451 ; return 0; }
3452 EOF
3453 if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3454   rm -rf conftest*
3455   eval "ac_cv_lib_$ac_lib_var=yes"
3456 else
3457   echo "configure: failed program was:" >&5
3458   cat conftest.$ac_ext >&5
3459   rm -rf conftest*
3460   eval "ac_cv_lib_$ac_lib_var=no"
3461 fi
3462 rm -f conftest*
3463 LIBS="$ac_save_LIBS"
3464
3465 fi
3466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3467   echo "$ac_t""yes" 1>&6
3468     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3469     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3470   cat >> confdefs.h <<EOF
3471 #define $ac_tr_lib 1
3472 EOF
3473
3474   LIBS="-lV3 $LIBS"
3475
3476 else
3477   echo "$ac_t""no" 1>&6
3478 fi
3479
3480
3481 echo $ac_n "checking for select""... $ac_c" 1>&6
3482 echo "configure:3483: checking for select" >&5
3483 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3484   echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486   cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 /* System header to define __stub macros and hopefully few prototypes,
3490     which can conflict with char select(); below.  */
3491 #include <assert.h>
3492 /* Override any gcc2 internal prototype to avoid an error.  */
3493 /* We use char because int might match the return type of a gcc2
3494     builtin and then its argument prototype would still apply.  */
3495 char select();
3496
3497 int main() {
3498
3499 /* The GNU C library defines this for functions which it implements
3500     to always fail with ENOSYS.  Some functions are actually named
3501     something starting with __ and the normal name is an alias.  */
3502 #if defined (__stub_select) || defined (__stub___select)
3503 choke me
3504 #else
3505 select();
3506 #endif
3507
3508 ; return 0; }
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3511   rm -rf conftest*
3512   eval "ac_cv_func_select=yes"
3513 else
3514   echo "configure: failed program was:" >&5
3515   cat conftest.$ac_ext >&5
3516   rm -rf conftest*
3517   eval "ac_cv_func_select=no"
3518 fi
3519 rm -f conftest*
3520 fi
3521
3522 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3523   echo "$ac_t""yes" 1>&6
3524   :
3525 else
3526   echo "$ac_t""no" 1>&6
3527 { echo "configure: error: select() required." 1>&2; exit 1; }
3528 fi
3529
3530
3531 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3532 echo "configure:3533: checking types of arguments for select()" >&5
3533  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
3540   echo $ac_n "(cached) $ac_c" 1>&6
3541 else
3542      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
3543      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3544       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3545        cat > conftest.$ac_ext <<EOF
3546 #line 3547 "configure"
3547 #include "confdefs.h"
3548 #ifdef HAVE_SYS_TYPES_H
3549 #include <sys/types.h>
3550 #endif
3551 #ifdef HAVE_SYS_TIME_H
3552 #include <sys/time.h>
3553 #endif
3554 #ifdef HAVE_SYS_SELECT_H
3555 #include <sys/select.h>
3556 #endif
3557 #ifdef HAVE_SYS_SOCKET_H
3558 #include <sys/socket.h>
3559 #endif
3560 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);
3561 int main() {
3562
3563 ; return 0; }
3564 EOF
3565 if { (eval echo configure:3566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3566   rm -rf conftest*
3567           ac_not_found=no ; break 3
3568 else
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -rf conftest*
3572   ac_not_found=yes
3573 fi
3574 rm -f conftest*
3575       done
3576      done
3577     done
3578    
3579 fi
3580   
3581 fi
3582  
3583 fi
3584  if test "$ac_not_found" = yes; then
3585   ac_cv_func_select_arg1=int 
3586   ac_cv_func_select_arg234='int *' 
3587   ac_cv_func_select_arg5='struct timeval *'
3588  fi
3589  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
3590  cat >> confdefs.h <<EOF
3591 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
3592 EOF
3593
3594  cat >> confdefs.h <<EOF
3595 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
3596 EOF
3597
3598  cat >> confdefs.h <<EOF
3599 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
3600 EOF
3601
3602
3603
3604 # ISODE tests
3605 ol_link_isode=no
3606 if test $ol_enable_ldapd != no ; then
3607                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3608 echo "configure:3609: checking for main in -lxtpp" >&5
3609 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3610 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3611   echo $ac_n "(cached) $ac_c" 1>&6
3612 else
3613   ac_save_LIBS="$LIBS"
3614 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3615 cat > conftest.$ac_ext <<EOF
3616 #line 3617 "configure"
3617 #include "confdefs.h"
3618
3619 int main() {
3620 main()
3621 ; return 0; }
3622 EOF
3623 if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3624   rm -rf conftest*
3625   eval "ac_cv_lib_$ac_lib_var=yes"
3626 else
3627   echo "configure: failed program was:" >&5
3628   cat conftest.$ac_ext >&5
3629   rm -rf conftest*
3630   eval "ac_cv_lib_$ac_lib_var=no"
3631 fi
3632 rm -f conftest*
3633 LIBS="$ac_save_LIBS"
3634
3635 fi
3636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3637   echo "$ac_t""yes" 1>&6
3638   
3639                 ol_link_isode=yes
3640                 cat >> confdefs.h <<\EOF
3641 #define HAVE_XTPP 1
3642 EOF
3643
3644                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3645                 
3646 else
3647   echo "$ac_t""no" 1>&6
3648 :
3649 fi
3650
3651         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3652 echo "configure:3653: checking for main in -ldsap" >&5
3653 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3654 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   ac_save_LIBS="$LIBS"
3658 LIBS="-ldsap -lisode $LIBS"
3659 cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662
3663 int main() {
3664 main()
3665 ; return 0; }
3666 EOF
3667 if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3668   rm -rf conftest*
3669   eval "ac_cv_lib_$ac_lib_var=yes"
3670 else
3671   echo "configure: failed program was:" >&5
3672   cat conftest.$ac_ext >&5
3673   rm -rf conftest*
3674   eval "ac_cv_lib_$ac_lib_var=no"
3675 fi
3676 rm -f conftest*
3677 LIBS="$ac_save_LIBS"
3678
3679 fi
3680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3681   echo "$ac_t""yes" 1>&6
3682   
3683                 ol_link_isode=yes
3684                 cat >> confdefs.h <<\EOF
3685 #define HAVE_DSAP 1
3686 EOF
3687
3688                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3689                 
3690 else
3691   echo "$ac_t""no" 1>&6
3692 :
3693 fi
3694
3695         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3696 echo "configure:3697: checking for main in -lisode" >&5
3697 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3698 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3699   echo $ac_n "(cached) $ac_c" 1>&6
3700 else
3701   ac_save_LIBS="$LIBS"
3702 LIBS="-lisode  $LIBS"
3703 cat > conftest.$ac_ext <<EOF
3704 #line 3705 "configure"
3705 #include "confdefs.h"
3706
3707 int main() {
3708 main()
3709 ; return 0; }
3710 EOF
3711 if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3712   rm -rf conftest*
3713   eval "ac_cv_lib_$ac_lib_var=yes"
3714 else
3715   echo "configure: failed program was:" >&5
3716   cat conftest.$ac_ext >&5
3717   rm -rf conftest*
3718   eval "ac_cv_lib_$ac_lib_var=no"
3719 fi
3720 rm -f conftest*
3721 LIBS="$ac_save_LIBS"
3722
3723 fi
3724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3725   echo "$ac_t""yes" 1>&6
3726   
3727                 ol_link_isode=yes
3728                 cat >> confdefs.h <<\EOF
3729 #define HAVE_ISODE 1
3730 EOF
3731
3732                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3733                 
3734 else
3735   echo "$ac_t""no" 1>&6
3736 :
3737 fi
3738
3739 fi
3740
3741 if test $ol_link_isode != no; then
3742         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3743 echo "configure:3744: checking for main in -lpp" >&5
3744 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3745 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   ac_save_LIBS="$LIBS"
3749 LIBS="-lpp  $LIBS"
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753
3754 int main() {
3755 main()
3756 ; return 0; }
3757 EOF
3758 if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3759   rm -rf conftest*
3760   eval "ac_cv_lib_$ac_lib_var=yes"
3761 else
3762   echo "configure: failed program was:" >&5
3763   cat conftest.$ac_ext >&5
3764   rm -rf conftest*
3765   eval "ac_cv_lib_$ac_lib_var=no"
3766 fi
3767 rm -f conftest*
3768 LIBS="$ac_save_LIBS"
3769
3770 fi
3771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3772   echo "$ac_t""yes" 1>&6
3773   
3774                 cat >> confdefs.h <<\EOF
3775 #define HAVE_PP 1
3776 EOF
3777
3778                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3779                 
3780 else
3781   echo "$ac_t""no" 1>&6
3782 :
3783 fi
3784
3785
3786         # Extract the first word of "pepsy", so it can be a program name with args.
3787 set dummy pepsy; ac_word=$2
3788 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3789 echo "configure:3790: checking for $ac_word" >&5
3790 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3791   echo $ac_n "(cached) $ac_c" 1>&6
3792 else
3793   case "$PEPSY" in
3794   /*)
3795   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3796   ;;
3797   ?:/*)                  
3798   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3799   ;;
3800   *)
3801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3802   ac_dummy="$PATH"
3803   for ac_dir in $ac_dummy; do 
3804     test -z "$ac_dir" && ac_dir=.
3805     if test -f $ac_dir/$ac_word; then
3806       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3807       break
3808     fi
3809   done
3810   IFS="$ac_save_ifs"
3811   ;;
3812 esac
3813 fi
3814 PEPSY="$ac_cv_path_PEPSY"
3815 if test -n "$PEPSY"; then
3816   echo "$ac_t""$PEPSY" 1>&6
3817 else
3818   echo "$ac_t""no" 1>&6
3819 fi
3820
3821 fi
3822
3823 ol_link_kerberos=no
3824
3825 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3826         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3827 do
3828 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3829 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3830 echo "configure:3831: checking for $ac_hdr" >&5
3831 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837 #include <$ac_hdr>
3838 EOF
3839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3840 { (eval echo configure:3841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3842 if test -z "$ac_err"; then
3843   rm -rf conftest*
3844   eval "ac_cv_header_$ac_safe=yes"
3845 else
3846   echo "$ac_err" >&5
3847   echo "configure: failed program was:" >&5
3848   cat conftest.$ac_ext >&5
3849   rm -rf conftest*
3850   eval "ac_cv_header_$ac_safe=no"
3851 fi
3852 rm -f conftest*
3853 fi
3854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3855   echo "$ac_t""yes" 1>&6
3856     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3857   cat >> confdefs.h <<EOF
3858 #define $ac_tr_hdr 1
3859 EOF
3860  
3861 else
3862   echo "$ac_t""no" 1>&6
3863 fi
3864 done
3865
3866
3867         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3868                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3869 echo "configure:3870: checking for main in -lkrb4" >&5
3870 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3871 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3872   echo $ac_n "(cached) $ac_c" 1>&6
3873 else
3874   ac_save_LIBS="$LIBS"
3875 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3876 cat > conftest.$ac_ext <<EOF
3877 #line 3878 "configure"
3878 #include "confdefs.h"
3879
3880 int main() {
3881 main()
3882 ; return 0; }
3883 EOF
3884 if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=yes"
3887 else
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890   rm -rf conftest*
3891   eval "ac_cv_lib_$ac_lib_var=no"
3892 fi
3893 rm -f conftest*
3894 LIBS="$ac_save_LIBS"
3895
3896 fi
3897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3898   echo "$ac_t""yes" 1>&6
3899   have_k5=yes
3900 else
3901   echo "$ac_t""no" 1>&6
3902 have_k5=no
3903 fi
3904
3905
3906                 if test $have_k5 = yes ; then
3907                         ol_with_kerberos=found
3908                         ol_link_kerberos=yes
3909
3910                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3911
3912                         LIBS="$KRB_LIBS $LIBS"
3913
3914                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3915 echo "configure:3916: checking for des_debug in Kerberos libraries" >&5
3916 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
3917   echo $ac_n "(cached) $ac_c" 1>&6
3918 else
3919   
3920                                                                 save_LIBS="$LIBS"
3921                                 LIBS="$KRB_LIBS $LIBS"
3922                                 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925
3926 #include <kerberosIV/krb.h>
3927 #include <kerberosIV/des.h>
3928 extern int des_debug;
3929
3930 int main() {
3931
3932 des_debug = 1;
3933
3934 ; return 0; }
3935 EOF
3936 if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3937   rm -rf conftest*
3938   ol_cv_var_des_debug=yes
3939 else
3940   echo "configure: failed program was:" >&5
3941   cat conftest.$ac_ext >&5
3942   rm -rf conftest*
3943   ol_cv_var_des_debug=no
3944 fi
3945 rm -f conftest*
3946                                                                 LIBS="$save_LIBS"
3947                         
3948 fi
3949
3950 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
3951
3952                         if test $ol_cv_var_des_debug = yes ; then
3953                                 cat >> confdefs.h <<\EOF
3954 #define HAVE_DES_DEBUG 1
3955 EOF
3956
3957                         fi
3958
3959                         LIBS="$save_LIBS"
3960                 fi
3961         fi
3962 fi
3963
3964 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3965         for ac_hdr in krb.h des.h
3966 do
3967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3969 echo "configure:3970: checking for $ac_hdr" >&5
3970 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3971   echo $ac_n "(cached) $ac_c" 1>&6
3972 else
3973   cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3976 #include <$ac_hdr>
3977 EOF
3978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3979 { (eval echo configure:3980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3981 if test -z "$ac_err"; then
3982   rm -rf conftest*
3983   eval "ac_cv_header_$ac_safe=yes"
3984 else
3985   echo "$ac_err" >&5
3986   echo "configure: failed program was:" >&5
3987   cat conftest.$ac_ext >&5
3988   rm -rf conftest*
3989   eval "ac_cv_header_$ac_safe=no"
3990 fi
3991 rm -f conftest*
3992 fi
3993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3994   echo "$ac_t""yes" 1>&6
3995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3996   cat >> confdefs.h <<EOF
3997 #define $ac_tr_hdr 1
3998 EOF
3999  
4000 else
4001   echo "$ac_t""no" 1>&6
4002 fi
4003 done
4004
4005
4006         if test $ac_cv_header_krb_h = yes ; then
4007                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4008 echo "configure:4009: checking for main in -lkrb" >&5
4009 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4010 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4011   echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013   ac_save_LIBS="$LIBS"
4014 LIBS="-lkrb -ldes $LIBS"
4015 cat > conftest.$ac_ext <<EOF
4016 #line 4017 "configure"
4017 #include "confdefs.h"
4018
4019 int main() {
4020 main()
4021 ; return 0; }
4022 EOF
4023 if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4024   rm -rf conftest*
4025   eval "ac_cv_lib_$ac_lib_var=yes"
4026 else
4027   echo "configure: failed program was:" >&5
4028   cat conftest.$ac_ext >&5
4029   rm -rf conftest*
4030   eval "ac_cv_lib_$ac_lib_var=no"
4031 fi
4032 rm -f conftest*
4033 LIBS="$ac_save_LIBS"
4034
4035 fi
4036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4037   echo "$ac_t""yes" 1>&6
4038   have_k4=yes
4039 else
4040   echo "$ac_t""no" 1>&6
4041 have_k4=no
4042 fi
4043
4044
4045                 if test $have_k4 = yes ; then
4046                         ol_with_kerberos=found
4047                         ol_link_kerberos=yes
4048
4049                         KRB_LIBS="-lkrb -ldes"
4050                 fi
4051         fi
4052 fi
4053
4054 if test $ol_link_kerberos = yes ; then
4055         cat >> confdefs.h <<\EOF
4056 #define HAVE_KERBEROS 1
4057 EOF
4058
4059 fi
4060
4061 ol_link_tls=no
4062 if test $ol_with_tls != no ; then
4063         
4064         for ac_hdr in ssl.h
4065 do
4066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4068 echo "configure:4069: checking for $ac_hdr" >&5
4069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4070   echo $ac_n "(cached) $ac_c" 1>&6
4071 else
4072   cat > conftest.$ac_ext <<EOF
4073 #line 4074 "configure"
4074 #include "confdefs.h"
4075 #include <$ac_hdr>
4076 EOF
4077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4078 { (eval echo configure:4079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4080 if test -z "$ac_err"; then
4081   rm -rf conftest*
4082   eval "ac_cv_header_$ac_safe=yes"
4083 else
4084   echo "$ac_err" >&5
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   eval "ac_cv_header_$ac_safe=no"
4089 fi
4090 rm -f conftest*
4091 fi
4092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4093   echo "$ac_t""yes" 1>&6
4094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4095   cat >> confdefs.h <<EOF
4096 #define $ac_tr_hdr 1
4097 EOF
4098  
4099 else
4100   echo "$ac_t""no" 1>&6
4101 fi
4102 done
4103
4104         
4105         if test $ac_cv_header_ssl_h = yes ; then
4106                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4107 echo "configure:4108: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4108 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4109 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4110   echo $ac_n "(cached) $ac_c" 1>&6
4111 else
4112   ac_save_LIBS="$LIBS"
4113 LIBS="-lssl -lcrypto $LIBS"
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 /* Override any gcc2 internal prototype to avoid an error.  */
4118 /* We use char because int might match the return type of a gcc2
4119     builtin and then its argument prototype would still apply.  */
4120 char SSLeay_add_ssl_algorithms();
4121
4122 int main() {
4123 SSLeay_add_ssl_algorithms()
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4127   rm -rf conftest*
4128   eval "ac_cv_lib_$ac_lib_var=yes"
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   eval "ac_cv_lib_$ac_lib_var=no"
4134 fi
4135 rm -f conftest*
4136 LIBS="$ac_save_LIBS"
4137
4138 fi
4139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4140   echo "$ac_t""yes" 1>&6
4141   have_ssleay=yes
4142                         need_rsaref=no
4143 else
4144   echo "$ac_t""no" 1>&6
4145 have_ssleay=no
4146 fi
4147
4148                         
4149                 if test $have_ssleay = no ; then
4150                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4151 echo "configure:4152: checking for ssl3_accept in -lssl" >&5
4152 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4154   echo $ac_n "(cached) $ac_c" 1>&6
4155 else
4156   ac_save_LIBS="$LIBS"
4157 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4158 cat > conftest.$ac_ext <<EOF
4159 #line 4160 "configure"
4160 #include "confdefs.h"
4161 /* Override any gcc2 internal prototype to avoid an error.  */
4162 /* We use char because int might match the return type of a gcc2
4163     builtin and then its argument prototype would still apply.  */
4164 char ssl3_accept();
4165
4166 int main() {
4167 ssl3_accept()
4168 ; return 0; }
4169 EOF
4170 if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4171   rm -rf conftest*
4172   eval "ac_cv_lib_$ac_lib_var=yes"
4173 else
4174   echo "configure: failed program was:" >&5
4175   cat conftest.$ac_ext >&5
4176   rm -rf conftest*
4177   eval "ac_cv_lib_$ac_lib_var=no"
4178 fi
4179 rm -f conftest*
4180 LIBS="$ac_save_LIBS"
4181
4182 fi
4183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4184   echo "$ac_t""yes" 1>&6
4185   have_ssleay=yes
4186                                 need_rsaref=yes
4187 else
4188   echo "$ac_t""no" 1>&6
4189 have_ssleay=no
4190 fi
4191
4192                 fi
4193
4194                 if test $have_ssleay = yes ; then
4195                         ol_with_tls=found
4196                         ol_link_tls=yes
4197
4198                         cat >> confdefs.h <<\EOF
4199 #define HAVE_SSLEAY 1
4200 EOF
4201
4202
4203                         if test $need_rsaref = yes; then
4204                                 cat >> confdefs.h <<\EOF
4205 #define HAVE_RSAREF 1
4206 EOF
4207
4208
4209                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4210                         else
4211                                 TLS_LIBS="-lssl -lcrypto"
4212                         fi
4213                 fi
4214         fi
4215 fi
4216
4217 if test $ol_link_tls = yes ; then
4218         cat >> confdefs.h <<\EOF
4219 #define HAVE_TLS 1
4220 EOF
4221
4222 fi      
4223
4224 for ac_func in \
4225         ctime_r                 \
4226         gethostbyname_r gethostbyaddr_r \
4227
4228 do
4229 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4230 echo "configure:4231: checking for $ac_func" >&5
4231 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4232   echo $ac_n "(cached) $ac_c" 1>&6
4233 else
4234   cat > conftest.$ac_ext <<EOF
4235 #line 4236 "configure"
4236 #include "confdefs.h"
4237 /* System header to define __stub macros and hopefully few prototypes,
4238     which can conflict with char $ac_func(); below.  */
4239 #include <assert.h>
4240 /* Override any gcc2 internal prototype to avoid an error.  */
4241 /* We use char because int might match the return type of a gcc2
4242     builtin and then its argument prototype would still apply.  */
4243 char $ac_func();
4244
4245 int main() {
4246
4247 /* The GNU C library defines this for functions which it implements
4248     to always fail with ENOSYS.  Some functions are actually named
4249     something starting with __ and the normal name is an alias.  */
4250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4251 choke me
4252 #else
4253 $ac_func();
4254 #endif
4255
4256 ; return 0; }
4257 EOF
4258 if { (eval echo configure:4259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4259   rm -rf conftest*
4260   eval "ac_cv_func_$ac_func=yes"
4261 else
4262   echo "configure: failed program was:" >&5
4263   cat conftest.$ac_ext >&5
4264   rm -rf conftest*
4265   eval "ac_cv_func_$ac_func=no"
4266 fi
4267 rm -f conftest*
4268 fi
4269
4270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4271   echo "$ac_t""yes" 1>&6
4272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4273   cat >> confdefs.h <<EOF
4274 #define $ac_tr_func 1
4275 EOF
4276  
4277 else
4278   echo "$ac_t""no" 1>&6
4279 fi
4280 done
4281
4282
4283 if test "$ac_cv_func_ctime_r" = no ; then
4284         ol_cv_func_ctime_r_nargs=0
4285 else
4286         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4287 echo "configure:4288: checking number of arguments of ctime_r" >&5
4288 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4289   echo $ac_n "(cached) $ac_c" 1>&6
4290 else
4291   cat > conftest.$ac_ext <<EOF
4292 #line 4293 "configure"
4293 #include "confdefs.h"
4294 #include <time.h>
4295 int main() {
4296 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4297 ; return 0; }
4298 EOF
4299 if { (eval echo configure:4300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4300   rm -rf conftest*
4301   ol_cv_func_ctime_r_nargs=3
4302 else
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -rf conftest*
4306   cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 #include <time.h>
4310 int main() {
4311 time_t ti; char *buffer; ctime_r(&ti,buffer);
4312 ; return 0; }
4313 EOF
4314 if { (eval echo configure:4315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4315   rm -rf conftest*
4316   ol_cv_func_ctime_r_nargs=2
4317 else
4318   echo "configure: failed program was:" >&5
4319   cat conftest.$ac_ext >&5
4320   rm -rf conftest*
4321   ol_cv_func_ctime_r_nargs=0
4322 fi
4323 rm -f conftest*
4324 fi
4325 rm -f conftest*
4326 fi
4327
4328 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4329   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4330     cat >> confdefs.h <<EOF
4331 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4332 EOF
4333
4334   fi
4335
4336 fi
4337
4338 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4339         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4340 echo "configure:4341: checking number of arguments of gethostbyname_r" >&5
4341 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4342   echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344   cat > conftest.$ac_ext <<EOF
4345 #line 4346 "configure"
4346 #include "confdefs.h"
4347 #include <sys/types.h>
4348 #include <sys/socket.h>
4349 #include <netinet/in.h>
4350 #include <netdb.h>
4351 #define BUFSIZE (sizeof(struct hostent)+10)
4352 int main() {
4353 struct hostent hent; char buffer[BUFSIZE];
4354                 int bufsize=BUFSIZE;int h_errno;
4355                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4356                         buffer, bufsize, &h_errno);
4357 ; return 0; }
4358 EOF
4359 if { (eval echo configure:4360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4360   rm -rf conftest*
4361   ol_cv_func_gethostbyname_r_nargs=5
4362 else
4363   echo "configure: failed program was:" >&5
4364   cat conftest.$ac_ext >&5
4365   rm -rf conftest*
4366   cat > conftest.$ac_ext <<EOF
4367 #line 4368 "configure"
4368 #include "confdefs.h"
4369 #include <sys/types.h>
4370 #include <sys/socket.h>
4371 #include <netinet/in.h>
4372 #include <netdb.h>
4373 #define BUFSIZE (sizeof(struct hostent)+10)
4374 int main() {
4375 struct hostent hent;struct hostent *rhent;
4376                         char buffer[BUFSIZE];
4377                         int bufsize=BUFSIZE;int h_errno;
4378                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4379                                 &rhent, &h_errno);
4380 ; return 0; }
4381 EOF
4382 if { (eval echo configure:4383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4383   rm -rf conftest*
4384   ol_cv_func_gethostbyname_r_nargs=6
4385 else
4386   echo "configure: failed program was:" >&5
4387   cat conftest.$ac_ext >&5
4388   rm -rf conftest*
4389   ol_cv_func_gethostbyname_r_nargs=0
4390 fi
4391 rm -f conftest*
4392 fi
4393 rm -f conftest*
4394 fi
4395
4396 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4397   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4398         cat >> confdefs.h <<EOF
4399 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4400 EOF
4401
4402   fi
4403
4404 else
4405         ol_cv_func_gethostbyname_r_nargs=0
4406 fi
4407  
4408 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4409         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4410 echo "configure:4411: checking number of arguments of gethostbyaddr_r" >&5
4411 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   cat > conftest.$ac_ext <<EOF
4415 #line 4416 "configure"
4416 #include "confdefs.h"
4417 #include <sys/types.h>
4418 #include <sys/socket.h>
4419 #include <netinet/in.h>
4420 #include <netdb.h>
4421 #define BUFSIZE (sizeof(struct hostent)+10)
4422 int main() {
4423 struct hostent hent; char buffer[BUFSIZE]; 
4424             struct in_addr add;
4425             size_t alen=sizeof(struct in_addr);
4426             int bufsize=BUFSIZE;int h_errno;
4427                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4428                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4429 ; return 0; }
4430 EOF
4431 if { (eval echo configure:4432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4432   rm -rf conftest*
4433   ol_cv_func_gethostbyaddr_r_nargs=7
4434 else
4435   echo "configure: failed program was:" >&5
4436   cat conftest.$ac_ext >&5
4437   rm -rf conftest*
4438   cat > conftest.$ac_ext <<EOF
4439 #line 4440 "configure"
4440 #include "confdefs.h"
4441 #include <sys/types.h>
4442 #include <sys/socket.h>
4443 #include <netinet/in.h>
4444 #include <netdb.h>
4445 #define BUFSIZE (sizeof(struct hostent)+10)
4446 int main() {
4447 struct hostent hent;
4448                         struct hostent *rhent; char buffer[BUFSIZE]; 
4449                         struct in_addr add;
4450                         size_t alen=sizeof(struct in_addr);
4451                         int bufsize=BUFSIZE;int h_errno;
4452                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4453                                 alen, AF_INET, &hent, buffer, bufsize, 
4454                                 &rhent, &h_errno);
4455 ; return 0; }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4458   rm -rf conftest*
4459   ol_cv_func_gethostbyaddr_r_nargs=8
4460 else
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   ol_cv_func_gethostbyaddr_r_nargs=0
4465 fi
4466 rm -f conftest*
4467 fi
4468 rm -f conftest*
4469 fi
4470
4471 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4472   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4473     cat >> confdefs.h <<EOF
4474 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4475 EOF
4476
4477   fi
4478
4479 else
4480         ol_cv_func_gethostbyaddr_r_nargs=0
4481 fi
4482
4483 if test "$ac_cv_func_ctime_r" = yes \
4484         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4485         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4486         -a "$ac_cv_func_gethostbyname_r" = yes \
4487         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4488         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4489         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4490         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4491         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4492         ; then
4493  
4494         cat >> confdefs.h <<\EOF
4495 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4496 EOF
4497
4498 fi
4499
4500 ol_link_threads=no
4501 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4502         -o $ol_with_threads = posix ; then
4503
4504         for ac_hdr in pthread.h sched.h
4505 do
4506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4508 echo "configure:4509: checking for $ac_hdr" >&5
4509 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4510   echo $ac_n "(cached) $ac_c" 1>&6
4511 else
4512   cat > conftest.$ac_ext <<EOF
4513 #line 4514 "configure"
4514 #include "confdefs.h"
4515 #include <$ac_hdr>
4516 EOF
4517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4518 { (eval echo configure:4519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4520 if test -z "$ac_err"; then
4521   rm -rf conftest*
4522   eval "ac_cv_header_$ac_safe=yes"
4523 else
4524   echo "$ac_err" >&5
4525   echo "configure: failed program was:" >&5
4526   cat conftest.$ac_ext >&5
4527   rm -rf conftest*
4528   eval "ac_cv_header_$ac_safe=no"
4529 fi
4530 rm -f conftest*
4531 fi
4532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4533   echo "$ac_t""yes" 1>&6
4534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4535   cat >> confdefs.h <<EOF
4536 #define $ac_tr_hdr 1
4537 EOF
4538  
4539 else
4540   echo "$ac_t""no" 1>&6
4541 fi
4542 done
4543
4544
4545         if test $ac_cv_header_pthread_h = yes ; then
4546                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4547 echo "configure:4548: checking POSIX thread version" >&5
4548 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4549   echo $ac_n "(cached) $ac_c" 1>&6
4550 else
4551   
4552         cat > conftest.$ac_ext <<EOF
4553 #line 4554 "configure"
4554 #include "confdefs.h"
4555
4556 #               include <pthread.h>
4557                 /* this check could be improved */
4558 #               ifdef PTHREAD_ONCE_INIT
4559                         pthread_version_final
4560 #               endif
4561         
4562 EOF
4563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4564   egrep "pthread_version_final" >/dev/null 2>&1; then
4565   rm -rf conftest*
4566   ol_pthread_final=yes
4567 else
4568   rm -rf conftest*
4569   ol_pthread_final=no
4570 fi
4571 rm -f conftest*
4572
4573
4574         cat > conftest.$ac_ext <<EOF
4575 #line 4576 "configure"
4576 #include "confdefs.h"
4577
4578 #               include <pthread.h>
4579                 /* this check could be improved */
4580 #               ifdef pthread_once_init
4581                         pthread_version_draft4
4582 #               endif
4583         
4584 EOF
4585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4586   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4587   rm -rf conftest*
4588   ol_pthread_draft4=yes
4589 else
4590   rm -rf conftest*
4591   ol_pthread_draft4=no
4592 fi
4593 rm -f conftest*
4594
4595
4596         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4597                 ol_cv_pthread_version=final
4598         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4599                 ol_cv_pthread_version=draft4
4600         else
4601                 ol_cv_pthread_version=unknown
4602         fi
4603
4604 fi
4605
4606 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4607
4608
4609                 if test $ol_cv_pthread_version = final ; then
4610                         cat >> confdefs.h <<\EOF
4611 #define HAVE_PTHREADS_FINAL 1
4612 EOF
4613
4614                 elif test $ol_cv_pthread_version = draft4 ; then
4615                         cat >> confdefs.h <<\EOF
4616 #define HAVE_PTHREADS_D4 1
4617 EOF
4618
4619                 else
4620                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4621                 fi
4622
4623                 # consider threads found
4624                 ol_with_threads=found
4625
4626                 
4627         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
4628 echo "configure:4629: checking for LinuxThreads pthread.h" >&5
4629 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
4630   echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632   cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635 #include <pthread.h>
4636 EOF
4637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4638   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
4639   rm -rf conftest*
4640   ol_cv_header_linux_threads=yes
4641 else
4642   rm -rf conftest*
4643   ol_cv_header_linux_threads=no
4644 fi
4645 rm -f conftest*
4646
4647                 
4648 fi
4649
4650 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
4651         if test $ol_cv_header_linux_threads = yes; then
4652                 cat >> confdefs.h <<\EOF
4653 #define HAVE_LINUX_THREADS 1
4654 EOF
4655
4656         fi
4657
4658
4659                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4660                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4661 echo "configure:4662: checking for pthread_create in default libraries" >&5
4662                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   
4666                 if test "$cross_compiling" = yes; then
4667                         ol_cv_pthread_create=yes
4668 else
4669   cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672
4673 #include <pthread.h>
4674 #ifndef NULL
4675 #define NULL (void*)0
4676 #endif
4677
4678 static void *task(p)
4679         void *p;
4680 {
4681         return (void *) (p == NULL);
4682 }
4683
4684 int main(argc, argv)
4685         int argc;
4686         char **argv;
4687 {
4688         pthread_t t;
4689         int status;
4690
4691         /* make sure pthread_create() isn't just a stub */
4692 #if HAVE_PTHREADS_D4
4693         status = pthread_create(&t, pthread_attr_default, task, NULL);
4694 #else
4695         status = pthread_create(&t, NULL, task, NULL);
4696 #endif
4697
4698         if( status ) return status;
4699
4700         /* make sure pthread_detach() isn't just a stub */
4701 #if HAVE_PTHREADS_D4
4702         status = pthread_detach( &t );
4703 #else
4704         status = pthread_detach( t );
4705 #endif
4706
4707         if( status ) return status;
4708
4709         return status;
4710 }
4711
4712 EOF
4713 if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4714 then
4715   ol_cv_pthread_create=yes
4716 else
4717   echo "configure: failed program was:" >&5
4718   cat conftest.$ac_ext >&5
4719   rm -fr conftest*
4720   ol_cv_pthread_create=no
4721 fi
4722 rm -fr conftest*
4723 fi
4724
4725 fi
4726
4727                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4728
4729                 if test $ol_cv_pthread_create != no ; then
4730                         ol_link_threads=posix
4731                         ol_link_pthreads=""
4732                 fi
4733                 
4734                 # Pthread try link: -mt (ol_cv_pthread_mt)
4735         if test "$ol_link_threads" = no ; then
4736                 # try -mt
4737                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
4738 echo "configure:4739: checking for pthread link with -mt" >&5
4739 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
4740   echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742   
4743                         # save the flags
4744                         save_LIBS="$LIBS"
4745                         LIBS="-mt $LIBS"
4746
4747                         cat > conftest.$ac_ext <<EOF
4748 #line 4749 "configure"
4749 #include "confdefs.h"
4750
4751 #include <pthread.h>
4752 #ifndef NULL
4753 #define NULL (void*)0
4754 #endif
4755
4756 int main() {
4757
4758         pthread_t t;
4759
4760 #if HAVE_PTHREADS_D4
4761         pthread_create(&t, pthread_attr_default, NULL, NULL);
4762         pthread_detach( &t );
4763 #else
4764         pthread_create(&t, NULL, NULL, NULL);
4765         pthread_detach( t );
4766 #endif
4767 #ifdef HAVE_LINUX_THREADS
4768         pthread_kill_other_threads_np();
4769 #endif
4770
4771 ; return 0; }
4772 EOF
4773 if { (eval echo configure:4774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4774   rm -rf conftest*
4775   ol_cv_pthread_mt=yes
4776 else
4777   echo "configure: failed program was:" >&5
4778   cat conftest.$ac_ext >&5
4779   rm -rf conftest*
4780   ol_cv_pthread_mt=no
4781 fi
4782 rm -f conftest*
4783
4784                 # restore the LIBS
4785                 LIBS="$save_LIBS"
4786                 
4787 fi
4788
4789 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
4790
4791                 if test $ol_cv_pthread_mt = yes ; then
4792                         ol_link_pthreads="-mt"
4793                         ol_link_threads=posix
4794                 fi
4795         fi
4796
4797                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
4798         if test "$ol_link_threads" = no ; then
4799                 # try -kthread
4800                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
4801 echo "configure:4802: checking for pthread link with -kthread" >&5
4802 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
4803   echo $ac_n "(cached) $ac_c" 1>&6
4804 else
4805   
4806                         # save the flags
4807                         save_LIBS="$LIBS"
4808                         LIBS="-kthread $LIBS"
4809
4810                         cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813
4814 #include <pthread.h>
4815 #ifndef NULL
4816 #define NULL (void*)0
4817 #endif
4818
4819 int main() {
4820
4821         pthread_t t;
4822
4823 #if HAVE_PTHREADS_D4
4824         pthread_create(&t, pthread_attr_default, NULL, NULL);
4825         pthread_detach( &t );
4826 #else
4827         pthread_create(&t, NULL, NULL, NULL);
4828         pthread_detach( t );
4829 #endif
4830 #ifdef HAVE_LINUX_THREADS
4831         pthread_kill_other_threads_np();
4832 #endif
4833
4834 ; return 0; }
4835 EOF
4836 if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4837   rm -rf conftest*
4838   ol_cv_pthread_kthread=yes
4839 else
4840   echo "configure: failed program was:" >&5
4841   cat conftest.$ac_ext >&5
4842   rm -rf conftest*
4843   ol_cv_pthread_kthread=no
4844 fi
4845 rm -f conftest*
4846
4847                 # restore the LIBS
4848                 LIBS="$save_LIBS"
4849                 
4850 fi
4851
4852 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
4853
4854                 if test $ol_cv_pthread_kthread = yes ; then
4855                         ol_link_pthreads="-kthread"
4856                         ol_link_threads=posix
4857                 fi
4858         fi
4859
4860                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
4861         if test "$ol_link_threads" = no ; then
4862                 # try -pthread
4863                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
4864 echo "configure:4865: checking for pthread link with -pthread" >&5
4865 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
4866   echo $ac_n "(cached) $ac_c" 1>&6
4867 else
4868   
4869                         # save the flags
4870                         save_LIBS="$LIBS"
4871                         LIBS="-pthread $LIBS"
4872
4873                         cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876
4877 #include <pthread.h>
4878 #ifndef NULL
4879 #define NULL (void*)0
4880 #endif
4881
4882 int main() {
4883
4884         pthread_t t;
4885
4886 #if HAVE_PTHREADS_D4
4887         pthread_create(&t, pthread_attr_default, NULL, NULL);
4888         pthread_detach( &t );
4889 #else
4890         pthread_create(&t, NULL, NULL, NULL);
4891         pthread_detach( t );
4892 #endif
4893 #ifdef HAVE_LINUX_THREADS
4894         pthread_kill_other_threads_np();
4895 #endif
4896
4897 ; return 0; }
4898 EOF
4899 if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4900   rm -rf conftest*
4901   ol_cv_pthread_pthread=yes
4902 else
4903   echo "configure: failed program was:" >&5
4904   cat conftest.$ac_ext >&5
4905   rm -rf conftest*
4906   ol_cv_pthread_pthread=no
4907 fi
4908 rm -f conftest*
4909
4910                 # restore the LIBS
4911                 LIBS="$save_LIBS"
4912                 
4913 fi
4914
4915 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
4916
4917                 if test $ol_cv_pthread_pthread = yes ; then
4918                         ol_link_pthreads="-pthread"
4919                         ol_link_threads=posix
4920                 fi
4921         fi
4922
4923                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
4924         if test "$ol_link_threads" = no ; then
4925                 # try -pthreads
4926                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
4927 echo "configure:4928: checking for pthread link with -pthreads" >&5
4928 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   
4932                         # save the flags
4933                         save_LIBS="$LIBS"
4934                         LIBS="-pthreads $LIBS"
4935
4936                         cat > conftest.$ac_ext <<EOF
4937 #line 4938 "configure"
4938 #include "confdefs.h"
4939
4940 #include <pthread.h>
4941 #ifndef NULL
4942 #define NULL (void*)0
4943 #endif
4944
4945 int main() {
4946
4947         pthread_t t;
4948
4949 #if HAVE_PTHREADS_D4
4950         pthread_create(&t, pthread_attr_default, NULL, NULL);
4951         pthread_detach( &t );
4952 #else
4953         pthread_create(&t, NULL, NULL, NULL);
4954         pthread_detach( t );
4955 #endif
4956 #ifdef HAVE_LINUX_THREADS
4957         pthread_kill_other_threads_np();
4958 #endif
4959
4960 ; return 0; }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963   rm -rf conftest*
4964   ol_cv_pthread_pthreads=yes
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -rf conftest*
4969   ol_cv_pthread_pthreads=no
4970 fi
4971 rm -f conftest*
4972
4973                 # restore the LIBS
4974                 LIBS="$save_LIBS"
4975                 
4976 fi
4977
4978 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
4979
4980                 if test $ol_cv_pthread_pthreads = yes ; then
4981                         ol_link_pthreads="-pthreads"
4982                         ol_link_threads=posix
4983                 fi
4984         fi
4985
4986                 # Pthread try link: -thread (ol_cv_pthread_thread)
4987         if test "$ol_link_threads" = no ; then
4988                 # try -thread
4989                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
4990 echo "configure:4991: checking for pthread link with -thread" >&5
4991 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
4992   echo $ac_n "(cached) $ac_c" 1>&6
4993 else
4994   
4995                         # save the flags
4996                         save_LIBS="$LIBS"
4997                         LIBS="-thread $LIBS"
4998
4999                         cat > conftest.$ac_ext <<EOF
5000 #line 5001 "configure"
5001 #include "confdefs.h"
5002
5003 #include <pthread.h>
5004 #ifndef NULL
5005 #define NULL (void*)0
5006 #endif
5007
5008 int main() {
5009
5010         pthread_t t;
5011
5012 #if HAVE_PTHREADS_D4
5013         pthread_create(&t, pthread_attr_default, NULL, NULL);
5014         pthread_detach( &t );
5015 #else
5016         pthread_create(&t, NULL, NULL, NULL);
5017         pthread_detach( t );
5018 #endif
5019 #ifdef HAVE_LINUX_THREADS
5020         pthread_kill_other_threads_np();
5021 #endif
5022
5023 ; return 0; }
5024 EOF
5025 if { (eval echo configure:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5026   rm -rf conftest*
5027   ol_cv_pthread_thread=yes
5028 else
5029   echo "configure: failed program was:" >&5
5030   cat conftest.$ac_ext >&5
5031   rm -rf conftest*
5032   ol_cv_pthread_thread=no
5033 fi
5034 rm -f conftest*
5035
5036                 # restore the LIBS
5037                 LIBS="$save_LIBS"
5038                 
5039 fi
5040
5041 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5042
5043                 if test $ol_cv_pthread_thread = yes ; then
5044                         ol_link_pthreads="-thread"
5045                         ol_link_threads=posix
5046                 fi
5047         fi
5048
5049
5050                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5051         if test "$ol_link_threads" = no ; then
5052                 # try -lpthread -lmach -lexc -lc_r
5053                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5054 echo "configure:5055: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5055 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5056   echo $ac_n "(cached) $ac_c" 1>&6
5057 else
5058   
5059                         # save the flags
5060                         save_LIBS="$LIBS"
5061                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5062
5063                         cat > conftest.$ac_ext <<EOF
5064 #line 5065 "configure"
5065 #include "confdefs.h"
5066
5067 #include <pthread.h>
5068 #ifndef NULL
5069 #define NULL (void*)0
5070 #endif
5071
5072 int main() {
5073
5074         pthread_t t;
5075
5076 #if HAVE_PTHREADS_D4
5077         pthread_create(&t, pthread_attr_default, NULL, NULL);
5078         pthread_detach( &t );
5079 #else
5080         pthread_create(&t, NULL, NULL, NULL);
5081         pthread_detach( t );
5082 #endif
5083 #ifdef HAVE_LINUX_THREADS
5084         pthread_kill_other_threads_np();
5085 #endif
5086
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5090   rm -rf conftest*
5091   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5097 fi
5098 rm -f conftest*
5099
5100                 # restore the LIBS
5101                 LIBS="$save_LIBS"
5102                 
5103 fi
5104
5105 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5106
5107                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5108                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5109                         ol_link_threads=posix
5110                 fi
5111         fi
5112
5113                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5114         if test "$ol_link_threads" = no ; then
5115                 # try -lpthread -lmach -lexc
5116                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5117 echo "configure:5118: checking for pthread link with -lpthread -lmach -lexc" >&5
5118 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5119   echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121   
5122                         # save the flags
5123                         save_LIBS="$LIBS"
5124                         LIBS="-lpthread -lmach -lexc $LIBS"
5125
5126                         cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129
5130 #include <pthread.h>
5131 #ifndef NULL
5132 #define NULL (void*)0
5133 #endif
5134
5135 int main() {
5136
5137         pthread_t t;
5138
5139 #if HAVE_PTHREADS_D4
5140         pthread_create(&t, pthread_attr_default, NULL, NULL);
5141         pthread_detach( &t );
5142 #else
5143         pthread_create(&t, NULL, NULL, NULL);
5144         pthread_detach( t );
5145 #endif
5146 #ifdef HAVE_LINUX_THREADS
5147         pthread_kill_other_threads_np();
5148 #endif
5149
5150 ; return 0; }
5151 EOF
5152 if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153   rm -rf conftest*
5154   ol_cv_pthread_lpthread_lmach_lexc=yes
5155 else
5156   echo "configure: failed program was:" >&5
5157   cat conftest.$ac_ext >&5
5158   rm -rf conftest*
5159   ol_cv_pthread_lpthread_lmach_lexc=no
5160 fi
5161 rm -f conftest*
5162
5163                 # restore the LIBS
5164                 LIBS="$save_LIBS"
5165                 
5166 fi
5167
5168 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5169
5170                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5171                         ol_link_pthreads="-lpthread -lmach -lexc"
5172                         ol_link_threads=posix
5173                 fi
5174         fi
5175
5176
5177                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5178         if test "$ol_link_threads" = no ; then
5179                 # try -lpthread -Wl,-woff,85
5180                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5181 echo "configure:5182: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5182 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5183   echo $ac_n "(cached) $ac_c" 1>&6
5184 else
5185   
5186                         # save the flags
5187                         save_LIBS="$LIBS"
5188                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5189
5190                         cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193
5194 #include <pthread.h>
5195 #ifndef NULL
5196 #define NULL (void*)0
5197 #endif
5198
5199 int main() {
5200
5201         pthread_t t;
5202
5203 #if HAVE_PTHREADS_D4
5204         pthread_create(&t, pthread_attr_default, NULL, NULL);
5205         pthread_detach( &t );
5206 #else
5207         pthread_create(&t, NULL, NULL, NULL);
5208         pthread_detach( t );
5209 #endif
5210 #ifdef HAVE_LINUX_THREADS
5211         pthread_kill_other_threads_np();
5212 #endif
5213
5214 ; return 0; }
5215 EOF
5216 if { (eval echo configure:5217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5217   rm -rf conftest*
5218   ol_cv_pthread_lib_lpthread_woff=yes
5219 else
5220   echo "configure: failed program was:" >&5
5221   cat conftest.$ac_ext >&5
5222   rm -rf conftest*
5223   ol_cv_pthread_lib_lpthread_woff=no
5224 fi
5225 rm -f conftest*
5226
5227                 # restore the LIBS
5228                 LIBS="$save_LIBS"
5229                 
5230 fi
5231
5232 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5233
5234                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5235                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5236                         ol_link_threads=posix
5237                 fi
5238         fi
5239
5240
5241                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5242         if test "$ol_link_threads" = no ; then
5243                 # try -lpthread
5244                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5245 echo "configure:5246: checking for pthread link with -lpthread" >&5
5246 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5247   echo $ac_n "(cached) $ac_c" 1>&6
5248 else
5249   
5250                         # save the flags
5251                         save_LIBS="$LIBS"
5252                         LIBS="-lpthread $LIBS"
5253
5254                         cat > conftest.$ac_ext <<EOF
5255 #line 5256 "configure"
5256 #include "confdefs.h"
5257
5258 #include <pthread.h>
5259 #ifndef NULL
5260 #define NULL (void*)0
5261 #endif
5262
5263 int main() {
5264
5265         pthread_t t;
5266
5267 #if HAVE_PTHREADS_D4
5268         pthread_create(&t, pthread_attr_default, NULL, NULL);
5269         pthread_detach( &t );
5270 #else
5271         pthread_create(&t, NULL, NULL, NULL);
5272         pthread_detach( t );
5273 #endif
5274 #ifdef HAVE_LINUX_THREADS
5275         pthread_kill_other_threads_np();
5276 #endif
5277
5278 ; return 0; }
5279 EOF
5280 if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5281   rm -rf conftest*
5282   ol_cv_pthread_lpthread=yes
5283 else
5284   echo "configure: failed program was:" >&5
5285   cat conftest.$ac_ext >&5
5286   rm -rf conftest*
5287   ol_cv_pthread_lpthread=no
5288 fi
5289 rm -f conftest*
5290
5291                 # restore the LIBS
5292                 LIBS="$save_LIBS"
5293                 
5294 fi
5295
5296 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5297
5298                 if test $ol_cv_pthread_lpthread = yes ; then
5299                         ol_link_pthreads="-lpthread"
5300                         ol_link_threads=posix
5301                 fi
5302         fi
5303
5304                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5305         if test "$ol_link_threads" = no ; then
5306                 # try -lc_r
5307                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5308 echo "configure:5309: checking for pthread link with -lc_r" >&5
5309 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5310   echo $ac_n "(cached) $ac_c" 1>&6
5311 else
5312   
5313                         # save the flags
5314                         save_LIBS="$LIBS"
5315                         LIBS="-lc_r $LIBS"
5316
5317                         cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320
5321 #include <pthread.h>
5322 #ifndef NULL
5323 #define NULL (void*)0
5324 #endif
5325
5326 int main() {
5327
5328         pthread_t t;
5329
5330 #if HAVE_PTHREADS_D4
5331         pthread_create(&t, pthread_attr_default, NULL, NULL);
5332         pthread_detach( &t );
5333 #else
5334         pthread_create(&t, NULL, NULL, NULL);
5335         pthread_detach( t );
5336 #endif
5337 #ifdef HAVE_LINUX_THREADS
5338         pthread_kill_other_threads_np();
5339 #endif
5340
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5344   rm -rf conftest*
5345   ol_cv_pthread_lc_r=yes
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349   rm -rf conftest*
5350   ol_cv_pthread_lc_r=no
5351 fi
5352 rm -f conftest*
5353
5354                 # restore the LIBS
5355                 LIBS="$save_LIBS"
5356                 
5357 fi
5358
5359 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5360
5361                 if test $ol_cv_pthread_lc_r = yes ; then
5362                         ol_link_pthreads="-lc_r"
5363                         ol_link_threads=posix
5364                 fi
5365         fi
5366
5367
5368                 # Pthread try link: -threads (ol_cv_pthread_threads)
5369         if test "$ol_link_threads" = no ; then
5370                 # try -threads
5371                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5372 echo "configure:5373: checking for pthread link with -threads" >&5
5373 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5374   echo $ac_n "(cached) $ac_c" 1>&6
5375 else
5376   
5377                         # save the flags
5378                         save_LIBS="$LIBS"
5379                         LIBS="-threads $LIBS"
5380
5381                         cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384
5385 #include <pthread.h>
5386 #ifndef NULL
5387 #define NULL (void*)0
5388 #endif
5389
5390 int main() {
5391
5392         pthread_t t;
5393
5394 #if HAVE_PTHREADS_D4
5395         pthread_create(&t, pthread_attr_default, NULL, NULL);
5396         pthread_detach( &t );
5397 #else
5398         pthread_create(&t, NULL, NULL, NULL);
5399         pthread_detach( t );
5400 #endif
5401 #ifdef HAVE_LINUX_THREADS
5402         pthread_kill_other_threads_np();
5403 #endif
5404
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5408   rm -rf conftest*
5409   ol_cv_pthread_threads=yes
5410 else
5411   echo "configure: failed program was:" >&5
5412   cat conftest.$ac_ext >&5
5413   rm -rf conftest*
5414   ol_cv_pthread_threads=no
5415 fi
5416 rm -f conftest*
5417
5418                 # restore the LIBS
5419                 LIBS="$save_LIBS"
5420                 
5421 fi
5422
5423 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5424
5425                 if test $ol_cv_pthread_threads = yes ; then
5426                         ol_link_pthreads="-threads"
5427                         ol_link_threads=posix
5428                 fi
5429         fi
5430
5431
5432                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5433         if test "$ol_link_threads" = no ; then
5434                 # try -lpthreads -lmach -lexc -lc_r
5435                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5436 echo "configure:5437: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5437 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5438   echo $ac_n "(cached) $ac_c" 1>&6
5439 else
5440   
5441                         # save the flags
5442                         save_LIBS="$LIBS"
5443                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5444
5445                         cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448
5449 #include <pthread.h>
5450 #ifndef NULL
5451 #define NULL (void*)0
5452 #endif
5453
5454 int main() {
5455
5456         pthread_t t;
5457
5458 #if HAVE_PTHREADS_D4
5459         pthread_create(&t, pthread_attr_default, NULL, NULL);
5460         pthread_detach( &t );
5461 #else
5462         pthread_create(&t, NULL, NULL, NULL);
5463         pthread_detach( t );
5464 #endif
5465 #ifdef HAVE_LINUX_THREADS
5466         pthread_kill_other_threads_np();
5467 #endif
5468
5469 ; return 0; }
5470 EOF
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472   rm -rf conftest*
5473   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5474 else
5475   echo "configure: failed program was:" >&5
5476   cat conftest.$ac_ext >&5
5477   rm -rf conftest*
5478   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5479 fi
5480 rm -f conftest*
5481
5482                 # restore the LIBS
5483                 LIBS="$save_LIBS"
5484                 
5485 fi
5486
5487 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5488
5489                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5490                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5491                         ol_link_threads=posix
5492                 fi
5493         fi
5494
5495                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5496         if test "$ol_link_threads" = no ; then
5497                 # try -lpthreads -lmach -lexc
5498                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5499 echo "configure:5500: checking for pthread link with -lpthreads -lmach -lexc" >&5
5500 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5501   echo $ac_n "(cached) $ac_c" 1>&6
5502 else
5503   
5504                         # save the flags
5505                         save_LIBS="$LIBS"
5506                         LIBS="-lpthreads -lmach -lexc $LIBS"
5507
5508                         cat > conftest.$ac_ext <<EOF
5509 #line 5510 "configure"
5510 #include "confdefs.h"
5511
5512 #include <pthread.h>
5513 #ifndef NULL
5514 #define NULL (void*)0
5515 #endif
5516
5517 int main() {
5518
5519         pthread_t t;
5520
5521 #if HAVE_PTHREADS_D4
5522         pthread_create(&t, pthread_attr_default, NULL, NULL);
5523         pthread_detach( &t );
5524 #else
5525         pthread_create(&t, NULL, NULL, NULL);
5526         pthread_detach( t );
5527 #endif
5528 #ifdef HAVE_LINUX_THREADS
5529         pthread_kill_other_threads_np();
5530 #endif
5531
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5535   rm -rf conftest*
5536   ol_cv_pthread_lpthreads_lmach_lexc=yes
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   ol_cv_pthread_lpthreads_lmach_lexc=no
5542 fi
5543 rm -f conftest*
5544
5545                 # restore the LIBS
5546                 LIBS="$save_LIBS"
5547                 
5548 fi
5549
5550 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
5551
5552                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
5553                         ol_link_pthreads="-lpthreads -lmach -lexc"
5554                         ol_link_threads=posix
5555                 fi
5556         fi
5557
5558                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
5559         if test "$ol_link_threads" = no ; then
5560                 # try -lpthreads -lexc
5561                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
5562 echo "configure:5563: checking for pthread link with -lpthreads -lexc" >&5
5563 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
5564   echo $ac_n "(cached) $ac_c" 1>&6
5565 else
5566   
5567                         # save the flags
5568                         save_LIBS="$LIBS"
5569                         LIBS="-lpthreads -lexc $LIBS"
5570
5571                         cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5574
5575 #include <pthread.h>
5576 #ifndef NULL
5577 #define NULL (void*)0
5578 #endif
5579
5580 int main() {
5581
5582         pthread_t t;
5583
5584 #if HAVE_PTHREADS_D4
5585         pthread_create(&t, pthread_attr_default, NULL, NULL);
5586         pthread_detach( &t );
5587 #else
5588         pthread_create(&t, NULL, NULL, NULL);
5589         pthread_detach( t );
5590 #endif
5591 #ifdef HAVE_LINUX_THREADS
5592         pthread_kill_other_threads_np();
5593 #endif
5594
5595 ; return 0; }
5596 EOF
5597 if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5598   rm -rf conftest*
5599   ol_cv_pthread_lpthreads_lexc=yes
5600 else
5601   echo "configure: failed program was:" >&5
5602   cat conftest.$ac_ext >&5
5603   rm -rf conftest*
5604   ol_cv_pthread_lpthreads_lexc=no
5605 fi
5606 rm -f conftest*
5607
5608                 # restore the LIBS
5609                 LIBS="$save_LIBS"
5610                 
5611 fi
5612
5613 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
5614
5615                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
5616                         ol_link_pthreads="-lpthreads -lexc"
5617                         ol_link_threads=posix
5618                 fi
5619         fi
5620
5621
5622                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
5623         if test "$ol_link_threads" = no ; then
5624                 # try -lpthreads
5625                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
5626 echo "configure:5627: checking for pthread link with -lpthreads" >&5
5627 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
5628   echo $ac_n "(cached) $ac_c" 1>&6
5629 else
5630   
5631                         # save the flags
5632                         save_LIBS="$LIBS"
5633                         LIBS="-lpthreads $LIBS"
5634
5635                         cat > conftest.$ac_ext <<EOF
5636 #line 5637 "configure"
5637 #include "confdefs.h"
5638
5639 #include <pthread.h>
5640 #ifndef NULL
5641 #define NULL (void*)0
5642 #endif
5643
5644 int main() {
5645
5646         pthread_t t;
5647
5648 #if HAVE_PTHREADS_D4
5649         pthread_create(&t, pthread_attr_default, NULL, NULL);
5650         pthread_detach( &t );
5651 #else
5652         pthread_create(&t, NULL, NULL, NULL);
5653         pthread_detach( t );
5654 #endif
5655 #ifdef HAVE_LINUX_THREADS
5656         pthread_kill_other_threads_np();
5657 #endif
5658
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   ol_cv_pthread_lib_lpthreads=yes
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   ol_cv_pthread_lib_lpthreads=no
5669 fi
5670 rm -f conftest*
5671
5672                 # restore the LIBS
5673                 LIBS="$save_LIBS"
5674                 
5675 fi
5676
5677 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
5678
5679                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
5680                         ol_link_pthreads="-lpthreads"
5681                         ol_link_threads=posix
5682                 fi
5683         fi
5684
5685
5686                 if test $ol_link_threads != no ; then
5687                         cat >> confdefs.h <<\EOF
5688 #define HAVE_PTHREADS 1
5689 EOF
5690
5691
5692                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
5693
5694                                                 save_CPPFLAGS="$CPPFLAGS"
5695                         save_LIBS="$LIBS"
5696                         LIBS="$LTHREAD_LIBS $LIBS"
5697
5698                                                                                                 for ac_func in sched_yield pthread_yield
5699 do
5700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5701 echo "configure:5702: checking for $ac_func" >&5
5702 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5703   echo $ac_n "(cached) $ac_c" 1>&6
5704 else
5705   cat > conftest.$ac_ext <<EOF
5706 #line 5707 "configure"
5707 #include "confdefs.h"
5708 /* System header to define __stub macros and hopefully few prototypes,
5709     which can conflict with char $ac_func(); below.  */
5710 #include <assert.h>
5711 /* Override any gcc2 internal prototype to avoid an error.  */
5712 /* We use char because int might match the return type of a gcc2
5713     builtin and then its argument prototype would still apply.  */
5714 char $ac_func();
5715
5716 int main() {
5717
5718 /* The GNU C library defines this for functions which it implements
5719     to always fail with ENOSYS.  Some functions are actually named
5720     something starting with __ and the normal name is an alias.  */
5721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5722 choke me
5723 #else
5724 $ac_func();
5725 #endif
5726
5727 ; return 0; }
5728 EOF
5729 if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5730   rm -rf conftest*
5731   eval "ac_cv_func_$ac_func=yes"
5732 else
5733   echo "configure: failed program was:" >&5
5734   cat conftest.$ac_ext >&5
5735   rm -rf conftest*
5736   eval "ac_cv_func_$ac_func=no"
5737 fi
5738 rm -f conftest*
5739 fi
5740
5741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5742   echo "$ac_t""yes" 1>&6
5743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5744   cat >> confdefs.h <<EOF
5745 #define $ac_tr_func 1
5746 EOF
5747  
5748 else
5749   echo "$ac_t""no" 1>&6
5750 fi
5751 done
5752
5753
5754                         if test $ac_cv_func_sched_yield = no -a \
5755                                 $ac_cv_func_pthread_yield = no ; then
5756                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5757 echo "configure:5758: checking for sched_yield in -lrt" >&5
5758 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5759 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5760   echo $ac_n "(cached) $ac_c" 1>&6
5761 else
5762   ac_save_LIBS="$LIBS"
5763 LIBS="-lrt  $LIBS"
5764 cat > conftest.$ac_ext <<EOF
5765 #line 5766 "configure"
5766 #include "confdefs.h"
5767 /* Override any gcc2 internal prototype to avoid an error.  */
5768 /* We use char because int might match the return type of a gcc2
5769     builtin and then its argument prototype would still apply.  */
5770 char sched_yield();
5771
5772 int main() {
5773 sched_yield()
5774 ; return 0; }
5775 EOF
5776 if { (eval echo configure:5777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5777   rm -rf conftest*
5778   eval "ac_cv_lib_$ac_lib_var=yes"
5779 else
5780   echo "configure: failed program was:" >&5
5781   cat conftest.$ac_ext >&5
5782   rm -rf conftest*
5783   eval "ac_cv_lib_$ac_lib_var=no"
5784 fi
5785 rm -f conftest*
5786 LIBS="$ac_save_LIBS"
5787
5788 fi
5789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5790   echo "$ac_t""yes" 1>&6
5791   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5792                                         cat >> confdefs.h <<\EOF
5793 #define HAVE_SCHED_YIELD 1
5794 EOF
5795
5796                                         ac_cv_func_sched_yield=yes
5797 else
5798   echo "$ac_t""no" 1>&6
5799 ac_cv_func_sched_yield=no
5800 fi
5801
5802                         fi
5803                         if test $ac_cv_func_sched_yield = no -a \
5804                                 $ac_cv_func_pthread_yield = no ; then
5805                                                                                                 for ac_func in thr_yield
5806 do
5807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5808 echo "configure:5809: checking for $ac_func" >&5
5809 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5810   echo $ac_n "(cached) $ac_c" 1>&6
5811 else
5812   cat > conftest.$ac_ext <<EOF
5813 #line 5814 "configure"
5814 #include "confdefs.h"
5815 /* System header to define __stub macros and hopefully few prototypes,
5816     which can conflict with char $ac_func(); below.  */
5817 #include <assert.h>
5818 /* Override any gcc2 internal prototype to avoid an error.  */
5819 /* We use char because int might match the return type of a gcc2
5820     builtin and then its argument prototype would still apply.  */
5821 char $ac_func();
5822
5823 int main() {
5824
5825 /* The GNU C library defines this for functions which it implements
5826     to always fail with ENOSYS.  Some functions are actually named
5827     something starting with __ and the normal name is an alias.  */
5828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5829 choke me
5830 #else
5831 $ac_func();
5832 #endif
5833
5834 ; return 0; }
5835 EOF
5836 if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5837   rm -rf conftest*
5838   eval "ac_cv_func_$ac_func=yes"
5839 else
5840   echo "configure: failed program was:" >&5
5841   cat conftest.$ac_ext >&5
5842   rm -rf conftest*
5843   eval "ac_cv_func_$ac_func=no"
5844 fi
5845 rm -f conftest*
5846 fi
5847
5848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5849   echo "$ac_t""yes" 1>&6
5850     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5851   cat >> confdefs.h <<EOF
5852 #define $ac_tr_func 1
5853 EOF
5854  
5855 else
5856   echo "$ac_t""no" 1>&6
5857 fi
5858 done
5859
5860                         fi
5861                         if test $ac_cv_func_sched_yield = no -a \
5862                                 $ac_cv_func_pthread_yield = no -a \
5863                                 "$ac_cv_func_thr_yield" = no ; then
5864                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5865                         fi
5866
5867                                                 for ac_func in pthread_kill
5868 do
5869 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5870 echo "configure:5871: checking for $ac_func" >&5
5871 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5872   echo $ac_n "(cached) $ac_c" 1>&6
5873 else
5874   cat > conftest.$ac_ext <<EOF
5875 #line 5876 "configure"
5876 #include "confdefs.h"
5877 /* System header to define __stub macros and hopefully few prototypes,
5878     which can conflict with char $ac_func(); below.  */
5879 #include <assert.h>
5880 /* Override any gcc2 internal prototype to avoid an error.  */
5881 /* We use char because int might match the return type of a gcc2
5882     builtin and then its argument prototype would still apply.  */
5883 char $ac_func();
5884
5885 int main() {
5886
5887 /* The GNU C library defines this for functions which it implements
5888     to always fail with ENOSYS.  Some functions are actually named
5889     something starting with __ and the normal name is an alias.  */
5890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5891 choke me
5892 #else
5893 $ac_func();
5894 #endif
5895
5896 ; return 0; }
5897 EOF
5898 if { (eval echo configure:5899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5899   rm -rf conftest*
5900   eval "ac_cv_func_$ac_func=yes"
5901 else
5902   echo "configure: failed program was:" >&5
5903   cat conftest.$ac_ext >&5
5904   rm -rf conftest*
5905   eval "ac_cv_func_$ac_func=no"
5906 fi
5907 rm -f conftest*
5908 fi
5909
5910 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5911   echo "$ac_t""yes" 1>&6
5912     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5913   cat >> confdefs.h <<EOF
5914 #define $ac_tr_func 1
5915 EOF
5916  
5917 else
5918   echo "$ac_t""no" 1>&6
5919 fi
5920 done
5921
5922
5923                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5924 echo "configure:5925: checking for pthread_detach with <pthread.h>" >&5
5925 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5926   echo $ac_n "(cached) $ac_c" 1>&6
5927 else
5928   
5929                                                                 cat > conftest.$ac_ext <<EOF
5930 #line 5931 "configure"
5931 #include "confdefs.h"
5932
5933 #include <pthread.h>
5934 #ifndef NULL
5935 #define NULL (void*)0
5936 #endif
5937
5938 int main() {
5939 pthread_detach(NULL);
5940 ; return 0; }
5941 EOF
5942 if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5943   rm -rf conftest*
5944   ol_cv_func_pthread_detach=yes
5945 else
5946   echo "configure: failed program was:" >&5
5947   cat conftest.$ac_ext >&5
5948   rm -rf conftest*
5949   ol_cv_func_pthread_detach=no
5950 fi
5951 rm -f conftest*
5952                         
5953 fi
5954
5955 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5956
5957                         if test $ol_cv_func_pthread_detach = no ; then
5958                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
5959                         fi
5960
5961                         cat >> confdefs.h <<\EOF
5962 #define HAVE_PTHREAD_DETACH 1
5963 EOF
5964
5965
5966                                                 for ac_func in \
5967                                 pthread_setconcurrency \
5968                                 pthread_getconcurrency \
5969                                 thr_setconcurrency \
5970                                 thr_getconcurrency \
5971                         
5972 do
5973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5974 echo "configure:5975: checking for $ac_func" >&5
5975 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5976   echo $ac_n "(cached) $ac_c" 1>&6
5977 else
5978   cat > conftest.$ac_ext <<EOF
5979 #line 5980 "configure"
5980 #include "confdefs.h"
5981 /* System header to define __stub macros and hopefully few prototypes,
5982     which can conflict with char $ac_func(); below.  */
5983 #include <assert.h>
5984 /* Override any gcc2 internal prototype to avoid an error.  */
5985 /* We use char because int might match the return type of a gcc2
5986     builtin and then its argument prototype would still apply.  */
5987 char $ac_func();
5988
5989 int main() {
5990
5991 /* The GNU C library defines this for functions which it implements
5992     to always fail with ENOSYS.  Some functions are actually named
5993     something starting with __ and the normal name is an alias.  */
5994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5995 choke me
5996 #else
5997 $ac_func();
5998 #endif
5999
6000 ; return 0; }
6001 EOF
6002 if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6003   rm -rf conftest*
6004   eval "ac_cv_func_$ac_func=yes"
6005 else
6006   echo "configure: failed program was:" >&5
6007   cat conftest.$ac_ext >&5
6008   rm -rf conftest*
6009   eval "ac_cv_func_$ac_func=no"
6010 fi
6011 rm -f conftest*
6012 fi
6013
6014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6015   echo "$ac_t""yes" 1>&6
6016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6017   cat >> confdefs.h <<EOF
6018 #define $ac_tr_func 1
6019 EOF
6020  
6021 else
6022   echo "$ac_t""no" 1>&6
6023 fi
6024 done
6025
6026
6027                         
6028         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6029 echo "configure:6030: checking for pthread_kill_other_threads_np" >&5
6030 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 /* System header to define __stub macros and hopefully few prototypes,
6037     which can conflict with char pthread_kill_other_threads_np(); below.  */
6038 #include <assert.h>
6039 /* Override any gcc2 internal prototype to avoid an error.  */
6040 /* We use char because int might match the return type of a gcc2
6041     builtin and then its argument prototype would still apply.  */
6042 char pthread_kill_other_threads_np();
6043
6044 int main() {
6045
6046 /* The GNU C library defines this for functions which it implements
6047     to always fail with ENOSYS.  Some functions are actually named
6048     something starting with __ and the normal name is an alias.  */
6049 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6050 choke me
6051 #else
6052 pthread_kill_other_threads_np();
6053 #endif
6054
6055 ; return 0; }
6056 EOF
6057 if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058   rm -rf conftest*
6059   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6060 else
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6065 fi
6066 rm -f conftest*
6067 fi
6068
6069 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071   :
6072 else
6073   echo "$ac_t""no" 1>&6
6074 fi
6075
6076         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6077 echo "configure:6078: checking for LinuxThreads implementation" >&5
6078 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6079   echo $ac_n "(cached) $ac_c" 1>&6
6080 else
6081   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6082 fi
6083
6084 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6085
6086                         
6087         
6088         
6089         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6090 echo "configure:6091: checking for LinuxThreads consistency" >&5
6091 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6092   echo $ac_n "(cached) $ac_c" 1>&6
6093 else
6094   
6095                 if test $ol_cv_header_linux_threads = yes -a \
6096                         $ol_cv_sys_linux_threads = yes; then
6097                         ol_cv_linux_threads=yes
6098                 elif test $ol_cv_header_linux_threads = no -a \
6099                         $ol_cv_sys_linux_threads = no; then
6100                         ol_cv_linux_threads=no
6101                 else
6102                         ol_cv_linux_threads=error
6103                 fi
6104         
6105 fi
6106
6107 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6108
6109
6110                         if test $ol_cv_linux_threads = error; then
6111                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6112                         fi
6113
6114                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6115 echo "configure:6116: checking if pthread_create() works" >&5
6116                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6117   echo $ac_n "(cached) $ac_c" 1>&6
6118 else
6119   
6120                         if test "$cross_compiling" = yes; then
6121                                 ol_cv_pthread_create_works=yes
6122 else
6123   cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126
6127 #include <pthread.h>
6128 #ifndef NULL
6129 #define NULL (void*)0
6130 #endif
6131
6132 static void *task(p)
6133         void *p;
6134 {
6135         return (void *) (p == NULL);
6136 }
6137
6138 int main(argc, argv)
6139         int argc;
6140         char **argv;
6141 {
6142         pthread_t t;
6143 #if HAVE_PTHREADS_D4
6144         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6145 #else
6146         exit(pthread_create(&t, NULL, task, NULL));
6147 #endif
6148 }
6149
6150 EOF
6151 if { (eval echo configure:6152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6152 then
6153   ol_cv_pthread_create_works=yes
6154 else
6155   echo "configure: failed program was:" >&5
6156   cat conftest.$ac_ext >&5
6157   rm -fr conftest*
6158   ol_cv_pthread_create_works=no
6159 fi
6160 rm -fr conftest*
6161 fi
6162
6163 fi
6164
6165                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6166
6167                         if test $ol_cv_pthread_create_works = no ; then
6168                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6169                         fi
6170
6171                                                 if test $ol_with_yielding_select = auto ; then
6172                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6173 echo "configure:6174: checking if select yields when using pthreads" >&5
6174                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6175   echo $ac_n "(cached) $ac_c" 1>&6
6176 else
6177   
6178                                 if test "$cross_compiling" = yes; then
6179   
6180                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6181 else
6182   cat > conftest.$ac_ext <<EOF
6183 #line 6184 "configure"
6184 #include "confdefs.h"
6185
6186 #include <sys/types.h>
6187 #include <sys/time.h>
6188 #include <unistd.h>
6189 #include <pthread.h>
6190 #ifndef NULL
6191 #define NULL (void*) 0
6192 #endif
6193
6194 static int fildes[2];
6195
6196 static void *task(p)
6197         void *p;
6198 {
6199         int i;
6200         struct timeval tv;
6201
6202         fd_set rfds;
6203
6204         tv.tv_sec=10;
6205         tv.tv_usec=0;
6206
6207         FD_ZERO(&rfds);
6208         FD_SET(fildes[0], &rfds);
6209
6210         /* we're not interested in any fds */
6211         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6212
6213         if(i < 0) {
6214                 perror("select");
6215                 exit(10);
6216         }
6217
6218         exit(0); /* if we exit here, the select blocked the whole process */
6219 }
6220
6221 int main(argc, argv)
6222         int argc;
6223         char **argv;
6224 {
6225         pthread_t t;
6226
6227         /* create a pipe to select */
6228         if(pipe(&fildes[0])) {
6229                 perror("select");
6230                 exit(1);
6231         }
6232
6233 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6234         (void) pthread_setconcurrency(2);
6235 #else
6236 #ifdef HAVE_THR_SETCONCURRENCY
6237         /* Set Solaris LWP concurrency to 2 */
6238         thr_setconcurrency(2);
6239 #endif
6240 #endif
6241
6242 #if HAVE_PTHREADS_D4
6243         pthread_create(&t, pthread_attr_default, task, NULL);
6244 #else
6245         pthread_create(&t, NULL, task, NULL);
6246 #endif
6247
6248 #if HAVE_SCHED_YIELD
6249         sched_yield();  /* make sure task runs first */
6250 #else
6251 #ifdef HAVE_PTHREAD_YIELD
6252         pthread_yield();        /* make sure task runs first */
6253 #endif
6254 #endif
6255
6256         exit(2);
6257 }
6258 EOF
6259 if { (eval echo configure:6260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6260 then
6261   ol_cv_pthread_select_yields=no
6262 else
6263   echo "configure: failed program was:" >&5
6264   cat conftest.$ac_ext >&5
6265   rm -fr conftest*
6266   ol_cv_pthread_select_yields=yes
6267 fi
6268 rm -fr conftest*
6269 fi
6270
6271 fi
6272
6273                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6274
6275                                 if test $ol_cv_pthread_select_yields = yes ; then
6276                                         ol_with_yielding_select=yes
6277                                 fi
6278                         fi
6279
6280                                                 CPPFLAGS="$save_CPPFLAGS"
6281                         LIBS="$save_LIBS"
6282                 else
6283                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6284                 fi
6285         fi
6286
6287         if test $ol_with_threads = posix ; then
6288                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6289         fi
6290 fi
6291
6292 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6293         -o $ol_with_threads = mach ; then
6294
6295                 for ac_hdr in mach/cthreads.h
6296 do
6297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6299 echo "configure:6300: checking for $ac_hdr" >&5
6300 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6301   echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303   cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306 #include <$ac_hdr>
6307 EOF
6308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6309 { (eval echo configure:6310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6311 if test -z "$ac_err"; then
6312   rm -rf conftest*
6313   eval "ac_cv_header_$ac_safe=yes"
6314 else
6315   echo "$ac_err" >&5
6316   echo "configure: failed program was:" >&5
6317   cat conftest.$ac_ext >&5
6318   rm -rf conftest*
6319   eval "ac_cv_header_$ac_safe=no"
6320 fi
6321 rm -f conftest*
6322 fi
6323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6324   echo "$ac_t""yes" 1>&6
6325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6326   cat >> confdefs.h <<EOF
6327 #define $ac_tr_hdr 1
6328 EOF
6329  
6330 else
6331   echo "$ac_t""no" 1>&6
6332 fi
6333 done
6334
6335         if test $ac_cv_header_mach_cthreads_h = yes ; then
6336                 ol_with_threads=found
6337
6338                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6339 echo "configure:6340: checking for cthread_fork" >&5
6340 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6341   echo $ac_n "(cached) $ac_c" 1>&6
6342 else
6343   cat > conftest.$ac_ext <<EOF
6344 #line 6345 "configure"
6345 #include "confdefs.h"
6346 /* System header to define __stub macros and hopefully few prototypes,
6347     which can conflict with char cthread_fork(); below.  */
6348 #include <assert.h>
6349 /* Override any gcc2 internal prototype to avoid an error.  */
6350 /* We use char because int might match the return type of a gcc2
6351     builtin and then its argument prototype would still apply.  */
6352 char cthread_fork();
6353
6354 int main() {
6355
6356 /* The GNU C library defines this for functions which it implements
6357     to always fail with ENOSYS.  Some functions are actually named
6358     something starting with __ and the normal name is an alias.  */
6359 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6360 choke me
6361 #else
6362 cthread_fork();
6363 #endif
6364
6365 ; return 0; }
6366 EOF
6367 if { (eval echo configure:6368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6368   rm -rf conftest*
6369   eval "ac_cv_func_cthread_fork=yes"
6370 else
6371   echo "configure: failed program was:" >&5
6372   cat conftest.$ac_ext >&5
6373   rm -rf conftest*
6374   eval "ac_cv_func_cthread_fork=no"
6375 fi
6376 rm -f conftest*
6377 fi
6378
6379 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6380   echo "$ac_t""yes" 1>&6
6381   ol_link_threads=yes
6382 else
6383   echo "$ac_t""no" 1>&6
6384 fi
6385
6386
6387                 if test $ol_link_threads = no ; then
6388                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6389 echo "configure:6390: checking for cthread_fork with -all_load" >&5
6390 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6391   echo $ac_n "(cached) $ac_c" 1>&6
6392 else
6393   
6394                                                                 save_LIBS="$LIBS"
6395                                 LIBS="-all_load $LIBS"
6396                                 cat > conftest.$ac_ext <<EOF
6397 #line 6398 "configure"
6398 #include "confdefs.h"
6399 #include <mach/cthreads.h>
6400 int main() {
6401
6402                                         cthread_fork((void *)0, (void *)0);
6403                                         
6404 ; return 0; }
6405 EOF
6406 if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6407   rm -rf conftest*
6408   ol_cv_cthread_all_load=yes
6409 else
6410   echo "configure: failed program was:" >&5
6411   cat conftest.$ac_ext >&5
6412   rm -rf conftest*
6413   ol_cv_cthread_all_load=no
6414 fi
6415 rm -f conftest*
6416                                                                 LIBS="$save_LIBS"
6417                         
6418 fi
6419
6420 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6421
6422                         if test $ol_cv_cthread_all_load = yes ; then
6423                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6424                                 ol_link_threads=mach
6425                         fi
6426                 fi
6427
6428                 if test $ol_link_threads != no ; then
6429                         : check for cthread specific functionality here
6430                         cat >> confdefs.h <<\EOF
6431 #define HAVE_MACH_CTHREADS 1
6432 EOF
6433
6434                 else
6435                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6436                 fi
6437         fi
6438
6439         if test $ol_with_threads = mach ; then
6440                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6441         fi
6442 fi
6443
6444 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6445         -o $ol_with_threads = lwp ; then
6446
6447                 for ac_hdr in thread.h synch.h
6448 do
6449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6451 echo "configure:6452: checking for $ac_hdr" >&5
6452 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6453   echo $ac_n "(cached) $ac_c" 1>&6
6454 else
6455   cat > conftest.$ac_ext <<EOF
6456 #line 6457 "configure"
6457 #include "confdefs.h"
6458 #include <$ac_hdr>
6459 EOF
6460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6461 { (eval echo configure:6462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6463 if test -z "$ac_err"; then
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=yes"
6466 else
6467   echo "$ac_err" >&5
6468   echo "configure: failed program was:" >&5
6469   cat conftest.$ac_ext >&5
6470   rm -rf conftest*
6471   eval "ac_cv_header_$ac_safe=no"
6472 fi
6473 rm -f conftest*
6474 fi
6475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6476   echo "$ac_t""yes" 1>&6
6477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6478   cat >> confdefs.h <<EOF
6479 #define $ac_tr_hdr 1
6480 EOF
6481  
6482 else
6483   echo "$ac_t""no" 1>&6
6484 fi
6485 done
6486
6487         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6488                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6489 echo "configure:6490: checking for thr_create in -lthread" >&5
6490 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6491 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6492   echo $ac_n "(cached) $ac_c" 1>&6
6493 else
6494   ac_save_LIBS="$LIBS"
6495 LIBS="-lthread  $LIBS"
6496 cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 /* Override any gcc2 internal prototype to avoid an error.  */
6500 /* We use char because int might match the return type of a gcc2
6501     builtin and then its argument prototype would still apply.  */
6502 char thr_create();
6503
6504 int main() {
6505 thr_create()
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=yes"
6511 else
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514   rm -rf conftest*
6515   eval "ac_cv_lib_$ac_lib_var=no"
6516 fi
6517 rm -f conftest*
6518 LIBS="$ac_save_LIBS"
6519
6520 fi
6521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6522   echo "$ac_t""yes" 1>&6
6523   have_thr=yes
6524 else
6525   echo "$ac_t""no" 1>&6
6526 have_thr=no
6527 fi
6528
6529
6530                 if test $have_thr = yes ; then
6531                         cat >> confdefs.h <<\EOF
6532 #define HAVE_THR 1
6533 EOF
6534
6535                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6536                         ol_link_threads=thr
6537
6538                         if test $ol_with_yielding_select = auto ; then
6539                                 ol_with_yielding_select=yes
6540                         fi
6541
6542                                                 for ac_func in \
6543                                 thr_setconcurrency \
6544                                 thr_getconcurrency \
6545                         
6546 do
6547 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6548 echo "configure:6549: checking for $ac_func" >&5
6549 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6550   echo $ac_n "(cached) $ac_c" 1>&6
6551 else
6552   cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6555 /* System header to define __stub macros and hopefully few prototypes,
6556     which can conflict with char $ac_func(); below.  */
6557 #include <assert.h>
6558 /* Override any gcc2 internal prototype to avoid an error.  */
6559 /* We use char because int might match the return type of a gcc2
6560     builtin and then its argument prototype would still apply.  */
6561 char $ac_func();
6562
6563 int main() {
6564
6565 /* The GNU C library defines this for functions which it implements
6566     to always fail with ENOSYS.  Some functions are actually named
6567     something starting with __ and the normal name is an alias.  */
6568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6569 choke me
6570 #else
6571 $ac_func();
6572 #endif
6573
6574 ; return 0; }
6575 EOF
6576 if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6577   rm -rf conftest*
6578   eval "ac_cv_func_$ac_func=yes"
6579 else
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582   rm -rf conftest*
6583   eval "ac_cv_func_$ac_func=no"
6584 fi
6585 rm -f conftest*
6586 fi
6587
6588 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6589   echo "$ac_t""yes" 1>&6
6590     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6591   cat >> confdefs.h <<EOF
6592 #define $ac_tr_func 1
6593 EOF
6594  
6595 else
6596   echo "$ac_t""no" 1>&6
6597 fi
6598 done
6599
6600                 fi
6601         fi
6602
6603                 for ac_hdr in lwp/lwp.h
6604 do
6605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6607 echo "configure:6608: checking for $ac_hdr" >&5
6608 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6609   echo $ac_n "(cached) $ac_c" 1>&6
6610 else
6611   cat > conftest.$ac_ext <<EOF
6612 #line 6613 "configure"
6613 #include "confdefs.h"
6614 #include <$ac_hdr>
6615 EOF
6616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6617 { (eval echo configure:6618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6619 if test -z "$ac_err"; then
6620   rm -rf conftest*
6621   eval "ac_cv_header_$ac_safe=yes"
6622 else
6623   echo "$ac_err" >&5
6624   echo "configure: failed program was:" >&5
6625   cat conftest.$ac_ext >&5
6626   rm -rf conftest*
6627   eval "ac_cv_header_$ac_safe=no"
6628 fi
6629 rm -f conftest*
6630 fi
6631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6632   echo "$ac_t""yes" 1>&6
6633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6634   cat >> confdefs.h <<EOF
6635 #define $ac_tr_hdr 1
6636 EOF
6637  
6638 else
6639   echo "$ac_t""no" 1>&6
6640 fi
6641 done
6642
6643         if test $ac_cv_header_lwp_lwp_h = yes ; then
6644                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6645 echo "configure:6646: checking for lwp_create in -llwp" >&5
6646 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6648   echo $ac_n "(cached) $ac_c" 1>&6
6649 else
6650   ac_save_LIBS="$LIBS"
6651 LIBS="-llwp  $LIBS"
6652 cat > conftest.$ac_ext <<EOF
6653 #line 6654 "configure"
6654 #include "confdefs.h"
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 /* We use char because int might match the return type of a gcc2
6657     builtin and then its argument prototype would still apply.  */
6658 char lwp_create();
6659
6660 int main() {
6661 lwp_create()
6662 ; return 0; }
6663 EOF
6664 if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6665   rm -rf conftest*
6666   eval "ac_cv_lib_$ac_lib_var=yes"
6667 else
6668   echo "configure: failed program was:" >&5
6669   cat conftest.$ac_ext >&5
6670   rm -rf conftest*
6671   eval "ac_cv_lib_$ac_lib_var=no"
6672 fi
6673 rm -f conftest*
6674 LIBS="$ac_save_LIBS"
6675
6676 fi
6677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6678   echo "$ac_t""yes" 1>&6
6679   have_lwp=yes
6680 else
6681   echo "$ac_t""no" 1>&6
6682 have_lwp=no
6683 fi
6684
6685
6686                 if test $have_lwp = yes ; then
6687                         cat >> confdefs.h <<\EOF
6688 #define HAVE_LWP 1
6689 EOF
6690
6691                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6692                         ol_link_threads=lwp
6693
6694                         if test $ol_with_yielding_select = auto ; then
6695                                 ol_with_yielding_select=no
6696                         fi
6697                 fi
6698         fi
6699 fi
6700
6701 if test $ol_with_yielding_select = yes ; then
6702         cat >> confdefs.h <<\EOF
6703 #define HAVE_YIELDING_SELECT 1
6704 EOF
6705
6706 fi
6707
6708 if test $ol_with_threads = manual ; then
6709                 ol_link_threads=yes
6710
6711         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6712
6713         for ac_hdr in pthread.h sched.h
6714 do
6715 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6716 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6717 echo "configure:6718: checking for $ac_hdr" >&5
6718 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   cat > conftest.$ac_ext <<EOF
6722 #line 6723 "configure"
6723 #include "confdefs.h"
6724 #include <$ac_hdr>
6725 EOF
6726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6727 { (eval echo configure:6728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6729 if test -z "$ac_err"; then
6730   rm -rf conftest*
6731   eval "ac_cv_header_$ac_safe=yes"
6732 else
6733   echo "$ac_err" >&5
6734   echo "configure: failed program was:" >&5
6735   cat conftest.$ac_ext >&5
6736   rm -rf conftest*
6737   eval "ac_cv_header_$ac_safe=no"
6738 fi
6739 rm -f conftest*
6740 fi
6741 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6744   cat >> confdefs.h <<EOF
6745 #define $ac_tr_hdr 1
6746 EOF
6747  
6748 else
6749   echo "$ac_t""no" 1>&6
6750 fi
6751 done
6752
6753         for ac_func in sched_yield pthread_yield
6754 do
6755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6756 echo "configure:6757: checking for $ac_func" >&5
6757 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   cat > conftest.$ac_ext <<EOF
6761 #line 6762 "configure"
6762 #include "confdefs.h"
6763 /* System header to define __stub macros and hopefully few prototypes,
6764     which can conflict with char $ac_func(); below.  */
6765 #include <assert.h>
6766 /* Override any gcc2 internal prototype to avoid an error.  */
6767 /* We use char because int might match the return type of a gcc2
6768     builtin and then its argument prototype would still apply.  */
6769 char $ac_func();
6770
6771 int main() {
6772
6773 /* The GNU C library defines this for functions which it implements
6774     to always fail with ENOSYS.  Some functions are actually named
6775     something starting with __ and the normal name is an alias.  */
6776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6777 choke me
6778 #else
6779 $ac_func();
6780 #endif
6781
6782 ; return 0; }
6783 EOF
6784 if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6785   rm -rf conftest*
6786   eval "ac_cv_func_$ac_func=yes"
6787 else
6788   echo "configure: failed program was:" >&5
6789   cat conftest.$ac_ext >&5
6790   rm -rf conftest*
6791   eval "ac_cv_func_$ac_func=no"
6792 fi
6793 rm -f conftest*
6794 fi
6795
6796 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6797   echo "$ac_t""yes" 1>&6
6798     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6799   cat >> confdefs.h <<EOF
6800 #define $ac_tr_func 1
6801 EOF
6802  
6803 else
6804   echo "$ac_t""no" 1>&6
6805 fi
6806 done
6807
6808         
6809         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6810 echo "configure:6811: checking for LinuxThreads pthread.h" >&5
6811 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6812   echo $ac_n "(cached) $ac_c" 1>&6
6813 else
6814   cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817 #include <pthread.h>
6818 EOF
6819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6820   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6821   rm -rf conftest*
6822   ol_cv_header_linux_threads=yes
6823 else
6824   rm -rf conftest*
6825   ol_cv_header_linux_threads=no
6826 fi
6827 rm -f conftest*
6828
6829                 
6830 fi
6831
6832 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6833         if test $ol_cv_header_linux_threads = yes; then
6834                 cat >> confdefs.h <<\EOF
6835 #define HAVE_LINUX_THREADS 1
6836 EOF
6837
6838         fi
6839
6840
6841         for ac_hdr in mach/cthreads.h
6842 do
6843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6845 echo "configure:6846: checking for $ac_hdr" >&5
6846 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6847   echo $ac_n "(cached) $ac_c" 1>&6
6848 else
6849   cat > conftest.$ac_ext <<EOF
6850 #line 6851 "configure"
6851 #include "confdefs.h"
6852 #include <$ac_hdr>
6853 EOF
6854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6855 { (eval echo configure:6856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6857 if test -z "$ac_err"; then
6858   rm -rf conftest*
6859   eval "ac_cv_header_$ac_safe=yes"
6860 else
6861   echo "$ac_err" >&5
6862   echo "configure: failed program was:" >&5
6863   cat conftest.$ac_ext >&5
6864   rm -rf conftest*
6865   eval "ac_cv_header_$ac_safe=no"
6866 fi
6867 rm -f conftest*
6868 fi
6869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6870   echo "$ac_t""yes" 1>&6
6871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6872   cat >> confdefs.h <<EOF
6873 #define $ac_tr_hdr 1
6874 EOF
6875  
6876 else
6877   echo "$ac_t""no" 1>&6
6878 fi
6879 done
6880
6881         for ac_hdr in lwp/lwp.h
6882 do
6883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6885 echo "configure:6886: checking for $ac_hdr" >&5
6886 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6887   echo $ac_n "(cached) $ac_c" 1>&6
6888 else
6889   cat > conftest.$ac_ext <<EOF
6890 #line 6891 "configure"
6891 #include "confdefs.h"
6892 #include <$ac_hdr>
6893 EOF
6894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6895 { (eval echo configure:6896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6897 if test -z "$ac_err"; then
6898   rm -rf conftest*
6899   eval "ac_cv_header_$ac_safe=yes"
6900 else
6901   echo "$ac_err" >&5
6902   echo "configure: failed program was:" >&5
6903   cat conftest.$ac_ext >&5
6904   rm -rf conftest*
6905   eval "ac_cv_header_$ac_safe=no"
6906 fi
6907 rm -f conftest*
6908 fi
6909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6910   echo "$ac_t""yes" 1>&6
6911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6912   cat >> confdefs.h <<EOF
6913 #define $ac_tr_hdr 1
6914 EOF
6915  
6916 else
6917   echo "$ac_t""no" 1>&6
6918 fi
6919 done
6920
6921         for ac_hdr in thread.h synch.h
6922 do
6923 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6924 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6925 echo "configure:6926: checking for $ac_hdr" >&5
6926 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6927   echo $ac_n "(cached) $ac_c" 1>&6
6928 else
6929   cat > conftest.$ac_ext <<EOF
6930 #line 6931 "configure"
6931 #include "confdefs.h"
6932 #include <$ac_hdr>
6933 EOF
6934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6935 { (eval echo configure:6936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6937 if test -z "$ac_err"; then
6938   rm -rf conftest*
6939   eval "ac_cv_header_$ac_safe=yes"
6940 else
6941   echo "$ac_err" >&5
6942   echo "configure: failed program was:" >&5
6943   cat conftest.$ac_ext >&5
6944   rm -rf conftest*
6945   eval "ac_cv_header_$ac_safe=no"
6946 fi
6947 rm -f conftest*
6948 fi
6949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6950   echo "$ac_t""yes" 1>&6
6951     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6952   cat >> confdefs.h <<EOF
6953 #define $ac_tr_hdr 1
6954 EOF
6955  
6956 else
6957   echo "$ac_t""no" 1>&6
6958 fi
6959 done
6960
6961 fi
6962
6963 if test $ol_link_threads != no ; then  
6964                         cat >> confdefs.h <<\EOF
6965 #define REENTRANT 1
6966 EOF
6967
6968         cat >> confdefs.h <<\EOF
6969 #define _REENTRANT 1
6970 EOF
6971
6972         cat >> confdefs.h <<\EOF
6973 #define THREAD_SAFE 1
6974 EOF
6975
6976         cat >> confdefs.h <<\EOF
6977 #define _THREAD_SAFE 1
6978 EOF
6979
6980         cat >> confdefs.h <<\EOF
6981 #define THREADSAFE 1
6982 EOF
6983
6984         cat >> confdefs.h <<\EOF
6985 #define _THREADSAFE 1
6986 EOF
6987
6988
6989                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
6990 echo "configure:6991: checking for thread specific errno" >&5
6991 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
6992   echo $ac_n "(cached) $ac_c" 1>&6
6993 else
6994   
6995                 cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998 #include <errno.h>
6999 int main() {
7000 errno = 0;
7001 ; return 0; }
7002 EOF
7003 if { (eval echo configure:7004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7004   rm -rf conftest*
7005   ol_cv_errno_thread_specific=yes
7006 else
7007   echo "configure: failed program was:" >&5
7008   cat conftest.$ac_ext >&5
7009   rm -rf conftest*
7010   ol_cv_errno_thread_specific=no
7011 fi
7012 rm -f conftest*
7013         
7014 fi
7015
7016 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7017
7018         if test $ol_cv_errno_thread_specific != yes ; then
7019                 LIBS="$LTHREAD_LIBS $LIBS"
7020                 LTHREAD_LIBS=""
7021         fi
7022
7023 fi  
7024
7025 if test $ol_link_threads = no ; then
7026         if test $ol_with_threads = yes ; then
7027                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7028         fi
7029
7030         if test $ol_with_threads = auto ; then
7031                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7032                 ol_with_threads=no
7033         fi
7034
7035         cat >> confdefs.h <<\EOF
7036 #define NO_THREADS 1
7037 EOF
7038
7039         LTHREAD_LIBS=""
7040 fi
7041
7042 if test $ol_link_threads != no ; then
7043         cat >> confdefs.h <<\EOF
7044 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7045 EOF
7046
7047 fi
7048
7049
7050 ol_link_ldbm=no 
7051 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7052         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7053 echo "configure:7054: checking for DB2 library" >&5
7054 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7055   echo $ac_n "(cached) $ac_c" 1>&6
7056 else
7057         ol_LIBS="$LIBS"
7058         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7059 echo "configure:7060: checking for db_open in -ldb" >&5
7060 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7061 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7062   echo $ac_n "(cached) $ac_c" 1>&6
7063 else
7064   ac_save_LIBS="$LIBS"
7065 LIBS="-ldb  $LIBS"
7066 cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 /* Override any gcc2 internal prototype to avoid an error.  */
7070 /* We use char because int might match the return type of a gcc2
7071     builtin and then its argument prototype would still apply.  */
7072 char db_open();
7073
7074 int main() {
7075 db_open()
7076 ; return 0; }
7077 EOF
7078 if { (eval echo configure:7079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7079   rm -rf conftest*
7080   eval "ac_cv_lib_$ac_lib_var=yes"
7081 else
7082   echo "configure: failed program was:" >&5
7083   cat conftest.$ac_ext >&5
7084   rm -rf conftest*
7085   eval "ac_cv_lib_$ac_lib_var=no"
7086 fi
7087 rm -f conftest*
7088 LIBS="$ac_save_LIBS"
7089
7090 fi
7091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7092   echo "$ac_t""yes" 1>&6
7093   ol_cv_lib_db2=-ldb
7094 else
7095   echo "$ac_t""no" 1>&6
7096 ol_cv_lib_db2=no
7097 fi
7098
7099         LIBS="$ol_LIBS"
7100
7101 fi
7102
7103 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7104
7105 for ac_hdr in db.h
7106 do
7107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7109 echo "configure:7110: checking for $ac_hdr" >&5
7110 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7111   echo $ac_n "(cached) $ac_c" 1>&6
7112 else
7113   cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 #include <$ac_hdr>
7117 EOF
7118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7119 { (eval echo configure:7120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7121 if test -z "$ac_err"; then
7122   rm -rf conftest*
7123   eval "ac_cv_header_$ac_safe=yes"
7124 else
7125   echo "$ac_err" >&5
7126   echo "configure: failed program was:" >&5
7127   cat conftest.$ac_ext >&5
7128   rm -rf conftest*
7129   eval "ac_cv_header_$ac_safe=no"
7130 fi
7131 rm -f conftest*
7132 fi
7133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7134   echo "$ac_t""yes" 1>&6
7135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7136   cat >> confdefs.h <<EOF
7137 #define $ac_tr_hdr 1
7138 EOF
7139  
7140 else
7141   echo "$ac_t""no" 1>&6
7142 fi
7143 done
7144
7145 if test $ac_cv_header_db_h = yes ; then
7146         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7147 echo "configure:7148: checking if db.h is DB2" >&5
7148 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7149   echo $ac_n "(cached) $ac_c" 1>&6
7150 else
7151   
7152                 cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155
7156 #                       include <db.h>
7157                         /* this check could be improved */
7158 #                       ifdef DB_VERSION_MAJOR
7159 #                               if DB_VERSION_MAJOR == 2
7160                                         __db_version_2
7161 #                               endif
7162 #                       endif
7163                 
7164 EOF
7165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7166   egrep "__db_version_2" >/dev/null 2>&1; then
7167   rm -rf conftest*
7168   ol_cv_header_db2=yes
7169 else
7170   rm -rf conftest*
7171   ol_cv_header_db2=no
7172 fi
7173 rm -f conftest*
7174
7175 fi
7176
7177 echo "$ac_t""$ol_cv_header_db2" 1>&6
7178 else
7179         ol_cv_header_db2=no
7180 fi
7181
7182
7183  
7184  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7185 echo "configure:7186: checking for Berkeley DB2" >&5
7186 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7187   echo $ac_n "(cached) $ac_c" 1>&6
7188 else
7189   
7190         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7191                 ol_cv_berkeley_db2=no
7192         else
7193                 ol_cv_berkeley_db2=yes
7194         fi
7195
7196 fi
7197
7198 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7199  if test $ol_cv_berkeley_db2 = yes ; then
7200         cat >> confdefs.h <<\EOF
7201 #define HAVE_BERKELEY_DB2 1
7202 EOF
7203
7204  fi
7205
7206
7207         if test $ol_cv_berkeley_db2 = yes ; then
7208                 ol_link_ldbm=db2
7209                 ol_with_ldbm_api=db2
7210
7211                 if test $ol_with_ldbm_type = hash ; then
7212                         cat >> confdefs.h <<\EOF
7213 #define LDBM_USE_DBHASH 1
7214 EOF
7215
7216                 else
7217                         cat >> confdefs.h <<\EOF
7218 #define LDBM_USE_DBBTREE 1
7219 EOF
7220
7221                 fi
7222
7223                                                 if test $ol_cv_lib_db2 != yes ; then
7224                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7225                 fi
7226         fi
7227 fi
7228
7229 ol_link_bdb2=no
7230 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7231         ol_link_bdb2=yes
7232 fi
7233
7234 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7235         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7236 echo "configure:7237: checking for Berkeley DB library" >&5
7237 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7238   echo $ac_n "(cached) $ac_c" 1>&6
7239 else
7240         ol_LIBS="$LIBS"
7241         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7242 echo "configure:7243: checking for dbopen" >&5
7243 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7244   echo $ac_n "(cached) $ac_c" 1>&6
7245 else
7246   cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 /* System header to define __stub macros and hopefully few prototypes,
7250     which can conflict with char dbopen(); below.  */
7251 #include <assert.h>
7252 /* Override any gcc2 internal prototype to avoid an error.  */
7253 /* We use char because int might match the return type of a gcc2
7254     builtin and then its argument prototype would still apply.  */
7255 char dbopen();
7256
7257 int main() {
7258
7259 /* The GNU C library defines this for functions which it implements
7260     to always fail with ENOSYS.  Some functions are actually named
7261     something starting with __ and the normal name is an alias.  */
7262 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7263 choke me
7264 #else
7265 dbopen();
7266 #endif
7267
7268 ; return 0; }
7269 EOF
7270 if { (eval echo configure:7271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7271   rm -rf conftest*
7272   eval "ac_cv_func_dbopen=yes"
7273 else
7274   echo "configure: failed program was:" >&5
7275   cat conftest.$ac_ext >&5
7276   rm -rf conftest*
7277   eval "ac_cv_func_dbopen=no"
7278 fi
7279 rm -f conftest*
7280 fi
7281
7282 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7283   echo "$ac_t""yes" 1>&6
7284   ol_cv_lib_db=yes
7285 else
7286   echo "$ac_t""no" 1>&6
7287
7288                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7289 echo "configure:7290: checking for dbopen in -ldb" >&5
7290 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7292   echo $ac_n "(cached) $ac_c" 1>&6
7293 else
7294   ac_save_LIBS="$LIBS"
7295 LIBS="-ldb  $LIBS"
7296 cat > conftest.$ac_ext <<EOF
7297 #line 7298 "configure"
7298 #include "confdefs.h"
7299 /* Override any gcc2 internal prototype to avoid an error.  */
7300 /* We use char because int might match the return type of a gcc2
7301     builtin and then its argument prototype would still apply.  */
7302 char dbopen();
7303
7304 int main() {
7305 dbopen()
7306 ; return 0; }
7307 EOF
7308 if { (eval echo configure:7309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7309   rm -rf conftest*
7310   eval "ac_cv_lib_$ac_lib_var=yes"
7311 else
7312   echo "configure: failed program was:" >&5
7313   cat conftest.$ac_ext >&5
7314   rm -rf conftest*
7315   eval "ac_cv_lib_$ac_lib_var=no"
7316 fi
7317 rm -f conftest*
7318 LIBS="$ac_save_LIBS"
7319
7320 fi
7321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7322   echo "$ac_t""yes" 1>&6
7323   ol_cv_lib_db=-ldb
7324 else
7325   echo "$ac_t""no" 1>&6
7326 ol_cv_lib_db=no
7327 fi
7328
7329         
7330 fi
7331
7332         LIBS="$ol_LIBS"
7333
7334 fi
7335
7336 echo "$ac_t""$ol_cv_lib_db" 1>&6
7337
7338
7339 for ac_hdr in db_185.h
7340 do
7341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7343 echo "configure:7344: checking for $ac_hdr" >&5
7344 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7345   echo $ac_n "(cached) $ac_c" 1>&6
7346 else
7347   cat > conftest.$ac_ext <<EOF
7348 #line 7349 "configure"
7349 #include "confdefs.h"
7350 #include <$ac_hdr>
7351 EOF
7352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7353 { (eval echo configure:7354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7355 if test -z "$ac_err"; then
7356   rm -rf conftest*
7357   eval "ac_cv_header_$ac_safe=yes"
7358 else
7359   echo "$ac_err" >&5
7360   echo "configure: failed program was:" >&5
7361   cat conftest.$ac_ext >&5
7362   rm -rf conftest*
7363   eval "ac_cv_header_$ac_safe=no"
7364 fi
7365 rm -f conftest*
7366 fi
7367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7368   echo "$ac_t""yes" 1>&6
7369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7370   cat >> confdefs.h <<EOF
7371 #define $ac_tr_hdr 1
7372 EOF
7373  
7374 else
7375   echo "$ac_t""no" 1>&6
7376 fi
7377 done
7378
7379 if test "$ol_cv_header_db2" = yes ; then
7380         
7381         ol_cv_header_db=$ac_cv_header_db_185_h
7382 else
7383         ol_cv_header_db=$ac_cv_header_db_h
7384 fi
7385
7386
7387  
7388  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7389 echo "configure:7390: checking for Berkeley DB" >&5
7390 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7391   echo $ac_n "(cached) $ac_c" 1>&6
7392 else
7393   
7394         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7395                 ol_cv_berkeley_db=no
7396         else
7397                 ol_cv_berkeley_db=yes
7398         fi
7399
7400 fi
7401
7402 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
7403  if test $ol_cv_berkeley_db = yes ; then
7404         cat >> confdefs.h <<\EOF
7405 #define HAVE_BERKELEY_DB 1
7406 EOF
7407
7408  fi
7409
7410
7411         if test $ol_cv_berkeley_db = yes ; then
7412                 ol_link_ldbm=db
7413                 ol_with_ldbm_api=db
7414
7415                 if test $ol_with_ldbm_type = hash ; then
7416                         cat >> confdefs.h <<\EOF
7417 #define LDBM_USE_DBHASH 1
7418 EOF
7419
7420                 else
7421                         cat >> confdefs.h <<\EOF
7422 #define LDBM_USE_DBBTREE 1
7423 EOF
7424
7425                 fi
7426
7427                                                 if test $ol_cv_lib_db != yes ; then
7428                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
7429                 fi
7430         fi
7431 fi
7432
7433 if test $ol_with_ldbm_api = manual ; then
7434                 ol_link_ldbm=yes
7435
7436         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
7437
7438         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
7439 do
7440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7442 echo "configure:7443: checking for $ac_hdr" >&5
7443 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7444   echo $ac_n "(cached) $ac_c" 1>&6
7445 else
7446   cat > conftest.$ac_ext <<EOF
7447 #line 7448 "configure"
7448 #include "confdefs.h"
7449 #include <$ac_hdr>
7450 EOF
7451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7452 { (eval echo configure:7453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7454 if test -z "$ac_err"; then
7455   rm -rf conftest*
7456   eval "ac_cv_header_$ac_safe=yes"
7457 else
7458   echo "$ac_err" >&5
7459   echo "configure: failed program was:" >&5
7460   cat conftest.$ac_ext >&5
7461   rm -rf conftest*
7462   eval "ac_cv_header_$ac_safe=no"
7463 fi
7464 rm -f conftest*
7465 fi
7466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7467   echo "$ac_t""yes" 1>&6
7468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7469   cat >> confdefs.h <<EOF
7470 #define $ac_tr_hdr 1
7471 EOF
7472  
7473 else
7474   echo "$ac_t""no" 1>&6
7475 fi
7476 done
7477
7478 fi
7479
7480 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7481         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7482         ol_with_ldbm_api=none
7483 fi
7484
7485 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7486         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7487 echo "configure:7488: checking for MDBM library" >&5
7488 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7489   echo $ac_n "(cached) $ac_c" 1>&6
7490 else
7491         ol_LIBS="$LIBS"
7492         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7493 echo "configure:7494: checking for mdbm_set_chain" >&5
7494 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7495   echo $ac_n "(cached) $ac_c" 1>&6
7496 else
7497   cat > conftest.$ac_ext <<EOF
7498 #line 7499 "configure"
7499 #include "confdefs.h"
7500 /* System header to define __stub macros and hopefully few prototypes,
7501     which can conflict with char mdbm_set_chain(); below.  */
7502 #include <assert.h>
7503 /* Override any gcc2 internal prototype to avoid an error.  */
7504 /* We use char because int might match the return type of a gcc2
7505     builtin and then its argument prototype would still apply.  */
7506 char mdbm_set_chain();
7507
7508 int main() {
7509
7510 /* The GNU C library defines this for functions which it implements
7511     to always fail with ENOSYS.  Some functions are actually named
7512     something starting with __ and the normal name is an alias.  */
7513 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7514 choke me
7515 #else
7516 mdbm_set_chain();
7517 #endif
7518
7519 ; return 0; }
7520 EOF
7521 if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7522   rm -rf conftest*
7523   eval "ac_cv_func_mdbm_set_chain=yes"
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -rf conftest*
7528   eval "ac_cv_func_mdbm_set_chain=no"
7529 fi
7530 rm -f conftest*
7531 fi
7532
7533 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7534   echo "$ac_t""yes" 1>&6
7535   ol_cv_lib_mdbm=yes
7536 else
7537   echo "$ac_t""no" 1>&6
7538
7539                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7540 echo "configure:7541: checking for mdbm_set_chain in -lmdbm" >&5
7541 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7543   echo $ac_n "(cached) $ac_c" 1>&6
7544 else
7545   ac_save_LIBS="$LIBS"
7546 LIBS="-lmdbm  $LIBS"
7547 cat > conftest.$ac_ext <<EOF
7548 #line 7549 "configure"
7549 #include "confdefs.h"
7550 /* Override any gcc2 internal prototype to avoid an error.  */
7551 /* We use char because int might match the return type of a gcc2
7552     builtin and then its argument prototype would still apply.  */
7553 char mdbm_set_chain();
7554
7555 int main() {
7556 mdbm_set_chain()
7557 ; return 0; }
7558 EOF
7559 if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7560   rm -rf conftest*
7561   eval "ac_cv_lib_$ac_lib_var=yes"
7562 else
7563   echo "configure: failed program was:" >&5
7564   cat conftest.$ac_ext >&5
7565   rm -rf conftest*
7566   eval "ac_cv_lib_$ac_lib_var=no"
7567 fi
7568 rm -f conftest*
7569 LIBS="$ac_save_LIBS"
7570
7571 fi
7572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7573   echo "$ac_t""yes" 1>&6
7574   ol_cv_lib_mdbm=-lmdbm
7575 else
7576   echo "$ac_t""no" 1>&6
7577 ol_cv_lib_mdbm=no
7578 fi
7579
7580         
7581 fi
7582
7583         LIBS="$ol_LIBS"
7584
7585 fi
7586
7587 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7588
7589
7590  for ac_hdr in mdbm.h
7591 do
7592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7594 echo "configure:7595: checking for $ac_hdr" >&5
7595 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7596   echo $ac_n "(cached) $ac_c" 1>&6
7597 else
7598   cat > conftest.$ac_ext <<EOF
7599 #line 7600 "configure"
7600 #include "confdefs.h"
7601 #include <$ac_hdr>
7602 EOF
7603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7604 { (eval echo configure:7605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7606 if test -z "$ac_err"; then
7607   rm -rf conftest*
7608   eval "ac_cv_header_$ac_safe=yes"
7609 else
7610   echo "$ac_err" >&5
7611   echo "configure: failed program was:" >&5
7612   cat conftest.$ac_ext >&5
7613   rm -rf conftest*
7614   eval "ac_cv_header_$ac_safe=no"
7615 fi
7616 rm -f conftest*
7617 fi
7618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7619   echo "$ac_t""yes" 1>&6
7620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7621   cat >> confdefs.h <<EOF
7622 #define $ac_tr_hdr 1
7623 EOF
7624  
7625 else
7626   echo "$ac_t""no" 1>&6
7627 fi
7628 done
7629
7630  echo $ac_n "checking for db""... $ac_c" 1>&6
7631 echo "configure:7632: checking for db" >&5
7632 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7633   echo $ac_n "(cached) $ac_c" 1>&6
7634 else
7635   
7636         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7637                 ol_cv_mdbm=no
7638         else
7639                 ol_cv_mdbm=yes
7640         fi
7641
7642 fi
7643
7644 echo "$ac_t""$ol_cv_mdbm" 1>&6
7645  if test $ol_cv_mdbm = yes ; then
7646         cat >> confdefs.h <<\EOF
7647 #define HAVE_MDBM 1
7648 EOF
7649
7650  fi
7651
7652
7653         if test $ol_cv_mdbm = yes ; then
7654                 ol_link_ldbm=mdbm
7655                 ol_with_ldbm_api=mdbm
7656                 if test $ol_cv_lib_mdbm != yes ; then
7657                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7658                 fi
7659         fi
7660 fi
7661
7662 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7663         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7664 echo "configure:7665: checking for GDBM library" >&5
7665 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7666   echo $ac_n "(cached) $ac_c" 1>&6
7667 else
7668         ol_LIBS="$LIBS"
7669         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7670 echo "configure:7671: checking for gdbm_open" >&5
7671 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7672   echo $ac_n "(cached) $ac_c" 1>&6
7673 else
7674   cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* System header to define __stub macros and hopefully few prototypes,
7678     which can conflict with char gdbm_open(); below.  */
7679 #include <assert.h>
7680 /* Override any gcc2 internal prototype to avoid an error.  */
7681 /* We use char because int might match the return type of a gcc2
7682     builtin and then its argument prototype would still apply.  */
7683 char gdbm_open();
7684
7685 int main() {
7686
7687 /* The GNU C library defines this for functions which it implements
7688     to always fail with ENOSYS.  Some functions are actually named
7689     something starting with __ and the normal name is an alias.  */
7690 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7691 choke me
7692 #else
7693 gdbm_open();
7694 #endif
7695
7696 ; return 0; }
7697 EOF
7698 if { (eval echo configure:7699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7699   rm -rf conftest*
7700   eval "ac_cv_func_gdbm_open=yes"
7701 else
7702   echo "configure: failed program was:" >&5
7703   cat conftest.$ac_ext >&5
7704   rm -rf conftest*
7705   eval "ac_cv_func_gdbm_open=no"
7706 fi
7707 rm -f conftest*
7708 fi
7709
7710 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7711   echo "$ac_t""yes" 1>&6
7712   ol_cv_lib_gdbm=yes
7713 else
7714   echo "$ac_t""no" 1>&6
7715
7716                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7717 echo "configure:7718: checking for gdbm_open in -lgdbm" >&5
7718 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7719 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7720   echo $ac_n "(cached) $ac_c" 1>&6
7721 else
7722   ac_save_LIBS="$LIBS"
7723 LIBS="-lgdbm  $LIBS"
7724 cat > conftest.$ac_ext <<EOF
7725 #line 7726 "configure"
7726 #include "confdefs.h"
7727 /* Override any gcc2 internal prototype to avoid an error.  */
7728 /* We use char because int might match the return type of a gcc2
7729     builtin and then its argument prototype would still apply.  */
7730 char gdbm_open();
7731
7732 int main() {
7733 gdbm_open()
7734 ; return 0; }
7735 EOF
7736 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7737   rm -rf conftest*
7738   eval "ac_cv_lib_$ac_lib_var=yes"
7739 else
7740   echo "configure: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   rm -rf conftest*
7743   eval "ac_cv_lib_$ac_lib_var=no"
7744 fi
7745 rm -f conftest*
7746 LIBS="$ac_save_LIBS"
7747
7748 fi
7749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7750   echo "$ac_t""yes" 1>&6
7751   ol_cv_lib_gdbm=-lgdbm
7752 else
7753   echo "$ac_t""no" 1>&6
7754 ol_cv_lib_gdbm=no
7755 fi
7756
7757         
7758 fi
7759
7760         LIBS="$ol_LIBS"
7761
7762 fi
7763
7764 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7765
7766
7767  for ac_hdr in gdbm.h
7768 do
7769 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7770 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7771 echo "configure:7772: checking for $ac_hdr" >&5
7772 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7773   echo $ac_n "(cached) $ac_c" 1>&6
7774 else
7775   cat > conftest.$ac_ext <<EOF
7776 #line 7777 "configure"
7777 #include "confdefs.h"
7778 #include <$ac_hdr>
7779 EOF
7780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7781 { (eval echo configure:7782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7783 if test -z "$ac_err"; then
7784   rm -rf conftest*
7785   eval "ac_cv_header_$ac_safe=yes"
7786 else
7787   echo "$ac_err" >&5
7788   echo "configure: failed program was:" >&5
7789   cat conftest.$ac_ext >&5
7790   rm -rf conftest*
7791   eval "ac_cv_header_$ac_safe=no"
7792 fi
7793 rm -f conftest*
7794 fi
7795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7796   echo "$ac_t""yes" 1>&6
7797     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7798   cat >> confdefs.h <<EOF
7799 #define $ac_tr_hdr 1
7800 EOF
7801  
7802 else
7803   echo "$ac_t""no" 1>&6
7804 fi
7805 done
7806
7807  echo $ac_n "checking for db""... $ac_c" 1>&6
7808 echo "configure:7809: checking for db" >&5
7809 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7810   echo $ac_n "(cached) $ac_c" 1>&6
7811 else
7812   
7813         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7814                 ol_cv_gdbm=no
7815         else
7816                 ol_cv_gdbm=yes
7817         fi
7818
7819 fi
7820
7821 echo "$ac_t""$ol_cv_gdbm" 1>&6
7822  if test $ol_cv_gdbm = yes ; then
7823         cat >> confdefs.h <<\EOF
7824 #define HAVE_GDBM 1
7825 EOF
7826
7827  fi
7828
7829
7830         if test $ol_cv_gdbm = yes ; then
7831                 ol_link_ldbm=gdbm
7832                 ol_with_ldbm_api=gdbm
7833
7834                 if test $ol_cv_lib_gdbm != yes ; then
7835                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7836                 fi
7837         fi
7838 fi
7839
7840 if test $ol_with_ldbm_api = auto ; then
7841         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7842 elif test $ol_with_ldbm_api = ndbm ; then
7843         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7844 echo "configure:7845: checking for NDBM library" >&5
7845 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7846   echo $ac_n "(cached) $ac_c" 1>&6
7847 else
7848         ol_LIBS="$LIBS"
7849         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7850 echo "configure:7851: checking for dbm_open" >&5
7851 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   cat > conftest.$ac_ext <<EOF
7855 #line 7856 "configure"
7856 #include "confdefs.h"
7857 /* System header to define __stub macros and hopefully few prototypes,
7858     which can conflict with char dbm_open(); below.  */
7859 #include <assert.h>
7860 /* Override any gcc2 internal prototype to avoid an error.  */
7861 /* We use char because int might match the return type of a gcc2
7862     builtin and then its argument prototype would still apply.  */
7863 char dbm_open();
7864
7865 int main() {
7866
7867 /* The GNU C library defines this for functions which it implements
7868     to always fail with ENOSYS.  Some functions are actually named
7869     something starting with __ and the normal name is an alias.  */
7870 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7871 choke me
7872 #else
7873 dbm_open();
7874 #endif
7875
7876 ; return 0; }
7877 EOF
7878 if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7879   rm -rf conftest*
7880   eval "ac_cv_func_dbm_open=yes"
7881 else
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   eval "ac_cv_func_dbm_open=no"
7886 fi
7887 rm -f conftest*
7888 fi
7889
7890 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7891   echo "$ac_t""yes" 1>&6
7892   ol_cv_lib_ndbm=yes
7893 else
7894   echo "$ac_t""no" 1>&6
7895
7896                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7897 echo "configure:7898: checking for dbm_open in -lndbm" >&5
7898 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7899 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7900   echo $ac_n "(cached) $ac_c" 1>&6
7901 else
7902   ac_save_LIBS="$LIBS"
7903 LIBS="-lndbm  $LIBS"
7904 cat > conftest.$ac_ext <<EOF
7905 #line 7906 "configure"
7906 #include "confdefs.h"
7907 /* Override any gcc2 internal prototype to avoid an error.  */
7908 /* We use char because int might match the return type of a gcc2
7909     builtin and then its argument prototype would still apply.  */
7910 char dbm_open();
7911
7912 int main() {
7913 dbm_open()
7914 ; return 0; }
7915 EOF
7916 if { (eval echo configure:7917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7917   rm -rf conftest*
7918   eval "ac_cv_lib_$ac_lib_var=yes"
7919 else
7920   echo "configure: failed program was:" >&5
7921   cat conftest.$ac_ext >&5
7922   rm -rf conftest*
7923   eval "ac_cv_lib_$ac_lib_var=no"
7924 fi
7925 rm -f conftest*
7926 LIBS="$ac_save_LIBS"
7927
7928 fi
7929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7930   echo "$ac_t""yes" 1>&6
7931   ol_cv_lib_ndbm=-lndbm
7932 else
7933   echo "$ac_t""no" 1>&6
7934
7935                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7936 echo "configure:7937: checking for dbm_open in -ldbm" >&5
7937 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   ac_save_LIBS="$LIBS"
7942 LIBS="-ldbm  $LIBS"
7943 cat > conftest.$ac_ext <<EOF
7944 #line 7945 "configure"
7945 #include "confdefs.h"
7946 /* Override any gcc2 internal prototype to avoid an error.  */
7947 /* We use char because int might match the return type of a gcc2
7948     builtin and then its argument prototype would still apply.  */
7949 char dbm_open();
7950
7951 int main() {
7952 dbm_open()
7953 ; return 0; }
7954 EOF
7955 if { (eval echo configure:7956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7956   rm -rf conftest*
7957   eval "ac_cv_lib_$ac_lib_var=yes"
7958 else
7959   echo "configure: failed program was:" >&5
7960   cat conftest.$ac_ext >&5
7961   rm -rf conftest*
7962   eval "ac_cv_lib_$ac_lib_var=no"
7963 fi
7964 rm -f conftest*
7965 LIBS="$ac_save_LIBS"
7966
7967 fi
7968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7969   echo "$ac_t""yes" 1>&6
7970   ol_cv_lib_ndbm=-ldbm
7971 else
7972   echo "$ac_t""no" 1>&6
7973 ol_cv_lib_ndbm=no
7974 fi
7975                 
7976 fi
7977
7978         
7979 fi
7980
7981         LIBS="$ol_LIBS"
7982
7983 fi
7984
7985 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
7986
7987
7988  for ac_hdr in ndbm.h
7989 do
7990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7992 echo "configure:7993: checking for $ac_hdr" >&5
7993 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7994   echo $ac_n "(cached) $ac_c" 1>&6
7995 else
7996   cat > conftest.$ac_ext <<EOF
7997 #line 7998 "configure"
7998 #include "confdefs.h"
7999 #include <$ac_hdr>
8000 EOF
8001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8002 { (eval echo configure:8003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8004 if test -z "$ac_err"; then
8005   rm -rf conftest*
8006   eval "ac_cv_header_$ac_safe=yes"
8007 else
8008   echo "$ac_err" >&5
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   eval "ac_cv_header_$ac_safe=no"
8013 fi
8014 rm -f conftest*
8015 fi
8016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8017   echo "$ac_t""yes" 1>&6
8018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8019   cat >> confdefs.h <<EOF
8020 #define $ac_tr_hdr 1
8021 EOF
8022  
8023 else
8024   echo "$ac_t""no" 1>&6
8025 fi
8026 done
8027
8028  echo $ac_n "checking for db""... $ac_c" 1>&6
8029 echo "configure:8030: checking for db" >&5
8030 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8031   echo $ac_n "(cached) $ac_c" 1>&6
8032 else
8033   
8034         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8035                 ol_cv_ndbm=no
8036         else
8037                 ol_cv_ndbm=yes
8038         fi
8039
8040 fi
8041
8042 echo "$ac_t""$ol_cv_ndbm" 1>&6
8043  if test $ol_cv_ndbm = yes ; then
8044         cat >> confdefs.h <<\EOF
8045 #define HAVE_NDBM 1
8046 EOF
8047
8048  fi
8049
8050
8051         if test $ol_cv_ndbm = yes ; then
8052                 ol_link_ldbm=ndbm
8053                 ol_with_ldbm_api=ndbm
8054
8055                 if test $ol_cv_lib_ndbm != yes ; then
8056                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8057                 fi
8058         fi
8059 fi
8060
8061 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8062         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8063         if test $ol_enable_ldbm = yes ; then
8064                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8065         fi
8066
8067         echo "configure: warning: disabling LDBM" 1>&2
8068         ol_enable_ldbm=no
8069 fi
8070
8071 if test $ol_enable_wrappers != no ; then
8072         for ac_hdr in tcpd.h
8073 do
8074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8076 echo "configure:8077: checking for $ac_hdr" >&5
8077 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8078   echo $ac_n "(cached) $ac_c" 1>&6
8079 else
8080   cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <$ac_hdr>
8084 EOF
8085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8086 { (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8088 if test -z "$ac_err"; then
8089   rm -rf conftest*
8090   eval "ac_cv_header_$ac_safe=yes"
8091 else
8092   echo "$ac_err" >&5
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   eval "ac_cv_header_$ac_safe=no"
8097 fi
8098 rm -f conftest*
8099 fi
8100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8101   echo "$ac_t""yes" 1>&6
8102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8103   cat >> confdefs.h <<EOF
8104 #define $ac_tr_hdr 1
8105 EOF
8106  
8107 else
8108   echo "$ac_t""no" 1>&6
8109 fi
8110 done
8111
8112
8113         if test $ac_cv_header_tcpd_h != yes ; then
8114                 have_wrappers=no
8115         else
8116                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8117 echo "configure:8118: checking for main in -lwrap" >&5
8118 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8119 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8120   echo $ac_n "(cached) $ac_c" 1>&6
8121 else
8122   ac_save_LIBS="$LIBS"
8123 LIBS="-lwrap  $LIBS"
8124 cat > conftest.$ac_ext <<EOF
8125 #line 8126 "configure"
8126 #include "confdefs.h"
8127
8128 int main() {
8129 main()
8130 ; return 0; }
8131 EOF
8132 if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8133   rm -rf conftest*
8134   eval "ac_cv_lib_$ac_lib_var=yes"
8135 else
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   eval "ac_cv_lib_$ac_lib_var=no"
8140 fi
8141 rm -f conftest*
8142 LIBS="$ac_save_LIBS"
8143
8144 fi
8145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8146   echo "$ac_t""yes" 1>&6
8147   have_wrappers=yes
8148 else
8149   echo "$ac_t""no" 1>&6
8150 have_wrappers=no
8151 fi
8152
8153         fi
8154
8155         if test $have_wrappers = yes ; then
8156                 cat >> confdefs.h <<\EOF
8157 #define HAVE_TCPD 1
8158 EOF
8159
8160                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8161         else
8162                 echo "configure: warning: could not find -lwrap" 1>&2
8163                 if test $ol_enable_wrappers = yes ; then
8164                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8165                 fi
8166
8167                 echo "configure: warning: disabling wrappers support" 1>&2
8168                 ol_enable_wrappers=no
8169         fi
8170 fi
8171
8172 if test $ol_enable_syslog != no ; then
8173         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8174 echo "configure:8175: checking for openlog" >&5
8175 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8176   echo $ac_n "(cached) $ac_c" 1>&6
8177 else
8178   cat > conftest.$ac_ext <<EOF
8179 #line 8180 "configure"
8180 #include "confdefs.h"
8181 /* System header to define __stub macros and hopefully few prototypes,
8182     which can conflict with char openlog(); below.  */
8183 #include <assert.h>
8184 /* Override any gcc2 internal prototype to avoid an error.  */
8185 /* We use char because int might match the return type of a gcc2
8186     builtin and then its argument prototype would still apply.  */
8187 char openlog();
8188
8189 int main() {
8190
8191 /* The GNU C library defines this for functions which it implements
8192     to always fail with ENOSYS.  Some functions are actually named
8193     something starting with __ and the normal name is an alias.  */
8194 #if defined (__stub_openlog) || defined (__stub___openlog)
8195 choke me
8196 #else
8197 openlog();
8198 #endif
8199
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8203   rm -rf conftest*
8204   eval "ac_cv_func_openlog=yes"
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   eval "ac_cv_func_openlog=no"
8210 fi
8211 rm -f conftest*
8212 fi
8213
8214 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8215   echo "$ac_t""yes" 1>&6
8216   :
8217 else
8218   echo "$ac_t""no" 1>&6
8219 fi
8220
8221         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8222                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8223         fi
8224         ol_enable_syslog=$ac_cv_func_openlog
8225 fi
8226
8227 if test $ol_enable_dmalloc != no ; then
8228         for ac_hdr in dmalloc.h
8229 do
8230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8232 echo "configure:8233: checking for $ac_hdr" >&5
8233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8234   echo $ac_n "(cached) $ac_c" 1>&6
8235 else
8236   cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239 #include <$ac_hdr>
8240 EOF
8241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8242 { (eval echo configure:8243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8244 if test -z "$ac_err"; then
8245   rm -rf conftest*
8246   eval "ac_cv_header_$ac_safe=yes"
8247 else
8248   echo "$ac_err" >&5
8249   echo "configure: failed program was:" >&5
8250   cat conftest.$ac_ext >&5
8251   rm -rf conftest*
8252   eval "ac_cv_header_$ac_safe=no"
8253 fi
8254 rm -f conftest*
8255 fi
8256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8257   echo "$ac_t""yes" 1>&6
8258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8259   cat >> confdefs.h <<EOF
8260 #define $ac_tr_hdr 1
8261 EOF
8262  
8263 else
8264   echo "$ac_t""no" 1>&6
8265 fi
8266 done
8267
8268         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8269 echo "configure:8270: checking for dmalloc_shutdown in -ldmalloc" >&5
8270 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   ac_save_LIBS="$LIBS"
8275 LIBS="-ldmalloc  $LIBS"
8276 cat > conftest.$ac_ext <<EOF
8277 #line 8278 "configure"
8278 #include "confdefs.h"
8279 /* Override any gcc2 internal prototype to avoid an error.  */
8280 /* We use char because int might match the return type of a gcc2
8281     builtin and then its argument prototype would still apply.  */
8282 char dmalloc_shutdown();
8283
8284 int main() {
8285 dmalloc_shutdown()
8286 ; return 0; }
8287 EOF
8288 if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8289   rm -rf conftest*
8290   eval "ac_cv_lib_$ac_lib_var=yes"
8291 else
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -rf conftest*
8295   eval "ac_cv_lib_$ac_lib_var=no"
8296 fi
8297 rm -f conftest*
8298 LIBS="$ac_save_LIBS"
8299
8300 fi
8301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8305   cat >> confdefs.h <<EOF
8306 #define $ac_tr_lib 1
8307 EOF
8308
8309   LIBS="-ldmalloc $LIBS"
8310
8311 else
8312   echo "$ac_t""no" 1>&6
8313 fi
8314
8315 fi
8316
8317 if test $ol_enable_tcl != no ; then
8318         for ac_hdr in tcl.h
8319 do
8320 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8321 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8322 echo "configure:8323: checking for $ac_hdr" >&5
8323 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8324   echo $ac_n "(cached) $ac_c" 1>&6
8325 else
8326   cat > conftest.$ac_ext <<EOF
8327 #line 8328 "configure"
8328 #include "confdefs.h"
8329 #include <$ac_hdr>
8330 EOF
8331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8332 { (eval echo configure:8333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8334 if test -z "$ac_err"; then
8335   rm -rf conftest*
8336   eval "ac_cv_header_$ac_safe=yes"
8337 else
8338   echo "$ac_err" >&5
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   eval "ac_cv_header_$ac_safe=no"
8343 fi
8344 rm -f conftest*
8345 fi
8346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8347   echo "$ac_t""yes" 1>&6
8348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8349   cat >> confdefs.h <<EOF
8350 #define $ac_tr_hdr 1
8351 EOF
8352  
8353 else
8354   echo "$ac_t""no" 1>&6
8355 fi
8356 done
8357
8358
8359         if test $ac_cv_header_tcl_h != yes ; then
8360                 have_tcl=no
8361         else
8362                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
8363 echo "configure:8364: checking for main in -ltcl" >&5
8364 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
8365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8366   echo $ac_n "(cached) $ac_c" 1>&6
8367 else
8368   ac_save_LIBS="$LIBS"
8369 LIBS="-ltcl  $LIBS"
8370 cat > conftest.$ac_ext <<EOF
8371 #line 8372 "configure"
8372 #include "confdefs.h"
8373
8374 int main() {
8375 main()
8376 ; return 0; }
8377 EOF
8378 if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8379   rm -rf conftest*
8380   eval "ac_cv_lib_$ac_lib_var=yes"
8381 else
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   eval "ac_cv_lib_$ac_lib_var=no"
8386 fi
8387 rm -f conftest*
8388 LIBS="$ac_save_LIBS"
8389
8390 fi
8391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8392   echo "$ac_t""yes" 1>&6
8393   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
8394 else
8395   echo "$ac_t""no" 1>&6
8396 have_tcl=no
8397 fi
8398
8399
8400                 if test $have_tcl != yes; then
8401                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
8402 echo "configure:8403: checking for main in -ltcl7.6" >&5
8403 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
8404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8405   echo $ac_n "(cached) $ac_c" 1>&6
8406 else
8407   ac_save_LIBS="$LIBS"
8408 LIBS="-ltcl7.6  $LIBS"
8409 cat > conftest.$ac_ext <<EOF
8410 #line 8411 "configure"
8411 #include "confdefs.h"
8412
8413 int main() {
8414 main()
8415 ; return 0; }
8416 EOF
8417 if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8418   rm -rf conftest*
8419   eval "ac_cv_lib_$ac_lib_var=yes"
8420 else
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -rf conftest*
8424   eval "ac_cv_lib_$ac_lib_var=no"
8425 fi
8426 rm -f conftest*
8427 LIBS="$ac_save_LIBS"
8428
8429 fi
8430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8431   echo "$ac_t""yes" 1>&6
8432   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
8433 else
8434   echo "$ac_t""no" 1>&6
8435 have_tcl=no
8436 fi
8437
8438                 fi
8439
8440                 if test $have_tcl != yes; then
8441                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
8442 echo "configure:8443: checking for main in -ltcl8.0" >&5
8443 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
8444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8445   echo $ac_n "(cached) $ac_c" 1>&6
8446 else
8447   ac_save_LIBS="$LIBS"
8448 LIBS="-ltcl8.0  $LIBS"
8449 cat > conftest.$ac_ext <<EOF
8450 #line 8451 "configure"
8451 #include "confdefs.h"
8452
8453 int main() {
8454 main()
8455 ; return 0; }
8456 EOF
8457 if { (eval echo configure:8458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8458   rm -rf conftest*
8459   eval "ac_cv_lib_$ac_lib_var=yes"
8460 else
8461   echo "configure: failed program was:" >&5
8462   cat conftest.$ac_ext >&5
8463   rm -rf conftest*
8464   eval "ac_cv_lib_$ac_lib_var=no"
8465 fi
8466 rm -f conftest*
8467 LIBS="$ac_save_LIBS"
8468
8469 fi
8470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8471   echo "$ac_t""yes" 1>&6
8472   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8473 else
8474   echo "$ac_t""no" 1>&6
8475 have_tcl=no
8476 fi
8477
8478                 fi
8479         fi
8480
8481         if test $have_tcl != yes ; then
8482                 echo "configure: warning: could not find -ltcl" 1>&2
8483                 if test $ol_enable_tcl = yes ; then
8484                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8485                 fi
8486
8487                 ol_enable_tcl=no
8488         fi
8489 fi
8490
8491 # ud needs termcap (should insert check here)
8492 ol_link_termcap=no
8493 for ac_hdr in termcap.h ncurses.h
8494 do
8495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8497 echo "configure:8498: checking for $ac_hdr" >&5
8498 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8499   echo $ac_n "(cached) $ac_c" 1>&6
8500 else
8501   cat > conftest.$ac_ext <<EOF
8502 #line 8503 "configure"
8503 #include "confdefs.h"
8504 #include <$ac_hdr>
8505 EOF
8506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8507 { (eval echo configure:8508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8509 if test -z "$ac_err"; then
8510   rm -rf conftest*
8511   eval "ac_cv_header_$ac_safe=yes"
8512 else
8513   echo "$ac_err" >&5
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -rf conftest*
8517   eval "ac_cv_header_$ac_safe=no"
8518 fi
8519 rm -f conftest*
8520 fi
8521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8522   echo "$ac_t""yes" 1>&6
8523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8524   cat >> confdefs.h <<EOF
8525 #define $ac_tr_hdr 1
8526 EOF
8527  
8528 else
8529   echo "$ac_t""no" 1>&6
8530 fi
8531 done
8532
8533
8534 if test $ol_link_termcap = no ; then
8535         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8536 echo "configure:8537: checking for tputs in -ltermcap" >&5
8537 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8538 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8539   echo $ac_n "(cached) $ac_c" 1>&6
8540 else
8541   ac_save_LIBS="$LIBS"
8542 LIBS="-ltermcap  $LIBS"
8543 cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 /* Override any gcc2 internal prototype to avoid an error.  */
8547 /* We use char because int might match the return type of a gcc2
8548     builtin and then its argument prototype would still apply.  */
8549 char tputs();
8550
8551 int main() {
8552 tputs()
8553 ; return 0; }
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8556   rm -rf conftest*
8557   eval "ac_cv_lib_$ac_lib_var=yes"
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -rf conftest*
8562   eval "ac_cv_lib_$ac_lib_var=no"
8563 fi
8564 rm -f conftest*
8565 LIBS="$ac_save_LIBS"
8566
8567 fi
8568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570   have_termcap=yes
8571 else
8572   echo "$ac_t""no" 1>&6
8573 have_termcap=no
8574 fi
8575
8576         if test $have_termcap = yes ; then
8577                 cat >> confdefs.h <<\EOF
8578 #define HAVE_TERMCAP 1
8579 EOF
8580
8581                 ol_link_termcap=yes
8582                 TERMCAP_LIBS=-ltermcap
8583         fi
8584 fi
8585
8586 if test $ol_link_termcap = no ; then
8587         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8588 echo "configure:8589: checking for initscr in -lncurses" >&5
8589 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8590 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8591   echo $ac_n "(cached) $ac_c" 1>&6
8592 else
8593   ac_save_LIBS="$LIBS"
8594 LIBS="-lncurses  $LIBS"
8595 cat > conftest.$ac_ext <<EOF
8596 #line 8597 "configure"
8597 #include "confdefs.h"
8598 /* Override any gcc2 internal prototype to avoid an error.  */
8599 /* We use char because int might match the return type of a gcc2
8600     builtin and then its argument prototype would still apply.  */
8601 char initscr();
8602
8603 int main() {
8604 initscr()
8605 ; return 0; }
8606 EOF
8607 if { (eval echo configure:8608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8608   rm -rf conftest*
8609   eval "ac_cv_lib_$ac_lib_var=yes"
8610 else
8611   echo "configure: failed program was:" >&5
8612   cat conftest.$ac_ext >&5
8613   rm -rf conftest*
8614   eval "ac_cv_lib_$ac_lib_var=no"
8615 fi
8616 rm -f conftest*
8617 LIBS="$ac_save_LIBS"
8618
8619 fi
8620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8621   echo "$ac_t""yes" 1>&6
8622   have_ncurses=yes
8623 else
8624   echo "$ac_t""no" 1>&6
8625 have_ncurses=no
8626 fi
8627
8628         if test $have_ncurses = yes ; then
8629                 cat >> confdefs.h <<\EOF
8630 #define HAVE_NCURSES 1
8631 EOF
8632
8633                 ol_link_termcap=yes
8634                 TERMCAP_LIBS=-lncurses
8635         fi
8636 fi
8637
8638 if test $ol_link_termcap = no ; then
8639         cat >> confdefs.h <<\EOF
8640 #define NO_TERMCAP 1
8641 EOF
8642
8643         TERMCAP_LIBS=
8644 fi
8645
8646 ol_link_readline=no
8647 if test $ol_with_readline != no ; then
8648         for ac_hdr in readline/readline.h readline/history.h
8649 do
8650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8651 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8652 echo "configure:8653: checking for $ac_hdr" >&5
8653 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8654   echo $ac_n "(cached) $ac_c" 1>&6
8655 else
8656   cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 #include <$ac_hdr>
8660 EOF
8661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8662 { (eval echo configure:8663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8664 if test -z "$ac_err"; then
8665   rm -rf conftest*
8666   eval "ac_cv_header_$ac_safe=yes"
8667 else
8668   echo "$ac_err" >&5
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   eval "ac_cv_header_$ac_safe=no"
8673 fi
8674 rm -f conftest*
8675 fi
8676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8677   echo "$ac_t""yes" 1>&6
8678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8679   cat >> confdefs.h <<EOF
8680 #define $ac_tr_hdr 1
8681 EOF
8682  
8683 else
8684   echo "$ac_t""no" 1>&6
8685 fi
8686 done
8687
8688
8689         if test $ac_cv_header_readline_readline_h = yes ; then
8690                 save_LIBS="$LIBS"
8691                 LIBS="$TERMCAP_LIBS $LIBS"
8692                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8693 echo "configure:8694: checking for readline in -lreadline" >&5
8694 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8695 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8696   echo $ac_n "(cached) $ac_c" 1>&6
8697 else
8698   ac_save_LIBS="$LIBS"
8699 LIBS="-lreadline  $LIBS"
8700 cat > conftest.$ac_ext <<EOF
8701 #line 8702 "configure"
8702 #include "confdefs.h"
8703 /* Override any gcc2 internal prototype to avoid an error.  */
8704 /* We use char because int might match the return type of a gcc2
8705     builtin and then its argument prototype would still apply.  */
8706 char readline();
8707
8708 int main() {
8709 readline()
8710 ; return 0; }
8711 EOF
8712 if { (eval echo configure:8713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8713   rm -rf conftest*
8714   eval "ac_cv_lib_$ac_lib_var=yes"
8715 else
8716   echo "configure: failed program was:" >&5
8717   cat conftest.$ac_ext >&5
8718   rm -rf conftest*
8719   eval "ac_cv_lib_$ac_lib_var=no"
8720 fi
8721 rm -f conftest*
8722 LIBS="$ac_save_LIBS"
8723
8724 fi
8725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8726   echo "$ac_t""yes" 1>&6
8727   have_readline=yes
8728 else
8729   echo "$ac_t""no" 1>&6
8730 have_readline=no
8731 fi
8732
8733                 LIBS="$save_LIBS"
8734                         
8735                 if test $have_readline = yes ; then
8736                         ol_with_readline=found
8737                         ol_link_readline=yes
8738
8739                         READLINE_LIBS="-lreadline"
8740                 fi
8741         fi
8742 fi
8743
8744 if test $ol_link_readline = yes ; then
8745         cat >> confdefs.h <<\EOF
8746 #define HAVE_READLINE 1
8747 EOF
8748
8749 fi
8750
8751
8752 # FreeBSD (and others) have crypt(3) in -lcrypt
8753 if test $ol_enable_crypt != no ; then
8754         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8755 echo "configure:8756: checking for crypt" >&5
8756 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8757   echo $ac_n "(cached) $ac_c" 1>&6
8758 else
8759   cat > conftest.$ac_ext <<EOF
8760 #line 8761 "configure"
8761 #include "confdefs.h"
8762 /* System header to define __stub macros and hopefully few prototypes,
8763     which can conflict with char crypt(); below.  */
8764 #include <assert.h>
8765 /* Override any gcc2 internal prototype to avoid an error.  */
8766 /* We use char because int might match the return type of a gcc2
8767     builtin and then its argument prototype would still apply.  */
8768 char crypt();
8769
8770 int main() {
8771
8772 /* The GNU C library defines this for functions which it implements
8773     to always fail with ENOSYS.  Some functions are actually named
8774     something starting with __ and the normal name is an alias.  */
8775 #if defined (__stub_crypt) || defined (__stub___crypt)
8776 choke me
8777 #else
8778 crypt();
8779 #endif
8780
8781 ; return 0; }
8782 EOF
8783 if { (eval echo configure:8784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8784   rm -rf conftest*
8785   eval "ac_cv_func_crypt=yes"
8786 else
8787   echo "configure: failed program was:" >&5
8788   cat conftest.$ac_ext >&5
8789   rm -rf conftest*
8790   eval "ac_cv_func_crypt=no"
8791 fi
8792 rm -f conftest*
8793 fi
8794
8795 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8796   echo "$ac_t""yes" 1>&6
8797   have_crypt=yes
8798 else
8799   echo "$ac_t""no" 1>&6
8800
8801                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8802 echo "configure:8803: checking for crypt in -lcrypt" >&5
8803 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8804 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8805   echo $ac_n "(cached) $ac_c" 1>&6
8806 else
8807   ac_save_LIBS="$LIBS"
8808 LIBS="-lcrypt  $LIBS"
8809 cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 /* Override any gcc2 internal prototype to avoid an error.  */
8813 /* We use char because int might match the return type of a gcc2
8814     builtin and then its argument prototype would still apply.  */
8815 char crypt();
8816
8817 int main() {
8818 crypt()
8819 ; return 0; }
8820 EOF
8821 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8822   rm -rf conftest*
8823   eval "ac_cv_lib_$ac_lib_var=yes"
8824 else
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   eval "ac_cv_lib_$ac_lib_var=no"
8829 fi
8830 rm -f conftest*
8831 LIBS="$ac_save_LIBS"
8832
8833 fi
8834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8835   echo "$ac_t""yes" 1>&6
8836   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8837                         have_crypt=yes
8838 else
8839   echo "$ac_t""no" 1>&6
8840 have_crypt=no
8841 fi
8842
8843 fi
8844
8845
8846         if test $have_crypt = yes ; then
8847                 cat >> confdefs.h <<\EOF
8848 #define HAVE_CRYPT 1
8849 EOF
8850
8851         else
8852                 echo "configure: warning: could not find crypt" 1>&2
8853                 if test $ol_enable_crypt = yes ; then
8854                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8855                 fi
8856
8857                 echo "configure: warning: disabling crypt support" 1>&2
8858                 ol_enable_crypt=no
8859         fi
8860 fi
8861
8862 # FreeBSD (and others) have setproctitle(3) in -lutil
8863 if test $ol_enable_proctitle != no ; then
8864         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8865 echo "configure:8866: checking for setproctitle" >&5
8866 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8867   echo $ac_n "(cached) $ac_c" 1>&6
8868 else
8869   cat > conftest.$ac_ext <<EOF
8870 #line 8871 "configure"
8871 #include "confdefs.h"
8872 /* System header to define __stub macros and hopefully few prototypes,
8873     which can conflict with char setproctitle(); below.  */
8874 #include <assert.h>
8875 /* Override any gcc2 internal prototype to avoid an error.  */
8876 /* We use char because int might match the return type of a gcc2
8877     builtin and then its argument prototype would still apply.  */
8878 char setproctitle();
8879
8880 int main() {
8881
8882 /* The GNU C library defines this for functions which it implements
8883     to always fail with ENOSYS.  Some functions are actually named
8884     something starting with __ and the normal name is an alias.  */
8885 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8886 choke me
8887 #else
8888 setproctitle();
8889 #endif
8890
8891 ; return 0; }
8892 EOF
8893 if { (eval echo configure:8894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8894   rm -rf conftest*
8895   eval "ac_cv_func_setproctitle=yes"
8896 else
8897   echo "configure: failed program was:" >&5
8898   cat conftest.$ac_ext >&5
8899   rm -rf conftest*
8900   eval "ac_cv_func_setproctitle=no"
8901 fi
8902 rm -f conftest*
8903 fi
8904
8905 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8906   echo "$ac_t""yes" 1>&6
8907   have_setproctitle=yes
8908 else
8909   echo "$ac_t""no" 1>&6
8910
8911                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8912 echo "configure:8913: checking for setproctitle in -lutil" >&5
8913 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8914 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8915   echo $ac_n "(cached) $ac_c" 1>&6
8916 else
8917   ac_save_LIBS="$LIBS"
8918 LIBS="-lutil  $LIBS"
8919 cat > conftest.$ac_ext <<EOF
8920 #line 8921 "configure"
8921 #include "confdefs.h"
8922 /* Override any gcc2 internal prototype to avoid an error.  */
8923 /* We use char because int might match the return type of a gcc2
8924     builtin and then its argument prototype would still apply.  */
8925 char setproctitle();
8926
8927 int main() {
8928 setproctitle()
8929 ; return 0; }
8930 EOF
8931 if { (eval echo configure:8932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8932   rm -rf conftest*
8933   eval "ac_cv_lib_$ac_lib_var=yes"
8934 else
8935   echo "configure: failed program was:" >&5
8936   cat conftest.$ac_ext >&5
8937   rm -rf conftest*
8938   eval "ac_cv_lib_$ac_lib_var=no"
8939 fi
8940 rm -f conftest*
8941 LIBS="$ac_save_LIBS"
8942
8943 fi
8944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8945   echo "$ac_t""yes" 1>&6
8946   have_setproctitle=yes
8947                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8948 else
8949   echo "$ac_t""no" 1>&6
8950 have_setproctitle=no
8951                         LIBOBJS="$LIBOBJS setproctitle.o"
8952 fi
8953
8954 fi
8955
8956
8957         if test $have_setproctitle = yes ; then
8958                 cat >> confdefs.h <<\EOF
8959 #define HAVE_SETPROCTITLE 1
8960 EOF
8961
8962         fi
8963 fi
8964
8965 # test for EBCDIC
8966 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8967 echo "configure:8968: checking for EBCDIC" >&5
8968 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
8969   echo $ac_n "(cached) $ac_c" 1>&6
8970 else
8971   
8972         cat > conftest.$ac_ext <<EOF
8973 #line 8974 "configure"
8974 #include "confdefs.h"
8975
8976 #if !('M' == 0xd4)
8977 #include <__ASCII__/generate_error.h>
8978 #endif
8979
8980 EOF
8981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8982 { (eval echo configure:8983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8984 if test -z "$ac_err"; then
8985   rm -rf conftest*
8986   ol_cv_cpp_ebcdic=yes
8987 else
8988   echo "$ac_err" >&5
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   ol_cv_cpp_ebcdic=no
8993 fi
8994 rm -f conftest*
8995 fi
8996
8997 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8998 if test $ol_cv_cpp_ebcdic = yes ; then
8999         cat >> confdefs.h <<\EOF
9000 #define HAVE_EBCDIC 1
9001 EOF
9002
9003 fi
9004
9005 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9006 echo "configure:9007: checking for ANSI C header files" >&5
9007 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9008   echo $ac_n "(cached) $ac_c" 1>&6
9009 else
9010   cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013 #include <stdlib.h>
9014 #include <stdarg.h>
9015 #include <string.h>
9016 #include <float.h>
9017 EOF
9018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9019 { (eval echo configure:9020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9021 if test -z "$ac_err"; then
9022   rm -rf conftest*
9023   ol_cv_header_stdc=yes
9024 else
9025   echo "$ac_err" >&5
9026   echo "configure: failed program was:" >&5
9027   cat conftest.$ac_ext >&5
9028   rm -rf conftest*
9029   ol_cv_header_stdc=no
9030 fi
9031 rm -f conftest*
9032
9033 if test $ol_cv_header_stdc = yes; then
9034   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9035 cat > conftest.$ac_ext <<EOF
9036 #line 9037 "configure"
9037 #include "confdefs.h"
9038 #include <string.h>
9039 EOF
9040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9041   egrep "memchr" >/dev/null 2>&1; then
9042   :
9043 else
9044   rm -rf conftest*
9045   ol_cv_header_stdc=no
9046 fi
9047 rm -f conftest*
9048
9049 fi
9050
9051 if test $ol_cv_header_stdc = yes; then
9052   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9053 cat > conftest.$ac_ext <<EOF
9054 #line 9055 "configure"
9055 #include "confdefs.h"
9056 #include <stdlib.h>
9057 EOF
9058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9059   egrep "free" >/dev/null 2>&1; then
9060   :
9061 else
9062   rm -rf conftest*
9063   ol_cv_header_stdc=no
9064 fi
9065 rm -f conftest*
9066
9067 fi
9068
9069 if test $ol_cv_header_stdc = yes; then
9070   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9071 if test "$cross_compiling" = yes; then
9072   :
9073 else
9074   cat > conftest.$ac_ext <<EOF
9075 #line 9076 "configure"
9076 #include "confdefs.h"
9077 #include <ctype.h>
9078 #ifndef HAVE_EBCDIC
9079 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9080 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9081 #else
9082 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9083                 || ('j' <= (c) && (c) <= 'r') \
9084                 || ('s' <= (c) && (c) <= 'z'))
9085 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9086 #endif
9087 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9088 int main () { int i; for (i = 0; i < 256; i++)
9089 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9090 exit (0); }
9091
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9094 then
9095   :
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -fr conftest*
9100   ol_cv_header_stdc=no
9101 fi
9102 rm -fr conftest*
9103 fi
9104
9105 fi
9106 fi
9107
9108 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9109 if test $ol_cv_header_stdc = yes; then
9110   cat >> confdefs.h <<\EOF
9111 #define STDC_HEADERS 1
9112 EOF
9113
9114 fi
9115 ac_cv_header_stdc=disable
9116
9117
9118 if test $ol_cv_header_stdc != yes; then
9119         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9120 fi
9121
9122 ac_header_dirent=no
9123 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9124 do
9125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9126 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9127 echo "configure:9128: checking for $ac_hdr that defines DIR" >&5
9128 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9129   echo $ac_n "(cached) $ac_c" 1>&6
9130 else
9131   cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134 #include <sys/types.h>
9135 #include <$ac_hdr>
9136 int main() {
9137 DIR *dirp = 0;
9138 ; return 0; }
9139 EOF
9140 if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9141   rm -rf conftest*
9142   eval "ac_cv_header_dirent_$ac_safe=yes"
9143 else
9144   echo "configure: failed program was:" >&5
9145   cat conftest.$ac_ext >&5
9146   rm -rf conftest*
9147   eval "ac_cv_header_dirent_$ac_safe=no"
9148 fi
9149 rm -f conftest*
9150 fi
9151 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9152   echo "$ac_t""yes" 1>&6
9153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9154   cat >> confdefs.h <<EOF
9155 #define $ac_tr_hdr 1
9156 EOF
9157  ac_header_dirent=$ac_hdr; break
9158 else
9159   echo "$ac_t""no" 1>&6
9160 fi
9161 done
9162 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9163 if test $ac_header_dirent = dirent.h; then
9164 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9165 echo "configure:9166: checking for opendir in -ldir" >&5
9166 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9167 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9168   echo $ac_n "(cached) $ac_c" 1>&6
9169 else
9170   ac_save_LIBS="$LIBS"
9171 LIBS="-ldir  $LIBS"
9172 cat > conftest.$ac_ext <<EOF
9173 #line 9174 "configure"
9174 #include "confdefs.h"
9175 /* Override any gcc2 internal prototype to avoid an error.  */
9176 /* We use char because int might match the return type of a gcc2
9177     builtin and then its argument prototype would still apply.  */
9178 char opendir();
9179
9180 int main() {
9181 opendir()
9182 ; return 0; }
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9185   rm -rf conftest*
9186   eval "ac_cv_lib_$ac_lib_var=yes"
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -rf conftest*
9191   eval "ac_cv_lib_$ac_lib_var=no"
9192 fi
9193 rm -f conftest*
9194 LIBS="$ac_save_LIBS"
9195
9196 fi
9197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9198   echo "$ac_t""yes" 1>&6
9199   LIBS="$LIBS -ldir"
9200 else
9201   echo "$ac_t""no" 1>&6
9202 fi
9203
9204 else
9205 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9206 echo "configure:9207: checking for opendir in -lx" >&5
9207 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9209   echo $ac_n "(cached) $ac_c" 1>&6
9210 else
9211   ac_save_LIBS="$LIBS"
9212 LIBS="-lx  $LIBS"
9213 cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 /* Override any gcc2 internal prototype to avoid an error.  */
9217 /* We use char because int might match the return type of a gcc2
9218     builtin and then its argument prototype would still apply.  */
9219 char opendir();
9220
9221 int main() {
9222 opendir()
9223 ; return 0; }
9224 EOF
9225 if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9226   rm -rf conftest*
9227   eval "ac_cv_lib_$ac_lib_var=yes"
9228 else
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -rf conftest*
9232   eval "ac_cv_lib_$ac_lib_var=no"
9233 fi
9234 rm -f conftest*
9235 LIBS="$ac_save_LIBS"
9236
9237 fi
9238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9239   echo "$ac_t""yes" 1>&6
9240   LIBS="$LIBS -lx"
9241 else
9242   echo "$ac_t""no" 1>&6
9243 fi
9244
9245 fi
9246
9247 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9248 echo "configure:9249: checking for sys/wait.h that is POSIX.1 compatible" >&5
9249 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9250   echo $ac_n "(cached) $ac_c" 1>&6
9251 else
9252   cat > conftest.$ac_ext <<EOF
9253 #line 9254 "configure"
9254 #include "confdefs.h"
9255 #include <sys/types.h>
9256 #include <sys/wait.h>
9257 #ifndef WEXITSTATUS
9258 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9259 #endif
9260 #ifndef WIFEXITED
9261 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9262 #endif
9263 int main() {
9264 int s;
9265 wait (&s);
9266 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9267 ; return 0; }
9268 EOF
9269 if { (eval echo configure:9270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9270   rm -rf conftest*
9271   ac_cv_header_sys_wait_h=yes
9272 else
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -rf conftest*
9276   ac_cv_header_sys_wait_h=no
9277 fi
9278 rm -f conftest*
9279 fi
9280
9281 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9282 if test $ac_cv_header_sys_wait_h = yes; then
9283   cat >> confdefs.h <<\EOF
9284 #define HAVE_SYS_WAIT_H 1
9285 EOF
9286
9287 fi
9288
9289 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9290 echo "configure:9291: checking POSIX termios" >&5
9291 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9292   echo $ac_n "(cached) $ac_c" 1>&6
9293 else
9294   cat > conftest.$ac_ext <<EOF
9295 #line 9296 "configure"
9296 #include "confdefs.h"
9297 #include <sys/types.h>
9298 #include <unistd.h>
9299 #include <termios.h>
9300 int main() {
9301 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9302    tcgetattr(0, 0);
9303 ; return 0; }
9304 EOF
9305 if { (eval echo configure:9306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9306   rm -rf conftest*
9307   am_cv_sys_posix_termios=yes
9308 else
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   am_cv_sys_posix_termios=no
9313 fi
9314 rm -f conftest*
9315 fi
9316
9317 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9318
9319
9320  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9321 echo "configure:9322: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9322 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9323   echo $ac_n "(cached) $ac_c" 1>&6
9324 else
9325   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9326
9327   gwinsz_in_termios_h=no
9328   if test $am_cv_sys_posix_termios = yes; then
9329     cat > conftest.$ac_ext <<EOF
9330 #line 9331 "configure"
9331 #include "confdefs.h"
9332 #include <sys/types.h>
9333 #     include <termios.h>
9334 #     ifdef TIOCGWINSZ
9335         yes
9336 #     endif
9337     
9338 EOF
9339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9340   egrep "yes" >/dev/null 2>&1; then
9341   rm -rf conftest*
9342   gwinsz_in_termios_h=yes
9343 fi
9344 rm -f conftest*
9345
9346   fi
9347
9348   if test $gwinsz_in_termios_h = no; then
9349     cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352 #include <sys/types.h>
9353 #     include <sys/ioctl.h>
9354 #     ifdef TIOCGWINSZ
9355         yes
9356 #     endif
9357     
9358 EOF
9359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9360   egrep "yes" >/dev/null 2>&1; then
9361   rm -rf conftest*
9362   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9363 fi
9364 rm -f conftest*
9365
9366   fi
9367   
9368 fi
9369
9370 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9371   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9372     cat >> confdefs.h <<\EOF
9373 #define GWINSZ_IN_SYS_IOCTL 1
9374 EOF
9375
9376   fi
9377
9378 if test $am_cv_sys_posix_termios = yes ; then
9379         cat >> confdefs.h <<\EOF
9380 #define HAVE_POSIX_TERMIOS 1
9381 EOF
9382
9383 fi
9384
9385 for ac_hdr in \
9386         arpa/inet.h             \
9387         arpa/nameser.h  \
9388         assert.h                \
9389         crypt.h                 \
9390         errno.h                 \
9391         fcntl.h                 \
9392         filio.h                 \
9393         getopt.h                \
9394         grp.h                   \
9395         libutil.h               \
9396         limits.h                \
9397         locale.h                \
9398         malloc.h                \
9399         memory.h                \
9400         regex.h                 \
9401         psap.h                  \
9402         pwd.h                   \
9403         resolv.h                \
9404         sgtty.h                 \
9405         stdarg.h                \
9406         stddef.h                \
9407         string.h                \
9408         strings.h               \
9409         sysexits.h              \
9410         sys/file.h              \
9411         sys/filio.h             \
9412         sys/errno.h             \
9413         sys/ioctl.h             \
9414         sys/param.h             \
9415         sys/resource.h  \
9416         sys/socket.h    \
9417         sys/syslog.h    \
9418         sys/time.h              \
9419         sys/types.h             \
9420         syslog.h                \
9421         termios.h               \
9422         unistd.h                \
9423
9424 do
9425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9427 echo "configure:9428: checking for $ac_hdr" >&5
9428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9429   echo $ac_n "(cached) $ac_c" 1>&6
9430 else
9431   cat > conftest.$ac_ext <<EOF
9432 #line 9433 "configure"
9433 #include "confdefs.h"
9434 #include <$ac_hdr>
9435 EOF
9436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9437 { (eval echo configure:9438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9439 if test -z "$ac_err"; then
9440   rm -rf conftest*
9441   eval "ac_cv_header_$ac_safe=yes"
9442 else
9443   echo "$ac_err" >&5
9444   echo "configure: failed program was:" >&5
9445   cat conftest.$ac_ext >&5
9446   rm -rf conftest*
9447   eval "ac_cv_header_$ac_safe=no"
9448 fi
9449 rm -f conftest*
9450 fi
9451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9452   echo "$ac_t""yes" 1>&6
9453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9454   cat >> confdefs.h <<EOF
9455 #define $ac_tr_hdr 1
9456 EOF
9457  
9458 else
9459   echo "$ac_t""no" 1>&6
9460 fi
9461 done
9462
9463
9464 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9465 echo "configure:9466: checking for uid_t in sys/types.h" >&5
9466 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469   cat > conftest.$ac_ext <<EOF
9470 #line 9471 "configure"
9471 #include "confdefs.h"
9472 #include <sys/types.h>
9473 EOF
9474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9475   egrep "uid_t" >/dev/null 2>&1; then
9476   rm -rf conftest*
9477   ac_cv_type_uid_t=yes
9478 else
9479   rm -rf conftest*
9480   ac_cv_type_uid_t=no
9481 fi
9482 rm -f conftest*
9483
9484 fi
9485
9486 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9487 if test $ac_cv_type_uid_t = no; then
9488   cat >> confdefs.h <<\EOF
9489 #define uid_t int
9490 EOF
9491
9492   cat >> confdefs.h <<\EOF
9493 #define gid_t int
9494 EOF
9495
9496 fi
9497
9498 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9499 echo "configure:9500: checking type of array argument to getgroups" >&5
9500 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9501   echo $ac_n "(cached) $ac_c" 1>&6
9502 else
9503   if test "$cross_compiling" = yes; then
9504   ac_cv_type_getgroups=cross
9505 else
9506   cat > conftest.$ac_ext <<EOF
9507 #line 9508 "configure"
9508 #include "confdefs.h"
9509
9510 /* Thanks to Mike Rendell for this test.  */
9511 #include <sys/types.h>
9512 #define NGID 256
9513 #undef MAX
9514 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9515 main()
9516 {
9517   gid_t gidset[NGID];
9518   int i, n;
9519   union { gid_t gval; long lval; }  val;
9520
9521   val.lval = -1;
9522   for (i = 0; i < NGID; i++)
9523     gidset[i] = val.gval;
9524   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9525                  gidset);
9526   /* Exit non-zero if getgroups seems to require an array of ints.  This
9527      happens when gid_t is short but getgroups modifies an array of ints.  */
9528   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9529 }
9530
9531 EOF
9532 if { (eval echo configure:9533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9533 then
9534     ac_cv_type_getgroups=gid_t
9535 else
9536   echo "configure: failed program was:" >&5
9537   cat conftest.$ac_ext >&5
9538   rm -fr conftest*
9539   ac_cv_type_getgroups=int
9540 fi
9541 rm -fr conftest*
9542 fi
9543
9544 if test $ac_cv_type_getgroups = cross; then
9545         cat > conftest.$ac_ext <<EOF
9546 #line 9547 "configure"
9547 #include "confdefs.h"
9548 #include <unistd.h>
9549 EOF
9550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9551   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9552   rm -rf conftest*
9553   ac_cv_type_getgroups=gid_t
9554 else
9555   rm -rf conftest*
9556   ac_cv_type_getgroups=int
9557 fi
9558 rm -f conftest*
9559
9560 fi
9561 fi
9562
9563 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9564 cat >> confdefs.h <<EOF
9565 #define GETGROUPS_T $ac_cv_type_getgroups
9566 EOF
9567
9568  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9569 echo "configure:9570: checking for ANSI C header files" >&5
9570 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9571   echo $ac_n "(cached) $ac_c" 1>&6
9572 else
9573   cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9576 #include <stdlib.h>
9577 #include <stdarg.h>
9578 #include <string.h>
9579 #include <float.h>
9580 EOF
9581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9582 { (eval echo configure:9583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9584 if test -z "$ac_err"; then
9585   rm -rf conftest*
9586   ac_cv_header_stdc=yes
9587 else
9588   echo "$ac_err" >&5
9589   echo "configure: failed program was:" >&5
9590   cat conftest.$ac_ext >&5
9591   rm -rf conftest*
9592   ac_cv_header_stdc=no
9593 fi
9594 rm -f conftest*
9595
9596 if test $ac_cv_header_stdc = yes; then
9597   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9598 cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 #include <string.h>
9602 EOF
9603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9604   egrep "memchr" >/dev/null 2>&1; then
9605   :
9606 else
9607   rm -rf conftest*
9608   ac_cv_header_stdc=no
9609 fi
9610 rm -f conftest*
9611
9612 fi
9613
9614 if test $ac_cv_header_stdc = yes; then
9615   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9616 cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 #include <stdlib.h>
9620 EOF
9621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9622   egrep "free" >/dev/null 2>&1; then
9623   :
9624 else
9625   rm -rf conftest*
9626   ac_cv_header_stdc=no
9627 fi
9628 rm -f conftest*
9629
9630 fi
9631
9632 if test $ac_cv_header_stdc = yes; then
9633   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9634 if test "$cross_compiling" = yes; then
9635   :
9636 else
9637   cat > conftest.$ac_ext <<EOF
9638 #line 9639 "configure"
9639 #include "confdefs.h"
9640 #include <ctype.h>
9641 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9642 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9643 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9644 int main () { int i; for (i = 0; i < 256; i++)
9645 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9646 exit (0); }
9647
9648 EOF
9649 if { (eval echo configure:9650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9650 then
9651   :
9652 else
9653   echo "configure: failed program was:" >&5
9654   cat conftest.$ac_ext >&5
9655   rm -fr conftest*
9656   ac_cv_header_stdc=no
9657 fi
9658 rm -fr conftest*
9659 fi
9660
9661 fi
9662 fi
9663
9664 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9665 if test $ac_cv_header_stdc = yes; then
9666   cat >> confdefs.h <<\EOF
9667 #define STDC_HEADERS 1
9668 EOF
9669
9670 fi
9671
9672 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9673 echo "configure:9674: checking for mode_t" >&5
9674 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9675   echo $ac_n "(cached) $ac_c" 1>&6
9676 else
9677   cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 #include <sys/types.h>
9681 #if STDC_HEADERS
9682 #include <stdlib.h>
9683 #include <stddef.h>
9684 #endif
9685 EOF
9686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9687   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9688   rm -rf conftest*
9689   ac_cv_type_mode_t=yes
9690 else
9691   rm -rf conftest*
9692   ac_cv_type_mode_t=no
9693 fi
9694 rm -f conftest*
9695
9696 fi
9697 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9698 if test $ac_cv_type_mode_t = no; then
9699   cat >> confdefs.h <<\EOF
9700 #define mode_t int
9701 EOF
9702
9703 fi
9704
9705 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9706 echo "configure:9707: checking for off_t" >&5
9707 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9708   echo $ac_n "(cached) $ac_c" 1>&6
9709 else
9710   cat > conftest.$ac_ext <<EOF
9711 #line 9712 "configure"
9712 #include "confdefs.h"
9713 #include <sys/types.h>
9714 #if STDC_HEADERS
9715 #include <stdlib.h>
9716 #include <stddef.h>
9717 #endif
9718 EOF
9719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9720   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9721   rm -rf conftest*
9722   ac_cv_type_off_t=yes
9723 else
9724   rm -rf conftest*
9725   ac_cv_type_off_t=no
9726 fi
9727 rm -f conftest*
9728
9729 fi
9730 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9731 if test $ac_cv_type_off_t = no; then
9732   cat >> confdefs.h <<\EOF
9733 #define off_t long
9734 EOF
9735
9736 fi
9737
9738 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9739 echo "configure:9740: checking for pid_t" >&5
9740 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9741   echo $ac_n "(cached) $ac_c" 1>&6
9742 else
9743   cat > conftest.$ac_ext <<EOF
9744 #line 9745 "configure"
9745 #include "confdefs.h"
9746 #include <sys/types.h>
9747 #if STDC_HEADERS
9748 #include <stdlib.h>
9749 #include <stddef.h>
9750 #endif
9751 EOF
9752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9753   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9754   rm -rf conftest*
9755   ac_cv_type_pid_t=yes
9756 else
9757   rm -rf conftest*
9758   ac_cv_type_pid_t=no
9759 fi
9760 rm -f conftest*
9761
9762 fi
9763 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9764 if test $ac_cv_type_pid_t = no; then
9765   cat >> confdefs.h <<\EOF
9766 #define pid_t int
9767 EOF
9768
9769 fi
9770
9771 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9772 echo "configure:9773: checking for ptrdiff_t" >&5
9773 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9774   echo $ac_n "(cached) $ac_c" 1>&6
9775 else
9776   cat > conftest.$ac_ext <<EOF
9777 #line 9778 "configure"
9778 #include "confdefs.h"
9779 #include <stddef.h>
9780 int main() {
9781 ptrdiff_t p
9782 ; return 0; }
9783 EOF
9784 if { (eval echo configure:9785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9785   rm -rf conftest*
9786   am_cv_type_ptrdiff_t=yes
9787 else
9788   echo "configure: failed program was:" >&5
9789   cat conftest.$ac_ext >&5
9790   rm -rf conftest*
9791   am_cv_type_ptrdiff_t=no
9792 fi
9793 rm -f conftest*
9794 fi
9795
9796 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9797    if test $am_cv_type_ptrdiff_t = yes; then
9798      cat >> confdefs.h <<\EOF
9799 #define HAVE_PTRDIFF_T 1
9800 EOF
9801
9802    fi
9803
9804 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9805 echo "configure:9806: checking return type of signal handlers" >&5
9806 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9807   echo $ac_n "(cached) $ac_c" 1>&6
9808 else
9809   cat > conftest.$ac_ext <<EOF
9810 #line 9811 "configure"
9811 #include "confdefs.h"
9812 #include <sys/types.h>
9813 #include <signal.h>
9814 #ifdef signal
9815 #undef signal
9816 #endif
9817 #ifdef __cplusplus
9818 extern "C" void (*signal (int, void (*)(int)))(int);
9819 #else
9820 void (*signal ()) ();
9821 #endif
9822
9823 int main() {
9824 int i;
9825 ; return 0; }
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9828   rm -rf conftest*
9829   ac_cv_type_signal=void
9830 else
9831   echo "configure: failed program was:" >&5
9832   cat conftest.$ac_ext >&5
9833   rm -rf conftest*
9834   ac_cv_type_signal=int
9835 fi
9836 rm -f conftest*
9837 fi
9838
9839 echo "$ac_t""$ac_cv_type_signal" 1>&6
9840 cat >> confdefs.h <<EOF
9841 #define RETSIGTYPE $ac_cv_type_signal
9842 EOF
9843
9844
9845 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9846 echo "configure:9847: checking for sig_atomic_t" >&5
9847 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9848   echo $ac_n "(cached) $ac_c" 1>&6
9849 else
9850   cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 #include <signal.h>
9854 int main() {
9855 sig_atomic_t atomic;
9856 ; return 0; }
9857 EOF
9858 if { (eval echo configure:9859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9859   rm -rf conftest*
9860   ol_cv_type_sig_atomic_t=yes
9861 else
9862   echo "configure: failed program was:" >&5
9863   cat conftest.$ac_ext >&5
9864   rm -rf conftest*
9865   ol_cv_type_sig_atomic_t=no
9866 fi
9867 rm -f conftest*
9868 fi
9869
9870 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9871   if test $ol_cv_type_sig_atomic_t = no; then
9872     cat >> confdefs.h <<\EOF
9873 #define sig_atomic_t int
9874 EOF
9875
9876   fi
9877  
9878 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9879 echo "configure:9880: checking for size_t" >&5
9880 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9881   echo $ac_n "(cached) $ac_c" 1>&6
9882 else
9883   cat > conftest.$ac_ext <<EOF
9884 #line 9885 "configure"
9885 #include "confdefs.h"
9886 #include <sys/types.h>
9887 #if STDC_HEADERS
9888 #include <stdlib.h>
9889 #include <stddef.h>
9890 #endif
9891 EOF
9892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9893   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9894   rm -rf conftest*
9895   ac_cv_type_size_t=yes
9896 else
9897   rm -rf conftest*
9898   ac_cv_type_size_t=no
9899 fi
9900 rm -f conftest*
9901
9902 fi
9903 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9904 if test $ac_cv_type_size_t = no; then
9905   cat >> confdefs.h <<\EOF
9906 #define size_t unsigned
9907 EOF
9908
9909 fi
9910
9911 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9912 echo "configure:9913: checking for st_blksize in struct stat" >&5
9913 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9914   echo $ac_n "(cached) $ac_c" 1>&6
9915 else
9916   cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919 #include <sys/types.h>
9920 #include <sys/stat.h>
9921 int main() {
9922 struct stat s; s.st_blksize;
9923 ; return 0; }
9924 EOF
9925 if { (eval echo configure:9926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9926   rm -rf conftest*
9927   ac_cv_struct_st_blksize=yes
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931   rm -rf conftest*
9932   ac_cv_struct_st_blksize=no
9933 fi
9934 rm -f conftest*
9935 fi
9936
9937 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9938 if test $ac_cv_struct_st_blksize = yes; then
9939   cat >> confdefs.h <<\EOF
9940 #define HAVE_ST_BLKSIZE 1
9941 EOF
9942
9943 fi
9944
9945 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9946 echo "configure:9947: checking whether time.h and sys/time.h may both be included" >&5
9947 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9948   echo $ac_n "(cached) $ac_c" 1>&6
9949 else
9950   cat > conftest.$ac_ext <<EOF
9951 #line 9952 "configure"
9952 #include "confdefs.h"
9953 #include <sys/types.h>
9954 #include <sys/time.h>
9955 #include <time.h>
9956 int main() {
9957 struct tm *tp;
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9961   rm -rf conftest*
9962   ac_cv_header_time=yes
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   ac_cv_header_time=no
9968 fi
9969 rm -f conftest*
9970 fi
9971
9972 echo "$ac_t""$ac_cv_header_time" 1>&6
9973 if test $ac_cv_header_time = yes; then
9974   cat >> confdefs.h <<\EOF
9975 #define TIME_WITH_SYS_TIME 1
9976 EOF
9977
9978 fi
9979
9980 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
9981 echo "configure:9982: checking whether struct tm is in sys/time.h or time.h" >&5
9982 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
9983   echo $ac_n "(cached) $ac_c" 1>&6
9984 else
9985   cat > conftest.$ac_ext <<EOF
9986 #line 9987 "configure"
9987 #include "confdefs.h"
9988 #include <sys/types.h>
9989 #include <time.h>
9990 int main() {
9991 struct tm *tp; tp->tm_sec;
9992 ; return 0; }
9993 EOF
9994 if { (eval echo configure:9995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9995   rm -rf conftest*
9996   ac_cv_struct_tm=time.h
9997 else
9998   echo "configure: failed program was:" >&5
9999   cat conftest.$ac_ext >&5
10000   rm -rf conftest*
10001   ac_cv_struct_tm=sys/time.h
10002 fi
10003 rm -f conftest*
10004 fi
10005
10006 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10007 if test $ac_cv_struct_tm = sys/time.h; then
10008   cat >> confdefs.h <<\EOF
10009 #define TM_IN_SYS_TIME 1
10010 EOF
10011
10012 fi
10013
10014 # test for pw_gecos in struct passwd
10015 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10016 echo "configure:10017: checking struct passwd for pw_gecos" >&5
10017 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10018   echo $ac_n "(cached) $ac_c" 1>&6
10019 else
10020   
10021         cat > conftest.$ac_ext <<EOF
10022 #line 10023 "configure"
10023 #include "confdefs.h"
10024 #include <pwd.h>
10025 int main() {
10026
10027         struct passwd pwd;
10028         pwd.pw_gecos = pwd.pw_name;
10029
10030 ; return 0; }
10031 EOF
10032 if { (eval echo configure:10033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10033   rm -rf conftest*
10034   ol_cv_struct_passwd_pw_gecos=yes
10035 else
10036   echo "configure: failed program was:" >&5
10037   cat conftest.$ac_ext >&5
10038   rm -rf conftest*
10039   ol_cv_struct_passwd_pw_gecos=no
10040 fi
10041 rm -f conftest*
10042 fi
10043
10044 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10045 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10046         cat >> confdefs.h <<\EOF
10047 #define HAVE_PW_GECOS 1
10048 EOF
10049
10050 fi
10051
10052
10053
10054 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10055 echo "configure:10056: checking if toupper() requires islower()" >&5
10056 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   
10060         if test "$cross_compiling" = yes; then
10061   ol_cv_c_upper_lower=safe
10062 else
10063   cat > conftest.$ac_ext <<EOF
10064 #line 10065 "configure"
10065 #include "confdefs.h"
10066
10067 #include <ctype.h>
10068 main()
10069 {
10070         if ('C' == toupper('C'))
10071                 exit(0);
10072         else
10073                 exit(1);
10074 }
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10077 then
10078   ol_cv_c_upper_lower=no
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -fr conftest*
10083   ol_cv_c_upper_lower=yes
10084 fi
10085 rm -fr conftest*
10086 fi
10087
10088 fi
10089
10090 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10091 if test $ol_cv_c_upper_lower != no ; then
10092         cat >> confdefs.h <<\EOF
10093 #define C_UPPER_LOWER 1
10094 EOF
10095
10096 fi
10097
10098 echo $ac_n "checking for working const""... $ac_c" 1>&6
10099 echo "configure:10100: checking for working const" >&5
10100 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10101   echo $ac_n "(cached) $ac_c" 1>&6
10102 else
10103   cat > conftest.$ac_ext <<EOF
10104 #line 10105 "configure"
10105 #include "confdefs.h"
10106
10107 int main() {
10108
10109 /* Ultrix mips cc rejects this.  */
10110 typedef int charset[2]; const charset x;
10111 /* SunOS 4.1.1 cc rejects this.  */
10112 char const *const *ccp;
10113 char **p;
10114 /* NEC SVR4.0.2 mips cc rejects this.  */
10115 struct point {int x, y;};
10116 static struct point const zero = {0,0};
10117 /* AIX XL C 1.02.0.0 rejects this.
10118    It does not let you subtract one const X* pointer from another in an arm
10119    of an if-expression whose if-part is not a constant expression */
10120 const char *g = "string";
10121 ccp = &g + (g ? g-g : 0);
10122 /* HPUX 7.0 cc rejects these. */
10123 ++ccp;
10124 p = (char**) ccp;
10125 ccp = (char const *const *) p;
10126 { /* SCO 3.2v4 cc rejects this.  */
10127   char *t;
10128   char const *s = 0 ? (char *) 0 : (char const *) 0;
10129
10130   *t++ = 0;
10131 }
10132 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10133   int x[] = {25, 17};
10134   const int *foo = &x[0];
10135   ++foo;
10136 }
10137 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10138   typedef const int *iptr;
10139   iptr p = 0;
10140   ++p;
10141 }
10142 { /* AIX XL C 1.02.0.0 rejects this saying
10143      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10144   struct s { int j; const int *ap[3]; };
10145   struct s *b; b->j = 5;
10146 }
10147 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10148   const int foo = 10;
10149 }
10150
10151 ; return 0; }
10152 EOF
10153 if { (eval echo configure:10154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10154   rm -rf conftest*
10155   ac_cv_c_const=yes
10156 else
10157   echo "configure: failed program was:" >&5
10158   cat conftest.$ac_ext >&5
10159   rm -rf conftest*
10160   ac_cv_c_const=no
10161 fi
10162 rm -f conftest*
10163 fi
10164
10165 echo "$ac_t""$ac_cv_c_const" 1>&6
10166 if test $ac_cv_c_const = no; then
10167   cat >> confdefs.h <<\EOF
10168 #define const 
10169 EOF
10170
10171 fi
10172
10173 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10174 echo "configure:10175: checking if compiler understands volatile" >&5
10175 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10176   echo $ac_n "(cached) $ac_c" 1>&6
10177 else
10178   cat > conftest.$ac_ext <<EOF
10179 #line 10180 "configure"
10180 #include "confdefs.h"
10181 int x, y, z;
10182 int main() {
10183 volatile int a; int * volatile b = x ? &y : &z;
10184       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10185       *b = 0;
10186 ; return 0; }
10187 EOF
10188 if { (eval echo configure:10189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10189   rm -rf conftest*
10190   ol_cv_c_volatile=yes
10191 else
10192   echo "configure: failed program was:" >&5
10193   cat conftest.$ac_ext >&5
10194   rm -rf conftest*
10195   ol_cv_c_volatile=no
10196 fi
10197 rm -f conftest*
10198 fi
10199
10200 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10201   if test $ol_cv_c_volatile = yes; then
10202     : 
10203   else
10204     cat >> confdefs.h <<\EOF
10205 #define volatile 
10206 EOF
10207
10208   fi
10209  
10210
10211 if test $cross_compiling = yes ; then
10212         cat >> confdefs.h <<\EOF
10213 #define CROSS_COMPILING 1
10214 EOF
10215
10216 else
10217         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10218 echo "configure:10219: checking whether byte ordering is bigendian" >&5
10219 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10220   echo $ac_n "(cached) $ac_c" 1>&6
10221 else
10222   ac_cv_c_bigendian=unknown
10223 # See if sys/param.h defines the BYTE_ORDER macro.
10224 cat > conftest.$ac_ext <<EOF
10225 #line 10226 "configure"
10226 #include "confdefs.h"
10227 #include <sys/types.h>
10228 #include <sys/param.h>
10229 int main() {
10230
10231 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10232  bogus endian macros
10233 #endif
10234 ; return 0; }
10235 EOF
10236 if { (eval echo configure:10237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10237   rm -rf conftest*
10238   # It does; now see whether it defined to BIG_ENDIAN or not.
10239 cat > conftest.$ac_ext <<EOF
10240 #line 10241 "configure"
10241 #include "confdefs.h"
10242 #include <sys/types.h>
10243 #include <sys/param.h>
10244 int main() {
10245
10246 #if BYTE_ORDER != BIG_ENDIAN
10247  not big endian
10248 #endif
10249 ; return 0; }
10250 EOF
10251 if { (eval echo configure:10252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10252   rm -rf conftest*
10253   ac_cv_c_bigendian=yes
10254 else
10255   echo "configure: failed program was:" >&5
10256   cat conftest.$ac_ext >&5
10257   rm -rf conftest*
10258   ac_cv_c_bigendian=no
10259 fi
10260 rm -f conftest*
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264 fi
10265 rm -f conftest*
10266 if test $ac_cv_c_bigendian = unknown; then
10267 if test "$cross_compiling" = yes; then
10268     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10269 else
10270   cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273 main () {
10274   /* Are we little or big endian?  From Harbison&Steele.  */
10275   union
10276   {
10277     long l;
10278     char c[sizeof (long)];
10279   } u;
10280   u.l = 1;
10281   exit (u.c[sizeof (long) - 1] == 1);
10282 }
10283 EOF
10284 if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10285 then
10286   ac_cv_c_bigendian=no
10287 else
10288   echo "configure: failed program was:" >&5
10289   cat conftest.$ac_ext >&5
10290   rm -fr conftest*
10291   ac_cv_c_bigendian=yes
10292 fi
10293 rm -fr conftest*
10294 fi
10295
10296 fi
10297 fi
10298
10299 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10300 if test $ac_cv_c_bigendian = yes; then
10301   cat >> confdefs.h <<\EOF
10302 #define WORDS_BIGENDIAN 1
10303 EOF
10304
10305 fi
10306
10307         echo $ac_n "checking size of short""... $ac_c" 1>&6
10308 echo "configure:10309: checking size of short" >&5
10309 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10310   echo $ac_n "(cached) $ac_c" 1>&6
10311 else
10312   if test "$cross_compiling" = yes; then
10313     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10314 else
10315   cat > conftest.$ac_ext <<EOF
10316 #line 10317 "configure"
10317 #include "confdefs.h"
10318 #include <stdio.h>
10319 main()
10320 {
10321   FILE *f=fopen("conftestval", "w");
10322   if (!f) exit(1);
10323   fprintf(f, "%d\n", sizeof(short));
10324   exit(0);
10325 }
10326 EOF
10327 if { (eval echo configure:10328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10328 then
10329   ac_cv_sizeof_short=`cat conftestval`
10330 else
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -fr conftest*
10334   ac_cv_sizeof_short=0
10335 fi
10336 rm -fr conftest*
10337 fi
10338
10339 fi
10340 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10341 cat >> confdefs.h <<EOF
10342 #define SIZEOF_SHORT $ac_cv_sizeof_short
10343 EOF
10344
10345  
10346         echo $ac_n "checking size of int""... $ac_c" 1>&6
10347 echo "configure:10348: checking size of int" >&5
10348 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10349   echo $ac_n "(cached) $ac_c" 1>&6
10350 else
10351   if test "$cross_compiling" = yes; then
10352     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10353 else
10354   cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357 #include <stdio.h>
10358 main()
10359 {
10360   FILE *f=fopen("conftestval", "w");
10361   if (!f) exit(1);
10362   fprintf(f, "%d\n", sizeof(int));
10363   exit(0);
10364 }
10365 EOF
10366 if { (eval echo configure:10367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10367 then
10368   ac_cv_sizeof_int=`cat conftestval`
10369 else
10370   echo "configure: failed program was:" >&5
10371   cat conftest.$ac_ext >&5
10372   rm -fr conftest*
10373   ac_cv_sizeof_int=0
10374 fi
10375 rm -fr conftest*
10376 fi
10377
10378 fi
10379 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
10380 cat >> confdefs.h <<EOF
10381 #define SIZEOF_INT $ac_cv_sizeof_int
10382 EOF
10383
10384  
10385         echo $ac_n "checking size of long""... $ac_c" 1>&6
10386 echo "configure:10387: checking size of long" >&5
10387 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
10388   echo $ac_n "(cached) $ac_c" 1>&6
10389 else
10390   if test "$cross_compiling" = yes; then
10391     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10392 else
10393   cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 #include <stdio.h>
10397 main()
10398 {
10399   FILE *f=fopen("conftestval", "w");
10400   if (!f) exit(1);
10401   fprintf(f, "%d\n", sizeof(long));
10402   exit(0);
10403 }
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10406 then
10407   ac_cv_sizeof_long=`cat conftestval`
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -fr conftest*
10412   ac_cv_sizeof_long=0
10413 fi
10414 rm -fr conftest*
10415 fi
10416
10417 fi
10418 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
10419 cat >> confdefs.h <<EOF
10420 #define SIZEOF_LONG $ac_cv_sizeof_long
10421 EOF
10422
10423
10424 fi
10425
10426 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
10427 echo "configure:10428: checking for 8-bit clean memcmp" >&5
10428 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   if test "$cross_compiling" = yes; then
10432   ac_cv_func_memcmp_clean=no
10433 else
10434   cat > conftest.$ac_ext <<EOF
10435 #line 10436 "configure"
10436 #include "confdefs.h"
10437
10438 main()
10439 {
10440   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10441   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
10442 }
10443
10444 EOF
10445 if { (eval echo configure:10446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10446 then
10447   ac_cv_func_memcmp_clean=yes
10448 else
10449   echo "configure: failed program was:" >&5
10450   cat conftest.$ac_ext >&5
10451   rm -fr conftest*
10452   ac_cv_func_memcmp_clean=no
10453 fi
10454 rm -fr conftest*
10455 fi
10456
10457 fi
10458
10459 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10460 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10461
10462 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10463 echo "configure:10464: checking for strftime" >&5
10464 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10465   echo $ac_n "(cached) $ac_c" 1>&6
10466 else
10467   cat > conftest.$ac_ext <<EOF
10468 #line 10469 "configure"
10469 #include "confdefs.h"
10470 /* System header to define __stub macros and hopefully few prototypes,
10471     which can conflict with char strftime(); below.  */
10472 #include <assert.h>
10473 /* Override any gcc2 internal prototype to avoid an error.  */
10474 /* We use char because int might match the return type of a gcc2
10475     builtin and then its argument prototype would still apply.  */
10476 char strftime();
10477
10478 int main() {
10479
10480 /* The GNU C library defines this for functions which it implements
10481     to always fail with ENOSYS.  Some functions are actually named
10482     something starting with __ and the normal name is an alias.  */
10483 #if defined (__stub_strftime) || defined (__stub___strftime)
10484 choke me
10485 #else
10486 strftime();
10487 #endif
10488
10489 ; return 0; }
10490 EOF
10491 if { (eval echo configure:10492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10492   rm -rf conftest*
10493   eval "ac_cv_func_strftime=yes"
10494 else
10495   echo "configure: failed program was:" >&5
10496   cat conftest.$ac_ext >&5
10497   rm -rf conftest*
10498   eval "ac_cv_func_strftime=no"
10499 fi
10500 rm -f conftest*
10501 fi
10502
10503 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10504   echo "$ac_t""yes" 1>&6
10505   cat >> confdefs.h <<\EOF
10506 #define HAVE_STRFTIME 1
10507 EOF
10508
10509 else
10510   echo "$ac_t""no" 1>&6
10511 # strftime is in -lintl on SCO UNIX.
10512 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10513 echo "configure:10514: checking for strftime in -lintl" >&5
10514 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10515 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10516   echo $ac_n "(cached) $ac_c" 1>&6
10517 else
10518   ac_save_LIBS="$LIBS"
10519 LIBS="-lintl  $LIBS"
10520 cat > conftest.$ac_ext <<EOF
10521 #line 10522 "configure"
10522 #include "confdefs.h"
10523 /* Override any gcc2 internal prototype to avoid an error.  */
10524 /* We use char because int might match the return type of a gcc2
10525     builtin and then its argument prototype would still apply.  */
10526 char strftime();
10527
10528 int main() {
10529 strftime()
10530 ; return 0; }
10531 EOF
10532 if { (eval echo configure:10533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10533   rm -rf conftest*
10534   eval "ac_cv_lib_$ac_lib_var=yes"
10535 else
10536   echo "configure: failed program was:" >&5
10537   cat conftest.$ac_ext >&5
10538   rm -rf conftest*
10539   eval "ac_cv_lib_$ac_lib_var=no"
10540 fi
10541 rm -f conftest*
10542 LIBS="$ac_save_LIBS"
10543
10544 fi
10545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10546   echo "$ac_t""yes" 1>&6
10547   cat >> confdefs.h <<\EOF
10548 #define HAVE_STRFTIME 1
10549 EOF
10550
10551 LIBS="-lintl $LIBS"
10552 else
10553   echo "$ac_t""no" 1>&6
10554 fi
10555
10556 fi
10557
10558 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10559 echo "configure:10560: checking for vprintf" >&5
10560 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10561   echo $ac_n "(cached) $ac_c" 1>&6
10562 else
10563   cat > conftest.$ac_ext <<EOF
10564 #line 10565 "configure"
10565 #include "confdefs.h"
10566 /* System header to define __stub macros and hopefully few prototypes,
10567     which can conflict with char vprintf(); below.  */
10568 #include <assert.h>
10569 /* Override any gcc2 internal prototype to avoid an error.  */
10570 /* We use char because int might match the return type of a gcc2
10571     builtin and then its argument prototype would still apply.  */
10572 char vprintf();
10573
10574 int main() {
10575
10576 /* The GNU C library defines this for functions which it implements
10577     to always fail with ENOSYS.  Some functions are actually named
10578     something starting with __ and the normal name is an alias.  */
10579 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10580 choke me
10581 #else
10582 vprintf();
10583 #endif
10584
10585 ; return 0; }
10586 EOF
10587 if { (eval echo configure:10588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10588   rm -rf conftest*
10589   eval "ac_cv_func_vprintf=yes"
10590 else
10591   echo "configure: failed program was:" >&5
10592   cat conftest.$ac_ext >&5
10593   rm -rf conftest*
10594   eval "ac_cv_func_vprintf=no"
10595 fi
10596 rm -f conftest*
10597 fi
10598
10599 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10600   echo "$ac_t""yes" 1>&6
10601   cat >> confdefs.h <<\EOF
10602 #define HAVE_VPRINTF 1
10603 EOF
10604
10605 else
10606   echo "$ac_t""no" 1>&6
10607 fi
10608
10609 if test "$ac_cv_func_vprintf" != yes; then
10610 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10611 echo "configure:10612: checking for _doprnt" >&5
10612 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10613   echo $ac_n "(cached) $ac_c" 1>&6
10614 else
10615   cat > conftest.$ac_ext <<EOF
10616 #line 10617 "configure"
10617 #include "confdefs.h"
10618 /* System header to define __stub macros and hopefully few prototypes,
10619     which can conflict with char _doprnt(); below.  */
10620 #include <assert.h>
10621 /* Override any gcc2 internal prototype to avoid an error.  */
10622 /* We use char because int might match the return type of a gcc2
10623     builtin and then its argument prototype would still apply.  */
10624 char _doprnt();
10625
10626 int main() {
10627
10628 /* The GNU C library defines this for functions which it implements
10629     to always fail with ENOSYS.  Some functions are actually named
10630     something starting with __ and the normal name is an alias.  */
10631 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10632 choke me
10633 #else
10634 _doprnt();
10635 #endif
10636
10637 ; return 0; }
10638 EOF
10639 if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10640   rm -rf conftest*
10641   eval "ac_cv_func__doprnt=yes"
10642 else
10643   echo "configure: failed program was:" >&5
10644   cat conftest.$ac_ext >&5
10645   rm -rf conftest*
10646   eval "ac_cv_func__doprnt=no"
10647 fi
10648 rm -f conftest*
10649 fi
10650
10651 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10652   echo "$ac_t""yes" 1>&6
10653   cat >> confdefs.h <<\EOF
10654 #define HAVE_DOPRNT 1
10655 EOF
10656
10657 else
10658   echo "$ac_t""no" 1>&6
10659 fi
10660
10661 fi
10662
10663
10664 if test $ac_cv_func_vprintf = yes ; then
10665                 for ac_func in vsnprintf vsprintf
10666 do
10667 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10668 echo "configure:10669: checking for $ac_func" >&5
10669 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10670   echo $ac_n "(cached) $ac_c" 1>&6
10671 else
10672   cat > conftest.$ac_ext <<EOF
10673 #line 10674 "configure"
10674 #include "confdefs.h"
10675 /* System header to define __stub macros and hopefully few prototypes,
10676     which can conflict with char $ac_func(); below.  */
10677 #include <assert.h>
10678 /* Override any gcc2 internal prototype to avoid an error.  */
10679 /* We use char because int might match the return type of a gcc2
10680     builtin and then its argument prototype would still apply.  */
10681 char $ac_func();
10682
10683 int main() {
10684
10685 /* The GNU C library defines this for functions which it implements
10686     to always fail with ENOSYS.  Some functions are actually named
10687     something starting with __ and the normal name is an alias.  */
10688 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10689 choke me
10690 #else
10691 $ac_func();
10692 #endif
10693
10694 ; return 0; }
10695 EOF
10696 if { (eval echo configure:10697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10697   rm -rf conftest*
10698   eval "ac_cv_func_$ac_func=yes"
10699 else
10700   echo "configure: failed program was:" >&5
10701   cat conftest.$ac_ext >&5
10702   rm -rf conftest*
10703   eval "ac_cv_func_$ac_func=no"
10704 fi
10705 rm -f conftest*
10706 fi
10707
10708 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10709   echo "$ac_t""yes" 1>&6
10710     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10711   cat >> confdefs.h <<EOF
10712 #define $ac_tr_func 1
10713 EOF
10714  
10715 else
10716   echo "$ac_t""no" 1>&6
10717 fi
10718 done
10719
10720 fi
10721
10722 for ac_func in \
10723         bcopy                   \
10724         endgrent                \
10725         endpwent                \
10726         flock                   \
10727         getdtablesize           \
10728         getgrgid                \
10729         gethostname             \
10730         getpass                 \
10731         getpwuid                \
10732         gettimeofday            \
10733         lockf                   \
10734         memcpy                  \
10735         memmove                 \
10736         mkstemp                 \
10737         recv                    \
10738         recvfrom                \
10739         setpwfile               \
10740         setsid                  \
10741         signal                  \
10742         sigset                  \
10743         snprintf                \
10744         strdup                  \
10745         strerror                \
10746         strpbrk                 \
10747         strrchr                 \
10748         strsep                  \
10749         strstr                  \
10750         strtol                  \
10751         strtoul                 \
10752         strspn                  \
10753         sysconf                 \
10754         waitpid                 \
10755         wait4                   \
10756
10757 do
10758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10759 echo "configure:10760: checking for $ac_func" >&5
10760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10761   echo $ac_n "(cached) $ac_c" 1>&6
10762 else
10763   cat > conftest.$ac_ext <<EOF
10764 #line 10765 "configure"
10765 #include "confdefs.h"
10766 /* System header to define __stub macros and hopefully few prototypes,
10767     which can conflict with char $ac_func(); below.  */
10768 #include <assert.h>
10769 /* Override any gcc2 internal prototype to avoid an error.  */
10770 /* We use char because int might match the return type of a gcc2
10771     builtin and then its argument prototype would still apply.  */
10772 char $ac_func();
10773
10774 int main() {
10775
10776 /* The GNU C library defines this for functions which it implements
10777     to always fail with ENOSYS.  Some functions are actually named
10778     something starting with __ and the normal name is an alias.  */
10779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10780 choke me
10781 #else
10782 $ac_func();
10783 #endif
10784
10785 ; return 0; }
10786 EOF
10787 if { (eval echo configure:10788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10788   rm -rf conftest*
10789   eval "ac_cv_func_$ac_func=yes"
10790 else
10791   echo "configure: failed program was:" >&5
10792   cat conftest.$ac_ext >&5
10793   rm -rf conftest*
10794   eval "ac_cv_func_$ac_func=no"
10795 fi
10796 rm -f conftest*
10797 fi
10798
10799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10800   echo "$ac_t""yes" 1>&6
10801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10802   cat >> confdefs.h <<EOF
10803 #define $ac_tr_func 1
10804 EOF
10805  
10806 else
10807   echo "$ac_t""no" 1>&6
10808 fi
10809 done
10810
10811
10812 for ac_func in getopt tempnam
10813 do
10814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10815 echo "configure:10816: checking for $ac_func" >&5
10816 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10817   echo $ac_n "(cached) $ac_c" 1>&6
10818 else
10819   cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 /* System header to define __stub macros and hopefully few prototypes,
10823     which can conflict with char $ac_func(); below.  */
10824 #include <assert.h>
10825 /* Override any gcc2 internal prototype to avoid an error.  */
10826 /* We use char because int might match the return type of a gcc2
10827     builtin and then its argument prototype would still apply.  */
10828 char $ac_func();
10829
10830 int main() {
10831
10832 /* The GNU C library defines this for functions which it implements
10833     to always fail with ENOSYS.  Some functions are actually named
10834     something starting with __ and the normal name is an alias.  */
10835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10836 choke me
10837 #else
10838 $ac_func();
10839 #endif
10840
10841 ; return 0; }
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10844   rm -rf conftest*
10845   eval "ac_cv_func_$ac_func=yes"
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -rf conftest*
10850   eval "ac_cv_func_$ac_func=no"
10851 fi
10852 rm -f conftest*
10853 fi
10854
10855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10856   echo "$ac_t""yes" 1>&6
10857     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10858   cat >> confdefs.h <<EOF
10859 #define $ac_tr_func 1
10860 EOF
10861  
10862 else
10863   echo "$ac_t""no" 1>&6
10864 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10865 fi
10866 done
10867
10868
10869
10870 # Check Configuration
10871
10872 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10873 echo "configure:10874: checking declaration of sys_errlist" >&5
10874 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   
10878         cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881
10882 #include <stdio.h>
10883 #include <sys/types.h>
10884 #include <errno.h> 
10885 int main() {
10886 char *c = (char *) *sys_errlist
10887 ; return 0; }
10888 EOF
10889 if { (eval echo configure:10890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10890   rm -rf conftest*
10891   ol_cv_dcl_sys_errlist=yes
10892 else
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   ol_cv_dcl_sys_errlist=no
10897 fi
10898 rm -f conftest*
10899 fi
10900
10901 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10902 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10903 if test $ol_cv_dcl_sys_errlist = no ; then
10904         cat >> confdefs.h <<\EOF
10905 #define DECL_SYS_ERRLIST 1
10906 EOF
10907
10908         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10909 echo "configure:10910: checking existence of sys_errlist" >&5
10910         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10911   echo $ac_n "(cached) $ac_c" 1>&6
10912 else
10913   
10914                 cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917 #include <errno.h>
10918 int main() {
10919 char *c = (char *) *sys_errlist
10920 ; return 0; }
10921 EOF
10922 if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10923   rm -rf conftest*
10924   ol_cv_have_sys_errlist=yes
10925 else
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   ol_cv_have_sys_errlist=no
10930 fi
10931 rm -f conftest*
10932 fi
10933
10934         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10935         if test $ol_cv_have_sys_errlist = yes ; then
10936                 cat >> confdefs.h <<\EOF
10937 #define HAVE_SYS_ERRLIST 1
10938 EOF
10939
10940         fi
10941 fi
10942
10943
10944
10945 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
10946 echo "configure:10947: checking strdup declaration" >&5
10947 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
10948   echo $ac_n "(cached) $ac_c" 1>&6
10949 else
10950   
10951         cat > conftest.$ac_ext <<EOF
10952 #line 10953 "configure"
10953 #include "confdefs.h"
10954
10955 #include <string.h> 
10956 int main() {
10957 extern char *strdup();
10958 ; return 0; }
10959 EOF
10960 if { (eval echo configure:10961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10961   rm -rf conftest*
10962   ol_cv_dcl_strdup=yes
10963 else
10964   echo "configure: failed program was:" >&5
10965   cat conftest.$ac_ext >&5
10966   rm -rf conftest*
10967   ol_cv_dcl_strdup=no
10968 fi
10969 rm -f conftest*
10970 fi
10971
10972 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
10973 if test $ol_cv_dcl_strdup = yes ; then
10974         cat >> confdefs.h <<\EOF
10975 #define DECL_STRDUP 1
10976 EOF
10977
10978 fi
10979
10980
10981
10982 if test "$ol_enable_debug" != no ; then
10983         cat >> confdefs.h <<\EOF
10984 #define LDAP_DEBUG 1
10985 EOF
10986
10987 fi
10988 if test "$ol_enable_syslog" = yes ; then
10989         cat >> confdefs.h <<\EOF
10990 #define LDAP_SYSLOG 1
10991 EOF
10992
10993 fi
10994 if test "$ol_enable_libui" = yes ; then
10995         cat >> confdefs.h <<\EOF
10996 #define LDAP_LIBUI 1
10997 EOF
10998
10999 fi
11000 if test "$ol_enable_cache" = no ; then
11001         cat >> confdefs.h <<\EOF
11002 #define LDAP_NOCACHE 1
11003 EOF
11004
11005 fi
11006 if test "$ol_enable_dns" != no ; then
11007         cat >> confdefs.h <<\EOF
11008 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11009 EOF
11010
11011 fi
11012 if test "$ol_enable_proctitle" != no ; then
11013         cat >> confdefs.h <<\EOF
11014 #define LDAP_PROCTITLE 1
11015 EOF
11016
11017 fi
11018 if test "$ol_enable_referrals" != no ; then
11019         cat >> confdefs.h <<\EOF
11020 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11021 EOF
11022
11023 fi
11024 if test "$ol_enable_cldap" != no ; then
11025         cat >> confdefs.h <<\EOF
11026 #define LDAP_CONNECTIONLESS 1
11027 EOF
11028
11029 fi
11030
11031 if test "$ol_enable_aclgroups" != no ; then
11032         cat >> confdefs.h <<\EOF
11033 #define SLAPD_ACLGROUPS 1
11034 EOF
11035
11036 fi
11037 if test "$ol_enable_crypt" != no ; then
11038         cat >> confdefs.h <<\EOF
11039 #define SLAPD_CRYPT 1
11040 EOF
11041
11042 fi
11043 if test "$ol_enable_cleartext" != no ; then
11044         cat >> confdefs.h <<\EOF
11045 #define SLAPD_CLEARTEXT 1
11046 EOF
11047
11048 fi
11049 if test "$ol_enable_phonetic" != no ; then
11050         cat >> confdefs.h <<\EOF
11051 #define SLAPD_PHONETIC 1
11052 EOF
11053
11054 fi
11055 if test "$ol_enable_rlookups" != no ; then
11056         cat >> confdefs.h <<\EOF
11057 #define SLAPD_RLOOKUPS 1
11058 EOF
11059
11060 fi
11061
11062 if test "$ol_link_bdb2" != no ; then
11063         cat >> confdefs.h <<\EOF
11064 #define SLAPD_BDB2 1
11065 EOF
11066
11067         BUILD_SLAPD=yes
11068         BUILD_BDB2=yes
11069 fi
11070
11071 if test "$ol_link_ldbm" != no ; then
11072         cat >> confdefs.h <<\EOF
11073 #define SLAPD_LDBM 1
11074 EOF
11075
11076         BUILD_SLAPD=yes
11077         BUILD_LDBM=yes
11078 fi
11079
11080 if test "$ol_enable_passwd" != no ; then
11081         cat >> confdefs.h <<\EOF
11082 #define SLAPD_PASSWD 1
11083 EOF
11084
11085         BUILD_SLAPD=yes
11086         BUILD_PASSWD=yes
11087 fi
11088
11089 if test "$ol_enable_perl" != no ; then
11090         cat >> confdefs.h <<\EOF
11091 #define SLAPD_PERL 1
11092 EOF
11093
11094         BUILD_SLAPD=yes
11095         BUILD_PERL=yes
11096 fi
11097
11098 if test "$ol_enable_shell" != no ; then
11099         cat >> confdefs.h <<\EOF
11100 #define SLAPD_SHELL 1
11101 EOF
11102
11103         BUILD_SLAPD=yes
11104         BUILD_SHELL=yes
11105 fi
11106
11107 if test "$ol_enable_tcl" != no ; then
11108         cat >> confdefs.h <<\EOF
11109 #define SLAPD_TCL 1
11110 EOF
11111
11112         BUILD_SLAPD=yes
11113         BUILD_TCL=yes
11114 fi
11115
11116 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11117         $BUILD_SLAPD = yes ; then
11118         BUILD_SLURPD=yes
11119 fi
11120
11121 if test "$ol_link_isode" != no ; then
11122         BUILD_LDAPD=yes
11123 fi
11124
11125
11126
11127
11128   
11129   
11130   
11131   
11132   
11133   
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153 trap '' 1 2 15
11154 cat > confcache <<\EOF
11155 # This file is a shell script that caches the results of configure
11156 # tests run on this system so they can be shared between configure
11157 # scripts and configure runs.  It is not useful on other systems.
11158 # If it contains results you don't want to keep, you may remove or edit it.
11159 #
11160 # By default, configure uses ./config.cache as the cache file,
11161 # creating it if it does not exist already.  You can give configure
11162 # the --cache-file=FILE option to use a different cache file; that is
11163 # what configure does when it calls configure scripts in
11164 # subdirectories, so they share the cache.
11165 # Giving --cache-file=/dev/null disables caching, for debugging configure.
11166 # config.status only pays attention to the cache file if you give it the
11167 # --recheck option to rerun configure.
11168 #
11169 EOF
11170 # The following way of writing the cache mishandles newlines in values,
11171 # but we know of no workaround that is simple, portable, and efficient.
11172 # So, don't put newlines in cache variables' values.
11173 # Ultrix sh set writes to stderr and can't be redirected directly,
11174 # and sets the high bit in the cache file unless we assign to the vars.
11175 (set) 2>&1 |
11176   case `(ac_space=' '; set | grep ac_space) 2>&1` in
11177   *ac_space=\ *)
11178     # `set' does not quote correctly, so add quotes (double-quote substitution
11179     # turns \\\\ into \\, and sed turns \\ into \).
11180     sed -n \
11181       -e "s/'/'\\\\''/g" \
11182       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11183     ;;
11184   *)
11185     # `set' quotes correctly as required by POSIX, so do not add quotes.
11186     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11187     ;;
11188   esac >> confcache
11189 if cmp -s $cache_file confcache; then
11190   :
11191 else
11192   if test -w $cache_file; then
11193     echo "updating cache $cache_file"
11194     cat confcache > $cache_file
11195   else
11196     echo "not updating unwritable cache $cache_file"
11197   fi
11198 fi
11199 rm -f confcache
11200
11201 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11202
11203 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11204 # Let make expand exec_prefix.
11205 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11206
11207 # Any assignment to VPATH causes Sun make to only execute
11208 # the first set of double-colon rules, so remove it if not needed.
11209 # If there is a colon in the path, we need to keep it.
11210 if test "x$srcdir" = x.; then
11211   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11212 fi
11213
11214 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11215
11216 DEFS=-DHAVE_CONFIG_H
11217
11218 # Without the "./", some shells look in PATH for config.status.
11219 : ${CONFIG_STATUS=./config.status}
11220
11221 echo creating $CONFIG_STATUS
11222 rm -f $CONFIG_STATUS
11223 cat > $CONFIG_STATUS <<EOF
11224 #! /bin/sh
11225 # Generated automatically by configure.
11226 # Run this file to recreate the current configuration.
11227 # This directory was configured as follows,
11228 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11229 #
11230 # $0 $ac_configure_args
11231 #
11232 # Compiler output produced by configure, useful for debugging
11233 # configure, is in ./config.log if it exists.
11234
11235 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11236 for ac_option
11237 do
11238   case "\$ac_option" in
11239   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11240     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11241     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11242   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11243     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11244     exit 0 ;;
11245   -help | --help | --hel | --he | --h)
11246     echo "\$ac_cs_usage"; exit 0 ;;
11247   *) echo "\$ac_cs_usage"; exit 1 ;;
11248   esac
11249 done
11250
11251 ac_given_srcdir=$srcdir
11252 ac_given_INSTALL="$INSTALL"
11253
11254 trap 'rm -fr `echo "\
11255 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11256 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11257 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11258 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11259 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11260 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11261 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11262 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11263 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11264 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11265 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11266 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11267 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11268 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11269 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11270 include/Makefile:build/top.mk:include/Makefile.in \
11271 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11272 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11273 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11274 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11275 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11276 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11277 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11278 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11279 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11280 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11281 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11282 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11283 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11284 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11285 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11286 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11287 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11288 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11289 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11290 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11291 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11292 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11293 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11294 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11295 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11296  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11297 EOF
11298 cat >> $CONFIG_STATUS <<EOF
11299
11300 # Protect against being on the right side of a sed subst in config.status.
11301 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11302  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11303 $ac_vpsub
11304 $extrasub
11305 s%@SHELL@%$SHELL%g
11306 s%@CFLAGS@%$CFLAGS%g
11307 s%@CPPFLAGS@%$CPPFLAGS%g
11308 s%@CXXFLAGS@%$CXXFLAGS%g
11309 s%@FFLAGS@%$FFLAGS%g
11310 s%@DEFS@%$DEFS%g
11311 s%@LDFLAGS@%$LDFLAGS%g
11312 s%@LIBS@%$LIBS%g
11313 s%@exec_prefix@%$exec_prefix%g
11314 s%@prefix@%$prefix%g
11315 s%@program_transform_name@%$program_transform_name%g
11316 s%@bindir@%$bindir%g
11317 s%@sbindir@%$sbindir%g
11318 s%@libexecdir@%$libexecdir%g
11319 s%@datadir@%$datadir%g
11320 s%@sysconfdir@%$sysconfdir%g
11321 s%@sharedstatedir@%$sharedstatedir%g
11322 s%@localstatedir@%$localstatedir%g
11323 s%@libdir@%$libdir%g
11324 s%@includedir@%$includedir%g
11325 s%@oldincludedir@%$oldincludedir%g
11326 s%@infodir@%$infodir%g
11327 s%@mandir@%$mandir%g
11328 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11329 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11330 s%@INSTALL_DATA@%$INSTALL_DATA%g
11331 s%@PACKAGE@%$PACKAGE%g
11332 s%@VERSION@%$VERSION%g
11333 s%@ACLOCAL@%$ACLOCAL%g
11334 s%@AUTOCONF@%$AUTOCONF%g
11335 s%@AUTOMAKE@%$AUTOMAKE%g
11336 s%@AUTOHEADER@%$AUTOHEADER%g
11337 s%@MAKEINFO@%$MAKEINFO%g
11338 s%@SET_MAKE@%$SET_MAKE%g
11339 s%@top_builddir@%$top_builddir%g
11340 s%@ldap_subdir@%$ldap_subdir%g
11341 s%@host@%$host%g
11342 s%@host_alias@%$host_alias%g
11343 s%@host_cpu@%$host_cpu%g
11344 s%@host_vendor@%$host_vendor%g
11345 s%@host_os@%$host_os%g
11346 s%@RANLIB@%$RANLIB%g
11347 s%@CC@%$CC%g
11348 s%@LD@%$LD%g
11349 s%@NM@%$NM%g
11350 s%@LN_S@%$LN_S%g
11351 s%@LIBTOOL@%$LIBTOOL%g
11352 s%@AWK@%$AWK%g
11353 s%@LN_H@%$LN_H%g
11354 s%@SENDMAIL@%$SENDMAIL%g
11355 s%@EDITOR@%$EDITOR%g
11356 s%@FINGER@%$FINGER%g
11357 s%@PERLBIN@%$PERLBIN%g
11358 s%@CPP@%$CPP%g
11359 s%@EXEEXT@%$EXEEXT%g
11360 s%@OBJEXT@%$OBJEXT%g
11361 s%@PEPSY@%$PEPSY%g
11362 s%@LIBOBJS@%$LIBOBJS%g
11363 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11364 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11365 s%@BUILD_BDB2@%$BUILD_BDB2%g
11366 s%@BUILD_LDBM@%$BUILD_LDBM%g
11367 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11368 s%@BUILD_PERL@%$BUILD_PERL%g
11369 s%@BUILD_SHELL@%$BUILD_SHELL%g
11370 s%@BUILD_TCL@%$BUILD_TCL%g
11371 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11372 s%@LDAP_LIBS@%$LDAP_LIBS%g
11373 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11374 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11375 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11376 s%@LDBM_LIBS@%$LDBM_LIBS%g
11377 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11378 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11379 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11380 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11381 s%@KRB_LIBS@%$KRB_LIBS%g
11382 s%@READLINE_LIBS@%$READLINE_LIBS%g
11383 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11384 s%@TLS_LIBS@%$TLS_LIBS%g
11385
11386 CEOF
11387 EOF
11388
11389 cat >> $CONFIG_STATUS <<\EOF
11390
11391 # Split the substitutions into bite-sized pieces for seds with
11392 # small command number limits, like on Digital OSF/1 and HP-UX.
11393 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11394 ac_file=1 # Number of current file.
11395 ac_beg=1 # First line for current file.
11396 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11397 ac_more_lines=:
11398 ac_sed_cmds=""
11399 while $ac_more_lines; do
11400   if test $ac_beg -gt 1; then
11401     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11402   else
11403     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11404   fi
11405   if test ! -s conftest.s$ac_file; then
11406     ac_more_lines=false
11407     rm -f conftest.s$ac_file
11408   else
11409     if test -z "$ac_sed_cmds"; then
11410       ac_sed_cmds="sed -f conftest.s$ac_file"
11411     else
11412       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11413     fi
11414     ac_file=`expr $ac_file + 1`
11415     ac_beg=$ac_end
11416     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11417   fi
11418 done
11419 if test -z "$ac_sed_cmds"; then
11420   ac_sed_cmds=cat
11421 fi
11422 EOF
11423
11424 cat >> $CONFIG_STATUS <<EOF
11425
11426 CONFIG_FILES=\${CONFIG_FILES-"\
11427 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11428 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11429 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11430 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11431 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11432 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11433 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11434 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11435 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11436 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11437 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11438 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11439 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11440 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11441 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11442 include/Makefile:build/top.mk:include/Makefile.in \
11443 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11444 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11445 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11446 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11447 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11448 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11449 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11450 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11451 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11452 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11453 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11454 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11455 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11456 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11457 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11458 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11459 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11460 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11461 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11462 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11463 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11464 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11465 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11466 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11467 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11468 "}
11469 EOF
11470 cat >> $CONFIG_STATUS <<\EOF
11471 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11472   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11473   case "$ac_file" in
11474   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11475        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11476   *) ac_file_in="${ac_file}.in" ;;
11477   esac
11478
11479   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11480
11481   # Remove last slash and all that follows it.  Not all systems have dirname.
11482   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11483   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11484     # The file is in a subdirectory.
11485     test ! -d "$ac_dir" && mkdir "$ac_dir"
11486     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11487     # A "../" for each directory in $ac_dir_suffix.
11488     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11489   else
11490     ac_dir_suffix= ac_dots=
11491   fi
11492
11493   case "$ac_given_srcdir" in
11494   .)  srcdir=.
11495       if test -z "$ac_dots"; then top_srcdir=.
11496       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11497   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11498   *) # Relative path.
11499     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11500     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11501   esac
11502
11503   case "$ac_given_INSTALL" in
11504   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11505   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11506   esac
11507
11508   echo creating "$ac_file"
11509   rm -f "$ac_file"
11510   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11511   case "$ac_file" in
11512   *Makefile*) ac_comsub="1i\\
11513 # $configure_input" ;;
11514   *) ac_comsub= ;;
11515   esac
11516
11517   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11518   sed -e "$ac_comsub
11519 s%@configure_input@%$configure_input%g
11520 s%@srcdir@%$srcdir%g
11521 s%@top_srcdir@%$top_srcdir%g
11522 s%@INSTALL@%$INSTALL%g
11523 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11524 fi; done
11525 rm -f conftest.s*
11526
11527 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11528 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11529 #
11530 # ac_d sets the value in "#define NAME VALUE" lines.
11531 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11532 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11533 ac_dC='\3'
11534 ac_dD='%g'
11535 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11536 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11537 ac_uB='\([      ]\)%\1#\2define\3'
11538 ac_uC=' '
11539 ac_uD='\4%g'
11540 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11541 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11542 ac_eB='$%\1#\2define\3'
11543 ac_eC=' '
11544 ac_eD='%g'
11545
11546 if test "${CONFIG_HEADERS+set}" != set; then
11547 EOF
11548 cat >> $CONFIG_STATUS <<EOF
11549   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11550 EOF
11551 cat >> $CONFIG_STATUS <<\EOF
11552 fi
11553 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11554   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11555   case "$ac_file" in
11556   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11557        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11558   *) ac_file_in="${ac_file}.in" ;;
11559   esac
11560
11561   echo creating $ac_file
11562
11563   rm -f conftest.frag conftest.in conftest.out
11564   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11565   cat $ac_file_inputs > conftest.in
11566
11567 EOF
11568
11569 # Transform confdefs.h into a sed script conftest.vals that substitutes
11570 # the proper values into config.h.in to produce config.h.  And first:
11571 # Protect against being on the right side of a sed subst in config.status.
11572 # Protect against being in an unquoted here document in config.status.
11573 rm -f conftest.vals
11574 cat > conftest.hdr <<\EOF
11575 s/[\\&%]/\\&/g
11576 s%[\\$`]%\\&%g
11577 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11578 s%ac_d%ac_u%gp
11579 s%ac_u%ac_e%gp
11580 EOF
11581 sed -n -f conftest.hdr confdefs.h > conftest.vals
11582 rm -f conftest.hdr
11583
11584 # This sed command replaces #undef with comments.  This is necessary, for
11585 # example, in the case of _POSIX_SOURCE, which is predefined and required
11586 # on some systems where configure will not decide to define it.
11587 cat >> conftest.vals <<\EOF
11588 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11589 EOF
11590
11591 # Break up conftest.vals because some shells have a limit on
11592 # the size of here documents, and old seds have small limits too.
11593
11594 rm -f conftest.tail
11595 while :
11596 do
11597   ac_lines=`grep -c . conftest.vals`
11598   # grep -c gives empty output for an empty file on some AIX systems.
11599   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11600   # Write a limited-size here document to conftest.frag.
11601   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11602   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11603   echo 'CEOF
11604   sed -f conftest.frag conftest.in > conftest.out
11605   rm -f conftest.in
11606   mv conftest.out conftest.in
11607 ' >> $CONFIG_STATUS
11608   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11609   rm -f conftest.vals
11610   mv conftest.tail conftest.vals
11611 done
11612 rm -f conftest.vals
11613
11614 cat >> $CONFIG_STATUS <<\EOF
11615   rm -f conftest.frag conftest.h
11616   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11617   cat conftest.in >> conftest.h
11618   rm -f conftest.in
11619   if cmp -s $ac_file conftest.h 2>/dev/null; then
11620     echo "$ac_file is unchanged"
11621     rm -f conftest.h
11622   else
11623     # Remove last slash and all that follows it.  Not all systems have dirname.
11624       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11625       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11626       # The file is in a subdirectory.
11627       test ! -d "$ac_dir" && mkdir "$ac_dir"
11628     fi
11629     rm -f $ac_file
11630     mv conftest.h $ac_file
11631   fi
11632 fi; done
11633
11634 EOF
11635 cat >> $CONFIG_STATUS <<EOF
11636
11637 EOF
11638 cat >> $CONFIG_STATUS <<\EOF
11639
11640 date > stamp-h
11641 echo Please \"make depend\" to build dependencies
11642
11643 exit 0
11644 EOF
11645 chmod +x $CONFIG_STATUS
11646 rm -fr confdefs* $ac_clean_files
11647 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11648