]> git.sur5r.net Git - openldap/blob - configure
add define of service name (shared in main and nt_svc, that's why it's here)
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-kerberos       with Kerberos support (auto)"
37 ac_help="$ac_help
38   --with-readline  with readline support (auto)"
39 ac_help="$ac_help
40   --with-threads        use threads (auto)"
41 ac_help="$ac_help
42   --with-tls  with TLS/SSL support (auto)"
43 ac_help="$ac_help
44   --with-yielding-select        with implicitly yielding select (auto)"
45 ac_help="$ac_help
46 LDAPD Options:"
47 ac_help="$ac_help
48   --enable-ldapd        enable building ldapd (no)"
49 ac_help="$ac_help
50 SLAPD Options:"
51 ac_help="$ac_help
52   --enable-slapd        enable building slapd (yes)"
53 ac_help="$ac_help
54     --enable-aclgroups  enable ACL group support (auto)"
55 ac_help="$ac_help
56     --enable-cleartext  enable cleartext passwords (yes)"
57 ac_help="$ac_help
58     --enable-crypt      enable crypt(3) passwords (auto)"
59 ac_help="$ac_help
60     --enable-modules    enable dynamic module support (no)"
61 ac_help="$ac_help
62     --enable-phonetic   enable phonetic/soundex (no)"
63 ac_help="$ac_help
64     --enable-rlookups   enable reverse lookups (auto)"
65 ac_help="$ac_help
66     --enable-wrappers   enable tcp wrapper support (no)"
67 ac_help="$ac_help
68     --enable-bdb2       enable bdb2 backend (no)"
69 ac_help="$ac_help
70     --enable-ldap       enable ldap backend (no)"
71 ac_help="$ac_help
72     --enable-ldbm       enable ldbm backend (yes)"
73 ac_help="$ac_help
74       --with-ldbm-api   use LDBM API (auto)"
75 ac_help="$ac_help
76       --with-ldbm-type  use LDBM type (auto)"
77 ac_help="$ac_help
78     --enable-passwd     enable passwd backend (no)"
79 ac_help="$ac_help
80     --enable-perl       enable perl backend (no)"
81 ac_help="$ac_help
82     --enable-shell      enable shell backend (no)"
83 ac_help="$ac_help
84     --enable-tcl        enable tcl backend (no)"
85 ac_help="$ac_help
86 SLURPD Options:"
87 ac_help="$ac_help
88   --enable-slurpd       enable building slurpd (auto)"
89 ac_help="$ac_help
90 Library Generation & Linking Options"
91 ac_help="$ac_help
92   --enable-static         build static libraries [default=yes]
93   --enable-static=PKGS    only build shared libraries if the current package
94                           appears as an element in the PKGS list"
95 ac_help="$ac_help
96   --enable-shared         build shared libraries [default=yes]
97   --enable-shared=PKGS    only build shared libraries if the current package
98                           appears as an element in the PKGS list"
99 ac_help="$ac_help
100   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
101
102 # Initialize some variables set by options.
103 # The variables have the same names as the options, with
104 # dashes changed to underlines.
105 build=NONE
106 cache_file=./config.cache
107 exec_prefix=NONE
108 host=NONE
109 no_create=
110 nonopt=NONE
111 no_recursion=
112 prefix=NONE
113 program_prefix=NONE
114 program_suffix=NONE
115 program_transform_name=s,x,x,
116 silent=
117 site=
118 srcdir=
119 target=NONE
120 verbose=
121 x_includes=NONE
122 x_libraries=NONE
123 bindir='${exec_prefix}/bin'
124 sbindir='${exec_prefix}/sbin'
125 libexecdir='${exec_prefix}/libexec'
126 datadir='${prefix}/share'
127 sysconfdir='${prefix}/etc'
128 sharedstatedir='${prefix}/com'
129 localstatedir='${prefix}/var'
130 libdir='${exec_prefix}/lib'
131 includedir='${prefix}/include'
132 oldincludedir='/usr/include'
133 infodir='${prefix}/info'
134 mandir='${prefix}/man'
135
136 # Initialize some other variables.
137 subdirs=
138 MFLAGS= MAKEFLAGS=
139 SHELL=${CONFIG_SHELL-/bin/sh}
140 # Maximum number of lines to put in a shell here document.
141 ac_max_here_lines=12
142
143 ac_prev=
144 for ac_option
145 do
146
147   # If the previous option needs an argument, assign it.
148   if test -n "$ac_prev"; then
149     eval "$ac_prev=\$ac_option"
150     ac_prev=
151     continue
152   fi
153
154   case "$ac_option" in
155   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
156   *) ac_optarg= ;;
157   esac
158
159   # Accept the important Cygnus configure options, so we can diagnose typos.
160
161   case "$ac_option" in
162
163   -bindir | --bindir | --bindi | --bind | --bin | --bi)
164     ac_prev=bindir ;;
165   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
166     bindir="$ac_optarg" ;;
167
168   -build | --build | --buil | --bui | --bu)
169     ac_prev=build ;;
170   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
171     build="$ac_optarg" ;;
172
173   -cache-file | --cache-file | --cache-fil | --cache-fi \
174   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
175     ac_prev=cache_file ;;
176   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
177   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
178     cache_file="$ac_optarg" ;;
179
180   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
181     ac_prev=datadir ;;
182   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
183   | --da=*)
184     datadir="$ac_optarg" ;;
185
186   -disable-* | --disable-*)
187     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
188     # Reject names that are not valid shell variable names.
189     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
190       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
191     fi
192     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
193     eval "enable_${ac_feature}=no" ;;
194
195   -enable-* | --enable-*)
196     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
197     # Reject names that are not valid shell variable names.
198     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
199       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
200     fi
201     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
202     case "$ac_option" in
203       *=*) ;;
204       *) ac_optarg=yes ;;
205     esac
206     eval "enable_${ac_feature}='$ac_optarg'" ;;
207
208   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
209   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
210   | --exec | --exe | --ex)
211     ac_prev=exec_prefix ;;
212   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
213   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
214   | --exec=* | --exe=* | --ex=*)
215     exec_prefix="$ac_optarg" ;;
216
217   -gas | --gas | --ga | --g)
218     # Obsolete; use --with-gas.
219     with_gas=yes ;;
220
221   -help | --help | --hel | --he)
222     # Omit some internal or obsolete options to make the list less imposing.
223     # This message is too long to be a string in the A/UX 3.1 sh.
224     cat << EOF
225 Usage: configure [options] [host]
226 Options: [defaults in brackets after descriptions]
227 Configuration:
228   --cache-file=FILE       cache test results in FILE
229   --help                  print this message
230   --no-create             do not create output files
231   --quiet, --silent       do not print \`checking...' messages
232   --version               print the version of autoconf that created configure
233 Directory and file names:
234   --prefix=PREFIX         install architecture-independent files in PREFIX
235                           [$ac_default_prefix]
236   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
237                           [same as prefix]
238   --bindir=DIR            user executables in DIR [EPREFIX/bin]
239   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
240   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
241   --datadir=DIR           read-only architecture-independent data in DIR
242                           [PREFIX/share]
243   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
244   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
245                           [PREFIX/com]
246   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
247   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
248   --includedir=DIR        C header files in DIR [PREFIX/include]
249   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
250   --infodir=DIR           info documentation in DIR [PREFIX/info]
251   --mandir=DIR            man documentation in DIR [PREFIX/man]
252   --srcdir=DIR            find the sources in DIR [configure dir or ..]
253   --program-prefix=PREFIX prepend PREFIX to installed program names
254   --program-suffix=SUFFIX append SUFFIX to installed program names
255   --program-transform-name=PROGRAM
256                           run sed PROGRAM on installed program names
257 EOF
258     cat << EOF
259 Host type:
260   --build=BUILD           configure for building on BUILD [BUILD=HOST]
261   --host=HOST             configure for HOST [guessed]
262   --target=TARGET         configure for TARGET [TARGET=HOST]
263 Features and packages:
264   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
265   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
266   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
267   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
268   --x-includes=DIR        X include files are in DIR
269   --x-libraries=DIR       X library files are in DIR
270 EOF
271     if test -n "$ac_help"; then
272       echo "--enable and --with options recognized:$ac_help"
273     fi
274     exit 0 ;;
275
276   -host | --host | --hos | --ho)
277     ac_prev=host ;;
278   -host=* | --host=* | --hos=* | --ho=*)
279     host="$ac_optarg" ;;
280
281   -includedir | --includedir | --includedi | --included | --include \
282   | --includ | --inclu | --incl | --inc)
283     ac_prev=includedir ;;
284   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
285   | --includ=* | --inclu=* | --incl=* | --inc=*)
286     includedir="$ac_optarg" ;;
287
288   -infodir | --infodir | --infodi | --infod | --info | --inf)
289     ac_prev=infodir ;;
290   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
291     infodir="$ac_optarg" ;;
292
293   -libdir | --libdir | --libdi | --libd)
294     ac_prev=libdir ;;
295   -libdir=* | --libdir=* | --libdi=* | --libd=*)
296     libdir="$ac_optarg" ;;
297
298   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
299   | --libexe | --libex | --libe)
300     ac_prev=libexecdir ;;
301   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
302   | --libexe=* | --libex=* | --libe=*)
303     libexecdir="$ac_optarg" ;;
304
305   -localstatedir | --localstatedir | --localstatedi | --localstated \
306   | --localstate | --localstat | --localsta | --localst \
307   | --locals | --local | --loca | --loc | --lo)
308     ac_prev=localstatedir ;;
309   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
310   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
311   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
312     localstatedir="$ac_optarg" ;;
313
314   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
315     ac_prev=mandir ;;
316   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
317     mandir="$ac_optarg" ;;
318
319   -nfp | --nfp | --nf)
320     # Obsolete; use --without-fp.
321     with_fp=no ;;
322
323   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
324   | --no-cr | --no-c)
325     no_create=yes ;;
326
327   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
328   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
329     no_recursion=yes ;;
330
331   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
332   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
333   | --oldin | --oldi | --old | --ol | --o)
334     ac_prev=oldincludedir ;;
335   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
336   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
337   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
338     oldincludedir="$ac_optarg" ;;
339
340   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
341     ac_prev=prefix ;;
342   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
343     prefix="$ac_optarg" ;;
344
345   -program-prefix | --program-prefix | --program-prefi | --program-pref \
346   | --program-pre | --program-pr | --program-p)
347     ac_prev=program_prefix ;;
348   -program-prefix=* | --program-prefix=* | --program-prefi=* \
349   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
350     program_prefix="$ac_optarg" ;;
351
352   -program-suffix | --program-suffix | --program-suffi | --program-suff \
353   | --program-suf | --program-su | --program-s)
354     ac_prev=program_suffix ;;
355   -program-suffix=* | --program-suffix=* | --program-suffi=* \
356   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
357     program_suffix="$ac_optarg" ;;
358
359   -program-transform-name | --program-transform-name \
360   | --program-transform-nam | --program-transform-na \
361   | --program-transform-n | --program-transform- \
362   | --program-transform | --program-transfor \
363   | --program-transfo | --program-transf \
364   | --program-trans | --program-tran \
365   | --progr-tra | --program-tr | --program-t)
366     ac_prev=program_transform_name ;;
367   -program-transform-name=* | --program-transform-name=* \
368   | --program-transform-nam=* | --program-transform-na=* \
369   | --program-transform-n=* | --program-transform-=* \
370   | --program-transform=* | --program-transfor=* \
371   | --program-transfo=* | --program-transf=* \
372   | --program-trans=* | --program-tran=* \
373   | --progr-tra=* | --program-tr=* | --program-t=*)
374     program_transform_name="$ac_optarg" ;;
375
376   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
377   | -silent | --silent | --silen | --sile | --sil)
378     silent=yes ;;
379
380   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
381     ac_prev=sbindir ;;
382   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
383   | --sbi=* | --sb=*)
384     sbindir="$ac_optarg" ;;
385
386   -sharedstatedir | --sharedstatedir | --sharedstatedi \
387   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
388   | --sharedst | --shareds | --shared | --share | --shar \
389   | --sha | --sh)
390     ac_prev=sharedstatedir ;;
391   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
392   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
393   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
394   | --sha=* | --sh=*)
395     sharedstatedir="$ac_optarg" ;;
396
397   -site | --site | --sit)
398     ac_prev=site ;;
399   -site=* | --site=* | --sit=*)
400     site="$ac_optarg" ;;
401
402   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
403     ac_prev=srcdir ;;
404   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
405     srcdir="$ac_optarg" ;;
406
407   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
408   | --syscon | --sysco | --sysc | --sys | --sy)
409     ac_prev=sysconfdir ;;
410   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
411   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
412     sysconfdir="$ac_optarg" ;;
413
414   -target | --target | --targe | --targ | --tar | --ta | --t)
415     ac_prev=target ;;
416   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
417     target="$ac_optarg" ;;
418
419   -v | -verbose | --verbose | --verbos | --verbo | --verb)
420     verbose=yes ;;
421
422   -version | --version | --versio | --versi | --vers)
423     echo "configure generated by autoconf version 2.13"
424     exit 0 ;;
425
426   -with-* | --with-*)
427     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
428     # Reject names that are not valid shell variable names.
429     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
430       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
431     fi
432     ac_package=`echo $ac_package| sed 's/-/_/g'`
433     case "$ac_option" in
434       *=*) ;;
435       *) ac_optarg=yes ;;
436     esac
437     eval "with_${ac_package}='$ac_optarg'" ;;
438
439   -without-* | --without-*)
440     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
441     # Reject names that are not valid shell variable names.
442     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
443       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
444     fi
445     ac_package=`echo $ac_package| sed 's/-/_/g'`
446     eval "with_${ac_package}=no" ;;
447
448   --x)
449     # Obsolete; use --with-x.
450     with_x=yes ;;
451
452   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
453   | --x-incl | --x-inc | --x-in | --x-i)
454     ac_prev=x_includes ;;
455   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
456   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
457     x_includes="$ac_optarg" ;;
458
459   -x-libraries | --x-libraries | --x-librarie | --x-librari \
460   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
461     ac_prev=x_libraries ;;
462   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
463   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
464     x_libraries="$ac_optarg" ;;
465
466   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
467     ;;
468
469   *)
470     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
471       echo "configure: warning: $ac_option: invalid host type" 1>&2
472     fi
473     if test "x$nonopt" != xNONE; then
474       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
475     fi
476     nonopt="$ac_option"
477     ;;
478
479   esac
480 done
481
482 if test -n "$ac_prev"; then
483   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
484 fi
485
486 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
487
488 # File descriptor usage:
489 # 0 standard input
490 # 1 file creation
491 # 2 errors and warnings
492 # 3 some systems may open it to /dev/tty
493 # 4 used on the Kubota Titan
494 # 6 checking for... messages and results
495 # 5 compiler messages saved in config.log
496 if test "$silent" = yes; then
497   exec 6>/dev/null
498 else
499   exec 6>&1
500 fi
501 exec 5>./config.log
502
503 echo "\
504 This file contains any messages produced by compilers while
505 running configure, to aid debugging if configure makes a mistake.
506 " 1>&5
507
508 # Strip out --no-create and --no-recursion so they do not pile up.
509 # Also quote any args containing shell metacharacters.
510 ac_configure_args=
511 for ac_arg
512 do
513   case "$ac_arg" in
514   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
515   | --no-cr | --no-c) ;;
516   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
517   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
518   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
519   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
520   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
521   esac
522 done
523
524 # NLS nuisances.
525 # Only set these to C if already set.  These must not be set unconditionally
526 # because not all systems understand e.g. LANG=C (notably SCO).
527 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
528 # Non-C LC_CTYPE values break the ctype check.
529 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
530 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
531 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
532 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
533
534 # confdefs.h avoids OS command line length limits that DEFS can exceed.
535 rm -rf conftest* confdefs.h
536 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
537 echo > confdefs.h
538
539 # A filename unique to this package, relative to the directory that
540 # configure is in, which we can look for to find out if srcdir is correct.
541 ac_unique_file=build/version
542
543 # Find the source files, if location was not specified.
544 if test -z "$srcdir"; then
545   ac_srcdir_defaulted=yes
546   # Try the directory containing this script, then its parent.
547   ac_prog=$0
548   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
549   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
550   srcdir=$ac_confdir
551   if test ! -r $srcdir/$ac_unique_file; then
552     srcdir=..
553   fi
554 else
555   ac_srcdir_defaulted=no
556 fi
557 if test ! -r $srcdir/$ac_unique_file; then
558   if test "$ac_srcdir_defaulted" = yes; then
559     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
560   else
561     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
562   fi
563 fi
564 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
565
566 # Prefer explicitly selected file to automatically selected ones.
567 if test -z "$CONFIG_SITE"; then
568   if test "x$prefix" != xNONE; then
569     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
570   else
571     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
572   fi
573 fi
574 for ac_site_file in $CONFIG_SITE; do
575   if test -r "$ac_site_file"; then
576     echo "loading site script $ac_site_file"
577     . "$ac_site_file"
578   fi
579 done
580
581
582 ac_ext=c
583 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
584 ac_cpp='$CPP $CPPFLAGS'
585 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
586 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
587 cross_compiling=$ac_cv_prog_cc_cross
588
589 ac_exeext=
590 ac_objext=o
591 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
592   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
593   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
594     ac_n= ac_c='
595 ' ac_t='        '
596   else
597     ac_n=-n ac_c= ac_t=
598   fi
599 else
600   ac_n= ac_c='\c' ac_t=
601 fi
602
603 ac_aux_dir=
604 for ac_dir in build $srcdir/build; do
605   if test -f $ac_dir/install-sh; then
606     ac_aux_dir=$ac_dir
607     ac_install_sh="$ac_aux_dir/install-sh -c"
608     break
609   elif test -f $ac_dir/install.sh; then
610     ac_aux_dir=$ac_dir
611     ac_install_sh="$ac_aux_dir/install.sh -c"
612     break
613   fi
614 done
615 if test -z "$ac_aux_dir"; then
616   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
617 fi
618 ac_config_guess=$ac_aux_dir/config.guess
619 ac_config_sub=$ac_aux_dir/config.sub
620 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
621
622 OL_VERSION=`cat $ac_aux_dir/version`
623 if test -z "$OL_VERSION"; then
624         { echo "configure: error: could not determine version" 1>&2; exit 1; }
625 fi
626
627
628 # Do some error checking and defaulting for the host and target type.
629 # The inputs are:
630 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
631 #
632 # The rules are:
633 # 1. You are not allowed to specify --host, --target, and nonopt at the
634 #    same time.
635 # 2. Host defaults to nonopt.
636 # 3. If nonopt is not specified, then host defaults to the current host,
637 #    as determined by config.guess.
638 # 4. Target and build default to nonopt.
639 # 5. If nonopt is not specified, then target and build default to host.
640
641 # The aliases save the names the user supplied, while $host etc.
642 # will get canonicalized.
643 case $host---$target---$nonopt in
644 NONE---*---* | *---NONE---* | *---*---NONE) ;;
645 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
646 esac
647
648
649 # Make sure we can run config.sub.
650 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
651 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
652 fi
653
654 echo $ac_n "checking host system type""... $ac_c" 1>&6
655 echo "configure:656: checking host system type" >&5
656
657 host_alias=$host
658 case "$host_alias" in
659 NONE)
660   case $nonopt in
661   NONE)
662     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
663     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
664     fi ;;
665   *) host_alias=$nonopt ;;
666   esac ;;
667 esac
668
669 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
670 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
671 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
672 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
673 echo "$ac_t""$host" 1>&6
674
675 echo $ac_n "checking target system type""... $ac_c" 1>&6
676 echo "configure:677: checking target system type" >&5
677
678 target_alias=$target
679 case "$target_alias" in
680 NONE)
681   case $nonopt in
682   NONE) target_alias=$host_alias ;;
683   *) target_alias=$nonopt ;;
684   esac ;;
685 esac
686
687 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
688 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
689 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
690 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
691 echo "$ac_t""$target" 1>&6
692
693 echo $ac_n "checking build system type""... $ac_c" 1>&6
694 echo "configure:695: checking build system type" >&5
695
696 build_alias=$build
697 case "$build_alias" in
698 NONE)
699   case $nonopt in
700   NONE) build_alias=$host_alias ;;
701   *) build_alias=$nonopt ;;
702   esac ;;
703 esac
704
705 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
706 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 echo "$ac_t""$build" 1>&6
710
711 test "$host_alias" != "$target_alias" &&
712   test "$program_prefix$program_suffix$program_transform_name" = \
713     NONENONEs,x,x, &&
714   program_prefix=${target_alias}-
715
716
717 # Find a good install program.  We prefer a C program (faster),
718 # so one script is as good as another.  But avoid the broken or
719 # incompatible versions:
720 # SysV /etc/install, /usr/sbin/install
721 # SunOS /usr/etc/install
722 # IRIX /sbin/install
723 # AIX /bin/install
724 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
725 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
726 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
727 # ./install, which can be erroneously created by make from ./install.sh.
728 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
729 echo "configure:730: checking for a BSD compatible install" >&5
730 if test -z "$INSTALL"; then
731 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
732   echo $ac_n "(cached) $ac_c" 1>&6
733 else
734     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
735   for ac_dir in $PATH; do
736     # Account for people who put trailing slashes in PATH elements.
737     case "$ac_dir/" in
738     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
739     *)
740       # OSF1 and SCO ODT 3.0 have their own names for install.
741       # Don't use installbsd from OSF since it installs stuff as root
742       # by default.
743       for ac_prog in ginstall scoinst install; do
744         if test -f $ac_dir/$ac_prog; then
745           if test $ac_prog = install &&
746             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
747             # AIX install.  It has an incompatible calling convention.
748             :
749           else
750             ac_cv_path_install="$ac_dir/$ac_prog -c"
751             break 2
752           fi
753         fi
754       done
755       ;;
756     esac
757   done
758   IFS="$ac_save_IFS"
759
760 fi
761   if test "${ac_cv_path_install+set}" = set; then
762     INSTALL="$ac_cv_path_install"
763   else
764     # As a last resort, use the slow shell script.  We don't cache a
765     # path for INSTALL within a source directory, because that will
766     # break other packages using the cache if that directory is
767     # removed, or if the path is relative.
768     INSTALL="$ac_install_sh"
769   fi
770 fi
771 echo "$ac_t""$INSTALL" 1>&6
772
773 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
774 # It thinks the first close brace ends the variable substitution.
775 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
776
777 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
778
779 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
780
781 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
782 echo "configure:783: checking whether build environment is sane" >&5
783 # Just in case
784 sleep 1
785 echo timestamp > conftestfile
786 # Do `set' in a subshell so we don't clobber the current shell's
787 # arguments.  Must try -L first in case configure is actually a
788 # symlink; some systems play weird games with the mod time of symlinks
789 # (eg FreeBSD returns the mod time of the symlink's containing
790 # directory).
791 if (
792    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
793    if test "$*" = "X"; then
794       # -L didn't work.
795       set X `ls -t $srcdir/configure conftestfile`
796    fi
797    if test "$*" != "X $srcdir/configure conftestfile" \
798       && test "$*" != "X conftestfile $srcdir/configure"; then
799
800       # If neither matched, then we have a broken ls.  This can happen
801       # if, for instance, CONFIG_SHELL is bash and it inherits a
802       # broken ls alias from the environment.  This has actually
803       # happened.  Such a system could not be considered "sane".
804       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
805 alias in your environment" 1>&2; exit 1; }
806    fi
807
808    test "$2" = conftestfile
809    )
810 then
811    # Ok.
812    :
813 else
814    { echo "configure: error: newly created file is older than distributed files!
815 Check your system clock" 1>&2; exit 1; }
816 fi
817 rm -f conftest*
818 echo "$ac_t""yes" 1>&6
819 if test "$program_transform_name" = s,x,x,; then
820   program_transform_name=
821 else
822   # Double any \ or $.  echo might interpret backslashes.
823   cat <<\EOF_SED > conftestsed
824 s,\\,\\\\,g; s,\$,$$,g
825 EOF_SED
826   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
827   rm -f conftestsed
828 fi
829 test "$program_prefix" != NONE &&
830   program_transform_name="s,^,${program_prefix},; $program_transform_name"
831 # Use a double $ so make ignores it.
832 test "$program_suffix" != NONE &&
833   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
834
835 # sed with no file args requires a program.
836 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
837
838 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
839 echo "configure:840: checking whether ${MAKE-make} sets \${MAKE}" >&5
840 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
841 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
842   echo $ac_n "(cached) $ac_c" 1>&6
843 else
844   cat > conftestmake <<\EOF
845 all:
846         @echo 'ac_maketemp="${MAKE}"'
847 EOF
848 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
849 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
850 if test -n "$ac_maketemp"; then
851   eval ac_cv_prog_make_${ac_make}_set=yes
852 else
853   eval ac_cv_prog_make_${ac_make}_set=no
854 fi
855 rm -f conftestmake
856 fi
857 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
858   echo "$ac_t""yes" 1>&6
859   SET_MAKE=
860 else
861   echo "$ac_t""no" 1>&6
862   SET_MAKE="MAKE=${MAKE-make}"
863 fi
864
865
866 PACKAGE=OpenLDAP
867
868 VERSION=$OL_VERSION
869
870 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
871   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
872 fi
873
874
875
876 missing_dir=`cd $ac_aux_dir && pwd`
877 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
878 echo "configure:879: checking for working aclocal" >&5
879 # Run test in a subshell; some versions of sh will print an error if
880 # an executable is not found, even if stderr is redirected.
881 # Redirect stdin to placate older versions of autoconf.  Sigh.
882 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
883    ACLOCAL=aclocal
884    echo "$ac_t""found" 1>&6
885 else
886    ACLOCAL="$missing_dir/missing aclocal"
887    echo "$ac_t""missing" 1>&6
888 fi
889
890 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
891 echo "configure:892: checking for working autoconf" >&5
892 # Run test in a subshell; some versions of sh will print an error if
893 # an executable is not found, even if stderr is redirected.
894 # Redirect stdin to placate older versions of autoconf.  Sigh.
895 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
896    AUTOCONF=autoconf
897    echo "$ac_t""found" 1>&6
898 else
899    AUTOCONF="$missing_dir/missing autoconf"
900    echo "$ac_t""missing" 1>&6
901 fi
902
903 echo $ac_n "checking for working automake""... $ac_c" 1>&6
904 echo "configure:905: checking for working automake" >&5
905 # Run test in a subshell; some versions of sh will print an error if
906 # an executable is not found, even if stderr is redirected.
907 # Redirect stdin to placate older versions of autoconf.  Sigh.
908 if (automake --version) < /dev/null > /dev/null 2>&1; then
909    AUTOMAKE=automake
910    echo "$ac_t""found" 1>&6
911 else
912    AUTOMAKE="$missing_dir/missing automake"
913    echo "$ac_t""missing" 1>&6
914 fi
915
916 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
917 echo "configure:918: checking for working autoheader" >&5
918 # Run test in a subshell; some versions of sh will print an error if
919 # an executable is not found, even if stderr is redirected.
920 # Redirect stdin to placate older versions of autoconf.  Sigh.
921 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
922    AUTOHEADER=autoheader
923    echo "$ac_t""found" 1>&6
924 else
925    AUTOHEADER="$missing_dir/missing autoheader"
926    echo "$ac_t""missing" 1>&6
927 fi
928
929 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
930 echo "configure:931: checking for working makeinfo" >&5
931 # Run test in a subshell; some versions of sh will print an error if
932 # an executable is not found, even if stderr is redirected.
933 # Redirect stdin to placate older versions of autoconf.  Sigh.
934 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
935    MAKEINFO=makeinfo
936    echo "$ac_t""found" 1>&6
937 else
938    MAKEINFO="$missing_dir/missing makeinfo"
939    echo "$ac_t""missing" 1>&6
940 fi
941
942
943
944 cat >> confdefs.h <<EOF
945 #define OPENLDAP_PACKAGE "$PACKAGE"
946 EOF
947
948 cat >> confdefs.h <<EOF
949 #define OPENLDAP_VERSION "$VERSION"
950 EOF
951
952
953
954
955 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
956 echo "configure:957: checking configure arguments" >&5
957
958
959 top_builddir=`pwd`
960
961 cat >> confdefs.h <<\EOF
962 #define HAVE_MKVERSION 1
963 EOF
964
965
966 ldap_subdir="openldap"
967
968 # Check whether --with-subdir or --without-subdir was given.
969 if test "${with_subdir+set}" = set; then
970   withval="$with_subdir"
971   
972         if test "$withval" = "no"; then
973                 ldap_subdir=""
974         elif test "$withval" != "yes"; then
975                 ldap_subdir="$withval"
976         fi
977
978 fi
979
980
981 # OpenLDAP --enable-debug
982         # Check whether --enable-debug or --disable-debug was given.
983 if test "${enable_debug+set}" = set; then
984   enableval="$enable_debug"
985   
986         ol_arg=invalid
987         for ol_val in auto yes no ; do
988                 if test "$enableval" = "$ol_val" ; then
989                         ol_arg="$ol_val"
990                 fi
991         done
992         if test "$ol_arg" = "invalid" ; then
993                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
994         fi
995         ol_enable_debug="$ol_arg"
996
997 else
998         ol_enable_debug="yes"
999 fi
1000 # end --enable-debug
1001 # OpenLDAP --enable-syslog
1002         # Check whether --enable-syslog or --disable-syslog was given.
1003 if test "${enable_syslog+set}" = set; then
1004   enableval="$enable_syslog"
1005   
1006         ol_arg=invalid
1007         for ol_val in auto yes no ; do
1008                 if test "$enableval" = "$ol_val" ; then
1009                         ol_arg="$ol_val"
1010                 fi
1011         done
1012         if test "$ol_arg" = "invalid" ; then
1013                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1014         fi
1015         ol_enable_syslog="$ol_arg"
1016
1017 else
1018         ol_enable_syslog="auto"
1019 fi
1020 # end --enable-syslog
1021 # OpenLDAP --enable-proctitle
1022         # Check whether --enable-proctitle or --disable-proctitle was given.
1023 if test "${enable_proctitle+set}" = set; then
1024   enableval="$enable_proctitle"
1025   
1026         ol_arg=invalid
1027         for ol_val in auto yes no ; do
1028                 if test "$enableval" = "$ol_val" ; then
1029                         ol_arg="$ol_val"
1030                 fi
1031         done
1032         if test "$ol_arg" = "invalid" ; then
1033                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1034         fi
1035         ol_enable_proctitle="$ol_arg"
1036
1037 else
1038         ol_enable_proctitle="yes"
1039 fi
1040 # end --enable-proctitle
1041 # OpenLDAP --enable-cache
1042         # Check whether --enable-cache or --disable-cache was given.
1043 if test "${enable_cache+set}" = set; then
1044   enableval="$enable_cache"
1045   
1046         ol_arg=invalid
1047         for ol_val in auto yes no ; do
1048                 if test "$enableval" = "$ol_val" ; then
1049                         ol_arg="$ol_val"
1050                 fi
1051         done
1052         if test "$ol_arg" = "invalid" ; then
1053                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1054         fi
1055         ol_enable_cache="$ol_arg"
1056
1057 else
1058         ol_enable_cache="yes"
1059 fi
1060 # end --enable-cache
1061 # OpenLDAP --enable-dns
1062         # Check whether --enable-dns or --disable-dns was given.
1063 if test "${enable_dns+set}" = set; then
1064   enableval="$enable_dns"
1065   
1066         ol_arg=invalid
1067         for ol_val in auto yes no ; do
1068                 if test "$enableval" = "$ol_val" ; then
1069                         ol_arg="$ol_val"
1070                 fi
1071         done
1072         if test "$ol_arg" = "invalid" ; then
1073                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1074         fi
1075         ol_enable_dns="$ol_arg"
1076
1077 else
1078         ol_enable_dns="no"
1079 fi
1080 # end --enable-dns
1081 # OpenLDAP --enable-referrals
1082         # Check whether --enable-referrals or --disable-referrals was given.
1083 if test "${enable_referrals+set}" = set; then
1084   enableval="$enable_referrals"
1085   
1086         ol_arg=invalid
1087         for ol_val in auto yes no ; do
1088                 if test "$enableval" = "$ol_val" ; then
1089                         ol_arg="$ol_val"
1090                 fi
1091         done
1092         if test "$ol_arg" = "invalid" ; then
1093                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1094         fi
1095         ol_enable_referrals="$ol_arg"
1096
1097 else
1098         ol_enable_referrals="yes"
1099 fi
1100 # end --enable-referrals
1101 # OpenLDAP --enable-cldap
1102         # Check whether --enable-cldap or --disable-cldap was given.
1103 if test "${enable_cldap+set}" = set; then
1104   enableval="$enable_cldap"
1105   
1106         ol_arg=invalid
1107         for ol_val in auto yes no ; do
1108                 if test "$enableval" = "$ol_val" ; then
1109                         ol_arg="$ol_val"
1110                 fi
1111         done
1112         if test "$ol_arg" = "invalid" ; then
1113                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1114         fi
1115         ol_enable_cldap="$ol_arg"
1116
1117 else
1118         ol_enable_cldap="no"
1119 fi
1120 # end --enable-cldap
1121 # OpenLDAP --enable-x_compile
1122         # Check whether --enable-x_compile or --disable-x_compile was given.
1123 if test "${enable_x_compile+set}" = set; then
1124   enableval="$enable_x_compile"
1125   
1126         ol_arg=invalid
1127         for ol_val in yes no ; do
1128                 if test "$enableval" = "$ol_val" ; then
1129                         ol_arg="$ol_val"
1130                 fi
1131         done
1132         if test "$ol_arg" = "invalid" ; then
1133                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1134         fi
1135         ol_enable_x_compile="$ol_arg"
1136
1137 else
1138         ol_enable_x_compile="no"
1139 fi
1140 # end --enable-x_compile
1141
1142 # OpenLDAP --enable-dmalloc
1143         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1144 if test "${enable_dmalloc+set}" = set; then
1145   enableval="$enable_dmalloc"
1146   
1147         ol_arg=invalid
1148         for ol_val in auto yes no ; do
1149                 if test "$enableval" = "$ol_val" ; then
1150                         ol_arg="$ol_val"
1151                 fi
1152         done
1153         if test "$ol_arg" = "invalid" ; then
1154                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1155         fi
1156         ol_enable_dmalloc="$ol_arg"
1157
1158 else
1159         ol_enable_dmalloc="no"
1160 fi
1161 # end --enable-dmalloc
1162
1163 # OpenLDAP --with-kerberos
1164         # Check whether --with-kerberos or --without-kerberos was given.
1165 if test "${with_kerberos+set}" = set; then
1166   withval="$with_kerberos"
1167   
1168         ol_arg=invalid
1169         for ol_val in auto k5 k4 afs yes no ; do
1170                 if test "$withval" = "$ol_val" ; then
1171                         ol_arg="$ol_val"
1172                 fi
1173         done
1174         if test "$ol_arg" = "invalid" ; then
1175                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1176         fi
1177         ol_with_kerberos="$ol_arg"
1178
1179 else
1180         ol_with_kerberos="auto"
1181 fi
1182 # end --with-kerberos
1183
1184 # OpenLDAP --with-readline
1185         # Check whether --with-readline or --without-readline was given.
1186 if test "${with_readline+set}" = set; then
1187   withval="$with_readline"
1188   
1189         ol_arg=invalid
1190         for ol_val in auto yes no  ; do
1191                 if test "$withval" = "$ol_val" ; then
1192                         ol_arg="$ol_val"
1193                 fi
1194         done
1195         if test "$ol_arg" = "invalid" ; then
1196                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1197         fi
1198         ol_with_readline="$ol_arg"
1199
1200 else
1201         ol_with_readline="auto"
1202 fi
1203 # end --with-readline
1204
1205 # OpenLDAP --with-threads
1206         # Check whether --with-threads or --without-threads was given.
1207 if test "${with_threads+set}" = set; then
1208   withval="$with_threads"
1209   
1210         ol_arg=invalid
1211         for ol_val in auto posix mach lwp yes no manual  ; do
1212                 if test "$withval" = "$ol_val" ; then
1213                         ol_arg="$ol_val"
1214                 fi
1215         done
1216         if test "$ol_arg" = "invalid" ; then
1217                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1218         fi
1219         ol_with_threads="$ol_arg"
1220
1221 else
1222         ol_with_threads="auto"
1223 fi
1224 # end --with-threads
1225
1226 # OpenLDAP --with-tls
1227         # Check whether --with-tls or --without-tls was given.
1228 if test "${with_tls+set}" = set; then
1229   withval="$with_tls"
1230   
1231         ol_arg=invalid
1232         for ol_val in auto ssleay openssl yes no  ; do
1233                 if test "$withval" = "$ol_val" ; then
1234                         ol_arg="$ol_val"
1235                 fi
1236         done
1237         if test "$ol_arg" = "invalid" ; then
1238                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1239         fi
1240         ol_with_tls="$ol_arg"
1241
1242 else
1243         ol_with_tls="auto"
1244 fi
1245 # end --with-tls
1246
1247 # OpenLDAP --with-yielding_select
1248         # Check whether --with-yielding_select or --without-yielding_select was given.
1249 if test "${with_yielding_select+set}" = set; then
1250   withval="$with_yielding_select"
1251   
1252         ol_arg=invalid
1253         for ol_val in auto yes no manual  ; do
1254                 if test "$withval" = "$ol_val" ; then
1255                         ol_arg="$ol_val"
1256                 fi
1257         done
1258         if test "$ol_arg" = "invalid" ; then
1259                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1260         fi
1261         ol_with_yielding_select="$ol_arg"
1262
1263 else
1264         ol_with_yielding_select="auto"
1265 fi
1266 # end --with-yielding_select
1267
1268
1269
1270 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1271 if test "${with_xxldapdoptions+set}" = set; then
1272   withval="$with_xxldapdoptions"
1273   :
1274 fi
1275
1276 # OpenLDAP --enable-ldapd
1277         # Check whether --enable-ldapd or --disable-ldapd was given.
1278 if test "${enable_ldapd+set}" = set; then
1279   enableval="$enable_ldapd"
1280   
1281         ol_arg=invalid
1282         for ol_val in auto yes no ; do
1283                 if test "$enableval" = "$ol_val" ; then
1284                         ol_arg="$ol_val"
1285                 fi
1286         done
1287         if test "$ol_arg" = "invalid" ; then
1288                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1289         fi
1290         ol_enable_ldapd="$ol_arg"
1291
1292 else
1293         ol_enable_ldapd="no"
1294 fi
1295 # end --enable-ldapd
1296
1297 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1298 if test "${with_xxslapdoptions+set}" = set; then
1299   withval="$with_xxslapdoptions"
1300   :
1301 fi
1302
1303 # OpenLDAP --enable-slapd
1304         # Check whether --enable-slapd or --disable-slapd was given.
1305 if test "${enable_slapd+set}" = set; then
1306   enableval="$enable_slapd"
1307   
1308         ol_arg=invalid
1309         for ol_val in auto yes no ; do
1310                 if test "$enableval" = "$ol_val" ; then
1311                         ol_arg="$ol_val"
1312                 fi
1313         done
1314         if test "$ol_arg" = "invalid" ; then
1315                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1316         fi
1317         ol_enable_slapd="$ol_arg"
1318
1319 else
1320         ol_enable_slapd="yes"
1321 fi
1322 # end --enable-slapd
1323 # OpenLDAP --enable-aclgroups
1324         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1325 if test "${enable_aclgroups+set}" = set; then
1326   enableval="$enable_aclgroups"
1327   
1328         ol_arg=invalid
1329         for ol_val in auto yes no ; do
1330                 if test "$enableval" = "$ol_val" ; then
1331                         ol_arg="$ol_val"
1332                 fi
1333         done
1334         if test "$ol_arg" = "invalid" ; then
1335                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1336         fi
1337         ol_enable_aclgroups="$ol_arg"
1338
1339 else
1340         ol_enable_aclgroups="auto"
1341 fi
1342 # end --enable-aclgroups
1343 # OpenLDAP --enable-cleartext
1344         # Check whether --enable-cleartext or --disable-cleartext was given.
1345 if test "${enable_cleartext+set}" = set; then
1346   enableval="$enable_cleartext"
1347   
1348         ol_arg=invalid
1349         for ol_val in auto yes no ; do
1350                 if test "$enableval" = "$ol_val" ; then
1351                         ol_arg="$ol_val"
1352                 fi
1353         done
1354         if test "$ol_arg" = "invalid" ; then
1355                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1356         fi
1357         ol_enable_cleartext="$ol_arg"
1358
1359 else
1360         ol_enable_cleartext="yes"
1361 fi
1362 # end --enable-cleartext
1363 # OpenLDAP --enable-crypt
1364         # Check whether --enable-crypt or --disable-crypt was given.
1365 if test "${enable_crypt+set}" = set; then
1366   enableval="$enable_crypt"
1367   
1368         ol_arg=invalid
1369         for ol_val in auto yes no ; do
1370                 if test "$enableval" = "$ol_val" ; then
1371                         ol_arg="$ol_val"
1372                 fi
1373         done
1374         if test "$ol_arg" = "invalid" ; then
1375                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1376         fi
1377         ol_enable_crypt="$ol_arg"
1378
1379 else
1380         ol_enable_crypt="auto"
1381 fi
1382 # end --enable-crypt
1383 # OpenLDAP --enable-modules
1384         # Check whether --enable-modules or --disable-modules was given.
1385 if test "${enable_modules+set}" = set; then
1386   enableval="$enable_modules"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no ; do
1390                 if test "$enableval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1396         fi
1397         ol_enable_modules="$ol_arg"
1398
1399 else
1400         ol_enable_modules="no"
1401 fi
1402 # end --enable-modules
1403 # OpenLDAP --enable-phonetic
1404         # Check whether --enable-phonetic or --disable-phonetic was given.
1405 if test "${enable_phonetic+set}" = set; then
1406   enableval="$enable_phonetic"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no ; do
1410                 if test "$enableval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1416         fi
1417         ol_enable_phonetic="$ol_arg"
1418
1419 else
1420         ol_enable_phonetic="no"
1421 fi
1422 # end --enable-phonetic
1423 # OpenLDAP --enable-rlookups
1424         # Check whether --enable-rlookups or --disable-rlookups was given.
1425 if test "${enable_rlookups+set}" = set; then
1426   enableval="$enable_rlookups"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no ; do
1430                 if test "$enableval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1436         fi
1437         ol_enable_rlookups="$ol_arg"
1438
1439 else
1440         ol_enable_rlookups="auto"
1441 fi
1442 # end --enable-rlookups
1443 # OpenLDAP --enable-wrappers
1444         # Check whether --enable-wrappers or --disable-wrappers was given.
1445 if test "${enable_wrappers+set}" = set; then
1446   enableval="$enable_wrappers"
1447   
1448         ol_arg=invalid
1449         for ol_val in auto yes no ; do
1450                 if test "$enableval" = "$ol_val" ; then
1451                         ol_arg="$ol_val"
1452                 fi
1453         done
1454         if test "$ol_arg" = "invalid" ; then
1455                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1456         fi
1457         ol_enable_wrappers="$ol_arg"
1458
1459 else
1460         ol_enable_wrappers="no"
1461 fi
1462 # end --enable-wrappers
1463
1464 # OpenLDAP --enable-bdb2
1465         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1466 if test "${enable_bdb2+set}" = set; then
1467   enableval="$enable_bdb2"
1468   
1469         ol_arg=invalid
1470         for ol_val in auto yes no ; do
1471                 if test "$enableval" = "$ol_val" ; then
1472                         ol_arg="$ol_val"
1473                 fi
1474         done
1475         if test "$ol_arg" = "invalid" ; then
1476                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1477         fi
1478         ol_enable_bdb2="$ol_arg"
1479
1480 else
1481         ol_enable_bdb2="no"
1482 fi
1483 # end --enable-bdb2
1484 # OpenLDAP --enable-ldap
1485         # Check whether --enable-ldap or --disable-ldap was given.
1486 if test "${enable_ldap+set}" = set; then
1487   enableval="$enable_ldap"
1488   
1489         ol_arg=invalid
1490         for ol_val in auto yes no ; do
1491                 if test "$enableval" = "$ol_val" ; then
1492                         ol_arg="$ol_val"
1493                 fi
1494         done
1495         if test "$ol_arg" = "invalid" ; then
1496                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1497         fi
1498         ol_enable_ldap="$ol_arg"
1499
1500 else
1501         ol_enable_ldap="no"
1502 fi
1503 # end --enable-ldap
1504 # OpenLDAP --enable-ldbm
1505         # Check whether --enable-ldbm or --disable-ldbm was given.
1506 if test "${enable_ldbm+set}" = set; then
1507   enableval="$enable_ldbm"
1508   
1509         ol_arg=invalid
1510         for ol_val in auto yes no ; do
1511                 if test "$enableval" = "$ol_val" ; then
1512                         ol_arg="$ol_val"
1513                 fi
1514         done
1515         if test "$ol_arg" = "invalid" ; then
1516                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1517         fi
1518         ol_enable_ldbm="$ol_arg"
1519
1520 else
1521         ol_enable_ldbm="yes"
1522 fi
1523 # end --enable-ldbm
1524 # OpenLDAP --with-ldbm_api
1525         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1526 if test "${with_ldbm_api+set}" = set; then
1527   withval="$with_ldbm_api"
1528   
1529         ol_arg=invalid
1530         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1531                 if test "$withval" = "$ol_val" ; then
1532                         ol_arg="$ol_val"
1533                 fi
1534         done
1535         if test "$ol_arg" = "invalid" ; then
1536                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1537         fi
1538         ol_with_ldbm_api="$ol_arg"
1539
1540 else
1541         ol_with_ldbm_api="auto"
1542 fi
1543 # end --with-ldbm_api
1544
1545 # OpenLDAP --with-ldbm_type
1546         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1547 if test "${with_ldbm_type+set}" = set; then
1548   withval="$with_ldbm_type"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto btree hash ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1558         fi
1559         ol_with_ldbm_type="$ol_arg"
1560
1561 else
1562         ol_with_ldbm_type="auto"
1563 fi
1564 # end --with-ldbm_type
1565
1566
1567 # OpenLDAP --enable-passwd
1568         # Check whether --enable-passwd or --disable-passwd was given.
1569 if test "${enable_passwd+set}" = set; then
1570   enableval="$enable_passwd"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1580         fi
1581         ol_enable_passwd="$ol_arg"
1582
1583 else
1584         ol_enable_passwd="no"
1585 fi
1586 # end --enable-passwd
1587 # OpenLDAP --enable-perl
1588         # Check whether --enable-perl or --disable-perl was given.
1589 if test "${enable_perl+set}" = set; then
1590   enableval="$enable_perl"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1600         fi
1601         ol_enable_perl="$ol_arg"
1602
1603 else
1604         ol_enable_perl="no"
1605 fi
1606 # end --enable-perl
1607 # OpenLDAP --enable-shell
1608         # Check whether --enable-shell or --disable-shell was given.
1609 if test "${enable_shell+set}" = set; then
1610   enableval="$enable_shell"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1620         fi
1621         ol_enable_shell="$ol_arg"
1622
1623 else
1624         ol_enable_shell="no"
1625 fi
1626 # end --enable-shell
1627 # OpenLDAP --enable-tcl
1628         # Check whether --enable-tcl or --disable-tcl was given.
1629 if test "${enable_tcl+set}" = set; then
1630   enableval="$enable_tcl"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1640         fi
1641         ol_enable_tcl="$ol_arg"
1642
1643 else
1644         ol_enable_tcl="no"
1645 fi
1646 # end --enable-tcl
1647
1648 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1649 if test "${with_xxslurpdoptions+set}" = set; then
1650   withval="$with_xxslurpdoptions"
1651   :
1652 fi
1653
1654 # OpenLDAP --enable-slurpd
1655         # Check whether --enable-slurpd or --disable-slurpd was given.
1656 if test "${enable_slurpd+set}" = set; then
1657   enableval="$enable_slurpd"
1658   
1659         ol_arg=invalid
1660         for ol_val in auto yes no ; do
1661                 if test "$enableval" = "$ol_val" ; then
1662                         ol_arg="$ol_val"
1663                 fi
1664         done
1665         if test "$ol_arg" = "invalid" ; then
1666                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1667         fi
1668         ol_enable_slurpd="$ol_arg"
1669
1670 else
1671         ol_enable_slurpd="auto"
1672 fi
1673 # end --enable-slurpd
1674
1675 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1676 if test "${with_xxliboptions+set}" = set; then
1677   withval="$with_xxliboptions"
1678   :
1679 fi
1680
1681 # Check whether --enable-static or --disable-static was given.
1682 if test "${enable_static+set}" = set; then
1683   enableval="$enable_static"
1684   p=${PACKAGE-default}
1685 case "$enableval" in
1686 yes) enable_static=yes ;;
1687 no) enable_static=no ;;
1688 *)
1689   enable_static=no
1690   # Look at the argument we got.  We use all the common list separators.
1691   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1692   for pkg in $enableval; do
1693     if test "X$pkg" = "X$p"; then
1694       enable_static=yes
1695     fi
1696   done
1697   IFS="$ac_save_ifs"
1698   ;;
1699 esac
1700 else
1701   enable_static=yes
1702 fi
1703
1704 # Check whether --enable-shared or --disable-shared was given.
1705 if test "${enable_shared+set}" = set; then
1706   enableval="$enable_shared"
1707   p=${PACKAGE-default}
1708 case "$enableval" in
1709 yes) enable_shared=yes ;;
1710 no) enable_shared=no ;;
1711 *)
1712   enable_shared=no
1713   # Look at the argument we got.  We use all the common list separators.
1714   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1715   for pkg in $enableval; do
1716     if test "X$pkg" = "X$p"; then
1717       enable_shared=yes
1718     fi
1719   done
1720   IFS="$ac_save_ifs"
1721   ;;
1722 esac
1723 else
1724   enable_shared=yes
1725 fi
1726
1727
1728 # validate options
1729 if test $ol_enable_dns = yes ; then
1730         if test $ol_enable_referrals = no ; then
1731                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1732         fi
1733         if test $ol_enable_referrals = auto ; then
1734                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1735                 ol_enable_referrals=yes
1736         fi
1737 fi
1738
1739 if test $ol_enable_slapd = no ; then
1740                 if test $ol_enable_bdb2 = yes ; then
1741                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
1742         fi
1743         if test $ol_enable_ldap = yes ; then
1744                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
1745         fi
1746         if test $ol_enable_ldbm = yes ; then
1747                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
1748         fi
1749         if test $ol_enable_passwd = yes ; then
1750                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
1751         fi
1752         if test $ol_enable_perl = yes ; then
1753                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
1754         fi
1755         if test $ol_enable_shell = yes ; then
1756                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
1757         fi
1758         if test $ol_enable_tcl = yes ; then
1759                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
1760         fi
1761         if test $ol_enable_aclgroups = yes ; then
1762                 echo "configure: warning: slapd disabled, ignoring --enable-aclgroups argument" 1>&2
1763         fi
1764         if test $ol_enable_modules = yes ; then
1765                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
1766         fi
1767         if test $ol_enable_wrappers = yes ; then
1768                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
1769         fi
1770         if test $ol_enable_phonetic = yes ; then
1771                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
1772         fi
1773         if test $ol_enable_rlookups = yes ; then
1774                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
1775         fi
1776         if test $ol_with_ldbm_api != auto ; then
1777                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
1778         fi
1779         if test $ol_with_ldbm_type != auto ; then
1780                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
1781         fi
1782         if test $ol_enable_slurpd = yes ; then
1783                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1784         fi
1785
1786         # force settings to no
1787         ol_enable_bdb2=no
1788         ol_enable_ldap=no
1789         ol_enable_ldbm=no
1790         ol_enable_passwd=no
1791         ol_enable_perl=no
1792         ol_enable_shell=no
1793         ol_enable_tcl=no
1794
1795         ol_enable_aclgroups=no
1796         ol_enable_modules=no
1797         ol_enable_phonetic=no
1798         ol_enable_rlookups=no
1799         ol_enable_wrappers=no
1800
1801         ol_with_ldbm_api=no
1802         ol_with_ldbm_type=no
1803
1804         ol_enable_slurpd=no
1805
1806 elif test $ol_enable_ldbm = no ; then
1807         
1808         if test $ol_with_ldbm_api != auto ; then
1809                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
1810         fi
1811
1812         if test $ol_with_ldbm_type != auto ; then
1813                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
1814         fi
1815
1816         if test $ol_enable_bdb2 = yes ; then
1817                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1818         fi
1819
1820         if test $ol_enable_modules != yes -a \
1821                 $ol_enable_ldap = no -a \
1822                 $ol_enable_passwd = no -a \
1823                 $ol_enable_perl = no -a \
1824                 $ol_enable_shell = no -a \
1825                 $ol_enable_tcl = no ; then
1826                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1827         fi
1828
1829         ol_with_ldbm_api=no
1830         ol_with_ldbm_type=no
1831
1832 elif test $ol_enable_bdb2 = yes ; then
1833         
1834         if test $ol_with_ldbm_api != auto -a \
1835                 $ol_with_ldbm_api != db2 ; then
1836                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1837         fi
1838
1839         ol_with_ldbm_api=db2
1840
1841 else
1842         
1843         if test $ol_enable_bdb2 != no ; then
1844                 if test $ol_with_ldbm_api != auto -a \
1845                         $ol_with_ldbm_api != db2 ; then
1846                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1847                         ol_enable_bdb2=no
1848                 fi
1849         fi
1850
1851         if test $ol_with_ldbm_api = gdbm -a \
1852                 $ol_with_ldbm_type = btree ; then
1853                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1854         fi
1855         if test $ol_with_ldbm_api = mdbm -a \
1856                 $ol_with_ldbm_type = btree ; then
1857                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1858         fi
1859         if test $ol_with_ldbm_api = ndbm -a \
1860                 $ol_with_ldbm_type = btree ; then
1861                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1862         fi
1863 fi
1864
1865 if test $ol_enable_slurpd = yes ; then
1866                 if test $ol_with_threads = no ; then
1867                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1868         fi
1869 fi
1870
1871 echo "$ac_t""done" 1>&6
1872
1873 ## Initialize vars
1874 LDAP_LIBS=
1875 LDBM_LIBS=
1876 LTHREAD_LIBS=
1877 LUTIL_LIBS=
1878
1879 LDAPD_LIBS=
1880 SLAPD_LIBS=
1881 SLURPD_LIBS=
1882
1883 BUILD_LDAPD=no
1884 BUILD_SLAPD=no
1885 BUILD_SLURPD=no
1886
1887 BUILD_BDB2=no
1888 BUILD_LDAP=no
1889 BUILD_LDBM=no
1890 BUILD_PASSWD=no
1891 BUILD_PERL=no
1892 BUILD_SHELL=no
1893 BUILD_TCL=no
1894 BUILD_THREAD=no
1895
1896 SLAPD_MODULES_LDFLAGS=
1897 SLAPD_MODULES_CPPFLAGS=
1898
1899 SLAPD_PERL_LDFLAGS=
1900 SLAPD_PERL_CPPFLAGS=
1901
1902 KRB_LIBS=
1903 READLINE_LIBS=
1904 TERMCAP_LIBS=
1905 TLS_LIBS=
1906
1907
1908
1909
1910 ol_aix_threads=no
1911 case "$target" in
1912 *-*-aix*)       if test -z "CC" ; then
1913                 case "$ol_with_threads" in
1914                 auto | yes |  posix) ol_aix_threads=yes ;;
1915                 esac
1916         fi
1917 ;;
1918 esac
1919
1920 if test $ol_aix_threads = yes ; then
1921         if test -z "${CC}" ; then
1922                 for ac_prog in cc_r xlc_r cc
1923 do
1924 # Extract the first word of "$ac_prog", so it can be a program name with args.
1925 set dummy $ac_prog; ac_word=$2
1926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1927 echo "configure:1928: checking for $ac_word" >&5
1928 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1929   echo $ac_n "(cached) $ac_c" 1>&6
1930 else
1931   if test -n "$CC"; then
1932   ac_cv_prog_CC="$CC" # Let the user override the test.
1933 else
1934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1935   ac_dummy="$PATH"
1936   for ac_dir in $ac_dummy; do
1937     test -z "$ac_dir" && ac_dir=.
1938     if test -f $ac_dir/$ac_word; then
1939       ac_cv_prog_CC="$ac_prog"
1940       break
1941     fi
1942   done
1943   IFS="$ac_save_ifs"
1944 fi
1945 fi
1946 CC="$ac_cv_prog_CC"
1947 if test -n "$CC"; then
1948   echo "$ac_t""$CC" 1>&6
1949 else
1950   echo "$ac_t""no" 1>&6
1951 fi
1952
1953 test -n "$CC" && break
1954 done
1955
1956
1957                 if test "$CC" = cc ; then
1958                                                 if test $ol_with_threads != auto ; then
1959                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
1960                         else
1961                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
1962                         fi
1963                         ol_with_threads=no
1964                 fi
1965         fi
1966
1967         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
1968                 ol_with_threads=posix
1969                 ol_cv_pthread_create=yes
1970         fi
1971 fi
1972
1973 if test -z "${CC}"; then
1974         for ac_prog in cc
1975 do
1976 # Extract the first word of "$ac_prog", so it can be a program name with args.
1977 set dummy $ac_prog; ac_word=$2
1978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1979 echo "configure:1980: checking for $ac_word" >&5
1980 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1981   echo $ac_n "(cached) $ac_c" 1>&6
1982 else
1983   if test -n "$CC"; then
1984   ac_cv_prog_CC="$CC" # Let the user override the test.
1985 else
1986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1987   ac_dummy="$PATH"
1988   for ac_dir in $ac_dummy; do
1989     test -z "$ac_dir" && ac_dir=.
1990     if test -f $ac_dir/$ac_word; then
1991       ac_cv_prog_CC="$ac_prog"
1992       break
1993     fi
1994   done
1995   IFS="$ac_save_ifs"
1996 fi
1997 fi
1998 CC="$ac_cv_prog_CC"
1999 if test -n "$CC"; then
2000   echo "$ac_t""$CC" 1>&6
2001 else
2002   echo "$ac_t""no" 1>&6
2003 fi
2004
2005 test -n "$CC" && break
2006 done
2007
2008 fi
2009
2010
2011 # Extract the first word of "ranlib", so it can be a program name with args.
2012 set dummy ranlib; ac_word=$2
2013 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2014 echo "configure:2015: checking for $ac_word" >&5
2015 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2016   echo $ac_n "(cached) $ac_c" 1>&6
2017 else
2018   if test -n "$RANLIB"; then
2019   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2020 else
2021   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2022   ac_dummy="$PATH"
2023   for ac_dir in $ac_dummy; do
2024     test -z "$ac_dir" && ac_dir=.
2025     if test -f $ac_dir/$ac_word; then
2026       ac_cv_prog_RANLIB="ranlib"
2027       break
2028     fi
2029   done
2030   IFS="$ac_save_ifs"
2031   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2032 fi
2033 fi
2034 RANLIB="$ac_cv_prog_RANLIB"
2035 if test -n "$RANLIB"; then
2036   echo "$ac_t""$RANLIB" 1>&6
2037 else
2038   echo "$ac_t""no" 1>&6
2039 fi
2040
2041 # Extract the first word of "gcc", so it can be a program name with args.
2042 set dummy gcc; ac_word=$2
2043 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2044 echo "configure:2045: checking for $ac_word" >&5
2045 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2046   echo $ac_n "(cached) $ac_c" 1>&6
2047 else
2048   if test -n "$CC"; then
2049   ac_cv_prog_CC="$CC" # Let the user override the test.
2050 else
2051   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2052   ac_dummy="$PATH"
2053   for ac_dir in $ac_dummy; do
2054     test -z "$ac_dir" && ac_dir=.
2055     if test -f $ac_dir/$ac_word; then
2056       ac_cv_prog_CC="gcc"
2057       break
2058     fi
2059   done
2060   IFS="$ac_save_ifs"
2061 fi
2062 fi
2063 CC="$ac_cv_prog_CC"
2064 if test -n "$CC"; then
2065   echo "$ac_t""$CC" 1>&6
2066 else
2067   echo "$ac_t""no" 1>&6
2068 fi
2069
2070 if test -z "$CC"; then
2071   # Extract the first word of "cc", so it can be a program name with args.
2072 set dummy cc; ac_word=$2
2073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2074 echo "configure:2075: checking for $ac_word" >&5
2075 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2076   echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078   if test -n "$CC"; then
2079   ac_cv_prog_CC="$CC" # Let the user override the test.
2080 else
2081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2082   ac_prog_rejected=no
2083   ac_dummy="$PATH"
2084   for ac_dir in $ac_dummy; do
2085     test -z "$ac_dir" && ac_dir=.
2086     if test -f $ac_dir/$ac_word; then
2087       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2088         ac_prog_rejected=yes
2089         continue
2090       fi
2091       ac_cv_prog_CC="cc"
2092       break
2093     fi
2094   done
2095   IFS="$ac_save_ifs"
2096 if test $ac_prog_rejected = yes; then
2097   # We found a bogon in the path, so make sure we never use it.
2098   set dummy $ac_cv_prog_CC
2099   shift
2100   if test $# -gt 0; then
2101     # We chose a different compiler from the bogus one.
2102     # However, it has the same basename, so the bogon will be chosen
2103     # first if we set CC to just the basename; use the full file name.
2104     shift
2105     set dummy "$ac_dir/$ac_word" "$@"
2106     shift
2107     ac_cv_prog_CC="$@"
2108   fi
2109 fi
2110 fi
2111 fi
2112 CC="$ac_cv_prog_CC"
2113 if test -n "$CC"; then
2114   echo "$ac_t""$CC" 1>&6
2115 else
2116   echo "$ac_t""no" 1>&6
2117 fi
2118
2119   if test -z "$CC"; then
2120     case "`uname -s`" in
2121     *win32* | *WIN32*)
2122       # Extract the first word of "cl", so it can be a program name with args.
2123 set dummy cl; ac_word=$2
2124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2125 echo "configure:2126: checking for $ac_word" >&5
2126 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2127   echo $ac_n "(cached) $ac_c" 1>&6
2128 else
2129   if test -n "$CC"; then
2130   ac_cv_prog_CC="$CC" # Let the user override the test.
2131 else
2132   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2133   ac_dummy="$PATH"
2134   for ac_dir in $ac_dummy; do
2135     test -z "$ac_dir" && ac_dir=.
2136     if test -f $ac_dir/$ac_word; then
2137       ac_cv_prog_CC="cl"
2138       break
2139     fi
2140   done
2141   IFS="$ac_save_ifs"
2142 fi
2143 fi
2144 CC="$ac_cv_prog_CC"
2145 if test -n "$CC"; then
2146   echo "$ac_t""$CC" 1>&6
2147 else
2148   echo "$ac_t""no" 1>&6
2149 fi
2150  ;;
2151     esac
2152   fi
2153   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2154 fi
2155
2156 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2157 echo "configure:2158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2158
2159 ac_ext=c
2160 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2161 ac_cpp='$CPP $CPPFLAGS'
2162 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2163 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2164 cross_compiling=$ac_cv_prog_cc_cross
2165
2166 cat > conftest.$ac_ext << EOF
2167
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170
2171 main(){return(0);}
2172 EOF
2173 if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2174   ac_cv_prog_cc_works=yes
2175   # If we can't run a trivial program, we are probably using a cross compiler.
2176   if (./conftest; exit) 2>/dev/null; then
2177     ac_cv_prog_cc_cross=no
2178   else
2179     ac_cv_prog_cc_cross=yes
2180   fi
2181 else
2182   echo "configure: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   ac_cv_prog_cc_works=no
2185 fi
2186 rm -fr conftest*
2187 ac_ext=c
2188 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2189 ac_cpp='$CPP $CPPFLAGS'
2190 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2191 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2192 cross_compiling=$ac_cv_prog_cc_cross
2193
2194 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2195 if test $ac_cv_prog_cc_works = no; then
2196   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2197 fi
2198 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2199 echo "configure:2200: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2200 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2201 cross_compiling=$ac_cv_prog_cc_cross
2202
2203 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2204 echo "configure:2205: checking whether we are using GNU C" >&5
2205 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2206   echo $ac_n "(cached) $ac_c" 1>&6
2207 else
2208   cat > conftest.c <<EOF
2209 #ifdef __GNUC__
2210   yes;
2211 #endif
2212 EOF
2213 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2214   ac_cv_prog_gcc=yes
2215 else
2216   ac_cv_prog_gcc=no
2217 fi
2218 fi
2219
2220 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2221
2222 if test $ac_cv_prog_gcc = yes; then
2223   GCC=yes
2224 else
2225   GCC=
2226 fi
2227
2228 ac_test_CFLAGS="${CFLAGS+set}"
2229 ac_save_CFLAGS="$CFLAGS"
2230 CFLAGS=
2231 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2232 echo "configure:2233: checking whether ${CC-cc} accepts -g" >&5
2233 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2234   echo $ac_n "(cached) $ac_c" 1>&6
2235 else
2236   echo 'void f(){}' > conftest.c
2237 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2238   ac_cv_prog_cc_g=yes
2239 else
2240   ac_cv_prog_cc_g=no
2241 fi
2242 rm -f conftest*
2243
2244 fi
2245
2246 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2247 if test "$ac_test_CFLAGS" = set; then
2248   CFLAGS="$ac_save_CFLAGS"
2249 elif test $ac_cv_prog_cc_g = yes; then
2250   if test "$GCC" = yes; then
2251     CFLAGS="-g -O2"
2252   else
2253     CFLAGS="-g"
2254   fi
2255 else
2256   if test "$GCC" = yes; then
2257     CFLAGS="-O2"
2258   else
2259     CFLAGS=
2260   fi
2261 fi
2262
2263 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2264 if test "${with_gnu_ld+set}" = set; then
2265   withval="$with_gnu_ld"
2266   test "$withval" = no || with_gnu_ld=yes
2267 else
2268   with_gnu_ld=no
2269 fi
2270
2271
2272 ac_prog=ld
2273 if test "$ac_cv_prog_gcc" = yes; then
2274   # Check if gcc -print-prog-name=ld gives a path.
2275   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2276 echo "configure:2277: checking for ld used by GCC" >&5
2277   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2278   case "$ac_prog" in
2279   # Accept absolute paths.
2280   /* | A-Za-z:\\*)
2281     test -z "$LD" && LD="$ac_prog"
2282     ;;
2283   "")
2284     # If it fails, then pretend we aren't using GCC.
2285     ac_prog=ld
2286     ;;
2287   *)
2288     # If it is relative, then search for the first ld in PATH.
2289     with_gnu_ld=unknown
2290     ;;
2291   esac
2292 elif test "$with_gnu_ld" = yes; then
2293   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2294 echo "configure:2295: checking for GNU ld" >&5
2295 else
2296   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2297 echo "configure:2298: checking for non-GNU ld" >&5
2298 fi
2299 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2300   echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302   if test -z "$LD"; then
2303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2304   for ac_dir in $PATH; do
2305     test -z "$ac_dir" && ac_dir=.
2306     if test -f "$ac_dir/$ac_prog"; then
2307       ac_cv_path_LD="$ac_dir/$ac_prog"
2308       # Check to see if the program is GNU ld.  I'd rather use --version,
2309       # but apparently some GNU ld's only accept -v.
2310       # Break only if it was the GNU/non-GNU ld that we prefer.
2311       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2312         test "$with_gnu_ld" != no && break
2313       else
2314         test "$with_gnu_ld" != yes && break
2315       fi
2316     fi
2317   done
2318   IFS="$ac_save_ifs"
2319 else
2320   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2321 fi
2322 fi
2323
2324 LD="$ac_cv_path_LD"
2325 if test -n "$LD"; then
2326   echo "$ac_t""$LD" 1>&6
2327 else
2328   echo "$ac_t""no" 1>&6
2329 fi
2330 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2331
2332 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2333 echo "configure:2334: checking if the linker ($LD) is GNU ld" >&5
2334 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2335   echo $ac_n "(cached) $ac_c" 1>&6
2336 else
2337   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2338 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2339   ac_cv_prog_gnu_ld=yes
2340 else
2341   ac_cv_prog_gnu_ld=no
2342 fi
2343 fi
2344
2345 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2346
2347
2348 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2349 echo "configure:2350: checking for BSD-compatible nm" >&5
2350 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2351   echo $ac_n "(cached) $ac_c" 1>&6
2352 else
2353   case "$NM" in
2354 /* | A-Za-z:\\*)
2355   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2356   ;;
2357 *)
2358   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2359   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2360     test -z "$ac_dir" && ac_dir=.
2361     if test -f $ac_dir/nm; then
2362       # Check to see if the nm accepts a BSD-compat flag.
2363       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2364       #   nm: unknown option "B" ignored
2365       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2366         ac_cv_path_NM="$ac_dir/nm -B"
2367       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2368         ac_cv_path_NM="$ac_dir/nm -p"
2369       else
2370         ac_cv_path_NM="$ac_dir/nm"
2371       fi
2372       break
2373     fi
2374   done
2375   IFS="$ac_save_ifs"
2376   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2377   ;;
2378 esac
2379 fi
2380
2381 NM="$ac_cv_path_NM"
2382 echo "$ac_t""$NM" 1>&6
2383
2384
2385 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2386 echo "configure:2387: checking whether ln -s works" >&5
2387 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2388   echo $ac_n "(cached) $ac_c" 1>&6
2389 else
2390   rm -f conftestdata
2391 if ln -s X conftestdata 2>/dev/null
2392 then
2393   rm -f conftestdata
2394   ac_cv_prog_LN_S="ln -s"
2395 else
2396   ac_cv_prog_LN_S=ln
2397 fi
2398 fi
2399 LN_S="$ac_cv_prog_LN_S"
2400 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2401   echo "$ac_t""yes" 1>&6
2402 else
2403   echo "$ac_t""no" 1>&6
2404 fi
2405
2406 # Always use our own libtool.
2407 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2408
2409 # Check for any special flags to pass to ltconfig.
2410 libtool_flags=
2411 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2412 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2413 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2414 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2415 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2416
2417 # Some flags need to be propagated to the compiler or linker for good
2418 # libtool support.
2419 case "$host" in
2420 *-*-irix6*)
2421   # Find out which ABI we are using.
2422   echo '#line 2423 "configure"' > conftest.$ac_ext
2423   if { (eval echo configure:2424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2424     case "`/usr/bin/file conftest.o`" in
2425     *32-bit*)
2426       LD="${LD-ld} -32"
2427       ;;
2428     *N32*)
2429       LD="${LD-ld} -n32"
2430       ;;
2431     *64-bit*)
2432       LD="${LD-ld} -64"
2433       ;;
2434     esac
2435   fi
2436   rm -rf conftest*
2437   ;;
2438
2439 *-*-sco3.2v5*)
2440   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2441   CFLAGS="$CFLAGS -belf"
2442   ;;
2443 esac
2444
2445 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2446 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2447 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2448 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2449 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2450 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2451
2452
2453 for ac_prog in mawk gawk nawk awk
2454 do
2455 # Extract the first word of "$ac_prog", so it can be a program name with args.
2456 set dummy $ac_prog; ac_word=$2
2457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2458 echo "configure:2459: checking for $ac_word" >&5
2459 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2460   echo $ac_n "(cached) $ac_c" 1>&6
2461 else
2462   if test -n "$AWK"; then
2463   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2464 else
2465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2466   ac_dummy="$PATH"
2467   for ac_dir in $ac_dummy; do
2468     test -z "$ac_dir" && ac_dir=.
2469     if test -f $ac_dir/$ac_word; then
2470       ac_cv_prog_AWK="$ac_prog"
2471       break
2472     fi
2473   done
2474   IFS="$ac_save_ifs"
2475 fi
2476 fi
2477 AWK="$ac_cv_prog_AWK"
2478 if test -n "$AWK"; then
2479   echo "$ac_t""$AWK" 1>&6
2480 else
2481   echo "$ac_t""no" 1>&6
2482 fi
2483
2484 test -n "$AWK" && break
2485 done
2486
2487 # test for ln hardlink support
2488 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2489 echo "configure:2490: checking whether ln works" >&5
2490 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2491   echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493   rm -f conftest.src conftest.dst
2494 echo "conftest" > conftest.src
2495 if ln conftest.src conftest.dst 2>/dev/null
2496 then
2497   ol_cv_prog_LN_H="ln"
2498 else
2499   ol_cv_prog_LN_H="cp"
2500 fi
2501 rm -f conftest.src conftest.dst
2502
2503 fi
2504 LN_H="$ol_cv_prog_LN_H"
2505 if test "$ol_cv_prog_LN_H" = "ln"; then
2506         echo "$ac_t""yes" 1>&6
2507 else
2508         echo "$ac_t""no" 1>&6
2509 fi
2510
2511 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2512 echo "configure:2513: checking whether ln -s works" >&5
2513 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2514   echo $ac_n "(cached) $ac_c" 1>&6
2515 else
2516   rm -f conftestdata
2517 if ln -s X conftestdata 2>/dev/null
2518 then
2519   rm -f conftestdata
2520   ac_cv_prog_LN_S="ln -s"
2521 else
2522   ac_cv_prog_LN_S=ln
2523 fi
2524 fi
2525 LN_S="$ac_cv_prog_LN_S"
2526 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2527   echo "$ac_t""yes" 1>&6
2528 else
2529   echo "$ac_t""no" 1>&6
2530 fi
2531
2532
2533 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2534         LN_S="$LN_H"
2535 fi
2536
2537 # Extract the first word of "sendmail", so it can be a program name with args.
2538 set dummy sendmail; ac_word=$2
2539 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2540 echo "configure:2541: checking for $ac_word" >&5
2541 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2542   echo $ac_n "(cached) $ac_c" 1>&6
2543 else
2544   case "$SENDMAIL" in
2545   /*)
2546   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2547   ;;
2548   ?:/*)                  
2549   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2550   ;;
2551   *)
2552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2553   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2554   for ac_dir in $ac_dummy; do 
2555     test -z "$ac_dir" && ac_dir=.
2556     if test -f $ac_dir/$ac_word; then
2557       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2558       break
2559     fi
2560   done
2561   IFS="$ac_save_ifs"
2562   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2563   ;;
2564 esac
2565 fi
2566 SENDMAIL="$ac_cv_path_SENDMAIL"
2567 if test -n "$SENDMAIL"; then
2568   echo "$ac_t""$SENDMAIL" 1>&6
2569 else
2570   echo "$ac_t""no" 1>&6
2571 fi
2572
2573 # Extract the first word of "vi", so it can be a program name with args.
2574 set dummy vi; ac_word=$2
2575 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2576 echo "configure:2577: checking for $ac_word" >&5
2577 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2578   echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580   case "$EDITOR" in
2581   /*)
2582   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2583   ;;
2584   ?:/*)                  
2585   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2586   ;;
2587   *)
2588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2589   ac_dummy="$PATH:/usr/ucb"
2590   for ac_dir in $ac_dummy; do 
2591     test -z "$ac_dir" && ac_dir=.
2592     if test -f $ac_dir/$ac_word; then
2593       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2594       break
2595     fi
2596   done
2597   IFS="$ac_save_ifs"
2598   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2599   ;;
2600 esac
2601 fi
2602 EDITOR="$ac_cv_path_EDITOR"
2603 if test -n "$EDITOR"; then
2604   echo "$ac_t""$EDITOR" 1>&6
2605 else
2606   echo "$ac_t""no" 1>&6
2607 fi
2608
2609 # Extract the first word of "finger", so it can be a program name with args.
2610 set dummy finger; ac_word=$2
2611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2612 echo "configure:2613: checking for $ac_word" >&5
2613 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2614   echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616   case "$FINGER" in
2617   /*)
2618   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2619   ;;
2620   ?:/*)                  
2621   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2622   ;;
2623   *)
2624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2625   ac_dummy="$PATH:/usr/ucb"
2626   for ac_dir in $ac_dummy; do 
2627     test -z "$ac_dir" && ac_dir=.
2628     if test -f $ac_dir/$ac_word; then
2629       ac_cv_path_FINGER="$ac_dir/$ac_word"
2630       break
2631     fi
2632   done
2633   IFS="$ac_save_ifs"
2634   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2635   ;;
2636 esac
2637 fi
2638 FINGER="$ac_cv_path_FINGER"
2639 if test -n "$FINGER"; then
2640   echo "$ac_t""$FINGER" 1>&6
2641 else
2642   echo "$ac_t""no" 1>&6
2643 fi
2644
2645
2646 ol_link_modules=no
2647 if test $ol_enable_modules != no ; then
2648         # Extract the first word of "glib-config", so it can be a program name with args.
2649 set dummy glib-config; ac_word=$2
2650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2651 echo "configure:2652: checking for $ac_word" >&5
2652 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2653   echo $ac_n "(cached) $ac_c" 1>&6
2654 else
2655   case "$GLIBCONFIG" in
2656   /*)
2657   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2658   ;;
2659   ?:/*)                  
2660   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2661   ;;
2662   *)
2663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2664   ac_dummy="$PATH"
2665   for ac_dir in $ac_dummy; do 
2666     test -z "$ac_dir" && ac_dir=.
2667     if test -f $ac_dir/$ac_word; then
2668       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2669       break
2670     fi
2671   done
2672   IFS="$ac_save_ifs"
2673   ;;
2674 esac
2675 fi
2676 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2677 if test -n "$GLIBCONFIG"; then
2678   echo "$ac_t""$GLIBCONFIG" 1>&6
2679 else
2680   echo "$ac_t""no" 1>&6
2681 fi
2682
2683
2684         if test "no$GLIBCONFIG" = "no" ; then
2685                 if test $ol_enable_modules = yes ; then
2686                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2687                 fi
2688
2689         else
2690                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2691                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2692                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2693
2694                                 ol_link_modules=yes
2695         fi
2696 fi
2697
2698 ol_link_perl=no
2699 if test $ol_enable_perl != no ; then
2700         # Extract the first word of "perl", so it can be a program name with args.
2701 set dummy perl; ac_word=$2
2702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2703 echo "configure:2704: checking for $ac_word" >&5
2704 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2705   echo $ac_n "(cached) $ac_c" 1>&6
2706 else
2707   case "$PERLBIN" in
2708   /*)
2709   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2710   ;;
2711   ?:/*)                  
2712   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2713   ;;
2714   *)
2715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2716   ac_dummy="$PATH"
2717   for ac_dir in $ac_dummy; do 
2718     test -z "$ac_dir" && ac_dir=.
2719     if test -f $ac_dir/$ac_word; then
2720       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2721       break
2722     fi
2723   done
2724   IFS="$ac_save_ifs"
2725   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2726   ;;
2727 esac
2728 fi
2729 PERLBIN="$ac_cv_path_PERLBIN"
2730 if test -n "$PERLBIN"; then
2731   echo "$ac_t""$PERLBIN" 1>&6
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735
2736
2737         if test "no$PERLBIN" = "no" ; then
2738                 if test $ol_enable_perl = yes ; then
2739                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2740                 fi
2741
2742         else
2743                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2744                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2745
2746                                 ol_link_perl=yes
2747         fi
2748 fi
2749
2750 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2751 echo "configure:2752: checking how to run the C preprocessor" >&5
2752 # On Suns, sometimes $CPP names a directory.
2753 if test -n "$CPP" && test -d "$CPP"; then
2754   CPP=
2755 fi
2756 if test -z "$CPP"; then
2757 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2758   echo $ac_n "(cached) $ac_c" 1>&6
2759 else
2760     # This must be in double quotes, not single quotes, because CPP may get
2761   # substituted into the Makefile and "${CC-cc}" will confuse make.
2762   CPP="${CC-cc} -E"
2763   # On the NeXT, cc -E runs the code through the compiler's parser,
2764   # not just through cpp.
2765   cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768 #include <assert.h>
2769 Syntax Error
2770 EOF
2771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2772 { (eval echo configure:2773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2774 if test -z "$ac_err"; then
2775   :
2776 else
2777   echo "$ac_err" >&5
2778   echo "configure: failed program was:" >&5
2779   cat conftest.$ac_ext >&5
2780   rm -rf conftest*
2781   CPP="${CC-cc} -E -traditional-cpp"
2782   cat > conftest.$ac_ext <<EOF
2783 #line 2784 "configure"
2784 #include "confdefs.h"
2785 #include <assert.h>
2786 Syntax Error
2787 EOF
2788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2789 { (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2791 if test -z "$ac_err"; then
2792   :
2793 else
2794   echo "$ac_err" >&5
2795   echo "configure: failed program was:" >&5
2796   cat conftest.$ac_ext >&5
2797   rm -rf conftest*
2798   CPP="${CC-cc} -nologo -E"
2799   cat > conftest.$ac_ext <<EOF
2800 #line 2801 "configure"
2801 #include "confdefs.h"
2802 #include <assert.h>
2803 Syntax Error
2804 EOF
2805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2806 { (eval echo configure:2807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2808 if test -z "$ac_err"; then
2809   :
2810 else
2811   echo "$ac_err" >&5
2812   echo "configure: failed program was:" >&5
2813   cat conftest.$ac_ext >&5
2814   rm -rf conftest*
2815   CPP=/lib/cpp
2816 fi
2817 rm -f conftest*
2818 fi
2819 rm -f conftest*
2820 fi
2821 rm -f conftest*
2822   ac_cv_prog_CPP="$CPP"
2823 fi
2824   CPP="$ac_cv_prog_CPP"
2825 else
2826   ac_cv_prog_CPP="$CPP"
2827 fi
2828 echo "$ac_t""$CPP" 1>&6
2829
2830
2831 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2832         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2833
2834 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2835         echo "configure: warning: programs compiled here do run here..." 1>&2
2836         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2837
2838 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2839         echo "configure: warning: programs compiled here do not run here..." 1>&2
2840         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2841 fi
2842
2843 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2844 echo "configure:2845: checking for AIX" >&5
2845 cat > conftest.$ac_ext <<EOF
2846 #line 2847 "configure"
2847 #include "confdefs.h"
2848 #ifdef _AIX
2849   yes
2850 #endif
2851
2852 EOF
2853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2854   egrep "yes" >/dev/null 2>&1; then
2855   rm -rf conftest*
2856   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2857 #define _ALL_SOURCE 1
2858 EOF
2859
2860 else
2861   rm -rf conftest*
2862   echo "$ac_t""no" 1>&6
2863 fi
2864 rm -f conftest*
2865
2866
2867 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2868 echo "configure:2869: checking for POSIXized ISC" >&5
2869 if test -d /etc/conf/kconfig.d &&
2870   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2871 then
2872   echo "$ac_t""yes" 1>&6
2873   ISC=yes # If later tests want to check for ISC.
2874   cat >> confdefs.h <<\EOF
2875 #define _POSIX_SOURCE 1
2876 EOF
2877
2878   if test "$GCC" = yes; then
2879     CC="$CC -posix"
2880   else
2881     CC="$CC -Xp"
2882   fi
2883 else
2884   echo "$ac_t""no" 1>&6
2885   ISC=
2886 fi
2887
2888 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2889 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2890 echo "configure:2891: checking for minix/config.h" >&5
2891 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2892   echo $ac_n "(cached) $ac_c" 1>&6
2893 else
2894   cat > conftest.$ac_ext <<EOF
2895 #line 2896 "configure"
2896 #include "confdefs.h"
2897 #include <minix/config.h>
2898 EOF
2899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2900 { (eval echo configure:2901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2902 if test -z "$ac_err"; then
2903   rm -rf conftest*
2904   eval "ac_cv_header_$ac_safe=yes"
2905 else
2906   echo "$ac_err" >&5
2907   echo "configure: failed program was:" >&5
2908   cat conftest.$ac_ext >&5
2909   rm -rf conftest*
2910   eval "ac_cv_header_$ac_safe=no"
2911 fi
2912 rm -f conftest*
2913 fi
2914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2915   echo "$ac_t""yes" 1>&6
2916   MINIX=yes
2917 else
2918   echo "$ac_t""no" 1>&6
2919 MINIX=
2920 fi
2921
2922 if test "$MINIX" = yes; then
2923   cat >> confdefs.h <<\EOF
2924 #define _POSIX_SOURCE 1
2925 EOF
2926
2927   cat >> confdefs.h <<\EOF
2928 #define _POSIX_1_SOURCE 2
2929 EOF
2930
2931   cat >> confdefs.h <<\EOF
2932 #define _MINIX 1
2933 EOF
2934
2935 fi
2936
2937
2938 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2939 echo "configure:2940: checking for be_app in -lbe" >&5
2940 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   ac_save_LIBS="$LIBS"
2945 LIBS="-lbe -lroot -lnet $LIBS"
2946 cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 /* Override any gcc2 internal prototype to avoid an error.  */
2950 /* We use char because int might match the return type of a gcc2
2951     builtin and then its argument prototype would still apply.  */
2952 char be_app();
2953
2954 int main() {
2955 be_app()
2956 ; return 0; }
2957 EOF
2958 if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2959   rm -rf conftest*
2960   eval "ac_cv_lib_$ac_lib_var=yes"
2961 else
2962   echo "configure: failed program was:" >&5
2963   cat conftest.$ac_ext >&5
2964   rm -rf conftest*
2965   eval "ac_cv_lib_$ac_lib_var=no"
2966 fi
2967 rm -f conftest*
2968 LIBS="$ac_save_LIBS"
2969
2970 fi
2971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2972   echo "$ac_t""yes" 1>&6
2973   LIBS="$LIBS -lbe -lroot -lnet"
2974 else
2975   echo "$ac_t""no" 1>&6
2976 :
2977 fi
2978
2979
2980 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2981 echo "configure:2982: checking for Cygwin environment" >&5
2982 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2988
2989 int main() {
2990
2991 #ifndef __CYGWIN__
2992 #define __CYGWIN__ __CYGWIN32__
2993 #endif
2994 return __CYGWIN__;
2995 ; return 0; }
2996 EOF
2997 if { (eval echo configure:2998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2998   rm -rf conftest*
2999   ac_cv_cygwin=yes
3000 else
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   ac_cv_cygwin=no
3005 fi
3006 rm -f conftest*
3007 rm -f conftest*
3008 fi
3009
3010 echo "$ac_t""$ac_cv_cygwin" 1>&6
3011 CYGWIN=
3012 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3013 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3014 echo "configure:3015: checking for mingw32 environment" >&5
3015 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3016   echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018   cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021
3022 int main() {
3023 return __MINGW32__;
3024 ; return 0; }
3025 EOF
3026 if { (eval echo configure:3027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3027   rm -rf conftest*
3028   ac_cv_mingw32=yes
3029 else
3030   echo "configure: failed program was:" >&5
3031   cat conftest.$ac_ext >&5
3032   rm -rf conftest*
3033   ac_cv_mingw32=no
3034 fi
3035 rm -f conftest*
3036 rm -f conftest*
3037 fi
3038
3039 echo "$ac_t""$ac_cv_mingw32" 1>&6
3040 MINGW32=
3041 test "$ac_cv_mingw32" = yes && MINGW32=yes
3042
3043
3044 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3045 echo "configure:3046: checking for executable suffix" >&5
3046 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3047   echo $ac_n "(cached) $ac_c" 1>&6
3048 else
3049   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3050   ac_cv_exeext=.exe
3051 else
3052   rm -f conftest*
3053   echo 'int main () { return 0; }' > conftest.$ac_ext
3054   ac_cv_exeext=
3055   if { (eval echo configure:3056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3056     for file in conftest.*; do
3057       case $file in
3058       *.c | *.o | *.obj) ;;
3059       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3060       esac
3061     done
3062   else
3063     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3064   fi
3065   rm -f conftest*
3066   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3067 fi
3068 fi
3069
3070 EXEEXT=""
3071 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3072 echo "$ac_t""${ac_cv_exeext}" 1>&6
3073 ac_exeext=$EXEEXT
3074
3075 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3076 echo "configure:3077: checking for object suffix" >&5
3077 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3078   echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080   rm -f conftest*
3081 echo 'int i = 1;' > conftest.$ac_ext
3082 if { (eval echo configure:3083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3083   for ac_file in conftest.*; do
3084     case $ac_file in
3085     *.c) ;;
3086     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3087     esac
3088   done
3089 else
3090   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3091 fi
3092 rm -f conftest*
3093 fi
3094
3095 echo "$ac_t""$ac_cv_objext" 1>&6
3096 OBJEXT=$ac_cv_objext
3097 ac_objext=$ac_cv_objext
3098
3099
3100 cat >> confdefs.h <<EOF
3101 #define EXEEXT "${EXEEXT}"
3102 EOF
3103
3104
3105
3106
3107
3108 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3109 echo "configure:3110: checking for ${CC-cc} option to accept ANSI C" >&5
3110 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   am_cv_prog_cc_stdc=no
3114 ac_save_CC="$CC"
3115 # Don't try gcc -ansi; that turns off useful extensions and
3116 # breaks some systems' header files.
3117 # AIX                   -qlanglvl=ansi
3118 # Ultrix and OSF/1      -std1
3119 # HP-UX                 -Aa -D_HPUX_SOURCE
3120 # SVR4                  -Xc -D__EXTENSIONS__
3121 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3122 do
3123   CC="$ac_save_CC $ac_arg"
3124   cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3127 #include <stdarg.h>
3128 #include <stdio.h>
3129 #include <sys/types.h>
3130 #include <sys/stat.h>
3131 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3132 struct buf { int x; };
3133 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3134 static char *e (p, i)
3135      char **p;
3136      int i;
3137 {
3138   return p[i];
3139 }
3140 static char *f (char * (*g) (char **, int), char **p, ...)
3141 {
3142   char *s;
3143   va_list v;
3144   va_start (v,p);
3145   s = g (p, va_arg (v,int));
3146   va_end (v);
3147   return s;
3148 }
3149 int test (int i, double x);
3150 struct s1 {int (*f) (int a);};
3151 struct s2 {int (*f) (double a);};
3152 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3153 int argc;
3154 char **argv;
3155
3156 int main() {
3157
3158 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3159
3160 ; return 0; }
3161 EOF
3162 if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3163   rm -rf conftest*
3164   am_cv_prog_cc_stdc="$ac_arg"; break
3165 else
3166   echo "configure: failed program was:" >&5
3167   cat conftest.$ac_ext >&5
3168 fi
3169 rm -f conftest*
3170 done
3171 CC="$ac_save_CC"
3172
3173 fi
3174
3175 if test -z "$am_cv_prog_cc_stdc"; then
3176   echo "$ac_t""none needed" 1>&6
3177 else
3178   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3179 fi
3180 case "x$am_cv_prog_cc_stdc" in
3181   x|xno) ;;
3182   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3183 esac
3184
3185 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3186         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3187 fi
3188
3189
3190 # test for make depend flag
3191 OL_MKDEP=
3192 OL_MKDEP_FLAGS=
3193 if test -z "${MKDEP}"; then
3194         OL_MKDEP="${CC-cc}"
3195         if test -z "${MKDEP_FLAGS}"; then
3196                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3197 echo "configure:3198: checking for ${OL_MKDEP} depend flag" >&5
3198 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3199   echo $ac_n "(cached) $ac_c" 1>&6
3200 else
3201   
3202                         ol_cv_mkdep=no
3203                         for flag in "-M" "-xM"; do
3204                                 cat > conftest.c <<EOF
3205  noCode;
3206 EOF
3207                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3208                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3209                                 then
3210                                         if test ! -f conftest."${ac_object}" ; then
3211                                                 ol_cv_mkdep=$flag
3212                                                 OL_MKDEP_FLAGS="$flag"
3213                                                 break
3214                                         fi
3215                                 fi
3216                         done
3217                         rm -f conftest*
3218                 
3219 fi
3220
3221 echo "$ac_t""$ol_cv_mkdep" 1>&6
3222         else
3223                 cc_cv_mkdep=yes
3224                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3225         fi
3226 else
3227         cc_cv_mkdep=yes
3228         OL_MKDEP="${MKDEP}"
3229         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3230 fi
3231
3232
3233
3234 if test "${ol_cv_mkdep}" = no ; then
3235         # this will soon become an error
3236         echo "configure: warning: do not know how to generate dependencies" 1>&2
3237 fi
3238
3239
3240
3241 echo $ac_n "checking for socket""... $ac_c" 1>&6
3242 echo "configure:3243: checking for socket" >&5
3243 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 /* System header to define __stub macros and hopefully few prototypes,
3250     which can conflict with char socket(); below.  */
3251 #include <assert.h>
3252 /* Override any gcc2 internal prototype to avoid an error.  */
3253 /* We use char because int might match the return type of a gcc2
3254     builtin and then its argument prototype would still apply.  */
3255 char socket();
3256
3257 int main() {
3258
3259 /* The GNU C library defines this for functions which it implements
3260     to always fail with ENOSYS.  Some functions are actually named
3261     something starting with __ and the normal name is an alias.  */
3262 #if defined (__stub_socket) || defined (__stub___socket)
3263 choke me
3264 #else
3265 socket();
3266 #endif
3267
3268 ; return 0; }
3269 EOF
3270 if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3271   rm -rf conftest*
3272   eval "ac_cv_func_socket=yes"
3273 else
3274   echo "configure: failed program was:" >&5
3275   cat conftest.$ac_ext >&5
3276   rm -rf conftest*
3277   eval "ac_cv_func_socket=no"
3278 fi
3279 rm -f conftest*
3280 fi
3281
3282 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3283   echo "$ac_t""yes" 1>&6
3284   :
3285 else
3286   echo "$ac_t""no" 1>&6
3287         
3288         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3289 echo "configure:3290: checking for main in -lsocket" >&5
3290 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3292   echo $ac_n "(cached) $ac_c" 1>&6
3293 else
3294   ac_save_LIBS="$LIBS"
3295 LIBS="-lsocket  $LIBS"
3296 cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299
3300 int main() {
3301 main()
3302 ; return 0; }
3303 EOF
3304 if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3305   rm -rf conftest*
3306   eval "ac_cv_lib_$ac_lib_var=yes"
3307 else
3308   echo "configure: failed program was:" >&5
3309   cat conftest.$ac_ext >&5
3310   rm -rf conftest*
3311   eval "ac_cv_lib_$ac_lib_var=no"
3312 fi
3313 rm -f conftest*
3314 LIBS="$ac_save_LIBS"
3315
3316 fi
3317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3318   echo "$ac_t""yes" 1>&6
3319     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3320     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3321   cat >> confdefs.h <<EOF
3322 #define $ac_tr_lib 1
3323 EOF
3324
3325   LIBS="-lsocket $LIBS"
3326
3327 else
3328   echo "$ac_t""no" 1>&6
3329 fi
3330
3331         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3332 echo "configure:3333: checking for main in -lnet" >&5
3333 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3334 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   ac_save_LIBS="$LIBS"
3338 LIBS="-lnet  $LIBS"
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342
3343 int main() {
3344 main()
3345 ; return 0; }
3346 EOF
3347 if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3348   rm -rf conftest*
3349   eval "ac_cv_lib_$ac_lib_var=yes"
3350 else
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353   rm -rf conftest*
3354   eval "ac_cv_lib_$ac_lib_var=no"
3355 fi
3356 rm -f conftest*
3357 LIBS="$ac_save_LIBS"
3358
3359 fi
3360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3361   echo "$ac_t""yes" 1>&6
3362     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3363     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3364   cat >> confdefs.h <<EOF
3365 #define $ac_tr_lib 1
3366 EOF
3367
3368   LIBS="-lnet $LIBS"
3369
3370 else
3371   echo "$ac_t""no" 1>&6
3372 fi
3373
3374         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3375 echo "configure:3376: checking for socket in -lnet" >&5
3376 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3377 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   ac_save_LIBS="$LIBS"
3381 LIBS="-lnet  $LIBS"
3382 cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3385 /* Override any gcc2 internal prototype to avoid an error.  */
3386 /* We use char because int might match the return type of a gcc2
3387     builtin and then its argument prototype would still apply.  */
3388 char socket();
3389
3390 int main() {
3391 socket()
3392 ; return 0; }
3393 EOF
3394 if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3395   rm -rf conftest*
3396   eval "ac_cv_lib_$ac_lib_var=yes"
3397 else
3398   echo "configure: failed program was:" >&5
3399   cat conftest.$ac_ext >&5
3400   rm -rf conftest*
3401   eval "ac_cv_lib_$ac_lib_var=no"
3402 fi
3403 rm -f conftest*
3404 LIBS="$ac_save_LIBS"
3405
3406 fi
3407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3408   echo "$ac_t""yes" 1>&6
3409     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3410     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3411   cat >> confdefs.h <<EOF
3412 #define $ac_tr_lib 1
3413 EOF
3414
3415   LIBS="-lnet $LIBS"
3416
3417 else
3418   echo "$ac_t""no" 1>&6
3419 fi
3420
3421         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3422 echo "configure:3423: checking for main in -lnsl_s" >&5
3423 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3424 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3425   echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427   ac_save_LIBS="$LIBS"
3428 LIBS="-lnsl_s  $LIBS"
3429 cat > conftest.$ac_ext <<EOF
3430 #line 3431 "configure"
3431 #include "confdefs.h"
3432
3433 int main() {
3434 main()
3435 ; return 0; }
3436 EOF
3437 if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3438   rm -rf conftest*
3439   eval "ac_cv_lib_$ac_lib_var=yes"
3440 else
3441   echo "configure: failed program was:" >&5
3442   cat conftest.$ac_ext >&5
3443   rm -rf conftest*
3444   eval "ac_cv_lib_$ac_lib_var=no"
3445 fi
3446 rm -f conftest*
3447 LIBS="$ac_save_LIBS"
3448
3449 fi
3450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3451   echo "$ac_t""yes" 1>&6
3452     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3454   cat >> confdefs.h <<EOF
3455 #define $ac_tr_lib 1
3456 EOF
3457
3458   LIBS="-lnsl_s $LIBS"
3459
3460 else
3461   echo "$ac_t""no" 1>&6
3462 fi
3463
3464         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3465 echo "configure:3466: checking for main in -lnsl" >&5
3466 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3467 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   ac_save_LIBS="$LIBS"
3471 LIBS="-lnsl  $LIBS"
3472 cat > conftest.$ac_ext <<EOF
3473 #line 3474 "configure"
3474 #include "confdefs.h"
3475
3476 int main() {
3477 main()
3478 ; return 0; }
3479 EOF
3480 if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3481   rm -rf conftest*
3482   eval "ac_cv_lib_$ac_lib_var=yes"
3483 else
3484   echo "configure: failed program was:" >&5
3485   cat conftest.$ac_ext >&5
3486   rm -rf conftest*
3487   eval "ac_cv_lib_$ac_lib_var=no"
3488 fi
3489 rm -f conftest*
3490 LIBS="$ac_save_LIBS"
3491
3492 fi
3493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3494   echo "$ac_t""yes" 1>&6
3495     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3496     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3497   cat >> confdefs.h <<EOF
3498 #define $ac_tr_lib 1
3499 EOF
3500
3501   LIBS="-lnsl $LIBS"
3502
3503 else
3504   echo "$ac_t""no" 1>&6
3505 fi
3506
3507         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3508 echo "configure:3509: checking for socket in -linet" >&5
3509 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3510 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   ac_save_LIBS="$LIBS"
3514 LIBS="-linet  $LIBS"
3515 cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3518 /* Override any gcc2 internal prototype to avoid an error.  */
3519 /* We use char because int might match the return type of a gcc2
3520     builtin and then its argument prototype would still apply.  */
3521 char socket();
3522
3523 int main() {
3524 socket()
3525 ; return 0; }
3526 EOF
3527 if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3528   rm -rf conftest*
3529   eval "ac_cv_lib_$ac_lib_var=yes"
3530 else
3531   echo "configure: failed program was:" >&5
3532   cat conftest.$ac_ext >&5
3533   rm -rf conftest*
3534   eval "ac_cv_lib_$ac_lib_var=no"
3535 fi
3536 rm -f conftest*
3537 LIBS="$ac_save_LIBS"
3538
3539 fi
3540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3541   echo "$ac_t""yes" 1>&6
3542     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3543     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3544   cat >> confdefs.h <<EOF
3545 #define $ac_tr_lib 1
3546 EOF
3547
3548   LIBS="-linet $LIBS"
3549
3550 else
3551   echo "$ac_t""no" 1>&6
3552 fi
3553
3554         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3555 echo "configure:3556: checking for main in -lgen" >&5
3556 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3557 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3558   echo $ac_n "(cached) $ac_c" 1>&6
3559 else
3560   ac_save_LIBS="$LIBS"
3561 LIBS="-lgen  $LIBS"
3562 cat > conftest.$ac_ext <<EOF
3563 #line 3564 "configure"
3564 #include "confdefs.h"
3565
3566 int main() {
3567 main()
3568 ; return 0; }
3569 EOF
3570 if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3571   rm -rf conftest*
3572   eval "ac_cv_lib_$ac_lib_var=yes"
3573 else
3574   echo "configure: failed program was:" >&5
3575   cat conftest.$ac_ext >&5
3576   rm -rf conftest*
3577   eval "ac_cv_lib_$ac_lib_var=no"
3578 fi
3579 rm -f conftest*
3580 LIBS="$ac_save_LIBS"
3581
3582 fi
3583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3584   echo "$ac_t""yes" 1>&6
3585     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3586     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3587   cat >> confdefs.h <<EOF
3588 #define $ac_tr_lib 1
3589 EOF
3590
3591   LIBS="-lgen $LIBS"
3592
3593 else
3594   echo "$ac_t""no" 1>&6
3595 fi
3596
3597
3598 fi
3599
3600
3601 for ac_func in res_search
3602 do
3603 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3604 echo "configure:3605: checking for $ac_func" >&5
3605 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3606   echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608   cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611 /* System header to define __stub macros and hopefully few prototypes,
3612     which can conflict with char $ac_func(); below.  */
3613 #include <assert.h>
3614 /* Override any gcc2 internal prototype to avoid an error.  */
3615 /* We use char because int might match the return type of a gcc2
3616     builtin and then its argument prototype would still apply.  */
3617 char $ac_func();
3618
3619 int main() {
3620
3621 /* The GNU C library defines this for functions which it implements
3622     to always fail with ENOSYS.  Some functions are actually named
3623     something starting with __ and the normal name is an alias.  */
3624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3625 choke me
3626 #else
3627 $ac_func();
3628 #endif
3629
3630 ; return 0; }
3631 EOF
3632 if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3633   rm -rf conftest*
3634   eval "ac_cv_func_$ac_func=yes"
3635 else
3636   echo "configure: failed program was:" >&5
3637   cat conftest.$ac_ext >&5
3638   rm -rf conftest*
3639   eval "ac_cv_func_$ac_func=no"
3640 fi
3641 rm -f conftest*
3642 fi
3643
3644 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3645   echo "$ac_t""yes" 1>&6
3646     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3647   cat >> confdefs.h <<EOF
3648 #define $ac_tr_func 1
3649 EOF
3650  
3651 else
3652   echo "$ac_t""no" 1>&6
3653 fi
3654 done
3655
3656 if test $ac_cv_func_res_search = "no" ; then 
3657         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3658 echo "configure:3659: checking for res_search in -lbind" >&5
3659 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3660 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3661   echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663   ac_save_LIBS="$LIBS"
3664 LIBS="-lbind  $LIBS"
3665 cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 /* Override any gcc2 internal prototype to avoid an error.  */
3669 /* We use char because int might match the return type of a gcc2
3670     builtin and then its argument prototype would still apply.  */
3671 char res_search();
3672
3673 int main() {
3674 res_search()
3675 ; return 0; }
3676 EOF
3677 if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3678   rm -rf conftest*
3679   eval "ac_cv_lib_$ac_lib_var=yes"
3680 else
3681   echo "configure: failed program was:" >&5
3682   cat conftest.$ac_ext >&5
3683   rm -rf conftest*
3684   eval "ac_cv_lib_$ac_lib_var=no"
3685 fi
3686 rm -f conftest*
3687 LIBS="$ac_save_LIBS"
3688
3689 fi
3690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3691   echo "$ac_t""yes" 1>&6
3692     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3693     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3694   cat >> confdefs.h <<EOF
3695 #define $ac_tr_lib 1
3696 EOF
3697
3698   LIBS="-lbind $LIBS"
3699
3700 else
3701   echo "$ac_t""no" 1>&6
3702 fi
3703
3704         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3705                 cat >> confdefs.h <<\EOF
3706 #define HAVE_RES_SEARCH 1
3707 EOF
3708
3709         else
3710                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3711 echo "configure:3712: checking for res_search in -lresolv" >&5
3712 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3713 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3714   echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716   ac_save_LIBS="$LIBS"
3717 LIBS="-lresolv  $LIBS"
3718 cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 /* Override any gcc2 internal prototype to avoid an error.  */
3722 /* We use char because int might match the return type of a gcc2
3723     builtin and then its argument prototype would still apply.  */
3724 char res_search();
3725
3726 int main() {
3727 res_search()
3728 ; return 0; }
3729 EOF
3730 if { (eval echo configure:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3731   rm -rf conftest*
3732   eval "ac_cv_lib_$ac_lib_var=yes"
3733 else
3734   echo "configure: failed program was:" >&5
3735   cat conftest.$ac_ext >&5
3736   rm -rf conftest*
3737   eval "ac_cv_lib_$ac_lib_var=no"
3738 fi
3739 rm -f conftest*
3740 LIBS="$ac_save_LIBS"
3741
3742 fi
3743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3744   echo "$ac_t""yes" 1>&6
3745     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3746     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3747   cat >> confdefs.h <<EOF
3748 #define $ac_tr_lib 1
3749 EOF
3750
3751   LIBS="-lresolv $LIBS"
3752
3753 else
3754   echo "$ac_t""no" 1>&6
3755 fi
3756
3757                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3758                         cat >> confdefs.h <<\EOF
3759 #define HAVE_RES_SEARCH 1
3760 EOF
3761
3762                 fi
3763         fi
3764 fi
3765
3766 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3767 echo "configure:3768: checking for sigset in -lV3" >&5
3768 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3769 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   ac_save_LIBS="$LIBS"
3773 LIBS="-lV3  $LIBS"
3774 cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3777 /* Override any gcc2 internal prototype to avoid an error.  */
3778 /* We use char because int might match the return type of a gcc2
3779     builtin and then its argument prototype would still apply.  */
3780 char sigset();
3781
3782 int main() {
3783 sigset()
3784 ; return 0; }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3787   rm -rf conftest*
3788   eval "ac_cv_lib_$ac_lib_var=yes"
3789 else
3790   echo "configure: failed program was:" >&5
3791   cat conftest.$ac_ext >&5
3792   rm -rf conftest*
3793   eval "ac_cv_lib_$ac_lib_var=no"
3794 fi
3795 rm -f conftest*
3796 LIBS="$ac_save_LIBS"
3797
3798 fi
3799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3800   echo "$ac_t""yes" 1>&6
3801     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3802     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3803   cat >> confdefs.h <<EOF
3804 #define $ac_tr_lib 1
3805 EOF
3806
3807   LIBS="-lV3 $LIBS"
3808
3809 else
3810   echo "$ac_t""no" 1>&6
3811 fi
3812
3813
3814 for ac_hdr in regex.h 
3815 do
3816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3818 echo "configure:3819: checking for $ac_hdr" >&5
3819 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3820   echo $ac_n "(cached) $ac_c" 1>&6
3821 else
3822   cat > conftest.$ac_ext <<EOF
3823 #line 3824 "configure"
3824 #include "confdefs.h"
3825 #include <$ac_hdr>
3826 EOF
3827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3828 { (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3830 if test -z "$ac_err"; then
3831   rm -rf conftest*
3832   eval "ac_cv_header_$ac_safe=yes"
3833 else
3834   echo "$ac_err" >&5
3835   echo "configure: failed program was:" >&5
3836   cat conftest.$ac_ext >&5
3837   rm -rf conftest*
3838   eval "ac_cv_header_$ac_safe=no"
3839 fi
3840 rm -f conftest*
3841 fi
3842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3843   echo "$ac_t""yes" 1>&6
3844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3845   cat >> confdefs.h <<EOF
3846 #define $ac_tr_hdr 1
3847 EOF
3848  
3849 else
3850   echo "$ac_t""no" 1>&6
3851 fi
3852 done
3853
3854 if test "$ac_cv_header_regex_h" != yes ; then
3855         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
3856 fi
3857 echo $ac_n "checking for regfree""... $ac_c" 1>&6
3858 echo "configure:3859: checking for regfree" >&5
3859 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
3860   echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862   cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 /* System header to define __stub macros and hopefully few prototypes,
3866     which can conflict with char regfree(); below.  */
3867 #include <assert.h>
3868 /* Override any gcc2 internal prototype to avoid an error.  */
3869 /* We use char because int might match the return type of a gcc2
3870     builtin and then its argument prototype would still apply.  */
3871 char regfree();
3872
3873 int main() {
3874
3875 /* The GNU C library defines this for functions which it implements
3876     to always fail with ENOSYS.  Some functions are actually named
3877     something starting with __ and the normal name is an alias.  */
3878 #if defined (__stub_regfree) || defined (__stub___regfree)
3879 choke me
3880 #else
3881 regfree();
3882 #endif
3883
3884 ; return 0; }
3885 EOF
3886 if { (eval echo configure:3887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3887   rm -rf conftest*
3888   eval "ac_cv_func_regfree=yes"
3889 else
3890   echo "configure: failed program was:" >&5
3891   cat conftest.$ac_ext >&5
3892   rm -rf conftest*
3893   eval "ac_cv_func_regfree=no"
3894 fi
3895 rm -f conftest*
3896 fi
3897
3898 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
3899   echo "$ac_t""yes" 1>&6
3900   :
3901 else
3902   echo "$ac_t""no" 1>&6
3903 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
3904 fi
3905
3906
3907
3908 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
3909 echo "configure:3910: checking for compatible POSIX regex" >&5
3910 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   
3914         if test "$cross_compiling" = yes; then
3915   ol_cv_c_posix_regex=cross
3916 else
3917   cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920
3921 #include <sys/types.h>
3922 #include <regex.h>
3923 static char *pattern, *string;
3924 main()
3925 {
3926         int rc;
3927         regex_t re;
3928
3929         pattern = "^A";
3930
3931         if(regcomp(&re, pattern, 0)) {
3932                 return -1;
3933         }
3934         
3935         string = "ALL MATCH";
3936         
3937         rc = regexec(&re, string, 0, (void*)0, 0);
3938
3939         regfree(&re);
3940
3941         return rc;
3942 }
3943 EOF
3944 if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3945 then
3946   ol_cv_c_posix_regex=yes
3947 else
3948   echo "configure: failed program was:" >&5
3949   cat conftest.$ac_ext >&5
3950   rm -fr conftest*
3951   ol_cv_c_posix_regex=no
3952 fi
3953 rm -fr conftest*
3954 fi
3955
3956 fi
3957
3958 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
3959
3960 if test "$ol_cv_c_posix_regex" = no ; then
3961         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
3962 fi
3963
3964 echo $ac_n "checking for select""... $ac_c" 1>&6
3965 echo "configure:3966: checking for select" >&5
3966 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3967   echo $ac_n "(cached) $ac_c" 1>&6
3968 else
3969   cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 /* System header to define __stub macros and hopefully few prototypes,
3973     which can conflict with char select(); below.  */
3974 #include <assert.h>
3975 /* Override any gcc2 internal prototype to avoid an error.  */
3976 /* We use char because int might match the return type of a gcc2
3977     builtin and then its argument prototype would still apply.  */
3978 char select();
3979
3980 int main() {
3981
3982 /* The GNU C library defines this for functions which it implements
3983     to always fail with ENOSYS.  Some functions are actually named
3984     something starting with __ and the normal name is an alias.  */
3985 #if defined (__stub_select) || defined (__stub___select)
3986 choke me
3987 #else
3988 select();
3989 #endif
3990
3991 ; return 0; }
3992 EOF
3993 if { (eval echo configure:3994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3994   rm -rf conftest*
3995   eval "ac_cv_func_select=yes"
3996 else
3997   echo "configure: failed program was:" >&5
3998   cat conftest.$ac_ext >&5
3999   rm -rf conftest*
4000   eval "ac_cv_func_select=no"
4001 fi
4002 rm -f conftest*
4003 fi
4004
4005 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4006   echo "$ac_t""yes" 1>&6
4007   :
4008 else
4009   echo "$ac_t""no" 1>&6
4010 { echo "configure: error: select() required." 1>&2; exit 1; }
4011 fi
4012
4013
4014 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4015 echo "configure:4016: checking types of arguments for select()" >&5
4016  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
4017   echo $ac_n "(cached) $ac_c" 1>&6
4018 else
4019    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
4020   echo $ac_n "(cached) $ac_c" 1>&6
4021 else
4022     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
4023   echo $ac_n "(cached) $ac_c" 1>&6
4024 else
4025      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4026      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4027       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4028        cat > conftest.$ac_ext <<EOF
4029 #line 4030 "configure"
4030 #include "confdefs.h"
4031 #ifdef HAVE_SYS_TYPES_H
4032 #include <sys/types.h>
4033 #endif
4034 #ifdef HAVE_SYS_TIME_H
4035 #include <sys/time.h>
4036 #endif
4037 #ifdef HAVE_SYS_SELECT_H
4038 #include <sys/select.h>
4039 #endif
4040 #ifdef HAVE_SYS_SOCKET_H
4041 #include <sys/socket.h>
4042 #endif
4043 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);
4044 int main() {
4045
4046 ; return 0; }
4047 EOF
4048 if { (eval echo configure:4049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4049   rm -rf conftest*
4050           ac_not_found=no ; break 3
4051 else
4052   echo "configure: failed program was:" >&5
4053   cat conftest.$ac_ext >&5
4054   rm -rf conftest*
4055   ac_not_found=yes
4056 fi
4057 rm -f conftest*
4058       done
4059      done
4060     done
4061    
4062 fi
4063   
4064 fi
4065  
4066 fi
4067  if test "$ac_not_found" = yes; then
4068   ac_cv_func_select_arg1=int 
4069   ac_cv_func_select_arg234='int *' 
4070   ac_cv_func_select_arg5='struct timeval *'
4071  fi
4072  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4073  cat >> confdefs.h <<EOF
4074 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4075 EOF
4076
4077  cat >> confdefs.h <<EOF
4078 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4079 EOF
4080
4081  cat >> confdefs.h <<EOF
4082 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4083 EOF
4084
4085
4086
4087 # ISODE tests
4088 ol_link_isode=no
4089 if test $ol_enable_ldapd != no ; then
4090         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
4091
4092                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4093 echo "configure:4094: checking for main in -lxtpp" >&5
4094 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
4095 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   ac_save_LIBS="$LIBS"
4099 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4100 cat > conftest.$ac_ext <<EOF
4101 #line 4102 "configure"
4102 #include "confdefs.h"
4103
4104 int main() {
4105 main()
4106 ; return 0; }
4107 EOF
4108 if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4109   rm -rf conftest*
4110   eval "ac_cv_lib_$ac_lib_var=yes"
4111 else
4112   echo "configure: failed program was:" >&5
4113   cat conftest.$ac_ext >&5
4114   rm -rf conftest*
4115   eval "ac_cv_lib_$ac_lib_var=no"
4116 fi
4117 rm -f conftest*
4118 LIBS="$ac_save_LIBS"
4119
4120 fi
4121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4122   echo "$ac_t""yes" 1>&6
4123   
4124                 ol_link_isode=yes
4125                 cat >> confdefs.h <<\EOF
4126 #define HAVE_XTPP 1
4127 EOF
4128
4129                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4130                 
4131 else
4132   echo "$ac_t""no" 1>&6
4133 :
4134 fi
4135
4136         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4137 echo "configure:4138: checking for main in -ldsap" >&5
4138 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
4139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4140   echo $ac_n "(cached) $ac_c" 1>&6
4141 else
4142   ac_save_LIBS="$LIBS"
4143 LIBS="-ldsap -lisode $LIBS"
4144 cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4147
4148 int main() {
4149 main()
4150 ; return 0; }
4151 EOF
4152 if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4153   rm -rf conftest*
4154   eval "ac_cv_lib_$ac_lib_var=yes"
4155 else
4156   echo "configure: failed program was:" >&5
4157   cat conftest.$ac_ext >&5
4158   rm -rf conftest*
4159   eval "ac_cv_lib_$ac_lib_var=no"
4160 fi
4161 rm -f conftest*
4162 LIBS="$ac_save_LIBS"
4163
4164 fi
4165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4166   echo "$ac_t""yes" 1>&6
4167   
4168                 ol_link_isode=yes
4169                 cat >> confdefs.h <<\EOF
4170 #define HAVE_DSAP 1
4171 EOF
4172
4173                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4174                 
4175 else
4176   echo "$ac_t""no" 1>&6
4177 :
4178 fi
4179
4180         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4181 echo "configure:4182: checking for main in -lisode" >&5
4182 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
4183 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4184   echo $ac_n "(cached) $ac_c" 1>&6
4185 else
4186   ac_save_LIBS="$LIBS"
4187 LIBS="-lisode  $LIBS"
4188 cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191
4192 int main() {
4193 main()
4194 ; return 0; }
4195 EOF
4196 if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4197   rm -rf conftest*
4198   eval "ac_cv_lib_$ac_lib_var=yes"
4199 else
4200   echo "configure: failed program was:" >&5
4201   cat conftest.$ac_ext >&5
4202   rm -rf conftest*
4203   eval "ac_cv_lib_$ac_lib_var=no"
4204 fi
4205 rm -f conftest*
4206 LIBS="$ac_save_LIBS"
4207
4208 fi
4209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4210   echo "$ac_t""yes" 1>&6
4211   
4212                 ol_link_isode=yes
4213                 cat >> confdefs.h <<\EOF
4214 #define HAVE_ISODE 1
4215 EOF
4216
4217                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4218                 
4219 else
4220   echo "$ac_t""no" 1>&6
4221 :
4222 fi
4223
4224 fi
4225
4226 if test $ol_link_isode != no; then
4227         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4228 echo "configure:4229: checking for main in -lpp" >&5
4229 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
4230 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4231   echo $ac_n "(cached) $ac_c" 1>&6
4232 else
4233   ac_save_LIBS="$LIBS"
4234 LIBS="-lpp  $LIBS"
4235 cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238
4239 int main() {
4240 main()
4241 ; return 0; }
4242 EOF
4243 if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4244   rm -rf conftest*
4245   eval "ac_cv_lib_$ac_lib_var=yes"
4246 else
4247   echo "configure: failed program was:" >&5
4248   cat conftest.$ac_ext >&5
4249   rm -rf conftest*
4250   eval "ac_cv_lib_$ac_lib_var=no"
4251 fi
4252 rm -f conftest*
4253 LIBS="$ac_save_LIBS"
4254
4255 fi
4256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4257   echo "$ac_t""yes" 1>&6
4258   
4259                 cat >> confdefs.h <<\EOF
4260 #define HAVE_PP 1
4261 EOF
4262
4263                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4264                 
4265 else
4266   echo "$ac_t""no" 1>&6
4267 :
4268 fi
4269
4270
4271         # Extract the first word of "pepsy", so it can be a program name with args.
4272 set dummy pepsy; ac_word=$2
4273 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4274 echo "configure:4275: checking for $ac_word" >&5
4275 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
4276   echo $ac_n "(cached) $ac_c" 1>&6
4277 else
4278   case "$PEPSY" in
4279   /*)
4280   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4281   ;;
4282   ?:/*)                  
4283   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4284   ;;
4285   *)
4286   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4287   ac_dummy="$PATH"
4288   for ac_dir in $ac_dummy; do 
4289     test -z "$ac_dir" && ac_dir=.
4290     if test -f $ac_dir/$ac_word; then
4291       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4292       break
4293     fi
4294   done
4295   IFS="$ac_save_ifs"
4296   ;;
4297 esac
4298 fi
4299 PEPSY="$ac_cv_path_PEPSY"
4300 if test -n "$PEPSY"; then
4301   echo "$ac_t""$PEPSY" 1>&6
4302 else
4303   echo "$ac_t""no" 1>&6
4304 fi
4305
4306 fi
4307
4308 ol_link_kerberos=no
4309
4310 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4311         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4312 do
4313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4315 echo "configure:4316: checking for $ac_hdr" >&5
4316 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4317   echo $ac_n "(cached) $ac_c" 1>&6
4318 else
4319   cat > conftest.$ac_ext <<EOF
4320 #line 4321 "configure"
4321 #include "confdefs.h"
4322 #include <$ac_hdr>
4323 EOF
4324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4325 { (eval echo configure:4326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4327 if test -z "$ac_err"; then
4328   rm -rf conftest*
4329   eval "ac_cv_header_$ac_safe=yes"
4330 else
4331   echo "$ac_err" >&5
4332   echo "configure: failed program was:" >&5
4333   cat conftest.$ac_ext >&5
4334   rm -rf conftest*
4335   eval "ac_cv_header_$ac_safe=no"
4336 fi
4337 rm -f conftest*
4338 fi
4339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4340   echo "$ac_t""yes" 1>&6
4341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4342   cat >> confdefs.h <<EOF
4343 #define $ac_tr_hdr 1
4344 EOF
4345  
4346 else
4347   echo "$ac_t""no" 1>&6
4348 fi
4349 done
4350
4351
4352         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4353                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4354 echo "configure:4355: checking for main in -lkrb4" >&5
4355 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
4356 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   ac_save_LIBS="$LIBS"
4360 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4361 cat > conftest.$ac_ext <<EOF
4362 #line 4363 "configure"
4363 #include "confdefs.h"
4364
4365 int main() {
4366 main()
4367 ; return 0; }
4368 EOF
4369 if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4370   rm -rf conftest*
4371   eval "ac_cv_lib_$ac_lib_var=yes"
4372 else
4373   echo "configure: failed program was:" >&5
4374   cat conftest.$ac_ext >&5
4375   rm -rf conftest*
4376   eval "ac_cv_lib_$ac_lib_var=no"
4377 fi
4378 rm -f conftest*
4379 LIBS="$ac_save_LIBS"
4380
4381 fi
4382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4383   echo "$ac_t""yes" 1>&6
4384   have_k5=yes
4385 else
4386   echo "$ac_t""no" 1>&6
4387 have_k5=no
4388 fi
4389
4390
4391                 if test $have_k5 = yes ; then
4392                         ol_with_kerberos=found
4393                         ol_link_kerberos=yes
4394
4395                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4396
4397                         LIBS="$KRB_LIBS $LIBS"
4398
4399                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4400 echo "configure:4401: checking for des_debug in Kerberos libraries" >&5
4401 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   
4405                                                                 save_LIBS="$LIBS"
4406                                 LIBS="$KRB_LIBS $LIBS"
4407                                 cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4410
4411 #include <kerberosIV/krb.h>
4412 #include <kerberosIV/des.h>
4413 extern int des_debug;
4414
4415 int main() {
4416
4417 des_debug = 1;
4418
4419 ; return 0; }
4420 EOF
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4422   rm -rf conftest*
4423   ol_cv_var_des_debug=yes
4424 else
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427   rm -rf conftest*
4428   ol_cv_var_des_debug=no
4429 fi
4430 rm -f conftest*
4431                                                                 LIBS="$save_LIBS"
4432                         
4433 fi
4434
4435 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4436
4437                         if test $ol_cv_var_des_debug = yes ; then
4438                                 cat >> confdefs.h <<\EOF
4439 #define HAVE_DES_DEBUG 1
4440 EOF
4441
4442                         fi
4443
4444                         LIBS="$save_LIBS"
4445                 fi
4446         fi
4447 fi
4448
4449 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4450         for ac_hdr in krb.h des.h
4451 do
4452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4454 echo "configure:4455: checking for $ac_hdr" >&5
4455 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4456   echo $ac_n "(cached) $ac_c" 1>&6
4457 else
4458   cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 #include <$ac_hdr>
4462 EOF
4463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4464 { (eval echo configure:4465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4466 if test -z "$ac_err"; then
4467   rm -rf conftest*
4468   eval "ac_cv_header_$ac_safe=yes"
4469 else
4470   echo "$ac_err" >&5
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -rf conftest*
4474   eval "ac_cv_header_$ac_safe=no"
4475 fi
4476 rm -f conftest*
4477 fi
4478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4479   echo "$ac_t""yes" 1>&6
4480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4481   cat >> confdefs.h <<EOF
4482 #define $ac_tr_hdr 1
4483 EOF
4484  
4485 else
4486   echo "$ac_t""no" 1>&6
4487 fi
4488 done
4489
4490
4491         if test $ac_cv_header_krb_h = yes ; then
4492                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4493 echo "configure:4494: checking for main in -lkrb" >&5
4494 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4496   echo $ac_n "(cached) $ac_c" 1>&6
4497 else
4498   ac_save_LIBS="$LIBS"
4499 LIBS="-lkrb -ldes $LIBS"
4500 cat > conftest.$ac_ext <<EOF
4501 #line 4502 "configure"
4502 #include "confdefs.h"
4503
4504 int main() {
4505 main()
4506 ; return 0; }
4507 EOF
4508 if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4509   rm -rf conftest*
4510   eval "ac_cv_lib_$ac_lib_var=yes"
4511 else
4512   echo "configure: failed program was:" >&5
4513   cat conftest.$ac_ext >&5
4514   rm -rf conftest*
4515   eval "ac_cv_lib_$ac_lib_var=no"
4516 fi
4517 rm -f conftest*
4518 LIBS="$ac_save_LIBS"
4519
4520 fi
4521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4522   echo "$ac_t""yes" 1>&6
4523   have_k4=yes
4524 else
4525   echo "$ac_t""no" 1>&6
4526 have_k4=no
4527 fi
4528
4529
4530                 if test $have_k4 = yes ; then
4531                         ol_with_kerberos=found
4532                         ol_link_kerberos=yes
4533
4534                         KRB_LIBS="-lkrb -ldes"
4535                 fi
4536         fi
4537 fi
4538
4539 if test $ol_link_kerberos = yes ; then
4540         cat >> confdefs.h <<\EOF
4541 #define HAVE_KERBEROS 1
4542 EOF
4543
4544 fi
4545
4546 ol_link_tls=no
4547 if test $ol_with_tls != no ; then
4548         
4549         for ac_hdr in ssl.h
4550 do
4551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4553 echo "configure:4554: checking for $ac_hdr" >&5
4554 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4555   echo $ac_n "(cached) $ac_c" 1>&6
4556 else
4557   cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 #include <$ac_hdr>
4561 EOF
4562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4563 { (eval echo configure:4564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4565 if test -z "$ac_err"; then
4566   rm -rf conftest*
4567   eval "ac_cv_header_$ac_safe=yes"
4568 else
4569   echo "$ac_err" >&5
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   eval "ac_cv_header_$ac_safe=no"
4574 fi
4575 rm -f conftest*
4576 fi
4577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4578   echo "$ac_t""yes" 1>&6
4579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_hdr 1
4582 EOF
4583  
4584 else
4585   echo "$ac_t""no" 1>&6
4586 fi
4587 done
4588
4589         
4590         if test $ac_cv_header_ssl_h = yes ; then
4591                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4592 echo "configure:4593: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4593 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   ac_save_LIBS="$LIBS"
4598 LIBS="-lssl -lcrypto $LIBS"
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 /* Override any gcc2 internal prototype to avoid an error.  */
4603 /* We use char because int might match the return type of a gcc2
4604     builtin and then its argument prototype would still apply.  */
4605 char SSLeay_add_ssl_algorithms();
4606
4607 int main() {
4608 SSLeay_add_ssl_algorithms()
4609 ; return 0; }
4610 EOF
4611 if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4612   rm -rf conftest*
4613   eval "ac_cv_lib_$ac_lib_var=yes"
4614 else
4615   echo "configure: failed program was:" >&5
4616   cat conftest.$ac_ext >&5
4617   rm -rf conftest*
4618   eval "ac_cv_lib_$ac_lib_var=no"
4619 fi
4620 rm -f conftest*
4621 LIBS="$ac_save_LIBS"
4622
4623 fi
4624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4625   echo "$ac_t""yes" 1>&6
4626   have_ssleay=yes
4627                         need_rsaref=no
4628 else
4629   echo "$ac_t""no" 1>&6
4630 have_ssleay=no
4631 fi
4632
4633                         
4634                 if test $have_ssleay = no ; then
4635                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4636 echo "configure:4637: checking for ssl3_accept in -lssl" >&5
4637 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4638 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4639   echo $ac_n "(cached) $ac_c" 1>&6
4640 else
4641   ac_save_LIBS="$LIBS"
4642 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4643 cat > conftest.$ac_ext <<EOF
4644 #line 4645 "configure"
4645 #include "confdefs.h"
4646 /* Override any gcc2 internal prototype to avoid an error.  */
4647 /* We use char because int might match the return type of a gcc2
4648     builtin and then its argument prototype would still apply.  */
4649 char ssl3_accept();
4650
4651 int main() {
4652 ssl3_accept()
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4656   rm -rf conftest*
4657   eval "ac_cv_lib_$ac_lib_var=yes"
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   eval "ac_cv_lib_$ac_lib_var=no"
4663 fi
4664 rm -f conftest*
4665 LIBS="$ac_save_LIBS"
4666
4667 fi
4668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4669   echo "$ac_t""yes" 1>&6
4670   have_ssleay=yes
4671                                 need_rsaref=yes
4672 else
4673   echo "$ac_t""no" 1>&6
4674 have_ssleay=no
4675 fi
4676
4677                 fi
4678
4679                 if test $have_ssleay = yes ; then
4680                         ol_with_tls=found
4681                         ol_link_tls=yes
4682
4683                         cat >> confdefs.h <<\EOF
4684 #define HAVE_SSLEAY 1
4685 EOF
4686
4687
4688                         if test $need_rsaref = yes; then
4689                                 cat >> confdefs.h <<\EOF
4690 #define HAVE_RSAREF 1
4691 EOF
4692
4693
4694                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4695                         else
4696                                 TLS_LIBS="-lssl -lcrypto"
4697                         fi
4698                 fi
4699         fi
4700 fi
4701
4702 if test $ol_link_tls = yes ; then
4703         cat >> confdefs.h <<\EOF
4704 #define HAVE_TLS 1
4705 EOF
4706
4707 fi      
4708
4709 for ac_func in \
4710         ctime_r                 \
4711         gethostbyname_r gethostbyaddr_r \
4712
4713 do
4714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4715 echo "configure:4716: checking for $ac_func" >&5
4716 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 /* System header to define __stub macros and hopefully few prototypes,
4723     which can conflict with char $ac_func(); below.  */
4724 #include <assert.h>
4725 /* Override any gcc2 internal prototype to avoid an error.  */
4726 /* We use char because int might match the return type of a gcc2
4727     builtin and then its argument prototype would still apply.  */
4728 char $ac_func();
4729
4730 int main() {
4731
4732 /* The GNU C library defines this for functions which it implements
4733     to always fail with ENOSYS.  Some functions are actually named
4734     something starting with __ and the normal name is an alias.  */
4735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4736 choke me
4737 #else
4738 $ac_func();
4739 #endif
4740
4741 ; return 0; }
4742 EOF
4743 if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4744   rm -rf conftest*
4745   eval "ac_cv_func_$ac_func=yes"
4746 else
4747   echo "configure: failed program was:" >&5
4748   cat conftest.$ac_ext >&5
4749   rm -rf conftest*
4750   eval "ac_cv_func_$ac_func=no"
4751 fi
4752 rm -f conftest*
4753 fi
4754
4755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4756   echo "$ac_t""yes" 1>&6
4757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4758   cat >> confdefs.h <<EOF
4759 #define $ac_tr_func 1
4760 EOF
4761  
4762 else
4763   echo "$ac_t""no" 1>&6
4764 fi
4765 done
4766
4767
4768 if test "$ac_cv_func_ctime_r" = no ; then
4769         ol_cv_func_ctime_r_nargs=0
4770 else
4771         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4772 echo "configure:4773: checking number of arguments of ctime_r" >&5
4773 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4774   echo $ac_n "(cached) $ac_c" 1>&6
4775 else
4776   cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 #include <time.h>
4780 int main() {
4781 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4782 ; return 0; }
4783 EOF
4784 if { (eval echo configure:4785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4785   rm -rf conftest*
4786   ol_cv_func_ctime_r_nargs=3
4787 else
4788   echo "configure: failed program was:" >&5
4789   cat conftest.$ac_ext >&5
4790   rm -rf conftest*
4791   cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794 #include <time.h>
4795 int main() {
4796 time_t ti; char *buffer; ctime_r(&ti,buffer);
4797 ; return 0; }
4798 EOF
4799 if { (eval echo configure:4800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4800   rm -rf conftest*
4801   ol_cv_func_ctime_r_nargs=2
4802 else
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   ol_cv_func_ctime_r_nargs=0
4807 fi
4808 rm -f conftest*
4809 fi
4810 rm -f conftest*
4811 fi
4812
4813 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4814   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4815     cat >> confdefs.h <<EOF
4816 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4817 EOF
4818
4819   fi
4820
4821 fi
4822
4823 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4824         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4825 echo "configure:4826: checking number of arguments of gethostbyname_r" >&5
4826 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4827   echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829   cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832 #include <sys/types.h>
4833 #include <sys/socket.h>
4834 #include <netinet/in.h>
4835 #include <netdb.h>
4836 #define BUFSIZE (sizeof(struct hostent)+10)
4837 int main() {
4838 struct hostent hent; char buffer[BUFSIZE];
4839                 int bufsize=BUFSIZE;int h_errno;
4840                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4841                         buffer, bufsize, &h_errno);
4842 ; return 0; }
4843 EOF
4844 if { (eval echo configure:4845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4845   rm -rf conftest*
4846   ol_cv_func_gethostbyname_r_nargs=5
4847 else
4848   echo "configure: failed program was:" >&5
4849   cat conftest.$ac_ext >&5
4850   rm -rf conftest*
4851   cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854 #include <sys/types.h>
4855 #include <sys/socket.h>
4856 #include <netinet/in.h>
4857 #include <netdb.h>
4858 #define BUFSIZE (sizeof(struct hostent)+10)
4859 int main() {
4860 struct hostent hent;struct hostent *rhent;
4861                         char buffer[BUFSIZE];
4862                         int bufsize=BUFSIZE;int h_errno;
4863                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4864                                 &rhent, &h_errno);
4865 ; return 0; }
4866 EOF
4867 if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4868   rm -rf conftest*
4869   ol_cv_func_gethostbyname_r_nargs=6
4870 else
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   ol_cv_func_gethostbyname_r_nargs=0
4875 fi
4876 rm -f conftest*
4877 fi
4878 rm -f conftest*
4879 fi
4880
4881 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4882   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4883         cat >> confdefs.h <<EOF
4884 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4885 EOF
4886
4887   fi
4888
4889 else
4890         ol_cv_func_gethostbyname_r_nargs=0
4891 fi
4892  
4893 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4894         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4895 echo "configure:4896: checking number of arguments of gethostbyaddr_r" >&5
4896 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4897   echo $ac_n "(cached) $ac_c" 1>&6
4898 else
4899   cat > conftest.$ac_ext <<EOF
4900 #line 4901 "configure"
4901 #include "confdefs.h"
4902 #include <sys/types.h>
4903 #include <sys/socket.h>
4904 #include <netinet/in.h>
4905 #include <netdb.h>
4906 #define BUFSIZE (sizeof(struct hostent)+10)
4907 int main() {
4908 struct hostent hent; char buffer[BUFSIZE]; 
4909             struct in_addr add;
4910             size_t alen=sizeof(struct in_addr);
4911             int bufsize=BUFSIZE;int h_errno;
4912                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4913                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4914 ; return 0; }
4915 EOF
4916 if { (eval echo configure:4917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4917   rm -rf conftest*
4918   ol_cv_func_gethostbyaddr_r_nargs=7
4919 else
4920   echo "configure: failed program was:" >&5
4921   cat conftest.$ac_ext >&5
4922   rm -rf conftest*
4923   cat > conftest.$ac_ext <<EOF
4924 #line 4925 "configure"
4925 #include "confdefs.h"
4926 #include <sys/types.h>
4927 #include <sys/socket.h>
4928 #include <netinet/in.h>
4929 #include <netdb.h>
4930 #define BUFSIZE (sizeof(struct hostent)+10)
4931 int main() {
4932 struct hostent hent;
4933                         struct hostent *rhent; char buffer[BUFSIZE]; 
4934                         struct in_addr add;
4935                         size_t alen=sizeof(struct in_addr);
4936                         int bufsize=BUFSIZE;int h_errno;
4937                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4938                                 alen, AF_INET, &hent, buffer, bufsize, 
4939                                 &rhent, &h_errno);
4940 ; return 0; }
4941 EOF
4942 if { (eval echo configure:4943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4943   rm -rf conftest*
4944   ol_cv_func_gethostbyaddr_r_nargs=8
4945 else
4946   echo "configure: failed program was:" >&5
4947   cat conftest.$ac_ext >&5
4948   rm -rf conftest*
4949   ol_cv_func_gethostbyaddr_r_nargs=0
4950 fi
4951 rm -f conftest*
4952 fi
4953 rm -f conftest*
4954 fi
4955
4956 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4957   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4958     cat >> confdefs.h <<EOF
4959 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4960 EOF
4961
4962   fi
4963
4964 else
4965         ol_cv_func_gethostbyaddr_r_nargs=0
4966 fi
4967
4968 if test "$ac_cv_func_ctime_r" = yes \
4969         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4970         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4971         -a "$ac_cv_func_gethostbyname_r" = yes \
4972         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4973         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4974         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4975         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4976         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4977         ; then
4978  
4979         cat >> confdefs.h <<\EOF
4980 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4981 EOF
4982
4983 fi
4984
4985 ol_link_threads=no
4986 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4987         -o $ol_with_threads = posix ; then
4988
4989         for ac_hdr in pthread.h sched.h
4990 do
4991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4993 echo "configure:4994: checking for $ac_hdr" >&5
4994 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4995   echo $ac_n "(cached) $ac_c" 1>&6
4996 else
4997   cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5000 #include <$ac_hdr>
5001 EOF
5002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5003 { (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5005 if test -z "$ac_err"; then
5006   rm -rf conftest*
5007   eval "ac_cv_header_$ac_safe=yes"
5008 else
5009   echo "$ac_err" >&5
5010   echo "configure: failed program was:" >&5
5011   cat conftest.$ac_ext >&5
5012   rm -rf conftest*
5013   eval "ac_cv_header_$ac_safe=no"
5014 fi
5015 rm -f conftest*
5016 fi
5017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_hdr 1
5022 EOF
5023  
5024 else
5025   echo "$ac_t""no" 1>&6
5026 fi
5027 done
5028
5029
5030         if test $ac_cv_header_pthread_h = yes ; then
5031                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5032 echo "configure:5033: checking POSIX thread version" >&5
5033 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
5034   echo $ac_n "(cached) $ac_c" 1>&6
5035 else
5036   
5037         cat > conftest.$ac_ext <<EOF
5038 #line 5039 "configure"
5039 #include "confdefs.h"
5040
5041 #               include <pthread.h>
5042                 /* this check could be improved */
5043 #               ifdef PTHREAD_ONCE_INIT
5044                         pthread_version_final
5045 #               endif
5046         
5047 EOF
5048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5049   egrep "pthread_version_final" >/dev/null 2>&1; then
5050   rm -rf conftest*
5051   ol_pthread_final=yes
5052 else
5053   rm -rf conftest*
5054   ol_pthread_final=no
5055 fi
5056 rm -f conftest*
5057
5058
5059         cat > conftest.$ac_ext <<EOF
5060 #line 5061 "configure"
5061 #include "confdefs.h"
5062
5063 #               include <pthread.h>
5064                 /* this check could be improved */
5065 #               ifdef pthread_once_init
5066                         pthread_version_draft4
5067 #               endif
5068         
5069 EOF
5070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5071   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5072   rm -rf conftest*
5073   ol_pthread_draft4=yes
5074 else
5075   rm -rf conftest*
5076   ol_pthread_draft4=no
5077 fi
5078 rm -f conftest*
5079
5080
5081         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5082                 ol_cv_pthread_version=final
5083         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5084                 ol_cv_pthread_version=draft4
5085         else
5086                 ol_cv_pthread_version=unknown
5087         fi
5088
5089 fi
5090
5091 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5092
5093
5094                 if test $ol_cv_pthread_version = final ; then
5095                         cat >> confdefs.h <<\EOF
5096 #define HAVE_PTHREADS_FINAL 1
5097 EOF
5098
5099                 elif test $ol_cv_pthread_version = draft4 ; then
5100                         cat >> confdefs.h <<\EOF
5101 #define HAVE_PTHREADS_D4 1
5102 EOF
5103
5104                 else
5105                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5106                 fi
5107
5108                 # consider threads found
5109                 ol_with_threads=found
5110
5111                 
5112         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5113 echo "configure:5114: checking for LinuxThreads pthread.h" >&5
5114 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
5115   echo $ac_n "(cached) $ac_c" 1>&6
5116 else
5117   cat > conftest.$ac_ext <<EOF
5118 #line 5119 "configure"
5119 #include "confdefs.h"
5120 #include <pthread.h>
5121 EOF
5122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5123   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5124   rm -rf conftest*
5125   ol_cv_header_linux_threads=yes
5126 else
5127   rm -rf conftest*
5128   ol_cv_header_linux_threads=no
5129 fi
5130 rm -f conftest*
5131
5132                 
5133 fi
5134
5135 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5136         if test $ol_cv_header_linux_threads = yes; then
5137                 cat >> confdefs.h <<\EOF
5138 #define HAVE_LINUX_THREADS 1
5139 EOF
5140
5141         fi
5142
5143
5144                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5145                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5146 echo "configure:5147: checking for pthread_create in default libraries" >&5
5147                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
5148   echo $ac_n "(cached) $ac_c" 1>&6
5149 else
5150   
5151                 if test "$cross_compiling" = yes; then
5152                         ol_cv_pthread_create=yes
5153 else
5154   cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157
5158 #include <pthread.h>
5159 #ifndef NULL
5160 #define NULL (void*)0
5161 #endif
5162
5163 static void *task(p)
5164         void *p;
5165 {
5166         return (void *) (p == NULL);
5167 }
5168
5169 int main(argc, argv)
5170         int argc;
5171         char **argv;
5172 {
5173         pthread_t t;
5174         int status;
5175
5176         /* make sure pthread_create() isn't just a stub */
5177 #if HAVE_PTHREADS_D4
5178         status = pthread_create(&t, pthread_attr_default, task, NULL);
5179 #else
5180         status = pthread_create(&t, NULL, task, NULL);
5181 #endif
5182
5183         if( status ) return status;
5184
5185         /* make sure pthread_detach() isn't just a stub */
5186 #if HAVE_PTHREADS_D4
5187         status = pthread_detach( &t );
5188 #else
5189         status = pthread_detach( t );
5190 #endif
5191
5192         if( status ) return status;
5193
5194         return status;
5195 }
5196
5197 EOF
5198 if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5199 then
5200   ol_cv_pthread_create=yes
5201 else
5202   echo "configure: failed program was:" >&5
5203   cat conftest.$ac_ext >&5
5204   rm -fr conftest*
5205   ol_cv_pthread_create=no
5206 fi
5207 rm -fr conftest*
5208 fi
5209
5210 fi
5211
5212                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5213
5214                 if test $ol_cv_pthread_create != no ; then
5215                         ol_link_threads=posix
5216                         ol_link_pthreads=""
5217                 fi
5218                 
5219                 # Pthread try link: -mt (ol_cv_pthread_mt)
5220         if test "$ol_link_threads" = no ; then
5221                 # try -mt
5222                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5223 echo "configure:5224: checking for pthread link with -mt" >&5
5224 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   
5228                         # save the flags
5229                         ol_LIBS="$LIBS"
5230                         LIBS="-mt $LIBS"
5231
5232                         cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235
5236 #include <pthread.h>
5237 #ifndef NULL
5238 #define NULL (void*)0
5239 #endif
5240
5241 int main() {
5242
5243         pthread_t t;
5244
5245 #if HAVE_PTHREADS_D4
5246         pthread_create(&t, pthread_attr_default, NULL, NULL);
5247         pthread_detach( &t );
5248 #else
5249         pthread_create(&t, NULL, NULL, NULL);
5250         pthread_detach( t );
5251 #endif
5252 #ifdef HAVE_LINUX_THREADS
5253         pthread_kill_other_threads_np();
5254 #endif
5255
5256 ; return 0; }
5257 EOF
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259   rm -rf conftest*
5260   ol_cv_pthread_mt=yes
5261 else
5262   echo "configure: failed program was:" >&5
5263   cat conftest.$ac_ext >&5
5264   rm -rf conftest*
5265   ol_cv_pthread_mt=no
5266 fi
5267 rm -f conftest*
5268
5269                 # restore the LIBS
5270                 LIBS="$ol_LIBS"
5271                 
5272 fi
5273
5274 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5275
5276                 if test $ol_cv_pthread_mt = yes ; then
5277                         ol_link_pthreads="-mt"
5278                         ol_link_threads=posix
5279                 fi
5280         fi
5281
5282                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5283         if test "$ol_link_threads" = no ; then
5284                 # try -kthread
5285                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5286 echo "configure:5287: checking for pthread link with -kthread" >&5
5287 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   
5291                         # save the flags
5292                         ol_LIBS="$LIBS"
5293                         LIBS="-kthread $LIBS"
5294
5295                         cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298
5299 #include <pthread.h>
5300 #ifndef NULL
5301 #define NULL (void*)0
5302 #endif
5303
5304 int main() {
5305
5306         pthread_t t;
5307
5308 #if HAVE_PTHREADS_D4
5309         pthread_create(&t, pthread_attr_default, NULL, NULL);
5310         pthread_detach( &t );
5311 #else
5312         pthread_create(&t, NULL, NULL, NULL);
5313         pthread_detach( t );
5314 #endif
5315 #ifdef HAVE_LINUX_THREADS
5316         pthread_kill_other_threads_np();
5317 #endif
5318
5319 ; return 0; }
5320 EOF
5321 if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5322   rm -rf conftest*
5323   ol_cv_pthread_kthread=yes
5324 else
5325   echo "configure: failed program was:" >&5
5326   cat conftest.$ac_ext >&5
5327   rm -rf conftest*
5328   ol_cv_pthread_kthread=no
5329 fi
5330 rm -f conftest*
5331
5332                 # restore the LIBS
5333                 LIBS="$ol_LIBS"
5334                 
5335 fi
5336
5337 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5338
5339                 if test $ol_cv_pthread_kthread = yes ; then
5340                         ol_link_pthreads="-kthread"
5341                         ol_link_threads=posix
5342                 fi
5343         fi
5344
5345                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5346         if test "$ol_link_threads" = no ; then
5347                 # try -pthread
5348                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5349 echo "configure:5350: checking for pthread link with -pthread" >&5
5350 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
5351   echo $ac_n "(cached) $ac_c" 1>&6
5352 else
5353   
5354                         # save the flags
5355                         ol_LIBS="$LIBS"
5356                         LIBS="-pthread $LIBS"
5357
5358                         cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361
5362 #include <pthread.h>
5363 #ifndef NULL
5364 #define NULL (void*)0
5365 #endif
5366
5367 int main() {
5368
5369         pthread_t t;
5370
5371 #if HAVE_PTHREADS_D4
5372         pthread_create(&t, pthread_attr_default, NULL, NULL);
5373         pthread_detach( &t );
5374 #else
5375         pthread_create(&t, NULL, NULL, NULL);
5376         pthread_detach( t );
5377 #endif
5378 #ifdef HAVE_LINUX_THREADS
5379         pthread_kill_other_threads_np();
5380 #endif
5381
5382 ; return 0; }
5383 EOF
5384 if { (eval echo configure:5385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5385   rm -rf conftest*
5386   ol_cv_pthread_pthread=yes
5387 else
5388   echo "configure: failed program was:" >&5
5389   cat conftest.$ac_ext >&5
5390   rm -rf conftest*
5391   ol_cv_pthread_pthread=no
5392 fi
5393 rm -f conftest*
5394
5395                 # restore the LIBS
5396                 LIBS="$ol_LIBS"
5397                 
5398 fi
5399
5400 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5401
5402                 if test $ol_cv_pthread_pthread = yes ; then
5403                         ol_link_pthreads="-pthread"
5404                         ol_link_threads=posix
5405                 fi
5406         fi
5407
5408                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5409         if test "$ol_link_threads" = no ; then
5410                 # try -pthreads
5411                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5412 echo "configure:5413: checking for pthread link with -pthreads" >&5
5413 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5414   echo $ac_n "(cached) $ac_c" 1>&6
5415 else
5416   
5417                         # save the flags
5418                         ol_LIBS="$LIBS"
5419                         LIBS="-pthreads $LIBS"
5420
5421                         cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424
5425 #include <pthread.h>
5426 #ifndef NULL
5427 #define NULL (void*)0
5428 #endif
5429
5430 int main() {
5431
5432         pthread_t t;
5433
5434 #if HAVE_PTHREADS_D4
5435         pthread_create(&t, pthread_attr_default, NULL, NULL);
5436         pthread_detach( &t );
5437 #else
5438         pthread_create(&t, NULL, NULL, NULL);
5439         pthread_detach( t );
5440 #endif
5441 #ifdef HAVE_LINUX_THREADS
5442         pthread_kill_other_threads_np();
5443 #endif
5444
5445 ; return 0; }
5446 EOF
5447 if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5448   rm -rf conftest*
5449   ol_cv_pthread_pthreads=yes
5450 else
5451   echo "configure: failed program was:" >&5
5452   cat conftest.$ac_ext >&5
5453   rm -rf conftest*
5454   ol_cv_pthread_pthreads=no
5455 fi
5456 rm -f conftest*
5457
5458                 # restore the LIBS
5459                 LIBS="$ol_LIBS"
5460                 
5461 fi
5462
5463 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5464
5465                 if test $ol_cv_pthread_pthreads = yes ; then
5466                         ol_link_pthreads="-pthreads"
5467                         ol_link_threads=posix
5468                 fi
5469         fi
5470
5471                 # Pthread try link: -thread (ol_cv_pthread_thread)
5472         if test "$ol_link_threads" = no ; then
5473                 # try -thread
5474                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5475 echo "configure:5476: checking for pthread link with -thread" >&5
5476 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5477   echo $ac_n "(cached) $ac_c" 1>&6
5478 else
5479   
5480                         # save the flags
5481                         ol_LIBS="$LIBS"
5482                         LIBS="-thread $LIBS"
5483
5484                         cat > conftest.$ac_ext <<EOF
5485 #line 5486 "configure"
5486 #include "confdefs.h"
5487
5488 #include <pthread.h>
5489 #ifndef NULL
5490 #define NULL (void*)0
5491 #endif
5492
5493 int main() {
5494
5495         pthread_t t;
5496
5497 #if HAVE_PTHREADS_D4
5498         pthread_create(&t, pthread_attr_default, NULL, NULL);
5499         pthread_detach( &t );
5500 #else
5501         pthread_create(&t, NULL, NULL, NULL);
5502         pthread_detach( t );
5503 #endif
5504 #ifdef HAVE_LINUX_THREADS
5505         pthread_kill_other_threads_np();
5506 #endif
5507
5508 ; return 0; }
5509 EOF
5510 if { (eval echo configure:5511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5511   rm -rf conftest*
5512   ol_cv_pthread_thread=yes
5513 else
5514   echo "configure: failed program was:" >&5
5515   cat conftest.$ac_ext >&5
5516   rm -rf conftest*
5517   ol_cv_pthread_thread=no
5518 fi
5519 rm -f conftest*
5520
5521                 # restore the LIBS
5522                 LIBS="$ol_LIBS"
5523                 
5524 fi
5525
5526 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5527
5528                 if test $ol_cv_pthread_thread = yes ; then
5529                         ol_link_pthreads="-thread"
5530                         ol_link_threads=posix
5531                 fi
5532         fi
5533
5534
5535                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5536         if test "$ol_link_threads" = no ; then
5537                 # try -lpthread -lmach -lexc -lc_r
5538                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5539 echo "configure:5540: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5540 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5541   echo $ac_n "(cached) $ac_c" 1>&6
5542 else
5543   
5544                         # save the flags
5545                         ol_LIBS="$LIBS"
5546                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5547
5548                         cat > conftest.$ac_ext <<EOF
5549 #line 5550 "configure"
5550 #include "confdefs.h"
5551
5552 #include <pthread.h>
5553 #ifndef NULL
5554 #define NULL (void*)0
5555 #endif
5556
5557 int main() {
5558
5559         pthread_t t;
5560
5561 #if HAVE_PTHREADS_D4
5562         pthread_create(&t, pthread_attr_default, NULL, NULL);
5563         pthread_detach( &t );
5564 #else
5565         pthread_create(&t, NULL, NULL, NULL);
5566         pthread_detach( t );
5567 #endif
5568 #ifdef HAVE_LINUX_THREADS
5569         pthread_kill_other_threads_np();
5570 #endif
5571
5572 ; return 0; }
5573 EOF
5574 if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5575   rm -rf conftest*
5576   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5577 else
5578   echo "configure: failed program was:" >&5
5579   cat conftest.$ac_ext >&5
5580   rm -rf conftest*
5581   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5582 fi
5583 rm -f conftest*
5584
5585                 # restore the LIBS
5586                 LIBS="$ol_LIBS"
5587                 
5588 fi
5589
5590 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5591
5592                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5593                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5594                         ol_link_threads=posix
5595                 fi
5596         fi
5597
5598                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5599         if test "$ol_link_threads" = no ; then
5600                 # try -lpthread -lmach -lexc
5601                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5602 echo "configure:5603: checking for pthread link with -lpthread -lmach -lexc" >&5
5603 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5604   echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606   
5607                         # save the flags
5608                         ol_LIBS="$LIBS"
5609                         LIBS="-lpthread -lmach -lexc $LIBS"
5610
5611                         cat > conftest.$ac_ext <<EOF
5612 #line 5613 "configure"
5613 #include "confdefs.h"
5614
5615 #include <pthread.h>
5616 #ifndef NULL
5617 #define NULL (void*)0
5618 #endif
5619
5620 int main() {
5621
5622         pthread_t t;
5623
5624 #if HAVE_PTHREADS_D4
5625         pthread_create(&t, pthread_attr_default, NULL, NULL);
5626         pthread_detach( &t );
5627 #else
5628         pthread_create(&t, NULL, NULL, NULL);
5629         pthread_detach( t );
5630 #endif
5631 #ifdef HAVE_LINUX_THREADS
5632         pthread_kill_other_threads_np();
5633 #endif
5634
5635 ; return 0; }
5636 EOF
5637 if { (eval echo configure:5638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5638   rm -rf conftest*
5639   ol_cv_pthread_lpthread_lmach_lexc=yes
5640 else
5641   echo "configure: failed program was:" >&5
5642   cat conftest.$ac_ext >&5
5643   rm -rf conftest*
5644   ol_cv_pthread_lpthread_lmach_lexc=no
5645 fi
5646 rm -f conftest*
5647
5648                 # restore the LIBS
5649                 LIBS="$ol_LIBS"
5650                 
5651 fi
5652
5653 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5654
5655                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5656                         ol_link_pthreads="-lpthread -lmach -lexc"
5657                         ol_link_threads=posix
5658                 fi
5659         fi
5660
5661
5662                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5663         if test "$ol_link_threads" = no ; then
5664                 # try -lpthread -Wl,-woff,85
5665                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5666 echo "configure:5667: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5667 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5668   echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670   
5671                         # save the flags
5672                         ol_LIBS="$LIBS"
5673                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5674
5675                         cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5678
5679 #include <pthread.h>
5680 #ifndef NULL
5681 #define NULL (void*)0
5682 #endif
5683
5684 int main() {
5685
5686         pthread_t t;
5687
5688 #if HAVE_PTHREADS_D4
5689         pthread_create(&t, pthread_attr_default, NULL, NULL);
5690         pthread_detach( &t );
5691 #else
5692         pthread_create(&t, NULL, NULL, NULL);
5693         pthread_detach( t );
5694 #endif
5695 #ifdef HAVE_LINUX_THREADS
5696         pthread_kill_other_threads_np();
5697 #endif
5698
5699 ; return 0; }
5700 EOF
5701 if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5702   rm -rf conftest*
5703   ol_cv_pthread_lib_lpthread_woff=yes
5704 else
5705   echo "configure: failed program was:" >&5
5706   cat conftest.$ac_ext >&5
5707   rm -rf conftest*
5708   ol_cv_pthread_lib_lpthread_woff=no
5709 fi
5710 rm -f conftest*
5711
5712                 # restore the LIBS
5713                 LIBS="$ol_LIBS"
5714                 
5715 fi
5716
5717 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5718
5719                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5720                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5721                         ol_link_threads=posix
5722                 fi
5723         fi
5724
5725
5726                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5727         if test "$ol_link_threads" = no ; then
5728                 # try -lpthread
5729                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5730 echo "configure:5731: checking for pthread link with -lpthread" >&5
5731 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5732   echo $ac_n "(cached) $ac_c" 1>&6
5733 else
5734   
5735                         # save the flags
5736                         ol_LIBS="$LIBS"
5737                         LIBS="-lpthread $LIBS"
5738
5739                         cat > conftest.$ac_ext <<EOF
5740 #line 5741 "configure"
5741 #include "confdefs.h"
5742
5743 #include <pthread.h>
5744 #ifndef NULL
5745 #define NULL (void*)0
5746 #endif
5747
5748 int main() {
5749
5750         pthread_t t;
5751
5752 #if HAVE_PTHREADS_D4
5753         pthread_create(&t, pthread_attr_default, NULL, NULL);
5754         pthread_detach( &t );
5755 #else
5756         pthread_create(&t, NULL, NULL, NULL);
5757         pthread_detach( t );
5758 #endif
5759 #ifdef HAVE_LINUX_THREADS
5760         pthread_kill_other_threads_np();
5761 #endif
5762
5763 ; return 0; }
5764 EOF
5765 if { (eval echo configure:5766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5766   rm -rf conftest*
5767   ol_cv_pthread_lpthread=yes
5768 else
5769   echo "configure: failed program was:" >&5
5770   cat conftest.$ac_ext >&5
5771   rm -rf conftest*
5772   ol_cv_pthread_lpthread=no
5773 fi
5774 rm -f conftest*
5775
5776                 # restore the LIBS
5777                 LIBS="$ol_LIBS"
5778                 
5779 fi
5780
5781 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5782
5783                 if test $ol_cv_pthread_lpthread = yes ; then
5784                         ol_link_pthreads="-lpthread"
5785                         ol_link_threads=posix
5786                 fi
5787         fi
5788
5789                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5790         if test "$ol_link_threads" = no ; then
5791                 # try -lc_r
5792                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5793 echo "configure:5794: checking for pthread link with -lc_r" >&5
5794 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5795   echo $ac_n "(cached) $ac_c" 1>&6
5796 else
5797   
5798                         # save the flags
5799                         ol_LIBS="$LIBS"
5800                         LIBS="-lc_r $LIBS"
5801
5802                         cat > conftest.$ac_ext <<EOF
5803 #line 5804 "configure"
5804 #include "confdefs.h"
5805
5806 #include <pthread.h>
5807 #ifndef NULL
5808 #define NULL (void*)0
5809 #endif
5810
5811 int main() {
5812
5813         pthread_t t;
5814
5815 #if HAVE_PTHREADS_D4
5816         pthread_create(&t, pthread_attr_default, NULL, NULL);
5817         pthread_detach( &t );
5818 #else
5819         pthread_create(&t, NULL, NULL, NULL);
5820         pthread_detach( t );
5821 #endif
5822 #ifdef HAVE_LINUX_THREADS
5823         pthread_kill_other_threads_np();
5824 #endif
5825
5826 ; return 0; }
5827 EOF
5828 if { (eval echo configure:5829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5829   rm -rf conftest*
5830   ol_cv_pthread_lc_r=yes
5831 else
5832   echo "configure: failed program was:" >&5
5833   cat conftest.$ac_ext >&5
5834   rm -rf conftest*
5835   ol_cv_pthread_lc_r=no
5836 fi
5837 rm -f conftest*
5838
5839                 # restore the LIBS
5840                 LIBS="$ol_LIBS"
5841                 
5842 fi
5843
5844 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5845
5846                 if test $ol_cv_pthread_lc_r = yes ; then
5847                         ol_link_pthreads="-lc_r"
5848                         ol_link_threads=posix
5849                 fi
5850         fi
5851
5852
5853                 # Pthread try link: -threads (ol_cv_pthread_threads)
5854         if test "$ol_link_threads" = no ; then
5855                 # try -threads
5856                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5857 echo "configure:5858: checking for pthread link with -threads" >&5
5858 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5859   echo $ac_n "(cached) $ac_c" 1>&6
5860 else
5861   
5862                         # save the flags
5863                         ol_LIBS="$LIBS"
5864                         LIBS="-threads $LIBS"
5865
5866                         cat > conftest.$ac_ext <<EOF
5867 #line 5868 "configure"
5868 #include "confdefs.h"
5869
5870 #include <pthread.h>
5871 #ifndef NULL
5872 #define NULL (void*)0
5873 #endif
5874
5875 int main() {
5876
5877         pthread_t t;
5878
5879 #if HAVE_PTHREADS_D4
5880         pthread_create(&t, pthread_attr_default, NULL, NULL);
5881         pthread_detach( &t );
5882 #else
5883         pthread_create(&t, NULL, NULL, NULL);
5884         pthread_detach( t );
5885 #endif
5886 #ifdef HAVE_LINUX_THREADS
5887         pthread_kill_other_threads_np();
5888 #endif
5889
5890 ; return 0; }
5891 EOF
5892 if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5893   rm -rf conftest*
5894   ol_cv_pthread_threads=yes
5895 else
5896   echo "configure: failed program was:" >&5
5897   cat conftest.$ac_ext >&5
5898   rm -rf conftest*
5899   ol_cv_pthread_threads=no
5900 fi
5901 rm -f conftest*
5902
5903                 # restore the LIBS
5904                 LIBS="$ol_LIBS"
5905                 
5906 fi
5907
5908 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5909
5910                 if test $ol_cv_pthread_threads = yes ; then
5911                         ol_link_pthreads="-threads"
5912                         ol_link_threads=posix
5913                 fi
5914         fi
5915
5916
5917                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5918         if test "$ol_link_threads" = no ; then
5919                 # try -lpthreads -lmach -lexc -lc_r
5920                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5921 echo "configure:5922: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5922 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5923   echo $ac_n "(cached) $ac_c" 1>&6
5924 else
5925   
5926                         # save the flags
5927                         ol_LIBS="$LIBS"
5928                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5929
5930                         cat > conftest.$ac_ext <<EOF
5931 #line 5932 "configure"
5932 #include "confdefs.h"
5933
5934 #include <pthread.h>
5935 #ifndef NULL
5936 #define NULL (void*)0
5937 #endif
5938
5939 int main() {
5940
5941         pthread_t t;
5942
5943 #if HAVE_PTHREADS_D4
5944         pthread_create(&t, pthread_attr_default, NULL, NULL);
5945         pthread_detach( &t );
5946 #else
5947         pthread_create(&t, NULL, NULL, NULL);
5948         pthread_detach( t );
5949 #endif
5950 #ifdef HAVE_LINUX_THREADS
5951         pthread_kill_other_threads_np();
5952 #endif
5953
5954 ; return 0; }
5955 EOF
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5957   rm -rf conftest*
5958   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5959 else
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5964 fi
5965 rm -f conftest*
5966
5967                 # restore the LIBS
5968                 LIBS="$ol_LIBS"
5969                 
5970 fi
5971
5972 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5973
5974                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5975                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5976                         ol_link_threads=posix
5977                 fi
5978         fi
5979
5980                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5981         if test "$ol_link_threads" = no ; then
5982                 # try -lpthreads -lmach -lexc
5983                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5984 echo "configure:5985: checking for pthread link with -lpthreads -lmach -lexc" >&5
5985 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5986   echo $ac_n "(cached) $ac_c" 1>&6
5987 else
5988   
5989                         # save the flags
5990                         ol_LIBS="$LIBS"
5991                         LIBS="-lpthreads -lmach -lexc $LIBS"
5992
5993                         cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996
5997 #include <pthread.h>
5998 #ifndef NULL
5999 #define NULL (void*)0
6000 #endif
6001
6002 int main() {
6003
6004         pthread_t t;
6005
6006 #if HAVE_PTHREADS_D4
6007         pthread_create(&t, pthread_attr_default, NULL, NULL);
6008         pthread_detach( &t );
6009 #else
6010         pthread_create(&t, NULL, NULL, NULL);
6011         pthread_detach( t );
6012 #endif
6013 #ifdef HAVE_LINUX_THREADS
6014         pthread_kill_other_threads_np();
6015 #endif
6016
6017 ; return 0; }
6018 EOF
6019 if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6020   rm -rf conftest*
6021   ol_cv_pthread_lpthreads_lmach_lexc=yes
6022 else
6023   echo "configure: failed program was:" >&5
6024   cat conftest.$ac_ext >&5
6025   rm -rf conftest*
6026   ol_cv_pthread_lpthreads_lmach_lexc=no
6027 fi
6028 rm -f conftest*
6029
6030                 # restore the LIBS
6031                 LIBS="$ol_LIBS"
6032                 
6033 fi
6034
6035 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6036
6037                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6038                         ol_link_pthreads="-lpthreads -lmach -lexc"
6039                         ol_link_threads=posix
6040                 fi
6041         fi
6042
6043                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6044         if test "$ol_link_threads" = no ; then
6045                 # try -lpthreads -lexc
6046                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6047 echo "configure:6048: checking for pthread link with -lpthreads -lexc" >&5
6048 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
6049   echo $ac_n "(cached) $ac_c" 1>&6
6050 else
6051   
6052                         # save the flags
6053                         ol_LIBS="$LIBS"
6054                         LIBS="-lpthreads -lexc $LIBS"
6055
6056                         cat > conftest.$ac_ext <<EOF
6057 #line 6058 "configure"
6058 #include "confdefs.h"
6059
6060 #include <pthread.h>
6061 #ifndef NULL
6062 #define NULL (void*)0
6063 #endif
6064
6065 int main() {
6066
6067         pthread_t t;
6068
6069 #if HAVE_PTHREADS_D4
6070         pthread_create(&t, pthread_attr_default, NULL, NULL);
6071         pthread_detach( &t );
6072 #else
6073         pthread_create(&t, NULL, NULL, NULL);
6074         pthread_detach( t );
6075 #endif
6076 #ifdef HAVE_LINUX_THREADS
6077         pthread_kill_other_threads_np();
6078 #endif
6079
6080 ; return 0; }
6081 EOF
6082 if { (eval echo configure:6083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6083   rm -rf conftest*
6084   ol_cv_pthread_lpthreads_lexc=yes
6085 else
6086   echo "configure: failed program was:" >&5
6087   cat conftest.$ac_ext >&5
6088   rm -rf conftest*
6089   ol_cv_pthread_lpthreads_lexc=no
6090 fi
6091 rm -f conftest*
6092
6093                 # restore the LIBS
6094                 LIBS="$ol_LIBS"
6095                 
6096 fi
6097
6098 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6099
6100                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6101                         ol_link_pthreads="-lpthreads -lexc"
6102                         ol_link_threads=posix
6103                 fi
6104         fi
6105
6106
6107                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6108         if test "$ol_link_threads" = no ; then
6109                 # try -lpthreads
6110                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6111 echo "configure:6112: checking for pthread link with -lpthreads" >&5
6112 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
6113   echo $ac_n "(cached) $ac_c" 1>&6
6114 else
6115   
6116                         # save the flags
6117                         ol_LIBS="$LIBS"
6118                         LIBS="-lpthreads $LIBS"
6119
6120                         cat > conftest.$ac_ext <<EOF
6121 #line 6122 "configure"
6122 #include "confdefs.h"
6123
6124 #include <pthread.h>
6125 #ifndef NULL
6126 #define NULL (void*)0
6127 #endif
6128
6129 int main() {
6130
6131         pthread_t t;
6132
6133 #if HAVE_PTHREADS_D4
6134         pthread_create(&t, pthread_attr_default, NULL, NULL);
6135         pthread_detach( &t );
6136 #else
6137         pthread_create(&t, NULL, NULL, NULL);
6138         pthread_detach( t );
6139 #endif
6140 #ifdef HAVE_LINUX_THREADS
6141         pthread_kill_other_threads_np();
6142 #endif
6143
6144 ; return 0; }
6145 EOF
6146 if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6147   rm -rf conftest*
6148   ol_cv_pthread_lib_lpthreads=yes
6149 else
6150   echo "configure: failed program was:" >&5
6151   cat conftest.$ac_ext >&5
6152   rm -rf conftest*
6153   ol_cv_pthread_lib_lpthreads=no
6154 fi
6155 rm -f conftest*
6156
6157                 # restore the LIBS
6158                 LIBS="$ol_LIBS"
6159                 
6160 fi
6161
6162 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6163
6164                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6165                         ol_link_pthreads="-lpthreads"
6166                         ol_link_threads=posix
6167                 fi
6168         fi
6169
6170
6171                 if test $ol_link_threads != no ; then
6172                         cat >> confdefs.h <<\EOF
6173 #define HAVE_PTHREADS 1
6174 EOF
6175
6176
6177                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6178
6179                                                 save_CPPFLAGS="$CPPFLAGS"
6180                         save_LIBS="$LIBS"
6181                         LIBS="$LTHREAD_LIBS $LIBS"
6182
6183                                                                                                 for ac_func in sched_yield pthread_yield
6184 do
6185 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6186 echo "configure:6187: checking for $ac_func" >&5
6187 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6188   echo $ac_n "(cached) $ac_c" 1>&6
6189 else
6190   cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193 /* System header to define __stub macros and hopefully few prototypes,
6194     which can conflict with char $ac_func(); below.  */
6195 #include <assert.h>
6196 /* Override any gcc2 internal prototype to avoid an error.  */
6197 /* We use char because int might match the return type of a gcc2
6198     builtin and then its argument prototype would still apply.  */
6199 char $ac_func();
6200
6201 int main() {
6202
6203 /* The GNU C library defines this for functions which it implements
6204     to always fail with ENOSYS.  Some functions are actually named
6205     something starting with __ and the normal name is an alias.  */
6206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6207 choke me
6208 #else
6209 $ac_func();
6210 #endif
6211
6212 ; return 0; }
6213 EOF
6214 if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6215   rm -rf conftest*
6216   eval "ac_cv_func_$ac_func=yes"
6217 else
6218   echo "configure: failed program was:" >&5
6219   cat conftest.$ac_ext >&5
6220   rm -rf conftest*
6221   eval "ac_cv_func_$ac_func=no"
6222 fi
6223 rm -f conftest*
6224 fi
6225
6226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6227   echo "$ac_t""yes" 1>&6
6228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6229   cat >> confdefs.h <<EOF
6230 #define $ac_tr_func 1
6231 EOF
6232  
6233 else
6234   echo "$ac_t""no" 1>&6
6235 fi
6236 done
6237
6238
6239                         if test $ac_cv_func_sched_yield = no -a \
6240                                 $ac_cv_func_pthread_yield = no ; then
6241                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6242 echo "configure:6243: checking for sched_yield in -lrt" >&5
6243 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
6244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6245   echo $ac_n "(cached) $ac_c" 1>&6
6246 else
6247   ac_save_LIBS="$LIBS"
6248 LIBS="-lrt  $LIBS"
6249 cat > conftest.$ac_ext <<EOF
6250 #line 6251 "configure"
6251 #include "confdefs.h"
6252 /* Override any gcc2 internal prototype to avoid an error.  */
6253 /* We use char because int might match the return type of a gcc2
6254     builtin and then its argument prototype would still apply.  */
6255 char sched_yield();
6256
6257 int main() {
6258 sched_yield()
6259 ; return 0; }
6260 EOF
6261 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262   rm -rf conftest*
6263   eval "ac_cv_lib_$ac_lib_var=yes"
6264 else
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   eval "ac_cv_lib_$ac_lib_var=no"
6269 fi
6270 rm -f conftest*
6271 LIBS="$ac_save_LIBS"
6272
6273 fi
6274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6275   echo "$ac_t""yes" 1>&6
6276   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6277                                         cat >> confdefs.h <<\EOF
6278 #define HAVE_SCHED_YIELD 1
6279 EOF
6280
6281                                         ac_cv_func_sched_yield=yes
6282 else
6283   echo "$ac_t""no" 1>&6
6284 ac_cv_func_sched_yield=no
6285 fi
6286
6287                         fi
6288                         if test $ac_cv_func_sched_yield = no -a \
6289                                 $ac_cv_func_pthread_yield = no ; then
6290                                                                                                 for ac_func in thr_yield
6291 do
6292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6293 echo "configure:6294: checking for $ac_func" >&5
6294 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6295   echo $ac_n "(cached) $ac_c" 1>&6
6296 else
6297   cat > conftest.$ac_ext <<EOF
6298 #line 6299 "configure"
6299 #include "confdefs.h"
6300 /* System header to define __stub macros and hopefully few prototypes,
6301     which can conflict with char $ac_func(); below.  */
6302 #include <assert.h>
6303 /* Override any gcc2 internal prototype to avoid an error.  */
6304 /* We use char because int might match the return type of a gcc2
6305     builtin and then its argument prototype would still apply.  */
6306 char $ac_func();
6307
6308 int main() {
6309
6310 /* The GNU C library defines this for functions which it implements
6311     to always fail with ENOSYS.  Some functions are actually named
6312     something starting with __ and the normal name is an alias.  */
6313 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6314 choke me
6315 #else
6316 $ac_func();
6317 #endif
6318
6319 ; return 0; }
6320 EOF
6321 if { (eval echo configure:6322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6322   rm -rf conftest*
6323   eval "ac_cv_func_$ac_func=yes"
6324 else
6325   echo "configure: failed program was:" >&5
6326   cat conftest.$ac_ext >&5
6327   rm -rf conftest*
6328   eval "ac_cv_func_$ac_func=no"
6329 fi
6330 rm -f conftest*
6331 fi
6332
6333 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6334   echo "$ac_t""yes" 1>&6
6335     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6336   cat >> confdefs.h <<EOF
6337 #define $ac_tr_func 1
6338 EOF
6339  
6340 else
6341   echo "$ac_t""no" 1>&6
6342 fi
6343 done
6344
6345                         fi
6346                         if test $ac_cv_func_sched_yield = no -a \
6347                                 $ac_cv_func_pthread_yield = no -a \
6348                                 "$ac_cv_func_thr_yield" = no ; then
6349                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6350                         fi
6351
6352                                                 for ac_func in pthread_kill
6353 do
6354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6355 echo "configure:6356: checking for $ac_func" >&5
6356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6357   echo $ac_n "(cached) $ac_c" 1>&6
6358 else
6359   cat > conftest.$ac_ext <<EOF
6360 #line 6361 "configure"
6361 #include "confdefs.h"
6362 /* System header to define __stub macros and hopefully few prototypes,
6363     which can conflict with char $ac_func(); below.  */
6364 #include <assert.h>
6365 /* Override any gcc2 internal prototype to avoid an error.  */
6366 /* We use char because int might match the return type of a gcc2
6367     builtin and then its argument prototype would still apply.  */
6368 char $ac_func();
6369
6370 int main() {
6371
6372 /* The GNU C library defines this for functions which it implements
6373     to always fail with ENOSYS.  Some functions are actually named
6374     something starting with __ and the normal name is an alias.  */
6375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6376 choke me
6377 #else
6378 $ac_func();
6379 #endif
6380
6381 ; return 0; }
6382 EOF
6383 if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6384   rm -rf conftest*
6385   eval "ac_cv_func_$ac_func=yes"
6386 else
6387   echo "configure: failed program was:" >&5
6388   cat conftest.$ac_ext >&5
6389   rm -rf conftest*
6390   eval "ac_cv_func_$ac_func=no"
6391 fi
6392 rm -f conftest*
6393 fi
6394
6395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6396   echo "$ac_t""yes" 1>&6
6397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6398   cat >> confdefs.h <<EOF
6399 #define $ac_tr_func 1
6400 EOF
6401  
6402 else
6403   echo "$ac_t""no" 1>&6
6404 fi
6405 done
6406
6407
6408                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6409 echo "configure:6410: checking for pthread_detach with <pthread.h>" >&5
6410 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6411   echo $ac_n "(cached) $ac_c" 1>&6
6412 else
6413   
6414                                                                 cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417
6418 #include <pthread.h>
6419 #ifndef NULL
6420 #define NULL (void*)0
6421 #endif
6422
6423 int main() {
6424 pthread_detach(NULL);
6425 ; return 0; }
6426 EOF
6427 if { (eval echo configure:6428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6428   rm -rf conftest*
6429   ol_cv_func_pthread_detach=yes
6430 else
6431   echo "configure: failed program was:" >&5
6432   cat conftest.$ac_ext >&5
6433   rm -rf conftest*
6434   ol_cv_func_pthread_detach=no
6435 fi
6436 rm -f conftest*
6437                         
6438 fi
6439
6440 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6441
6442                         if test $ol_cv_func_pthread_detach = no ; then
6443                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6444                         fi
6445
6446                         cat >> confdefs.h <<\EOF
6447 #define HAVE_PTHREAD_DETACH 1
6448 EOF
6449
6450
6451                                                 for ac_func in \
6452                                 pthread_setconcurrency \
6453                                 pthread_getconcurrency \
6454                                 thr_setconcurrency \
6455                                 thr_getconcurrency \
6456                         
6457 do
6458 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6459 echo "configure:6460: checking for $ac_func" >&5
6460 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6461   echo $ac_n "(cached) $ac_c" 1>&6
6462 else
6463   cat > conftest.$ac_ext <<EOF
6464 #line 6465 "configure"
6465 #include "confdefs.h"
6466 /* System header to define __stub macros and hopefully few prototypes,
6467     which can conflict with char $ac_func(); below.  */
6468 #include <assert.h>
6469 /* Override any gcc2 internal prototype to avoid an error.  */
6470 /* We use char because int might match the return type of a gcc2
6471     builtin and then its argument prototype would still apply.  */
6472 char $ac_func();
6473
6474 int main() {
6475
6476 /* The GNU C library defines this for functions which it implements
6477     to always fail with ENOSYS.  Some functions are actually named
6478     something starting with __ and the normal name is an alias.  */
6479 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6480 choke me
6481 #else
6482 $ac_func();
6483 #endif
6484
6485 ; return 0; }
6486 EOF
6487 if { (eval echo configure:6488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6488   rm -rf conftest*
6489   eval "ac_cv_func_$ac_func=yes"
6490 else
6491   echo "configure: failed program was:" >&5
6492   cat conftest.$ac_ext >&5
6493   rm -rf conftest*
6494   eval "ac_cv_func_$ac_func=no"
6495 fi
6496 rm -f conftest*
6497 fi
6498
6499 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6500   echo "$ac_t""yes" 1>&6
6501     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6502   cat >> confdefs.h <<EOF
6503 #define $ac_tr_func 1
6504 EOF
6505  
6506 else
6507   echo "$ac_t""no" 1>&6
6508 fi
6509 done
6510
6511
6512                         
6513         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6514 echo "configure:6515: checking for pthread_kill_other_threads_np" >&5
6515 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6516   echo $ac_n "(cached) $ac_c" 1>&6
6517 else
6518   cat > conftest.$ac_ext <<EOF
6519 #line 6520 "configure"
6520 #include "confdefs.h"
6521 /* System header to define __stub macros and hopefully few prototypes,
6522     which can conflict with char pthread_kill_other_threads_np(); below.  */
6523 #include <assert.h>
6524 /* Override any gcc2 internal prototype to avoid an error.  */
6525 /* We use char because int might match the return type of a gcc2
6526     builtin and then its argument prototype would still apply.  */
6527 char pthread_kill_other_threads_np();
6528
6529 int main() {
6530
6531 /* The GNU C library defines this for functions which it implements
6532     to always fail with ENOSYS.  Some functions are actually named
6533     something starting with __ and the normal name is an alias.  */
6534 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6535 choke me
6536 #else
6537 pthread_kill_other_threads_np();
6538 #endif
6539
6540 ; return 0; }
6541 EOF
6542 if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6543   rm -rf conftest*
6544   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6545 else
6546   echo "configure: failed program was:" >&5
6547   cat conftest.$ac_ext >&5
6548   rm -rf conftest*
6549   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6550 fi
6551 rm -f conftest*
6552 fi
6553
6554 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6555   echo "$ac_t""yes" 1>&6
6556   :
6557 else
6558   echo "$ac_t""no" 1>&6
6559 fi
6560
6561         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6562 echo "configure:6563: checking for LinuxThreads implementation" >&5
6563 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6564   echo $ac_n "(cached) $ac_c" 1>&6
6565 else
6566   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6567 fi
6568
6569 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6570
6571                         
6572         
6573         
6574         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6575 echo "configure:6576: checking for LinuxThreads consistency" >&5
6576 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6577   echo $ac_n "(cached) $ac_c" 1>&6
6578 else
6579   
6580                 if test $ol_cv_header_linux_threads = yes -a \
6581                         $ol_cv_sys_linux_threads = yes; then
6582                         ol_cv_linux_threads=yes
6583                 elif test $ol_cv_header_linux_threads = no -a \
6584                         $ol_cv_sys_linux_threads = no; then
6585                         ol_cv_linux_threads=no
6586                 else
6587                         ol_cv_linux_threads=error
6588                 fi
6589         
6590 fi
6591
6592 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6593
6594
6595                         if test $ol_cv_linux_threads = error; then
6596                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6597                         fi
6598
6599                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6600 echo "configure:6601: checking if pthread_create() works" >&5
6601                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6602   echo $ac_n "(cached) $ac_c" 1>&6
6603 else
6604   
6605                         if test "$cross_compiling" = yes; then
6606                                 ol_cv_pthread_create_works=yes
6607 else
6608   cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611
6612 #include <pthread.h>
6613 #ifndef NULL
6614 #define NULL (void*)0
6615 #endif
6616
6617 static void *task(p)
6618         void *p;
6619 {
6620         return (void *) (p == NULL);
6621 }
6622
6623 int main(argc, argv)
6624         int argc;
6625         char **argv;
6626 {
6627         pthread_t t;
6628 #if HAVE_PTHREADS_D4
6629         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6630 #else
6631         exit(pthread_create(&t, NULL, task, NULL));
6632 #endif
6633 }
6634
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6637 then
6638   ol_cv_pthread_create_works=yes
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -fr conftest*
6643   ol_cv_pthread_create_works=no
6644 fi
6645 rm -fr conftest*
6646 fi
6647
6648 fi
6649
6650                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6651
6652                         if test $ol_cv_pthread_create_works = no ; then
6653                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6654                         fi
6655
6656                                                 if test $ol_with_yielding_select = auto ; then
6657                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6658 echo "configure:6659: checking if select yields when using pthreads" >&5
6659                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6660   echo $ac_n "(cached) $ac_c" 1>&6
6661 else
6662   
6663                                 if test "$cross_compiling" = yes; then
6664   
6665                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6666 else
6667   cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670
6671 #include <sys/types.h>
6672 #include <sys/time.h>
6673 #include <unistd.h>
6674 #include <pthread.h>
6675 #ifndef NULL
6676 #define NULL (void*) 0
6677 #endif
6678
6679 static int fildes[2];
6680
6681 static void *task(p)
6682         void *p;
6683 {
6684         int i;
6685         struct timeval tv;
6686
6687         fd_set rfds;
6688
6689         tv.tv_sec=10;
6690         tv.tv_usec=0;
6691
6692         FD_ZERO(&rfds);
6693         FD_SET(fildes[0], &rfds);
6694
6695         /* we're not interested in any fds */
6696         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6697
6698         if(i < 0) {
6699                 perror("select");
6700                 exit(10);
6701         }
6702
6703         exit(0); /* if we exit here, the select blocked the whole process */
6704 }
6705
6706 int main(argc, argv)
6707         int argc;
6708         char **argv;
6709 {
6710         pthread_t t;
6711
6712         /* create a pipe to select */
6713         if(pipe(&fildes[0])) {
6714                 perror("select");
6715                 exit(1);
6716         }
6717
6718 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6719         (void) pthread_setconcurrency(2);
6720 #else
6721 #ifdef HAVE_THR_SETCONCURRENCY
6722         /* Set Solaris LWP concurrency to 2 */
6723         thr_setconcurrency(2);
6724 #endif
6725 #endif
6726
6727 #if HAVE_PTHREADS_D4
6728         pthread_create(&t, pthread_attr_default, task, NULL);
6729 #else
6730         pthread_create(&t, NULL, task, NULL);
6731 #endif
6732
6733 #if HAVE_SCHED_YIELD
6734         sched_yield();  /* make sure task runs first */
6735 #else
6736 #ifdef HAVE_PTHREAD_YIELD
6737         pthread_yield();        /* make sure task runs first */
6738 #endif
6739 #endif
6740
6741         exit(2);
6742 }
6743 EOF
6744 if { (eval echo configure:6745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6745 then
6746   ol_cv_pthread_select_yields=no
6747 else
6748   echo "configure: failed program was:" >&5
6749   cat conftest.$ac_ext >&5
6750   rm -fr conftest*
6751   ol_cv_pthread_select_yields=yes
6752 fi
6753 rm -fr conftest*
6754 fi
6755
6756 fi
6757
6758                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6759
6760                                 if test $ol_cv_pthread_select_yields = yes ; then
6761                                         ol_with_yielding_select=yes
6762                                 fi
6763                         fi
6764
6765                                                 CPPFLAGS="$save_CPPFLAGS"
6766                         LIBS="$save_LIBS"
6767                 else
6768                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6769                 fi
6770         fi
6771
6772         if test $ol_with_threads = posix ; then
6773                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6774         fi
6775 fi
6776
6777 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6778         -o $ol_with_threads = mach ; then
6779
6780                 for ac_hdr in mach/cthreads.h
6781 do
6782 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6783 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6784 echo "configure:6785: checking for $ac_hdr" >&5
6785 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6786   echo $ac_n "(cached) $ac_c" 1>&6
6787 else
6788   cat > conftest.$ac_ext <<EOF
6789 #line 6790 "configure"
6790 #include "confdefs.h"
6791 #include <$ac_hdr>
6792 EOF
6793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6794 { (eval echo configure:6795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6796 if test -z "$ac_err"; then
6797   rm -rf conftest*
6798   eval "ac_cv_header_$ac_safe=yes"
6799 else
6800   echo "$ac_err" >&5
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -rf conftest*
6804   eval "ac_cv_header_$ac_safe=no"
6805 fi
6806 rm -f conftest*
6807 fi
6808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6809   echo "$ac_t""yes" 1>&6
6810     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6811   cat >> confdefs.h <<EOF
6812 #define $ac_tr_hdr 1
6813 EOF
6814  
6815 else
6816   echo "$ac_t""no" 1>&6
6817 fi
6818 done
6819
6820         if test $ac_cv_header_mach_cthreads_h = yes ; then
6821                 ol_with_threads=found
6822
6823                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6824 echo "configure:6825: checking for cthread_fork" >&5
6825 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* System header to define __stub macros and hopefully few prototypes,
6832     which can conflict with char cthread_fork(); below.  */
6833 #include <assert.h>
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char cthread_fork();
6838
6839 int main() {
6840
6841 /* The GNU C library defines this for functions which it implements
6842     to always fail with ENOSYS.  Some functions are actually named
6843     something starting with __ and the normal name is an alias.  */
6844 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6845 choke me
6846 #else
6847 cthread_fork();
6848 #endif
6849
6850 ; return 0; }
6851 EOF
6852 if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6853   rm -rf conftest*
6854   eval "ac_cv_func_cthread_fork=yes"
6855 else
6856   echo "configure: failed program was:" >&5
6857   cat conftest.$ac_ext >&5
6858   rm -rf conftest*
6859   eval "ac_cv_func_cthread_fork=no"
6860 fi
6861 rm -f conftest*
6862 fi
6863
6864 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6865   echo "$ac_t""yes" 1>&6
6866   ol_link_threads=yes
6867 else
6868   echo "$ac_t""no" 1>&6
6869 fi
6870
6871
6872                 if test $ol_link_threads = no ; then
6873                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6874 echo "configure:6875: checking for cthread_fork with -all_load" >&5
6875 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6876   echo $ac_n "(cached) $ac_c" 1>&6
6877 else
6878   
6879                                                                 save_LIBS="$LIBS"
6880                                 LIBS="-all_load $LIBS"
6881                                 cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 #include <mach/cthreads.h>
6885 int main() {
6886
6887                                         cthread_fork((void *)0, (void *)0);
6888                                         
6889 ; return 0; }
6890 EOF
6891 if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6892   rm -rf conftest*
6893   ol_cv_cthread_all_load=yes
6894 else
6895   echo "configure: failed program was:" >&5
6896   cat conftest.$ac_ext >&5
6897   rm -rf conftest*
6898   ol_cv_cthread_all_load=no
6899 fi
6900 rm -f conftest*
6901                                                                 LIBS="$save_LIBS"
6902                         
6903 fi
6904
6905 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6906
6907                         if test $ol_cv_cthread_all_load = yes ; then
6908                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6909                                 ol_link_threads=mach
6910                         fi
6911                 fi
6912
6913                 if test $ol_link_threads != no ; then
6914                         : check for cthread specific functionality here
6915                         cat >> confdefs.h <<\EOF
6916 #define HAVE_MACH_CTHREADS 1
6917 EOF
6918
6919                 else
6920                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6921                 fi
6922         fi
6923
6924         if test $ol_with_threads = mach ; then
6925                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6926         fi
6927 fi
6928
6929 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6930         -o $ol_with_threads = lwp ; then
6931
6932                 for ac_hdr in thread.h synch.h
6933 do
6934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6936 echo "configure:6937: checking for $ac_hdr" >&5
6937 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6938   echo $ac_n "(cached) $ac_c" 1>&6
6939 else
6940   cat > conftest.$ac_ext <<EOF
6941 #line 6942 "configure"
6942 #include "confdefs.h"
6943 #include <$ac_hdr>
6944 EOF
6945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6946 { (eval echo configure:6947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6948 if test -z "$ac_err"; then
6949   rm -rf conftest*
6950   eval "ac_cv_header_$ac_safe=yes"
6951 else
6952   echo "$ac_err" >&5
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956   eval "ac_cv_header_$ac_safe=no"
6957 fi
6958 rm -f conftest*
6959 fi
6960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6961   echo "$ac_t""yes" 1>&6
6962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6963   cat >> confdefs.h <<EOF
6964 #define $ac_tr_hdr 1
6965 EOF
6966  
6967 else
6968   echo "$ac_t""no" 1>&6
6969 fi
6970 done
6971
6972         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6973                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6974 echo "configure:6975: checking for thr_create in -lthread" >&5
6975 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6977   echo $ac_n "(cached) $ac_c" 1>&6
6978 else
6979   ac_save_LIBS="$LIBS"
6980 LIBS="-lthread  $LIBS"
6981 cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984 /* Override any gcc2 internal prototype to avoid an error.  */
6985 /* We use char because int might match the return type of a gcc2
6986     builtin and then its argument prototype would still apply.  */
6987 char thr_create();
6988
6989 int main() {
6990 thr_create()
6991 ; return 0; }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6994   rm -rf conftest*
6995   eval "ac_cv_lib_$ac_lib_var=yes"
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -rf conftest*
7000   eval "ac_cv_lib_$ac_lib_var=no"
7001 fi
7002 rm -f conftest*
7003 LIBS="$ac_save_LIBS"
7004
7005 fi
7006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7007   echo "$ac_t""yes" 1>&6
7008   have_thr=yes
7009 else
7010   echo "$ac_t""no" 1>&6
7011 have_thr=no
7012 fi
7013
7014
7015                 if test $have_thr = yes ; then
7016                         cat >> confdefs.h <<\EOF
7017 #define HAVE_THR 1
7018 EOF
7019
7020                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7021                         ol_link_threads=thr
7022
7023                         if test $ol_with_yielding_select = auto ; then
7024                                 ol_with_yielding_select=yes
7025                         fi
7026
7027                                                 for ac_func in \
7028                                 thr_setconcurrency \
7029                                 thr_getconcurrency \
7030                         
7031 do
7032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7033 echo "configure:7034: checking for $ac_func" >&5
7034 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7035   echo $ac_n "(cached) $ac_c" 1>&6
7036 else
7037   cat > conftest.$ac_ext <<EOF
7038 #line 7039 "configure"
7039 #include "confdefs.h"
7040 /* System header to define __stub macros and hopefully few prototypes,
7041     which can conflict with char $ac_func(); below.  */
7042 #include <assert.h>
7043 /* Override any gcc2 internal prototype to avoid an error.  */
7044 /* We use char because int might match the return type of a gcc2
7045     builtin and then its argument prototype would still apply.  */
7046 char $ac_func();
7047
7048 int main() {
7049
7050 /* The GNU C library defines this for functions which it implements
7051     to always fail with ENOSYS.  Some functions are actually named
7052     something starting with __ and the normal name is an alias.  */
7053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7054 choke me
7055 #else
7056 $ac_func();
7057 #endif
7058
7059 ; return 0; }
7060 EOF
7061 if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7062   rm -rf conftest*
7063   eval "ac_cv_func_$ac_func=yes"
7064 else
7065   echo "configure: failed program was:" >&5
7066   cat conftest.$ac_ext >&5
7067   rm -rf conftest*
7068   eval "ac_cv_func_$ac_func=no"
7069 fi
7070 rm -f conftest*
7071 fi
7072
7073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7074   echo "$ac_t""yes" 1>&6
7075     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7076   cat >> confdefs.h <<EOF
7077 #define $ac_tr_func 1
7078 EOF
7079  
7080 else
7081   echo "$ac_t""no" 1>&6
7082 fi
7083 done
7084
7085                 fi
7086         fi
7087
7088                 for ac_hdr in lwp/lwp.h
7089 do
7090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7092 echo "configure:7093: checking for $ac_hdr" >&5
7093 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7094   echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096   cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099 #include <$ac_hdr>
7100 EOF
7101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7102 { (eval echo configure:7103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7104 if test -z "$ac_err"; then
7105   rm -rf conftest*
7106   eval "ac_cv_header_$ac_safe=yes"
7107 else
7108   echo "$ac_err" >&5
7109   echo "configure: failed program was:" >&5
7110   cat conftest.$ac_ext >&5
7111   rm -rf conftest*
7112   eval "ac_cv_header_$ac_safe=no"
7113 fi
7114 rm -f conftest*
7115 fi
7116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7117   echo "$ac_t""yes" 1>&6
7118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7119   cat >> confdefs.h <<EOF
7120 #define $ac_tr_hdr 1
7121 EOF
7122  
7123 else
7124   echo "$ac_t""no" 1>&6
7125 fi
7126 done
7127
7128         if test $ac_cv_header_lwp_lwp_h = yes ; then
7129                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7130 echo "configure:7131: checking for lwp_create in -llwp" >&5
7131 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
7132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7133   echo $ac_n "(cached) $ac_c" 1>&6
7134 else
7135   ac_save_LIBS="$LIBS"
7136 LIBS="-llwp  $LIBS"
7137 cat > conftest.$ac_ext <<EOF
7138 #line 7139 "configure"
7139 #include "confdefs.h"
7140 /* Override any gcc2 internal prototype to avoid an error.  */
7141 /* We use char because int might match the return type of a gcc2
7142     builtin and then its argument prototype would still apply.  */
7143 char lwp_create();
7144
7145 int main() {
7146 lwp_create()
7147 ; return 0; }
7148 EOF
7149 if { (eval echo configure:7150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7150   rm -rf conftest*
7151   eval "ac_cv_lib_$ac_lib_var=yes"
7152 else
7153   echo "configure: failed program was:" >&5
7154   cat conftest.$ac_ext >&5
7155   rm -rf conftest*
7156   eval "ac_cv_lib_$ac_lib_var=no"
7157 fi
7158 rm -f conftest*
7159 LIBS="$ac_save_LIBS"
7160
7161 fi
7162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7163   echo "$ac_t""yes" 1>&6
7164   have_lwp=yes
7165 else
7166   echo "$ac_t""no" 1>&6
7167 have_lwp=no
7168 fi
7169
7170
7171                 if test $have_lwp = yes ; then
7172                         cat >> confdefs.h <<\EOF
7173 #define HAVE_LWP 1
7174 EOF
7175
7176                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7177                         ol_link_threads=lwp
7178
7179                         if test $ol_with_yielding_select = auto ; then
7180                                 ol_with_yielding_select=no
7181                         fi
7182                 fi
7183         fi
7184 fi
7185
7186 if test $ol_with_yielding_select = yes ; then
7187         cat >> confdefs.h <<\EOF
7188 #define HAVE_YIELDING_SELECT 1
7189 EOF
7190
7191 fi
7192
7193 if test $ol_with_threads = manual ; then
7194                 ol_link_threads=yes
7195
7196         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7197
7198         for ac_hdr in pthread.h sched.h
7199 do
7200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7202 echo "configure:7203: checking for $ac_hdr" >&5
7203 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7204   echo $ac_n "(cached) $ac_c" 1>&6
7205 else
7206   cat > conftest.$ac_ext <<EOF
7207 #line 7208 "configure"
7208 #include "confdefs.h"
7209 #include <$ac_hdr>
7210 EOF
7211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7212 { (eval echo configure:7213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7214 if test -z "$ac_err"; then
7215   rm -rf conftest*
7216   eval "ac_cv_header_$ac_safe=yes"
7217 else
7218   echo "$ac_err" >&5
7219   echo "configure: failed program was:" >&5
7220   cat conftest.$ac_ext >&5
7221   rm -rf conftest*
7222   eval "ac_cv_header_$ac_safe=no"
7223 fi
7224 rm -f conftest*
7225 fi
7226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7227   echo "$ac_t""yes" 1>&6
7228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7229   cat >> confdefs.h <<EOF
7230 #define $ac_tr_hdr 1
7231 EOF
7232  
7233 else
7234   echo "$ac_t""no" 1>&6
7235 fi
7236 done
7237
7238         for ac_func in sched_yield pthread_yield
7239 do
7240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7241 echo "configure:7242: checking for $ac_func" >&5
7242 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7243   echo $ac_n "(cached) $ac_c" 1>&6
7244 else
7245   cat > conftest.$ac_ext <<EOF
7246 #line 7247 "configure"
7247 #include "confdefs.h"
7248 /* System header to define __stub macros and hopefully few prototypes,
7249     which can conflict with char $ac_func(); below.  */
7250 #include <assert.h>
7251 /* Override any gcc2 internal prototype to avoid an error.  */
7252 /* We use char because int might match the return type of a gcc2
7253     builtin and then its argument prototype would still apply.  */
7254 char $ac_func();
7255
7256 int main() {
7257
7258 /* The GNU C library defines this for functions which it implements
7259     to always fail with ENOSYS.  Some functions are actually named
7260     something starting with __ and the normal name is an alias.  */
7261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7262 choke me
7263 #else
7264 $ac_func();
7265 #endif
7266
7267 ; return 0; }
7268 EOF
7269 if { (eval echo configure:7270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7270   rm -rf conftest*
7271   eval "ac_cv_func_$ac_func=yes"
7272 else
7273   echo "configure: failed program was:" >&5
7274   cat conftest.$ac_ext >&5
7275   rm -rf conftest*
7276   eval "ac_cv_func_$ac_func=no"
7277 fi
7278 rm -f conftest*
7279 fi
7280
7281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7282   echo "$ac_t""yes" 1>&6
7283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7284   cat >> confdefs.h <<EOF
7285 #define $ac_tr_func 1
7286 EOF
7287  
7288 else
7289   echo "$ac_t""no" 1>&6
7290 fi
7291 done
7292
7293         
7294         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7295 echo "configure:7296: checking for LinuxThreads pthread.h" >&5
7296 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
7297   echo $ac_n "(cached) $ac_c" 1>&6
7298 else
7299   cat > conftest.$ac_ext <<EOF
7300 #line 7301 "configure"
7301 #include "confdefs.h"
7302 #include <pthread.h>
7303 EOF
7304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7305   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7306   rm -rf conftest*
7307   ol_cv_header_linux_threads=yes
7308 else
7309   rm -rf conftest*
7310   ol_cv_header_linux_threads=no
7311 fi
7312 rm -f conftest*
7313
7314                 
7315 fi
7316
7317 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7318         if test $ol_cv_header_linux_threads = yes; then
7319                 cat >> confdefs.h <<\EOF
7320 #define HAVE_LINUX_THREADS 1
7321 EOF
7322
7323         fi
7324
7325
7326         for ac_hdr in mach/cthreads.h
7327 do
7328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7330 echo "configure:7331: checking for $ac_hdr" >&5
7331 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7332   echo $ac_n "(cached) $ac_c" 1>&6
7333 else
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 #include <$ac_hdr>
7338 EOF
7339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7340 { (eval echo configure:7341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7342 if test -z "$ac_err"; then
7343   rm -rf conftest*
7344   eval "ac_cv_header_$ac_safe=yes"
7345 else
7346   echo "$ac_err" >&5
7347   echo "configure: failed program was:" >&5
7348   cat conftest.$ac_ext >&5
7349   rm -rf conftest*
7350   eval "ac_cv_header_$ac_safe=no"
7351 fi
7352 rm -f conftest*
7353 fi
7354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7355   echo "$ac_t""yes" 1>&6
7356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7357   cat >> confdefs.h <<EOF
7358 #define $ac_tr_hdr 1
7359 EOF
7360  
7361 else
7362   echo "$ac_t""no" 1>&6
7363 fi
7364 done
7365
7366         for ac_hdr in lwp/lwp.h
7367 do
7368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7370 echo "configure:7371: checking for $ac_hdr" >&5
7371 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7372   echo $ac_n "(cached) $ac_c" 1>&6
7373 else
7374   cat > conftest.$ac_ext <<EOF
7375 #line 7376 "configure"
7376 #include "confdefs.h"
7377 #include <$ac_hdr>
7378 EOF
7379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7380 { (eval echo configure:7381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7382 if test -z "$ac_err"; then
7383   rm -rf conftest*
7384   eval "ac_cv_header_$ac_safe=yes"
7385 else
7386   echo "$ac_err" >&5
7387   echo "configure: failed program was:" >&5
7388   cat conftest.$ac_ext >&5
7389   rm -rf conftest*
7390   eval "ac_cv_header_$ac_safe=no"
7391 fi
7392 rm -f conftest*
7393 fi
7394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7395   echo "$ac_t""yes" 1>&6
7396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7397   cat >> confdefs.h <<EOF
7398 #define $ac_tr_hdr 1
7399 EOF
7400  
7401 else
7402   echo "$ac_t""no" 1>&6
7403 fi
7404 done
7405
7406         for ac_hdr in thread.h synch.h
7407 do
7408 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7409 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7410 echo "configure:7411: checking for $ac_hdr" >&5
7411 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7412   echo $ac_n "(cached) $ac_c" 1>&6
7413 else
7414   cat > conftest.$ac_ext <<EOF
7415 #line 7416 "configure"
7416 #include "confdefs.h"
7417 #include <$ac_hdr>
7418 EOF
7419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7420 { (eval echo configure:7421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7422 if test -z "$ac_err"; then
7423   rm -rf conftest*
7424   eval "ac_cv_header_$ac_safe=yes"
7425 else
7426   echo "$ac_err" >&5
7427   echo "configure: failed program was:" >&5
7428   cat conftest.$ac_ext >&5
7429   rm -rf conftest*
7430   eval "ac_cv_header_$ac_safe=no"
7431 fi
7432 rm -f conftest*
7433 fi
7434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7435   echo "$ac_t""yes" 1>&6
7436     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7437   cat >> confdefs.h <<EOF
7438 #define $ac_tr_hdr 1
7439 EOF
7440  
7441 else
7442   echo "$ac_t""no" 1>&6
7443 fi
7444 done
7445
7446 fi
7447
7448 if test $ol_link_threads != no ; then  
7449                         cat >> confdefs.h <<\EOF
7450 #define REENTRANT 1
7451 EOF
7452
7453         cat >> confdefs.h <<\EOF
7454 #define _REENTRANT 1
7455 EOF
7456
7457         cat >> confdefs.h <<\EOF
7458 #define THREAD_SAFE 1
7459 EOF
7460
7461         cat >> confdefs.h <<\EOF
7462 #define _THREAD_SAFE 1
7463 EOF
7464
7465         cat >> confdefs.h <<\EOF
7466 #define THREADSAFE 1
7467 EOF
7468
7469         cat >> confdefs.h <<\EOF
7470 #define _THREADSAFE 1
7471 EOF
7472
7473         cat >> confdefs.h <<\EOF
7474 #define _SGI_MP_SOURCE 1
7475 EOF
7476
7477
7478                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7479 echo "configure:7480: checking for thread specific errno" >&5
7480 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7481   echo $ac_n "(cached) $ac_c" 1>&6
7482 else
7483   
7484                 cat > conftest.$ac_ext <<EOF
7485 #line 7486 "configure"
7486 #include "confdefs.h"
7487 #include <errno.h>
7488 int main() {
7489 errno = 0;
7490 ; return 0; }
7491 EOF
7492 if { (eval echo configure:7493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7493   rm -rf conftest*
7494   ol_cv_errno_thread_specific=yes
7495 else
7496   echo "configure: failed program was:" >&5
7497   cat conftest.$ac_ext >&5
7498   rm -rf conftest*
7499   ol_cv_errno_thread_specific=no
7500 fi
7501 rm -f conftest*
7502         
7503 fi
7504
7505 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7506
7507                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
7508 echo "configure:7509: checking for thread specific h_errno" >&5
7509 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
7510   echo $ac_n "(cached) $ac_c" 1>&6
7511 else
7512   
7513                 cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516 #include <netdb.h>
7517 int main() {
7518 h_errno = 0;
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   ol_cv_h_errno_thread_specific=yes
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -rf conftest*
7528   ol_cv_h_errno_thread_specific=no
7529 fi
7530 rm -f conftest*
7531         
7532 fi
7533
7534 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
7535
7536         if test $ol_cv_errno_thread_specific != yes \
7537                 -o $ol_cv_h_errno_thread_specific != yes ; then
7538                 LIBS="$LTHREAD_LIBS $LIBS"
7539                 LTHREAD_LIBS=""
7540         fi
7541
7542 fi  
7543
7544 if test $ol_link_threads = no ; then
7545         if test $ol_with_threads = yes ; then
7546                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7547         fi
7548
7549         if test $ol_with_threads = auto ; then
7550                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7551                 ol_with_threads=no
7552         fi
7553
7554         cat >> confdefs.h <<\EOF
7555 #define NO_THREADS 1
7556 EOF
7557
7558         LTHREAD_LIBS=""
7559 fi
7560
7561 if test $ol_link_threads != no ; then
7562         cat >> confdefs.h <<\EOF
7563 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7564 EOF
7565
7566 fi
7567
7568
7569 ol_link_ldbm=no 
7570 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7571         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7572 echo "configure:7573: checking for DB2 library" >&5
7573 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7574   echo $ac_n "(cached) $ac_c" 1>&6
7575 else
7576         ol_LIBS="$LIBS"
7577         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7578 echo "configure:7579: checking for db_open in -ldb" >&5
7579 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7581   echo $ac_n "(cached) $ac_c" 1>&6
7582 else
7583   ac_save_LIBS="$LIBS"
7584 LIBS="-ldb  $LIBS"
7585 cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 /* Override any gcc2 internal prototype to avoid an error.  */
7589 /* We use char because int might match the return type of a gcc2
7590     builtin and then its argument prototype would still apply.  */
7591 char db_open();
7592
7593 int main() {
7594 db_open()
7595 ; return 0; }
7596 EOF
7597 if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7598   rm -rf conftest*
7599   eval "ac_cv_lib_$ac_lib_var=yes"
7600 else
7601   echo "configure: failed program was:" >&5
7602   cat conftest.$ac_ext >&5
7603   rm -rf conftest*
7604   eval "ac_cv_lib_$ac_lib_var=no"
7605 fi
7606 rm -f conftest*
7607 LIBS="$ac_save_LIBS"
7608
7609 fi
7610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7611   echo "$ac_t""yes" 1>&6
7612   ol_cv_lib_db2=-ldb
7613 else
7614   echo "$ac_t""no" 1>&6
7615 ol_cv_lib_db2=no
7616 fi
7617
7618         LIBS="$ol_LIBS"
7619
7620 fi
7621
7622 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7623
7624 for ac_hdr in db.h
7625 do
7626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7628 echo "configure:7629: checking for $ac_hdr" >&5
7629 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7630   echo $ac_n "(cached) $ac_c" 1>&6
7631 else
7632   cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 #include <$ac_hdr>
7636 EOF
7637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7638 { (eval echo configure:7639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7640 if test -z "$ac_err"; then
7641   rm -rf conftest*
7642   eval "ac_cv_header_$ac_safe=yes"
7643 else
7644   echo "$ac_err" >&5
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_header_$ac_safe=no"
7649 fi
7650 rm -f conftest*
7651 fi
7652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7653   echo "$ac_t""yes" 1>&6
7654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7655   cat >> confdefs.h <<EOF
7656 #define $ac_tr_hdr 1
7657 EOF
7658  
7659 else
7660   echo "$ac_t""no" 1>&6
7661 fi
7662 done
7663
7664 if test $ac_cv_header_db_h = yes ; then
7665         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7666 echo "configure:7667: checking if db.h is DB2" >&5
7667 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7668   echo $ac_n "(cached) $ac_c" 1>&6
7669 else
7670   
7671                 cat > conftest.$ac_ext <<EOF
7672 #line 7673 "configure"
7673 #include "confdefs.h"
7674
7675 #                       include <db.h>
7676                         /* this check could be improved */
7677 #                       ifdef DB_VERSION_MAJOR
7678 #                               if DB_VERSION_MAJOR == 2
7679                                         __db_version_2
7680 #                               endif
7681 #                       endif
7682                 
7683 EOF
7684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7685   egrep "__db_version_2" >/dev/null 2>&1; then
7686   rm -rf conftest*
7687   ol_cv_header_db2=yes
7688 else
7689   rm -rf conftest*
7690   ol_cv_header_db2=no
7691 fi
7692 rm -f conftest*
7693
7694 fi
7695
7696 echo "$ac_t""$ol_cv_header_db2" 1>&6
7697 else
7698         ol_cv_header_db2=no
7699 fi
7700
7701
7702  
7703  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7704 echo "configure:7705: checking for Berkeley DB2" >&5
7705 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7706   echo $ac_n "(cached) $ac_c" 1>&6
7707 else
7708   
7709         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7710                 ol_cv_berkeley_db2=no
7711         else
7712                 ol_cv_berkeley_db2=yes
7713         fi
7714
7715 fi
7716
7717 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7718  if test $ol_cv_berkeley_db2 = yes ; then
7719         cat >> confdefs.h <<\EOF
7720 #define HAVE_BERKELEY_DB2 1
7721 EOF
7722
7723  fi
7724
7725
7726         if test $ol_cv_berkeley_db2 = yes ; then
7727                 ol_link_ldbm=db2
7728                 ol_with_ldbm_api=db2
7729
7730                 if test $ol_with_ldbm_type = hash ; then
7731                         cat >> confdefs.h <<\EOF
7732 #define LDBM_USE_DBHASH 1
7733 EOF
7734
7735                 else
7736                         cat >> confdefs.h <<\EOF
7737 #define LDBM_USE_DBBTREE 1
7738 EOF
7739
7740                 fi
7741
7742                                                 if test $ol_cv_lib_db2 != yes ; then
7743                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7744                 fi
7745         fi
7746 fi
7747
7748 ol_link_bdb2=no
7749 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7750         ol_link_bdb2=yes
7751 fi
7752
7753 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7754         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7755 echo "configure:7756: checking for Berkeley DB library" >&5
7756 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7757   echo $ac_n "(cached) $ac_c" 1>&6
7758 else
7759   
7760         for ac_hdr in db1/db.h
7761 do
7762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7764 echo "configure:7765: checking for $ac_hdr" >&5
7765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771 #include <$ac_hdr>
7772 EOF
7773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7774 { (eval echo configure:7775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7776 if test -z "$ac_err"; then
7777   rm -rf conftest*
7778   eval "ac_cv_header_$ac_safe=yes"
7779 else
7780   echo "$ac_err" >&5
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -rf conftest*
7784   eval "ac_cv_header_$ac_safe=no"
7785 fi
7786 rm -f conftest*
7787 fi
7788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7789   echo "$ac_t""yes" 1>&6
7790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7791   cat >> confdefs.h <<EOF
7792 #define $ac_tr_hdr 1
7793 EOF
7794  
7795 else
7796   echo "$ac_t""no" 1>&6
7797 fi
7798 done
7799
7800         ol_LIBS="$LIBS"
7801         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7802 echo "configure:7803: checking for dbopen" >&5
7803 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7804   echo $ac_n "(cached) $ac_c" 1>&6
7805 else
7806   cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809 /* System header to define __stub macros and hopefully few prototypes,
7810     which can conflict with char dbopen(); below.  */
7811 #include <assert.h>
7812 /* Override any gcc2 internal prototype to avoid an error.  */
7813 /* We use char because int might match the return type of a gcc2
7814     builtin and then its argument prototype would still apply.  */
7815 char dbopen();
7816
7817 int main() {
7818
7819 /* The GNU C library defines this for functions which it implements
7820     to always fail with ENOSYS.  Some functions are actually named
7821     something starting with __ and the normal name is an alias.  */
7822 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7823 choke me
7824 #else
7825 dbopen();
7826 #endif
7827
7828 ; return 0; }
7829 EOF
7830 if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7831   rm -rf conftest*
7832   eval "ac_cv_func_dbopen=yes"
7833 else
7834   echo "configure: failed program was:" >&5
7835   cat conftest.$ac_ext >&5
7836   rm -rf conftest*
7837   eval "ac_cv_func_dbopen=no"
7838 fi
7839 rm -f conftest*
7840 fi
7841
7842 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7843   echo "$ac_t""yes" 1>&6
7844   ol_cv_lib_db=yes
7845 else
7846   echo "$ac_t""no" 1>&6
7847
7848                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
7849 echo "configure:7850: checking for dbopen in -ldb1" >&5
7850 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
7851 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   ac_save_LIBS="$LIBS"
7855 LIBS="-ldb1  $LIBS"
7856 cat > conftest.$ac_ext <<EOF
7857 #line 7858 "configure"
7858 #include "confdefs.h"
7859 /* Override any gcc2 internal prototype to avoid an error.  */
7860 /* We use char because int might match the return type of a gcc2
7861     builtin and then its argument prototype would still apply.  */
7862 char dbopen();
7863
7864 int main() {
7865 dbopen()
7866 ; return 0; }
7867 EOF
7868 if { (eval echo configure:7869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7869   rm -rf conftest*
7870   eval "ac_cv_lib_$ac_lib_var=yes"
7871 else
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -rf conftest*
7875   eval "ac_cv_lib_$ac_lib_var=no"
7876 fi
7877 rm -f conftest*
7878 LIBS="$ac_save_LIBS"
7879
7880 fi
7881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7882   echo "$ac_t""yes" 1>&6
7883   ol_cv_lib_db=-ldb1
7884 else
7885   echo "$ac_t""no" 1>&6
7886
7887                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7888 echo "configure:7889: checking for dbopen in -ldb" >&5
7889 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7890 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7891   echo $ac_n "(cached) $ac_c" 1>&6
7892 else
7893   ac_save_LIBS="$LIBS"
7894 LIBS="-ldb  $LIBS"
7895 cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 /* Override any gcc2 internal prototype to avoid an error.  */
7899 /* We use char because int might match the return type of a gcc2
7900     builtin and then its argument prototype would still apply.  */
7901 char dbopen();
7902
7903 int main() {
7904 dbopen()
7905 ; return 0; }
7906 EOF
7907 if { (eval echo configure:7908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7908   rm -rf conftest*
7909   eval "ac_cv_lib_$ac_lib_var=yes"
7910 else
7911   echo "configure: failed program was:" >&5
7912   cat conftest.$ac_ext >&5
7913   rm -rf conftest*
7914   eval "ac_cv_lib_$ac_lib_var=no"
7915 fi
7916 rm -f conftest*
7917 LIBS="$ac_save_LIBS"
7918
7919 fi
7920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7921   echo "$ac_t""yes" 1>&6
7922   ol_cv_lib_db=-ldb
7923 else
7924   echo "$ac_t""no" 1>&6
7925 ol_cv_lib_db=no
7926 fi
7927
7928                 
7929 fi
7930
7931         
7932 fi
7933
7934         LIBS="$ol_LIBS"
7935
7936 fi
7937
7938 echo "$ac_t""$ol_cv_lib_db" 1>&6
7939
7940
7941 for ac_hdr in db_185.h
7942 do
7943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7945 echo "configure:7946: checking for $ac_hdr" >&5
7946 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7947   echo $ac_n "(cached) $ac_c" 1>&6
7948 else
7949   cat > conftest.$ac_ext <<EOF
7950 #line 7951 "configure"
7951 #include "confdefs.h"
7952 #include <$ac_hdr>
7953 EOF
7954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7955 { (eval echo configure:7956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7957 if test -z "$ac_err"; then
7958   rm -rf conftest*
7959   eval "ac_cv_header_$ac_safe=yes"
7960 else
7961   echo "$ac_err" >&5
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -rf conftest*
7965   eval "ac_cv_header_$ac_safe=no"
7966 fi
7967 rm -f conftest*
7968 fi
7969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7970   echo "$ac_t""yes" 1>&6
7971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7972   cat >> confdefs.h <<EOF
7973 #define $ac_tr_hdr 1
7974 EOF
7975  
7976 else
7977   echo "$ac_t""no" 1>&6
7978 fi
7979 done
7980
7981 if test "$ol_cv_header_db2" = yes ; then
7982         
7983         ol_cv_header_db=$ac_cv_header_db_185_h
7984 else
7985         ol_cv_header_db=$ac_cv_header_db_h
7986 fi
7987
7988
7989  
7990  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7991 echo "configure:7992: checking for Berkeley DB" >&5
7992 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7993   echo $ac_n "(cached) $ac_c" 1>&6
7994 else
7995   
7996         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7997                 ol_cv_berkeley_db=no
7998         else
7999                 ol_cv_berkeley_db=yes
8000         fi
8001
8002 fi
8003
8004 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8005  if test $ol_cv_berkeley_db = yes ; then
8006         cat >> confdefs.h <<\EOF
8007 #define HAVE_BERKELEY_DB 1
8008 EOF
8009
8010  fi
8011
8012
8013         if test $ol_cv_berkeley_db = yes ; then
8014                 ol_link_ldbm=db
8015                 ol_with_ldbm_api=db
8016
8017                 if test $ol_with_ldbm_type = hash ; then
8018                         cat >> confdefs.h <<\EOF
8019 #define LDBM_USE_DBHASH 1
8020 EOF
8021
8022                 else
8023                         cat >> confdefs.h <<\EOF
8024 #define LDBM_USE_DBBTREE 1
8025 EOF
8026
8027                 fi
8028
8029                                                 if test $ol_cv_lib_db != yes ; then
8030                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8031                 fi
8032         fi
8033 fi
8034
8035 if test $ol_with_ldbm_api = manual ; then
8036                 ol_link_ldbm=yes
8037
8038         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8039
8040         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8041 do
8042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8044 echo "configure:8045: checking for $ac_hdr" >&5
8045 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8046   echo $ac_n "(cached) $ac_c" 1>&6
8047 else
8048   cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051 #include <$ac_hdr>
8052 EOF
8053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8054 { (eval echo configure:8055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8056 if test -z "$ac_err"; then
8057   rm -rf conftest*
8058   eval "ac_cv_header_$ac_safe=yes"
8059 else
8060   echo "$ac_err" >&5
8061   echo "configure: failed program was:" >&5
8062   cat conftest.$ac_ext >&5
8063   rm -rf conftest*
8064   eval "ac_cv_header_$ac_safe=no"
8065 fi
8066 rm -f conftest*
8067 fi
8068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8069   echo "$ac_t""yes" 1>&6
8070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8071   cat >> confdefs.h <<EOF
8072 #define $ac_tr_hdr 1
8073 EOF
8074  
8075 else
8076   echo "$ac_t""no" 1>&6
8077 fi
8078 done
8079
8080 fi
8081
8082 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8083         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8084         ol_with_ldbm_api=none
8085 fi
8086
8087 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8088         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8089 echo "configure:8090: checking for MDBM library" >&5
8090 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
8091   echo $ac_n "(cached) $ac_c" 1>&6
8092 else
8093         ol_LIBS="$LIBS"
8094         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8095 echo "configure:8096: checking for mdbm_set_chain" >&5
8096 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
8097   echo $ac_n "(cached) $ac_c" 1>&6
8098 else
8099   cat > conftest.$ac_ext <<EOF
8100 #line 8101 "configure"
8101 #include "confdefs.h"
8102 /* System header to define __stub macros and hopefully few prototypes,
8103     which can conflict with char mdbm_set_chain(); below.  */
8104 #include <assert.h>
8105 /* Override any gcc2 internal prototype to avoid an error.  */
8106 /* We use char because int might match the return type of a gcc2
8107     builtin and then its argument prototype would still apply.  */
8108 char mdbm_set_chain();
8109
8110 int main() {
8111
8112 /* The GNU C library defines this for functions which it implements
8113     to always fail with ENOSYS.  Some functions are actually named
8114     something starting with __ and the normal name is an alias.  */
8115 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8116 choke me
8117 #else
8118 mdbm_set_chain();
8119 #endif
8120
8121 ; return 0; }
8122 EOF
8123 if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8124   rm -rf conftest*
8125   eval "ac_cv_func_mdbm_set_chain=yes"
8126 else
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -rf conftest*
8130   eval "ac_cv_func_mdbm_set_chain=no"
8131 fi
8132 rm -f conftest*
8133 fi
8134
8135 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8136   echo "$ac_t""yes" 1>&6
8137   ol_cv_lib_mdbm=yes
8138 else
8139   echo "$ac_t""no" 1>&6
8140
8141                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8142 echo "configure:8143: checking for mdbm_set_chain in -lmdbm" >&5
8143 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
8144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8145   echo $ac_n "(cached) $ac_c" 1>&6
8146 else
8147   ac_save_LIBS="$LIBS"
8148 LIBS="-lmdbm  $LIBS"
8149 cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 /* Override any gcc2 internal prototype to avoid an error.  */
8153 /* We use char because int might match the return type of a gcc2
8154     builtin and then its argument prototype would still apply.  */
8155 char mdbm_set_chain();
8156
8157 int main() {
8158 mdbm_set_chain()
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162   rm -rf conftest*
8163   eval "ac_cv_lib_$ac_lib_var=yes"
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=no"
8169 fi
8170 rm -f conftest*
8171 LIBS="$ac_save_LIBS"
8172
8173 fi
8174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8175   echo "$ac_t""yes" 1>&6
8176   ol_cv_lib_mdbm=-lmdbm
8177 else
8178   echo "$ac_t""no" 1>&6
8179 ol_cv_lib_mdbm=no
8180 fi
8181
8182         
8183 fi
8184
8185         LIBS="$ol_LIBS"
8186
8187 fi
8188
8189 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8190
8191
8192  for ac_hdr in mdbm.h
8193 do
8194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8196 echo "configure:8197: checking for $ac_hdr" >&5
8197 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8198   echo $ac_n "(cached) $ac_c" 1>&6
8199 else
8200   cat > conftest.$ac_ext <<EOF
8201 #line 8202 "configure"
8202 #include "confdefs.h"
8203 #include <$ac_hdr>
8204 EOF
8205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8206 { (eval echo configure:8207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8208 if test -z "$ac_err"; then
8209   rm -rf conftest*
8210   eval "ac_cv_header_$ac_safe=yes"
8211 else
8212   echo "$ac_err" >&5
8213   echo "configure: failed program was:" >&5
8214   cat conftest.$ac_ext >&5
8215   rm -rf conftest*
8216   eval "ac_cv_header_$ac_safe=no"
8217 fi
8218 rm -f conftest*
8219 fi
8220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8221   echo "$ac_t""yes" 1>&6
8222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8223   cat >> confdefs.h <<EOF
8224 #define $ac_tr_hdr 1
8225 EOF
8226  
8227 else
8228   echo "$ac_t""no" 1>&6
8229 fi
8230 done
8231
8232  echo $ac_n "checking for db""... $ac_c" 1>&6
8233 echo "configure:8234: checking for db" >&5
8234 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
8235   echo $ac_n "(cached) $ac_c" 1>&6
8236 else
8237   
8238         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8239                 ol_cv_mdbm=no
8240         else
8241                 ol_cv_mdbm=yes
8242         fi
8243
8244 fi
8245
8246 echo "$ac_t""$ol_cv_mdbm" 1>&6
8247  if test $ol_cv_mdbm = yes ; then
8248         cat >> confdefs.h <<\EOF
8249 #define HAVE_MDBM 1
8250 EOF
8251
8252  fi
8253
8254
8255         if test $ol_cv_mdbm = yes ; then
8256                 ol_link_ldbm=mdbm
8257                 ol_with_ldbm_api=mdbm
8258                 if test $ol_cv_lib_mdbm != yes ; then
8259                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8260                 fi
8261         fi
8262 fi
8263
8264 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8265         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8266 echo "configure:8267: checking for GDBM library" >&5
8267 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
8268   echo $ac_n "(cached) $ac_c" 1>&6
8269 else
8270         ol_LIBS="$LIBS"
8271         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8272 echo "configure:8273: checking for gdbm_open" >&5
8273 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
8274   echo $ac_n "(cached) $ac_c" 1>&6
8275 else
8276   cat > conftest.$ac_ext <<EOF
8277 #line 8278 "configure"
8278 #include "confdefs.h"
8279 /* System header to define __stub macros and hopefully few prototypes,
8280     which can conflict with char gdbm_open(); below.  */
8281 #include <assert.h>
8282 /* Override any gcc2 internal prototype to avoid an error.  */
8283 /* We use char because int might match the return type of a gcc2
8284     builtin and then its argument prototype would still apply.  */
8285 char gdbm_open();
8286
8287 int main() {
8288
8289 /* The GNU C library defines this for functions which it implements
8290     to always fail with ENOSYS.  Some functions are actually named
8291     something starting with __ and the normal name is an alias.  */
8292 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8293 choke me
8294 #else
8295 gdbm_open();
8296 #endif
8297
8298 ; return 0; }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8301   rm -rf conftest*
8302   eval "ac_cv_func_gdbm_open=yes"
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -rf conftest*
8307   eval "ac_cv_func_gdbm_open=no"
8308 fi
8309 rm -f conftest*
8310 fi
8311
8312 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8313   echo "$ac_t""yes" 1>&6
8314   ol_cv_lib_gdbm=yes
8315 else
8316   echo "$ac_t""no" 1>&6
8317
8318                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8319 echo "configure:8320: checking for gdbm_open in -lgdbm" >&5
8320 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
8321 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   ac_save_LIBS="$LIBS"
8325 LIBS="-lgdbm  $LIBS"
8326 cat > conftest.$ac_ext <<EOF
8327 #line 8328 "configure"
8328 #include "confdefs.h"
8329 /* Override any gcc2 internal prototype to avoid an error.  */
8330 /* We use char because int might match the return type of a gcc2
8331     builtin and then its argument prototype would still apply.  */
8332 char gdbm_open();
8333
8334 int main() {
8335 gdbm_open()
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8339   rm -rf conftest*
8340   eval "ac_cv_lib_$ac_lib_var=yes"
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   eval "ac_cv_lib_$ac_lib_var=no"
8346 fi
8347 rm -f conftest*
8348 LIBS="$ac_save_LIBS"
8349
8350 fi
8351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8352   echo "$ac_t""yes" 1>&6
8353   ol_cv_lib_gdbm=-lgdbm
8354 else
8355   echo "$ac_t""no" 1>&6
8356 ol_cv_lib_gdbm=no
8357 fi
8358
8359         
8360 fi
8361
8362         LIBS="$ol_LIBS"
8363
8364 fi
8365
8366 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8367
8368
8369  for ac_hdr in gdbm.h
8370 do
8371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8373 echo "configure:8374: checking for $ac_hdr" >&5
8374 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8375   echo $ac_n "(cached) $ac_c" 1>&6
8376 else
8377   cat > conftest.$ac_ext <<EOF
8378 #line 8379 "configure"
8379 #include "confdefs.h"
8380 #include <$ac_hdr>
8381 EOF
8382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8383 { (eval echo configure:8384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8385 if test -z "$ac_err"; then
8386   rm -rf conftest*
8387   eval "ac_cv_header_$ac_safe=yes"
8388 else
8389   echo "$ac_err" >&5
8390   echo "configure: failed program was:" >&5
8391   cat conftest.$ac_ext >&5
8392   rm -rf conftest*
8393   eval "ac_cv_header_$ac_safe=no"
8394 fi
8395 rm -f conftest*
8396 fi
8397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8398   echo "$ac_t""yes" 1>&6
8399     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8400   cat >> confdefs.h <<EOF
8401 #define $ac_tr_hdr 1
8402 EOF
8403  
8404 else
8405   echo "$ac_t""no" 1>&6
8406 fi
8407 done
8408
8409  echo $ac_n "checking for db""... $ac_c" 1>&6
8410 echo "configure:8411: checking for db" >&5
8411 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
8412   echo $ac_n "(cached) $ac_c" 1>&6
8413 else
8414   
8415         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8416                 ol_cv_gdbm=no
8417         else
8418                 ol_cv_gdbm=yes
8419         fi
8420
8421 fi
8422
8423 echo "$ac_t""$ol_cv_gdbm" 1>&6
8424  if test $ol_cv_gdbm = yes ; then
8425         cat >> confdefs.h <<\EOF
8426 #define HAVE_GDBM 1
8427 EOF
8428
8429  fi
8430
8431
8432         if test $ol_cv_gdbm = yes ; then
8433                 ol_link_ldbm=gdbm
8434                 ol_with_ldbm_api=gdbm
8435
8436                 if test $ol_cv_lib_gdbm != yes ; then
8437                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
8438                 fi
8439         fi
8440 fi
8441
8442 if test $ol_with_ldbm_api = auto ; then
8443         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
8444 elif test $ol_with_ldbm_api = ndbm ; then
8445         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
8446 echo "configure:8447: checking for NDBM library" >&5
8447 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
8448   echo $ac_n "(cached) $ac_c" 1>&6
8449 else
8450         ol_LIBS="$LIBS"
8451         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
8452 echo "configure:8453: checking for dbm_open" >&5
8453 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
8454   echo $ac_n "(cached) $ac_c" 1>&6
8455 else
8456   cat > conftest.$ac_ext <<EOF
8457 #line 8458 "configure"
8458 #include "confdefs.h"
8459 /* System header to define __stub macros and hopefully few prototypes,
8460     which can conflict with char dbm_open(); below.  */
8461 #include <assert.h>
8462 /* Override any gcc2 internal prototype to avoid an error.  */
8463 /* We use char because int might match the return type of a gcc2
8464     builtin and then its argument prototype would still apply.  */
8465 char dbm_open();
8466
8467 int main() {
8468
8469 /* The GNU C library defines this for functions which it implements
8470     to always fail with ENOSYS.  Some functions are actually named
8471     something starting with __ and the normal name is an alias.  */
8472 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
8473 choke me
8474 #else
8475 dbm_open();
8476 #endif
8477
8478 ; return 0; }
8479 EOF
8480 if { (eval echo configure:8481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8481   rm -rf conftest*
8482   eval "ac_cv_func_dbm_open=yes"
8483 else
8484   echo "configure: failed program was:" >&5
8485   cat conftest.$ac_ext >&5
8486   rm -rf conftest*
8487   eval "ac_cv_func_dbm_open=no"
8488 fi
8489 rm -f conftest*
8490 fi
8491
8492 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
8493   echo "$ac_t""yes" 1>&6
8494   ol_cv_lib_ndbm=yes
8495 else
8496   echo "$ac_t""no" 1>&6
8497
8498                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
8499 echo "configure:8500: checking for dbm_open in -lndbm" >&5
8500 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
8501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8502   echo $ac_n "(cached) $ac_c" 1>&6
8503 else
8504   ac_save_LIBS="$LIBS"
8505 LIBS="-lndbm  $LIBS"
8506 cat > conftest.$ac_ext <<EOF
8507 #line 8508 "configure"
8508 #include "confdefs.h"
8509 /* Override any gcc2 internal prototype to avoid an error.  */
8510 /* We use char because int might match the return type of a gcc2
8511     builtin and then its argument prototype would still apply.  */
8512 char dbm_open();
8513
8514 int main() {
8515 dbm_open()
8516 ; return 0; }
8517 EOF
8518 if { (eval echo configure:8519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8519   rm -rf conftest*
8520   eval "ac_cv_lib_$ac_lib_var=yes"
8521 else
8522   echo "configure: failed program was:" >&5
8523   cat conftest.$ac_ext >&5
8524   rm -rf conftest*
8525   eval "ac_cv_lib_$ac_lib_var=no"
8526 fi
8527 rm -f conftest*
8528 LIBS="$ac_save_LIBS"
8529
8530 fi
8531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8532   echo "$ac_t""yes" 1>&6
8533   ol_cv_lib_ndbm=-lndbm
8534 else
8535   echo "$ac_t""no" 1>&6
8536
8537                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8538 echo "configure:8539: checking for dbm_open in -ldbm" >&5
8539 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8540 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8541   echo $ac_n "(cached) $ac_c" 1>&6
8542 else
8543   ac_save_LIBS="$LIBS"
8544 LIBS="-ldbm  $LIBS"
8545 cat > conftest.$ac_ext <<EOF
8546 #line 8547 "configure"
8547 #include "confdefs.h"
8548 /* Override any gcc2 internal prototype to avoid an error.  */
8549 /* We use char because int might match the return type of a gcc2
8550     builtin and then its argument prototype would still apply.  */
8551 char dbm_open();
8552
8553 int main() {
8554 dbm_open()
8555 ; return 0; }
8556 EOF
8557 if { (eval echo configure:8558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8558   rm -rf conftest*
8559   eval "ac_cv_lib_$ac_lib_var=yes"
8560 else
8561   echo "configure: failed program was:" >&5
8562   cat conftest.$ac_ext >&5
8563   rm -rf conftest*
8564   eval "ac_cv_lib_$ac_lib_var=no"
8565 fi
8566 rm -f conftest*
8567 LIBS="$ac_save_LIBS"
8568
8569 fi
8570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8571   echo "$ac_t""yes" 1>&6
8572   ol_cv_lib_ndbm=-ldbm
8573 else
8574   echo "$ac_t""no" 1>&6
8575 ol_cv_lib_ndbm=no
8576 fi
8577                 
8578 fi
8579
8580         
8581 fi
8582
8583         LIBS="$ol_LIBS"
8584
8585 fi
8586
8587 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8588
8589
8590  for ac_hdr in ndbm.h
8591 do
8592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8594 echo "configure:8595: checking for $ac_hdr" >&5
8595 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8596   echo $ac_n "(cached) $ac_c" 1>&6
8597 else
8598   cat > conftest.$ac_ext <<EOF
8599 #line 8600 "configure"
8600 #include "confdefs.h"
8601 #include <$ac_hdr>
8602 EOF
8603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8604 { (eval echo configure:8605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8606 if test -z "$ac_err"; then
8607   rm -rf conftest*
8608   eval "ac_cv_header_$ac_safe=yes"
8609 else
8610   echo "$ac_err" >&5
8611   echo "configure: failed program was:" >&5
8612   cat conftest.$ac_ext >&5
8613   rm -rf conftest*
8614   eval "ac_cv_header_$ac_safe=no"
8615 fi
8616 rm -f conftest*
8617 fi
8618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8619   echo "$ac_t""yes" 1>&6
8620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8621   cat >> confdefs.h <<EOF
8622 #define $ac_tr_hdr 1
8623 EOF
8624  
8625 else
8626   echo "$ac_t""no" 1>&6
8627 fi
8628 done
8629
8630  echo $ac_n "checking for db""... $ac_c" 1>&6
8631 echo "configure:8632: checking for db" >&5
8632 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8633   echo $ac_n "(cached) $ac_c" 1>&6
8634 else
8635   
8636         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8637                 ol_cv_ndbm=no
8638         else
8639                 ol_cv_ndbm=yes
8640         fi
8641
8642 fi
8643
8644 echo "$ac_t""$ol_cv_ndbm" 1>&6
8645  if test $ol_cv_ndbm = yes ; then
8646         cat >> confdefs.h <<\EOF
8647 #define HAVE_NDBM 1
8648 EOF
8649
8650  fi
8651
8652
8653         if test $ol_cv_ndbm = yes ; then
8654                 ol_link_ldbm=ndbm
8655                 ol_with_ldbm_api=ndbm
8656
8657                 if test $ol_cv_lib_ndbm != yes ; then
8658                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8659                 fi
8660         fi
8661 fi
8662
8663 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8664         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8665         if test $ol_enable_ldbm = yes ; then
8666                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8667         fi
8668
8669         echo "configure: warning: disabling LDBM" 1>&2
8670         ol_enable_ldbm=no
8671 fi
8672
8673 if test $ol_enable_wrappers != no ; then
8674         for ac_hdr in tcpd.h
8675 do
8676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8678 echo "configure:8679: checking for $ac_hdr" >&5
8679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 #include <$ac_hdr>
8686 EOF
8687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8688 { (eval echo configure:8689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8690 if test -z "$ac_err"; then
8691   rm -rf conftest*
8692   eval "ac_cv_header_$ac_safe=yes"
8693 else
8694   echo "$ac_err" >&5
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -rf conftest*
8698   eval "ac_cv_header_$ac_safe=no"
8699 fi
8700 rm -f conftest*
8701 fi
8702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8703   echo "$ac_t""yes" 1>&6
8704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8705   cat >> confdefs.h <<EOF
8706 #define $ac_tr_hdr 1
8707 EOF
8708  
8709 else
8710   echo "$ac_t""no" 1>&6
8711 fi
8712 done
8713
8714
8715         if test $ac_cv_header_tcpd_h != yes ; then
8716                 have_wrappers=no
8717         else
8718                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8719 echo "configure:8720: checking for main in -lwrap" >&5
8720 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8722   echo $ac_n "(cached) $ac_c" 1>&6
8723 else
8724   ac_save_LIBS="$LIBS"
8725 LIBS="-lwrap  $LIBS"
8726 cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729
8730 int main() {
8731 main()
8732 ; return 0; }
8733 EOF
8734 if { (eval echo configure:8735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8735   rm -rf conftest*
8736   eval "ac_cv_lib_$ac_lib_var=yes"
8737 else
8738   echo "configure: failed program was:" >&5
8739   cat conftest.$ac_ext >&5
8740   rm -rf conftest*
8741   eval "ac_cv_lib_$ac_lib_var=no"
8742 fi
8743 rm -f conftest*
8744 LIBS="$ac_save_LIBS"
8745
8746 fi
8747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8748   echo "$ac_t""yes" 1>&6
8749   have_wrappers=yes
8750 else
8751   echo "$ac_t""no" 1>&6
8752 have_wrappers=no
8753 fi
8754
8755         fi
8756
8757         if test $have_wrappers = yes ; then
8758                 cat >> confdefs.h <<\EOF
8759 #define HAVE_TCPD 1
8760 EOF
8761
8762                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8763
8764                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8765 echo "configure:8766: checking for main in -lnsl" >&5
8766 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
8767 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8768   echo $ac_n "(cached) $ac_c" 1>&6
8769 else
8770   ac_save_LIBS="$LIBS"
8771 LIBS="-lnsl  $LIBS"
8772 cat > conftest.$ac_ext <<EOF
8773 #line 8774 "configure"
8774 #include "confdefs.h"
8775
8776 int main() {
8777 main()
8778 ; return 0; }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781   rm -rf conftest*
8782   eval "ac_cv_lib_$ac_lib_var=yes"
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -rf conftest*
8787   eval "ac_cv_lib_$ac_lib_var=no"
8788 fi
8789 rm -f conftest*
8790 LIBS="$ac_save_LIBS"
8791
8792 fi
8793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8794   echo "$ac_t""yes" 1>&6
8795     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8796     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8797   cat >> confdefs.h <<EOF
8798 #define $ac_tr_lib 1
8799 EOF
8800
8801   LIBS="-lnsl $LIBS"
8802
8803 else
8804   echo "$ac_t""no" 1>&6
8805 fi
8806
8807         else
8808                 echo "configure: warning: could not find -lwrap" 1>&2
8809                 if test $ol_enable_wrappers = yes ; then
8810                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8811                 fi
8812
8813                 echo "configure: warning: disabling wrappers support" 1>&2
8814                 ol_enable_wrappers=no
8815         fi
8816 fi
8817
8818 if test $ol_enable_syslog != no ; then
8819         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8820 echo "configure:8821: checking for openlog" >&5
8821 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8822   echo $ac_n "(cached) $ac_c" 1>&6
8823 else
8824   cat > conftest.$ac_ext <<EOF
8825 #line 8826 "configure"
8826 #include "confdefs.h"
8827 /* System header to define __stub macros and hopefully few prototypes,
8828     which can conflict with char openlog(); below.  */
8829 #include <assert.h>
8830 /* Override any gcc2 internal prototype to avoid an error.  */
8831 /* We use char because int might match the return type of a gcc2
8832     builtin and then its argument prototype would still apply.  */
8833 char openlog();
8834
8835 int main() {
8836
8837 /* The GNU C library defines this for functions which it implements
8838     to always fail with ENOSYS.  Some functions are actually named
8839     something starting with __ and the normal name is an alias.  */
8840 #if defined (__stub_openlog) || defined (__stub___openlog)
8841 choke me
8842 #else
8843 openlog();
8844 #endif
8845
8846 ; return 0; }
8847 EOF
8848 if { (eval echo configure:8849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8849   rm -rf conftest*
8850   eval "ac_cv_func_openlog=yes"
8851 else
8852   echo "configure: failed program was:" >&5
8853   cat conftest.$ac_ext >&5
8854   rm -rf conftest*
8855   eval "ac_cv_func_openlog=no"
8856 fi
8857 rm -f conftest*
8858 fi
8859
8860 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8861   echo "$ac_t""yes" 1>&6
8862   :
8863 else
8864   echo "$ac_t""no" 1>&6
8865 fi
8866
8867         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8868                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8869         fi
8870         ol_enable_syslog=$ac_cv_func_openlog
8871 fi
8872
8873 if test $ol_enable_dmalloc != no ; then
8874         for ac_hdr in dmalloc.h
8875 do
8876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8878 echo "configure:8879: checking for $ac_hdr" >&5
8879 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8880   echo $ac_n "(cached) $ac_c" 1>&6
8881 else
8882   cat > conftest.$ac_ext <<EOF
8883 #line 8884 "configure"
8884 #include "confdefs.h"
8885 #include <$ac_hdr>
8886 EOF
8887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8888 { (eval echo configure:8889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8890 if test -z "$ac_err"; then
8891   rm -rf conftest*
8892   eval "ac_cv_header_$ac_safe=yes"
8893 else
8894   echo "$ac_err" >&5
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -rf conftest*
8898   eval "ac_cv_header_$ac_safe=no"
8899 fi
8900 rm -f conftest*
8901 fi
8902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8903   echo "$ac_t""yes" 1>&6
8904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8905   cat >> confdefs.h <<EOF
8906 #define $ac_tr_hdr 1
8907 EOF
8908  
8909 else
8910   echo "$ac_t""no" 1>&6
8911 fi
8912 done
8913
8914         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8915 echo "configure:8916: checking for dmalloc_shutdown in -ldmalloc" >&5
8916 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8917 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8918   echo $ac_n "(cached) $ac_c" 1>&6
8919 else
8920   ac_save_LIBS="$LIBS"
8921 LIBS="-ldmalloc  $LIBS"
8922 cat > conftest.$ac_ext <<EOF
8923 #line 8924 "configure"
8924 #include "confdefs.h"
8925 /* Override any gcc2 internal prototype to avoid an error.  */
8926 /* We use char because int might match the return type of a gcc2
8927     builtin and then its argument prototype would still apply.  */
8928 char dmalloc_shutdown();
8929
8930 int main() {
8931 dmalloc_shutdown()
8932 ; return 0; }
8933 EOF
8934 if { (eval echo configure:8935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8935   rm -rf conftest*
8936   eval "ac_cv_lib_$ac_lib_var=yes"
8937 else
8938   echo "configure: failed program was:" >&5
8939   cat conftest.$ac_ext >&5
8940   rm -rf conftest*
8941   eval "ac_cv_lib_$ac_lib_var=no"
8942 fi
8943 rm -f conftest*
8944 LIBS="$ac_save_LIBS"
8945
8946 fi
8947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8948   echo "$ac_t""yes" 1>&6
8949     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8950     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8951   cat >> confdefs.h <<EOF
8952 #define $ac_tr_lib 1
8953 EOF
8954
8955   LIBS="-ldmalloc $LIBS"
8956
8957 else
8958   echo "$ac_t""no" 1>&6
8959 fi
8960
8961 fi
8962
8963 if test $ol_enable_tcl != no ; then
8964         for ac_hdr in tcl.h
8965 do
8966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8968 echo "configure:8969: checking for $ac_hdr" >&5
8969 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8970   echo $ac_n "(cached) $ac_c" 1>&6
8971 else
8972   cat > conftest.$ac_ext <<EOF
8973 #line 8974 "configure"
8974 #include "confdefs.h"
8975 #include <$ac_hdr>
8976 EOF
8977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8978 { (eval echo configure:8979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8980 if test -z "$ac_err"; then
8981   rm -rf conftest*
8982   eval "ac_cv_header_$ac_safe=yes"
8983 else
8984   echo "$ac_err" >&5
8985   echo "configure: failed program was:" >&5
8986   cat conftest.$ac_ext >&5
8987   rm -rf conftest*
8988   eval "ac_cv_header_$ac_safe=no"
8989 fi
8990 rm -f conftest*
8991 fi
8992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8993   echo "$ac_t""yes" 1>&6
8994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8995   cat >> confdefs.h <<EOF
8996 #define $ac_tr_hdr 1
8997 EOF
8998  
8999 else
9000   echo "$ac_t""no" 1>&6
9001 fi
9002 done
9003
9004
9005         if test $ac_cv_header_tcl_h != yes ; then
9006                 have_tcl=no
9007         else
9008                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9009 echo "configure:9010: checking for main in -ltcl" >&5
9010 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
9011 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9012   echo $ac_n "(cached) $ac_c" 1>&6
9013 else
9014   ac_save_LIBS="$LIBS"
9015 LIBS="-ltcl  $LIBS"
9016 cat > conftest.$ac_ext <<EOF
9017 #line 9018 "configure"
9018 #include "confdefs.h"
9019
9020 int main() {
9021 main()
9022 ; return 0; }
9023 EOF
9024 if { (eval echo configure:9025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=yes"
9027 else
9028   echo "configure: failed program was:" >&5
9029   cat conftest.$ac_ext >&5
9030   rm -rf conftest*
9031   eval "ac_cv_lib_$ac_lib_var=no"
9032 fi
9033 rm -f conftest*
9034 LIBS="$ac_save_LIBS"
9035
9036 fi
9037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9038   echo "$ac_t""yes" 1>&6
9039   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9040 else
9041   echo "$ac_t""no" 1>&6
9042 have_tcl=no
9043 fi
9044
9045
9046                 if test $have_tcl != yes; then
9047                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9048 echo "configure:9049: checking for main in -ltcl7.6" >&5
9049 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
9050 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9051   echo $ac_n "(cached) $ac_c" 1>&6
9052 else
9053   ac_save_LIBS="$LIBS"
9054 LIBS="-ltcl7.6  $LIBS"
9055 cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9058
9059 int main() {
9060 main()
9061 ; return 0; }
9062 EOF
9063 if { (eval echo configure:9064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9064   rm -rf conftest*
9065   eval "ac_cv_lib_$ac_lib_var=yes"
9066 else
9067   echo "configure: failed program was:" >&5
9068   cat conftest.$ac_ext >&5
9069   rm -rf conftest*
9070   eval "ac_cv_lib_$ac_lib_var=no"
9071 fi
9072 rm -f conftest*
9073 LIBS="$ac_save_LIBS"
9074
9075 fi
9076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9077   echo "$ac_t""yes" 1>&6
9078   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9079 else
9080   echo "$ac_t""no" 1>&6
9081 have_tcl=no
9082 fi
9083
9084                 fi
9085
9086                 if test $have_tcl != yes; then
9087                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9088 echo "configure:9089: checking for main in -ltcl8.0" >&5
9089 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
9090 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9091   echo $ac_n "(cached) $ac_c" 1>&6
9092 else
9093   ac_save_LIBS="$LIBS"
9094 LIBS="-ltcl8.0  $LIBS"
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098
9099 int main() {
9100 main()
9101 ; return 0; }
9102 EOF
9103 if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9104   rm -rf conftest*
9105   eval "ac_cv_lib_$ac_lib_var=yes"
9106 else
9107   echo "configure: failed program was:" >&5
9108   cat conftest.$ac_ext >&5
9109   rm -rf conftest*
9110   eval "ac_cv_lib_$ac_lib_var=no"
9111 fi
9112 rm -f conftest*
9113 LIBS="$ac_save_LIBS"
9114
9115 fi
9116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9117   echo "$ac_t""yes" 1>&6
9118   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9119 else
9120   echo "$ac_t""no" 1>&6
9121 have_tcl=no
9122 fi
9123
9124                 fi
9125         fi
9126
9127         if test $have_tcl != yes ; then
9128                 echo "configure: warning: could not find -ltcl" 1>&2
9129                 if test $ol_enable_tcl = yes ; then
9130                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9131                 fi
9132
9133                 ol_enable_tcl=no
9134         fi
9135 fi
9136
9137 # ud needs termcap (should insert check here)
9138 ol_link_termcap=no
9139 for ac_hdr in termcap.h ncurses.h
9140 do
9141 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9142 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9143 echo "configure:9144: checking for $ac_hdr" >&5
9144 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9145   echo $ac_n "(cached) $ac_c" 1>&6
9146 else
9147   cat > conftest.$ac_ext <<EOF
9148 #line 9149 "configure"
9149 #include "confdefs.h"
9150 #include <$ac_hdr>
9151 EOF
9152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9153 { (eval echo configure:9154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9155 if test -z "$ac_err"; then
9156   rm -rf conftest*
9157   eval "ac_cv_header_$ac_safe=yes"
9158 else
9159   echo "$ac_err" >&5
9160   echo "configure: failed program was:" >&5
9161   cat conftest.$ac_ext >&5
9162   rm -rf conftest*
9163   eval "ac_cv_header_$ac_safe=no"
9164 fi
9165 rm -f conftest*
9166 fi
9167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9168   echo "$ac_t""yes" 1>&6
9169     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9170   cat >> confdefs.h <<EOF
9171 #define $ac_tr_hdr 1
9172 EOF
9173  
9174 else
9175   echo "$ac_t""no" 1>&6
9176 fi
9177 done
9178
9179
9180 if test $ol_link_termcap = no ; then
9181         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9182 echo "configure:9183: checking for tputs in -ltermcap" >&5
9183 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
9184 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9185   echo $ac_n "(cached) $ac_c" 1>&6
9186 else
9187   ac_save_LIBS="$LIBS"
9188 LIBS="-ltermcap  $LIBS"
9189 cat > conftest.$ac_ext <<EOF
9190 #line 9191 "configure"
9191 #include "confdefs.h"
9192 /* Override any gcc2 internal prototype to avoid an error.  */
9193 /* We use char because int might match the return type of a gcc2
9194     builtin and then its argument prototype would still apply.  */
9195 char tputs();
9196
9197 int main() {
9198 tputs()
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9202   rm -rf conftest*
9203   eval "ac_cv_lib_$ac_lib_var=yes"
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=no"
9209 fi
9210 rm -f conftest*
9211 LIBS="$ac_save_LIBS"
9212
9213 fi
9214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216   have_termcap=yes
9217 else
9218   echo "$ac_t""no" 1>&6
9219 have_termcap=no
9220 fi
9221
9222         if test $have_termcap = yes ; then
9223                 cat >> confdefs.h <<\EOF
9224 #define HAVE_TERMCAP 1
9225 EOF
9226
9227                 ol_link_termcap=yes
9228                 TERMCAP_LIBS=-ltermcap
9229         fi
9230 fi
9231
9232 if test $ol_link_termcap = no ; then
9233         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9234 echo "configure:9235: checking for initscr in -lncurses" >&5
9235 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
9236 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9237   echo $ac_n "(cached) $ac_c" 1>&6
9238 else
9239   ac_save_LIBS="$LIBS"
9240 LIBS="-lncurses  $LIBS"
9241 cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244 /* Override any gcc2 internal prototype to avoid an error.  */
9245 /* We use char because int might match the return type of a gcc2
9246     builtin and then its argument prototype would still apply.  */
9247 char initscr();
9248
9249 int main() {
9250 initscr()
9251 ; return 0; }
9252 EOF
9253 if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9254   rm -rf conftest*
9255   eval "ac_cv_lib_$ac_lib_var=yes"
9256 else
9257   echo "configure: failed program was:" >&5
9258   cat conftest.$ac_ext >&5
9259   rm -rf conftest*
9260   eval "ac_cv_lib_$ac_lib_var=no"
9261 fi
9262 rm -f conftest*
9263 LIBS="$ac_save_LIBS"
9264
9265 fi
9266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9267   echo "$ac_t""yes" 1>&6
9268   have_ncurses=yes
9269 else
9270   echo "$ac_t""no" 1>&6
9271 have_ncurses=no
9272 fi
9273
9274         if test $have_ncurses = yes ; then
9275                 cat >> confdefs.h <<\EOF
9276 #define HAVE_NCURSES 1
9277 EOF
9278
9279                 ol_link_termcap=yes
9280                 TERMCAP_LIBS=-lncurses
9281         fi
9282 fi
9283
9284 if test $ol_link_termcap = no ; then
9285         cat >> confdefs.h <<\EOF
9286 #define NO_TERMCAP 1
9287 EOF
9288
9289         TERMCAP_LIBS=
9290 fi
9291
9292 ol_link_readline=no
9293 if test $ol_with_readline != no ; then
9294         for ac_hdr in readline/readline.h readline/history.h
9295 do
9296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9298 echo "configure:9299: checking for $ac_hdr" >&5
9299 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9300   echo $ac_n "(cached) $ac_c" 1>&6
9301 else
9302   cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305 #include <$ac_hdr>
9306 EOF
9307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9308 { (eval echo configure:9309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9310 if test -z "$ac_err"; then
9311   rm -rf conftest*
9312   eval "ac_cv_header_$ac_safe=yes"
9313 else
9314   echo "$ac_err" >&5
9315   echo "configure: failed program was:" >&5
9316   cat conftest.$ac_ext >&5
9317   rm -rf conftest*
9318   eval "ac_cv_header_$ac_safe=no"
9319 fi
9320 rm -f conftest*
9321 fi
9322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9323   echo "$ac_t""yes" 1>&6
9324     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9325   cat >> confdefs.h <<EOF
9326 #define $ac_tr_hdr 1
9327 EOF
9328  
9329 else
9330   echo "$ac_t""no" 1>&6
9331 fi
9332 done
9333
9334
9335         if test $ac_cv_header_readline_readline_h = yes ; then
9336                 save_LIBS="$LIBS"
9337                 LIBS="$TERMCAP_LIBS $LIBS"
9338                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9339 echo "configure:9340: checking for readline in -lreadline" >&5
9340 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
9341 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9342   echo $ac_n "(cached) $ac_c" 1>&6
9343 else
9344   ac_save_LIBS="$LIBS"
9345 LIBS="-lreadline  $LIBS"
9346 cat > conftest.$ac_ext <<EOF
9347 #line 9348 "configure"
9348 #include "confdefs.h"
9349 /* Override any gcc2 internal prototype to avoid an error.  */
9350 /* We use char because int might match the return type of a gcc2
9351     builtin and then its argument prototype would still apply.  */
9352 char readline();
9353
9354 int main() {
9355 readline()
9356 ; return 0; }
9357 EOF
9358 if { (eval echo configure:9359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9359   rm -rf conftest*
9360   eval "ac_cv_lib_$ac_lib_var=yes"
9361 else
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   eval "ac_cv_lib_$ac_lib_var=no"
9366 fi
9367 rm -f conftest*
9368 LIBS="$ac_save_LIBS"
9369
9370 fi
9371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9372   echo "$ac_t""yes" 1>&6
9373   have_readline=yes
9374 else
9375   echo "$ac_t""no" 1>&6
9376 have_readline=no
9377 fi
9378
9379                 LIBS="$save_LIBS"
9380                         
9381                 if test $have_readline = yes ; then
9382                         ol_with_readline=found
9383                         ol_link_readline=yes
9384
9385                         READLINE_LIBS="-lreadline"
9386                 fi
9387         fi
9388 fi
9389
9390 if test $ol_link_readline = yes ; then
9391         cat >> confdefs.h <<\EOF
9392 #define HAVE_READLINE 1
9393 EOF
9394
9395 fi
9396
9397
9398 # FreeBSD (and others) have crypt(3) in -lcrypt
9399 if test $ol_enable_crypt != no ; then
9400         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9401 echo "configure:9402: checking for crypt" >&5
9402 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
9403   echo $ac_n "(cached) $ac_c" 1>&6
9404 else
9405   cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 /* System header to define __stub macros and hopefully few prototypes,
9409     which can conflict with char crypt(); below.  */
9410 #include <assert.h>
9411 /* Override any gcc2 internal prototype to avoid an error.  */
9412 /* We use char because int might match the return type of a gcc2
9413     builtin and then its argument prototype would still apply.  */
9414 char crypt();
9415
9416 int main() {
9417
9418 /* The GNU C library defines this for functions which it implements
9419     to always fail with ENOSYS.  Some functions are actually named
9420     something starting with __ and the normal name is an alias.  */
9421 #if defined (__stub_crypt) || defined (__stub___crypt)
9422 choke me
9423 #else
9424 crypt();
9425 #endif
9426
9427 ; return 0; }
9428 EOF
9429 if { (eval echo configure:9430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9430   rm -rf conftest*
9431   eval "ac_cv_func_crypt=yes"
9432 else
9433   echo "configure: failed program was:" >&5
9434   cat conftest.$ac_ext >&5
9435   rm -rf conftest*
9436   eval "ac_cv_func_crypt=no"
9437 fi
9438 rm -f conftest*
9439 fi
9440
9441 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
9442   echo "$ac_t""yes" 1>&6
9443   have_crypt=yes
9444 else
9445   echo "$ac_t""no" 1>&6
9446
9447                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9448 echo "configure:9449: checking for crypt in -lcrypt" >&5
9449 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9450 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   ac_save_LIBS="$LIBS"
9454 LIBS="-lcrypt  $LIBS"
9455 cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 /* Override any gcc2 internal prototype to avoid an error.  */
9459 /* We use char because int might match the return type of a gcc2
9460     builtin and then its argument prototype would still apply.  */
9461 char crypt();
9462
9463 int main() {
9464 crypt()
9465 ; return 0; }
9466 EOF
9467 if { (eval echo configure:9468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9468   rm -rf conftest*
9469   eval "ac_cv_lib_$ac_lib_var=yes"
9470 else
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -rf conftest*
9474   eval "ac_cv_lib_$ac_lib_var=no"
9475 fi
9476 rm -f conftest*
9477 LIBS="$ac_save_LIBS"
9478
9479 fi
9480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9481   echo "$ac_t""yes" 1>&6
9482   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
9483                         have_crypt=yes
9484 else
9485   echo "$ac_t""no" 1>&6
9486 have_crypt=no
9487 fi
9488
9489 fi
9490
9491
9492         if test $have_crypt = yes ; then
9493                 cat >> confdefs.h <<\EOF
9494 #define HAVE_CRYPT 1
9495 EOF
9496
9497         else
9498                 echo "configure: warning: could not find crypt" 1>&2
9499                 if test $ol_enable_crypt = yes ; then
9500                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
9501                 fi
9502
9503                 echo "configure: warning: disabling crypt support" 1>&2
9504                 ol_enable_crypt=no
9505         fi
9506 fi
9507
9508 # FreeBSD (and others) have setproctitle(3) in -lutil
9509 if test $ol_enable_proctitle != no ; then
9510         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
9511 echo "configure:9512: checking for setproctitle" >&5
9512 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
9513   echo $ac_n "(cached) $ac_c" 1>&6
9514 else
9515   cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 /* System header to define __stub macros and hopefully few prototypes,
9519     which can conflict with char setproctitle(); below.  */
9520 #include <assert.h>
9521 /* Override any gcc2 internal prototype to avoid an error.  */
9522 /* We use char because int might match the return type of a gcc2
9523     builtin and then its argument prototype would still apply.  */
9524 char setproctitle();
9525
9526 int main() {
9527
9528 /* The GNU C library defines this for functions which it implements
9529     to always fail with ENOSYS.  Some functions are actually named
9530     something starting with __ and the normal name is an alias.  */
9531 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
9532 choke me
9533 #else
9534 setproctitle();
9535 #endif
9536
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9540   rm -rf conftest*
9541   eval "ac_cv_func_setproctitle=yes"
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   eval "ac_cv_func_setproctitle=no"
9547 fi
9548 rm -f conftest*
9549 fi
9550
9551 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
9552   echo "$ac_t""yes" 1>&6
9553   have_setproctitle=yes
9554 else
9555   echo "$ac_t""no" 1>&6
9556
9557                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9558 echo "configure:9559: checking for setproctitle in -lutil" >&5
9559 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9560 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9561   echo $ac_n "(cached) $ac_c" 1>&6
9562 else
9563   ac_save_LIBS="$LIBS"
9564 LIBS="-lutil  $LIBS"
9565 cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 /* Override any gcc2 internal prototype to avoid an error.  */
9569 /* We use char because int might match the return type of a gcc2
9570     builtin and then its argument prototype would still apply.  */
9571 char setproctitle();
9572
9573 int main() {
9574 setproctitle()
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578   rm -rf conftest*
9579   eval "ac_cv_lib_$ac_lib_var=yes"
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   eval "ac_cv_lib_$ac_lib_var=no"
9585 fi
9586 rm -f conftest*
9587 LIBS="$ac_save_LIBS"
9588
9589 fi
9590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9591   echo "$ac_t""yes" 1>&6
9592   have_setproctitle=yes
9593                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9594 else
9595   echo "$ac_t""no" 1>&6
9596 have_setproctitle=no
9597                         LIBOBJS="$LIBOBJS setproctitle.o"
9598 fi
9599
9600 fi
9601
9602
9603         if test $have_setproctitle = yes ; then
9604                 cat >> confdefs.h <<\EOF
9605 #define HAVE_SETPROCTITLE 1
9606 EOF
9607
9608         fi
9609 fi
9610
9611 # test for EBCDIC
9612 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9613 echo "configure:9614: checking for EBCDIC" >&5
9614 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   
9618         cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621
9622 #if !('M' == 0xd4)
9623 #include <__ASCII__/generate_error.h>
9624 #endif
9625
9626 EOF
9627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9628 { (eval echo configure:9629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9630 if test -z "$ac_err"; then
9631   rm -rf conftest*
9632   ol_cv_cpp_ebcdic=yes
9633 else
9634   echo "$ac_err" >&5
9635   echo "configure: failed program was:" >&5
9636   cat conftest.$ac_ext >&5
9637   rm -rf conftest*
9638   ol_cv_cpp_ebcdic=no
9639 fi
9640 rm -f conftest*
9641 fi
9642
9643 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9644 if test $ol_cv_cpp_ebcdic = yes ; then
9645         cat >> confdefs.h <<\EOF
9646 #define HAVE_EBCDIC 1
9647 EOF
9648
9649 fi
9650
9651 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9652 echo "configure:9653: checking for ANSI C header files" >&5
9653 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659 #include <stdlib.h>
9660 #include <stdarg.h>
9661 #include <string.h>
9662 #include <float.h>
9663 EOF
9664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9665 { (eval echo configure:9666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9667 if test -z "$ac_err"; then
9668   rm -rf conftest*
9669   ol_cv_header_stdc=yes
9670 else
9671   echo "$ac_err" >&5
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -rf conftest*
9675   ol_cv_header_stdc=no
9676 fi
9677 rm -f conftest*
9678
9679 if test $ol_cv_header_stdc = yes; then
9680   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9681 cat > conftest.$ac_ext <<EOF
9682 #line 9683 "configure"
9683 #include "confdefs.h"
9684 #include <string.h>
9685 EOF
9686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9687   egrep "memchr" >/dev/null 2>&1; then
9688   :
9689 else
9690   rm -rf conftest*
9691   ol_cv_header_stdc=no
9692 fi
9693 rm -f conftest*
9694
9695 fi
9696
9697 if test $ol_cv_header_stdc = yes; then
9698   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9699 cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702 #include <stdlib.h>
9703 EOF
9704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9705   egrep "free" >/dev/null 2>&1; then
9706   :
9707 else
9708   rm -rf conftest*
9709   ol_cv_header_stdc=no
9710 fi
9711 rm -f conftest*
9712
9713 fi
9714
9715 if test $ol_cv_header_stdc = yes; then
9716   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9717 if test "$cross_compiling" = yes; then
9718   :
9719 else
9720   cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 #include <ctype.h>
9724 #ifndef HAVE_EBCDIC
9725 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9726 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9727 #else
9728 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9729                 || ('j' <= (c) && (c) <= 'r') \
9730                 || ('s' <= (c) && (c) <= 'z'))
9731 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9732 #endif
9733 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9734 int main () { int i; for (i = 0; i < 256; i++)
9735 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9736 exit (0); }
9737
9738 EOF
9739 if { (eval echo configure:9740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9740 then
9741   :
9742 else
9743   echo "configure: failed program was:" >&5
9744   cat conftest.$ac_ext >&5
9745   rm -fr conftest*
9746   ol_cv_header_stdc=no
9747 fi
9748 rm -fr conftest*
9749 fi
9750
9751 fi
9752 fi
9753
9754 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9755 if test $ol_cv_header_stdc = yes; then
9756   cat >> confdefs.h <<\EOF
9757 #define STDC_HEADERS 1
9758 EOF
9759
9760 fi
9761 ac_cv_header_stdc=disable
9762
9763
9764 if test $ol_cv_header_stdc != yes; then
9765         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9766 fi
9767
9768 ac_header_dirent=no
9769 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9770 do
9771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9772 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9773 echo "configure:9774: checking for $ac_hdr that defines DIR" >&5
9774 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9775   echo $ac_n "(cached) $ac_c" 1>&6
9776 else
9777   cat > conftest.$ac_ext <<EOF
9778 #line 9779 "configure"
9779 #include "confdefs.h"
9780 #include <sys/types.h>
9781 #include <$ac_hdr>
9782 int main() {
9783 DIR *dirp = 0;
9784 ; return 0; }
9785 EOF
9786 if { (eval echo configure:9787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9787   rm -rf conftest*
9788   eval "ac_cv_header_dirent_$ac_safe=yes"
9789 else
9790   echo "configure: failed program was:" >&5
9791   cat conftest.$ac_ext >&5
9792   rm -rf conftest*
9793   eval "ac_cv_header_dirent_$ac_safe=no"
9794 fi
9795 rm -f conftest*
9796 fi
9797 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9798   echo "$ac_t""yes" 1>&6
9799     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9800   cat >> confdefs.h <<EOF
9801 #define $ac_tr_hdr 1
9802 EOF
9803  ac_header_dirent=$ac_hdr; break
9804 else
9805   echo "$ac_t""no" 1>&6
9806 fi
9807 done
9808 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9809 if test $ac_header_dirent = dirent.h; then
9810 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9811 echo "configure:9812: checking for opendir in -ldir" >&5
9812 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9814   echo $ac_n "(cached) $ac_c" 1>&6
9815 else
9816   ac_save_LIBS="$LIBS"
9817 LIBS="-ldir  $LIBS"
9818 cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 /* Override any gcc2 internal prototype to avoid an error.  */
9822 /* We use char because int might match the return type of a gcc2
9823     builtin and then its argument prototype would still apply.  */
9824 char opendir();
9825
9826 int main() {
9827 opendir()
9828 ; return 0; }
9829 EOF
9830 if { (eval echo configure:9831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9831   rm -rf conftest*
9832   eval "ac_cv_lib_$ac_lib_var=yes"
9833 else
9834   echo "configure: failed program was:" >&5
9835   cat conftest.$ac_ext >&5
9836   rm -rf conftest*
9837   eval "ac_cv_lib_$ac_lib_var=no"
9838 fi
9839 rm -f conftest*
9840 LIBS="$ac_save_LIBS"
9841
9842 fi
9843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9844   echo "$ac_t""yes" 1>&6
9845   LIBS="$LIBS -ldir"
9846 else
9847   echo "$ac_t""no" 1>&6
9848 fi
9849
9850 else
9851 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9852 echo "configure:9853: checking for opendir in -lx" >&5
9853 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9855   echo $ac_n "(cached) $ac_c" 1>&6
9856 else
9857   ac_save_LIBS="$LIBS"
9858 LIBS="-lx  $LIBS"
9859 cat > conftest.$ac_ext <<EOF
9860 #line 9861 "configure"
9861 #include "confdefs.h"
9862 /* Override any gcc2 internal prototype to avoid an error.  */
9863 /* We use char because int might match the return type of a gcc2
9864     builtin and then its argument prototype would still apply.  */
9865 char opendir();
9866
9867 int main() {
9868 opendir()
9869 ; return 0; }
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9872   rm -rf conftest*
9873   eval "ac_cv_lib_$ac_lib_var=yes"
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   eval "ac_cv_lib_$ac_lib_var=no"
9879 fi
9880 rm -f conftest*
9881 LIBS="$ac_save_LIBS"
9882
9883 fi
9884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9885   echo "$ac_t""yes" 1>&6
9886   LIBS="$LIBS -lx"
9887 else
9888   echo "$ac_t""no" 1>&6
9889 fi
9890
9891 fi
9892
9893 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9894 echo "configure:9895: checking for sys/wait.h that is POSIX.1 compatible" >&5
9895 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9896   echo $ac_n "(cached) $ac_c" 1>&6
9897 else
9898   cat > conftest.$ac_ext <<EOF
9899 #line 9900 "configure"
9900 #include "confdefs.h"
9901 #include <sys/types.h>
9902 #include <sys/wait.h>
9903 #ifndef WEXITSTATUS
9904 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9905 #endif
9906 #ifndef WIFEXITED
9907 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9908 #endif
9909 int main() {
9910 int s;
9911 wait (&s);
9912 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9913 ; return 0; }
9914 EOF
9915 if { (eval echo configure:9916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9916   rm -rf conftest*
9917   ac_cv_header_sys_wait_h=yes
9918 else
9919   echo "configure: failed program was:" >&5
9920   cat conftest.$ac_ext >&5
9921   rm -rf conftest*
9922   ac_cv_header_sys_wait_h=no
9923 fi
9924 rm -f conftest*
9925 fi
9926
9927 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9928 if test $ac_cv_header_sys_wait_h = yes; then
9929   cat >> confdefs.h <<\EOF
9930 #define HAVE_SYS_WAIT_H 1
9931 EOF
9932
9933 fi
9934
9935 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9936 echo "configure:9937: checking POSIX termios" >&5
9937 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9938   echo $ac_n "(cached) $ac_c" 1>&6
9939 else
9940   cat > conftest.$ac_ext <<EOF
9941 #line 9942 "configure"
9942 #include "confdefs.h"
9943 #include <sys/types.h>
9944 #include <unistd.h>
9945 #include <termios.h>
9946 int main() {
9947 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9948    tcgetattr(0, 0);
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9952   rm -rf conftest*
9953   am_cv_sys_posix_termios=yes
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   am_cv_sys_posix_termios=no
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9964
9965
9966  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9967 echo "configure:9968: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9968 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9969   echo $ac_n "(cached) $ac_c" 1>&6
9970 else
9971   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9972
9973   gwinsz_in_termios_h=no
9974   if test $am_cv_sys_posix_termios = yes; then
9975     cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 #include <sys/types.h>
9979 #     include <termios.h>
9980 #     ifdef TIOCGWINSZ
9981         yes
9982 #     endif
9983     
9984 EOF
9985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9986   egrep "yes" >/dev/null 2>&1; then
9987   rm -rf conftest*
9988   gwinsz_in_termios_h=yes
9989 fi
9990 rm -f conftest*
9991
9992   fi
9993
9994   if test $gwinsz_in_termios_h = no; then
9995     cat > conftest.$ac_ext <<EOF
9996 #line 9997 "configure"
9997 #include "confdefs.h"
9998 #include <sys/types.h>
9999 #     include <sys/ioctl.h>
10000 #     ifdef TIOCGWINSZ
10001         yes
10002 #     endif
10003     
10004 EOF
10005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10006   egrep "yes" >/dev/null 2>&1; then
10007   rm -rf conftest*
10008   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10009 fi
10010 rm -f conftest*
10011
10012   fi
10013   
10014 fi
10015
10016 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10017   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10018     cat >> confdefs.h <<\EOF
10019 #define GWINSZ_IN_SYS_IOCTL 1
10020 EOF
10021
10022   fi
10023
10024 if test $am_cv_sys_posix_termios = yes ; then
10025         cat >> confdefs.h <<\EOF
10026 #define HAVE_POSIX_TERMIOS 1
10027 EOF
10028
10029 fi
10030
10031 for ac_hdr in \
10032         arpa/inet.h             \
10033         arpa/nameser.h  \
10034         assert.h                \
10035         crypt.h                 \
10036         errno.h                 \
10037         fcntl.h                 \
10038         filio.h                 \
10039         getopt.h                \
10040         grp.h                   \
10041         libutil.h               \
10042         limits.h                \
10043         locale.h                \
10044         malloc.h                \
10045         memory.h                \
10046         psap.h                  \
10047         pwd.h                   \
10048         resolv.h                \
10049         sgtty.h                 \
10050         stdarg.h                \
10051         stddef.h                \
10052         string.h                \
10053         strings.h               \
10054         sysexits.h              \
10055         sys/file.h              \
10056         sys/filio.h             \
10057         sys/errno.h             \
10058         sys/ioctl.h             \
10059         sys/param.h             \
10060         sys/resource.h  \
10061         sys/select.h    \
10062         sys/socket.h    \
10063         sys/syslog.h    \
10064         sys/time.h              \
10065         sys/types.h             \
10066         syslog.h                \
10067         termios.h               \
10068         unistd.h                \
10069
10070 do
10071 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10072 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10073 echo "configure:10074: checking for $ac_hdr" >&5
10074 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10075   echo $ac_n "(cached) $ac_c" 1>&6
10076 else
10077   cat > conftest.$ac_ext <<EOF
10078 #line 10079 "configure"
10079 #include "confdefs.h"
10080 #include <$ac_hdr>
10081 EOF
10082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10083 { (eval echo configure:10084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10085 if test -z "$ac_err"; then
10086   rm -rf conftest*
10087   eval "ac_cv_header_$ac_safe=yes"
10088 else
10089   echo "$ac_err" >&5
10090   echo "configure: failed program was:" >&5
10091   cat conftest.$ac_ext >&5
10092   rm -rf conftest*
10093   eval "ac_cv_header_$ac_safe=no"
10094 fi
10095 rm -f conftest*
10096 fi
10097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10098   echo "$ac_t""yes" 1>&6
10099     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10100   cat >> confdefs.h <<EOF
10101 #define $ac_tr_hdr 1
10102 EOF
10103  
10104 else
10105   echo "$ac_t""no" 1>&6
10106 fi
10107 done
10108
10109
10110 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10111 echo "configure:10112: checking for uid_t in sys/types.h" >&5
10112 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
10113   echo $ac_n "(cached) $ac_c" 1>&6
10114 else
10115   cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 #include <sys/types.h>
10119 EOF
10120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10121   egrep "uid_t" >/dev/null 2>&1; then
10122   rm -rf conftest*
10123   ac_cv_type_uid_t=yes
10124 else
10125   rm -rf conftest*
10126   ac_cv_type_uid_t=no
10127 fi
10128 rm -f conftest*
10129
10130 fi
10131
10132 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10133 if test $ac_cv_type_uid_t = no; then
10134   cat >> confdefs.h <<\EOF
10135 #define uid_t int
10136 EOF
10137
10138   cat >> confdefs.h <<\EOF
10139 #define gid_t int
10140 EOF
10141
10142 fi
10143
10144 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10145 echo "configure:10146: checking type of array argument to getgroups" >&5
10146 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
10147   echo $ac_n "(cached) $ac_c" 1>&6
10148 else
10149   if test "$cross_compiling" = yes; then
10150   ac_cv_type_getgroups=cross
10151 else
10152   cat > conftest.$ac_ext <<EOF
10153 #line 10154 "configure"
10154 #include "confdefs.h"
10155
10156 /* Thanks to Mike Rendell for this test.  */
10157 #include <sys/types.h>
10158 #define NGID 256
10159 #undef MAX
10160 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10161 main()
10162 {
10163   gid_t gidset[NGID];
10164   int i, n;
10165   union { gid_t gval; long lval; }  val;
10166
10167   val.lval = -1;
10168   for (i = 0; i < NGID; i++)
10169     gidset[i] = val.gval;
10170   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10171                  gidset);
10172   /* Exit non-zero if getgroups seems to require an array of ints.  This
10173      happens when gid_t is short but getgroups modifies an array of ints.  */
10174   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10175 }
10176
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10179 then
10180     ac_cv_type_getgroups=gid_t
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -fr conftest*
10185   ac_cv_type_getgroups=int
10186 fi
10187 rm -fr conftest*
10188 fi
10189
10190 if test $ac_cv_type_getgroups = cross; then
10191         cat > conftest.$ac_ext <<EOF
10192 #line 10193 "configure"
10193 #include "confdefs.h"
10194 #include <unistd.h>
10195 EOF
10196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10197   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10198   rm -rf conftest*
10199   ac_cv_type_getgroups=gid_t
10200 else
10201   rm -rf conftest*
10202   ac_cv_type_getgroups=int
10203 fi
10204 rm -f conftest*
10205
10206 fi
10207 fi
10208
10209 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10210 cat >> confdefs.h <<EOF
10211 #define GETGROUPS_T $ac_cv_type_getgroups
10212 EOF
10213
10214  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10215 echo "configure:10216: checking for ANSI C header files" >&5
10216 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   cat > conftest.$ac_ext <<EOF
10220 #line 10221 "configure"
10221 #include "confdefs.h"
10222 #include <stdlib.h>
10223 #include <stdarg.h>
10224 #include <string.h>
10225 #include <float.h>
10226 EOF
10227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10228 { (eval echo configure:10229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10230 if test -z "$ac_err"; then
10231   rm -rf conftest*
10232   ac_cv_header_stdc=yes
10233 else
10234   echo "$ac_err" >&5
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   ac_cv_header_stdc=no
10239 fi
10240 rm -f conftest*
10241
10242 if test $ac_cv_header_stdc = yes; then
10243   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10244 cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247 #include <string.h>
10248 EOF
10249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10250   egrep "memchr" >/dev/null 2>&1; then
10251   :
10252 else
10253   rm -rf conftest*
10254   ac_cv_header_stdc=no
10255 fi
10256 rm -f conftest*
10257
10258 fi
10259
10260 if test $ac_cv_header_stdc = yes; then
10261   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10262 cat > conftest.$ac_ext <<EOF
10263 #line 10264 "configure"
10264 #include "confdefs.h"
10265 #include <stdlib.h>
10266 EOF
10267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10268   egrep "free" >/dev/null 2>&1; then
10269   :
10270 else
10271   rm -rf conftest*
10272   ac_cv_header_stdc=no
10273 fi
10274 rm -f conftest*
10275
10276 fi
10277
10278 if test $ac_cv_header_stdc = yes; then
10279   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10280 if test "$cross_compiling" = yes; then
10281   :
10282 else
10283   cat > conftest.$ac_ext <<EOF
10284 #line 10285 "configure"
10285 #include "confdefs.h"
10286 #include <ctype.h>
10287 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10288 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10289 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10290 int main () { int i; for (i = 0; i < 256; i++)
10291 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10292 exit (0); }
10293
10294 EOF
10295 if { (eval echo configure:10296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10296 then
10297   :
10298 else
10299   echo "configure: failed program was:" >&5
10300   cat conftest.$ac_ext >&5
10301   rm -fr conftest*
10302   ac_cv_header_stdc=no
10303 fi
10304 rm -fr conftest*
10305 fi
10306
10307 fi
10308 fi
10309
10310 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10311 if test $ac_cv_header_stdc = yes; then
10312   cat >> confdefs.h <<\EOF
10313 #define STDC_HEADERS 1
10314 EOF
10315
10316 fi
10317
10318 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10319 echo "configure:10320: checking for mode_t" >&5
10320 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
10321   echo $ac_n "(cached) $ac_c" 1>&6
10322 else
10323   cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326 #include <sys/types.h>
10327 #if STDC_HEADERS
10328 #include <stdlib.h>
10329 #include <stddef.h>
10330 #endif
10331 EOF
10332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10333   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10334   rm -rf conftest*
10335   ac_cv_type_mode_t=yes
10336 else
10337   rm -rf conftest*
10338   ac_cv_type_mode_t=no
10339 fi
10340 rm -f conftest*
10341
10342 fi
10343 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
10344 if test $ac_cv_type_mode_t = no; then
10345   cat >> confdefs.h <<\EOF
10346 #define mode_t int
10347 EOF
10348
10349 fi
10350
10351 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10352 echo "configure:10353: checking for off_t" >&5
10353 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
10354   echo $ac_n "(cached) $ac_c" 1>&6
10355 else
10356   cat > conftest.$ac_ext <<EOF
10357 #line 10358 "configure"
10358 #include "confdefs.h"
10359 #include <sys/types.h>
10360 #if STDC_HEADERS
10361 #include <stdlib.h>
10362 #include <stddef.h>
10363 #endif
10364 EOF
10365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10366   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10367   rm -rf conftest*
10368   ac_cv_type_off_t=yes
10369 else
10370   rm -rf conftest*
10371   ac_cv_type_off_t=no
10372 fi
10373 rm -f conftest*
10374
10375 fi
10376 echo "$ac_t""$ac_cv_type_off_t" 1>&6
10377 if test $ac_cv_type_off_t = no; then
10378   cat >> confdefs.h <<\EOF
10379 #define off_t long
10380 EOF
10381
10382 fi
10383
10384 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10385 echo "configure:10386: checking for pid_t" >&5
10386 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
10387   echo $ac_n "(cached) $ac_c" 1>&6
10388 else
10389   cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 #include <sys/types.h>
10393 #if STDC_HEADERS
10394 #include <stdlib.h>
10395 #include <stddef.h>
10396 #endif
10397 EOF
10398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10399   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10400   rm -rf conftest*
10401   ac_cv_type_pid_t=yes
10402 else
10403   rm -rf conftest*
10404   ac_cv_type_pid_t=no
10405 fi
10406 rm -f conftest*
10407
10408 fi
10409 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
10410 if test $ac_cv_type_pid_t = no; then
10411   cat >> confdefs.h <<\EOF
10412 #define pid_t int
10413 EOF
10414
10415 fi
10416
10417 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10418 echo "configure:10419: checking for ptrdiff_t" >&5
10419 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
10420   echo $ac_n "(cached) $ac_c" 1>&6
10421 else
10422   cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425 #include <stddef.h>
10426 int main() {
10427 ptrdiff_t p
10428 ; return 0; }
10429 EOF
10430 if { (eval echo configure:10431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10431   rm -rf conftest*
10432   am_cv_type_ptrdiff_t=yes
10433 else
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   am_cv_type_ptrdiff_t=no
10438 fi
10439 rm -f conftest*
10440 fi
10441
10442 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
10443    if test $am_cv_type_ptrdiff_t = yes; then
10444      cat >> confdefs.h <<\EOF
10445 #define HAVE_PTRDIFF_T 1
10446 EOF
10447
10448    fi
10449
10450 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
10451 echo "configure:10452: checking return type of signal handlers" >&5
10452 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
10453   echo $ac_n "(cached) $ac_c" 1>&6
10454 else
10455   cat > conftest.$ac_ext <<EOF
10456 #line 10457 "configure"
10457 #include "confdefs.h"
10458 #include <sys/types.h>
10459 #include <signal.h>
10460 #ifdef signal
10461 #undef signal
10462 #endif
10463 #ifdef __cplusplus
10464 extern "C" void (*signal (int, void (*)(int)))(int);
10465 #else
10466 void (*signal ()) ();
10467 #endif
10468
10469 int main() {
10470 int i;
10471 ; return 0; }
10472 EOF
10473 if { (eval echo configure:10474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10474   rm -rf conftest*
10475   ac_cv_type_signal=void
10476 else
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   ac_cv_type_signal=int
10481 fi
10482 rm -f conftest*
10483 fi
10484
10485 echo "$ac_t""$ac_cv_type_signal" 1>&6
10486 cat >> confdefs.h <<EOF
10487 #define RETSIGTYPE $ac_cv_type_signal
10488 EOF
10489
10490
10491 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10492 echo "configure:10493: checking for sig_atomic_t" >&5
10493 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
10494   echo $ac_n "(cached) $ac_c" 1>&6
10495 else
10496   cat > conftest.$ac_ext <<EOF
10497 #line 10498 "configure"
10498 #include "confdefs.h"
10499 #include <signal.h>
10500 int main() {
10501 sig_atomic_t atomic;
10502 ; return 0; }
10503 EOF
10504 if { (eval echo configure:10505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10505   rm -rf conftest*
10506   ol_cv_type_sig_atomic_t=yes
10507 else
10508   echo "configure: failed program was:" >&5
10509   cat conftest.$ac_ext >&5
10510   rm -rf conftest*
10511   ol_cv_type_sig_atomic_t=no
10512 fi
10513 rm -f conftest*
10514 fi
10515
10516 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
10517   if test $ol_cv_type_sig_atomic_t = no; then
10518     cat >> confdefs.h <<\EOF
10519 #define sig_atomic_t int
10520 EOF
10521
10522   fi
10523  
10524 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10525 echo "configure:10526: checking for size_t" >&5
10526 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
10527   echo $ac_n "(cached) $ac_c" 1>&6
10528 else
10529   cat > conftest.$ac_ext <<EOF
10530 #line 10531 "configure"
10531 #include "confdefs.h"
10532 #include <sys/types.h>
10533 #if STDC_HEADERS
10534 #include <stdlib.h>
10535 #include <stddef.h>
10536 #endif
10537 EOF
10538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10539   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10540   rm -rf conftest*
10541   ac_cv_type_size_t=yes
10542 else
10543   rm -rf conftest*
10544   ac_cv_type_size_t=no
10545 fi
10546 rm -f conftest*
10547
10548 fi
10549 echo "$ac_t""$ac_cv_type_size_t" 1>&6
10550 if test $ac_cv_type_size_t = no; then
10551   cat >> confdefs.h <<\EOF
10552 #define size_t unsigned
10553 EOF
10554
10555 fi
10556
10557 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10558 echo "configure:10559: checking for st_blksize in struct stat" >&5
10559 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10560   echo $ac_n "(cached) $ac_c" 1>&6
10561 else
10562   cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 #include <sys/types.h>
10566 #include <sys/stat.h>
10567 int main() {
10568 struct stat s; s.st_blksize;
10569 ; return 0; }
10570 EOF
10571 if { (eval echo configure:10572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10572   rm -rf conftest*
10573   ac_cv_struct_st_blksize=yes
10574 else
10575   echo "configure: failed program was:" >&5
10576   cat conftest.$ac_ext >&5
10577   rm -rf conftest*
10578   ac_cv_struct_st_blksize=no
10579 fi
10580 rm -f conftest*
10581 fi
10582
10583 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10584 if test $ac_cv_struct_st_blksize = yes; then
10585   cat >> confdefs.h <<\EOF
10586 #define HAVE_ST_BLKSIZE 1
10587 EOF
10588
10589 fi
10590
10591 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10592 echo "configure:10593: checking whether time.h and sys/time.h may both be included" >&5
10593 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10594   echo $ac_n "(cached) $ac_c" 1>&6
10595 else
10596   cat > conftest.$ac_ext <<EOF
10597 #line 10598 "configure"
10598 #include "confdefs.h"
10599 #include <sys/types.h>
10600 #include <sys/time.h>
10601 #include <time.h>
10602 int main() {
10603 struct tm *tp;
10604 ; return 0; }
10605 EOF
10606 if { (eval echo configure:10607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10607   rm -rf conftest*
10608   ac_cv_header_time=yes
10609 else
10610   echo "configure: failed program was:" >&5
10611   cat conftest.$ac_ext >&5
10612   rm -rf conftest*
10613   ac_cv_header_time=no
10614 fi
10615 rm -f conftest*
10616 fi
10617
10618 echo "$ac_t""$ac_cv_header_time" 1>&6
10619 if test $ac_cv_header_time = yes; then
10620   cat >> confdefs.h <<\EOF
10621 #define TIME_WITH_SYS_TIME 1
10622 EOF
10623
10624 fi
10625
10626 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10627 echo "configure:10628: checking whether struct tm is in sys/time.h or time.h" >&5
10628 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10629   echo $ac_n "(cached) $ac_c" 1>&6
10630 else
10631   cat > conftest.$ac_ext <<EOF
10632 #line 10633 "configure"
10633 #include "confdefs.h"
10634 #include <sys/types.h>
10635 #include <time.h>
10636 int main() {
10637 struct tm *tp; tp->tm_sec;
10638 ; return 0; }
10639 EOF
10640 if { (eval echo configure:10641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10641   rm -rf conftest*
10642   ac_cv_struct_tm=time.h
10643 else
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -rf conftest*
10647   ac_cv_struct_tm=sys/time.h
10648 fi
10649 rm -f conftest*
10650 fi
10651
10652 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10653 if test $ac_cv_struct_tm = sys/time.h; then
10654   cat >> confdefs.h <<\EOF
10655 #define TM_IN_SYS_TIME 1
10656 EOF
10657
10658 fi
10659
10660 # test for pw_gecos in struct passwd
10661 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10662 echo "configure:10663: checking struct passwd for pw_gecos" >&5
10663 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10664   echo $ac_n "(cached) $ac_c" 1>&6
10665 else
10666   
10667         cat > conftest.$ac_ext <<EOF
10668 #line 10669 "configure"
10669 #include "confdefs.h"
10670 #include <pwd.h>
10671 int main() {
10672
10673         struct passwd pwd;
10674         pwd.pw_gecos = pwd.pw_name;
10675
10676 ; return 0; }
10677 EOF
10678 if { (eval echo configure:10679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10679   rm -rf conftest*
10680   ol_cv_struct_passwd_pw_gecos=yes
10681 else
10682   echo "configure: failed program was:" >&5
10683   cat conftest.$ac_ext >&5
10684   rm -rf conftest*
10685   ol_cv_struct_passwd_pw_gecos=no
10686 fi
10687 rm -f conftest*
10688 fi
10689
10690 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10691 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10692         cat >> confdefs.h <<\EOF
10693 #define HAVE_PW_GECOS 1
10694 EOF
10695
10696 fi
10697
10698
10699
10700 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10701 echo "configure:10702: checking if toupper() requires islower()" >&5
10702 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   
10706         if test "$cross_compiling" = yes; then
10707   ol_cv_c_upper_lower=safe
10708 else
10709   cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712
10713 #include <ctype.h>
10714 main()
10715 {
10716         if ('C' == toupper('C'))
10717                 exit(0);
10718         else
10719                 exit(1);
10720 }
10721 EOF
10722 if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10723 then
10724   ol_cv_c_upper_lower=no
10725 else
10726   echo "configure: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   rm -fr conftest*
10729   ol_cv_c_upper_lower=yes
10730 fi
10731 rm -fr conftest*
10732 fi
10733
10734 fi
10735
10736 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10737 if test $ol_cv_c_upper_lower != no ; then
10738         cat >> confdefs.h <<\EOF
10739 #define C_UPPER_LOWER 1
10740 EOF
10741
10742 fi
10743
10744 echo $ac_n "checking for working const""... $ac_c" 1>&6
10745 echo "configure:10746: checking for working const" >&5
10746 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10747   echo $ac_n "(cached) $ac_c" 1>&6
10748 else
10749   cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752
10753 int main() {
10754
10755 /* Ultrix mips cc rejects this.  */
10756 typedef int charset[2]; const charset x;
10757 /* SunOS 4.1.1 cc rejects this.  */
10758 char const *const *ccp;
10759 char **p;
10760 /* NEC SVR4.0.2 mips cc rejects this.  */
10761 struct point {int x, y;};
10762 static struct point const zero = {0,0};
10763 /* AIX XL C 1.02.0.0 rejects this.
10764    It does not let you subtract one const X* pointer from another in an arm
10765    of an if-expression whose if-part is not a constant expression */
10766 const char *g = "string";
10767 ccp = &g + (g ? g-g : 0);
10768 /* HPUX 7.0 cc rejects these. */
10769 ++ccp;
10770 p = (char**) ccp;
10771 ccp = (char const *const *) p;
10772 { /* SCO 3.2v4 cc rejects this.  */
10773   char *t;
10774   char const *s = 0 ? (char *) 0 : (char const *) 0;
10775
10776   *t++ = 0;
10777 }
10778 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10779   int x[] = {25, 17};
10780   const int *foo = &x[0];
10781   ++foo;
10782 }
10783 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10784   typedef const int *iptr;
10785   iptr p = 0;
10786   ++p;
10787 }
10788 { /* AIX XL C 1.02.0.0 rejects this saying
10789      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10790   struct s { int j; const int *ap[3]; };
10791   struct s *b; b->j = 5;
10792 }
10793 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10794   const int foo = 10;
10795 }
10796
10797 ; return 0; }
10798 EOF
10799 if { (eval echo configure:10800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10800   rm -rf conftest*
10801   ac_cv_c_const=yes
10802 else
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -rf conftest*
10806   ac_cv_c_const=no
10807 fi
10808 rm -f conftest*
10809 fi
10810
10811 echo "$ac_t""$ac_cv_c_const" 1>&6
10812 if test $ac_cv_c_const = no; then
10813   cat >> confdefs.h <<\EOF
10814 #define const 
10815 EOF
10816
10817 fi
10818
10819 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10820 echo "configure:10821: checking if compiler understands volatile" >&5
10821 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10822   echo $ac_n "(cached) $ac_c" 1>&6
10823 else
10824   cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 int x, y, z;
10828 int main() {
10829 volatile int a; int * volatile b = x ? &y : &z;
10830       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10831       *b = 0;
10832 ; return 0; }
10833 EOF
10834 if { (eval echo configure:10835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10835   rm -rf conftest*
10836   ol_cv_c_volatile=yes
10837 else
10838   echo "configure: failed program was:" >&5
10839   cat conftest.$ac_ext >&5
10840   rm -rf conftest*
10841   ol_cv_c_volatile=no
10842 fi
10843 rm -f conftest*
10844 fi
10845
10846 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10847   if test $ol_cv_c_volatile = yes; then
10848     : 
10849   else
10850     cat >> confdefs.h <<\EOF
10851 #define volatile 
10852 EOF
10853
10854   fi
10855  
10856
10857 if test $cross_compiling = yes ; then
10858         cat >> confdefs.h <<\EOF
10859 #define CROSS_COMPILING 1
10860 EOF
10861
10862 else
10863         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10864 echo "configure:10865: checking whether byte ordering is bigendian" >&5
10865 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10866   echo $ac_n "(cached) $ac_c" 1>&6
10867 else
10868   ac_cv_c_bigendian=unknown
10869 # See if sys/param.h defines the BYTE_ORDER macro.
10870 cat > conftest.$ac_ext <<EOF
10871 #line 10872 "configure"
10872 #include "confdefs.h"
10873 #include <sys/types.h>
10874 #include <sys/param.h>
10875 int main() {
10876
10877 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10878  bogus endian macros
10879 #endif
10880 ; return 0; }
10881 EOF
10882 if { (eval echo configure:10883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10883   rm -rf conftest*
10884   # It does; now see whether it defined to BIG_ENDIAN or not.
10885 cat > conftest.$ac_ext <<EOF
10886 #line 10887 "configure"
10887 #include "confdefs.h"
10888 #include <sys/types.h>
10889 #include <sys/param.h>
10890 int main() {
10891
10892 #if BYTE_ORDER != BIG_ENDIAN
10893  not big endian
10894 #endif
10895 ; return 0; }
10896 EOF
10897 if { (eval echo configure:10898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10898   rm -rf conftest*
10899   ac_cv_c_bigendian=yes
10900 else
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -rf conftest*
10904   ac_cv_c_bigendian=no
10905 fi
10906 rm -f conftest*
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910 fi
10911 rm -f conftest*
10912 if test $ac_cv_c_bigendian = unknown; then
10913 if test "$cross_compiling" = yes; then
10914     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10915 else
10916   cat > conftest.$ac_ext <<EOF
10917 #line 10918 "configure"
10918 #include "confdefs.h"
10919 main () {
10920   /* Are we little or big endian?  From Harbison&Steele.  */
10921   union
10922   {
10923     long l;
10924     char c[sizeof (long)];
10925   } u;
10926   u.l = 1;
10927   exit (u.c[sizeof (long) - 1] == 1);
10928 }
10929 EOF
10930 if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10931 then
10932   ac_cv_c_bigendian=no
10933 else
10934   echo "configure: failed program was:" >&5
10935   cat conftest.$ac_ext >&5
10936   rm -fr conftest*
10937   ac_cv_c_bigendian=yes
10938 fi
10939 rm -fr conftest*
10940 fi
10941
10942 fi
10943 fi
10944
10945 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10946 if test $ac_cv_c_bigendian = yes; then
10947   cat >> confdefs.h <<\EOF
10948 #define WORDS_BIGENDIAN 1
10949 EOF
10950
10951 fi
10952
10953         echo $ac_n "checking size of short""... $ac_c" 1>&6
10954 echo "configure:10955: checking size of short" >&5
10955 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10956   echo $ac_n "(cached) $ac_c" 1>&6
10957 else
10958   if test "$cross_compiling" = yes; then
10959     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10960 else
10961   cat > conftest.$ac_ext <<EOF
10962 #line 10963 "configure"
10963 #include "confdefs.h"
10964 #include <stdio.h>
10965 main()
10966 {
10967   FILE *f=fopen("conftestval", "w");
10968   if (!f) exit(1);
10969   fprintf(f, "%d\n", sizeof(short));
10970   exit(0);
10971 }
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10974 then
10975   ac_cv_sizeof_short=`cat conftestval`
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -fr conftest*
10980   ac_cv_sizeof_short=0
10981 fi
10982 rm -fr conftest*
10983 fi
10984
10985 fi
10986 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10987 cat >> confdefs.h <<EOF
10988 #define SIZEOF_SHORT $ac_cv_sizeof_short
10989 EOF
10990
10991  
10992         echo $ac_n "checking size of int""... $ac_c" 1>&6
10993 echo "configure:10994: checking size of int" >&5
10994 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10995   echo $ac_n "(cached) $ac_c" 1>&6
10996 else
10997   if test "$cross_compiling" = yes; then
10998     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10999 else
11000   cat > conftest.$ac_ext <<EOF
11001 #line 11002 "configure"
11002 #include "confdefs.h"
11003 #include <stdio.h>
11004 main()
11005 {
11006   FILE *f=fopen("conftestval", "w");
11007   if (!f) exit(1);
11008   fprintf(f, "%d\n", sizeof(int));
11009   exit(0);
11010 }
11011 EOF
11012 if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11013 then
11014   ac_cv_sizeof_int=`cat conftestval`
11015 else
11016   echo "configure: failed program was:" >&5
11017   cat conftest.$ac_ext >&5
11018   rm -fr conftest*
11019   ac_cv_sizeof_int=0
11020 fi
11021 rm -fr conftest*
11022 fi
11023
11024 fi
11025 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11026 cat >> confdefs.h <<EOF
11027 #define SIZEOF_INT $ac_cv_sizeof_int
11028 EOF
11029
11030  
11031         echo $ac_n "checking size of long""... $ac_c" 1>&6
11032 echo "configure:11033: checking size of long" >&5
11033 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   if test "$cross_compiling" = yes; then
11037     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11038 else
11039   cat > conftest.$ac_ext <<EOF
11040 #line 11041 "configure"
11041 #include "confdefs.h"
11042 #include <stdio.h>
11043 main()
11044 {
11045   FILE *f=fopen("conftestval", "w");
11046   if (!f) exit(1);
11047   fprintf(f, "%d\n", sizeof(long));
11048   exit(0);
11049 }
11050 EOF
11051 if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11052 then
11053   ac_cv_sizeof_long=`cat conftestval`
11054 else
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -fr conftest*
11058   ac_cv_sizeof_long=0
11059 fi
11060 rm -fr conftest*
11061 fi
11062
11063 fi
11064 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11065 cat >> confdefs.h <<EOF
11066 #define SIZEOF_LONG $ac_cv_sizeof_long
11067 EOF
11068
11069
11070
11071         if test "$ac_cv_sizeof_int" -lt 4 ; then
11072                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11073         fi
11074 fi
11075
11076 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11077 echo "configure:11078: checking for 8-bit clean memcmp" >&5
11078 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   if test "$cross_compiling" = yes; then
11082   ac_cv_func_memcmp_clean=no
11083 else
11084   cat > conftest.$ac_ext <<EOF
11085 #line 11086 "configure"
11086 #include "confdefs.h"
11087
11088 main()
11089 {
11090   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11091   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11092 }
11093
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11096 then
11097   ac_cv_func_memcmp_clean=yes
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -fr conftest*
11102   ac_cv_func_memcmp_clean=no
11103 fi
11104 rm -fr conftest*
11105 fi
11106
11107 fi
11108
11109 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11110 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11111
11112 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11113 echo "configure:11114: checking for strftime" >&5
11114 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
11115   echo $ac_n "(cached) $ac_c" 1>&6
11116 else
11117   cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120 /* System header to define __stub macros and hopefully few prototypes,
11121     which can conflict with char strftime(); below.  */
11122 #include <assert.h>
11123 /* Override any gcc2 internal prototype to avoid an error.  */
11124 /* We use char because int might match the return type of a gcc2
11125     builtin and then its argument prototype would still apply.  */
11126 char strftime();
11127
11128 int main() {
11129
11130 /* The GNU C library defines this for functions which it implements
11131     to always fail with ENOSYS.  Some functions are actually named
11132     something starting with __ and the normal name is an alias.  */
11133 #if defined (__stub_strftime) || defined (__stub___strftime)
11134 choke me
11135 #else
11136 strftime();
11137 #endif
11138
11139 ; return 0; }
11140 EOF
11141 if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11142   rm -rf conftest*
11143   eval "ac_cv_func_strftime=yes"
11144 else
11145   echo "configure: failed program was:" >&5
11146   cat conftest.$ac_ext >&5
11147   rm -rf conftest*
11148   eval "ac_cv_func_strftime=no"
11149 fi
11150 rm -f conftest*
11151 fi
11152
11153 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11154   echo "$ac_t""yes" 1>&6
11155   cat >> confdefs.h <<\EOF
11156 #define HAVE_STRFTIME 1
11157 EOF
11158
11159 else
11160   echo "$ac_t""no" 1>&6
11161 # strftime is in -lintl on SCO UNIX.
11162 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11163 echo "configure:11164: checking for strftime in -lintl" >&5
11164 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
11165 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11166   echo $ac_n "(cached) $ac_c" 1>&6
11167 else
11168   ac_save_LIBS="$LIBS"
11169 LIBS="-lintl  $LIBS"
11170 cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 /* Override any gcc2 internal prototype to avoid an error.  */
11174 /* We use char because int might match the return type of a gcc2
11175     builtin and then its argument prototype would still apply.  */
11176 char strftime();
11177
11178 int main() {
11179 strftime()
11180 ; return 0; }
11181 EOF
11182 if { (eval echo configure:11183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11183   rm -rf conftest*
11184   eval "ac_cv_lib_$ac_lib_var=yes"
11185 else
11186   echo "configure: failed program was:" >&5
11187   cat conftest.$ac_ext >&5
11188   rm -rf conftest*
11189   eval "ac_cv_lib_$ac_lib_var=no"
11190 fi
11191 rm -f conftest*
11192 LIBS="$ac_save_LIBS"
11193
11194 fi
11195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11196   echo "$ac_t""yes" 1>&6
11197   cat >> confdefs.h <<\EOF
11198 #define HAVE_STRFTIME 1
11199 EOF
11200
11201 LIBS="-lintl $LIBS"
11202 else
11203   echo "$ac_t""no" 1>&6
11204 fi
11205
11206 fi
11207
11208
11209 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11210 echo "configure:11211: checking for vprintf" >&5
11211 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
11212   echo $ac_n "(cached) $ac_c" 1>&6
11213 else
11214   cat > conftest.$ac_ext <<EOF
11215 #line 11216 "configure"
11216 #include "confdefs.h"
11217 /* System header to define __stub macros and hopefully few prototypes,
11218     which can conflict with char vprintf(); below.  */
11219 #include <assert.h>
11220 /* Override any gcc2 internal prototype to avoid an error.  */
11221 /* We use char because int might match the return type of a gcc2
11222     builtin and then its argument prototype would still apply.  */
11223 char vprintf();
11224
11225 int main() {
11226
11227 /* The GNU C library defines this for functions which it implements
11228     to always fail with ENOSYS.  Some functions are actually named
11229     something starting with __ and the normal name is an alias.  */
11230 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11231 choke me
11232 #else
11233 vprintf();
11234 #endif
11235
11236 ; return 0; }
11237 EOF
11238 if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11239   rm -rf conftest*
11240   eval "ac_cv_func_vprintf=yes"
11241 else
11242   echo "configure: failed program was:" >&5
11243   cat conftest.$ac_ext >&5
11244   rm -rf conftest*
11245   eval "ac_cv_func_vprintf=no"
11246 fi
11247 rm -f conftest*
11248 fi
11249
11250 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11251   echo "$ac_t""yes" 1>&6
11252   cat >> confdefs.h <<\EOF
11253 #define HAVE_VPRINTF 1
11254 EOF
11255
11256 else
11257   echo "$ac_t""no" 1>&6
11258 fi
11259
11260 if test "$ac_cv_func_vprintf" != yes; then
11261 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11262 echo "configure:11263: checking for _doprnt" >&5
11263 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 /* System header to define __stub macros and hopefully few prototypes,
11270     which can conflict with char _doprnt(); below.  */
11271 #include <assert.h>
11272 /* Override any gcc2 internal prototype to avoid an error.  */
11273 /* We use char because int might match the return type of a gcc2
11274     builtin and then its argument prototype would still apply.  */
11275 char _doprnt();
11276
11277 int main() {
11278
11279 /* The GNU C library defines this for functions which it implements
11280     to always fail with ENOSYS.  Some functions are actually named
11281     something starting with __ and the normal name is an alias.  */
11282 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11283 choke me
11284 #else
11285 _doprnt();
11286 #endif
11287
11288 ; return 0; }
11289 EOF
11290 if { (eval echo configure:11291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11291   rm -rf conftest*
11292   eval "ac_cv_func__doprnt=yes"
11293 else
11294   echo "configure: failed program was:" >&5
11295   cat conftest.$ac_ext >&5
11296   rm -rf conftest*
11297   eval "ac_cv_func__doprnt=no"
11298 fi
11299 rm -f conftest*
11300 fi
11301
11302 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
11303   echo "$ac_t""yes" 1>&6
11304   cat >> confdefs.h <<\EOF
11305 #define HAVE_DOPRNT 1
11306 EOF
11307
11308 else
11309   echo "$ac_t""no" 1>&6
11310 fi
11311
11312 fi
11313
11314
11315 if test $ac_cv_func_vprintf = yes ; then
11316                 for ac_func in vsnprintf vsprintf
11317 do
11318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11319 echo "configure:11320: checking for $ac_func" >&5
11320 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11321   echo $ac_n "(cached) $ac_c" 1>&6
11322 else
11323   cat > conftest.$ac_ext <<EOF
11324 #line 11325 "configure"
11325 #include "confdefs.h"
11326 /* System header to define __stub macros and hopefully few prototypes,
11327     which can conflict with char $ac_func(); below.  */
11328 #include <assert.h>
11329 /* Override any gcc2 internal prototype to avoid an error.  */
11330 /* We use char because int might match the return type of a gcc2
11331     builtin and then its argument prototype would still apply.  */
11332 char $ac_func();
11333
11334 int main() {
11335
11336 /* The GNU C library defines this for functions which it implements
11337     to always fail with ENOSYS.  Some functions are actually named
11338     something starting with __ and the normal name is an alias.  */
11339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11340 choke me
11341 #else
11342 $ac_func();
11343 #endif
11344
11345 ; return 0; }
11346 EOF
11347 if { (eval echo configure:11348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11348   rm -rf conftest*
11349   eval "ac_cv_func_$ac_func=yes"
11350 else
11351   echo "configure: failed program was:" >&5
11352   cat conftest.$ac_ext >&5
11353   rm -rf conftest*
11354   eval "ac_cv_func_$ac_func=no"
11355 fi
11356 rm -f conftest*
11357 fi
11358
11359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11360   echo "$ac_t""yes" 1>&6
11361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11362   cat >> confdefs.h <<EOF
11363 #define $ac_tr_func 1
11364 EOF
11365  
11366 else
11367   echo "$ac_t""no" 1>&6
11368 fi
11369 done
11370
11371 fi
11372
11373 for ac_func in \
11374         bcopy                   \
11375         closesocket             \
11376         endgrent                \
11377         endpwent                \
11378         flock                   \
11379         getdtablesize   \
11380         getgrgid                \
11381         gethostname             \
11382         getpass                 \
11383         getpwuid                \
11384         gettimeofday    \
11385         initgroups              \
11386         lockf                   \
11387         memcpy                  \
11388         memmove                 \
11389         mkstemp                 \
11390         recv                    \
11391         recvfrom                \
11392         setpwfile               \
11393         setgid                  \
11394         setegid                 \
11395         setsid                  \
11396         setuid                  \
11397         seteuid                 \
11398         signal                  \
11399         sigset                  \
11400         snprintf                \
11401         strdup                  \
11402         strerror                \
11403         strpbrk                 \
11404         strrchr                 \
11405         strsep                  \
11406         strstr                  \
11407         strtol                  \
11408         strtoul                 \
11409         strspn                  \
11410         sysconf                 \
11411         waitpid                 \
11412         wait4                   \
11413
11414 do
11415 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11416 echo "configure:11417: checking for $ac_func" >&5
11417 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11418   echo $ac_n "(cached) $ac_c" 1>&6
11419 else
11420   cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423 /* System header to define __stub macros and hopefully few prototypes,
11424     which can conflict with char $ac_func(); below.  */
11425 #include <assert.h>
11426 /* Override any gcc2 internal prototype to avoid an error.  */
11427 /* We use char because int might match the return type of a gcc2
11428     builtin and then its argument prototype would still apply.  */
11429 char $ac_func();
11430
11431 int main() {
11432
11433 /* The GNU C library defines this for functions which it implements
11434     to always fail with ENOSYS.  Some functions are actually named
11435     something starting with __ and the normal name is an alias.  */
11436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11437 choke me
11438 #else
11439 $ac_func();
11440 #endif
11441
11442 ; return 0; }
11443 EOF
11444 if { (eval echo configure:11445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11445   rm -rf conftest*
11446   eval "ac_cv_func_$ac_func=yes"
11447 else
11448   echo "configure: failed program was:" >&5
11449   cat conftest.$ac_ext >&5
11450   rm -rf conftest*
11451   eval "ac_cv_func_$ac_func=no"
11452 fi
11453 rm -f conftest*
11454 fi
11455
11456 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11457   echo "$ac_t""yes" 1>&6
11458     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11459   cat >> confdefs.h <<EOF
11460 #define $ac_tr_func 1
11461 EOF
11462  
11463 else
11464   echo "$ac_t""no" 1>&6
11465 fi
11466 done
11467
11468
11469 for ac_func in getopt tempnam
11470 do
11471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11472 echo "configure:11473: checking for $ac_func" >&5
11473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11474   echo $ac_n "(cached) $ac_c" 1>&6
11475 else
11476   cat > conftest.$ac_ext <<EOF
11477 #line 11478 "configure"
11478 #include "confdefs.h"
11479 /* System header to define __stub macros and hopefully few prototypes,
11480     which can conflict with char $ac_func(); below.  */
11481 #include <assert.h>
11482 /* Override any gcc2 internal prototype to avoid an error.  */
11483 /* We use char because int might match the return type of a gcc2
11484     builtin and then its argument prototype would still apply.  */
11485 char $ac_func();
11486
11487 int main() {
11488
11489 /* The GNU C library defines this for functions which it implements
11490     to always fail with ENOSYS.  Some functions are actually named
11491     something starting with __ and the normal name is an alias.  */
11492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11493 choke me
11494 #else
11495 $ac_func();
11496 #endif
11497
11498 ; return 0; }
11499 EOF
11500 if { (eval echo configure:11501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11501   rm -rf conftest*
11502   eval "ac_cv_func_$ac_func=yes"
11503 else
11504   echo "configure: failed program was:" >&5
11505   cat conftest.$ac_ext >&5
11506   rm -rf conftest*
11507   eval "ac_cv_func_$ac_func=no"
11508 fi
11509 rm -f conftest*
11510 fi
11511
11512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11513   echo "$ac_t""yes" 1>&6
11514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11515   cat >> confdefs.h <<EOF
11516 #define $ac_tr_func 1
11517 EOF
11518  
11519 else
11520   echo "$ac_t""no" 1>&6
11521 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
11522 fi
11523 done
11524
11525
11526
11527 # Check Configuration
11528
11529 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
11530 echo "configure:11531: checking declaration of sys_errlist" >&5
11531 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
11532   echo $ac_n "(cached) $ac_c" 1>&6
11533 else
11534   
11535         cat > conftest.$ac_ext <<EOF
11536 #line 11537 "configure"
11537 #include "confdefs.h"
11538
11539 #include <stdio.h>
11540 #include <sys/types.h>
11541 #include <errno.h> 
11542 int main() {
11543 char *c = (char *) *sys_errlist
11544 ; return 0; }
11545 EOF
11546 if { (eval echo configure:11547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11547   rm -rf conftest*
11548   ol_cv_dcl_sys_errlist=yes
11549 else
11550   echo "configure: failed program was:" >&5
11551   cat conftest.$ac_ext >&5
11552   rm -rf conftest*
11553   ol_cv_dcl_sys_errlist=no
11554 fi
11555 rm -f conftest*
11556 fi
11557
11558 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
11559 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
11560 if test $ol_cv_dcl_sys_errlist = no ; then
11561         cat >> confdefs.h <<\EOF
11562 #define DECL_SYS_ERRLIST 1
11563 EOF
11564
11565         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11566 echo "configure:11567: checking existence of sys_errlist" >&5
11567         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11568   echo $ac_n "(cached) $ac_c" 1>&6
11569 else
11570   
11571                 cat > conftest.$ac_ext <<EOF
11572 #line 11573 "configure"
11573 #include "confdefs.h"
11574 #include <errno.h>
11575 int main() {
11576 char *c = (char *) *sys_errlist
11577 ; return 0; }
11578 EOF
11579 if { (eval echo configure:11580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11580   rm -rf conftest*
11581   ol_cv_have_sys_errlist=yes
11582 else
11583   echo "configure: failed program was:" >&5
11584   cat conftest.$ac_ext >&5
11585   rm -rf conftest*
11586   ol_cv_have_sys_errlist=no
11587 fi
11588 rm -f conftest*
11589 fi
11590
11591         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11592         if test $ol_cv_have_sys_errlist = yes ; then
11593                 cat >> confdefs.h <<\EOF
11594 #define HAVE_SYS_ERRLIST 1
11595 EOF
11596
11597         fi
11598 fi
11599
11600
11601
11602 if test "$ol_enable_debug" != no ; then
11603         cat >> confdefs.h <<\EOF
11604 #define LDAP_DEBUG 1
11605 EOF
11606
11607 fi
11608 if test "$ol_enable_syslog" = yes ; then
11609         cat >> confdefs.h <<\EOF
11610 #define LDAP_SYSLOG 1
11611 EOF
11612
11613 fi
11614 if test "$ol_enable_libui" = yes ; then
11615         cat >> confdefs.h <<\EOF
11616 #define LDAP_LIBUI 1
11617 EOF
11618
11619 fi
11620 if test "$ol_enable_cache" = no ; then
11621         cat >> confdefs.h <<\EOF
11622 #define LDAP_NOCACHE 1
11623 EOF
11624
11625 fi
11626 if test "$ol_enable_dns" != no ; then
11627         cat >> confdefs.h <<\EOF
11628 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11629 EOF
11630
11631 fi
11632 if test "$ol_enable_proctitle" != no ; then
11633         cat >> confdefs.h <<\EOF
11634 #define LDAP_PROCTITLE 1
11635 EOF
11636
11637 fi
11638 if test "$ol_enable_referrals" != no ; then
11639         cat >> confdefs.h <<\EOF
11640 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11641 EOF
11642
11643 fi
11644 if test "$ol_enable_cldap" != no ; then
11645         cat >> confdefs.h <<\EOF
11646 #define LDAP_CONNECTIONLESS 1
11647 EOF
11648
11649 fi
11650
11651 if test "$ol_enable_aclgroups" != no ; then
11652         cat >> confdefs.h <<\EOF
11653 #define SLAPD_ACLGROUPS 1
11654 EOF
11655
11656 fi
11657 if test "$ol_enable_crypt" != no ; then
11658         cat >> confdefs.h <<\EOF
11659 #define SLAPD_CRYPT 1
11660 EOF
11661
11662 fi
11663 if test "$ol_enable_cleartext" != no ; then
11664         cat >> confdefs.h <<\EOF
11665 #define SLAPD_CLEARTEXT 1
11666 EOF
11667
11668 fi
11669 if test "$ol_enable_phonetic" != no ; then
11670         cat >> confdefs.h <<\EOF
11671 #define SLAPD_PHONETIC 1
11672 EOF
11673
11674 fi
11675 if test "$ol_enable_rlookups" != no ; then
11676         cat >> confdefs.h <<\EOF
11677 #define SLAPD_RLOOKUPS 1
11678 EOF
11679
11680 fi
11681
11682 if test "$ol_link_modules" != no ; then
11683         cat >> confdefs.h <<\EOF
11684 #define SLAPD_MODULES 1
11685 EOF
11686
11687         BUILD_SLAPD=yes
11688 fi
11689
11690 if test "$ol_link_bdb2" != no ; then
11691         cat >> confdefs.h <<\EOF
11692 #define SLAPD_BDB2 1
11693 EOF
11694
11695         BUILD_SLAPD=yes
11696         BUILD_BDB2=yes
11697 fi
11698
11699 if test "$ol_enable_ldap" != no ; then
11700         cat >> confdefs.h <<\EOF
11701 #define SLAPD_LDAP 1
11702 EOF
11703
11704         BUILD_SLAPD=yes
11705         BUILD_LDAP=yes
11706 fi
11707
11708 if test "$ol_link_ldbm" != no ; then
11709         cat >> confdefs.h <<\EOF
11710 #define SLAPD_LDBM 1
11711 EOF
11712
11713         BUILD_SLAPD=yes
11714         BUILD_LDBM=yes
11715 fi
11716
11717 if test "$ol_enable_passwd" != no ; then
11718         cat >> confdefs.h <<\EOF
11719 #define SLAPD_PASSWD 1
11720 EOF
11721
11722         BUILD_SLAPD=yes
11723         BUILD_PASSWD=yes
11724 fi
11725
11726 if test "$ol_link_perl" != no ; then
11727         cat >> confdefs.h <<\EOF
11728 #define SLAPD_PERL 1
11729 EOF
11730
11731         BUILD_SLAPD=yes
11732         BUILD_PERL=yes
11733 fi
11734
11735 if test "$ol_enable_shell" != no ; then
11736         cat >> confdefs.h <<\EOF
11737 #define SLAPD_SHELL 1
11738 EOF
11739
11740         BUILD_SLAPD=yes
11741         BUILD_SHELL=yes
11742 fi
11743
11744 if test "$ol_enable_tcl" != no ; then
11745         cat >> confdefs.h <<\EOF
11746 #define SLAPD_TCL 1
11747 EOF
11748
11749         BUILD_SLAPD=yes
11750         BUILD_TCL=yes
11751 fi
11752
11753 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11754         $BUILD_SLAPD = yes ; then
11755         BUILD_SLURPD=yes
11756 fi
11757
11758 if test "$ol_link_isode" != no ; then
11759         BUILD_LDAPD=yes
11760 fi
11761
11762
11763
11764
11765   
11766   
11767   
11768   
11769   
11770   
11771   
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794 trap '' 1 2 15
11795
11796 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11797
11798 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11799 # Let make expand exec_prefix.
11800 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11801
11802 # Any assignment to VPATH causes Sun make to only execute
11803 # the first set of double-colon rules, so remove it if not needed.
11804 # If there is a colon in the path, we need to keep it.
11805 if test "x$srcdir" = x.; then
11806   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11807 fi
11808
11809 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11810
11811 DEFS=-DHAVE_CONFIG_H
11812
11813 # Without the "./", some shells look in PATH for config.status.
11814 : ${CONFIG_STATUS=./config.status}
11815
11816 echo creating $CONFIG_STATUS
11817 rm -f $CONFIG_STATUS
11818 cat > $CONFIG_STATUS <<EOF
11819 #! /bin/sh
11820 # Generated automatically by configure.
11821 # Run this file to recreate the current configuration.
11822 # This directory was configured as follows,
11823 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11824 #
11825 # $0 $ac_configure_args
11826 #
11827 # Compiler output produced by configure, useful for debugging
11828 # configure, is in ./config.log if it exists.
11829
11830 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11831 for ac_option
11832 do
11833   case "\$ac_option" in
11834   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11835     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11836     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11837   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11838     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11839     exit 0 ;;
11840   -help | --help | --hel | --he | --h)
11841     echo "\$ac_cs_usage"; exit 0 ;;
11842   *) echo "\$ac_cs_usage"; exit 1 ;;
11843   esac
11844 done
11845
11846 ac_given_srcdir=$srcdir
11847 ac_given_INSTALL="$INSTALL"
11848
11849 trap 'rm -fr `echo "\
11850 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11851 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11852 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11853 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11854 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11855 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11856 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11857 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11858 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11859 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11860 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11861 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11862 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11863 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11864 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11865 include/Makefile:build/top.mk:include/Makefile.in \
11866 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11867 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11868 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11869 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11870 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11871 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11872 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11873 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11874 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11875 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11876 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11877 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11878 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
11879 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11880 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11881 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11882 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11883 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11884 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11885 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11886 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11887 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11888 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11889 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11890 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11891 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11892  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11893 EOF
11894 cat >> $CONFIG_STATUS <<EOF
11895
11896 # Protect against being on the right side of a sed subst in config.status.
11897 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11898  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11899 $ac_vpsub
11900 $extrasub
11901 s%@SHELL@%$SHELL%g
11902 s%@CFLAGS@%$CFLAGS%g
11903 s%@CPPFLAGS@%$CPPFLAGS%g
11904 s%@CXXFLAGS@%$CXXFLAGS%g
11905 s%@FFLAGS@%$FFLAGS%g
11906 s%@DEFS@%$DEFS%g
11907 s%@LDFLAGS@%$LDFLAGS%g
11908 s%@LIBS@%$LIBS%g
11909 s%@exec_prefix@%$exec_prefix%g
11910 s%@prefix@%$prefix%g
11911 s%@program_transform_name@%$program_transform_name%g
11912 s%@bindir@%$bindir%g
11913 s%@sbindir@%$sbindir%g
11914 s%@libexecdir@%$libexecdir%g
11915 s%@datadir@%$datadir%g
11916 s%@sysconfdir@%$sysconfdir%g
11917 s%@sharedstatedir@%$sharedstatedir%g
11918 s%@localstatedir@%$localstatedir%g
11919 s%@libdir@%$libdir%g
11920 s%@includedir@%$includedir%g
11921 s%@oldincludedir@%$oldincludedir%g
11922 s%@infodir@%$infodir%g
11923 s%@mandir@%$mandir%g
11924 s%@host@%$host%g
11925 s%@host_alias@%$host_alias%g
11926 s%@host_cpu@%$host_cpu%g
11927 s%@host_vendor@%$host_vendor%g
11928 s%@host_os@%$host_os%g
11929 s%@target@%$target%g
11930 s%@target_alias@%$target_alias%g
11931 s%@target_cpu@%$target_cpu%g
11932 s%@target_vendor@%$target_vendor%g
11933 s%@target_os@%$target_os%g
11934 s%@build@%$build%g
11935 s%@build_alias@%$build_alias%g
11936 s%@build_cpu@%$build_cpu%g
11937 s%@build_vendor@%$build_vendor%g
11938 s%@build_os@%$build_os%g
11939 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11940 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11941 s%@INSTALL_DATA@%$INSTALL_DATA%g
11942 s%@PACKAGE@%$PACKAGE%g
11943 s%@VERSION@%$VERSION%g
11944 s%@ACLOCAL@%$ACLOCAL%g
11945 s%@AUTOCONF@%$AUTOCONF%g
11946 s%@AUTOMAKE@%$AUTOMAKE%g
11947 s%@AUTOHEADER@%$AUTOHEADER%g
11948 s%@MAKEINFO@%$MAKEINFO%g
11949 s%@SET_MAKE@%$SET_MAKE%g
11950 s%@top_builddir@%$top_builddir%g
11951 s%@ldap_subdir@%$ldap_subdir%g
11952 s%@CC@%$CC%g
11953 s%@RANLIB@%$RANLIB%g
11954 s%@LD@%$LD%g
11955 s%@NM@%$NM%g
11956 s%@LN_S@%$LN_S%g
11957 s%@LIBTOOL@%$LIBTOOL%g
11958 s%@AWK@%$AWK%g
11959 s%@LN_H@%$LN_H%g
11960 s%@SENDMAIL@%$SENDMAIL%g
11961 s%@EDITOR@%$EDITOR%g
11962 s%@FINGER@%$FINGER%g
11963 s%@GLIBCONFIG@%$GLIBCONFIG%g
11964 s%@PERLBIN@%$PERLBIN%g
11965 s%@CPP@%$CPP%g
11966 s%@EXEEXT@%$EXEEXT%g
11967 s%@OBJEXT@%$OBJEXT%g
11968 s%@OL_MKDEP@%$OL_MKDEP%g
11969 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
11970 s%@PEPSY@%$PEPSY%g
11971 s%@LIBOBJS@%$LIBOBJS%g
11972 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11973 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11974 s%@BUILD_BDB2@%$BUILD_BDB2%g
11975 s%@BUILD_LDAP@%$BUILD_LDAP%g
11976 s%@BUILD_LDBM@%$BUILD_LDBM%g
11977 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11978 s%@BUILD_PERL@%$BUILD_PERL%g
11979 s%@BUILD_SHELL@%$BUILD_SHELL%g
11980 s%@BUILD_TCL@%$BUILD_TCL%g
11981 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11982 s%@LDAP_LIBS@%$LDAP_LIBS%g
11983 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11984 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11985 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11986 s%@LDBM_LIBS@%$LDBM_LIBS%g
11987 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11988 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11989 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
11990 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
11991 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11992 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11993 s%@KRB_LIBS@%$KRB_LIBS%g
11994 s%@READLINE_LIBS@%$READLINE_LIBS%g
11995 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11996 s%@TLS_LIBS@%$TLS_LIBS%g
11997
11998 CEOF
11999 EOF
12000
12001 cat >> $CONFIG_STATUS <<\EOF
12002
12003 # Split the substitutions into bite-sized pieces for seds with
12004 # small command number limits, like on Digital OSF/1 and HP-UX.
12005 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12006 ac_file=1 # Number of current file.
12007 ac_beg=1 # First line for current file.
12008 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12009 ac_more_lines=:
12010 ac_sed_cmds=""
12011 while $ac_more_lines; do
12012   if test $ac_beg -gt 1; then
12013     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12014   else
12015     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12016   fi
12017   if test ! -s conftest.s$ac_file; then
12018     ac_more_lines=false
12019     rm -f conftest.s$ac_file
12020   else
12021     if test -z "$ac_sed_cmds"; then
12022       ac_sed_cmds="sed -f conftest.s$ac_file"
12023     else
12024       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12025     fi
12026     ac_file=`expr $ac_file + 1`
12027     ac_beg=$ac_end
12028     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12029   fi
12030 done
12031 if test -z "$ac_sed_cmds"; then
12032   ac_sed_cmds=cat
12033 fi
12034 EOF
12035
12036 cat >> $CONFIG_STATUS <<EOF
12037
12038 CONFIG_FILES=\${CONFIG_FILES-"\
12039 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12040 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12041 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12042 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12043 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12044 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12045 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12046 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12047 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12048 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12049 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12050 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12051 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12052 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12053 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12054 include/Makefile:build/top.mk:include/Makefile.in \
12055 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12056 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12057 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12058 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12059 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12060 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12061 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12062 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12063 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12064 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12065 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12066 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12067 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12068 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12069 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12070 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12071 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12072 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12073 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12074 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12075 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12076 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12077 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12078 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12079 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12080 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12081 "}
12082 EOF
12083 cat >> $CONFIG_STATUS <<\EOF
12084 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12085   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12086   case "$ac_file" in
12087   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12088        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12089   *) ac_file_in="${ac_file}.in" ;;
12090   esac
12091
12092   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12093
12094   # Remove last slash and all that follows it.  Not all systems have dirname.
12095   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12096   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12097     # The file is in a subdirectory.
12098     test ! -d "$ac_dir" && mkdir "$ac_dir"
12099     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12100     # A "../" for each directory in $ac_dir_suffix.
12101     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12102   else
12103     ac_dir_suffix= ac_dots=
12104   fi
12105
12106   case "$ac_given_srcdir" in
12107   .)  srcdir=.
12108       if test -z "$ac_dots"; then top_srcdir=.
12109       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12110   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12111   *) # Relative path.
12112     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12113     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12114   esac
12115
12116   case "$ac_given_INSTALL" in
12117   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12118   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12119   esac
12120
12121   echo creating "$ac_file"
12122   rm -f "$ac_file"
12123   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12124   case "$ac_file" in
12125   *Makefile*) ac_comsub="1i\\
12126 # $configure_input" ;;
12127   *) ac_comsub= ;;
12128   esac
12129
12130   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12131   sed -e "$ac_comsub
12132 s%@configure_input@%$configure_input%g
12133 s%@srcdir@%$srcdir%g
12134 s%@top_srcdir@%$top_srcdir%g
12135 s%@INSTALL@%$INSTALL%g
12136 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12137 fi; done
12138 rm -f conftest.s*
12139
12140 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12141 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12142 #
12143 # ac_d sets the value in "#define NAME VALUE" lines.
12144 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12145 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12146 ac_dC='\3'
12147 ac_dD='%g'
12148 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12149 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12150 ac_uB='\([      ]\)%\1#\2define\3'
12151 ac_uC=' '
12152 ac_uD='\4%g'
12153 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12154 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12155 ac_eB='$%\1#\2define\3'
12156 ac_eC=' '
12157 ac_eD='%g'
12158
12159 if test "${CONFIG_HEADERS+set}" != set; then
12160 EOF
12161 cat >> $CONFIG_STATUS <<EOF
12162   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
12163 EOF
12164 cat >> $CONFIG_STATUS <<\EOF
12165 fi
12166 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12167   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12168   case "$ac_file" in
12169   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12170        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12171   *) ac_file_in="${ac_file}.in" ;;
12172   esac
12173
12174   echo creating $ac_file
12175
12176   rm -f conftest.frag conftest.in conftest.out
12177   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12178   cat $ac_file_inputs > conftest.in
12179
12180 EOF
12181
12182 # Transform confdefs.h into a sed script conftest.vals that substitutes
12183 # the proper values into config.h.in to produce config.h.  And first:
12184 # Protect against being on the right side of a sed subst in config.status.
12185 # Protect against being in an unquoted here document in config.status.
12186 rm -f conftest.vals
12187 cat > conftest.hdr <<\EOF
12188 s/[\\&%]/\\&/g
12189 s%[\\$`]%\\&%g
12190 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12191 s%ac_d%ac_u%gp
12192 s%ac_u%ac_e%gp
12193 EOF
12194 sed -n -f conftest.hdr confdefs.h > conftest.vals
12195 rm -f conftest.hdr
12196
12197 # This sed command replaces #undef with comments.  This is necessary, for
12198 # example, in the case of _POSIX_SOURCE, which is predefined and required
12199 # on some systems where configure will not decide to define it.
12200 cat >> conftest.vals <<\EOF
12201 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12202 EOF
12203
12204 # Break up conftest.vals because some shells have a limit on
12205 # the size of here documents, and old seds have small limits too.
12206
12207 rm -f conftest.tail
12208 while :
12209 do
12210   ac_lines=`grep -c . conftest.vals`
12211   # grep -c gives empty output for an empty file on some AIX systems.
12212   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12213   # Write a limited-size here document to conftest.frag.
12214   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12215   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12216   echo 'CEOF
12217   sed -f conftest.frag conftest.in > conftest.out
12218   rm -f conftest.in
12219   mv conftest.out conftest.in
12220 ' >> $CONFIG_STATUS
12221   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12222   rm -f conftest.vals
12223   mv conftest.tail conftest.vals
12224 done
12225 rm -f conftest.vals
12226
12227 cat >> $CONFIG_STATUS <<\EOF
12228   rm -f conftest.frag conftest.h
12229   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12230   cat conftest.in >> conftest.h
12231   rm -f conftest.in
12232   if cmp -s $ac_file conftest.h 2>/dev/null; then
12233     echo "$ac_file is unchanged"
12234     rm -f conftest.h
12235   else
12236     # Remove last slash and all that follows it.  Not all systems have dirname.
12237       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12238       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12239       # The file is in a subdirectory.
12240       test ! -d "$ac_dir" && mkdir "$ac_dir"
12241     fi
12242     rm -f $ac_file
12243     mv conftest.h $ac_file
12244   fi
12245 fi; done
12246
12247 EOF
12248 cat >> $CONFIG_STATUS <<EOF
12249
12250 EOF
12251 cat >> $CONFIG_STATUS <<\EOF
12252
12253 date > stamp-h
12254 echo Please \"make depend\" to build dependencies
12255
12256 exit 0
12257 EOF
12258 chmod +x $CONFIG_STATUS
12259 rm -fr confdefs* $ac_clean_files
12260 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12261