]> git.sur5r.net Git - openldap/blob - configure
More error codes.
[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 -z "${CC}" -a $ol_aix_threads = yes ; then
1921         for ac_prog in cc_r xlc_r cc
1922 do
1923 # Extract the first word of "$ac_prog", so it can be a program name with args.
1924 set dummy $ac_prog; ac_word=$2
1925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1926 echo "configure:1927: checking for $ac_word" >&5
1927 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1928   echo $ac_n "(cached) $ac_c" 1>&6
1929 else
1930   if test -n "$CC"; then
1931   ac_cv_prog_CC="$CC" # Let the user override the test.
1932 else
1933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1934   ac_dummy="$PATH"
1935   for ac_dir in $ac_dummy; do
1936     test -z "$ac_dir" && ac_dir=.
1937     if test -f $ac_dir/$ac_word; then
1938       ac_cv_prog_CC="$ac_prog"
1939       break
1940     fi
1941   done
1942   IFS="$ac_save_ifs"
1943 fi
1944 fi
1945 CC="$ac_cv_prog_CC"
1946 if test -n "$CC"; then
1947   echo "$ac_t""$CC" 1>&6
1948 else
1949   echo "$ac_t""no" 1>&6
1950 fi
1951
1952 test -n "$CC" && break
1953 done
1954
1955
1956         if test "$CC" = cc ; then
1957                                 if test $ol_with_threads != auto ; then
1958                         { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
1959                 else
1960                         echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
1961                 fi
1962                 ol_with_threads=no
1963
1964         elif test "$CC" ; then
1965                 ol_with_threads=posix
1966                 ol_cv_pthread_create=yes
1967         fi
1968 fi
1969
1970 if test -z "${CC}"; then
1971         for ac_prog in cc
1972 do
1973 # Extract the first word of "$ac_prog", so it can be a program name with args.
1974 set dummy $ac_prog; ac_word=$2
1975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1976 echo "configure:1977: checking for $ac_word" >&5
1977 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1978   echo $ac_n "(cached) $ac_c" 1>&6
1979 else
1980   if test -n "$CC"; then
1981   ac_cv_prog_CC="$CC" # Let the user override the test.
1982 else
1983   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1984   ac_dummy="$PATH"
1985   for ac_dir in $ac_dummy; do
1986     test -z "$ac_dir" && ac_dir=.
1987     if test -f $ac_dir/$ac_word; then
1988       ac_cv_prog_CC="$ac_prog"
1989       break
1990     fi
1991   done
1992   IFS="$ac_save_ifs"
1993 fi
1994 fi
1995 CC="$ac_cv_prog_CC"
1996 if test -n "$CC"; then
1997   echo "$ac_t""$CC" 1>&6
1998 else
1999   echo "$ac_t""no" 1>&6
2000 fi
2001
2002 test -n "$CC" && break
2003 done
2004
2005 fi
2006
2007
2008 # Extract the first word of "ranlib", so it can be a program name with args.
2009 set dummy ranlib; ac_word=$2
2010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2011 echo "configure:2012: checking for $ac_word" >&5
2012 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2013   echo $ac_n "(cached) $ac_c" 1>&6
2014 else
2015   if test -n "$RANLIB"; then
2016   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2017 else
2018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2019   ac_dummy="$PATH"
2020   for ac_dir in $ac_dummy; do
2021     test -z "$ac_dir" && ac_dir=.
2022     if test -f $ac_dir/$ac_word; then
2023       ac_cv_prog_RANLIB="ranlib"
2024       break
2025     fi
2026   done
2027   IFS="$ac_save_ifs"
2028   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2029 fi
2030 fi
2031 RANLIB="$ac_cv_prog_RANLIB"
2032 if test -n "$RANLIB"; then
2033   echo "$ac_t""$RANLIB" 1>&6
2034 else
2035   echo "$ac_t""no" 1>&6
2036 fi
2037
2038 # Extract the first word of "gcc", so it can be a program name with args.
2039 set dummy gcc; ac_word=$2
2040 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2041 echo "configure:2042: checking for $ac_word" >&5
2042 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2043   echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045   if test -n "$CC"; then
2046   ac_cv_prog_CC="$CC" # Let the user override the test.
2047 else
2048   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2049   ac_dummy="$PATH"
2050   for ac_dir in $ac_dummy; do
2051     test -z "$ac_dir" && ac_dir=.
2052     if test -f $ac_dir/$ac_word; then
2053       ac_cv_prog_CC="gcc"
2054       break
2055     fi
2056   done
2057   IFS="$ac_save_ifs"
2058 fi
2059 fi
2060 CC="$ac_cv_prog_CC"
2061 if test -n "$CC"; then
2062   echo "$ac_t""$CC" 1>&6
2063 else
2064   echo "$ac_t""no" 1>&6
2065 fi
2066
2067 if test -z "$CC"; then
2068   # Extract the first word of "cc", so it can be a program name with args.
2069 set dummy cc; ac_word=$2
2070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2071 echo "configure:2072: checking for $ac_word" >&5
2072 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2073   echo $ac_n "(cached) $ac_c" 1>&6
2074 else
2075   if test -n "$CC"; then
2076   ac_cv_prog_CC="$CC" # Let the user override the test.
2077 else
2078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2079   ac_prog_rejected=no
2080   ac_dummy="$PATH"
2081   for ac_dir in $ac_dummy; do
2082     test -z "$ac_dir" && ac_dir=.
2083     if test -f $ac_dir/$ac_word; then
2084       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2085         ac_prog_rejected=yes
2086         continue
2087       fi
2088       ac_cv_prog_CC="cc"
2089       break
2090     fi
2091   done
2092   IFS="$ac_save_ifs"
2093 if test $ac_prog_rejected = yes; then
2094   # We found a bogon in the path, so make sure we never use it.
2095   set dummy $ac_cv_prog_CC
2096   shift
2097   if test $# -gt 0; then
2098     # We chose a different compiler from the bogus one.
2099     # However, it has the same basename, so the bogon will be chosen
2100     # first if we set CC to just the basename; use the full file name.
2101     shift
2102     set dummy "$ac_dir/$ac_word" "$@"
2103     shift
2104     ac_cv_prog_CC="$@"
2105   fi
2106 fi
2107 fi
2108 fi
2109 CC="$ac_cv_prog_CC"
2110 if test -n "$CC"; then
2111   echo "$ac_t""$CC" 1>&6
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115
2116   if test -z "$CC"; then
2117     case "`uname -s`" in
2118     *win32* | *WIN32*)
2119       # Extract the first word of "cl", so it can be a program name with args.
2120 set dummy cl; ac_word=$2
2121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2122 echo "configure:2123: checking for $ac_word" >&5
2123 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   if test -n "$CC"; then
2127   ac_cv_prog_CC="$CC" # Let the user override the test.
2128 else
2129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2130   ac_dummy="$PATH"
2131   for ac_dir in $ac_dummy; do
2132     test -z "$ac_dir" && ac_dir=.
2133     if test -f $ac_dir/$ac_word; then
2134       ac_cv_prog_CC="cl"
2135       break
2136     fi
2137   done
2138   IFS="$ac_save_ifs"
2139 fi
2140 fi
2141 CC="$ac_cv_prog_CC"
2142 if test -n "$CC"; then
2143   echo "$ac_t""$CC" 1>&6
2144 else
2145   echo "$ac_t""no" 1>&6
2146 fi
2147  ;;
2148     esac
2149   fi
2150   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2151 fi
2152
2153 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2154 echo "configure:2155: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2155
2156 ac_ext=c
2157 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2158 ac_cpp='$CPP $CPPFLAGS'
2159 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2160 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2161 cross_compiling=$ac_cv_prog_cc_cross
2162
2163 cat > conftest.$ac_ext << EOF
2164
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167
2168 main(){return(0);}
2169 EOF
2170 if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2171   ac_cv_prog_cc_works=yes
2172   # If we can't run a trivial program, we are probably using a cross compiler.
2173   if (./conftest; exit) 2>/dev/null; then
2174     ac_cv_prog_cc_cross=no
2175   else
2176     ac_cv_prog_cc_cross=yes
2177   fi
2178 else
2179   echo "configure: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   ac_cv_prog_cc_works=no
2182 fi
2183 rm -fr conftest*
2184 ac_ext=c
2185 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2186 ac_cpp='$CPP $CPPFLAGS'
2187 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2188 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2189 cross_compiling=$ac_cv_prog_cc_cross
2190
2191 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2192 if test $ac_cv_prog_cc_works = no; then
2193   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2194 fi
2195 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2196 echo "configure:2197: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2197 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2198 cross_compiling=$ac_cv_prog_cc_cross
2199
2200 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2201 echo "configure:2202: checking whether we are using GNU C" >&5
2202 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2203   echo $ac_n "(cached) $ac_c" 1>&6
2204 else
2205   cat > conftest.c <<EOF
2206 #ifdef __GNUC__
2207   yes;
2208 #endif
2209 EOF
2210 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2211   ac_cv_prog_gcc=yes
2212 else
2213   ac_cv_prog_gcc=no
2214 fi
2215 fi
2216
2217 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2218
2219 if test $ac_cv_prog_gcc = yes; then
2220   GCC=yes
2221 else
2222   GCC=
2223 fi
2224
2225 ac_test_CFLAGS="${CFLAGS+set}"
2226 ac_save_CFLAGS="$CFLAGS"
2227 CFLAGS=
2228 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2229 echo "configure:2230: checking whether ${CC-cc} accepts -g" >&5
2230 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2231   echo $ac_n "(cached) $ac_c" 1>&6
2232 else
2233   echo 'void f(){}' > conftest.c
2234 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2235   ac_cv_prog_cc_g=yes
2236 else
2237   ac_cv_prog_cc_g=no
2238 fi
2239 rm -f conftest*
2240
2241 fi
2242
2243 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2244 if test "$ac_test_CFLAGS" = set; then
2245   CFLAGS="$ac_save_CFLAGS"
2246 elif test $ac_cv_prog_cc_g = yes; then
2247   if test "$GCC" = yes; then
2248     CFLAGS="-g -O2"
2249   else
2250     CFLAGS="-g"
2251   fi
2252 else
2253   if test "$GCC" = yes; then
2254     CFLAGS="-O2"
2255   else
2256     CFLAGS=
2257   fi
2258 fi
2259
2260 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2261 if test "${with_gnu_ld+set}" = set; then
2262   withval="$with_gnu_ld"
2263   test "$withval" = no || with_gnu_ld=yes
2264 else
2265   with_gnu_ld=no
2266 fi
2267
2268
2269 ac_prog=ld
2270 if test "$ac_cv_prog_gcc" = yes; then
2271   # Check if gcc -print-prog-name=ld gives a path.
2272   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2273 echo "configure:2274: checking for ld used by GCC" >&5
2274   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2275   case "$ac_prog" in
2276   # Accept absolute paths.
2277   /* | A-Za-z:\\*)
2278     test -z "$LD" && LD="$ac_prog"
2279     ;;
2280   "")
2281     # If it fails, then pretend we aren't using GCC.
2282     ac_prog=ld
2283     ;;
2284   *)
2285     # If it is relative, then search for the first ld in PATH.
2286     with_gnu_ld=unknown
2287     ;;
2288   esac
2289 elif test "$with_gnu_ld" = yes; then
2290   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2291 echo "configure:2292: checking for GNU ld" >&5
2292 else
2293   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2294 echo "configure:2295: checking for non-GNU ld" >&5
2295 fi
2296 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2297   echo $ac_n "(cached) $ac_c" 1>&6
2298 else
2299   if test -z "$LD"; then
2300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2301   for ac_dir in $PATH; do
2302     test -z "$ac_dir" && ac_dir=.
2303     if test -f "$ac_dir/$ac_prog"; then
2304       ac_cv_path_LD="$ac_dir/$ac_prog"
2305       # Check to see if the program is GNU ld.  I'd rather use --version,
2306       # but apparently some GNU ld's only accept -v.
2307       # Break only if it was the GNU/non-GNU ld that we prefer.
2308       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2309         test "$with_gnu_ld" != no && break
2310       else
2311         test "$with_gnu_ld" != yes && break
2312       fi
2313     fi
2314   done
2315   IFS="$ac_save_ifs"
2316 else
2317   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2318 fi
2319 fi
2320
2321 LD="$ac_cv_path_LD"
2322 if test -n "$LD"; then
2323   echo "$ac_t""$LD" 1>&6
2324 else
2325   echo "$ac_t""no" 1>&6
2326 fi
2327 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2328
2329 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2330 echo "configure:2331: checking if the linker ($LD) is GNU ld" >&5
2331 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2332   echo $ac_n "(cached) $ac_c" 1>&6
2333 else
2334   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2335 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2336   ac_cv_prog_gnu_ld=yes
2337 else
2338   ac_cv_prog_gnu_ld=no
2339 fi
2340 fi
2341
2342 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2343
2344
2345 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2346 echo "configure:2347: checking for BSD-compatible nm" >&5
2347 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2348   echo $ac_n "(cached) $ac_c" 1>&6
2349 else
2350   case "$NM" in
2351 /* | A-Za-z:\\*)
2352   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2353   ;;
2354 *)
2355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2356   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2357     test -z "$ac_dir" && ac_dir=.
2358     if test -f $ac_dir/nm; then
2359       # Check to see if the nm accepts a BSD-compat flag.
2360       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2361       #   nm: unknown option "B" ignored
2362       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2363         ac_cv_path_NM="$ac_dir/nm -B"
2364       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2365         ac_cv_path_NM="$ac_dir/nm -p"
2366       else
2367         ac_cv_path_NM="$ac_dir/nm"
2368       fi
2369       break
2370     fi
2371   done
2372   IFS="$ac_save_ifs"
2373   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2374   ;;
2375 esac
2376 fi
2377
2378 NM="$ac_cv_path_NM"
2379 echo "$ac_t""$NM" 1>&6
2380
2381
2382 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2383 echo "configure:2384: checking whether ln -s works" >&5
2384 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2385   echo $ac_n "(cached) $ac_c" 1>&6
2386 else
2387   rm -f conftestdata
2388 if ln -s X conftestdata 2>/dev/null
2389 then
2390   rm -f conftestdata
2391   ac_cv_prog_LN_S="ln -s"
2392 else
2393   ac_cv_prog_LN_S=ln
2394 fi
2395 fi
2396 LN_S="$ac_cv_prog_LN_S"
2397 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2398   echo "$ac_t""yes" 1>&6
2399 else
2400   echo "$ac_t""no" 1>&6
2401 fi
2402
2403 # Always use our own libtool.
2404 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2405
2406 # Check for any special flags to pass to ltconfig.
2407 libtool_flags=
2408 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2409 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2410 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2411 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2412 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2413
2414 # Some flags need to be propagated to the compiler or linker for good
2415 # libtool support.
2416 case "$host" in
2417 *-*-irix6*)
2418   # Find out which ABI we are using.
2419   echo '#line 2420 "configure"' > conftest.$ac_ext
2420   if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2421     case "`/usr/bin/file conftest.o`" in
2422     *32-bit*)
2423       LD="${LD-ld} -32"
2424       ;;
2425     *N32*)
2426       LD="${LD-ld} -n32"
2427       ;;
2428     *64-bit*)
2429       LD="${LD-ld} -64"
2430       ;;
2431     esac
2432   fi
2433   rm -rf conftest*
2434   ;;
2435
2436 *-*-sco3.2v5*)
2437   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2438   CFLAGS="$CFLAGS -belf"
2439   ;;
2440 esac
2441
2442 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2443 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2444 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2445 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2446 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2447 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2448
2449
2450 for ac_prog in mawk gawk nawk awk
2451 do
2452 # Extract the first word of "$ac_prog", so it can be a program name with args.
2453 set dummy $ac_prog; ac_word=$2
2454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2455 echo "configure:2456: checking for $ac_word" >&5
2456 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2457   echo $ac_n "(cached) $ac_c" 1>&6
2458 else
2459   if test -n "$AWK"; then
2460   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2461 else
2462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2463   ac_dummy="$PATH"
2464   for ac_dir in $ac_dummy; do
2465     test -z "$ac_dir" && ac_dir=.
2466     if test -f $ac_dir/$ac_word; then
2467       ac_cv_prog_AWK="$ac_prog"
2468       break
2469     fi
2470   done
2471   IFS="$ac_save_ifs"
2472 fi
2473 fi
2474 AWK="$ac_cv_prog_AWK"
2475 if test -n "$AWK"; then
2476   echo "$ac_t""$AWK" 1>&6
2477 else
2478   echo "$ac_t""no" 1>&6
2479 fi
2480
2481 test -n "$AWK" && break
2482 done
2483
2484 # test for ln hardlink support
2485 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2486 echo "configure:2487: checking whether ln works" >&5
2487 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   rm -f conftest.src conftest.dst
2491 echo "conftest" > conftest.src
2492 if ln conftest.src conftest.dst 2>/dev/null
2493 then
2494   ol_cv_prog_LN_H="ln"
2495 else
2496   ol_cv_prog_LN_H="cp"
2497 fi
2498 rm -f conftest.src conftest.dst
2499
2500 fi
2501 LN_H="$ol_cv_prog_LN_H"
2502 if test "$ol_cv_prog_LN_H" = "ln"; then
2503         echo "$ac_t""yes" 1>&6
2504 else
2505         echo "$ac_t""no" 1>&6
2506 fi
2507
2508 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2509 echo "configure:2510: checking whether ln -s works" >&5
2510 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2511   echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513   rm -f conftestdata
2514 if ln -s X conftestdata 2>/dev/null
2515 then
2516   rm -f conftestdata
2517   ac_cv_prog_LN_S="ln -s"
2518 else
2519   ac_cv_prog_LN_S=ln
2520 fi
2521 fi
2522 LN_S="$ac_cv_prog_LN_S"
2523 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2524   echo "$ac_t""yes" 1>&6
2525 else
2526   echo "$ac_t""no" 1>&6
2527 fi
2528
2529
2530 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2531         LN_S="$LN_H"
2532 fi
2533
2534 # Extract the first word of "sendmail", so it can be a program name with args.
2535 set dummy sendmail; ac_word=$2
2536 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2537 echo "configure:2538: checking for $ac_word" >&5
2538 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2539   echo $ac_n "(cached) $ac_c" 1>&6
2540 else
2541   case "$SENDMAIL" in
2542   /*)
2543   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2544   ;;
2545   ?:/*)                  
2546   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2547   ;;
2548   *)
2549   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2550   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2551   for ac_dir in $ac_dummy; do 
2552     test -z "$ac_dir" && ac_dir=.
2553     if test -f $ac_dir/$ac_word; then
2554       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2555       break
2556     fi
2557   done
2558   IFS="$ac_save_ifs"
2559   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2560   ;;
2561 esac
2562 fi
2563 SENDMAIL="$ac_cv_path_SENDMAIL"
2564 if test -n "$SENDMAIL"; then
2565   echo "$ac_t""$SENDMAIL" 1>&6
2566 else
2567   echo "$ac_t""no" 1>&6
2568 fi
2569
2570 # Extract the first word of "vi", so it can be a program name with args.
2571 set dummy vi; ac_word=$2
2572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2573 echo "configure:2574: checking for $ac_word" >&5
2574 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2575   echo $ac_n "(cached) $ac_c" 1>&6
2576 else
2577   case "$EDITOR" in
2578   /*)
2579   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2580   ;;
2581   ?:/*)                  
2582   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2583   ;;
2584   *)
2585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2586   ac_dummy="$PATH:/usr/ucb"
2587   for ac_dir in $ac_dummy; do 
2588     test -z "$ac_dir" && ac_dir=.
2589     if test -f $ac_dir/$ac_word; then
2590       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2591       break
2592     fi
2593   done
2594   IFS="$ac_save_ifs"
2595   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2596   ;;
2597 esac
2598 fi
2599 EDITOR="$ac_cv_path_EDITOR"
2600 if test -n "$EDITOR"; then
2601   echo "$ac_t""$EDITOR" 1>&6
2602 else
2603   echo "$ac_t""no" 1>&6
2604 fi
2605
2606 # Extract the first word of "finger", so it can be a program name with args.
2607 set dummy finger; ac_word=$2
2608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2609 echo "configure:2610: checking for $ac_word" >&5
2610 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2611   echo $ac_n "(cached) $ac_c" 1>&6
2612 else
2613   case "$FINGER" in
2614   /*)
2615   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2616   ;;
2617   ?:/*)                  
2618   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2619   ;;
2620   *)
2621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2622   ac_dummy="$PATH:/usr/ucb"
2623   for ac_dir in $ac_dummy; do 
2624     test -z "$ac_dir" && ac_dir=.
2625     if test -f $ac_dir/$ac_word; then
2626       ac_cv_path_FINGER="$ac_dir/$ac_word"
2627       break
2628     fi
2629   done
2630   IFS="$ac_save_ifs"
2631   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2632   ;;
2633 esac
2634 fi
2635 FINGER="$ac_cv_path_FINGER"
2636 if test -n "$FINGER"; then
2637   echo "$ac_t""$FINGER" 1>&6
2638 else
2639   echo "$ac_t""no" 1>&6
2640 fi
2641
2642
2643 ol_link_modules=no
2644 if test $ol_enable_modules != no ; then
2645         # Extract the first word of "glib-config", so it can be a program name with args.
2646 set dummy glib-config; ac_word=$2
2647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2648 echo "configure:2649: checking for $ac_word" >&5
2649 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2650   echo $ac_n "(cached) $ac_c" 1>&6
2651 else
2652   case "$GLIBCONFIG" in
2653   /*)
2654   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2655   ;;
2656   ?:/*)                  
2657   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2658   ;;
2659   *)
2660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2661   ac_dummy="$PATH"
2662   for ac_dir in $ac_dummy; do 
2663     test -z "$ac_dir" && ac_dir=.
2664     if test -f $ac_dir/$ac_word; then
2665       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2666       break
2667     fi
2668   done
2669   IFS="$ac_save_ifs"
2670   ;;
2671 esac
2672 fi
2673 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2674 if test -n "$GLIBCONFIG"; then
2675   echo "$ac_t""$GLIBCONFIG" 1>&6
2676 else
2677   echo "$ac_t""no" 1>&6
2678 fi
2679
2680
2681         if test "no$GLIBCONFIG" = "no" ; then
2682                 if test $ol_enable_modules = yes ; then
2683                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2684                 fi
2685
2686         else
2687                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2688                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2689                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2690
2691                                 ol_link_modules=yes
2692         fi
2693 fi
2694
2695 ol_link_perl=no
2696 if test $ol_enable_perl != no ; then
2697         # Extract the first word of "perl", so it can be a program name with args.
2698 set dummy perl; ac_word=$2
2699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2700 echo "configure:2701: checking for $ac_word" >&5
2701 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   case "$PERLBIN" in
2705   /*)
2706   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2707   ;;
2708   ?:/*)                  
2709   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2710   ;;
2711   *)
2712   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2713   ac_dummy="$PATH"
2714   for ac_dir in $ac_dummy; do 
2715     test -z "$ac_dir" && ac_dir=.
2716     if test -f $ac_dir/$ac_word; then
2717       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2718       break
2719     fi
2720   done
2721   IFS="$ac_save_ifs"
2722   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2723   ;;
2724 esac
2725 fi
2726 PERLBIN="$ac_cv_path_PERLBIN"
2727 if test -n "$PERLBIN"; then
2728   echo "$ac_t""$PERLBIN" 1>&6
2729 else
2730   echo "$ac_t""no" 1>&6
2731 fi
2732
2733
2734         if test "no$PERLBIN" = "no" ; then
2735                 if test $ol_enable_perl = yes ; then
2736                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2737                 fi
2738
2739         else
2740                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2741                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2742
2743                                 ol_link_perl=yes
2744         fi
2745 fi
2746
2747 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2748 echo "configure:2749: checking how to run the C preprocessor" >&5
2749 # On Suns, sometimes $CPP names a directory.
2750 if test -n "$CPP" && test -d "$CPP"; then
2751   CPP=
2752 fi
2753 if test -z "$CPP"; then
2754 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757     # This must be in double quotes, not single quotes, because CPP may get
2758   # substituted into the Makefile and "${CC-cc}" will confuse make.
2759   CPP="${CC-cc} -E"
2760   # On the NeXT, cc -E runs the code through the compiler's parser,
2761   # not just through cpp.
2762   cat > conftest.$ac_ext <<EOF
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765 #include <assert.h>
2766 Syntax Error
2767 EOF
2768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2769 { (eval echo configure:2770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2771 if test -z "$ac_err"; then
2772   :
2773 else
2774   echo "$ac_err" >&5
2775   echo "configure: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777   rm -rf conftest*
2778   CPP="${CC-cc} -E -traditional-cpp"
2779   cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782 #include <assert.h>
2783 Syntax Error
2784 EOF
2785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2786 { (eval echo configure:2787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2788 if test -z "$ac_err"; then
2789   :
2790 else
2791   echo "$ac_err" >&5
2792   echo "configure: failed program was:" >&5
2793   cat conftest.$ac_ext >&5
2794   rm -rf conftest*
2795   CPP="${CC-cc} -nologo -E"
2796   cat > conftest.$ac_ext <<EOF
2797 #line 2798 "configure"
2798 #include "confdefs.h"
2799 #include <assert.h>
2800 Syntax Error
2801 EOF
2802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2803 { (eval echo configure:2804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2805 if test -z "$ac_err"; then
2806   :
2807 else
2808   echo "$ac_err" >&5
2809   echo "configure: failed program was:" >&5
2810   cat conftest.$ac_ext >&5
2811   rm -rf conftest*
2812   CPP=/lib/cpp
2813 fi
2814 rm -f conftest*
2815 fi
2816 rm -f conftest*
2817 fi
2818 rm -f conftest*
2819   ac_cv_prog_CPP="$CPP"
2820 fi
2821   CPP="$ac_cv_prog_CPP"
2822 else
2823   ac_cv_prog_CPP="$CPP"
2824 fi
2825 echo "$ac_t""$CPP" 1>&6
2826
2827
2828 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2829         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2830
2831 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2832         echo "configure: warning: programs compiled here do run here..." 1>&2
2833         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2834
2835 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2836         echo "configure: warning: programs compiled here do not run here..." 1>&2
2837         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2838 fi
2839
2840 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2841 echo "configure:2842: checking for AIX" >&5
2842 cat > conftest.$ac_ext <<EOF
2843 #line 2844 "configure"
2844 #include "confdefs.h"
2845 #ifdef _AIX
2846   yes
2847 #endif
2848
2849 EOF
2850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2851   egrep "yes" >/dev/null 2>&1; then
2852   rm -rf conftest*
2853   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2854 #define _ALL_SOURCE 1
2855 EOF
2856
2857 else
2858   rm -rf conftest*
2859   echo "$ac_t""no" 1>&6
2860 fi
2861 rm -f conftest*
2862
2863
2864 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2865 echo "configure:2866: checking for POSIXized ISC" >&5
2866 if test -d /etc/conf/kconfig.d &&
2867   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2868 then
2869   echo "$ac_t""yes" 1>&6
2870   ISC=yes # If later tests want to check for ISC.
2871   cat >> confdefs.h <<\EOF
2872 #define _POSIX_SOURCE 1
2873 EOF
2874
2875   if test "$GCC" = yes; then
2876     CC="$CC -posix"
2877   else
2878     CC="$CC -Xp"
2879   fi
2880 else
2881   echo "$ac_t""no" 1>&6
2882   ISC=
2883 fi
2884
2885 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2886 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2887 echo "configure:2888: checking for minix/config.h" >&5
2888 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2889   echo $ac_n "(cached) $ac_c" 1>&6
2890 else
2891   cat > conftest.$ac_ext <<EOF
2892 #line 2893 "configure"
2893 #include "confdefs.h"
2894 #include <minix/config.h>
2895 EOF
2896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2897 { (eval echo configure:2898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2899 if test -z "$ac_err"; then
2900   rm -rf conftest*
2901   eval "ac_cv_header_$ac_safe=yes"
2902 else
2903   echo "$ac_err" >&5
2904   echo "configure: failed program was:" >&5
2905   cat conftest.$ac_ext >&5
2906   rm -rf conftest*
2907   eval "ac_cv_header_$ac_safe=no"
2908 fi
2909 rm -f conftest*
2910 fi
2911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2912   echo "$ac_t""yes" 1>&6
2913   MINIX=yes
2914 else
2915   echo "$ac_t""no" 1>&6
2916 MINIX=
2917 fi
2918
2919 if test "$MINIX" = yes; then
2920   cat >> confdefs.h <<\EOF
2921 #define _POSIX_SOURCE 1
2922 EOF
2923
2924   cat >> confdefs.h <<\EOF
2925 #define _POSIX_1_SOURCE 2
2926 EOF
2927
2928   cat >> confdefs.h <<\EOF
2929 #define _MINIX 1
2930 EOF
2931
2932 fi
2933
2934
2935 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2936 echo "configure:2937: checking for be_app in -lbe" >&5
2937 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2939   echo $ac_n "(cached) $ac_c" 1>&6
2940 else
2941   ac_save_LIBS="$LIBS"
2942 LIBS="-lbe -lroot -lnet $LIBS"
2943 cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 /* Override any gcc2 internal prototype to avoid an error.  */
2947 /* We use char because int might match the return type of a gcc2
2948     builtin and then its argument prototype would still apply.  */
2949 char be_app();
2950
2951 int main() {
2952 be_app()
2953 ; return 0; }
2954 EOF
2955 if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956   rm -rf conftest*
2957   eval "ac_cv_lib_$ac_lib_var=yes"
2958 else
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   eval "ac_cv_lib_$ac_lib_var=no"
2963 fi
2964 rm -f conftest*
2965 LIBS="$ac_save_LIBS"
2966
2967 fi
2968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2969   echo "$ac_t""yes" 1>&6
2970   LIBS="$LIBS -lbe -lroot -lnet"
2971 else
2972   echo "$ac_t""no" 1>&6
2973 :
2974 fi
2975
2976
2977 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2978 echo "configure:2979: checking for Cygwin environment" >&5
2979 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2980   echo $ac_n "(cached) $ac_c" 1>&6
2981 else
2982   cat > conftest.$ac_ext <<EOF
2983 #line 2984 "configure"
2984 #include "confdefs.h"
2985
2986 int main() {
2987
2988 #ifndef __CYGWIN__
2989 #define __CYGWIN__ __CYGWIN32__
2990 #endif
2991 return __CYGWIN__;
2992 ; return 0; }
2993 EOF
2994 if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2995   rm -rf conftest*
2996   ac_cv_cygwin=yes
2997 else
2998   echo "configure: failed program was:" >&5
2999   cat conftest.$ac_ext >&5
3000   rm -rf conftest*
3001   ac_cv_cygwin=no
3002 fi
3003 rm -f conftest*
3004 rm -f conftest*
3005 fi
3006
3007 echo "$ac_t""$ac_cv_cygwin" 1>&6
3008 CYGWIN=
3009 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3010 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3011 echo "configure:3012: checking for mingw32 environment" >&5
3012 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3013   echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015   cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018
3019 int main() {
3020 return __MINGW32__;
3021 ; return 0; }
3022 EOF
3023 if { (eval echo configure:3024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3024   rm -rf conftest*
3025   ac_cv_mingw32=yes
3026 else
3027   echo "configure: failed program was:" >&5
3028   cat conftest.$ac_ext >&5
3029   rm -rf conftest*
3030   ac_cv_mingw32=no
3031 fi
3032 rm -f conftest*
3033 rm -f conftest*
3034 fi
3035
3036 echo "$ac_t""$ac_cv_mingw32" 1>&6
3037 MINGW32=
3038 test "$ac_cv_mingw32" = yes && MINGW32=yes
3039
3040
3041 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3042 echo "configure:3043: checking for executable suffix" >&5
3043 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3047   ac_cv_exeext=.exe
3048 else
3049   rm -f conftest*
3050   echo 'int main () { return 0; }' > conftest.$ac_ext
3051   ac_cv_exeext=
3052   if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3053     for file in conftest.*; do
3054       case $file in
3055       *.c | *.o | *.obj) ;;
3056       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3057       esac
3058     done
3059   else
3060     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3061   fi
3062   rm -f conftest*
3063   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3064 fi
3065 fi
3066
3067 EXEEXT=""
3068 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3069 echo "$ac_t""${ac_cv_exeext}" 1>&6
3070 ac_exeext=$EXEEXT
3071
3072 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3073 echo "configure:3074: checking for object suffix" >&5
3074 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3075   echo $ac_n "(cached) $ac_c" 1>&6
3076 else
3077   rm -f conftest*
3078 echo 'int i = 1;' > conftest.$ac_ext
3079 if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3080   for ac_file in conftest.*; do
3081     case $ac_file in
3082     *.c) ;;
3083     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3084     esac
3085   done
3086 else
3087   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3088 fi
3089 rm -f conftest*
3090 fi
3091
3092 echo "$ac_t""$ac_cv_objext" 1>&6
3093 OBJEXT=$ac_cv_objext
3094 ac_objext=$ac_cv_objext
3095
3096
3097 cat >> confdefs.h <<EOF
3098 #define EXEEXT "${EXEEXT}"
3099 EOF
3100
3101
3102
3103
3104
3105 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3106 echo "configure:3107: checking for ${CC-cc} option to accept ANSI C" >&5
3107 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   am_cv_prog_cc_stdc=no
3111 ac_save_CC="$CC"
3112 # Don't try gcc -ansi; that turns off useful extensions and
3113 # breaks some systems' header files.
3114 # AIX                   -qlanglvl=ansi
3115 # Ultrix and OSF/1      -std1
3116 # HP-UX                 -Aa -D_HPUX_SOURCE
3117 # SVR4                  -Xc -D__EXTENSIONS__
3118 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3119 do
3120   CC="$ac_save_CC $ac_arg"
3121   cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <stdarg.h>
3125 #include <stdio.h>
3126 #include <sys/types.h>
3127 #include <sys/stat.h>
3128 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3129 struct buf { int x; };
3130 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3131 static char *e (p, i)
3132      char **p;
3133      int i;
3134 {
3135   return p[i];
3136 }
3137 static char *f (char * (*g) (char **, int), char **p, ...)
3138 {
3139   char *s;
3140   va_list v;
3141   va_start (v,p);
3142   s = g (p, va_arg (v,int));
3143   va_end (v);
3144   return s;
3145 }
3146 int test (int i, double x);
3147 struct s1 {int (*f) (int a);};
3148 struct s2 {int (*f) (double a);};
3149 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3150 int argc;
3151 char **argv;
3152
3153 int main() {
3154
3155 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3156
3157 ; return 0; }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3160   rm -rf conftest*
3161   am_cv_prog_cc_stdc="$ac_arg"; break
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165 fi
3166 rm -f conftest*
3167 done
3168 CC="$ac_save_CC"
3169
3170 fi
3171
3172 if test -z "$am_cv_prog_cc_stdc"; then
3173   echo "$ac_t""none needed" 1>&6
3174 else
3175   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3176 fi
3177 case "x$am_cv_prog_cc_stdc" in
3178   x|xno) ;;
3179   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3180 esac
3181
3182 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3183         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
3184 fi
3185
3186
3187 # test for make depend flag
3188 OL_MKDEP=
3189 OL_MKDEP_FLAGS=
3190 if test -z "${MKDEP}"; then
3191         OL_MKDEP="${CC-cc}"
3192         if test -z "${MKDEP_FLAGS}"; then
3193                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3194 echo "configure:3195: checking for ${OL_MKDEP} depend flag" >&5
3195 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3196   echo $ac_n "(cached) $ac_c" 1>&6
3197 else
3198   
3199                         ol_cv_mkdep=no
3200                         for flag in "-M" "-xM"; do
3201                                 cat > conftest.c <<EOF
3202  noCode;
3203 EOF
3204                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3205                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3206                                 then
3207                                         if test ! -f conftest."${ac_object}" ; then
3208                                                 ol_cv_mkdep=$flag
3209                                                 OL_MKDEP_FLAGS="$flag"
3210                                                 break
3211                                         fi
3212                                 fi
3213                         done
3214                         rm -f conftest*
3215                 
3216 fi
3217
3218 echo "$ac_t""$ol_cv_mkdep" 1>&6
3219         else
3220                 cc_cv_mkdep=yes
3221                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3222         fi
3223 else
3224         cc_cv_mkdep=yes
3225         OL_MKDEP="${MKDEP}"
3226         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3227 fi
3228
3229
3230
3231 if test "${ol_cv_mkdep}" = no ; then
3232         # this will soon become an error
3233         echo "configure: warning: do not know how to generate dependencies" 1>&2
3234 fi
3235
3236
3237
3238 echo $ac_n "checking for socket""... $ac_c" 1>&6
3239 echo "configure:3240: checking for socket" >&5
3240 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 /* System header to define __stub macros and hopefully few prototypes,
3247     which can conflict with char socket(); below.  */
3248 #include <assert.h>
3249 /* Override any gcc2 internal prototype to avoid an error.  */
3250 /* We use char because int might match the return type of a gcc2
3251     builtin and then its argument prototype would still apply.  */
3252 char socket();
3253
3254 int main() {
3255
3256 /* The GNU C library defines this for functions which it implements
3257     to always fail with ENOSYS.  Some functions are actually named
3258     something starting with __ and the normal name is an alias.  */
3259 #if defined (__stub_socket) || defined (__stub___socket)
3260 choke me
3261 #else
3262 socket();
3263 #endif
3264
3265 ; return 0; }
3266 EOF
3267 if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3268   rm -rf conftest*
3269   eval "ac_cv_func_socket=yes"
3270 else
3271   echo "configure: failed program was:" >&5
3272   cat conftest.$ac_ext >&5
3273   rm -rf conftest*
3274   eval "ac_cv_func_socket=no"
3275 fi
3276 rm -f conftest*
3277 fi
3278
3279 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3280   echo "$ac_t""yes" 1>&6
3281   :
3282 else
3283   echo "$ac_t""no" 1>&6
3284         
3285         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3286 echo "configure:3287: checking for main in -lsocket" >&5
3287 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3288 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   ac_save_LIBS="$LIBS"
3292 LIBS="-lsocket  $LIBS"
3293 cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296
3297 int main() {
3298 main()
3299 ; return 0; }
3300 EOF
3301 if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3302   rm -rf conftest*
3303   eval "ac_cv_lib_$ac_lib_var=yes"
3304 else
3305   echo "configure: failed program was:" >&5
3306   cat conftest.$ac_ext >&5
3307   rm -rf conftest*
3308   eval "ac_cv_lib_$ac_lib_var=no"
3309 fi
3310 rm -f conftest*
3311 LIBS="$ac_save_LIBS"
3312
3313 fi
3314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3315   echo "$ac_t""yes" 1>&6
3316     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3317     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3318   cat >> confdefs.h <<EOF
3319 #define $ac_tr_lib 1
3320 EOF
3321
3322   LIBS="-lsocket $LIBS"
3323
3324 else
3325   echo "$ac_t""no" 1>&6
3326 fi
3327
3328         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3329 echo "configure:3330: checking for main in -lnet" >&5
3330 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3331 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3332   echo $ac_n "(cached) $ac_c" 1>&6
3333 else
3334   ac_save_LIBS="$LIBS"
3335 LIBS="-lnet  $LIBS"
3336 cat > conftest.$ac_ext <<EOF
3337 #line 3338 "configure"
3338 #include "confdefs.h"
3339
3340 int main() {
3341 main()
3342 ; return 0; }
3343 EOF
3344 if { (eval echo configure:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3345   rm -rf conftest*
3346   eval "ac_cv_lib_$ac_lib_var=yes"
3347 else
3348   echo "configure: failed program was:" >&5
3349   cat conftest.$ac_ext >&5
3350   rm -rf conftest*
3351   eval "ac_cv_lib_$ac_lib_var=no"
3352 fi
3353 rm -f conftest*
3354 LIBS="$ac_save_LIBS"
3355
3356 fi
3357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3358   echo "$ac_t""yes" 1>&6
3359     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3361   cat >> confdefs.h <<EOF
3362 #define $ac_tr_lib 1
3363 EOF
3364
3365   LIBS="-lnet $LIBS"
3366
3367 else
3368   echo "$ac_t""no" 1>&6
3369 fi
3370
3371         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3372 echo "configure:3373: checking for socket in -lnet" >&5
3373 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3374 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   ac_save_LIBS="$LIBS"
3378 LIBS="-lnet  $LIBS"
3379 cat > conftest.$ac_ext <<EOF
3380 #line 3381 "configure"
3381 #include "confdefs.h"
3382 /* Override any gcc2 internal prototype to avoid an error.  */
3383 /* We use char because int might match the return type of a gcc2
3384     builtin and then its argument prototype would still apply.  */
3385 char socket();
3386
3387 int main() {
3388 socket()
3389 ; return 0; }
3390 EOF
3391 if { (eval echo configure:3392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392   rm -rf conftest*
3393   eval "ac_cv_lib_$ac_lib_var=yes"
3394 else
3395   echo "configure: failed program was:" >&5
3396   cat conftest.$ac_ext >&5
3397   rm -rf conftest*
3398   eval "ac_cv_lib_$ac_lib_var=no"
3399 fi
3400 rm -f conftest*
3401 LIBS="$ac_save_LIBS"
3402
3403 fi
3404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3405   echo "$ac_t""yes" 1>&6
3406     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3407     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3408   cat >> confdefs.h <<EOF
3409 #define $ac_tr_lib 1
3410 EOF
3411
3412   LIBS="-lnet $LIBS"
3413
3414 else
3415   echo "$ac_t""no" 1>&6
3416 fi
3417
3418         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3419 echo "configure:3420: checking for main in -lnsl_s" >&5
3420 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   ac_save_LIBS="$LIBS"
3425 LIBS="-lnsl_s  $LIBS"
3426 cat > conftest.$ac_ext <<EOF
3427 #line 3428 "configure"
3428 #include "confdefs.h"
3429
3430 int main() {
3431 main()
3432 ; return 0; }
3433 EOF
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3435   rm -rf conftest*
3436   eval "ac_cv_lib_$ac_lib_var=yes"
3437 else
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_lib_$ac_lib_var=no"
3442 fi
3443 rm -f conftest*
3444 LIBS="$ac_save_LIBS"
3445
3446 fi
3447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3450     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3451   cat >> confdefs.h <<EOF
3452 #define $ac_tr_lib 1
3453 EOF
3454
3455   LIBS="-lnsl_s $LIBS"
3456
3457 else
3458   echo "$ac_t""no" 1>&6
3459 fi
3460
3461         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3462 echo "configure:3463: checking for main in -lnsl" >&5
3463 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3464 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3465   echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467   ac_save_LIBS="$LIBS"
3468 LIBS="-lnsl  $LIBS"
3469 cat > conftest.$ac_ext <<EOF
3470 #line 3471 "configure"
3471 #include "confdefs.h"
3472
3473 int main() {
3474 main()
3475 ; return 0; }
3476 EOF
3477 if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3478   rm -rf conftest*
3479   eval "ac_cv_lib_$ac_lib_var=yes"
3480 else
3481   echo "configure: failed program was:" >&5
3482   cat conftest.$ac_ext >&5
3483   rm -rf conftest*
3484   eval "ac_cv_lib_$ac_lib_var=no"
3485 fi
3486 rm -f conftest*
3487 LIBS="$ac_save_LIBS"
3488
3489 fi
3490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3491   echo "$ac_t""yes" 1>&6
3492     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3493     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3494   cat >> confdefs.h <<EOF
3495 #define $ac_tr_lib 1
3496 EOF
3497
3498   LIBS="-lnsl $LIBS"
3499
3500 else
3501   echo "$ac_t""no" 1>&6
3502 fi
3503
3504         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3505 echo "configure:3506: checking for socket in -linet" >&5
3506 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   ac_save_LIBS="$LIBS"
3511 LIBS="-linet  $LIBS"
3512 cat > conftest.$ac_ext <<EOF
3513 #line 3514 "configure"
3514 #include "confdefs.h"
3515 /* Override any gcc2 internal prototype to avoid an error.  */
3516 /* We use char because int might match the return type of a gcc2
3517     builtin and then its argument prototype would still apply.  */
3518 char socket();
3519
3520 int main() {
3521 socket()
3522 ; return 0; }
3523 EOF
3524 if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3525   rm -rf conftest*
3526   eval "ac_cv_lib_$ac_lib_var=yes"
3527 else
3528   echo "configure: failed program was:" >&5
3529   cat conftest.$ac_ext >&5
3530   rm -rf conftest*
3531   eval "ac_cv_lib_$ac_lib_var=no"
3532 fi
3533 rm -f conftest*
3534 LIBS="$ac_save_LIBS"
3535
3536 fi
3537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3538   echo "$ac_t""yes" 1>&6
3539     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3540     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3541   cat >> confdefs.h <<EOF
3542 #define $ac_tr_lib 1
3543 EOF
3544
3545   LIBS="-linet $LIBS"
3546
3547 else
3548   echo "$ac_t""no" 1>&6
3549 fi
3550
3551         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3552 echo "configure:3553: checking for main in -lgen" >&5
3553 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3554 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   ac_save_LIBS="$LIBS"
3558 LIBS="-lgen  $LIBS"
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562
3563 int main() {
3564 main()
3565 ; return 0; }
3566 EOF
3567 if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3568   rm -rf conftest*
3569   eval "ac_cv_lib_$ac_lib_var=yes"
3570 else
3571   echo "configure: failed program was:" >&5
3572   cat conftest.$ac_ext >&5
3573   rm -rf conftest*
3574   eval "ac_cv_lib_$ac_lib_var=no"
3575 fi
3576 rm -f conftest*
3577 LIBS="$ac_save_LIBS"
3578
3579 fi
3580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3581   echo "$ac_t""yes" 1>&6
3582     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3583     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3584   cat >> confdefs.h <<EOF
3585 #define $ac_tr_lib 1
3586 EOF
3587
3588   LIBS="-lgen $LIBS"
3589
3590 else
3591   echo "$ac_t""no" 1>&6
3592 fi
3593
3594
3595 fi
3596
3597
3598 for ac_func in res_search
3599 do
3600 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3601 echo "configure:3602: checking for $ac_func" >&5
3602 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3603   echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605   cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 /* System header to define __stub macros and hopefully few prototypes,
3609     which can conflict with char $ac_func(); below.  */
3610 #include <assert.h>
3611 /* Override any gcc2 internal prototype to avoid an error.  */
3612 /* We use char because int might match the return type of a gcc2
3613     builtin and then its argument prototype would still apply.  */
3614 char $ac_func();
3615
3616 int main() {
3617
3618 /* The GNU C library defines this for functions which it implements
3619     to always fail with ENOSYS.  Some functions are actually named
3620     something starting with __ and the normal name is an alias.  */
3621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3622 choke me
3623 #else
3624 $ac_func();
3625 #endif
3626
3627 ; return 0; }
3628 EOF
3629 if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3630   rm -rf conftest*
3631   eval "ac_cv_func_$ac_func=yes"
3632 else
3633   echo "configure: failed program was:" >&5
3634   cat conftest.$ac_ext >&5
3635   rm -rf conftest*
3636   eval "ac_cv_func_$ac_func=no"
3637 fi
3638 rm -f conftest*
3639 fi
3640
3641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3642   echo "$ac_t""yes" 1>&6
3643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3644   cat >> confdefs.h <<EOF
3645 #define $ac_tr_func 1
3646 EOF
3647  
3648 else
3649   echo "$ac_t""no" 1>&6
3650 fi
3651 done
3652
3653 if test $ac_cv_func_res_search = "no" ; then 
3654         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3655 echo "configure:3656: checking for res_search in -lbind" >&5
3656 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3657 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3658   echo $ac_n "(cached) $ac_c" 1>&6
3659 else
3660   ac_save_LIBS="$LIBS"
3661 LIBS="-lbind  $LIBS"
3662 cat > conftest.$ac_ext <<EOF
3663 #line 3664 "configure"
3664 #include "confdefs.h"
3665 /* Override any gcc2 internal prototype to avoid an error.  */
3666 /* We use char because int might match the return type of a gcc2
3667     builtin and then its argument prototype would still apply.  */
3668 char res_search();
3669
3670 int main() {
3671 res_search()
3672 ; return 0; }
3673 EOF
3674 if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3675   rm -rf conftest*
3676   eval "ac_cv_lib_$ac_lib_var=yes"
3677 else
3678   echo "configure: failed program was:" >&5
3679   cat conftest.$ac_ext >&5
3680   rm -rf conftest*
3681   eval "ac_cv_lib_$ac_lib_var=no"
3682 fi
3683 rm -f conftest*
3684 LIBS="$ac_save_LIBS"
3685
3686 fi
3687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3688   echo "$ac_t""yes" 1>&6
3689     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3690     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3691   cat >> confdefs.h <<EOF
3692 #define $ac_tr_lib 1
3693 EOF
3694
3695   LIBS="-lbind $LIBS"
3696
3697 else
3698   echo "$ac_t""no" 1>&6
3699 fi
3700
3701         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3702                 cat >> confdefs.h <<\EOF
3703 #define HAVE_RES_SEARCH 1
3704 EOF
3705
3706         else
3707                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3708 echo "configure:3709: checking for res_search in -lresolv" >&5
3709 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3710 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3711   echo $ac_n "(cached) $ac_c" 1>&6
3712 else
3713   ac_save_LIBS="$LIBS"
3714 LIBS="-lresolv  $LIBS"
3715 cat > conftest.$ac_ext <<EOF
3716 #line 3717 "configure"
3717 #include "confdefs.h"
3718 /* Override any gcc2 internal prototype to avoid an error.  */
3719 /* We use char because int might match the return type of a gcc2
3720     builtin and then its argument prototype would still apply.  */
3721 char res_search();
3722
3723 int main() {
3724 res_search()
3725 ; return 0; }
3726 EOF
3727 if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3728   rm -rf conftest*
3729   eval "ac_cv_lib_$ac_lib_var=yes"
3730 else
3731   echo "configure: failed program was:" >&5
3732   cat conftest.$ac_ext >&5
3733   rm -rf conftest*
3734   eval "ac_cv_lib_$ac_lib_var=no"
3735 fi
3736 rm -f conftest*
3737 LIBS="$ac_save_LIBS"
3738
3739 fi
3740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3741   echo "$ac_t""yes" 1>&6
3742     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3743     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3744   cat >> confdefs.h <<EOF
3745 #define $ac_tr_lib 1
3746 EOF
3747
3748   LIBS="-lresolv $LIBS"
3749
3750 else
3751   echo "$ac_t""no" 1>&6
3752 fi
3753
3754                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3755                         cat >> confdefs.h <<\EOF
3756 #define HAVE_RES_SEARCH 1
3757 EOF
3758
3759                 fi
3760         fi
3761 fi
3762
3763 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3764 echo "configure:3765: checking for sigset in -lV3" >&5
3765 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3767   echo $ac_n "(cached) $ac_c" 1>&6
3768 else
3769   ac_save_LIBS="$LIBS"
3770 LIBS="-lV3  $LIBS"
3771 cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774 /* Override any gcc2 internal prototype to avoid an error.  */
3775 /* We use char because int might match the return type of a gcc2
3776     builtin and then its argument prototype would still apply.  */
3777 char sigset();
3778
3779 int main() {
3780 sigset()
3781 ; return 0; }
3782 EOF
3783 if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3784   rm -rf conftest*
3785   eval "ac_cv_lib_$ac_lib_var=yes"
3786 else
3787   echo "configure: failed program was:" >&5
3788   cat conftest.$ac_ext >&5
3789   rm -rf conftest*
3790   eval "ac_cv_lib_$ac_lib_var=no"
3791 fi
3792 rm -f conftest*
3793 LIBS="$ac_save_LIBS"
3794
3795 fi
3796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3797   echo "$ac_t""yes" 1>&6
3798     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3800   cat >> confdefs.h <<EOF
3801 #define $ac_tr_lib 1
3802 EOF
3803
3804   LIBS="-lV3 $LIBS"
3805
3806 else
3807   echo "$ac_t""no" 1>&6
3808 fi
3809
3810
3811 for ac_hdr in regex.h 
3812 do
3813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3815 echo "configure:3816: checking for $ac_hdr" >&5
3816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822 #include <$ac_hdr>
3823 EOF
3824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3825 { (eval echo configure:3826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3827 if test -z "$ac_err"; then
3828   rm -rf conftest*
3829   eval "ac_cv_header_$ac_safe=yes"
3830 else
3831   echo "$ac_err" >&5
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -rf conftest*
3835   eval "ac_cv_header_$ac_safe=no"
3836 fi
3837 rm -f conftest*
3838 fi
3839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3840   echo "$ac_t""yes" 1>&6
3841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3842   cat >> confdefs.h <<EOF
3843 #define $ac_tr_hdr 1
3844 EOF
3845  
3846 else
3847   echo "$ac_t""no" 1>&6
3848 fi
3849 done
3850
3851 if test "$ac_cv_header_regex_h" != yes ; then
3852         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
3853 fi
3854 echo $ac_n "checking for regfree""... $ac_c" 1>&6
3855 echo "configure:3856: checking for regfree" >&5
3856 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859   cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 /* System header to define __stub macros and hopefully few prototypes,
3863     which can conflict with char regfree(); below.  */
3864 #include <assert.h>
3865 /* Override any gcc2 internal prototype to avoid an error.  */
3866 /* We use char because int might match the return type of a gcc2
3867     builtin and then its argument prototype would still apply.  */
3868 char regfree();
3869
3870 int main() {
3871
3872 /* The GNU C library defines this for functions which it implements
3873     to always fail with ENOSYS.  Some functions are actually named
3874     something starting with __ and the normal name is an alias.  */
3875 #if defined (__stub_regfree) || defined (__stub___regfree)
3876 choke me
3877 #else
3878 regfree();
3879 #endif
3880
3881 ; return 0; }
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3884   rm -rf conftest*
3885   eval "ac_cv_func_regfree=yes"
3886 else
3887   echo "configure: failed program was:" >&5
3888   cat conftest.$ac_ext >&5
3889   rm -rf conftest*
3890   eval "ac_cv_func_regfree=no"
3891 fi
3892 rm -f conftest*
3893 fi
3894
3895 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
3896   echo "$ac_t""yes" 1>&6
3897   :
3898 else
3899   echo "$ac_t""no" 1>&6
3900 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
3901 fi
3902
3903
3904
3905 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
3906 echo "configure:3907: checking for compatible POSIX regex" >&5
3907 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   
3911         if test "$cross_compiling" = yes; then
3912   ol_cv_c_posix_regex=cross
3913 else
3914   cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917
3918 #include <sys/types.h>
3919 #include <regex.h>
3920 static char *pattern, *string;
3921 main()
3922 {
3923         int rc;
3924         regex_t re;
3925
3926         pattern = "^A";
3927
3928         if(regcomp(&re, pattern, 0)) {
3929                 return -1;
3930         }
3931         
3932         string = "ALL MATCH";
3933         
3934         rc = regexec(&re, string, 0, (void*)0, 0);
3935
3936         regfree(&re);
3937
3938         return rc;
3939 }
3940 EOF
3941 if { (eval echo configure:3942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3942 then
3943   ol_cv_c_posix_regex=yes
3944 else
3945   echo "configure: failed program was:" >&5
3946   cat conftest.$ac_ext >&5
3947   rm -fr conftest*
3948   ol_cv_c_posix_regex=no
3949 fi
3950 rm -fr conftest*
3951 fi
3952
3953 fi
3954
3955 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
3956
3957 if test "$ol_cv_c_posix_regex" = no ; then
3958         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
3959 fi
3960
3961 echo $ac_n "checking for select""... $ac_c" 1>&6
3962 echo "configure:3963: checking for select" >&5
3963 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3964   echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966   cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 /* System header to define __stub macros and hopefully few prototypes,
3970     which can conflict with char select(); below.  */
3971 #include <assert.h>
3972 /* Override any gcc2 internal prototype to avoid an error.  */
3973 /* We use char because int might match the return type of a gcc2
3974     builtin and then its argument prototype would still apply.  */
3975 char select();
3976
3977 int main() {
3978
3979 /* The GNU C library defines this for functions which it implements
3980     to always fail with ENOSYS.  Some functions are actually named
3981     something starting with __ and the normal name is an alias.  */
3982 #if defined (__stub_select) || defined (__stub___select)
3983 choke me
3984 #else
3985 select();
3986 #endif
3987
3988 ; return 0; }
3989 EOF
3990 if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3991   rm -rf conftest*
3992   eval "ac_cv_func_select=yes"
3993 else
3994   echo "configure: failed program was:" >&5
3995   cat conftest.$ac_ext >&5
3996   rm -rf conftest*
3997   eval "ac_cv_func_select=no"
3998 fi
3999 rm -f conftest*
4000 fi
4001
4002 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4003   echo "$ac_t""yes" 1>&6
4004   :
4005 else
4006   echo "$ac_t""no" 1>&6
4007 { echo "configure: error: select() required." 1>&2; exit 1; }
4008 fi
4009
4010
4011 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4012 echo "configure:4013: checking types of arguments for select()" >&5
4013  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
4014   echo $ac_n "(cached) $ac_c" 1>&6
4015 else
4016    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
4017   echo $ac_n "(cached) $ac_c" 1>&6
4018 else
4019     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
4020   echo $ac_n "(cached) $ac_c" 1>&6
4021 else
4022      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4023      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4024       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4025        cat > conftest.$ac_ext <<EOF
4026 #line 4027 "configure"
4027 #include "confdefs.h"
4028 #ifdef HAVE_SYS_TYPES_H
4029 #include <sys/types.h>
4030 #endif
4031 #ifdef HAVE_SYS_TIME_H
4032 #include <sys/time.h>
4033 #endif
4034 #ifdef HAVE_SYS_SELECT_H
4035 #include <sys/select.h>
4036 #endif
4037 #ifdef HAVE_SYS_SOCKET_H
4038 #include <sys/socket.h>
4039 #endif
4040 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);
4041 int main() {
4042
4043 ; return 0; }
4044 EOF
4045 if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4046   rm -rf conftest*
4047           ac_not_found=no ; break 3
4048 else
4049   echo "configure: failed program was:" >&5
4050   cat conftest.$ac_ext >&5
4051   rm -rf conftest*
4052   ac_not_found=yes
4053 fi
4054 rm -f conftest*
4055       done
4056      done
4057     done
4058    
4059 fi
4060   
4061 fi
4062  
4063 fi
4064  if test "$ac_not_found" = yes; then
4065   ac_cv_func_select_arg1=int 
4066   ac_cv_func_select_arg234='int *' 
4067   ac_cv_func_select_arg5='struct timeval *'
4068  fi
4069  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4070  cat >> confdefs.h <<EOF
4071 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4072 EOF
4073
4074  cat >> confdefs.h <<EOF
4075 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4076 EOF
4077
4078  cat >> confdefs.h <<EOF
4079 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4080 EOF
4081
4082
4083
4084 # ISODE tests
4085 ol_link_isode=no
4086 if test $ol_enable_ldapd != no ; then
4087         echo "configure: warning: ldapd support deprecated.  Manual intervention required." 1>&2
4088
4089                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4090 echo "configure:4091: checking for main in -lxtpp" >&5
4091 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
4092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4093   echo $ac_n "(cached) $ac_c" 1>&6
4094 else
4095   ac_save_LIBS="$LIBS"
4096 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4097 cat > conftest.$ac_ext <<EOF
4098 #line 4099 "configure"
4099 #include "confdefs.h"
4100
4101 int main() {
4102 main()
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106   rm -rf conftest*
4107   eval "ac_cv_lib_$ac_lib_var=yes"
4108 else
4109   echo "configure: failed program was:" >&5
4110   cat conftest.$ac_ext >&5
4111   rm -rf conftest*
4112   eval "ac_cv_lib_$ac_lib_var=no"
4113 fi
4114 rm -f conftest*
4115 LIBS="$ac_save_LIBS"
4116
4117 fi
4118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4119   echo "$ac_t""yes" 1>&6
4120   
4121                 ol_link_isode=yes
4122                 cat >> confdefs.h <<\EOF
4123 #define HAVE_XTPP 1
4124 EOF
4125
4126                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4127                 
4128 else
4129   echo "$ac_t""no" 1>&6
4130 :
4131 fi
4132
4133         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4134 echo "configure:4135: checking for main in -ldsap" >&5
4135 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
4136 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   ac_save_LIBS="$LIBS"
4140 LIBS="-ldsap -lisode $LIBS"
4141 cat > conftest.$ac_ext <<EOF
4142 #line 4143 "configure"
4143 #include "confdefs.h"
4144
4145 int main() {
4146 main()
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4150   rm -rf conftest*
4151   eval "ac_cv_lib_$ac_lib_var=yes"
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   eval "ac_cv_lib_$ac_lib_var=no"
4157 fi
4158 rm -f conftest*
4159 LIBS="$ac_save_LIBS"
4160
4161 fi
4162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4163   echo "$ac_t""yes" 1>&6
4164   
4165                 ol_link_isode=yes
4166                 cat >> confdefs.h <<\EOF
4167 #define HAVE_DSAP 1
4168 EOF
4169
4170                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4171                 
4172 else
4173   echo "$ac_t""no" 1>&6
4174 :
4175 fi
4176
4177         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4178 echo "configure:4179: checking for main in -lisode" >&5
4179 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
4180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4181   echo $ac_n "(cached) $ac_c" 1>&6
4182 else
4183   ac_save_LIBS="$LIBS"
4184 LIBS="-lisode  $LIBS"
4185 cat > conftest.$ac_ext <<EOF
4186 #line 4187 "configure"
4187 #include "confdefs.h"
4188
4189 int main() {
4190 main()
4191 ; return 0; }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4194   rm -rf conftest*
4195   eval "ac_cv_lib_$ac_lib_var=yes"
4196 else
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   eval "ac_cv_lib_$ac_lib_var=no"
4201 fi
4202 rm -f conftest*
4203 LIBS="$ac_save_LIBS"
4204
4205 fi
4206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4207   echo "$ac_t""yes" 1>&6
4208   
4209                 ol_link_isode=yes
4210                 cat >> confdefs.h <<\EOF
4211 #define HAVE_ISODE 1
4212 EOF
4213
4214                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4215                 
4216 else
4217   echo "$ac_t""no" 1>&6
4218 :
4219 fi
4220
4221 fi
4222
4223 if test $ol_link_isode != no; then
4224         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4225 echo "configure:4226: checking for main in -lpp" >&5
4226 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
4227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4228   echo $ac_n "(cached) $ac_c" 1>&6
4229 else
4230   ac_save_LIBS="$LIBS"
4231 LIBS="-lpp  $LIBS"
4232 cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4235
4236 int main() {
4237 main()
4238 ; return 0; }
4239 EOF
4240 if { (eval echo configure:4241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4241   rm -rf conftest*
4242   eval "ac_cv_lib_$ac_lib_var=yes"
4243 else
4244   echo "configure: failed program was:" >&5
4245   cat conftest.$ac_ext >&5
4246   rm -rf conftest*
4247   eval "ac_cv_lib_$ac_lib_var=no"
4248 fi
4249 rm -f conftest*
4250 LIBS="$ac_save_LIBS"
4251
4252 fi
4253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4254   echo "$ac_t""yes" 1>&6
4255   
4256                 cat >> confdefs.h <<\EOF
4257 #define HAVE_PP 1
4258 EOF
4259
4260                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4261                 
4262 else
4263   echo "$ac_t""no" 1>&6
4264 :
4265 fi
4266
4267
4268         # Extract the first word of "pepsy", so it can be a program name with args.
4269 set dummy pepsy; ac_word=$2
4270 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4271 echo "configure:4272: checking for $ac_word" >&5
4272 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
4273   echo $ac_n "(cached) $ac_c" 1>&6
4274 else
4275   case "$PEPSY" in
4276   /*)
4277   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4278   ;;
4279   ?:/*)                  
4280   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4281   ;;
4282   *)
4283   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4284   ac_dummy="$PATH"
4285   for ac_dir in $ac_dummy; do 
4286     test -z "$ac_dir" && ac_dir=.
4287     if test -f $ac_dir/$ac_word; then
4288       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4289       break
4290     fi
4291   done
4292   IFS="$ac_save_ifs"
4293   ;;
4294 esac
4295 fi
4296 PEPSY="$ac_cv_path_PEPSY"
4297 if test -n "$PEPSY"; then
4298   echo "$ac_t""$PEPSY" 1>&6
4299 else
4300   echo "$ac_t""no" 1>&6
4301 fi
4302
4303 fi
4304
4305 ol_link_kerberos=no
4306
4307 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4308         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4309 do
4310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4312 echo "configure:4313: checking for $ac_hdr" >&5
4313 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4314   echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316   cat > conftest.$ac_ext <<EOF
4317 #line 4318 "configure"
4318 #include "confdefs.h"
4319 #include <$ac_hdr>
4320 EOF
4321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4322 { (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4324 if test -z "$ac_err"; then
4325   rm -rf conftest*
4326   eval "ac_cv_header_$ac_safe=yes"
4327 else
4328   echo "$ac_err" >&5
4329   echo "configure: failed program was:" >&5
4330   cat conftest.$ac_ext >&5
4331   rm -rf conftest*
4332   eval "ac_cv_header_$ac_safe=no"
4333 fi
4334 rm -f conftest*
4335 fi
4336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4337   echo "$ac_t""yes" 1>&6
4338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4339   cat >> confdefs.h <<EOF
4340 #define $ac_tr_hdr 1
4341 EOF
4342  
4343 else
4344   echo "$ac_t""no" 1>&6
4345 fi
4346 done
4347
4348
4349         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4350                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4351 echo "configure:4352: checking for main in -lkrb4" >&5
4352 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
4353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   ac_save_LIBS="$LIBS"
4357 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4358 cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361
4362 int main() {
4363 main()
4364 ; return 0; }
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4367   rm -rf conftest*
4368   eval "ac_cv_lib_$ac_lib_var=yes"
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   eval "ac_cv_lib_$ac_lib_var=no"
4374 fi
4375 rm -f conftest*
4376 LIBS="$ac_save_LIBS"
4377
4378 fi
4379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4380   echo "$ac_t""yes" 1>&6
4381   have_k5=yes
4382 else
4383   echo "$ac_t""no" 1>&6
4384 have_k5=no
4385 fi
4386
4387
4388                 if test $have_k5 = yes ; then
4389                         ol_with_kerberos=found
4390                         ol_link_kerberos=yes
4391
4392                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4393
4394                         LIBS="$KRB_LIBS $LIBS"
4395
4396                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4397 echo "configure:4398: checking for des_debug in Kerberos libraries" >&5
4398 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   
4402                                                                 save_LIBS="$LIBS"
4403                                 LIBS="$KRB_LIBS $LIBS"
4404                                 cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407
4408 #include <kerberosIV/krb.h>
4409 #include <kerberosIV/des.h>
4410 extern int des_debug;
4411
4412 int main() {
4413
4414 des_debug = 1;
4415
4416 ; return 0; }
4417 EOF
4418 if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4419   rm -rf conftest*
4420   ol_cv_var_des_debug=yes
4421 else
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -rf conftest*
4425   ol_cv_var_des_debug=no
4426 fi
4427 rm -f conftest*
4428                                                                 LIBS="$save_LIBS"
4429                         
4430 fi
4431
4432 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4433
4434                         if test $ol_cv_var_des_debug = yes ; then
4435                                 cat >> confdefs.h <<\EOF
4436 #define HAVE_DES_DEBUG 1
4437 EOF
4438
4439                         fi
4440
4441                         LIBS="$save_LIBS"
4442                 fi
4443         fi
4444 fi
4445
4446 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4447         for ac_hdr in krb.h des.h
4448 do
4449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4451 echo "configure:4452: checking for $ac_hdr" >&5
4452 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4453   echo $ac_n "(cached) $ac_c" 1>&6
4454 else
4455   cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 #include <$ac_hdr>
4459 EOF
4460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4461 { (eval echo configure:4462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4463 if test -z "$ac_err"; then
4464   rm -rf conftest*
4465   eval "ac_cv_header_$ac_safe=yes"
4466 else
4467   echo "$ac_err" >&5
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470   rm -rf conftest*
4471   eval "ac_cv_header_$ac_safe=no"
4472 fi
4473 rm -f conftest*
4474 fi
4475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4476   echo "$ac_t""yes" 1>&6
4477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4478   cat >> confdefs.h <<EOF
4479 #define $ac_tr_hdr 1
4480 EOF
4481  
4482 else
4483   echo "$ac_t""no" 1>&6
4484 fi
4485 done
4486
4487
4488         if test $ac_cv_header_krb_h = yes ; then
4489                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4490 echo "configure:4491: checking for main in -lkrb" >&5
4491 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4493   echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495   ac_save_LIBS="$LIBS"
4496 LIBS="-lkrb -ldes $LIBS"
4497 cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500
4501 int main() {
4502 main()
4503 ; return 0; }
4504 EOF
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4506   rm -rf conftest*
4507   eval "ac_cv_lib_$ac_lib_var=yes"
4508 else
4509   echo "configure: failed program was:" >&5
4510   cat conftest.$ac_ext >&5
4511   rm -rf conftest*
4512   eval "ac_cv_lib_$ac_lib_var=no"
4513 fi
4514 rm -f conftest*
4515 LIBS="$ac_save_LIBS"
4516
4517 fi
4518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4519   echo "$ac_t""yes" 1>&6
4520   have_k4=yes
4521 else
4522   echo "$ac_t""no" 1>&6
4523 have_k4=no
4524 fi
4525
4526
4527                 if test $have_k4 = yes ; then
4528                         ol_with_kerberos=found
4529                         ol_link_kerberos=yes
4530
4531                         KRB_LIBS="-lkrb -ldes"
4532                 fi
4533         fi
4534 fi
4535
4536 if test $ol_link_kerberos = yes ; then
4537         cat >> confdefs.h <<\EOF
4538 #define HAVE_KERBEROS 1
4539 EOF
4540
4541 fi
4542
4543 ol_link_tls=no
4544 if test $ol_with_tls != no ; then
4545         
4546         for ac_hdr in ssl.h
4547 do
4548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4550 echo "configure:4551: checking for $ac_hdr" >&5
4551 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4552   echo $ac_n "(cached) $ac_c" 1>&6
4553 else
4554   cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 #include <$ac_hdr>
4558 EOF
4559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4560 { (eval echo configure:4561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4562 if test -z "$ac_err"; then
4563   rm -rf conftest*
4564   eval "ac_cv_header_$ac_safe=yes"
4565 else
4566   echo "$ac_err" >&5
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -rf conftest*
4570   eval "ac_cv_header_$ac_safe=no"
4571 fi
4572 rm -f conftest*
4573 fi
4574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4575   echo "$ac_t""yes" 1>&6
4576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4577   cat >> confdefs.h <<EOF
4578 #define $ac_tr_hdr 1
4579 EOF
4580  
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584 done
4585
4586         
4587         if test $ac_cv_header_ssl_h = yes ; then
4588                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4589 echo "configure:4590: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4590 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4592   echo $ac_n "(cached) $ac_c" 1>&6
4593 else
4594   ac_save_LIBS="$LIBS"
4595 LIBS="-lssl -lcrypto $LIBS"
4596 cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 /* Override any gcc2 internal prototype to avoid an error.  */
4600 /* We use char because int might match the return type of a gcc2
4601     builtin and then its argument prototype would still apply.  */
4602 char SSLeay_add_ssl_algorithms();
4603
4604 int main() {
4605 SSLeay_add_ssl_algorithms()
4606 ; return 0; }
4607 EOF
4608 if { (eval echo configure:4609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4609   rm -rf conftest*
4610   eval "ac_cv_lib_$ac_lib_var=yes"
4611 else
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -rf conftest*
4615   eval "ac_cv_lib_$ac_lib_var=no"
4616 fi
4617 rm -f conftest*
4618 LIBS="$ac_save_LIBS"
4619
4620 fi
4621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4622   echo "$ac_t""yes" 1>&6
4623   have_ssleay=yes
4624                         need_rsaref=no
4625 else
4626   echo "$ac_t""no" 1>&6
4627 have_ssleay=no
4628 fi
4629
4630                         
4631                 if test $have_ssleay = no ; then
4632                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4633 echo "configure:4634: checking for ssl3_accept in -lssl" >&5
4634 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4635 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4636   echo $ac_n "(cached) $ac_c" 1>&6
4637 else
4638   ac_save_LIBS="$LIBS"
4639 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4640 cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 /* Override any gcc2 internal prototype to avoid an error.  */
4644 /* We use char because int might match the return type of a gcc2
4645     builtin and then its argument prototype would still apply.  */
4646 char ssl3_accept();
4647
4648 int main() {
4649 ssl3_accept()
4650 ; return 0; }
4651 EOF
4652 if { (eval echo configure:4653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4653   rm -rf conftest*
4654   eval "ac_cv_lib_$ac_lib_var=yes"
4655 else
4656   echo "configure: failed program was:" >&5
4657   cat conftest.$ac_ext >&5
4658   rm -rf conftest*
4659   eval "ac_cv_lib_$ac_lib_var=no"
4660 fi
4661 rm -f conftest*
4662 LIBS="$ac_save_LIBS"
4663
4664 fi
4665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4666   echo "$ac_t""yes" 1>&6
4667   have_ssleay=yes
4668                                 need_rsaref=yes
4669 else
4670   echo "$ac_t""no" 1>&6
4671 have_ssleay=no
4672 fi
4673
4674                 fi
4675
4676                 if test $have_ssleay = yes ; then
4677                         ol_with_tls=found
4678                         ol_link_tls=yes
4679
4680                         cat >> confdefs.h <<\EOF
4681 #define HAVE_SSLEAY 1
4682 EOF
4683
4684
4685                         if test $need_rsaref = yes; then
4686                                 cat >> confdefs.h <<\EOF
4687 #define HAVE_RSAREF 1
4688 EOF
4689
4690
4691                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4692                         else
4693                                 TLS_LIBS="-lssl -lcrypto"
4694                         fi
4695                 fi
4696         fi
4697 fi
4698
4699 if test $ol_link_tls = yes ; then
4700         cat >> confdefs.h <<\EOF
4701 #define HAVE_TLS 1
4702 EOF
4703
4704 fi      
4705
4706 for ac_func in \
4707         ctime_r                 \
4708         gethostbyname_r gethostbyaddr_r \
4709
4710 do
4711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4712 echo "configure:4713: checking for $ac_func" >&5
4713 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4714   echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716   cat > conftest.$ac_ext <<EOF
4717 #line 4718 "configure"
4718 #include "confdefs.h"
4719 /* System header to define __stub macros and hopefully few prototypes,
4720     which can conflict with char $ac_func(); below.  */
4721 #include <assert.h>
4722 /* Override any gcc2 internal prototype to avoid an error.  */
4723 /* We use char because int might match the return type of a gcc2
4724     builtin and then its argument prototype would still apply.  */
4725 char $ac_func();
4726
4727 int main() {
4728
4729 /* The GNU C library defines this for functions which it implements
4730     to always fail with ENOSYS.  Some functions are actually named
4731     something starting with __ and the normal name is an alias.  */
4732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4733 choke me
4734 #else
4735 $ac_func();
4736 #endif
4737
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741   rm -rf conftest*
4742   eval "ac_cv_func_$ac_func=yes"
4743 else
4744   echo "configure: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   rm -rf conftest*
4747   eval "ac_cv_func_$ac_func=no"
4748 fi
4749 rm -f conftest*
4750 fi
4751
4752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4753   echo "$ac_t""yes" 1>&6
4754     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4755   cat >> confdefs.h <<EOF
4756 #define $ac_tr_func 1
4757 EOF
4758  
4759 else
4760   echo "$ac_t""no" 1>&6
4761 fi
4762 done
4763
4764
4765 if test "$ac_cv_func_ctime_r" = no ; then
4766         ol_cv_func_ctime_r_nargs=0
4767 else
4768         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4769 echo "configure:4770: checking number of arguments of ctime_r" >&5
4770 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4771   echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773   cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776 #include <time.h>
4777 int main() {
4778 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4779 ; return 0; }
4780 EOF
4781 if { (eval echo configure:4782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4782   rm -rf conftest*
4783   ol_cv_func_ctime_r_nargs=3
4784 else
4785   echo "configure: failed program was:" >&5
4786   cat conftest.$ac_ext >&5
4787   rm -rf conftest*
4788   cat > conftest.$ac_ext <<EOF
4789 #line 4790 "configure"
4790 #include "confdefs.h"
4791 #include <time.h>
4792 int main() {
4793 time_t ti; char *buffer; ctime_r(&ti,buffer);
4794 ; return 0; }
4795 EOF
4796 if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4797   rm -rf conftest*
4798   ol_cv_func_ctime_r_nargs=2
4799 else
4800   echo "configure: failed program was:" >&5
4801   cat conftest.$ac_ext >&5
4802   rm -rf conftest*
4803   ol_cv_func_ctime_r_nargs=0
4804 fi
4805 rm -f conftest*
4806 fi
4807 rm -f conftest*
4808 fi
4809
4810 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4811   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4812     cat >> confdefs.h <<EOF
4813 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4814 EOF
4815
4816   fi
4817
4818 fi
4819
4820 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4821         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4822 echo "configure:4823: checking number of arguments of gethostbyname_r" >&5
4823 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4824   echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826   cat > conftest.$ac_ext <<EOF
4827 #line 4828 "configure"
4828 #include "confdefs.h"
4829 #include <sys/types.h>
4830 #include <sys/socket.h>
4831 #include <netinet/in.h>
4832 #include <netdb.h>
4833 #define BUFSIZE (sizeof(struct hostent)+10)
4834 int main() {
4835 struct hostent hent; char buffer[BUFSIZE];
4836                 int bufsize=BUFSIZE;int h_errno;
4837                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4838                         buffer, bufsize, &h_errno);
4839 ; return 0; }
4840 EOF
4841 if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4842   rm -rf conftest*
4843   ol_cv_func_gethostbyname_r_nargs=5
4844 else
4845   echo "configure: failed program was:" >&5
4846   cat conftest.$ac_ext >&5
4847   rm -rf conftest*
4848   cat > conftest.$ac_ext <<EOF
4849 #line 4850 "configure"
4850 #include "confdefs.h"
4851 #include <sys/types.h>
4852 #include <sys/socket.h>
4853 #include <netinet/in.h>
4854 #include <netdb.h>
4855 #define BUFSIZE (sizeof(struct hostent)+10)
4856 int main() {
4857 struct hostent hent;struct hostent *rhent;
4858                         char buffer[BUFSIZE];
4859                         int bufsize=BUFSIZE;int h_errno;
4860                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4861                                 &rhent, &h_errno);
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4865   rm -rf conftest*
4866   ol_cv_func_gethostbyname_r_nargs=6
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -rf conftest*
4871   ol_cv_func_gethostbyname_r_nargs=0
4872 fi
4873 rm -f conftest*
4874 fi
4875 rm -f conftest*
4876 fi
4877
4878 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4879   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4880         cat >> confdefs.h <<EOF
4881 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4882 EOF
4883
4884   fi
4885
4886 else
4887         ol_cv_func_gethostbyname_r_nargs=0
4888 fi
4889  
4890 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4891         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4892 echo "configure:4893: checking number of arguments of gethostbyaddr_r" >&5
4893 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4894   echo $ac_n "(cached) $ac_c" 1>&6
4895 else
4896   cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4899 #include <sys/types.h>
4900 #include <sys/socket.h>
4901 #include <netinet/in.h>
4902 #include <netdb.h>
4903 #define BUFSIZE (sizeof(struct hostent)+10)
4904 int main() {
4905 struct hostent hent; char buffer[BUFSIZE]; 
4906             struct in_addr add;
4907             size_t alen=sizeof(struct in_addr);
4908             int bufsize=BUFSIZE;int h_errno;
4909                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4910                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4911 ; return 0; }
4912 EOF
4913 if { (eval echo configure:4914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4914   rm -rf conftest*
4915   ol_cv_func_gethostbyaddr_r_nargs=7
4916 else
4917   echo "configure: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   rm -rf conftest*
4920   cat > conftest.$ac_ext <<EOF
4921 #line 4922 "configure"
4922 #include "confdefs.h"
4923 #include <sys/types.h>
4924 #include <sys/socket.h>
4925 #include <netinet/in.h>
4926 #include <netdb.h>
4927 #define BUFSIZE (sizeof(struct hostent)+10)
4928 int main() {
4929 struct hostent hent;
4930                         struct hostent *rhent; char buffer[BUFSIZE]; 
4931                         struct in_addr add;
4932                         size_t alen=sizeof(struct in_addr);
4933                         int bufsize=BUFSIZE;int h_errno;
4934                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4935                                 alen, AF_INET, &hent, buffer, bufsize, 
4936                                 &rhent, &h_errno);
4937 ; return 0; }
4938 EOF
4939 if { (eval echo configure:4940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4940   rm -rf conftest*
4941   ol_cv_func_gethostbyaddr_r_nargs=8
4942 else
4943   echo "configure: failed program was:" >&5
4944   cat conftest.$ac_ext >&5
4945   rm -rf conftest*
4946   ol_cv_func_gethostbyaddr_r_nargs=0
4947 fi
4948 rm -f conftest*
4949 fi
4950 rm -f conftest*
4951 fi
4952
4953 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4954   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4955     cat >> confdefs.h <<EOF
4956 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4957 EOF
4958
4959   fi
4960
4961 else
4962         ol_cv_func_gethostbyaddr_r_nargs=0
4963 fi
4964
4965 if test "$ac_cv_func_ctime_r" = yes \
4966         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4967         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4968         -a "$ac_cv_func_gethostbyname_r" = yes \
4969         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4970         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4971         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4972         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4973         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4974         ; then
4975  
4976         cat >> confdefs.h <<\EOF
4977 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4978 EOF
4979
4980 fi
4981
4982 ol_link_threads=no
4983 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4984         -o $ol_with_threads = posix ; then
4985
4986         for ac_hdr in pthread.h sched.h
4987 do
4988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4990 echo "configure:4991: checking for $ac_hdr" >&5
4991 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4992   echo $ac_n "(cached) $ac_c" 1>&6
4993 else
4994   cat > conftest.$ac_ext <<EOF
4995 #line 4996 "configure"
4996 #include "confdefs.h"
4997 #include <$ac_hdr>
4998 EOF
4999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5000 { (eval echo configure:5001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5002 if test -z "$ac_err"; then
5003   rm -rf conftest*
5004   eval "ac_cv_header_$ac_safe=yes"
5005 else
5006   echo "$ac_err" >&5
5007   echo "configure: failed program was:" >&5
5008   cat conftest.$ac_ext >&5
5009   rm -rf conftest*
5010   eval "ac_cv_header_$ac_safe=no"
5011 fi
5012 rm -f conftest*
5013 fi
5014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5015   echo "$ac_t""yes" 1>&6
5016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5017   cat >> confdefs.h <<EOF
5018 #define $ac_tr_hdr 1
5019 EOF
5020  
5021 else
5022   echo "$ac_t""no" 1>&6
5023 fi
5024 done
5025
5026
5027         if test $ac_cv_header_pthread_h = yes ; then
5028                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5029 echo "configure:5030: checking POSIX thread version" >&5
5030 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
5031   echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033   
5034         cat > conftest.$ac_ext <<EOF
5035 #line 5036 "configure"
5036 #include "confdefs.h"
5037
5038 #               include <pthread.h>
5039                 /* this check could be improved */
5040 #               ifdef PTHREAD_ONCE_INIT
5041                         pthread_version_final
5042 #               endif
5043         
5044 EOF
5045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5046   egrep "pthread_version_final" >/dev/null 2>&1; then
5047   rm -rf conftest*
5048   ol_pthread_final=yes
5049 else
5050   rm -rf conftest*
5051   ol_pthread_final=no
5052 fi
5053 rm -f conftest*
5054
5055
5056         cat > conftest.$ac_ext <<EOF
5057 #line 5058 "configure"
5058 #include "confdefs.h"
5059
5060 #               include <pthread.h>
5061                 /* this check could be improved */
5062 #               ifdef pthread_once_init
5063                         pthread_version_draft4
5064 #               endif
5065         
5066 EOF
5067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5068   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5069   rm -rf conftest*
5070   ol_pthread_draft4=yes
5071 else
5072   rm -rf conftest*
5073   ol_pthread_draft4=no
5074 fi
5075 rm -f conftest*
5076
5077
5078         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5079                 ol_cv_pthread_version=final
5080         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5081                 ol_cv_pthread_version=draft4
5082         else
5083                 ol_cv_pthread_version=unknown
5084         fi
5085
5086 fi
5087
5088 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5089
5090
5091                 if test $ol_cv_pthread_version = final ; then
5092                         cat >> confdefs.h <<\EOF
5093 #define HAVE_PTHREADS_FINAL 1
5094 EOF
5095
5096                 elif test $ol_cv_pthread_version = draft4 ; then
5097                         cat >> confdefs.h <<\EOF
5098 #define HAVE_PTHREADS_D4 1
5099 EOF
5100
5101                 else
5102                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5103                 fi
5104
5105                 # consider threads found
5106                 ol_with_threads=found
5107
5108                 
5109         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5110 echo "configure:5111: checking for LinuxThreads pthread.h" >&5
5111 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
5112   echo $ac_n "(cached) $ac_c" 1>&6
5113 else
5114   cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117 #include <pthread.h>
5118 EOF
5119 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5120   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5121   rm -rf conftest*
5122   ol_cv_header_linux_threads=yes
5123 else
5124   rm -rf conftest*
5125   ol_cv_header_linux_threads=no
5126 fi
5127 rm -f conftest*
5128
5129                 
5130 fi
5131
5132 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5133         if test $ol_cv_header_linux_threads = yes; then
5134                 cat >> confdefs.h <<\EOF
5135 #define HAVE_LINUX_THREADS 1
5136 EOF
5137
5138         fi
5139
5140
5141                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5142                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5143 echo "configure:5144: checking for pthread_create in default libraries" >&5
5144                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
5145   echo $ac_n "(cached) $ac_c" 1>&6
5146 else
5147   
5148                 if test "$cross_compiling" = yes; then
5149                         ol_cv_pthread_create=yes
5150 else
5151   cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154
5155 #include <pthread.h>
5156 #ifndef NULL
5157 #define NULL (void*)0
5158 #endif
5159
5160 static void *task(p)
5161         void *p;
5162 {
5163         return (void *) (p == NULL);
5164 }
5165
5166 int main(argc, argv)
5167         int argc;
5168         char **argv;
5169 {
5170         pthread_t t;
5171         int status;
5172
5173         /* make sure pthread_create() isn't just a stub */
5174 #if HAVE_PTHREADS_D4
5175         status = pthread_create(&t, pthread_attr_default, task, NULL);
5176 #else
5177         status = pthread_create(&t, NULL, task, NULL);
5178 #endif
5179
5180         if( status ) return status;
5181
5182         /* make sure pthread_detach() isn't just a stub */
5183 #if HAVE_PTHREADS_D4
5184         status = pthread_detach( &t );
5185 #else
5186         status = pthread_detach( t );
5187 #endif
5188
5189         if( status ) return status;
5190
5191         return status;
5192 }
5193
5194 EOF
5195 if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5196 then
5197   ol_cv_pthread_create=yes
5198 else
5199   echo "configure: failed program was:" >&5
5200   cat conftest.$ac_ext >&5
5201   rm -fr conftest*
5202   ol_cv_pthread_create=no
5203 fi
5204 rm -fr conftest*
5205 fi
5206
5207 fi
5208
5209                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5210
5211                 if test $ol_cv_pthread_create != no ; then
5212                         ol_link_threads=posix
5213                         ol_link_pthreads=""
5214                 fi
5215                 
5216                 # Pthread try link: -mt (ol_cv_pthread_mt)
5217         if test "$ol_link_threads" = no ; then
5218                 # try -mt
5219                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5220 echo "configure:5221: checking for pthread link with -mt" >&5
5221 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224   
5225                         # save the flags
5226                         ol_LIBS="$LIBS"
5227                         LIBS="-mt $LIBS"
5228
5229                         cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232
5233 #include <pthread.h>
5234 #ifndef NULL
5235 #define NULL (void*)0
5236 #endif
5237
5238 int main() {
5239
5240         pthread_t t;
5241
5242 #if HAVE_PTHREADS_D4
5243         pthread_create(&t, pthread_attr_default, NULL, NULL);
5244         pthread_detach( &t );
5245 #else
5246         pthread_create(&t, NULL, NULL, NULL);
5247         pthread_detach( t );
5248 #endif
5249 #ifdef HAVE_LINUX_THREADS
5250         pthread_kill_other_threads_np();
5251 #endif
5252
5253 ; return 0; }
5254 EOF
5255 if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5256   rm -rf conftest*
5257   ol_cv_pthread_mt=yes
5258 else
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261   rm -rf conftest*
5262   ol_cv_pthread_mt=no
5263 fi
5264 rm -f conftest*
5265
5266                 # restore the LIBS
5267                 LIBS="$ol_LIBS"
5268                 
5269 fi
5270
5271 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5272
5273                 if test $ol_cv_pthread_mt = yes ; then
5274                         ol_link_pthreads="-mt"
5275                         ol_link_threads=posix
5276                 fi
5277         fi
5278
5279                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5280         if test "$ol_link_threads" = no ; then
5281                 # try -kthread
5282                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5283 echo "configure:5284: checking for pthread link with -kthread" >&5
5284 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
5285   echo $ac_n "(cached) $ac_c" 1>&6
5286 else
5287   
5288                         # save the flags
5289                         ol_LIBS="$LIBS"
5290                         LIBS="-kthread $LIBS"
5291
5292                         cat > conftest.$ac_ext <<EOF
5293 #line 5294 "configure"
5294 #include "confdefs.h"
5295
5296 #include <pthread.h>
5297 #ifndef NULL
5298 #define NULL (void*)0
5299 #endif
5300
5301 int main() {
5302
5303         pthread_t t;
5304
5305 #if HAVE_PTHREADS_D4
5306         pthread_create(&t, pthread_attr_default, NULL, NULL);
5307         pthread_detach( &t );
5308 #else
5309         pthread_create(&t, NULL, NULL, NULL);
5310         pthread_detach( t );
5311 #endif
5312 #ifdef HAVE_LINUX_THREADS
5313         pthread_kill_other_threads_np();
5314 #endif
5315
5316 ; return 0; }
5317 EOF
5318 if { (eval echo configure:5319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5319   rm -rf conftest*
5320   ol_cv_pthread_kthread=yes
5321 else
5322   echo "configure: failed program was:" >&5
5323   cat conftest.$ac_ext >&5
5324   rm -rf conftest*
5325   ol_cv_pthread_kthread=no
5326 fi
5327 rm -f conftest*
5328
5329                 # restore the LIBS
5330                 LIBS="$ol_LIBS"
5331                 
5332 fi
5333
5334 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5335
5336                 if test $ol_cv_pthread_kthread = yes ; then
5337                         ol_link_pthreads="-kthread"
5338                         ol_link_threads=posix
5339                 fi
5340         fi
5341
5342                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5343         if test "$ol_link_threads" = no ; then
5344                 # try -pthread
5345                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5346 echo "configure:5347: checking for pthread link with -pthread" >&5
5347 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
5348   echo $ac_n "(cached) $ac_c" 1>&6
5349 else
5350   
5351                         # save the flags
5352                         ol_LIBS="$LIBS"
5353                         LIBS="-pthread $LIBS"
5354
5355                         cat > conftest.$ac_ext <<EOF
5356 #line 5357 "configure"
5357 #include "confdefs.h"
5358
5359 #include <pthread.h>
5360 #ifndef NULL
5361 #define NULL (void*)0
5362 #endif
5363
5364 int main() {
5365
5366         pthread_t t;
5367
5368 #if HAVE_PTHREADS_D4
5369         pthread_create(&t, pthread_attr_default, NULL, NULL);
5370         pthread_detach( &t );
5371 #else
5372         pthread_create(&t, NULL, NULL, NULL);
5373         pthread_detach( t );
5374 #endif
5375 #ifdef HAVE_LINUX_THREADS
5376         pthread_kill_other_threads_np();
5377 #endif
5378
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5382   rm -rf conftest*
5383   ol_cv_pthread_pthread=yes
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   ol_cv_pthread_pthread=no
5389 fi
5390 rm -f conftest*
5391
5392                 # restore the LIBS
5393                 LIBS="$ol_LIBS"
5394                 
5395 fi
5396
5397 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5398
5399                 if test $ol_cv_pthread_pthread = yes ; then
5400                         ol_link_pthreads="-pthread"
5401                         ol_link_threads=posix
5402                 fi
5403         fi
5404
5405                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5406         if test "$ol_link_threads" = no ; then
5407                 # try -pthreads
5408                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5409 echo "configure:5410: checking for pthread link with -pthreads" >&5
5410 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5411   echo $ac_n "(cached) $ac_c" 1>&6
5412 else
5413   
5414                         # save the flags
5415                         ol_LIBS="$LIBS"
5416                         LIBS="-pthreads $LIBS"
5417
5418                         cat > conftest.$ac_ext <<EOF
5419 #line 5420 "configure"
5420 #include "confdefs.h"
5421
5422 #include <pthread.h>
5423 #ifndef NULL
5424 #define NULL (void*)0
5425 #endif
5426
5427 int main() {
5428
5429         pthread_t t;
5430
5431 #if HAVE_PTHREADS_D4
5432         pthread_create(&t, pthread_attr_default, NULL, NULL);
5433         pthread_detach( &t );
5434 #else
5435         pthread_create(&t, NULL, NULL, NULL);
5436         pthread_detach( t );
5437 #endif
5438 #ifdef HAVE_LINUX_THREADS
5439         pthread_kill_other_threads_np();
5440 #endif
5441
5442 ; return 0; }
5443 EOF
5444 if { (eval echo configure:5445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5445   rm -rf conftest*
5446   ol_cv_pthread_pthreads=yes
5447 else
5448   echo "configure: failed program was:" >&5
5449   cat conftest.$ac_ext >&5
5450   rm -rf conftest*
5451   ol_cv_pthread_pthreads=no
5452 fi
5453 rm -f conftest*
5454
5455                 # restore the LIBS
5456                 LIBS="$ol_LIBS"
5457                 
5458 fi
5459
5460 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5461
5462                 if test $ol_cv_pthread_pthreads = yes ; then
5463                         ol_link_pthreads="-pthreads"
5464                         ol_link_threads=posix
5465                 fi
5466         fi
5467
5468                 # Pthread try link: -thread (ol_cv_pthread_thread)
5469         if test "$ol_link_threads" = no ; then
5470                 # try -thread
5471                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5472 echo "configure:5473: checking for pthread link with -thread" >&5
5473 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5474   echo $ac_n "(cached) $ac_c" 1>&6
5475 else
5476   
5477                         # save the flags
5478                         ol_LIBS="$LIBS"
5479                         LIBS="-thread $LIBS"
5480
5481                         cat > conftest.$ac_ext <<EOF
5482 #line 5483 "configure"
5483 #include "confdefs.h"
5484
5485 #include <pthread.h>
5486 #ifndef NULL
5487 #define NULL (void*)0
5488 #endif
5489
5490 int main() {
5491
5492         pthread_t t;
5493
5494 #if HAVE_PTHREADS_D4
5495         pthread_create(&t, pthread_attr_default, NULL, NULL);
5496         pthread_detach( &t );
5497 #else
5498         pthread_create(&t, NULL, NULL, NULL);
5499         pthread_detach( t );
5500 #endif
5501 #ifdef HAVE_LINUX_THREADS
5502         pthread_kill_other_threads_np();
5503 #endif
5504
5505 ; return 0; }
5506 EOF
5507 if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5508   rm -rf conftest*
5509   ol_cv_pthread_thread=yes
5510 else
5511   echo "configure: failed program was:" >&5
5512   cat conftest.$ac_ext >&5
5513   rm -rf conftest*
5514   ol_cv_pthread_thread=no
5515 fi
5516 rm -f conftest*
5517
5518                 # restore the LIBS
5519                 LIBS="$ol_LIBS"
5520                 
5521 fi
5522
5523 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5524
5525                 if test $ol_cv_pthread_thread = yes ; then
5526                         ol_link_pthreads="-thread"
5527                         ol_link_threads=posix
5528                 fi
5529         fi
5530
5531
5532                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5533         if test "$ol_link_threads" = no ; then
5534                 # try -lpthread -lmach -lexc -lc_r
5535                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5536 echo "configure:5537: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5537 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5538   echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540   
5541                         # save the flags
5542                         ol_LIBS="$LIBS"
5543                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5544
5545                         cat > conftest.$ac_ext <<EOF
5546 #line 5547 "configure"
5547 #include "confdefs.h"
5548
5549 #include <pthread.h>
5550 #ifndef NULL
5551 #define NULL (void*)0
5552 #endif
5553
5554 int main() {
5555
5556         pthread_t t;
5557
5558 #if HAVE_PTHREADS_D4
5559         pthread_create(&t, pthread_attr_default, NULL, NULL);
5560         pthread_detach( &t );
5561 #else
5562         pthread_create(&t, NULL, NULL, NULL);
5563         pthread_detach( t );
5564 #endif
5565 #ifdef HAVE_LINUX_THREADS
5566         pthread_kill_other_threads_np();
5567 #endif
5568
5569 ; return 0; }
5570 EOF
5571 if { (eval echo configure:5572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5572   rm -rf conftest*
5573   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5574 else
5575   echo "configure: failed program was:" >&5
5576   cat conftest.$ac_ext >&5
5577   rm -rf conftest*
5578   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5579 fi
5580 rm -f conftest*
5581
5582                 # restore the LIBS
5583                 LIBS="$ol_LIBS"
5584                 
5585 fi
5586
5587 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5588
5589                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5590                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5591                         ol_link_threads=posix
5592                 fi
5593         fi
5594
5595                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5596         if test "$ol_link_threads" = no ; then
5597                 # try -lpthread -lmach -lexc
5598                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5599 echo "configure:5600: checking for pthread link with -lpthread -lmach -lexc" >&5
5600 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5601   echo $ac_n "(cached) $ac_c" 1>&6
5602 else
5603   
5604                         # save the flags
5605                         ol_LIBS="$LIBS"
5606                         LIBS="-lpthread -lmach -lexc $LIBS"
5607
5608                         cat > conftest.$ac_ext <<EOF
5609 #line 5610 "configure"
5610 #include "confdefs.h"
5611
5612 #include <pthread.h>
5613 #ifndef NULL
5614 #define NULL (void*)0
5615 #endif
5616
5617 int main() {
5618
5619         pthread_t t;
5620
5621 #if HAVE_PTHREADS_D4
5622         pthread_create(&t, pthread_attr_default, NULL, NULL);
5623         pthread_detach( &t );
5624 #else
5625         pthread_create(&t, NULL, NULL, NULL);
5626         pthread_detach( t );
5627 #endif
5628 #ifdef HAVE_LINUX_THREADS
5629         pthread_kill_other_threads_np();
5630 #endif
5631
5632 ; return 0; }
5633 EOF
5634 if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5635   rm -rf conftest*
5636   ol_cv_pthread_lpthread_lmach_lexc=yes
5637 else
5638   echo "configure: failed program was:" >&5
5639   cat conftest.$ac_ext >&5
5640   rm -rf conftest*
5641   ol_cv_pthread_lpthread_lmach_lexc=no
5642 fi
5643 rm -f conftest*
5644
5645                 # restore the LIBS
5646                 LIBS="$ol_LIBS"
5647                 
5648 fi
5649
5650 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5651
5652                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5653                         ol_link_pthreads="-lpthread -lmach -lexc"
5654                         ol_link_threads=posix
5655                 fi
5656         fi
5657
5658
5659                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5660         if test "$ol_link_threads" = no ; then
5661                 # try -lpthread -Wl,-woff,85
5662                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5663 echo "configure:5664: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5664 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5665   echo $ac_n "(cached) $ac_c" 1>&6
5666 else
5667   
5668                         # save the flags
5669                         ol_LIBS="$LIBS"
5670                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5671
5672                         cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675
5676 #include <pthread.h>
5677 #ifndef NULL
5678 #define NULL (void*)0
5679 #endif
5680
5681 int main() {
5682
5683         pthread_t t;
5684
5685 #if HAVE_PTHREADS_D4
5686         pthread_create(&t, pthread_attr_default, NULL, NULL);
5687         pthread_detach( &t );
5688 #else
5689         pthread_create(&t, NULL, NULL, NULL);
5690         pthread_detach( t );
5691 #endif
5692 #ifdef HAVE_LINUX_THREADS
5693         pthread_kill_other_threads_np();
5694 #endif
5695
5696 ; return 0; }
5697 EOF
5698 if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5699   rm -rf conftest*
5700   ol_cv_pthread_lib_lpthread_woff=yes
5701 else
5702   echo "configure: failed program was:" >&5
5703   cat conftest.$ac_ext >&5
5704   rm -rf conftest*
5705   ol_cv_pthread_lib_lpthread_woff=no
5706 fi
5707 rm -f conftest*
5708
5709                 # restore the LIBS
5710                 LIBS="$ol_LIBS"
5711                 
5712 fi
5713
5714 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5715
5716                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5717                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5718                         ol_link_threads=posix
5719                 fi
5720         fi
5721
5722
5723                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5724         if test "$ol_link_threads" = no ; then
5725                 # try -lpthread
5726                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5727 echo "configure:5728: checking for pthread link with -lpthread" >&5
5728 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5729   echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731   
5732                         # save the flags
5733                         ol_LIBS="$LIBS"
5734                         LIBS="-lpthread $LIBS"
5735
5736                         cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739
5740 #include <pthread.h>
5741 #ifndef NULL
5742 #define NULL (void*)0
5743 #endif
5744
5745 int main() {
5746
5747         pthread_t t;
5748
5749 #if HAVE_PTHREADS_D4
5750         pthread_create(&t, pthread_attr_default, NULL, NULL);
5751         pthread_detach( &t );
5752 #else
5753         pthread_create(&t, NULL, NULL, NULL);
5754         pthread_detach( t );
5755 #endif
5756 #ifdef HAVE_LINUX_THREADS
5757         pthread_kill_other_threads_np();
5758 #endif
5759
5760 ; return 0; }
5761 EOF
5762 if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5763   rm -rf conftest*
5764   ol_cv_pthread_lpthread=yes
5765 else
5766   echo "configure: failed program was:" >&5
5767   cat conftest.$ac_ext >&5
5768   rm -rf conftest*
5769   ol_cv_pthread_lpthread=no
5770 fi
5771 rm -f conftest*
5772
5773                 # restore the LIBS
5774                 LIBS="$ol_LIBS"
5775                 
5776 fi
5777
5778 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5779
5780                 if test $ol_cv_pthread_lpthread = yes ; then
5781                         ol_link_pthreads="-lpthread"
5782                         ol_link_threads=posix
5783                 fi
5784         fi
5785
5786                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5787         if test "$ol_link_threads" = no ; then
5788                 # try -lc_r
5789                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5790 echo "configure:5791: checking for pthread link with -lc_r" >&5
5791 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5792   echo $ac_n "(cached) $ac_c" 1>&6
5793 else
5794   
5795                         # save the flags
5796                         ol_LIBS="$LIBS"
5797                         LIBS="-lc_r $LIBS"
5798
5799                         cat > conftest.$ac_ext <<EOF
5800 #line 5801 "configure"
5801 #include "confdefs.h"
5802
5803 #include <pthread.h>
5804 #ifndef NULL
5805 #define NULL (void*)0
5806 #endif
5807
5808 int main() {
5809
5810         pthread_t t;
5811
5812 #if HAVE_PTHREADS_D4
5813         pthread_create(&t, pthread_attr_default, NULL, NULL);
5814         pthread_detach( &t );
5815 #else
5816         pthread_create(&t, NULL, NULL, NULL);
5817         pthread_detach( t );
5818 #endif
5819 #ifdef HAVE_LINUX_THREADS
5820         pthread_kill_other_threads_np();
5821 #endif
5822
5823 ; return 0; }
5824 EOF
5825 if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5826   rm -rf conftest*
5827   ol_cv_pthread_lc_r=yes
5828 else
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   ol_cv_pthread_lc_r=no
5833 fi
5834 rm -f conftest*
5835
5836                 # restore the LIBS
5837                 LIBS="$ol_LIBS"
5838                 
5839 fi
5840
5841 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5842
5843                 if test $ol_cv_pthread_lc_r = yes ; then
5844                         ol_link_pthreads="-lc_r"
5845                         ol_link_threads=posix
5846                 fi
5847         fi
5848
5849
5850                 # Pthread try link: -threads (ol_cv_pthread_threads)
5851         if test "$ol_link_threads" = no ; then
5852                 # try -threads
5853                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5854 echo "configure:5855: checking for pthread link with -threads" >&5
5855 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5856   echo $ac_n "(cached) $ac_c" 1>&6
5857 else
5858   
5859                         # save the flags
5860                         ol_LIBS="$LIBS"
5861                         LIBS="-threads $LIBS"
5862
5863                         cat > conftest.$ac_ext <<EOF
5864 #line 5865 "configure"
5865 #include "confdefs.h"
5866
5867 #include <pthread.h>
5868 #ifndef NULL
5869 #define NULL (void*)0
5870 #endif
5871
5872 int main() {
5873
5874         pthread_t t;
5875
5876 #if HAVE_PTHREADS_D4
5877         pthread_create(&t, pthread_attr_default, NULL, NULL);
5878         pthread_detach( &t );
5879 #else
5880         pthread_create(&t, NULL, NULL, NULL);
5881         pthread_detach( t );
5882 #endif
5883 #ifdef HAVE_LINUX_THREADS
5884         pthread_kill_other_threads_np();
5885 #endif
5886
5887 ; return 0; }
5888 EOF
5889 if { (eval echo configure:5890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5890   rm -rf conftest*
5891   ol_cv_pthread_threads=yes
5892 else
5893   echo "configure: failed program was:" >&5
5894   cat conftest.$ac_ext >&5
5895   rm -rf conftest*
5896   ol_cv_pthread_threads=no
5897 fi
5898 rm -f conftest*
5899
5900                 # restore the LIBS
5901                 LIBS="$ol_LIBS"
5902                 
5903 fi
5904
5905 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5906
5907                 if test $ol_cv_pthread_threads = yes ; then
5908                         ol_link_pthreads="-threads"
5909                         ol_link_threads=posix
5910                 fi
5911         fi
5912
5913
5914                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5915         if test "$ol_link_threads" = no ; then
5916                 # try -lpthreads -lmach -lexc -lc_r
5917                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5918 echo "configure:5919: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5919 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5920   echo $ac_n "(cached) $ac_c" 1>&6
5921 else
5922   
5923                         # save the flags
5924                         ol_LIBS="$LIBS"
5925                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5926
5927                         cat > conftest.$ac_ext <<EOF
5928 #line 5929 "configure"
5929 #include "confdefs.h"
5930
5931 #include <pthread.h>
5932 #ifndef NULL
5933 #define NULL (void*)0
5934 #endif
5935
5936 int main() {
5937
5938         pthread_t t;
5939
5940 #if HAVE_PTHREADS_D4
5941         pthread_create(&t, pthread_attr_default, NULL, NULL);
5942         pthread_detach( &t );
5943 #else
5944         pthread_create(&t, NULL, NULL, NULL);
5945         pthread_detach( t );
5946 #endif
5947 #ifdef HAVE_LINUX_THREADS
5948         pthread_kill_other_threads_np();
5949 #endif
5950
5951 ; return 0; }
5952 EOF
5953 if { (eval echo configure:5954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5954   rm -rf conftest*
5955   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5956 else
5957   echo "configure: failed program was:" >&5
5958   cat conftest.$ac_ext >&5
5959   rm -rf conftest*
5960   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5961 fi
5962 rm -f conftest*
5963
5964                 # restore the LIBS
5965                 LIBS="$ol_LIBS"
5966                 
5967 fi
5968
5969 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5970
5971                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5972                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5973                         ol_link_threads=posix
5974                 fi
5975         fi
5976
5977                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5978         if test "$ol_link_threads" = no ; then
5979                 # try -lpthreads -lmach -lexc
5980                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5981 echo "configure:5982: checking for pthread link with -lpthreads -lmach -lexc" >&5
5982 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5983   echo $ac_n "(cached) $ac_c" 1>&6
5984 else
5985   
5986                         # save the flags
5987                         ol_LIBS="$LIBS"
5988                         LIBS="-lpthreads -lmach -lexc $LIBS"
5989
5990                         cat > conftest.$ac_ext <<EOF
5991 #line 5992 "configure"
5992 #include "confdefs.h"
5993
5994 #include <pthread.h>
5995 #ifndef NULL
5996 #define NULL (void*)0
5997 #endif
5998
5999 int main() {
6000
6001         pthread_t t;
6002
6003 #if HAVE_PTHREADS_D4
6004         pthread_create(&t, pthread_attr_default, NULL, NULL);
6005         pthread_detach( &t );
6006 #else
6007         pthread_create(&t, NULL, NULL, NULL);
6008         pthread_detach( t );
6009 #endif
6010 #ifdef HAVE_LINUX_THREADS
6011         pthread_kill_other_threads_np();
6012 #endif
6013
6014 ; return 0; }
6015 EOF
6016 if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6017   rm -rf conftest*
6018   ol_cv_pthread_lpthreads_lmach_lexc=yes
6019 else
6020   echo "configure: failed program was:" >&5
6021   cat conftest.$ac_ext >&5
6022   rm -rf conftest*
6023   ol_cv_pthread_lpthreads_lmach_lexc=no
6024 fi
6025 rm -f conftest*
6026
6027                 # restore the LIBS
6028                 LIBS="$ol_LIBS"
6029                 
6030 fi
6031
6032 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6033
6034                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6035                         ol_link_pthreads="-lpthreads -lmach -lexc"
6036                         ol_link_threads=posix
6037                 fi
6038         fi
6039
6040                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6041         if test "$ol_link_threads" = no ; then
6042                 # try -lpthreads -lexc
6043                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6044 echo "configure:6045: checking for pthread link with -lpthreads -lexc" >&5
6045 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
6046   echo $ac_n "(cached) $ac_c" 1>&6
6047 else
6048   
6049                         # save the flags
6050                         ol_LIBS="$LIBS"
6051                         LIBS="-lpthreads -lexc $LIBS"
6052
6053                         cat > conftest.$ac_ext <<EOF
6054 #line 6055 "configure"
6055 #include "confdefs.h"
6056
6057 #include <pthread.h>
6058 #ifndef NULL
6059 #define NULL (void*)0
6060 #endif
6061
6062 int main() {
6063
6064         pthread_t t;
6065
6066 #if HAVE_PTHREADS_D4
6067         pthread_create(&t, pthread_attr_default, NULL, NULL);
6068         pthread_detach( &t );
6069 #else
6070         pthread_create(&t, NULL, NULL, NULL);
6071         pthread_detach( t );
6072 #endif
6073 #ifdef HAVE_LINUX_THREADS
6074         pthread_kill_other_threads_np();
6075 #endif
6076
6077 ; return 0; }
6078 EOF
6079 if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6080   rm -rf conftest*
6081   ol_cv_pthread_lpthreads_lexc=yes
6082 else
6083   echo "configure: failed program was:" >&5
6084   cat conftest.$ac_ext >&5
6085   rm -rf conftest*
6086   ol_cv_pthread_lpthreads_lexc=no
6087 fi
6088 rm -f conftest*
6089
6090                 # restore the LIBS
6091                 LIBS="$ol_LIBS"
6092                 
6093 fi
6094
6095 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6096
6097                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6098                         ol_link_pthreads="-lpthreads -lexc"
6099                         ol_link_threads=posix
6100                 fi
6101         fi
6102
6103
6104                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6105         if test "$ol_link_threads" = no ; then
6106                 # try -lpthreads
6107                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6108 echo "configure:6109: checking for pthread link with -lpthreads" >&5
6109 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
6110   echo $ac_n "(cached) $ac_c" 1>&6
6111 else
6112   
6113                         # save the flags
6114                         ol_LIBS="$LIBS"
6115                         LIBS="-lpthreads $LIBS"
6116
6117                         cat > conftest.$ac_ext <<EOF
6118 #line 6119 "configure"
6119 #include "confdefs.h"
6120
6121 #include <pthread.h>
6122 #ifndef NULL
6123 #define NULL (void*)0
6124 #endif
6125
6126 int main() {
6127
6128         pthread_t t;
6129
6130 #if HAVE_PTHREADS_D4
6131         pthread_create(&t, pthread_attr_default, NULL, NULL);
6132         pthread_detach( &t );
6133 #else
6134         pthread_create(&t, NULL, NULL, NULL);
6135         pthread_detach( t );
6136 #endif
6137 #ifdef HAVE_LINUX_THREADS
6138         pthread_kill_other_threads_np();
6139 #endif
6140
6141 ; return 0; }
6142 EOF
6143 if { (eval echo configure:6144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6144   rm -rf conftest*
6145   ol_cv_pthread_lib_lpthreads=yes
6146 else
6147   echo "configure: failed program was:" >&5
6148   cat conftest.$ac_ext >&5
6149   rm -rf conftest*
6150   ol_cv_pthread_lib_lpthreads=no
6151 fi
6152 rm -f conftest*
6153
6154                 # restore the LIBS
6155                 LIBS="$ol_LIBS"
6156                 
6157 fi
6158
6159 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6160
6161                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6162                         ol_link_pthreads="-lpthreads"
6163                         ol_link_threads=posix
6164                 fi
6165         fi
6166
6167
6168                 if test $ol_link_threads != no ; then
6169                         cat >> confdefs.h <<\EOF
6170 #define HAVE_PTHREADS 1
6171 EOF
6172
6173
6174                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6175
6176                                                 save_CPPFLAGS="$CPPFLAGS"
6177                         save_LIBS="$LIBS"
6178                         LIBS="$LTHREAD_LIBS $LIBS"
6179
6180                                                                                                 for ac_func in sched_yield pthread_yield
6181 do
6182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6183 echo "configure:6184: checking for $ac_func" >&5
6184 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6185   echo $ac_n "(cached) $ac_c" 1>&6
6186 else
6187   cat > conftest.$ac_ext <<EOF
6188 #line 6189 "configure"
6189 #include "confdefs.h"
6190 /* System header to define __stub macros and hopefully few prototypes,
6191     which can conflict with char $ac_func(); below.  */
6192 #include <assert.h>
6193 /* Override any gcc2 internal prototype to avoid an error.  */
6194 /* We use char because int might match the return type of a gcc2
6195     builtin and then its argument prototype would still apply.  */
6196 char $ac_func();
6197
6198 int main() {
6199
6200 /* The GNU C library defines this for functions which it implements
6201     to always fail with ENOSYS.  Some functions are actually named
6202     something starting with __ and the normal name is an alias.  */
6203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6204 choke me
6205 #else
6206 $ac_func();
6207 #endif
6208
6209 ; return 0; }
6210 EOF
6211 if { (eval echo configure:6212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6212   rm -rf conftest*
6213   eval "ac_cv_func_$ac_func=yes"
6214 else
6215   echo "configure: failed program was:" >&5
6216   cat conftest.$ac_ext >&5
6217   rm -rf conftest*
6218   eval "ac_cv_func_$ac_func=no"
6219 fi
6220 rm -f conftest*
6221 fi
6222
6223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6224   echo "$ac_t""yes" 1>&6
6225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6226   cat >> confdefs.h <<EOF
6227 #define $ac_tr_func 1
6228 EOF
6229  
6230 else
6231   echo "$ac_t""no" 1>&6
6232 fi
6233 done
6234
6235
6236                         if test $ac_cv_func_sched_yield = no -a \
6237                                 $ac_cv_func_pthread_yield = no ; then
6238                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6239 echo "configure:6240: checking for sched_yield in -lrt" >&5
6240 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
6241 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6242   echo $ac_n "(cached) $ac_c" 1>&6
6243 else
6244   ac_save_LIBS="$LIBS"
6245 LIBS="-lrt  $LIBS"
6246 cat > conftest.$ac_ext <<EOF
6247 #line 6248 "configure"
6248 #include "confdefs.h"
6249 /* Override any gcc2 internal prototype to avoid an error.  */
6250 /* We use char because int might match the return type of a gcc2
6251     builtin and then its argument prototype would still apply.  */
6252 char sched_yield();
6253
6254 int main() {
6255 sched_yield()
6256 ; return 0; }
6257 EOF
6258 if { (eval echo configure:6259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6259   rm -rf conftest*
6260   eval "ac_cv_lib_$ac_lib_var=yes"
6261 else
6262   echo "configure: failed program was:" >&5
6263   cat conftest.$ac_ext >&5
6264   rm -rf conftest*
6265   eval "ac_cv_lib_$ac_lib_var=no"
6266 fi
6267 rm -f conftest*
6268 LIBS="$ac_save_LIBS"
6269
6270 fi
6271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6272   echo "$ac_t""yes" 1>&6
6273   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6274                                         cat >> confdefs.h <<\EOF
6275 #define HAVE_SCHED_YIELD 1
6276 EOF
6277
6278                                         ac_cv_func_sched_yield=yes
6279 else
6280   echo "$ac_t""no" 1>&6
6281 ac_cv_func_sched_yield=no
6282 fi
6283
6284                         fi
6285                         if test $ac_cv_func_sched_yield = no -a \
6286                                 $ac_cv_func_pthread_yield = no ; then
6287                                                                                                 for ac_func in thr_yield
6288 do
6289 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6290 echo "configure:6291: checking for $ac_func" >&5
6291 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6292   echo $ac_n "(cached) $ac_c" 1>&6
6293 else
6294   cat > conftest.$ac_ext <<EOF
6295 #line 6296 "configure"
6296 #include "confdefs.h"
6297 /* System header to define __stub macros and hopefully few prototypes,
6298     which can conflict with char $ac_func(); below.  */
6299 #include <assert.h>
6300 /* Override any gcc2 internal prototype to avoid an error.  */
6301 /* We use char because int might match the return type of a gcc2
6302     builtin and then its argument prototype would still apply.  */
6303 char $ac_func();
6304
6305 int main() {
6306
6307 /* The GNU C library defines this for functions which it implements
6308     to always fail with ENOSYS.  Some functions are actually named
6309     something starting with __ and the normal name is an alias.  */
6310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6311 choke me
6312 #else
6313 $ac_func();
6314 #endif
6315
6316 ; return 0; }
6317 EOF
6318 if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6319   rm -rf conftest*
6320   eval "ac_cv_func_$ac_func=yes"
6321 else
6322   echo "configure: failed program was:" >&5
6323   cat conftest.$ac_ext >&5
6324   rm -rf conftest*
6325   eval "ac_cv_func_$ac_func=no"
6326 fi
6327 rm -f conftest*
6328 fi
6329
6330 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6331   echo "$ac_t""yes" 1>&6
6332     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6333   cat >> confdefs.h <<EOF
6334 #define $ac_tr_func 1
6335 EOF
6336  
6337 else
6338   echo "$ac_t""no" 1>&6
6339 fi
6340 done
6341
6342                         fi
6343                         if test $ac_cv_func_sched_yield = no -a \
6344                                 $ac_cv_func_pthread_yield = no -a \
6345                                 "$ac_cv_func_thr_yield" = no ; then
6346                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6347                         fi
6348
6349                                                 for ac_func in pthread_kill
6350 do
6351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6352 echo "configure:6353: checking for $ac_func" >&5
6353 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359 /* System header to define __stub macros and hopefully few prototypes,
6360     which can conflict with char $ac_func(); below.  */
6361 #include <assert.h>
6362 /* Override any gcc2 internal prototype to avoid an error.  */
6363 /* We use char because int might match the return type of a gcc2
6364     builtin and then its argument prototype would still apply.  */
6365 char $ac_func();
6366
6367 int main() {
6368
6369 /* The GNU C library defines this for functions which it implements
6370     to always fail with ENOSYS.  Some functions are actually named
6371     something starting with __ and the normal name is an alias.  */
6372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6373 choke me
6374 #else
6375 $ac_func();
6376 #endif
6377
6378 ; return 0; }
6379 EOF
6380 if { (eval echo configure:6381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6381   rm -rf conftest*
6382   eval "ac_cv_func_$ac_func=yes"
6383 else
6384   echo "configure: failed program was:" >&5
6385   cat conftest.$ac_ext >&5
6386   rm -rf conftest*
6387   eval "ac_cv_func_$ac_func=no"
6388 fi
6389 rm -f conftest*
6390 fi
6391
6392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6393   echo "$ac_t""yes" 1>&6
6394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6395   cat >> confdefs.h <<EOF
6396 #define $ac_tr_func 1
6397 EOF
6398  
6399 else
6400   echo "$ac_t""no" 1>&6
6401 fi
6402 done
6403
6404
6405                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6406 echo "configure:6407: checking for pthread_detach with <pthread.h>" >&5
6407 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6408   echo $ac_n "(cached) $ac_c" 1>&6
6409 else
6410   
6411                                                                 cat > conftest.$ac_ext <<EOF
6412 #line 6413 "configure"
6413 #include "confdefs.h"
6414
6415 #include <pthread.h>
6416 #ifndef NULL
6417 #define NULL (void*)0
6418 #endif
6419
6420 int main() {
6421 pthread_detach(NULL);
6422 ; return 0; }
6423 EOF
6424 if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6425   rm -rf conftest*
6426   ol_cv_func_pthread_detach=yes
6427 else
6428   echo "configure: failed program was:" >&5
6429   cat conftest.$ac_ext >&5
6430   rm -rf conftest*
6431   ol_cv_func_pthread_detach=no
6432 fi
6433 rm -f conftest*
6434                         
6435 fi
6436
6437 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6438
6439                         if test $ol_cv_func_pthread_detach = no ; then
6440                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6441                         fi
6442
6443                         cat >> confdefs.h <<\EOF
6444 #define HAVE_PTHREAD_DETACH 1
6445 EOF
6446
6447
6448                                                 for ac_func in \
6449                                 pthread_setconcurrency \
6450                                 pthread_getconcurrency \
6451                                 thr_setconcurrency \
6452                                 thr_getconcurrency \
6453                         
6454 do
6455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6456 echo "configure:6457: checking for $ac_func" >&5
6457 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6458   echo $ac_n "(cached) $ac_c" 1>&6
6459 else
6460   cat > conftest.$ac_ext <<EOF
6461 #line 6462 "configure"
6462 #include "confdefs.h"
6463 /* System header to define __stub macros and hopefully few prototypes,
6464     which can conflict with char $ac_func(); below.  */
6465 #include <assert.h>
6466 /* Override any gcc2 internal prototype to avoid an error.  */
6467 /* We use char because int might match the return type of a gcc2
6468     builtin and then its argument prototype would still apply.  */
6469 char $ac_func();
6470
6471 int main() {
6472
6473 /* The GNU C library defines this for functions which it implements
6474     to always fail with ENOSYS.  Some functions are actually named
6475     something starting with __ and the normal name is an alias.  */
6476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6477 choke me
6478 #else
6479 $ac_func();
6480 #endif
6481
6482 ; return 0; }
6483 EOF
6484 if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6485   rm -rf conftest*
6486   eval "ac_cv_func_$ac_func=yes"
6487 else
6488   echo "configure: failed program was:" >&5
6489   cat conftest.$ac_ext >&5
6490   rm -rf conftest*
6491   eval "ac_cv_func_$ac_func=no"
6492 fi
6493 rm -f conftest*
6494 fi
6495
6496 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6497   echo "$ac_t""yes" 1>&6
6498     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6499   cat >> confdefs.h <<EOF
6500 #define $ac_tr_func 1
6501 EOF
6502  
6503 else
6504   echo "$ac_t""no" 1>&6
6505 fi
6506 done
6507
6508
6509                         
6510         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6511 echo "configure:6512: checking for pthread_kill_other_threads_np" >&5
6512 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6513   echo $ac_n "(cached) $ac_c" 1>&6
6514 else
6515   cat > conftest.$ac_ext <<EOF
6516 #line 6517 "configure"
6517 #include "confdefs.h"
6518 /* System header to define __stub macros and hopefully few prototypes,
6519     which can conflict with char pthread_kill_other_threads_np(); below.  */
6520 #include <assert.h>
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 /* We use char because int might match the return type of a gcc2
6523     builtin and then its argument prototype would still apply.  */
6524 char pthread_kill_other_threads_np();
6525
6526 int main() {
6527
6528 /* The GNU C library defines this for functions which it implements
6529     to always fail with ENOSYS.  Some functions are actually named
6530     something starting with __ and the normal name is an alias.  */
6531 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6532 choke me
6533 #else
6534 pthread_kill_other_threads_np();
6535 #endif
6536
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6547 fi
6548 rm -f conftest*
6549 fi
6550
6551 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6552   echo "$ac_t""yes" 1>&6
6553   :
6554 else
6555   echo "$ac_t""no" 1>&6
6556 fi
6557
6558         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6559 echo "configure:6560: checking for LinuxThreads implementation" >&5
6560 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6561   echo $ac_n "(cached) $ac_c" 1>&6
6562 else
6563   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6564 fi
6565
6566 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6567
6568                         
6569         
6570         
6571         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6572 echo "configure:6573: checking for LinuxThreads consistency" >&5
6573 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6574   echo $ac_n "(cached) $ac_c" 1>&6
6575 else
6576   
6577                 if test $ol_cv_header_linux_threads = yes -a \
6578                         $ol_cv_sys_linux_threads = yes; then
6579                         ol_cv_linux_threads=yes
6580                 elif test $ol_cv_header_linux_threads = no -a \
6581                         $ol_cv_sys_linux_threads = no; then
6582                         ol_cv_linux_threads=no
6583                 else
6584                         ol_cv_linux_threads=error
6585                 fi
6586         
6587 fi
6588
6589 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6590
6591
6592                         if test $ol_cv_linux_threads = error; then
6593                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6594                         fi
6595
6596                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6597 echo "configure:6598: checking if pthread_create() works" >&5
6598                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6599   echo $ac_n "(cached) $ac_c" 1>&6
6600 else
6601   
6602                         if test "$cross_compiling" = yes; then
6603                                 ol_cv_pthread_create_works=yes
6604 else
6605   cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608
6609 #include <pthread.h>
6610 #ifndef NULL
6611 #define NULL (void*)0
6612 #endif
6613
6614 static void *task(p)
6615         void *p;
6616 {
6617         return (void *) (p == NULL);
6618 }
6619
6620 int main(argc, argv)
6621         int argc;
6622         char **argv;
6623 {
6624         pthread_t t;
6625 #if HAVE_PTHREADS_D4
6626         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6627 #else
6628         exit(pthread_create(&t, NULL, task, NULL));
6629 #endif
6630 }
6631
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6634 then
6635   ol_cv_pthread_create_works=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -fr conftest*
6640   ol_cv_pthread_create_works=no
6641 fi
6642 rm -fr conftest*
6643 fi
6644
6645 fi
6646
6647                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6648
6649                         if test $ol_cv_pthread_create_works = no ; then
6650                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6651                         fi
6652
6653                                                 if test $ol_with_yielding_select = auto ; then
6654                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6655 echo "configure:6656: checking if select yields when using pthreads" >&5
6656                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6657   echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6659   
6660                                 if test "$cross_compiling" = yes; then
6661   
6662                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6663 else
6664   cat > conftest.$ac_ext <<EOF
6665 #line 6666 "configure"
6666 #include "confdefs.h"
6667
6668 #include <sys/types.h>
6669 #include <sys/time.h>
6670 #include <unistd.h>
6671 #include <pthread.h>
6672 #ifndef NULL
6673 #define NULL (void*) 0
6674 #endif
6675
6676 static int fildes[2];
6677
6678 static void *task(p)
6679         void *p;
6680 {
6681         int i;
6682         struct timeval tv;
6683
6684         fd_set rfds;
6685
6686         tv.tv_sec=10;
6687         tv.tv_usec=0;
6688
6689         FD_ZERO(&rfds);
6690         FD_SET(fildes[0], &rfds);
6691
6692         /* we're not interested in any fds */
6693         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6694
6695         if(i < 0) {
6696                 perror("select");
6697                 exit(10);
6698         }
6699
6700         exit(0); /* if we exit here, the select blocked the whole process */
6701 }
6702
6703 int main(argc, argv)
6704         int argc;
6705         char **argv;
6706 {
6707         pthread_t t;
6708
6709         /* create a pipe to select */
6710         if(pipe(&fildes[0])) {
6711                 perror("select");
6712                 exit(1);
6713         }
6714
6715 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6716         (void) pthread_setconcurrency(2);
6717 #else
6718 #ifdef HAVE_THR_SETCONCURRENCY
6719         /* Set Solaris LWP concurrency to 2 */
6720         thr_setconcurrency(2);
6721 #endif
6722 #endif
6723
6724 #if HAVE_PTHREADS_D4
6725         pthread_create(&t, pthread_attr_default, task, NULL);
6726 #else
6727         pthread_create(&t, NULL, task, NULL);
6728 #endif
6729
6730 #if HAVE_SCHED_YIELD
6731         sched_yield();  /* make sure task runs first */
6732 #else
6733 #ifdef HAVE_PTHREAD_YIELD
6734         pthread_yield();        /* make sure task runs first */
6735 #endif
6736 #endif
6737
6738         exit(2);
6739 }
6740 EOF
6741 if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6742 then
6743   ol_cv_pthread_select_yields=no
6744 else
6745   echo "configure: failed program was:" >&5
6746   cat conftest.$ac_ext >&5
6747   rm -fr conftest*
6748   ol_cv_pthread_select_yields=yes
6749 fi
6750 rm -fr conftest*
6751 fi
6752
6753 fi
6754
6755                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6756
6757                                 if test $ol_cv_pthread_select_yields = yes ; then
6758                                         ol_with_yielding_select=yes
6759                                 fi
6760                         fi
6761
6762                                                 CPPFLAGS="$save_CPPFLAGS"
6763                         LIBS="$save_LIBS"
6764                 else
6765                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6766                 fi
6767         fi
6768
6769         if test $ol_with_threads = posix ; then
6770                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6771         fi
6772 fi
6773
6774 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6775         -o $ol_with_threads = mach ; then
6776
6777                 for ac_hdr in mach/cthreads.h
6778 do
6779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6781 echo "configure:6782: checking for $ac_hdr" >&5
6782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6783   echo $ac_n "(cached) $ac_c" 1>&6
6784 else
6785   cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 #include <$ac_hdr>
6789 EOF
6790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6791 { (eval echo configure:6792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6793 if test -z "$ac_err"; then
6794   rm -rf conftest*
6795   eval "ac_cv_header_$ac_safe=yes"
6796 else
6797   echo "$ac_err" >&5
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   eval "ac_cv_header_$ac_safe=no"
6802 fi
6803 rm -f conftest*
6804 fi
6805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6806   echo "$ac_t""yes" 1>&6
6807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6808   cat >> confdefs.h <<EOF
6809 #define $ac_tr_hdr 1
6810 EOF
6811  
6812 else
6813   echo "$ac_t""no" 1>&6
6814 fi
6815 done
6816
6817         if test $ac_cv_header_mach_cthreads_h = yes ; then
6818                 ol_with_threads=found
6819
6820                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6821 echo "configure:6822: checking for cthread_fork" >&5
6822 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6823   echo $ac_n "(cached) $ac_c" 1>&6
6824 else
6825   cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 /* System header to define __stub macros and hopefully few prototypes,
6829     which can conflict with char cthread_fork(); below.  */
6830 #include <assert.h>
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 /* We use char because int might match the return type of a gcc2
6833     builtin and then its argument prototype would still apply.  */
6834 char cthread_fork();
6835
6836 int main() {
6837
6838 /* The GNU C library defines this for functions which it implements
6839     to always fail with ENOSYS.  Some functions are actually named
6840     something starting with __ and the normal name is an alias.  */
6841 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6842 choke me
6843 #else
6844 cthread_fork();
6845 #endif
6846
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850   rm -rf conftest*
6851   eval "ac_cv_func_cthread_fork=yes"
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   eval "ac_cv_func_cthread_fork=no"
6857 fi
6858 rm -f conftest*
6859 fi
6860
6861 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863   ol_link_threads=yes
6864 else
6865   echo "$ac_t""no" 1>&6
6866 fi
6867
6868
6869                 if test $ol_link_threads = no ; then
6870                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6871 echo "configure:6872: checking for cthread_fork with -all_load" >&5
6872 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6873   echo $ac_n "(cached) $ac_c" 1>&6
6874 else
6875   
6876                                                                 save_LIBS="$LIBS"
6877                                 LIBS="-all_load $LIBS"
6878                                 cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881 #include <mach/cthreads.h>
6882 int main() {
6883
6884                                         cthread_fork((void *)0, (void *)0);
6885                                         
6886 ; return 0; }
6887 EOF
6888 if { (eval echo configure:6889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6889   rm -rf conftest*
6890   ol_cv_cthread_all_load=yes
6891 else
6892   echo "configure: failed program was:" >&5
6893   cat conftest.$ac_ext >&5
6894   rm -rf conftest*
6895   ol_cv_cthread_all_load=no
6896 fi
6897 rm -f conftest*
6898                                                                 LIBS="$save_LIBS"
6899                         
6900 fi
6901
6902 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6903
6904                         if test $ol_cv_cthread_all_load = yes ; then
6905                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6906                                 ol_link_threads=mach
6907                         fi
6908                 fi
6909
6910                 if test $ol_link_threads != no ; then
6911                         : check for cthread specific functionality here
6912                         cat >> confdefs.h <<\EOF
6913 #define HAVE_MACH_CTHREADS 1
6914 EOF
6915
6916                 else
6917                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6918                 fi
6919         fi
6920
6921         if test $ol_with_threads = mach ; then
6922                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6923         fi
6924 fi
6925
6926 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6927         -o $ol_with_threads = lwp ; then
6928
6929                 for ac_hdr in thread.h synch.h
6930 do
6931 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6932 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6933 echo "configure:6934: checking for $ac_hdr" >&5
6934 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6935   echo $ac_n "(cached) $ac_c" 1>&6
6936 else
6937   cat > conftest.$ac_ext <<EOF
6938 #line 6939 "configure"
6939 #include "confdefs.h"
6940 #include <$ac_hdr>
6941 EOF
6942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6943 { (eval echo configure:6944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6945 if test -z "$ac_err"; then
6946   rm -rf conftest*
6947   eval "ac_cv_header_$ac_safe=yes"
6948 else
6949   echo "$ac_err" >&5
6950   echo "configure: failed program was:" >&5
6951   cat conftest.$ac_ext >&5
6952   rm -rf conftest*
6953   eval "ac_cv_header_$ac_safe=no"
6954 fi
6955 rm -f conftest*
6956 fi
6957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6958   echo "$ac_t""yes" 1>&6
6959     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6960   cat >> confdefs.h <<EOF
6961 #define $ac_tr_hdr 1
6962 EOF
6963  
6964 else
6965   echo "$ac_t""no" 1>&6
6966 fi
6967 done
6968
6969         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6970                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6971 echo "configure:6972: checking for thr_create in -lthread" >&5
6972 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6973 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6974   echo $ac_n "(cached) $ac_c" 1>&6
6975 else
6976   ac_save_LIBS="$LIBS"
6977 LIBS="-lthread  $LIBS"
6978 cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981 /* Override any gcc2 internal prototype to avoid an error.  */
6982 /* We use char because int might match the return type of a gcc2
6983     builtin and then its argument prototype would still apply.  */
6984 char thr_create();
6985
6986 int main() {
6987 thr_create()
6988 ; return 0; }
6989 EOF
6990 if { (eval echo configure:6991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6991   rm -rf conftest*
6992   eval "ac_cv_lib_$ac_lib_var=yes"
6993 else
6994   echo "configure: failed program was:" >&5
6995   cat conftest.$ac_ext >&5
6996   rm -rf conftest*
6997   eval "ac_cv_lib_$ac_lib_var=no"
6998 fi
6999 rm -f conftest*
7000 LIBS="$ac_save_LIBS"
7001
7002 fi
7003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7004   echo "$ac_t""yes" 1>&6
7005   have_thr=yes
7006 else
7007   echo "$ac_t""no" 1>&6
7008 have_thr=no
7009 fi
7010
7011
7012                 if test $have_thr = yes ; then
7013                         cat >> confdefs.h <<\EOF
7014 #define HAVE_THR 1
7015 EOF
7016
7017                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7018                         ol_link_threads=thr
7019
7020                         if test $ol_with_yielding_select = auto ; then
7021                                 ol_with_yielding_select=yes
7022                         fi
7023
7024                                                 for ac_func in \
7025                                 thr_setconcurrency \
7026                                 thr_getconcurrency \
7027                         
7028 do
7029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7030 echo "configure:7031: checking for $ac_func" >&5
7031 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7032   echo $ac_n "(cached) $ac_c" 1>&6
7033 else
7034   cat > conftest.$ac_ext <<EOF
7035 #line 7036 "configure"
7036 #include "confdefs.h"
7037 /* System header to define __stub macros and hopefully few prototypes,
7038     which can conflict with char $ac_func(); below.  */
7039 #include <assert.h>
7040 /* Override any gcc2 internal prototype to avoid an error.  */
7041 /* We use char because int might match the return type of a gcc2
7042     builtin and then its argument prototype would still apply.  */
7043 char $ac_func();
7044
7045 int main() {
7046
7047 /* The GNU C library defines this for functions which it implements
7048     to always fail with ENOSYS.  Some functions are actually named
7049     something starting with __ and the normal name is an alias.  */
7050 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7051 choke me
7052 #else
7053 $ac_func();
7054 #endif
7055
7056 ; return 0; }
7057 EOF
7058 if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7059   rm -rf conftest*
7060   eval "ac_cv_func_$ac_func=yes"
7061 else
7062   echo "configure: failed program was:" >&5
7063   cat conftest.$ac_ext >&5
7064   rm -rf conftest*
7065   eval "ac_cv_func_$ac_func=no"
7066 fi
7067 rm -f conftest*
7068 fi
7069
7070 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7071   echo "$ac_t""yes" 1>&6
7072     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7073   cat >> confdefs.h <<EOF
7074 #define $ac_tr_func 1
7075 EOF
7076  
7077 else
7078   echo "$ac_t""no" 1>&6
7079 fi
7080 done
7081
7082                 fi
7083         fi
7084
7085                 for ac_hdr in lwp/lwp.h
7086 do
7087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7089 echo "configure:7090: checking for $ac_hdr" >&5
7090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7091   echo $ac_n "(cached) $ac_c" 1>&6
7092 else
7093   cat > conftest.$ac_ext <<EOF
7094 #line 7095 "configure"
7095 #include "confdefs.h"
7096 #include <$ac_hdr>
7097 EOF
7098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7099 { (eval echo configure:7100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7101 if test -z "$ac_err"; then
7102   rm -rf conftest*
7103   eval "ac_cv_header_$ac_safe=yes"
7104 else
7105   echo "$ac_err" >&5
7106   echo "configure: failed program was:" >&5
7107   cat conftest.$ac_ext >&5
7108   rm -rf conftest*
7109   eval "ac_cv_header_$ac_safe=no"
7110 fi
7111 rm -f conftest*
7112 fi
7113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7114   echo "$ac_t""yes" 1>&6
7115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7116   cat >> confdefs.h <<EOF
7117 #define $ac_tr_hdr 1
7118 EOF
7119  
7120 else
7121   echo "$ac_t""no" 1>&6
7122 fi
7123 done
7124
7125         if test $ac_cv_header_lwp_lwp_h = yes ; then
7126                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7127 echo "configure:7128: checking for lwp_create in -llwp" >&5
7128 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
7129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7130   echo $ac_n "(cached) $ac_c" 1>&6
7131 else
7132   ac_save_LIBS="$LIBS"
7133 LIBS="-llwp  $LIBS"
7134 cat > conftest.$ac_ext <<EOF
7135 #line 7136 "configure"
7136 #include "confdefs.h"
7137 /* Override any gcc2 internal prototype to avoid an error.  */
7138 /* We use char because int might match the return type of a gcc2
7139     builtin and then its argument prototype would still apply.  */
7140 char lwp_create();
7141
7142 int main() {
7143 lwp_create()
7144 ; return 0; }
7145 EOF
7146 if { (eval echo configure:7147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7147   rm -rf conftest*
7148   eval "ac_cv_lib_$ac_lib_var=yes"
7149 else
7150   echo "configure: failed program was:" >&5
7151   cat conftest.$ac_ext >&5
7152   rm -rf conftest*
7153   eval "ac_cv_lib_$ac_lib_var=no"
7154 fi
7155 rm -f conftest*
7156 LIBS="$ac_save_LIBS"
7157
7158 fi
7159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7160   echo "$ac_t""yes" 1>&6
7161   have_lwp=yes
7162 else
7163   echo "$ac_t""no" 1>&6
7164 have_lwp=no
7165 fi
7166
7167
7168                 if test $have_lwp = yes ; then
7169                         cat >> confdefs.h <<\EOF
7170 #define HAVE_LWP 1
7171 EOF
7172
7173                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7174                         ol_link_threads=lwp
7175
7176                         if test $ol_with_yielding_select = auto ; then
7177                                 ol_with_yielding_select=no
7178                         fi
7179                 fi
7180         fi
7181 fi
7182
7183 if test $ol_with_yielding_select = yes ; then
7184         cat >> confdefs.h <<\EOF
7185 #define HAVE_YIELDING_SELECT 1
7186 EOF
7187
7188 fi
7189
7190 if test $ol_with_threads = manual ; then
7191                 ol_link_threads=yes
7192
7193         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7194
7195         for ac_hdr in pthread.h sched.h
7196 do
7197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7199 echo "configure:7200: checking for $ac_hdr" >&5
7200 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7201   echo $ac_n "(cached) $ac_c" 1>&6
7202 else
7203   cat > conftest.$ac_ext <<EOF
7204 #line 7205 "configure"
7205 #include "confdefs.h"
7206 #include <$ac_hdr>
7207 EOF
7208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7209 { (eval echo configure:7210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7211 if test -z "$ac_err"; then
7212   rm -rf conftest*
7213   eval "ac_cv_header_$ac_safe=yes"
7214 else
7215   echo "$ac_err" >&5
7216   echo "configure: failed program was:" >&5
7217   cat conftest.$ac_ext >&5
7218   rm -rf conftest*
7219   eval "ac_cv_header_$ac_safe=no"
7220 fi
7221 rm -f conftest*
7222 fi
7223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7224   echo "$ac_t""yes" 1>&6
7225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7226   cat >> confdefs.h <<EOF
7227 #define $ac_tr_hdr 1
7228 EOF
7229  
7230 else
7231   echo "$ac_t""no" 1>&6
7232 fi
7233 done
7234
7235         for ac_func in sched_yield pthread_yield
7236 do
7237 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7238 echo "configure:7239: checking for $ac_func" >&5
7239 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7240   echo $ac_n "(cached) $ac_c" 1>&6
7241 else
7242   cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 /* System header to define __stub macros and hopefully few prototypes,
7246     which can conflict with char $ac_func(); below.  */
7247 #include <assert.h>
7248 /* Override any gcc2 internal prototype to avoid an error.  */
7249 /* We use char because int might match the return type of a gcc2
7250     builtin and then its argument prototype would still apply.  */
7251 char $ac_func();
7252
7253 int main() {
7254
7255 /* The GNU C library defines this for functions which it implements
7256     to always fail with ENOSYS.  Some functions are actually named
7257     something starting with __ and the normal name is an alias.  */
7258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7259 choke me
7260 #else
7261 $ac_func();
7262 #endif
7263
7264 ; return 0; }
7265 EOF
7266 if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7267   rm -rf conftest*
7268   eval "ac_cv_func_$ac_func=yes"
7269 else
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -rf conftest*
7273   eval "ac_cv_func_$ac_func=no"
7274 fi
7275 rm -f conftest*
7276 fi
7277
7278 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7279   echo "$ac_t""yes" 1>&6
7280     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7281   cat >> confdefs.h <<EOF
7282 #define $ac_tr_func 1
7283 EOF
7284  
7285 else
7286   echo "$ac_t""no" 1>&6
7287 fi
7288 done
7289
7290         
7291         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7292 echo "configure:7293: checking for LinuxThreads pthread.h" >&5
7293 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
7294   echo $ac_n "(cached) $ac_c" 1>&6
7295 else
7296   cat > conftest.$ac_ext <<EOF
7297 #line 7298 "configure"
7298 #include "confdefs.h"
7299 #include <pthread.h>
7300 EOF
7301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7302   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7303   rm -rf conftest*
7304   ol_cv_header_linux_threads=yes
7305 else
7306   rm -rf conftest*
7307   ol_cv_header_linux_threads=no
7308 fi
7309 rm -f conftest*
7310
7311                 
7312 fi
7313
7314 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7315         if test $ol_cv_header_linux_threads = yes; then
7316                 cat >> confdefs.h <<\EOF
7317 #define HAVE_LINUX_THREADS 1
7318 EOF
7319
7320         fi
7321
7322
7323         for ac_hdr in mach/cthreads.h
7324 do
7325 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7326 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7327 echo "configure:7328: checking for $ac_hdr" >&5
7328 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   cat > conftest.$ac_ext <<EOF
7332 #line 7333 "configure"
7333 #include "confdefs.h"
7334 #include <$ac_hdr>
7335 EOF
7336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7337 { (eval echo configure:7338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7339 if test -z "$ac_err"; then
7340   rm -rf conftest*
7341   eval "ac_cv_header_$ac_safe=yes"
7342 else
7343   echo "$ac_err" >&5
7344   echo "configure: failed program was:" >&5
7345   cat conftest.$ac_ext >&5
7346   rm -rf conftest*
7347   eval "ac_cv_header_$ac_safe=no"
7348 fi
7349 rm -f conftest*
7350 fi
7351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7352   echo "$ac_t""yes" 1>&6
7353     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7354   cat >> confdefs.h <<EOF
7355 #define $ac_tr_hdr 1
7356 EOF
7357  
7358 else
7359   echo "$ac_t""no" 1>&6
7360 fi
7361 done
7362
7363         for ac_hdr in lwp/lwp.h
7364 do
7365 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7366 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7367 echo "configure:7368: checking for $ac_hdr" >&5
7368 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7369   echo $ac_n "(cached) $ac_c" 1>&6
7370 else
7371   cat > conftest.$ac_ext <<EOF
7372 #line 7373 "configure"
7373 #include "confdefs.h"
7374 #include <$ac_hdr>
7375 EOF
7376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7377 { (eval echo configure:7378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7379 if test -z "$ac_err"; then
7380   rm -rf conftest*
7381   eval "ac_cv_header_$ac_safe=yes"
7382 else
7383   echo "$ac_err" >&5
7384   echo "configure: failed program was:" >&5
7385   cat conftest.$ac_ext >&5
7386   rm -rf conftest*
7387   eval "ac_cv_header_$ac_safe=no"
7388 fi
7389 rm -f conftest*
7390 fi
7391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7392   echo "$ac_t""yes" 1>&6
7393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7394   cat >> confdefs.h <<EOF
7395 #define $ac_tr_hdr 1
7396 EOF
7397  
7398 else
7399   echo "$ac_t""no" 1>&6
7400 fi
7401 done
7402
7403         for ac_hdr in thread.h synch.h
7404 do
7405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7407 echo "configure:7408: checking for $ac_hdr" >&5
7408 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7409   echo $ac_n "(cached) $ac_c" 1>&6
7410 else
7411   cat > conftest.$ac_ext <<EOF
7412 #line 7413 "configure"
7413 #include "confdefs.h"
7414 #include <$ac_hdr>
7415 EOF
7416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7417 { (eval echo configure:7418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7419 if test -z "$ac_err"; then
7420   rm -rf conftest*
7421   eval "ac_cv_header_$ac_safe=yes"
7422 else
7423   echo "$ac_err" >&5
7424   echo "configure: failed program was:" >&5
7425   cat conftest.$ac_ext >&5
7426   rm -rf conftest*
7427   eval "ac_cv_header_$ac_safe=no"
7428 fi
7429 rm -f conftest*
7430 fi
7431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7432   echo "$ac_t""yes" 1>&6
7433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7434   cat >> confdefs.h <<EOF
7435 #define $ac_tr_hdr 1
7436 EOF
7437  
7438 else
7439   echo "$ac_t""no" 1>&6
7440 fi
7441 done
7442
7443 fi
7444
7445 if test $ol_link_threads != no ; then  
7446                         cat >> confdefs.h <<\EOF
7447 #define REENTRANT 1
7448 EOF
7449
7450         cat >> confdefs.h <<\EOF
7451 #define _REENTRANT 1
7452 EOF
7453
7454         cat >> confdefs.h <<\EOF
7455 #define THREAD_SAFE 1
7456 EOF
7457
7458         cat >> confdefs.h <<\EOF
7459 #define _THREAD_SAFE 1
7460 EOF
7461
7462         cat >> confdefs.h <<\EOF
7463 #define THREADSAFE 1
7464 EOF
7465
7466         cat >> confdefs.h <<\EOF
7467 #define _THREADSAFE 1
7468 EOF
7469
7470         cat >> confdefs.h <<\EOF
7471 #define _SGI_MP_SOURCE 1
7472 EOF
7473
7474
7475                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7476 echo "configure:7477: checking for thread specific errno" >&5
7477 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7478   echo $ac_n "(cached) $ac_c" 1>&6
7479 else
7480   
7481                 cat > conftest.$ac_ext <<EOF
7482 #line 7483 "configure"
7483 #include "confdefs.h"
7484 #include <errno.h>
7485 int main() {
7486 errno = 0;
7487 ; return 0; }
7488 EOF
7489 if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7490   rm -rf conftest*
7491   ol_cv_errno_thread_specific=yes
7492 else
7493   echo "configure: failed program was:" >&5
7494   cat conftest.$ac_ext >&5
7495   rm -rf conftest*
7496   ol_cv_errno_thread_specific=no
7497 fi
7498 rm -f conftest*
7499         
7500 fi
7501
7502 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7503
7504                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
7505 echo "configure:7506: checking for thread specific h_errno" >&5
7506 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
7507   echo $ac_n "(cached) $ac_c" 1>&6
7508 else
7509   
7510                 cat > conftest.$ac_ext <<EOF
7511 #line 7512 "configure"
7512 #include "confdefs.h"
7513 #include <netdb.h>
7514 int main() {
7515 h_errno = 0;
7516 ; return 0; }
7517 EOF
7518 if { (eval echo configure:7519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7519   rm -rf conftest*
7520   ol_cv_h_errno_thread_specific=yes
7521 else
7522   echo "configure: failed program was:" >&5
7523   cat conftest.$ac_ext >&5
7524   rm -rf conftest*
7525   ol_cv_h_errno_thread_specific=no
7526 fi
7527 rm -f conftest*
7528         
7529 fi
7530
7531 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
7532
7533         if test $ol_cv_errno_thread_specific != yes \
7534                 -o $ol_cv_h_errno_thread_specific != yes ; then
7535                 LIBS="$LTHREAD_LIBS $LIBS"
7536                 LTHREAD_LIBS=""
7537         fi
7538
7539 fi  
7540
7541 if test $ol_link_threads = no ; then
7542         if test $ol_with_threads = yes ; then
7543                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7544         fi
7545
7546         if test $ol_with_threads = auto ; then
7547                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7548                 ol_with_threads=no
7549         fi
7550
7551         cat >> confdefs.h <<\EOF
7552 #define NO_THREADS 1
7553 EOF
7554
7555         LTHREAD_LIBS=""
7556 fi
7557
7558 if test $ol_link_threads != no ; then
7559         cat >> confdefs.h <<\EOF
7560 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7561 EOF
7562
7563 fi
7564
7565
7566 ol_link_ldbm=no 
7567 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7568         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7569 echo "configure:7570: checking for DB2 library" >&5
7570 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7571   echo $ac_n "(cached) $ac_c" 1>&6
7572 else
7573         ol_LIBS="$LIBS"
7574         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7575 echo "configure:7576: checking for db_open in -ldb" >&5
7576 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7578   echo $ac_n "(cached) $ac_c" 1>&6
7579 else
7580   ac_save_LIBS="$LIBS"
7581 LIBS="-ldb  $LIBS"
7582 cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char db_open();
7589
7590 int main() {
7591 db_open()
7592 ; return 0; }
7593 EOF
7594 if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7595   rm -rf conftest*
7596   eval "ac_cv_lib_$ac_lib_var=yes"
7597 else
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_lib_$ac_lib_var=no"
7602 fi
7603 rm -f conftest*
7604 LIBS="$ac_save_LIBS"
7605
7606 fi
7607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7608   echo "$ac_t""yes" 1>&6
7609   ol_cv_lib_db2=-ldb
7610 else
7611   echo "$ac_t""no" 1>&6
7612 ol_cv_lib_db2=no
7613 fi
7614
7615         LIBS="$ol_LIBS"
7616
7617 fi
7618
7619 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7620
7621 for ac_hdr in db.h
7622 do
7623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7625 echo "configure:7626: checking for $ac_hdr" >&5
7626 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7627   echo $ac_n "(cached) $ac_c" 1>&6
7628 else
7629   cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7632 #include <$ac_hdr>
7633 EOF
7634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7635 { (eval echo configure:7636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7637 if test -z "$ac_err"; then
7638   rm -rf conftest*
7639   eval "ac_cv_header_$ac_safe=yes"
7640 else
7641   echo "$ac_err" >&5
7642   echo "configure: failed program was:" >&5
7643   cat conftest.$ac_ext >&5
7644   rm -rf conftest*
7645   eval "ac_cv_header_$ac_safe=no"
7646 fi
7647 rm -f conftest*
7648 fi
7649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7650   echo "$ac_t""yes" 1>&6
7651     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7652   cat >> confdefs.h <<EOF
7653 #define $ac_tr_hdr 1
7654 EOF
7655  
7656 else
7657   echo "$ac_t""no" 1>&6
7658 fi
7659 done
7660
7661 if test $ac_cv_header_db_h = yes ; then
7662         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7663 echo "configure:7664: checking if db.h is DB2" >&5
7664 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7665   echo $ac_n "(cached) $ac_c" 1>&6
7666 else
7667   
7668                 cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671
7672 #                       include <db.h>
7673                         /* this check could be improved */
7674 #                       ifdef DB_VERSION_MAJOR
7675 #                               if DB_VERSION_MAJOR == 2
7676                                         __db_version_2
7677 #                               endif
7678 #                       endif
7679                 
7680 EOF
7681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7682   egrep "__db_version_2" >/dev/null 2>&1; then
7683   rm -rf conftest*
7684   ol_cv_header_db2=yes
7685 else
7686   rm -rf conftest*
7687   ol_cv_header_db2=no
7688 fi
7689 rm -f conftest*
7690
7691 fi
7692
7693 echo "$ac_t""$ol_cv_header_db2" 1>&6
7694 else
7695         ol_cv_header_db2=no
7696 fi
7697
7698
7699  
7700  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7701 echo "configure:7702: checking for Berkeley DB2" >&5
7702 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7703   echo $ac_n "(cached) $ac_c" 1>&6
7704 else
7705   
7706         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7707                 ol_cv_berkeley_db2=no
7708         else
7709                 ol_cv_berkeley_db2=yes
7710         fi
7711
7712 fi
7713
7714 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7715  if test $ol_cv_berkeley_db2 = yes ; then
7716         cat >> confdefs.h <<\EOF
7717 #define HAVE_BERKELEY_DB2 1
7718 EOF
7719
7720  fi
7721
7722
7723         if test $ol_cv_berkeley_db2 = yes ; then
7724                 ol_link_ldbm=db2
7725                 ol_with_ldbm_api=db2
7726
7727                 if test $ol_with_ldbm_type = hash ; then
7728                         cat >> confdefs.h <<\EOF
7729 #define LDBM_USE_DBHASH 1
7730 EOF
7731
7732                 else
7733                         cat >> confdefs.h <<\EOF
7734 #define LDBM_USE_DBBTREE 1
7735 EOF
7736
7737                 fi
7738
7739                                                 if test $ol_cv_lib_db2 != yes ; then
7740                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7741                 fi
7742         fi
7743 fi
7744
7745 ol_link_bdb2=no
7746 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7747         ol_link_bdb2=yes
7748 fi
7749
7750 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7751         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7752 echo "configure:7753: checking for Berkeley DB library" >&5
7753 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7754   echo $ac_n "(cached) $ac_c" 1>&6
7755 else
7756   
7757         for ac_hdr in db1/db.h
7758 do
7759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7761 echo "configure:7762: checking for $ac_hdr" >&5
7762 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7763   echo $ac_n "(cached) $ac_c" 1>&6
7764 else
7765   cat > conftest.$ac_ext <<EOF
7766 #line 7767 "configure"
7767 #include "confdefs.h"
7768 #include <$ac_hdr>
7769 EOF
7770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7771 { (eval echo configure:7772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7773 if test -z "$ac_err"; then
7774   rm -rf conftest*
7775   eval "ac_cv_header_$ac_safe=yes"
7776 else
7777   echo "$ac_err" >&5
7778   echo "configure: failed program was:" >&5
7779   cat conftest.$ac_ext >&5
7780   rm -rf conftest*
7781   eval "ac_cv_header_$ac_safe=no"
7782 fi
7783 rm -f conftest*
7784 fi
7785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7786   echo "$ac_t""yes" 1>&6
7787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7788   cat >> confdefs.h <<EOF
7789 #define $ac_tr_hdr 1
7790 EOF
7791  
7792 else
7793   echo "$ac_t""no" 1>&6
7794 fi
7795 done
7796
7797         ol_LIBS="$LIBS"
7798         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7799 echo "configure:7800: checking for dbopen" >&5
7800 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7801   echo $ac_n "(cached) $ac_c" 1>&6
7802 else
7803   cat > conftest.$ac_ext <<EOF
7804 #line 7805 "configure"
7805 #include "confdefs.h"
7806 /* System header to define __stub macros and hopefully few prototypes,
7807     which can conflict with char dbopen(); below.  */
7808 #include <assert.h>
7809 /* Override any gcc2 internal prototype to avoid an error.  */
7810 /* We use char because int might match the return type of a gcc2
7811     builtin and then its argument prototype would still apply.  */
7812 char dbopen();
7813
7814 int main() {
7815
7816 /* The GNU C library defines this for functions which it implements
7817     to always fail with ENOSYS.  Some functions are actually named
7818     something starting with __ and the normal name is an alias.  */
7819 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7820 choke me
7821 #else
7822 dbopen();
7823 #endif
7824
7825 ; return 0; }
7826 EOF
7827 if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7828   rm -rf conftest*
7829   eval "ac_cv_func_dbopen=yes"
7830 else
7831   echo "configure: failed program was:" >&5
7832   cat conftest.$ac_ext >&5
7833   rm -rf conftest*
7834   eval "ac_cv_func_dbopen=no"
7835 fi
7836 rm -f conftest*
7837 fi
7838
7839 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7840   echo "$ac_t""yes" 1>&6
7841   ol_cv_lib_db=yes
7842 else
7843   echo "$ac_t""no" 1>&6
7844
7845                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
7846 echo "configure:7847: checking for dbopen in -ldb1" >&5
7847 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
7848 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7849   echo $ac_n "(cached) $ac_c" 1>&6
7850 else
7851   ac_save_LIBS="$LIBS"
7852 LIBS="-ldb1  $LIBS"
7853 cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856 /* Override any gcc2 internal prototype to avoid an error.  */
7857 /* We use char because int might match the return type of a gcc2
7858     builtin and then its argument prototype would still apply.  */
7859 char dbopen();
7860
7861 int main() {
7862 dbopen()
7863 ; return 0; }
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7866   rm -rf conftest*
7867   eval "ac_cv_lib_$ac_lib_var=yes"
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -rf conftest*
7872   eval "ac_cv_lib_$ac_lib_var=no"
7873 fi
7874 rm -f conftest*
7875 LIBS="$ac_save_LIBS"
7876
7877 fi
7878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7879   echo "$ac_t""yes" 1>&6
7880   ol_cv_lib_db=-ldb1
7881 else
7882   echo "$ac_t""no" 1>&6
7883
7884                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7885 echo "configure:7886: checking for dbopen in -ldb" >&5
7886 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7887 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890   ac_save_LIBS="$LIBS"
7891 LIBS="-ldb  $LIBS"
7892 cat > conftest.$ac_ext <<EOF
7893 #line 7894 "configure"
7894 #include "confdefs.h"
7895 /* Override any gcc2 internal prototype to avoid an error.  */
7896 /* We use char because int might match the return type of a gcc2
7897     builtin and then its argument prototype would still apply.  */
7898 char dbopen();
7899
7900 int main() {
7901 dbopen()
7902 ; return 0; }
7903 EOF
7904 if { (eval echo configure:7905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7905   rm -rf conftest*
7906   eval "ac_cv_lib_$ac_lib_var=yes"
7907 else
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   eval "ac_cv_lib_$ac_lib_var=no"
7912 fi
7913 rm -f conftest*
7914 LIBS="$ac_save_LIBS"
7915
7916 fi
7917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7918   echo "$ac_t""yes" 1>&6
7919   ol_cv_lib_db=-ldb
7920 else
7921   echo "$ac_t""no" 1>&6
7922 ol_cv_lib_db=no
7923 fi
7924
7925                 
7926 fi
7927
7928         
7929 fi
7930
7931         LIBS="$ol_LIBS"
7932
7933 fi
7934
7935 echo "$ac_t""$ol_cv_lib_db" 1>&6
7936
7937
7938 for ac_hdr in db_185.h
7939 do
7940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7942 echo "configure:7943: checking for $ac_hdr" >&5
7943 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7944   echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7946   cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949 #include <$ac_hdr>
7950 EOF
7951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7952 { (eval echo configure:7953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7954 if test -z "$ac_err"; then
7955   rm -rf conftest*
7956   eval "ac_cv_header_$ac_safe=yes"
7957 else
7958   echo "$ac_err" >&5
7959   echo "configure: failed program was:" >&5
7960   cat conftest.$ac_ext >&5
7961   rm -rf conftest*
7962   eval "ac_cv_header_$ac_safe=no"
7963 fi
7964 rm -f conftest*
7965 fi
7966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7967   echo "$ac_t""yes" 1>&6
7968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7969   cat >> confdefs.h <<EOF
7970 #define $ac_tr_hdr 1
7971 EOF
7972  
7973 else
7974   echo "$ac_t""no" 1>&6
7975 fi
7976 done
7977
7978 if test "$ol_cv_header_db2" = yes ; then
7979         
7980         ol_cv_header_db=$ac_cv_header_db_185_h
7981 else
7982         ol_cv_header_db=$ac_cv_header_db_h
7983 fi
7984
7985
7986  
7987  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7988 echo "configure:7989: checking for Berkeley DB" >&5
7989 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   
7993         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7994                 ol_cv_berkeley_db=no
7995         else
7996                 ol_cv_berkeley_db=yes
7997         fi
7998
7999 fi
8000
8001 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8002  if test $ol_cv_berkeley_db = yes ; then
8003         cat >> confdefs.h <<\EOF
8004 #define HAVE_BERKELEY_DB 1
8005 EOF
8006
8007  fi
8008
8009
8010         if test $ol_cv_berkeley_db = yes ; then
8011                 ol_link_ldbm=db
8012                 ol_with_ldbm_api=db
8013
8014                 if test $ol_with_ldbm_type = hash ; then
8015                         cat >> confdefs.h <<\EOF
8016 #define LDBM_USE_DBHASH 1
8017 EOF
8018
8019                 else
8020                         cat >> confdefs.h <<\EOF
8021 #define LDBM_USE_DBBTREE 1
8022 EOF
8023
8024                 fi
8025
8026                                                 if test $ol_cv_lib_db != yes ; then
8027                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8028                 fi
8029         fi
8030 fi
8031
8032 if test $ol_with_ldbm_api = manual ; then
8033                 ol_link_ldbm=yes
8034
8035         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8036
8037         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8038 do
8039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8041 echo "configure:8042: checking for $ac_hdr" >&5
8042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8043   echo $ac_n "(cached) $ac_c" 1>&6
8044 else
8045   cat > conftest.$ac_ext <<EOF
8046 #line 8047 "configure"
8047 #include "confdefs.h"
8048 #include <$ac_hdr>
8049 EOF
8050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8051 { (eval echo configure:8052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8053 if test -z "$ac_err"; then
8054   rm -rf conftest*
8055   eval "ac_cv_header_$ac_safe=yes"
8056 else
8057   echo "$ac_err" >&5
8058   echo "configure: failed program was:" >&5
8059   cat conftest.$ac_ext >&5
8060   rm -rf conftest*
8061   eval "ac_cv_header_$ac_safe=no"
8062 fi
8063 rm -f conftest*
8064 fi
8065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8066   echo "$ac_t""yes" 1>&6
8067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8068   cat >> confdefs.h <<EOF
8069 #define $ac_tr_hdr 1
8070 EOF
8071  
8072 else
8073   echo "$ac_t""no" 1>&6
8074 fi
8075 done
8076
8077 fi
8078
8079 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8080         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8081         ol_with_ldbm_api=none
8082 fi
8083
8084 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8085         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8086 echo "configure:8087: checking for MDBM library" >&5
8087 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090         ol_LIBS="$LIBS"
8091         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8092 echo "configure:8093: checking for mdbm_set_chain" >&5
8093 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
8094   echo $ac_n "(cached) $ac_c" 1>&6
8095 else
8096   cat > conftest.$ac_ext <<EOF
8097 #line 8098 "configure"
8098 #include "confdefs.h"
8099 /* System header to define __stub macros and hopefully few prototypes,
8100     which can conflict with char mdbm_set_chain(); below.  */
8101 #include <assert.h>
8102 /* Override any gcc2 internal prototype to avoid an error.  */
8103 /* We use char because int might match the return type of a gcc2
8104     builtin and then its argument prototype would still apply.  */
8105 char mdbm_set_chain();
8106
8107 int main() {
8108
8109 /* The GNU C library defines this for functions which it implements
8110     to always fail with ENOSYS.  Some functions are actually named
8111     something starting with __ and the normal name is an alias.  */
8112 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8113 choke me
8114 #else
8115 mdbm_set_chain();
8116 #endif
8117
8118 ; return 0; }
8119 EOF
8120 if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8121   rm -rf conftest*
8122   eval "ac_cv_func_mdbm_set_chain=yes"
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -rf conftest*
8127   eval "ac_cv_func_mdbm_set_chain=no"
8128 fi
8129 rm -f conftest*
8130 fi
8131
8132 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8133   echo "$ac_t""yes" 1>&6
8134   ol_cv_lib_mdbm=yes
8135 else
8136   echo "$ac_t""no" 1>&6
8137
8138                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8139 echo "configure:8140: checking for mdbm_set_chain in -lmdbm" >&5
8140 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
8141 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8142   echo $ac_n "(cached) $ac_c" 1>&6
8143 else
8144   ac_save_LIBS="$LIBS"
8145 LIBS="-lmdbm  $LIBS"
8146 cat > conftest.$ac_ext <<EOF
8147 #line 8148 "configure"
8148 #include "confdefs.h"
8149 /* Override any gcc2 internal prototype to avoid an error.  */
8150 /* We use char because int might match the return type of a gcc2
8151     builtin and then its argument prototype would still apply.  */
8152 char mdbm_set_chain();
8153
8154 int main() {
8155 mdbm_set_chain()
8156 ; return 0; }
8157 EOF
8158 if { (eval echo configure:8159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8159   rm -rf conftest*
8160   eval "ac_cv_lib_$ac_lib_var=yes"
8161 else
8162   echo "configure: failed program was:" >&5
8163   cat conftest.$ac_ext >&5
8164   rm -rf conftest*
8165   eval "ac_cv_lib_$ac_lib_var=no"
8166 fi
8167 rm -f conftest*
8168 LIBS="$ac_save_LIBS"
8169
8170 fi
8171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8172   echo "$ac_t""yes" 1>&6
8173   ol_cv_lib_mdbm=-lmdbm
8174 else
8175   echo "$ac_t""no" 1>&6
8176 ol_cv_lib_mdbm=no
8177 fi
8178
8179         
8180 fi
8181
8182         LIBS="$ol_LIBS"
8183
8184 fi
8185
8186 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8187
8188
8189  for ac_hdr in mdbm.h
8190 do
8191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8193 echo "configure:8194: checking for $ac_hdr" >&5
8194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8195   echo $ac_n "(cached) $ac_c" 1>&6
8196 else
8197   cat > conftest.$ac_ext <<EOF
8198 #line 8199 "configure"
8199 #include "confdefs.h"
8200 #include <$ac_hdr>
8201 EOF
8202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8203 { (eval echo configure:8204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8205 if test -z "$ac_err"; then
8206   rm -rf conftest*
8207   eval "ac_cv_header_$ac_safe=yes"
8208 else
8209   echo "$ac_err" >&5
8210   echo "configure: failed program was:" >&5
8211   cat conftest.$ac_ext >&5
8212   rm -rf conftest*
8213   eval "ac_cv_header_$ac_safe=no"
8214 fi
8215 rm -f conftest*
8216 fi
8217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8218   echo "$ac_t""yes" 1>&6
8219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8220   cat >> confdefs.h <<EOF
8221 #define $ac_tr_hdr 1
8222 EOF
8223  
8224 else
8225   echo "$ac_t""no" 1>&6
8226 fi
8227 done
8228
8229  echo $ac_n "checking for db""... $ac_c" 1>&6
8230 echo "configure:8231: checking for db" >&5
8231 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
8232   echo $ac_n "(cached) $ac_c" 1>&6
8233 else
8234   
8235         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8236                 ol_cv_mdbm=no
8237         else
8238                 ol_cv_mdbm=yes
8239         fi
8240
8241 fi
8242
8243 echo "$ac_t""$ol_cv_mdbm" 1>&6
8244  if test $ol_cv_mdbm = yes ; then
8245         cat >> confdefs.h <<\EOF
8246 #define HAVE_MDBM 1
8247 EOF
8248
8249  fi
8250
8251
8252         if test $ol_cv_mdbm = yes ; then
8253                 ol_link_ldbm=mdbm
8254                 ol_with_ldbm_api=mdbm
8255                 if test $ol_cv_lib_mdbm != yes ; then
8256                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8257                 fi
8258         fi
8259 fi
8260
8261 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8262         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8263 echo "configure:8264: checking for GDBM library" >&5
8264 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
8265   echo $ac_n "(cached) $ac_c" 1>&6
8266 else
8267         ol_LIBS="$LIBS"
8268         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8269 echo "configure:8270: checking for gdbm_open" >&5
8270 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
8271   echo $ac_n "(cached) $ac_c" 1>&6
8272 else
8273   cat > conftest.$ac_ext <<EOF
8274 #line 8275 "configure"
8275 #include "confdefs.h"
8276 /* System header to define __stub macros and hopefully few prototypes,
8277     which can conflict with char gdbm_open(); below.  */
8278 #include <assert.h>
8279 /* Override any gcc2 internal prototype to avoid an error.  */
8280 /* We use char because int might match the return type of a gcc2
8281     builtin and then its argument prototype would still apply.  */
8282 char gdbm_open();
8283
8284 int main() {
8285
8286 /* The GNU C library defines this for functions which it implements
8287     to always fail with ENOSYS.  Some functions are actually named
8288     something starting with __ and the normal name is an alias.  */
8289 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8290 choke me
8291 #else
8292 gdbm_open();
8293 #endif
8294
8295 ; return 0; }
8296 EOF
8297 if { (eval echo configure:8298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8298   rm -rf conftest*
8299   eval "ac_cv_func_gdbm_open=yes"
8300 else
8301   echo "configure: failed program was:" >&5
8302   cat conftest.$ac_ext >&5
8303   rm -rf conftest*
8304   eval "ac_cv_func_gdbm_open=no"
8305 fi
8306 rm -f conftest*
8307 fi
8308
8309 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8310   echo "$ac_t""yes" 1>&6
8311   ol_cv_lib_gdbm=yes
8312 else
8313   echo "$ac_t""no" 1>&6
8314
8315                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8316 echo "configure:8317: checking for gdbm_open in -lgdbm" >&5
8317 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
8318 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8319   echo $ac_n "(cached) $ac_c" 1>&6
8320 else
8321   ac_save_LIBS="$LIBS"
8322 LIBS="-lgdbm  $LIBS"
8323 cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 /* Override any gcc2 internal prototype to avoid an error.  */
8327 /* We use char because int might match the return type of a gcc2
8328     builtin and then its argument prototype would still apply.  */
8329 char gdbm_open();
8330
8331 int main() {
8332 gdbm_open()
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=yes"
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   eval "ac_cv_lib_$ac_lib_var=no"
8343 fi
8344 rm -f conftest*
8345 LIBS="$ac_save_LIBS"
8346
8347 fi
8348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8349   echo "$ac_t""yes" 1>&6
8350   ol_cv_lib_gdbm=-lgdbm
8351 else
8352   echo "$ac_t""no" 1>&6
8353 ol_cv_lib_gdbm=no
8354 fi
8355
8356         
8357 fi
8358
8359         LIBS="$ol_LIBS"
8360
8361 fi
8362
8363 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8364
8365
8366  for ac_hdr in gdbm.h
8367 do
8368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8370 echo "configure:8371: checking for $ac_hdr" >&5
8371 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8372   echo $ac_n "(cached) $ac_c" 1>&6
8373 else
8374   cat > conftest.$ac_ext <<EOF
8375 #line 8376 "configure"
8376 #include "confdefs.h"
8377 #include <$ac_hdr>
8378 EOF
8379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8380 { (eval echo configure:8381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8382 if test -z "$ac_err"; then
8383   rm -rf conftest*
8384   eval "ac_cv_header_$ac_safe=yes"
8385 else
8386   echo "$ac_err" >&5
8387   echo "configure: failed program was:" >&5
8388   cat conftest.$ac_ext >&5
8389   rm -rf conftest*
8390   eval "ac_cv_header_$ac_safe=no"
8391 fi
8392 rm -f conftest*
8393 fi
8394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8397   cat >> confdefs.h <<EOF
8398 #define $ac_tr_hdr 1
8399 EOF
8400  
8401 else
8402   echo "$ac_t""no" 1>&6
8403 fi
8404 done
8405
8406  echo $ac_n "checking for db""... $ac_c" 1>&6
8407 echo "configure:8408: checking for db" >&5
8408 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
8409   echo $ac_n "(cached) $ac_c" 1>&6
8410 else
8411   
8412         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8413                 ol_cv_gdbm=no
8414         else
8415                 ol_cv_gdbm=yes
8416         fi
8417
8418 fi
8419
8420 echo "$ac_t""$ol_cv_gdbm" 1>&6
8421  if test $ol_cv_gdbm = yes ; then
8422         cat >> confdefs.h <<\EOF
8423 #define HAVE_GDBM 1
8424 EOF
8425
8426  fi
8427
8428
8429         if test $ol_cv_gdbm = yes ; then
8430                 ol_link_ldbm=gdbm
8431                 ol_with_ldbm_api=gdbm
8432
8433                 if test $ol_cv_lib_gdbm != yes ; then
8434                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
8435                 fi
8436         fi
8437 fi
8438
8439 if test $ol_with_ldbm_api = auto ; then
8440         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
8441 elif test $ol_with_ldbm_api = ndbm ; then
8442         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
8443 echo "configure:8444: checking for NDBM library" >&5
8444 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
8445   echo $ac_n "(cached) $ac_c" 1>&6
8446 else
8447         ol_LIBS="$LIBS"
8448         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
8449 echo "configure:8450: checking for dbm_open" >&5
8450 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
8451   echo $ac_n "(cached) $ac_c" 1>&6
8452 else
8453   cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 /* System header to define __stub macros and hopefully few prototypes,
8457     which can conflict with char dbm_open(); below.  */
8458 #include <assert.h>
8459 /* Override any gcc2 internal prototype to avoid an error.  */
8460 /* We use char because int might match the return type of a gcc2
8461     builtin and then its argument prototype would still apply.  */
8462 char dbm_open();
8463
8464 int main() {
8465
8466 /* The GNU C library defines this for functions which it implements
8467     to always fail with ENOSYS.  Some functions are actually named
8468     something starting with __ and the normal name is an alias.  */
8469 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
8470 choke me
8471 #else
8472 dbm_open();
8473 #endif
8474
8475 ; return 0; }
8476 EOF
8477 if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8478   rm -rf conftest*
8479   eval "ac_cv_func_dbm_open=yes"
8480 else
8481   echo "configure: failed program was:" >&5
8482   cat conftest.$ac_ext >&5
8483   rm -rf conftest*
8484   eval "ac_cv_func_dbm_open=no"
8485 fi
8486 rm -f conftest*
8487 fi
8488
8489 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
8490   echo "$ac_t""yes" 1>&6
8491   ol_cv_lib_ndbm=yes
8492 else
8493   echo "$ac_t""no" 1>&6
8494
8495                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
8496 echo "configure:8497: checking for dbm_open in -lndbm" >&5
8497 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
8498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8499   echo $ac_n "(cached) $ac_c" 1>&6
8500 else
8501   ac_save_LIBS="$LIBS"
8502 LIBS="-lndbm  $LIBS"
8503 cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8506 /* Override any gcc2 internal prototype to avoid an error.  */
8507 /* We use char because int might match the return type of a gcc2
8508     builtin and then its argument prototype would still apply.  */
8509 char dbm_open();
8510
8511 int main() {
8512 dbm_open()
8513 ; return 0; }
8514 EOF
8515 if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516   rm -rf conftest*
8517   eval "ac_cv_lib_$ac_lib_var=yes"
8518 else
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   eval "ac_cv_lib_$ac_lib_var=no"
8523 fi
8524 rm -f conftest*
8525 LIBS="$ac_save_LIBS"
8526
8527 fi
8528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8529   echo "$ac_t""yes" 1>&6
8530   ol_cv_lib_ndbm=-lndbm
8531 else
8532   echo "$ac_t""no" 1>&6
8533
8534                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8535 echo "configure:8536: checking for dbm_open in -ldbm" >&5
8536 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8538   echo $ac_n "(cached) $ac_c" 1>&6
8539 else
8540   ac_save_LIBS="$LIBS"
8541 LIBS="-ldbm  $LIBS"
8542 cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545 /* Override any gcc2 internal prototype to avoid an error.  */
8546 /* We use char because int might match the return type of a gcc2
8547     builtin and then its argument prototype would still apply.  */
8548 char dbm_open();
8549
8550 int main() {
8551 dbm_open()
8552 ; return 0; }
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8555   rm -rf conftest*
8556   eval "ac_cv_lib_$ac_lib_var=yes"
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   rm -rf conftest*
8561   eval "ac_cv_lib_$ac_lib_var=no"
8562 fi
8563 rm -f conftest*
8564 LIBS="$ac_save_LIBS"
8565
8566 fi
8567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8568   echo "$ac_t""yes" 1>&6
8569   ol_cv_lib_ndbm=-ldbm
8570 else
8571   echo "$ac_t""no" 1>&6
8572 ol_cv_lib_ndbm=no
8573 fi
8574                 
8575 fi
8576
8577         
8578 fi
8579
8580         LIBS="$ol_LIBS"
8581
8582 fi
8583
8584 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8585
8586
8587  for ac_hdr in ndbm.h
8588 do
8589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8591 echo "configure:8592: checking for $ac_hdr" >&5
8592 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8593   echo $ac_n "(cached) $ac_c" 1>&6
8594 else
8595   cat > conftest.$ac_ext <<EOF
8596 #line 8597 "configure"
8597 #include "confdefs.h"
8598 #include <$ac_hdr>
8599 EOF
8600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8601 { (eval echo configure:8602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8603 if test -z "$ac_err"; then
8604   rm -rf conftest*
8605   eval "ac_cv_header_$ac_safe=yes"
8606 else
8607   echo "$ac_err" >&5
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   eval "ac_cv_header_$ac_safe=no"
8612 fi
8613 rm -f conftest*
8614 fi
8615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8616   echo "$ac_t""yes" 1>&6
8617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8618   cat >> confdefs.h <<EOF
8619 #define $ac_tr_hdr 1
8620 EOF
8621  
8622 else
8623   echo "$ac_t""no" 1>&6
8624 fi
8625 done
8626
8627  echo $ac_n "checking for db""... $ac_c" 1>&6
8628 echo "configure:8629: checking for db" >&5
8629 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8630   echo $ac_n "(cached) $ac_c" 1>&6
8631 else
8632   
8633         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8634                 ol_cv_ndbm=no
8635         else
8636                 ol_cv_ndbm=yes
8637         fi
8638
8639 fi
8640
8641 echo "$ac_t""$ol_cv_ndbm" 1>&6
8642  if test $ol_cv_ndbm = yes ; then
8643         cat >> confdefs.h <<\EOF
8644 #define HAVE_NDBM 1
8645 EOF
8646
8647  fi
8648
8649
8650         if test $ol_cv_ndbm = yes ; then
8651                 ol_link_ldbm=ndbm
8652                 ol_with_ldbm_api=ndbm
8653
8654                 if test $ol_cv_lib_ndbm != yes ; then
8655                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8656                 fi
8657         fi
8658 fi
8659
8660 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8661         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8662         if test $ol_enable_ldbm = yes ; then
8663                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8664         fi
8665
8666         echo "configure: warning: disabling LDBM" 1>&2
8667         ol_enable_ldbm=no
8668 fi
8669
8670 if test $ol_enable_wrappers != no ; then
8671         for ac_hdr in tcpd.h
8672 do
8673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8675 echo "configure:8676: checking for $ac_hdr" >&5
8676 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8677   echo $ac_n "(cached) $ac_c" 1>&6
8678 else
8679   cat > conftest.$ac_ext <<EOF
8680 #line 8681 "configure"
8681 #include "confdefs.h"
8682 #include <$ac_hdr>
8683 EOF
8684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8685 { (eval echo configure:8686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8687 if test -z "$ac_err"; then
8688   rm -rf conftest*
8689   eval "ac_cv_header_$ac_safe=yes"
8690 else
8691   echo "$ac_err" >&5
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   eval "ac_cv_header_$ac_safe=no"
8696 fi
8697 rm -f conftest*
8698 fi
8699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8700   echo "$ac_t""yes" 1>&6
8701     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8702   cat >> confdefs.h <<EOF
8703 #define $ac_tr_hdr 1
8704 EOF
8705  
8706 else
8707   echo "$ac_t""no" 1>&6
8708 fi
8709 done
8710
8711
8712         if test $ac_cv_header_tcpd_h != yes ; then
8713                 have_wrappers=no
8714         else
8715                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8716 echo "configure:8717: checking for main in -lwrap" >&5
8717 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8719   echo $ac_n "(cached) $ac_c" 1>&6
8720 else
8721   ac_save_LIBS="$LIBS"
8722 LIBS="-lwrap  $LIBS"
8723 cat > conftest.$ac_ext <<EOF
8724 #line 8725 "configure"
8725 #include "confdefs.h"
8726
8727 int main() {
8728 main()
8729 ; return 0; }
8730 EOF
8731 if { (eval echo configure:8732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8732   rm -rf conftest*
8733   eval "ac_cv_lib_$ac_lib_var=yes"
8734 else
8735   echo "configure: failed program was:" >&5
8736   cat conftest.$ac_ext >&5
8737   rm -rf conftest*
8738   eval "ac_cv_lib_$ac_lib_var=no"
8739 fi
8740 rm -f conftest*
8741 LIBS="$ac_save_LIBS"
8742
8743 fi
8744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8745   echo "$ac_t""yes" 1>&6
8746   have_wrappers=yes
8747 else
8748   echo "$ac_t""no" 1>&6
8749 have_wrappers=no
8750 fi
8751
8752         fi
8753
8754         if test $have_wrappers = yes ; then
8755                 cat >> confdefs.h <<\EOF
8756 #define HAVE_TCPD 1
8757 EOF
8758
8759                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8760
8761                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8762 echo "configure:8763: checking for main in -lnsl" >&5
8763 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
8764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8765   echo $ac_n "(cached) $ac_c" 1>&6
8766 else
8767   ac_save_LIBS="$LIBS"
8768 LIBS="-lnsl  $LIBS"
8769 cat > conftest.$ac_ext <<EOF
8770 #line 8771 "configure"
8771 #include "confdefs.h"
8772
8773 int main() {
8774 main()
8775 ; return 0; }
8776 EOF
8777 if { (eval echo configure:8778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8778   rm -rf conftest*
8779   eval "ac_cv_lib_$ac_lib_var=yes"
8780 else
8781   echo "configure: failed program was:" >&5
8782   cat conftest.$ac_ext >&5
8783   rm -rf conftest*
8784   eval "ac_cv_lib_$ac_lib_var=no"
8785 fi
8786 rm -f conftest*
8787 LIBS="$ac_save_LIBS"
8788
8789 fi
8790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8791   echo "$ac_t""yes" 1>&6
8792     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8793     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8794   cat >> confdefs.h <<EOF
8795 #define $ac_tr_lib 1
8796 EOF
8797
8798   LIBS="-lnsl $LIBS"
8799
8800 else
8801   echo "$ac_t""no" 1>&6
8802 fi
8803
8804         else
8805                 echo "configure: warning: could not find -lwrap" 1>&2
8806                 if test $ol_enable_wrappers = yes ; then
8807                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8808                 fi
8809
8810                 echo "configure: warning: disabling wrappers support" 1>&2
8811                 ol_enable_wrappers=no
8812         fi
8813 fi
8814
8815 if test $ol_enable_syslog != no ; then
8816         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8817 echo "configure:8818: checking for openlog" >&5
8818 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8819   echo $ac_n "(cached) $ac_c" 1>&6
8820 else
8821   cat > conftest.$ac_ext <<EOF
8822 #line 8823 "configure"
8823 #include "confdefs.h"
8824 /* System header to define __stub macros and hopefully few prototypes,
8825     which can conflict with char openlog(); below.  */
8826 #include <assert.h>
8827 /* Override any gcc2 internal prototype to avoid an error.  */
8828 /* We use char because int might match the return type of a gcc2
8829     builtin and then its argument prototype would still apply.  */
8830 char openlog();
8831
8832 int main() {
8833
8834 /* The GNU C library defines this for functions which it implements
8835     to always fail with ENOSYS.  Some functions are actually named
8836     something starting with __ and the normal name is an alias.  */
8837 #if defined (__stub_openlog) || defined (__stub___openlog)
8838 choke me
8839 #else
8840 openlog();
8841 #endif
8842
8843 ; return 0; }
8844 EOF
8845 if { (eval echo configure:8846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8846   rm -rf conftest*
8847   eval "ac_cv_func_openlog=yes"
8848 else
8849   echo "configure: failed program was:" >&5
8850   cat conftest.$ac_ext >&5
8851   rm -rf conftest*
8852   eval "ac_cv_func_openlog=no"
8853 fi
8854 rm -f conftest*
8855 fi
8856
8857 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8858   echo "$ac_t""yes" 1>&6
8859   :
8860 else
8861   echo "$ac_t""no" 1>&6
8862 fi
8863
8864         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8865                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8866         fi
8867         ol_enable_syslog=$ac_cv_func_openlog
8868 fi
8869
8870 if test $ol_enable_dmalloc != no ; then
8871         for ac_hdr in dmalloc.h
8872 do
8873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8875 echo "configure:8876: checking for $ac_hdr" >&5
8876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8877   echo $ac_n "(cached) $ac_c" 1>&6
8878 else
8879   cat > conftest.$ac_ext <<EOF
8880 #line 8881 "configure"
8881 #include "confdefs.h"
8882 #include <$ac_hdr>
8883 EOF
8884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8885 { (eval echo configure:8886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8887 if test -z "$ac_err"; then
8888   rm -rf conftest*
8889   eval "ac_cv_header_$ac_safe=yes"
8890 else
8891   echo "$ac_err" >&5
8892   echo "configure: failed program was:" >&5
8893   cat conftest.$ac_ext >&5
8894   rm -rf conftest*
8895   eval "ac_cv_header_$ac_safe=no"
8896 fi
8897 rm -f conftest*
8898 fi
8899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8900   echo "$ac_t""yes" 1>&6
8901     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8902   cat >> confdefs.h <<EOF
8903 #define $ac_tr_hdr 1
8904 EOF
8905  
8906 else
8907   echo "$ac_t""no" 1>&6
8908 fi
8909 done
8910
8911         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8912 echo "configure:8913: checking for dmalloc_shutdown in -ldmalloc" >&5
8913 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8914 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8915   echo $ac_n "(cached) $ac_c" 1>&6
8916 else
8917   ac_save_LIBS="$LIBS"
8918 LIBS="-ldmalloc  $LIBS"
8919 cat > conftest.$ac_ext <<EOF
8920 #line 8921 "configure"
8921 #include "confdefs.h"
8922 /* Override any gcc2 internal prototype to avoid an error.  */
8923 /* We use char because int might match the return type of a gcc2
8924     builtin and then its argument prototype would still apply.  */
8925 char dmalloc_shutdown();
8926
8927 int main() {
8928 dmalloc_shutdown()
8929 ; return 0; }
8930 EOF
8931 if { (eval echo configure:8932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8932   rm -rf conftest*
8933   eval "ac_cv_lib_$ac_lib_var=yes"
8934 else
8935   echo "configure: failed program was:" >&5
8936   cat conftest.$ac_ext >&5
8937   rm -rf conftest*
8938   eval "ac_cv_lib_$ac_lib_var=no"
8939 fi
8940 rm -f conftest*
8941 LIBS="$ac_save_LIBS"
8942
8943 fi
8944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8945   echo "$ac_t""yes" 1>&6
8946     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8947     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8948   cat >> confdefs.h <<EOF
8949 #define $ac_tr_lib 1
8950 EOF
8951
8952   LIBS="-ldmalloc $LIBS"
8953
8954 else
8955   echo "$ac_t""no" 1>&6
8956 fi
8957
8958 fi
8959
8960 if test $ol_enable_tcl != no ; then
8961         for ac_hdr in tcl.h
8962 do
8963 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8964 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8965 echo "configure:8966: checking for $ac_hdr" >&5
8966 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8967   echo $ac_n "(cached) $ac_c" 1>&6
8968 else
8969   cat > conftest.$ac_ext <<EOF
8970 #line 8971 "configure"
8971 #include "confdefs.h"
8972 #include <$ac_hdr>
8973 EOF
8974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8975 { (eval echo configure:8976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8977 if test -z "$ac_err"; then
8978   rm -rf conftest*
8979   eval "ac_cv_header_$ac_safe=yes"
8980 else
8981   echo "$ac_err" >&5
8982   echo "configure: failed program was:" >&5
8983   cat conftest.$ac_ext >&5
8984   rm -rf conftest*
8985   eval "ac_cv_header_$ac_safe=no"
8986 fi
8987 rm -f conftest*
8988 fi
8989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8990   echo "$ac_t""yes" 1>&6
8991     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8992   cat >> confdefs.h <<EOF
8993 #define $ac_tr_hdr 1
8994 EOF
8995  
8996 else
8997   echo "$ac_t""no" 1>&6
8998 fi
8999 done
9000
9001
9002         if test $ac_cv_header_tcl_h != yes ; then
9003                 have_tcl=no
9004         else
9005                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9006 echo "configure:9007: checking for main in -ltcl" >&5
9007 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
9008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9009   echo $ac_n "(cached) $ac_c" 1>&6
9010 else
9011   ac_save_LIBS="$LIBS"
9012 LIBS="-ltcl  $LIBS"
9013 cat > conftest.$ac_ext <<EOF
9014 #line 9015 "configure"
9015 #include "confdefs.h"
9016
9017 int main() {
9018 main()
9019 ; return 0; }
9020 EOF
9021 if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9022   rm -rf conftest*
9023   eval "ac_cv_lib_$ac_lib_var=yes"
9024 else
9025   echo "configure: failed program was:" >&5
9026   cat conftest.$ac_ext >&5
9027   rm -rf conftest*
9028   eval "ac_cv_lib_$ac_lib_var=no"
9029 fi
9030 rm -f conftest*
9031 LIBS="$ac_save_LIBS"
9032
9033 fi
9034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9035   echo "$ac_t""yes" 1>&6
9036   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9037 else
9038   echo "$ac_t""no" 1>&6
9039 have_tcl=no
9040 fi
9041
9042
9043                 if test $have_tcl != yes; then
9044                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9045 echo "configure:9046: checking for main in -ltcl7.6" >&5
9046 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
9047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9048   echo $ac_n "(cached) $ac_c" 1>&6
9049 else
9050   ac_save_LIBS="$LIBS"
9051 LIBS="-ltcl7.6  $LIBS"
9052 cat > conftest.$ac_ext <<EOF
9053 #line 9054 "configure"
9054 #include "confdefs.h"
9055
9056 int main() {
9057 main()
9058 ; return 0; }
9059 EOF
9060 if { (eval echo configure:9061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9061   rm -rf conftest*
9062   eval "ac_cv_lib_$ac_lib_var=yes"
9063 else
9064   echo "configure: failed program was:" >&5
9065   cat conftest.$ac_ext >&5
9066   rm -rf conftest*
9067   eval "ac_cv_lib_$ac_lib_var=no"
9068 fi
9069 rm -f conftest*
9070 LIBS="$ac_save_LIBS"
9071
9072 fi
9073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9074   echo "$ac_t""yes" 1>&6
9075   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9076 else
9077   echo "$ac_t""no" 1>&6
9078 have_tcl=no
9079 fi
9080
9081                 fi
9082
9083                 if test $have_tcl != yes; then
9084                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9085 echo "configure:9086: checking for main in -ltcl8.0" >&5
9086 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
9087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9088   echo $ac_n "(cached) $ac_c" 1>&6
9089 else
9090   ac_save_LIBS="$LIBS"
9091 LIBS="-ltcl8.0  $LIBS"
9092 cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095
9096 int main() {
9097 main()
9098 ; return 0; }
9099 EOF
9100 if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9101   rm -rf conftest*
9102   eval "ac_cv_lib_$ac_lib_var=yes"
9103 else
9104   echo "configure: failed program was:" >&5
9105   cat conftest.$ac_ext >&5
9106   rm -rf conftest*
9107   eval "ac_cv_lib_$ac_lib_var=no"
9108 fi
9109 rm -f conftest*
9110 LIBS="$ac_save_LIBS"
9111
9112 fi
9113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9114   echo "$ac_t""yes" 1>&6
9115   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9116 else
9117   echo "$ac_t""no" 1>&6
9118 have_tcl=no
9119 fi
9120
9121                 fi
9122         fi
9123
9124         if test $have_tcl != yes ; then
9125                 echo "configure: warning: could not find -ltcl" 1>&2
9126                 if test $ol_enable_tcl = yes ; then
9127                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9128                 fi
9129
9130                 ol_enable_tcl=no
9131         fi
9132 fi
9133
9134 # ud needs termcap (should insert check here)
9135 ol_link_termcap=no
9136 for ac_hdr in termcap.h ncurses.h
9137 do
9138 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9139 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9140 echo "configure:9141: checking for $ac_hdr" >&5
9141 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9142   echo $ac_n "(cached) $ac_c" 1>&6
9143 else
9144   cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 #include <$ac_hdr>
9148 EOF
9149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9150 { (eval echo configure:9151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9152 if test -z "$ac_err"; then
9153   rm -rf conftest*
9154   eval "ac_cv_header_$ac_safe=yes"
9155 else
9156   echo "$ac_err" >&5
9157   echo "configure: failed program was:" >&5
9158   cat conftest.$ac_ext >&5
9159   rm -rf conftest*
9160   eval "ac_cv_header_$ac_safe=no"
9161 fi
9162 rm -f conftest*
9163 fi
9164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9165   echo "$ac_t""yes" 1>&6
9166     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9167   cat >> confdefs.h <<EOF
9168 #define $ac_tr_hdr 1
9169 EOF
9170  
9171 else
9172   echo "$ac_t""no" 1>&6
9173 fi
9174 done
9175
9176
9177 if test $ol_link_termcap = no ; then
9178         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9179 echo "configure:9180: checking for tputs in -ltermcap" >&5
9180 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
9181 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9182   echo $ac_n "(cached) $ac_c" 1>&6
9183 else
9184   ac_save_LIBS="$LIBS"
9185 LIBS="-ltermcap  $LIBS"
9186 cat > conftest.$ac_ext <<EOF
9187 #line 9188 "configure"
9188 #include "confdefs.h"
9189 /* Override any gcc2 internal prototype to avoid an error.  */
9190 /* We use char because int might match the return type of a gcc2
9191     builtin and then its argument prototype would still apply.  */
9192 char tputs();
9193
9194 int main() {
9195 tputs()
9196 ; return 0; }
9197 EOF
9198 if { (eval echo configure:9199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9199   rm -rf conftest*
9200   eval "ac_cv_lib_$ac_lib_var=yes"
9201 else
9202   echo "configure: failed program was:" >&5
9203   cat conftest.$ac_ext >&5
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=no"
9206 fi
9207 rm -f conftest*
9208 LIBS="$ac_save_LIBS"
9209
9210 fi
9211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9212   echo "$ac_t""yes" 1>&6
9213   have_termcap=yes
9214 else
9215   echo "$ac_t""no" 1>&6
9216 have_termcap=no
9217 fi
9218
9219         if test $have_termcap = yes ; then
9220                 cat >> confdefs.h <<\EOF
9221 #define HAVE_TERMCAP 1
9222 EOF
9223
9224                 ol_link_termcap=yes
9225                 TERMCAP_LIBS=-ltermcap
9226         fi
9227 fi
9228
9229 if test $ol_link_termcap = no ; then
9230         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9231 echo "configure:9232: checking for initscr in -lncurses" >&5
9232 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
9233 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   ac_save_LIBS="$LIBS"
9237 LIBS="-lncurses  $LIBS"
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241 /* Override any gcc2 internal prototype to avoid an error.  */
9242 /* We use char because int might match the return type of a gcc2
9243     builtin and then its argument prototype would still apply.  */
9244 char initscr();
9245
9246 int main() {
9247 initscr()
9248 ; return 0; }
9249 EOF
9250 if { (eval echo configure:9251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9251   rm -rf conftest*
9252   eval "ac_cv_lib_$ac_lib_var=yes"
9253 else
9254   echo "configure: failed program was:" >&5
9255   cat conftest.$ac_ext >&5
9256   rm -rf conftest*
9257   eval "ac_cv_lib_$ac_lib_var=no"
9258 fi
9259 rm -f conftest*
9260 LIBS="$ac_save_LIBS"
9261
9262 fi
9263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9264   echo "$ac_t""yes" 1>&6
9265   have_ncurses=yes
9266 else
9267   echo "$ac_t""no" 1>&6
9268 have_ncurses=no
9269 fi
9270
9271         if test $have_ncurses = yes ; then
9272                 cat >> confdefs.h <<\EOF
9273 #define HAVE_NCURSES 1
9274 EOF
9275
9276                 ol_link_termcap=yes
9277                 TERMCAP_LIBS=-lncurses
9278         fi
9279 fi
9280
9281 if test $ol_link_termcap = no ; then
9282         cat >> confdefs.h <<\EOF
9283 #define NO_TERMCAP 1
9284 EOF
9285
9286         TERMCAP_LIBS=
9287 fi
9288
9289 ol_link_readline=no
9290 if test $ol_with_readline != no ; then
9291         for ac_hdr in readline/readline.h readline/history.h
9292 do
9293 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9294 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9295 echo "configure:9296: checking for $ac_hdr" >&5
9296 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9297   echo $ac_n "(cached) $ac_c" 1>&6
9298 else
9299   cat > conftest.$ac_ext <<EOF
9300 #line 9301 "configure"
9301 #include "confdefs.h"
9302 #include <$ac_hdr>
9303 EOF
9304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9305 { (eval echo configure:9306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9307 if test -z "$ac_err"; then
9308   rm -rf conftest*
9309   eval "ac_cv_header_$ac_safe=yes"
9310 else
9311   echo "$ac_err" >&5
9312   echo "configure: failed program was:" >&5
9313   cat conftest.$ac_ext >&5
9314   rm -rf conftest*
9315   eval "ac_cv_header_$ac_safe=no"
9316 fi
9317 rm -f conftest*
9318 fi
9319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9320   echo "$ac_t""yes" 1>&6
9321     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9322   cat >> confdefs.h <<EOF
9323 #define $ac_tr_hdr 1
9324 EOF
9325  
9326 else
9327   echo "$ac_t""no" 1>&6
9328 fi
9329 done
9330
9331
9332         if test $ac_cv_header_readline_readline_h = yes ; then
9333                 save_LIBS="$LIBS"
9334                 LIBS="$TERMCAP_LIBS $LIBS"
9335                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9336 echo "configure:9337: checking for readline in -lreadline" >&5
9337 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
9338 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9339   echo $ac_n "(cached) $ac_c" 1>&6
9340 else
9341   ac_save_LIBS="$LIBS"
9342 LIBS="-lreadline  $LIBS"
9343 cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9346 /* Override any gcc2 internal prototype to avoid an error.  */
9347 /* We use char because int might match the return type of a gcc2
9348     builtin and then its argument prototype would still apply.  */
9349 char readline();
9350
9351 int main() {
9352 readline()
9353 ; return 0; }
9354 EOF
9355 if { (eval echo configure:9356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9356   rm -rf conftest*
9357   eval "ac_cv_lib_$ac_lib_var=yes"
9358 else
9359   echo "configure: failed program was:" >&5
9360   cat conftest.$ac_ext >&5
9361   rm -rf conftest*
9362   eval "ac_cv_lib_$ac_lib_var=no"
9363 fi
9364 rm -f conftest*
9365 LIBS="$ac_save_LIBS"
9366
9367 fi
9368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9369   echo "$ac_t""yes" 1>&6
9370   have_readline=yes
9371 else
9372   echo "$ac_t""no" 1>&6
9373 have_readline=no
9374 fi
9375
9376                 LIBS="$save_LIBS"
9377                         
9378                 if test $have_readline = yes ; then
9379                         ol_with_readline=found
9380                         ol_link_readline=yes
9381
9382                         READLINE_LIBS="-lreadline"
9383                 fi
9384         fi
9385 fi
9386
9387 if test $ol_link_readline = yes ; then
9388         cat >> confdefs.h <<\EOF
9389 #define HAVE_READLINE 1
9390 EOF
9391
9392 fi
9393
9394
9395 # FreeBSD (and others) have crypt(3) in -lcrypt
9396 if test $ol_enable_crypt != no ; then
9397         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9398 echo "configure:9399: checking for crypt" >&5
9399 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
9400   echo $ac_n "(cached) $ac_c" 1>&6
9401 else
9402   cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9405 /* System header to define __stub macros and hopefully few prototypes,
9406     which can conflict with char crypt(); below.  */
9407 #include <assert.h>
9408 /* Override any gcc2 internal prototype to avoid an error.  */
9409 /* We use char because int might match the return type of a gcc2
9410     builtin and then its argument prototype would still apply.  */
9411 char crypt();
9412
9413 int main() {
9414
9415 /* The GNU C library defines this for functions which it implements
9416     to always fail with ENOSYS.  Some functions are actually named
9417     something starting with __ and the normal name is an alias.  */
9418 #if defined (__stub_crypt) || defined (__stub___crypt)
9419 choke me
9420 #else
9421 crypt();
9422 #endif
9423
9424 ; return 0; }
9425 EOF
9426 if { (eval echo configure:9427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9427   rm -rf conftest*
9428   eval "ac_cv_func_crypt=yes"
9429 else
9430   echo "configure: failed program was:" >&5
9431   cat conftest.$ac_ext >&5
9432   rm -rf conftest*
9433   eval "ac_cv_func_crypt=no"
9434 fi
9435 rm -f conftest*
9436 fi
9437
9438 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
9439   echo "$ac_t""yes" 1>&6
9440   have_crypt=yes
9441 else
9442   echo "$ac_t""no" 1>&6
9443
9444                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9445 echo "configure:9446: checking for crypt in -lcrypt" >&5
9446 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9448   echo $ac_n "(cached) $ac_c" 1>&6
9449 else
9450   ac_save_LIBS="$LIBS"
9451 LIBS="-lcrypt  $LIBS"
9452 cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 /* Override any gcc2 internal prototype to avoid an error.  */
9456 /* We use char because int might match the return type of a gcc2
9457     builtin and then its argument prototype would still apply.  */
9458 char crypt();
9459
9460 int main() {
9461 crypt()
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9465   rm -rf conftest*
9466   eval "ac_cv_lib_$ac_lib_var=yes"
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   eval "ac_cv_lib_$ac_lib_var=no"
9472 fi
9473 rm -f conftest*
9474 LIBS="$ac_save_LIBS"
9475
9476 fi
9477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9478   echo "$ac_t""yes" 1>&6
9479   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
9480                         have_crypt=yes
9481 else
9482   echo "$ac_t""no" 1>&6
9483 have_crypt=no
9484 fi
9485
9486 fi
9487
9488
9489         if test $have_crypt = yes ; then
9490                 cat >> confdefs.h <<\EOF
9491 #define HAVE_CRYPT 1
9492 EOF
9493
9494         else
9495                 echo "configure: warning: could not find crypt" 1>&2
9496                 if test $ol_enable_crypt = yes ; then
9497                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
9498                 fi
9499
9500                 echo "configure: warning: disabling crypt support" 1>&2
9501                 ol_enable_crypt=no
9502         fi
9503 fi
9504
9505 # FreeBSD (and others) have setproctitle(3) in -lutil
9506 if test $ol_enable_proctitle != no ; then
9507         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
9508 echo "configure:9509: checking for setproctitle" >&5
9509 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
9510   echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512   cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515 /* System header to define __stub macros and hopefully few prototypes,
9516     which can conflict with char setproctitle(); below.  */
9517 #include <assert.h>
9518 /* Override any gcc2 internal prototype to avoid an error.  */
9519 /* We use char because int might match the return type of a gcc2
9520     builtin and then its argument prototype would still apply.  */
9521 char setproctitle();
9522
9523 int main() {
9524
9525 /* The GNU C library defines this for functions which it implements
9526     to always fail with ENOSYS.  Some functions are actually named
9527     something starting with __ and the normal name is an alias.  */
9528 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
9529 choke me
9530 #else
9531 setproctitle();
9532 #endif
9533
9534 ; return 0; }
9535 EOF
9536 if { (eval echo configure:9537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9537   rm -rf conftest*
9538   eval "ac_cv_func_setproctitle=yes"
9539 else
9540   echo "configure: failed program was:" >&5
9541   cat conftest.$ac_ext >&5
9542   rm -rf conftest*
9543   eval "ac_cv_func_setproctitle=no"
9544 fi
9545 rm -f conftest*
9546 fi
9547
9548 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
9549   echo "$ac_t""yes" 1>&6
9550   have_setproctitle=yes
9551 else
9552   echo "$ac_t""no" 1>&6
9553
9554                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9555 echo "configure:9556: checking for setproctitle in -lutil" >&5
9556 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9557 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9558   echo $ac_n "(cached) $ac_c" 1>&6
9559 else
9560   ac_save_LIBS="$LIBS"
9561 LIBS="-lutil  $LIBS"
9562 cat > conftest.$ac_ext <<EOF
9563 #line 9564 "configure"
9564 #include "confdefs.h"
9565 /* Override any gcc2 internal prototype to avoid an error.  */
9566 /* We use char because int might match the return type of a gcc2
9567     builtin and then its argument prototype would still apply.  */
9568 char setproctitle();
9569
9570 int main() {
9571 setproctitle()
9572 ; return 0; }
9573 EOF
9574 if { (eval echo configure:9575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9575   rm -rf conftest*
9576   eval "ac_cv_lib_$ac_lib_var=yes"
9577 else
9578   echo "configure: failed program was:" >&5
9579   cat conftest.$ac_ext >&5
9580   rm -rf conftest*
9581   eval "ac_cv_lib_$ac_lib_var=no"
9582 fi
9583 rm -f conftest*
9584 LIBS="$ac_save_LIBS"
9585
9586 fi
9587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9588   echo "$ac_t""yes" 1>&6
9589   have_setproctitle=yes
9590                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9591 else
9592   echo "$ac_t""no" 1>&6
9593 have_setproctitle=no
9594                         LIBOBJS="$LIBOBJS setproctitle.o"
9595 fi
9596
9597 fi
9598
9599
9600         if test $have_setproctitle = yes ; then
9601                 cat >> confdefs.h <<\EOF
9602 #define HAVE_SETPROCTITLE 1
9603 EOF
9604
9605         fi
9606 fi
9607
9608 # test for EBCDIC
9609 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9610 echo "configure:9611: checking for EBCDIC" >&5
9611 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9612   echo $ac_n "(cached) $ac_c" 1>&6
9613 else
9614   
9615         cat > conftest.$ac_ext <<EOF
9616 #line 9617 "configure"
9617 #include "confdefs.h"
9618
9619 #if !('M' == 0xd4)
9620 #include <__ASCII__/generate_error.h>
9621 #endif
9622
9623 EOF
9624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9625 { (eval echo configure:9626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9627 if test -z "$ac_err"; then
9628   rm -rf conftest*
9629   ol_cv_cpp_ebcdic=yes
9630 else
9631   echo "$ac_err" >&5
9632   echo "configure: failed program was:" >&5
9633   cat conftest.$ac_ext >&5
9634   rm -rf conftest*
9635   ol_cv_cpp_ebcdic=no
9636 fi
9637 rm -f conftest*
9638 fi
9639
9640 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9641 if test $ol_cv_cpp_ebcdic = yes ; then
9642         cat >> confdefs.h <<\EOF
9643 #define HAVE_EBCDIC 1
9644 EOF
9645
9646 fi
9647
9648 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9649 echo "configure:9650: checking for ANSI C header files" >&5
9650 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9651   echo $ac_n "(cached) $ac_c" 1>&6
9652 else
9653   cat > conftest.$ac_ext <<EOF
9654 #line 9655 "configure"
9655 #include "confdefs.h"
9656 #include <stdlib.h>
9657 #include <stdarg.h>
9658 #include <string.h>
9659 #include <float.h>
9660 EOF
9661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9662 { (eval echo configure:9663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9664 if test -z "$ac_err"; then
9665   rm -rf conftest*
9666   ol_cv_header_stdc=yes
9667 else
9668   echo "$ac_err" >&5
9669   echo "configure: failed program was:" >&5
9670   cat conftest.$ac_ext >&5
9671   rm -rf conftest*
9672   ol_cv_header_stdc=no
9673 fi
9674 rm -f conftest*
9675
9676 if test $ol_cv_header_stdc = yes; then
9677   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9678 cat > conftest.$ac_ext <<EOF
9679 #line 9680 "configure"
9680 #include "confdefs.h"
9681 #include <string.h>
9682 EOF
9683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9684   egrep "memchr" >/dev/null 2>&1; then
9685   :
9686 else
9687   rm -rf conftest*
9688   ol_cv_header_stdc=no
9689 fi
9690 rm -f conftest*
9691
9692 fi
9693
9694 if test $ol_cv_header_stdc = yes; then
9695   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9696 cat > conftest.$ac_ext <<EOF
9697 #line 9698 "configure"
9698 #include "confdefs.h"
9699 #include <stdlib.h>
9700 EOF
9701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9702   egrep "free" >/dev/null 2>&1; then
9703   :
9704 else
9705   rm -rf conftest*
9706   ol_cv_header_stdc=no
9707 fi
9708 rm -f conftest*
9709
9710 fi
9711
9712 if test $ol_cv_header_stdc = yes; then
9713   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9714 if test "$cross_compiling" = yes; then
9715   :
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720 #include <ctype.h>
9721 #ifndef HAVE_EBCDIC
9722 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9723 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9724 #else
9725 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9726                 || ('j' <= (c) && (c) <= 'r') \
9727                 || ('s' <= (c) && (c) <= 'z'))
9728 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9729 #endif
9730 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9731 int main () { int i; for (i = 0; i < 256; i++)
9732 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9733 exit (0); }
9734
9735 EOF
9736 if { (eval echo configure:9737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9737 then
9738   :
9739 else
9740   echo "configure: failed program was:" >&5
9741   cat conftest.$ac_ext >&5
9742   rm -fr conftest*
9743   ol_cv_header_stdc=no
9744 fi
9745 rm -fr conftest*
9746 fi
9747
9748 fi
9749 fi
9750
9751 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9752 if test $ol_cv_header_stdc = yes; then
9753   cat >> confdefs.h <<\EOF
9754 #define STDC_HEADERS 1
9755 EOF
9756
9757 fi
9758 ac_cv_header_stdc=disable
9759
9760
9761 if test $ol_cv_header_stdc != yes; then
9762         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9763 fi
9764
9765 ac_header_dirent=no
9766 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9767 do
9768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9769 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9770 echo "configure:9771: checking for $ac_hdr that defines DIR" >&5
9771 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   cat > conftest.$ac_ext <<EOF
9775 #line 9776 "configure"
9776 #include "confdefs.h"
9777 #include <sys/types.h>
9778 #include <$ac_hdr>
9779 int main() {
9780 DIR *dirp = 0;
9781 ; return 0; }
9782 EOF
9783 if { (eval echo configure:9784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9784   rm -rf conftest*
9785   eval "ac_cv_header_dirent_$ac_safe=yes"
9786 else
9787   echo "configure: failed program was:" >&5
9788   cat conftest.$ac_ext >&5
9789   rm -rf conftest*
9790   eval "ac_cv_header_dirent_$ac_safe=no"
9791 fi
9792 rm -f conftest*
9793 fi
9794 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9795   echo "$ac_t""yes" 1>&6
9796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9797   cat >> confdefs.h <<EOF
9798 #define $ac_tr_hdr 1
9799 EOF
9800  ac_header_dirent=$ac_hdr; break
9801 else
9802   echo "$ac_t""no" 1>&6
9803 fi
9804 done
9805 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9806 if test $ac_header_dirent = dirent.h; then
9807 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9808 echo "configure:9809: checking for opendir in -ldir" >&5
9809 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   ac_save_LIBS="$LIBS"
9814 LIBS="-ldir  $LIBS"
9815 cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 /* Override any gcc2 internal prototype to avoid an error.  */
9819 /* We use char because int might match the return type of a gcc2
9820     builtin and then its argument prototype would still apply.  */
9821 char opendir();
9822
9823 int main() {
9824 opendir()
9825 ; return 0; }
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9828   rm -rf conftest*
9829   eval "ac_cv_lib_$ac_lib_var=yes"
9830 else
9831   echo "configure: failed program was:" >&5
9832   cat conftest.$ac_ext >&5
9833   rm -rf conftest*
9834   eval "ac_cv_lib_$ac_lib_var=no"
9835 fi
9836 rm -f conftest*
9837 LIBS="$ac_save_LIBS"
9838
9839 fi
9840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9841   echo "$ac_t""yes" 1>&6
9842   LIBS="$LIBS -ldir"
9843 else
9844   echo "$ac_t""no" 1>&6
9845 fi
9846
9847 else
9848 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9849 echo "configure:9850: checking for opendir in -lx" >&5
9850 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9851 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9852   echo $ac_n "(cached) $ac_c" 1>&6
9853 else
9854   ac_save_LIBS="$LIBS"
9855 LIBS="-lx  $LIBS"
9856 cat > conftest.$ac_ext <<EOF
9857 #line 9858 "configure"
9858 #include "confdefs.h"
9859 /* Override any gcc2 internal prototype to avoid an error.  */
9860 /* We use char because int might match the return type of a gcc2
9861     builtin and then its argument prototype would still apply.  */
9862 char opendir();
9863
9864 int main() {
9865 opendir()
9866 ; return 0; }
9867 EOF
9868 if { (eval echo configure:9869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9869   rm -rf conftest*
9870   eval "ac_cv_lib_$ac_lib_var=yes"
9871 else
9872   echo "configure: failed program was:" >&5
9873   cat conftest.$ac_ext >&5
9874   rm -rf conftest*
9875   eval "ac_cv_lib_$ac_lib_var=no"
9876 fi
9877 rm -f conftest*
9878 LIBS="$ac_save_LIBS"
9879
9880 fi
9881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9882   echo "$ac_t""yes" 1>&6
9883   LIBS="$LIBS -lx"
9884 else
9885   echo "$ac_t""no" 1>&6
9886 fi
9887
9888 fi
9889
9890 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9891 echo "configure:9892: checking for sys/wait.h that is POSIX.1 compatible" >&5
9892 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9893   echo $ac_n "(cached) $ac_c" 1>&6
9894 else
9895   cat > conftest.$ac_ext <<EOF
9896 #line 9897 "configure"
9897 #include "confdefs.h"
9898 #include <sys/types.h>
9899 #include <sys/wait.h>
9900 #ifndef WEXITSTATUS
9901 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9902 #endif
9903 #ifndef WIFEXITED
9904 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9905 #endif
9906 int main() {
9907 int s;
9908 wait (&s);
9909 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9910 ; return 0; }
9911 EOF
9912 if { (eval echo configure:9913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9913   rm -rf conftest*
9914   ac_cv_header_sys_wait_h=yes
9915 else
9916   echo "configure: failed program was:" >&5
9917   cat conftest.$ac_ext >&5
9918   rm -rf conftest*
9919   ac_cv_header_sys_wait_h=no
9920 fi
9921 rm -f conftest*
9922 fi
9923
9924 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9925 if test $ac_cv_header_sys_wait_h = yes; then
9926   cat >> confdefs.h <<\EOF
9927 #define HAVE_SYS_WAIT_H 1
9928 EOF
9929
9930 fi
9931
9932 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9933 echo "configure:9934: checking POSIX termios" >&5
9934 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9935   echo $ac_n "(cached) $ac_c" 1>&6
9936 else
9937   cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940 #include <sys/types.h>
9941 #include <unistd.h>
9942 #include <termios.h>
9943 int main() {
9944 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9945    tcgetattr(0, 0);
9946 ; return 0; }
9947 EOF
9948 if { (eval echo configure:9949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9949   rm -rf conftest*
9950   am_cv_sys_posix_termios=yes
9951 else
9952   echo "configure: failed program was:" >&5
9953   cat conftest.$ac_ext >&5
9954   rm -rf conftest*
9955   am_cv_sys_posix_termios=no
9956 fi
9957 rm -f conftest*
9958 fi
9959
9960 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9961
9962
9963  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9964 echo "configure:9965: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9965 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9966   echo $ac_n "(cached) $ac_c" 1>&6
9967 else
9968   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9969
9970   gwinsz_in_termios_h=no
9971   if test $am_cv_sys_posix_termios = yes; then
9972     cat > conftest.$ac_ext <<EOF
9973 #line 9974 "configure"
9974 #include "confdefs.h"
9975 #include <sys/types.h>
9976 #     include <termios.h>
9977 #     ifdef TIOCGWINSZ
9978         yes
9979 #     endif
9980     
9981 EOF
9982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9983   egrep "yes" >/dev/null 2>&1; then
9984   rm -rf conftest*
9985   gwinsz_in_termios_h=yes
9986 fi
9987 rm -f conftest*
9988
9989   fi
9990
9991   if test $gwinsz_in_termios_h = no; then
9992     cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995 #include <sys/types.h>
9996 #     include <sys/ioctl.h>
9997 #     ifdef TIOCGWINSZ
9998         yes
9999 #     endif
10000     
10001 EOF
10002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10003   egrep "yes" >/dev/null 2>&1; then
10004   rm -rf conftest*
10005   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10006 fi
10007 rm -f conftest*
10008
10009   fi
10010   
10011 fi
10012
10013 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10014   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10015     cat >> confdefs.h <<\EOF
10016 #define GWINSZ_IN_SYS_IOCTL 1
10017 EOF
10018
10019   fi
10020
10021 if test $am_cv_sys_posix_termios = yes ; then
10022         cat >> confdefs.h <<\EOF
10023 #define HAVE_POSIX_TERMIOS 1
10024 EOF
10025
10026 fi
10027
10028 for ac_hdr in \
10029         arpa/inet.h             \
10030         arpa/nameser.h  \
10031         assert.h                \
10032         crypt.h                 \
10033         errno.h                 \
10034         fcntl.h                 \
10035         filio.h                 \
10036         getopt.h                \
10037         grp.h                   \
10038         libutil.h               \
10039         limits.h                \
10040         locale.h                \
10041         malloc.h                \
10042         memory.h                \
10043         psap.h                  \
10044         pwd.h                   \
10045         resolv.h                \
10046         sgtty.h                 \
10047         stdarg.h                \
10048         stddef.h                \
10049         string.h                \
10050         strings.h               \
10051         sysexits.h              \
10052         sys/file.h              \
10053         sys/filio.h             \
10054         sys/errno.h             \
10055         sys/ioctl.h             \
10056         sys/param.h             \
10057         sys/resource.h  \
10058         sys/select.h    \
10059         sys/socket.h    \
10060         sys/syslog.h    \
10061         sys/time.h              \
10062         sys/types.h             \
10063         syslog.h                \
10064         termios.h               \
10065         unistd.h                \
10066
10067 do
10068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10070 echo "configure:10071: checking for $ac_hdr" >&5
10071 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10072   echo $ac_n "(cached) $ac_c" 1>&6
10073 else
10074   cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 #include <$ac_hdr>
10078 EOF
10079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10080 { (eval echo configure:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10082 if test -z "$ac_err"; then
10083   rm -rf conftest*
10084   eval "ac_cv_header_$ac_safe=yes"
10085 else
10086   echo "$ac_err" >&5
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   eval "ac_cv_header_$ac_safe=no"
10091 fi
10092 rm -f conftest*
10093 fi
10094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10097   cat >> confdefs.h <<EOF
10098 #define $ac_tr_hdr 1
10099 EOF
10100  
10101 else
10102   echo "$ac_t""no" 1>&6
10103 fi
10104 done
10105
10106
10107 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10108 echo "configure:10109: checking for uid_t in sys/types.h" >&5
10109 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 #include <sys/types.h>
10116 EOF
10117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10118   egrep "uid_t" >/dev/null 2>&1; then
10119   rm -rf conftest*
10120   ac_cv_type_uid_t=yes
10121 else
10122   rm -rf conftest*
10123   ac_cv_type_uid_t=no
10124 fi
10125 rm -f conftest*
10126
10127 fi
10128
10129 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10130 if test $ac_cv_type_uid_t = no; then
10131   cat >> confdefs.h <<\EOF
10132 #define uid_t int
10133 EOF
10134
10135   cat >> confdefs.h <<\EOF
10136 #define gid_t int
10137 EOF
10138
10139 fi
10140
10141 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10142 echo "configure:10143: checking type of array argument to getgroups" >&5
10143 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
10144   echo $ac_n "(cached) $ac_c" 1>&6
10145 else
10146   if test "$cross_compiling" = yes; then
10147   ac_cv_type_getgroups=cross
10148 else
10149   cat > conftest.$ac_ext <<EOF
10150 #line 10151 "configure"
10151 #include "confdefs.h"
10152
10153 /* Thanks to Mike Rendell for this test.  */
10154 #include <sys/types.h>
10155 #define NGID 256
10156 #undef MAX
10157 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10158 main()
10159 {
10160   gid_t gidset[NGID];
10161   int i, n;
10162   union { gid_t gval; long lval; }  val;
10163
10164   val.lval = -1;
10165   for (i = 0; i < NGID; i++)
10166     gidset[i] = val.gval;
10167   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10168                  gidset);
10169   /* Exit non-zero if getgroups seems to require an array of ints.  This
10170      happens when gid_t is short but getgroups modifies an array of ints.  */
10171   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10172 }
10173
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10176 then
10177     ac_cv_type_getgroups=gid_t
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -fr conftest*
10182   ac_cv_type_getgroups=int
10183 fi
10184 rm -fr conftest*
10185 fi
10186
10187 if test $ac_cv_type_getgroups = cross; then
10188         cat > conftest.$ac_ext <<EOF
10189 #line 10190 "configure"
10190 #include "confdefs.h"
10191 #include <unistd.h>
10192 EOF
10193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10194   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10195   rm -rf conftest*
10196   ac_cv_type_getgroups=gid_t
10197 else
10198   rm -rf conftest*
10199   ac_cv_type_getgroups=int
10200 fi
10201 rm -f conftest*
10202
10203 fi
10204 fi
10205
10206 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10207 cat >> confdefs.h <<EOF
10208 #define GETGROUPS_T $ac_cv_type_getgroups
10209 EOF
10210
10211  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10212 echo "configure:10213: checking for ANSI C header files" >&5
10213 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
10214   echo $ac_n "(cached) $ac_c" 1>&6
10215 else
10216   cat > conftest.$ac_ext <<EOF
10217 #line 10218 "configure"
10218 #include "confdefs.h"
10219 #include <stdlib.h>
10220 #include <stdarg.h>
10221 #include <string.h>
10222 #include <float.h>
10223 EOF
10224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10225 { (eval echo configure:10226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10227 if test -z "$ac_err"; then
10228   rm -rf conftest*
10229   ac_cv_header_stdc=yes
10230 else
10231   echo "$ac_err" >&5
10232   echo "configure: failed program was:" >&5
10233   cat conftest.$ac_ext >&5
10234   rm -rf conftest*
10235   ac_cv_header_stdc=no
10236 fi
10237 rm -f conftest*
10238
10239 if test $ac_cv_header_stdc = yes; then
10240   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10241 cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10244 #include <string.h>
10245 EOF
10246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10247   egrep "memchr" >/dev/null 2>&1; then
10248   :
10249 else
10250   rm -rf conftest*
10251   ac_cv_header_stdc=no
10252 fi
10253 rm -f conftest*
10254
10255 fi
10256
10257 if test $ac_cv_header_stdc = yes; then
10258   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10259 cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 #include <stdlib.h>
10263 EOF
10264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10265   egrep "free" >/dev/null 2>&1; then
10266   :
10267 else
10268   rm -rf conftest*
10269   ac_cv_header_stdc=no
10270 fi
10271 rm -f conftest*
10272
10273 fi
10274
10275 if test $ac_cv_header_stdc = yes; then
10276   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10277 if test "$cross_compiling" = yes; then
10278   :
10279 else
10280   cat > conftest.$ac_ext <<EOF
10281 #line 10282 "configure"
10282 #include "confdefs.h"
10283 #include <ctype.h>
10284 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10285 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10286 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10287 int main () { int i; for (i = 0; i < 256; i++)
10288 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10289 exit (0); }
10290
10291 EOF
10292 if { (eval echo configure:10293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10293 then
10294   :
10295 else
10296   echo "configure: failed program was:" >&5
10297   cat conftest.$ac_ext >&5
10298   rm -fr conftest*
10299   ac_cv_header_stdc=no
10300 fi
10301 rm -fr conftest*
10302 fi
10303
10304 fi
10305 fi
10306
10307 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10308 if test $ac_cv_header_stdc = yes; then
10309   cat >> confdefs.h <<\EOF
10310 #define STDC_HEADERS 1
10311 EOF
10312
10313 fi
10314
10315 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10316 echo "configure:10317: checking for mode_t" >&5
10317 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323 #include <sys/types.h>
10324 #if STDC_HEADERS
10325 #include <stdlib.h>
10326 #include <stddef.h>
10327 #endif
10328 EOF
10329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10330   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10331   rm -rf conftest*
10332   ac_cv_type_mode_t=yes
10333 else
10334   rm -rf conftest*
10335   ac_cv_type_mode_t=no
10336 fi
10337 rm -f conftest*
10338
10339 fi
10340 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
10341 if test $ac_cv_type_mode_t = no; then
10342   cat >> confdefs.h <<\EOF
10343 #define mode_t int
10344 EOF
10345
10346 fi
10347
10348 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10349 echo "configure:10350: checking for off_t" >&5
10350 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
10351   echo $ac_n "(cached) $ac_c" 1>&6
10352 else
10353   cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 #include <sys/types.h>
10357 #if STDC_HEADERS
10358 #include <stdlib.h>
10359 #include <stddef.h>
10360 #endif
10361 EOF
10362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10363   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10364   rm -rf conftest*
10365   ac_cv_type_off_t=yes
10366 else
10367   rm -rf conftest*
10368   ac_cv_type_off_t=no
10369 fi
10370 rm -f conftest*
10371
10372 fi
10373 echo "$ac_t""$ac_cv_type_off_t" 1>&6
10374 if test $ac_cv_type_off_t = no; then
10375   cat >> confdefs.h <<\EOF
10376 #define off_t long
10377 EOF
10378
10379 fi
10380
10381 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10382 echo "configure:10383: checking for pid_t" >&5
10383 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
10384   echo $ac_n "(cached) $ac_c" 1>&6
10385 else
10386   cat > conftest.$ac_ext <<EOF
10387 #line 10388 "configure"
10388 #include "confdefs.h"
10389 #include <sys/types.h>
10390 #if STDC_HEADERS
10391 #include <stdlib.h>
10392 #include <stddef.h>
10393 #endif
10394 EOF
10395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10396   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10397   rm -rf conftest*
10398   ac_cv_type_pid_t=yes
10399 else
10400   rm -rf conftest*
10401   ac_cv_type_pid_t=no
10402 fi
10403 rm -f conftest*
10404
10405 fi
10406 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
10407 if test $ac_cv_type_pid_t = no; then
10408   cat >> confdefs.h <<\EOF
10409 #define pid_t int
10410 EOF
10411
10412 fi
10413
10414 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10415 echo "configure:10416: checking for ptrdiff_t" >&5
10416 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
10417   echo $ac_n "(cached) $ac_c" 1>&6
10418 else
10419   cat > conftest.$ac_ext <<EOF
10420 #line 10421 "configure"
10421 #include "confdefs.h"
10422 #include <stddef.h>
10423 int main() {
10424 ptrdiff_t p
10425 ; return 0; }
10426 EOF
10427 if { (eval echo configure:10428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10428   rm -rf conftest*
10429   am_cv_type_ptrdiff_t=yes
10430 else
10431   echo "configure: failed program was:" >&5
10432   cat conftest.$ac_ext >&5
10433   rm -rf conftest*
10434   am_cv_type_ptrdiff_t=no
10435 fi
10436 rm -f conftest*
10437 fi
10438
10439 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
10440    if test $am_cv_type_ptrdiff_t = yes; then
10441      cat >> confdefs.h <<\EOF
10442 #define HAVE_PTRDIFF_T 1
10443 EOF
10444
10445    fi
10446
10447 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
10448 echo "configure:10449: checking return type of signal handlers" >&5
10449 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   cat > conftest.$ac_ext <<EOF
10453 #line 10454 "configure"
10454 #include "confdefs.h"
10455 #include <sys/types.h>
10456 #include <signal.h>
10457 #ifdef signal
10458 #undef signal
10459 #endif
10460 #ifdef __cplusplus
10461 extern "C" void (*signal (int, void (*)(int)))(int);
10462 #else
10463 void (*signal ()) ();
10464 #endif
10465
10466 int main() {
10467 int i;
10468 ; return 0; }
10469 EOF
10470 if { (eval echo configure:10471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10471   rm -rf conftest*
10472   ac_cv_type_signal=void
10473 else
10474   echo "configure: failed program was:" >&5
10475   cat conftest.$ac_ext >&5
10476   rm -rf conftest*
10477   ac_cv_type_signal=int
10478 fi
10479 rm -f conftest*
10480 fi
10481
10482 echo "$ac_t""$ac_cv_type_signal" 1>&6
10483 cat >> confdefs.h <<EOF
10484 #define RETSIGTYPE $ac_cv_type_signal
10485 EOF
10486
10487
10488 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10489 echo "configure:10490: checking for sig_atomic_t" >&5
10490 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
10491   echo $ac_n "(cached) $ac_c" 1>&6
10492 else
10493   cat > conftest.$ac_ext <<EOF
10494 #line 10495 "configure"
10495 #include "confdefs.h"
10496 #include <signal.h>
10497 int main() {
10498 sig_atomic_t atomic;
10499 ; return 0; }
10500 EOF
10501 if { (eval echo configure:10502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10502   rm -rf conftest*
10503   ol_cv_type_sig_atomic_t=yes
10504 else
10505   echo "configure: failed program was:" >&5
10506   cat conftest.$ac_ext >&5
10507   rm -rf conftest*
10508   ol_cv_type_sig_atomic_t=no
10509 fi
10510 rm -f conftest*
10511 fi
10512
10513 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
10514   if test $ol_cv_type_sig_atomic_t = no; then
10515     cat >> confdefs.h <<\EOF
10516 #define sig_atomic_t int
10517 EOF
10518
10519   fi
10520  
10521 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10522 echo "configure:10523: checking for size_t" >&5
10523 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
10524   echo $ac_n "(cached) $ac_c" 1>&6
10525 else
10526   cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529 #include <sys/types.h>
10530 #if STDC_HEADERS
10531 #include <stdlib.h>
10532 #include <stddef.h>
10533 #endif
10534 EOF
10535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10536   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10537   rm -rf conftest*
10538   ac_cv_type_size_t=yes
10539 else
10540   rm -rf conftest*
10541   ac_cv_type_size_t=no
10542 fi
10543 rm -f conftest*
10544
10545 fi
10546 echo "$ac_t""$ac_cv_type_size_t" 1>&6
10547 if test $ac_cv_type_size_t = no; then
10548   cat >> confdefs.h <<\EOF
10549 #define size_t unsigned
10550 EOF
10551
10552 fi
10553
10554 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10555 echo "configure:10556: checking for st_blksize in struct stat" >&5
10556 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562 #include <sys/types.h>
10563 #include <sys/stat.h>
10564 int main() {
10565 struct stat s; s.st_blksize;
10566 ; return 0; }
10567 EOF
10568 if { (eval echo configure:10569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10569   rm -rf conftest*
10570   ac_cv_struct_st_blksize=yes
10571 else
10572   echo "configure: failed program was:" >&5
10573   cat conftest.$ac_ext >&5
10574   rm -rf conftest*
10575   ac_cv_struct_st_blksize=no
10576 fi
10577 rm -f conftest*
10578 fi
10579
10580 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10581 if test $ac_cv_struct_st_blksize = yes; then
10582   cat >> confdefs.h <<\EOF
10583 #define HAVE_ST_BLKSIZE 1
10584 EOF
10585
10586 fi
10587
10588 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10589 echo "configure:10590: checking whether time.h and sys/time.h may both be included" >&5
10590 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10591   echo $ac_n "(cached) $ac_c" 1>&6
10592 else
10593   cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596 #include <sys/types.h>
10597 #include <sys/time.h>
10598 #include <time.h>
10599 int main() {
10600 struct tm *tp;
10601 ; return 0; }
10602 EOF
10603 if { (eval echo configure:10604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10604   rm -rf conftest*
10605   ac_cv_header_time=yes
10606 else
10607   echo "configure: failed program was:" >&5
10608   cat conftest.$ac_ext >&5
10609   rm -rf conftest*
10610   ac_cv_header_time=no
10611 fi
10612 rm -f conftest*
10613 fi
10614
10615 echo "$ac_t""$ac_cv_header_time" 1>&6
10616 if test $ac_cv_header_time = yes; then
10617   cat >> confdefs.h <<\EOF
10618 #define TIME_WITH_SYS_TIME 1
10619 EOF
10620
10621 fi
10622
10623 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10624 echo "configure:10625: checking whether struct tm is in sys/time.h or time.h" >&5
10625 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631 #include <sys/types.h>
10632 #include <time.h>
10633 int main() {
10634 struct tm *tp; tp->tm_sec;
10635 ; return 0; }
10636 EOF
10637 if { (eval echo configure:10638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10638   rm -rf conftest*
10639   ac_cv_struct_tm=time.h
10640 else
10641   echo "configure: failed program was:" >&5
10642   cat conftest.$ac_ext >&5
10643   rm -rf conftest*
10644   ac_cv_struct_tm=sys/time.h
10645 fi
10646 rm -f conftest*
10647 fi
10648
10649 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10650 if test $ac_cv_struct_tm = sys/time.h; then
10651   cat >> confdefs.h <<\EOF
10652 #define TM_IN_SYS_TIME 1
10653 EOF
10654
10655 fi
10656
10657 # test for pw_gecos in struct passwd
10658 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10659 echo "configure:10660: checking struct passwd for pw_gecos" >&5
10660 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10661   echo $ac_n "(cached) $ac_c" 1>&6
10662 else
10663   
10664         cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667 #include <pwd.h>
10668 int main() {
10669
10670         struct passwd pwd;
10671         pwd.pw_gecos = pwd.pw_name;
10672
10673 ; return 0; }
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10676   rm -rf conftest*
10677   ol_cv_struct_passwd_pw_gecos=yes
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   ol_cv_struct_passwd_pw_gecos=no
10683 fi
10684 rm -f conftest*
10685 fi
10686
10687 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10688 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10689         cat >> confdefs.h <<\EOF
10690 #define HAVE_PW_GECOS 1
10691 EOF
10692
10693 fi
10694
10695
10696
10697 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10698 echo "configure:10699: checking if toupper() requires islower()" >&5
10699 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   
10703         if test "$cross_compiling" = yes; then
10704   ol_cv_c_upper_lower=safe
10705 else
10706   cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709
10710 #include <ctype.h>
10711 main()
10712 {
10713         if ('C' == toupper('C'))
10714                 exit(0);
10715         else
10716                 exit(1);
10717 }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10720 then
10721   ol_cv_c_upper_lower=no
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -fr conftest*
10726   ol_cv_c_upper_lower=yes
10727 fi
10728 rm -fr conftest*
10729 fi
10730
10731 fi
10732
10733 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10734 if test $ol_cv_c_upper_lower != no ; then
10735         cat >> confdefs.h <<\EOF
10736 #define C_UPPER_LOWER 1
10737 EOF
10738
10739 fi
10740
10741 echo $ac_n "checking for working const""... $ac_c" 1>&6
10742 echo "configure:10743: checking for working const" >&5
10743 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10744   echo $ac_n "(cached) $ac_c" 1>&6
10745 else
10746   cat > conftest.$ac_ext <<EOF
10747 #line 10748 "configure"
10748 #include "confdefs.h"
10749
10750 int main() {
10751
10752 /* Ultrix mips cc rejects this.  */
10753 typedef int charset[2]; const charset x;
10754 /* SunOS 4.1.1 cc rejects this.  */
10755 char const *const *ccp;
10756 char **p;
10757 /* NEC SVR4.0.2 mips cc rejects this.  */
10758 struct point {int x, y;};
10759 static struct point const zero = {0,0};
10760 /* AIX XL C 1.02.0.0 rejects this.
10761    It does not let you subtract one const X* pointer from another in an arm
10762    of an if-expression whose if-part is not a constant expression */
10763 const char *g = "string";
10764 ccp = &g + (g ? g-g : 0);
10765 /* HPUX 7.0 cc rejects these. */
10766 ++ccp;
10767 p = (char**) ccp;
10768 ccp = (char const *const *) p;
10769 { /* SCO 3.2v4 cc rejects this.  */
10770   char *t;
10771   char const *s = 0 ? (char *) 0 : (char const *) 0;
10772
10773   *t++ = 0;
10774 }
10775 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10776   int x[] = {25, 17};
10777   const int *foo = &x[0];
10778   ++foo;
10779 }
10780 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10781   typedef const int *iptr;
10782   iptr p = 0;
10783   ++p;
10784 }
10785 { /* AIX XL C 1.02.0.0 rejects this saying
10786      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10787   struct s { int j; const int *ap[3]; };
10788   struct s *b; b->j = 5;
10789 }
10790 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10791   const int foo = 10;
10792 }
10793
10794 ; return 0; }
10795 EOF
10796 if { (eval echo configure:10797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10797   rm -rf conftest*
10798   ac_cv_c_const=yes
10799 else
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   ac_cv_c_const=no
10804 fi
10805 rm -f conftest*
10806 fi
10807
10808 echo "$ac_t""$ac_cv_c_const" 1>&6
10809 if test $ac_cv_c_const = no; then
10810   cat >> confdefs.h <<\EOF
10811 #define const 
10812 EOF
10813
10814 fi
10815
10816 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10817 echo "configure:10818: checking if compiler understands volatile" >&5
10818 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 int x, y, z;
10825 int main() {
10826 volatile int a; int * volatile b = x ? &y : &z;
10827       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10828       *b = 0;
10829 ; return 0; }
10830 EOF
10831 if { (eval echo configure:10832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10832   rm -rf conftest*
10833   ol_cv_c_volatile=yes
10834 else
10835   echo "configure: failed program was:" >&5
10836   cat conftest.$ac_ext >&5
10837   rm -rf conftest*
10838   ol_cv_c_volatile=no
10839 fi
10840 rm -f conftest*
10841 fi
10842
10843 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10844   if test $ol_cv_c_volatile = yes; then
10845     : 
10846   else
10847     cat >> confdefs.h <<\EOF
10848 #define volatile 
10849 EOF
10850
10851   fi
10852  
10853
10854 if test $cross_compiling = yes ; then
10855         cat >> confdefs.h <<\EOF
10856 #define CROSS_COMPILING 1
10857 EOF
10858
10859 else
10860         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10861 echo "configure:10862: checking whether byte ordering is bigendian" >&5
10862 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10863   echo $ac_n "(cached) $ac_c" 1>&6
10864 else
10865   ac_cv_c_bigendian=unknown
10866 # See if sys/param.h defines the BYTE_ORDER macro.
10867 cat > conftest.$ac_ext <<EOF
10868 #line 10869 "configure"
10869 #include "confdefs.h"
10870 #include <sys/types.h>
10871 #include <sys/param.h>
10872 int main() {
10873
10874 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10875  bogus endian macros
10876 #endif
10877 ; return 0; }
10878 EOF
10879 if { (eval echo configure:10880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10880   rm -rf conftest*
10881   # It does; now see whether it defined to BIG_ENDIAN or not.
10882 cat > conftest.$ac_ext <<EOF
10883 #line 10884 "configure"
10884 #include "confdefs.h"
10885 #include <sys/types.h>
10886 #include <sys/param.h>
10887 int main() {
10888
10889 #if BYTE_ORDER != BIG_ENDIAN
10890  not big endian
10891 #endif
10892 ; return 0; }
10893 EOF
10894 if { (eval echo configure:10895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10895   rm -rf conftest*
10896   ac_cv_c_bigendian=yes
10897 else
10898   echo "configure: failed program was:" >&5
10899   cat conftest.$ac_ext >&5
10900   rm -rf conftest*
10901   ac_cv_c_bigendian=no
10902 fi
10903 rm -f conftest*
10904 else
10905   echo "configure: failed program was:" >&5
10906   cat conftest.$ac_ext >&5
10907 fi
10908 rm -f conftest*
10909 if test $ac_cv_c_bigendian = unknown; then
10910 if test "$cross_compiling" = yes; then
10911     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10912 else
10913   cat > conftest.$ac_ext <<EOF
10914 #line 10915 "configure"
10915 #include "confdefs.h"
10916 main () {
10917   /* Are we little or big endian?  From Harbison&Steele.  */
10918   union
10919   {
10920     long l;
10921     char c[sizeof (long)];
10922   } u;
10923   u.l = 1;
10924   exit (u.c[sizeof (long) - 1] == 1);
10925 }
10926 EOF
10927 if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10928 then
10929   ac_cv_c_bigendian=no
10930 else
10931   echo "configure: failed program was:" >&5
10932   cat conftest.$ac_ext >&5
10933   rm -fr conftest*
10934   ac_cv_c_bigendian=yes
10935 fi
10936 rm -fr conftest*
10937 fi
10938
10939 fi
10940 fi
10941
10942 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10943 if test $ac_cv_c_bigendian = yes; then
10944   cat >> confdefs.h <<\EOF
10945 #define WORDS_BIGENDIAN 1
10946 EOF
10947
10948 fi
10949
10950         echo $ac_n "checking size of short""... $ac_c" 1>&6
10951 echo "configure:10952: checking size of short" >&5
10952 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10953   echo $ac_n "(cached) $ac_c" 1>&6
10954 else
10955   if test "$cross_compiling" = yes; then
10956     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10957 else
10958   cat > conftest.$ac_ext <<EOF
10959 #line 10960 "configure"
10960 #include "confdefs.h"
10961 #include <stdio.h>
10962 main()
10963 {
10964   FILE *f=fopen("conftestval", "w");
10965   if (!f) exit(1);
10966   fprintf(f, "%d\n", sizeof(short));
10967   exit(0);
10968 }
10969 EOF
10970 if { (eval echo configure:10971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10971 then
10972   ac_cv_sizeof_short=`cat conftestval`
10973 else
10974   echo "configure: failed program was:" >&5
10975   cat conftest.$ac_ext >&5
10976   rm -fr conftest*
10977   ac_cv_sizeof_short=0
10978 fi
10979 rm -fr conftest*
10980 fi
10981
10982 fi
10983 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10984 cat >> confdefs.h <<EOF
10985 #define SIZEOF_SHORT $ac_cv_sizeof_short
10986 EOF
10987
10988  
10989         echo $ac_n "checking size of int""... $ac_c" 1>&6
10990 echo "configure:10991: checking size of int" >&5
10991 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10992   echo $ac_n "(cached) $ac_c" 1>&6
10993 else
10994   if test "$cross_compiling" = yes; then
10995     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10996 else
10997   cat > conftest.$ac_ext <<EOF
10998 #line 10999 "configure"
10999 #include "confdefs.h"
11000 #include <stdio.h>
11001 main()
11002 {
11003   FILE *f=fopen("conftestval", "w");
11004   if (!f) exit(1);
11005   fprintf(f, "%d\n", sizeof(int));
11006   exit(0);
11007 }
11008 EOF
11009 if { (eval echo configure:11010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11010 then
11011   ac_cv_sizeof_int=`cat conftestval`
11012 else
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -fr conftest*
11016   ac_cv_sizeof_int=0
11017 fi
11018 rm -fr conftest*
11019 fi
11020
11021 fi
11022 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11023 cat >> confdefs.h <<EOF
11024 #define SIZEOF_INT $ac_cv_sizeof_int
11025 EOF
11026
11027  
11028         echo $ac_n "checking size of long""... $ac_c" 1>&6
11029 echo "configure:11030: checking size of long" >&5
11030 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
11031   echo $ac_n "(cached) $ac_c" 1>&6
11032 else
11033   if test "$cross_compiling" = yes; then
11034     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11035 else
11036   cat > conftest.$ac_ext <<EOF
11037 #line 11038 "configure"
11038 #include "confdefs.h"
11039 #include <stdio.h>
11040 main()
11041 {
11042   FILE *f=fopen("conftestval", "w");
11043   if (!f) exit(1);
11044   fprintf(f, "%d\n", sizeof(long));
11045   exit(0);
11046 }
11047 EOF
11048 if { (eval echo configure:11049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11049 then
11050   ac_cv_sizeof_long=`cat conftestval`
11051 else
11052   echo "configure: failed program was:" >&5
11053   cat conftest.$ac_ext >&5
11054   rm -fr conftest*
11055   ac_cv_sizeof_long=0
11056 fi
11057 rm -fr conftest*
11058 fi
11059
11060 fi
11061 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11062 cat >> confdefs.h <<EOF
11063 #define SIZEOF_LONG $ac_cv_sizeof_long
11064 EOF
11065
11066
11067
11068         if test "$ac_cv_sizeof_int" -lt 4 ; then
11069                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11070         fi
11071 fi
11072
11073 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11074 echo "configure:11075: checking for 8-bit clean memcmp" >&5
11075 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
11076   echo $ac_n "(cached) $ac_c" 1>&6
11077 else
11078   if test "$cross_compiling" = yes; then
11079   ac_cv_func_memcmp_clean=no
11080 else
11081   cat > conftest.$ac_ext <<EOF
11082 #line 11083 "configure"
11083 #include "confdefs.h"
11084
11085 main()
11086 {
11087   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11088   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11089 }
11090
11091 EOF
11092 if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11093 then
11094   ac_cv_func_memcmp_clean=yes
11095 else
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -fr conftest*
11099   ac_cv_func_memcmp_clean=no
11100 fi
11101 rm -fr conftest*
11102 fi
11103
11104 fi
11105
11106 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11107 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11108
11109 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11110 echo "configure:11111: checking for strftime" >&5
11111 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117 /* System header to define __stub macros and hopefully few prototypes,
11118     which can conflict with char strftime(); below.  */
11119 #include <assert.h>
11120 /* Override any gcc2 internal prototype to avoid an error.  */
11121 /* We use char because int might match the return type of a gcc2
11122     builtin and then its argument prototype would still apply.  */
11123 char strftime();
11124
11125 int main() {
11126
11127 /* The GNU C library defines this for functions which it implements
11128     to always fail with ENOSYS.  Some functions are actually named
11129     something starting with __ and the normal name is an alias.  */
11130 #if defined (__stub_strftime) || defined (__stub___strftime)
11131 choke me
11132 #else
11133 strftime();
11134 #endif
11135
11136 ; return 0; }
11137 EOF
11138 if { (eval echo configure:11139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11139   rm -rf conftest*
11140   eval "ac_cv_func_strftime=yes"
11141 else
11142   echo "configure: failed program was:" >&5
11143   cat conftest.$ac_ext >&5
11144   rm -rf conftest*
11145   eval "ac_cv_func_strftime=no"
11146 fi
11147 rm -f conftest*
11148 fi
11149
11150 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11151   echo "$ac_t""yes" 1>&6
11152   cat >> confdefs.h <<\EOF
11153 #define HAVE_STRFTIME 1
11154 EOF
11155
11156 else
11157   echo "$ac_t""no" 1>&6
11158 # strftime is in -lintl on SCO UNIX.
11159 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11160 echo "configure:11161: checking for strftime in -lintl" >&5
11161 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
11162 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11163   echo $ac_n "(cached) $ac_c" 1>&6
11164 else
11165   ac_save_LIBS="$LIBS"
11166 LIBS="-lintl  $LIBS"
11167 cat > conftest.$ac_ext <<EOF
11168 #line 11169 "configure"
11169 #include "confdefs.h"
11170 /* Override any gcc2 internal prototype to avoid an error.  */
11171 /* We use char because int might match the return type of a gcc2
11172     builtin and then its argument prototype would still apply.  */
11173 char strftime();
11174
11175 int main() {
11176 strftime()
11177 ; return 0; }
11178 EOF
11179 if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11180   rm -rf conftest*
11181   eval "ac_cv_lib_$ac_lib_var=yes"
11182 else
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_lib_$ac_lib_var=no"
11187 fi
11188 rm -f conftest*
11189 LIBS="$ac_save_LIBS"
11190
11191 fi
11192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11193   echo "$ac_t""yes" 1>&6
11194   cat >> confdefs.h <<\EOF
11195 #define HAVE_STRFTIME 1
11196 EOF
11197
11198 LIBS="-lintl $LIBS"
11199 else
11200   echo "$ac_t""no" 1>&6
11201 fi
11202
11203 fi
11204
11205
11206 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11207 echo "configure:11208: checking for vprintf" >&5
11208 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   cat > conftest.$ac_ext <<EOF
11212 #line 11213 "configure"
11213 #include "confdefs.h"
11214 /* System header to define __stub macros and hopefully few prototypes,
11215     which can conflict with char vprintf(); below.  */
11216 #include <assert.h>
11217 /* Override any gcc2 internal prototype to avoid an error.  */
11218 /* We use char because int might match the return type of a gcc2
11219     builtin and then its argument prototype would still apply.  */
11220 char vprintf();
11221
11222 int main() {
11223
11224 /* The GNU C library defines this for functions which it implements
11225     to always fail with ENOSYS.  Some functions are actually named
11226     something starting with __ and the normal name is an alias.  */
11227 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11228 choke me
11229 #else
11230 vprintf();
11231 #endif
11232
11233 ; return 0; }
11234 EOF
11235 if { (eval echo configure:11236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11236   rm -rf conftest*
11237   eval "ac_cv_func_vprintf=yes"
11238 else
11239   echo "configure: failed program was:" >&5
11240   cat conftest.$ac_ext >&5
11241   rm -rf conftest*
11242   eval "ac_cv_func_vprintf=no"
11243 fi
11244 rm -f conftest*
11245 fi
11246
11247 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249   cat >> confdefs.h <<\EOF
11250 #define HAVE_VPRINTF 1
11251 EOF
11252
11253 else
11254   echo "$ac_t""no" 1>&6
11255 fi
11256
11257 if test "$ac_cv_func_vprintf" != yes; then
11258 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11259 echo "configure:11260: checking for _doprnt" >&5
11260 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
11261   echo $ac_n "(cached) $ac_c" 1>&6
11262 else
11263   cat > conftest.$ac_ext <<EOF
11264 #line 11265 "configure"
11265 #include "confdefs.h"
11266 /* System header to define __stub macros and hopefully few prototypes,
11267     which can conflict with char _doprnt(); below.  */
11268 #include <assert.h>
11269 /* Override any gcc2 internal prototype to avoid an error.  */
11270 /* We use char because int might match the return type of a gcc2
11271     builtin and then its argument prototype would still apply.  */
11272 char _doprnt();
11273
11274 int main() {
11275
11276 /* The GNU C library defines this for functions which it implements
11277     to always fail with ENOSYS.  Some functions are actually named
11278     something starting with __ and the normal name is an alias.  */
11279 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11280 choke me
11281 #else
11282 _doprnt();
11283 #endif
11284
11285 ; return 0; }
11286 EOF
11287 if { (eval echo configure:11288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11288   rm -rf conftest*
11289   eval "ac_cv_func__doprnt=yes"
11290 else
11291   echo "configure: failed program was:" >&5
11292   cat conftest.$ac_ext >&5
11293   rm -rf conftest*
11294   eval "ac_cv_func__doprnt=no"
11295 fi
11296 rm -f conftest*
11297 fi
11298
11299 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
11300   echo "$ac_t""yes" 1>&6
11301   cat >> confdefs.h <<\EOF
11302 #define HAVE_DOPRNT 1
11303 EOF
11304
11305 else
11306   echo "$ac_t""no" 1>&6
11307 fi
11308
11309 fi
11310
11311
11312 if test $ac_cv_func_vprintf = yes ; then
11313                 for ac_func in vsnprintf vsprintf
11314 do
11315 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11316 echo "configure:11317: checking for $ac_func" >&5
11317 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11318   echo $ac_n "(cached) $ac_c" 1>&6
11319 else
11320   cat > conftest.$ac_ext <<EOF
11321 #line 11322 "configure"
11322 #include "confdefs.h"
11323 /* System header to define __stub macros and hopefully few prototypes,
11324     which can conflict with char $ac_func(); below.  */
11325 #include <assert.h>
11326 /* Override any gcc2 internal prototype to avoid an error.  */
11327 /* We use char because int might match the return type of a gcc2
11328     builtin and then its argument prototype would still apply.  */
11329 char $ac_func();
11330
11331 int main() {
11332
11333 /* The GNU C library defines this for functions which it implements
11334     to always fail with ENOSYS.  Some functions are actually named
11335     something starting with __ and the normal name is an alias.  */
11336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11337 choke me
11338 #else
11339 $ac_func();
11340 #endif
11341
11342 ; return 0; }
11343 EOF
11344 if { (eval echo configure:11345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11345   rm -rf conftest*
11346   eval "ac_cv_func_$ac_func=yes"
11347 else
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -rf conftest*
11351   eval "ac_cv_func_$ac_func=no"
11352 fi
11353 rm -f conftest*
11354 fi
11355
11356 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11357   echo "$ac_t""yes" 1>&6
11358     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11359   cat >> confdefs.h <<EOF
11360 #define $ac_tr_func 1
11361 EOF
11362  
11363 else
11364   echo "$ac_t""no" 1>&6
11365 fi
11366 done
11367
11368 fi
11369
11370 for ac_func in \
11371         bcopy                   \
11372         closesocket             \
11373         endgrent                \
11374         endpwent                \
11375         flock                   \
11376         getdtablesize   \
11377         getgrgid                \
11378         gethostname             \
11379         getpass                 \
11380         getpwuid                \
11381         gettimeofday    \
11382         initgroups              \
11383         lockf                   \
11384         memcpy                  \
11385         memmove                 \
11386         mkstemp                 \
11387         recv                    \
11388         recvfrom                \
11389         setpwfile               \
11390         setgid                  \
11391         setegid                 \
11392         setsid                  \
11393         setuid                  \
11394         seteuid                 \
11395         signal                  \
11396         sigset                  \
11397         snprintf                \
11398         strdup                  \
11399         strerror                \
11400         strpbrk                 \
11401         strrchr                 \
11402         strsep                  \
11403         strstr                  \
11404         strtol                  \
11405         strtoul                 \
11406         strspn                  \
11407         sysconf                 \
11408         waitpid                 \
11409         wait4                   \
11410
11411 do
11412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11413 echo "configure:11414: checking for $ac_func" >&5
11414 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11415   echo $ac_n "(cached) $ac_c" 1>&6
11416 else
11417   cat > conftest.$ac_ext <<EOF
11418 #line 11419 "configure"
11419 #include "confdefs.h"
11420 /* System header to define __stub macros and hopefully few prototypes,
11421     which can conflict with char $ac_func(); below.  */
11422 #include <assert.h>
11423 /* Override any gcc2 internal prototype to avoid an error.  */
11424 /* We use char because int might match the return type of a gcc2
11425     builtin and then its argument prototype would still apply.  */
11426 char $ac_func();
11427
11428 int main() {
11429
11430 /* The GNU C library defines this for functions which it implements
11431     to always fail with ENOSYS.  Some functions are actually named
11432     something starting with __ and the normal name is an alias.  */
11433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11434 choke me
11435 #else
11436 $ac_func();
11437 #endif
11438
11439 ; return 0; }
11440 EOF
11441 if { (eval echo configure:11442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11442   rm -rf conftest*
11443   eval "ac_cv_func_$ac_func=yes"
11444 else
11445   echo "configure: failed program was:" >&5
11446   cat conftest.$ac_ext >&5
11447   rm -rf conftest*
11448   eval "ac_cv_func_$ac_func=no"
11449 fi
11450 rm -f conftest*
11451 fi
11452
11453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11454   echo "$ac_t""yes" 1>&6
11455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11456   cat >> confdefs.h <<EOF
11457 #define $ac_tr_func 1
11458 EOF
11459  
11460 else
11461   echo "$ac_t""no" 1>&6
11462 fi
11463 done
11464
11465
11466 for ac_func in getopt tempnam
11467 do
11468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11469 echo "configure:11470: checking for $ac_func" >&5
11470 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11471   echo $ac_n "(cached) $ac_c" 1>&6
11472 else
11473   cat > conftest.$ac_ext <<EOF
11474 #line 11475 "configure"
11475 #include "confdefs.h"
11476 /* System header to define __stub macros and hopefully few prototypes,
11477     which can conflict with char $ac_func(); below.  */
11478 #include <assert.h>
11479 /* Override any gcc2 internal prototype to avoid an error.  */
11480 /* We use char because int might match the return type of a gcc2
11481     builtin and then its argument prototype would still apply.  */
11482 char $ac_func();
11483
11484 int main() {
11485
11486 /* The GNU C library defines this for functions which it implements
11487     to always fail with ENOSYS.  Some functions are actually named
11488     something starting with __ and the normal name is an alias.  */
11489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11490 choke me
11491 #else
11492 $ac_func();
11493 #endif
11494
11495 ; return 0; }
11496 EOF
11497 if { (eval echo configure:11498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11498   rm -rf conftest*
11499   eval "ac_cv_func_$ac_func=yes"
11500 else
11501   echo "configure: failed program was:" >&5
11502   cat conftest.$ac_ext >&5
11503   rm -rf conftest*
11504   eval "ac_cv_func_$ac_func=no"
11505 fi
11506 rm -f conftest*
11507 fi
11508
11509 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11510   echo "$ac_t""yes" 1>&6
11511     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11512   cat >> confdefs.h <<EOF
11513 #define $ac_tr_func 1
11514 EOF
11515  
11516 else
11517   echo "$ac_t""no" 1>&6
11518 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
11519 fi
11520 done
11521
11522
11523
11524 # Check Configuration
11525
11526 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
11527 echo "configure:11528: checking declaration of sys_errlist" >&5
11528 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
11529   echo $ac_n "(cached) $ac_c" 1>&6
11530 else
11531   
11532         cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535
11536 #include <stdio.h>
11537 #include <sys/types.h>
11538 #include <errno.h> 
11539 int main() {
11540 char *c = (char *) *sys_errlist
11541 ; return 0; }
11542 EOF
11543 if { (eval echo configure:11544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11544   rm -rf conftest*
11545   ol_cv_dcl_sys_errlist=yes
11546 else
11547   echo "configure: failed program was:" >&5
11548   cat conftest.$ac_ext >&5
11549   rm -rf conftest*
11550   ol_cv_dcl_sys_errlist=no
11551 fi
11552 rm -f conftest*
11553 fi
11554
11555 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
11556 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
11557 if test $ol_cv_dcl_sys_errlist = no ; then
11558         cat >> confdefs.h <<\EOF
11559 #define DECL_SYS_ERRLIST 1
11560 EOF
11561
11562         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11563 echo "configure:11564: checking existence of sys_errlist" >&5
11564         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11565   echo $ac_n "(cached) $ac_c" 1>&6
11566 else
11567   
11568                 cat > conftest.$ac_ext <<EOF
11569 #line 11570 "configure"
11570 #include "confdefs.h"
11571 #include <errno.h>
11572 int main() {
11573 char *c = (char *) *sys_errlist
11574 ; return 0; }
11575 EOF
11576 if { (eval echo configure:11577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11577   rm -rf conftest*
11578   ol_cv_have_sys_errlist=yes
11579 else
11580   echo "configure: failed program was:" >&5
11581   cat conftest.$ac_ext >&5
11582   rm -rf conftest*
11583   ol_cv_have_sys_errlist=no
11584 fi
11585 rm -f conftest*
11586 fi
11587
11588         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11589         if test $ol_cv_have_sys_errlist = yes ; then
11590                 cat >> confdefs.h <<\EOF
11591 #define HAVE_SYS_ERRLIST 1
11592 EOF
11593
11594         fi
11595 fi
11596
11597
11598
11599 if test "$ol_enable_debug" != no ; then
11600         cat >> confdefs.h <<\EOF
11601 #define LDAP_DEBUG 1
11602 EOF
11603
11604 fi
11605 if test "$ol_enable_syslog" = yes ; then
11606         cat >> confdefs.h <<\EOF
11607 #define LDAP_SYSLOG 1
11608 EOF
11609
11610 fi
11611 if test "$ol_enable_libui" = yes ; then
11612         cat >> confdefs.h <<\EOF
11613 #define LDAP_LIBUI 1
11614 EOF
11615
11616 fi
11617 if test "$ol_enable_cache" = no ; then
11618         cat >> confdefs.h <<\EOF
11619 #define LDAP_NOCACHE 1
11620 EOF
11621
11622 fi
11623 if test "$ol_enable_dns" != no ; then
11624         cat >> confdefs.h <<\EOF
11625 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11626 EOF
11627
11628 fi
11629 if test "$ol_enable_proctitle" != no ; then
11630         cat >> confdefs.h <<\EOF
11631 #define LDAP_PROCTITLE 1
11632 EOF
11633
11634 fi
11635 if test "$ol_enable_referrals" != no ; then
11636         cat >> confdefs.h <<\EOF
11637 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11638 EOF
11639
11640 fi
11641 if test "$ol_enable_cldap" != no ; then
11642         cat >> confdefs.h <<\EOF
11643 #define LDAP_CONNECTIONLESS 1
11644 EOF
11645
11646 fi
11647
11648 if test "$ol_enable_aclgroups" != no ; then
11649         cat >> confdefs.h <<\EOF
11650 #define SLAPD_ACLGROUPS 1
11651 EOF
11652
11653 fi
11654 if test "$ol_enable_crypt" != no ; then
11655         cat >> confdefs.h <<\EOF
11656 #define SLAPD_CRYPT 1
11657 EOF
11658
11659 fi
11660 if test "$ol_enable_cleartext" != no ; then
11661         cat >> confdefs.h <<\EOF
11662 #define SLAPD_CLEARTEXT 1
11663 EOF
11664
11665 fi
11666 if test "$ol_enable_phonetic" != no ; then
11667         cat >> confdefs.h <<\EOF
11668 #define SLAPD_PHONETIC 1
11669 EOF
11670
11671 fi
11672 if test "$ol_enable_rlookups" != no ; then
11673         cat >> confdefs.h <<\EOF
11674 #define SLAPD_RLOOKUPS 1
11675 EOF
11676
11677 fi
11678
11679 if test "$ol_link_modules" != no ; then
11680         cat >> confdefs.h <<\EOF
11681 #define SLAPD_MODULES 1
11682 EOF
11683
11684         BUILD_SLAPD=yes
11685 fi
11686
11687 if test "$ol_link_bdb2" != no ; then
11688         cat >> confdefs.h <<\EOF
11689 #define SLAPD_BDB2 1
11690 EOF
11691
11692         BUILD_SLAPD=yes
11693         BUILD_BDB2=yes
11694 fi
11695
11696 if test "$ol_enable_ldap" != no ; then
11697         cat >> confdefs.h <<\EOF
11698 #define SLAPD_LDAP 1
11699 EOF
11700
11701         BUILD_SLAPD=yes
11702         BUILD_LDAP=yes
11703 fi
11704
11705 if test "$ol_link_ldbm" != no ; then
11706         cat >> confdefs.h <<\EOF
11707 #define SLAPD_LDBM 1
11708 EOF
11709
11710         BUILD_SLAPD=yes
11711         BUILD_LDBM=yes
11712 fi
11713
11714 if test "$ol_enable_passwd" != no ; then
11715         cat >> confdefs.h <<\EOF
11716 #define SLAPD_PASSWD 1
11717 EOF
11718
11719         BUILD_SLAPD=yes
11720         BUILD_PASSWD=yes
11721 fi
11722
11723 if test "$ol_link_perl" != no ; then
11724         cat >> confdefs.h <<\EOF
11725 #define SLAPD_PERL 1
11726 EOF
11727
11728         BUILD_SLAPD=yes
11729         BUILD_PERL=yes
11730 fi
11731
11732 if test "$ol_enable_shell" != no ; then
11733         cat >> confdefs.h <<\EOF
11734 #define SLAPD_SHELL 1
11735 EOF
11736
11737         BUILD_SLAPD=yes
11738         BUILD_SHELL=yes
11739 fi
11740
11741 if test "$ol_enable_tcl" != no ; then
11742         cat >> confdefs.h <<\EOF
11743 #define SLAPD_TCL 1
11744 EOF
11745
11746         BUILD_SLAPD=yes
11747         BUILD_TCL=yes
11748 fi
11749
11750 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11751         $BUILD_SLAPD = yes ; then
11752         BUILD_SLURPD=yes
11753 fi
11754
11755 if test "$ol_link_isode" != no ; then
11756         BUILD_LDAPD=yes
11757 fi
11758
11759
11760
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 trap '' 1 2 15
11792
11793 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11794
11795 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11796 # Let make expand exec_prefix.
11797 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11798
11799 # Any assignment to VPATH causes Sun make to only execute
11800 # the first set of double-colon rules, so remove it if not needed.
11801 # If there is a colon in the path, we need to keep it.
11802 if test "x$srcdir" = x.; then
11803   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11804 fi
11805
11806 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11807
11808 DEFS=-DHAVE_CONFIG_H
11809
11810 # Without the "./", some shells look in PATH for config.status.
11811 : ${CONFIG_STATUS=./config.status}
11812
11813 echo creating $CONFIG_STATUS
11814 rm -f $CONFIG_STATUS
11815 cat > $CONFIG_STATUS <<EOF
11816 #! /bin/sh
11817 # Generated automatically by configure.
11818 # Run this file to recreate the current configuration.
11819 # This directory was configured as follows,
11820 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11821 #
11822 # $0 $ac_configure_args
11823 #
11824 # Compiler output produced by configure, useful for debugging
11825 # configure, is in ./config.log if it exists.
11826
11827 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11828 for ac_option
11829 do
11830   case "\$ac_option" in
11831   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11832     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11833     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11834   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11835     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11836     exit 0 ;;
11837   -help | --help | --hel | --he | --h)
11838     echo "\$ac_cs_usage"; exit 0 ;;
11839   *) echo "\$ac_cs_usage"; exit 1 ;;
11840   esac
11841 done
11842
11843 ac_given_srcdir=$srcdir
11844 ac_given_INSTALL="$INSTALL"
11845
11846 trap 'rm -fr `echo "\
11847 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11848 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11849 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11850 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11851 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11852 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11853 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11854 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11855 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11856 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11857 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11858 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11859 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11860 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11861 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11862 include/Makefile:build/top.mk:include/Makefile.in \
11863 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11864 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11865 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11866 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11867 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11868 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11869 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11870 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11871 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11872 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11873 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11874 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11875 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
11876 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11877 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11878 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11879 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11880 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11881 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11882 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11883 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11884 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11885 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11886 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11887 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11888 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11889  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11890 EOF
11891 cat >> $CONFIG_STATUS <<EOF
11892
11893 # Protect against being on the right side of a sed subst in config.status.
11894 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11895  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11896 $ac_vpsub
11897 $extrasub
11898 s%@SHELL@%$SHELL%g
11899 s%@CFLAGS@%$CFLAGS%g
11900 s%@CPPFLAGS@%$CPPFLAGS%g
11901 s%@CXXFLAGS@%$CXXFLAGS%g
11902 s%@FFLAGS@%$FFLAGS%g
11903 s%@DEFS@%$DEFS%g
11904 s%@LDFLAGS@%$LDFLAGS%g
11905 s%@LIBS@%$LIBS%g
11906 s%@exec_prefix@%$exec_prefix%g
11907 s%@prefix@%$prefix%g
11908 s%@program_transform_name@%$program_transform_name%g
11909 s%@bindir@%$bindir%g
11910 s%@sbindir@%$sbindir%g
11911 s%@libexecdir@%$libexecdir%g
11912 s%@datadir@%$datadir%g
11913 s%@sysconfdir@%$sysconfdir%g
11914 s%@sharedstatedir@%$sharedstatedir%g
11915 s%@localstatedir@%$localstatedir%g
11916 s%@libdir@%$libdir%g
11917 s%@includedir@%$includedir%g
11918 s%@oldincludedir@%$oldincludedir%g
11919 s%@infodir@%$infodir%g
11920 s%@mandir@%$mandir%g
11921 s%@host@%$host%g
11922 s%@host_alias@%$host_alias%g
11923 s%@host_cpu@%$host_cpu%g
11924 s%@host_vendor@%$host_vendor%g
11925 s%@host_os@%$host_os%g
11926 s%@target@%$target%g
11927 s%@target_alias@%$target_alias%g
11928 s%@target_cpu@%$target_cpu%g
11929 s%@target_vendor@%$target_vendor%g
11930 s%@target_os@%$target_os%g
11931 s%@build@%$build%g
11932 s%@build_alias@%$build_alias%g
11933 s%@build_cpu@%$build_cpu%g
11934 s%@build_vendor@%$build_vendor%g
11935 s%@build_os@%$build_os%g
11936 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11937 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11938 s%@INSTALL_DATA@%$INSTALL_DATA%g
11939 s%@PACKAGE@%$PACKAGE%g
11940 s%@VERSION@%$VERSION%g
11941 s%@ACLOCAL@%$ACLOCAL%g
11942 s%@AUTOCONF@%$AUTOCONF%g
11943 s%@AUTOMAKE@%$AUTOMAKE%g
11944 s%@AUTOHEADER@%$AUTOHEADER%g
11945 s%@MAKEINFO@%$MAKEINFO%g
11946 s%@SET_MAKE@%$SET_MAKE%g
11947 s%@top_builddir@%$top_builddir%g
11948 s%@ldap_subdir@%$ldap_subdir%g
11949 s%@CC@%$CC%g
11950 s%@RANLIB@%$RANLIB%g
11951 s%@LD@%$LD%g
11952 s%@NM@%$NM%g
11953 s%@LN_S@%$LN_S%g
11954 s%@LIBTOOL@%$LIBTOOL%g
11955 s%@AWK@%$AWK%g
11956 s%@LN_H@%$LN_H%g
11957 s%@SENDMAIL@%$SENDMAIL%g
11958 s%@EDITOR@%$EDITOR%g
11959 s%@FINGER@%$FINGER%g
11960 s%@GLIBCONFIG@%$GLIBCONFIG%g
11961 s%@PERLBIN@%$PERLBIN%g
11962 s%@CPP@%$CPP%g
11963 s%@EXEEXT@%$EXEEXT%g
11964 s%@OBJEXT@%$OBJEXT%g
11965 s%@OL_MKDEP@%$OL_MKDEP%g
11966 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
11967 s%@PEPSY@%$PEPSY%g
11968 s%@LIBOBJS@%$LIBOBJS%g
11969 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11970 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11971 s%@BUILD_BDB2@%$BUILD_BDB2%g
11972 s%@BUILD_LDAP@%$BUILD_LDAP%g
11973 s%@BUILD_LDBM@%$BUILD_LDBM%g
11974 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11975 s%@BUILD_PERL@%$BUILD_PERL%g
11976 s%@BUILD_SHELL@%$BUILD_SHELL%g
11977 s%@BUILD_TCL@%$BUILD_TCL%g
11978 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11979 s%@LDAP_LIBS@%$LDAP_LIBS%g
11980 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11981 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11982 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11983 s%@LDBM_LIBS@%$LDBM_LIBS%g
11984 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11985 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11986 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
11987 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
11988 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11989 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11990 s%@KRB_LIBS@%$KRB_LIBS%g
11991 s%@READLINE_LIBS@%$READLINE_LIBS%g
11992 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11993 s%@TLS_LIBS@%$TLS_LIBS%g
11994
11995 CEOF
11996 EOF
11997
11998 cat >> $CONFIG_STATUS <<\EOF
11999
12000 # Split the substitutions into bite-sized pieces for seds with
12001 # small command number limits, like on Digital OSF/1 and HP-UX.
12002 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12003 ac_file=1 # Number of current file.
12004 ac_beg=1 # First line for current file.
12005 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12006 ac_more_lines=:
12007 ac_sed_cmds=""
12008 while $ac_more_lines; do
12009   if test $ac_beg -gt 1; then
12010     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12011   else
12012     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12013   fi
12014   if test ! -s conftest.s$ac_file; then
12015     ac_more_lines=false
12016     rm -f conftest.s$ac_file
12017   else
12018     if test -z "$ac_sed_cmds"; then
12019       ac_sed_cmds="sed -f conftest.s$ac_file"
12020     else
12021       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12022     fi
12023     ac_file=`expr $ac_file + 1`
12024     ac_beg=$ac_end
12025     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12026   fi
12027 done
12028 if test -z "$ac_sed_cmds"; then
12029   ac_sed_cmds=cat
12030 fi
12031 EOF
12032
12033 cat >> $CONFIG_STATUS <<EOF
12034
12035 CONFIG_FILES=\${CONFIG_FILES-"\
12036 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12037 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12038 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12039 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12040 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12041 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12042 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12043 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12044 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12045 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12046 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12047 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12048 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12049 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12050 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12051 include/Makefile:build/top.mk:include/Makefile.in \
12052 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12053 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12054 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12055 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12056 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12057 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12058 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12059 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12060 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12061 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12062 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12063 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12064 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12065 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12066 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12067 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12068 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12069 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12070 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12071 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12072 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12073 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12074 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12075 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12076 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12077 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12078 "}
12079 EOF
12080 cat >> $CONFIG_STATUS <<\EOF
12081 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12082   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12083   case "$ac_file" in
12084   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12085        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12086   *) ac_file_in="${ac_file}.in" ;;
12087   esac
12088
12089   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12090
12091   # Remove last slash and all that follows it.  Not all systems have dirname.
12092   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12093   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12094     # The file is in a subdirectory.
12095     test ! -d "$ac_dir" && mkdir "$ac_dir"
12096     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12097     # A "../" for each directory in $ac_dir_suffix.
12098     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12099   else
12100     ac_dir_suffix= ac_dots=
12101   fi
12102
12103   case "$ac_given_srcdir" in
12104   .)  srcdir=.
12105       if test -z "$ac_dots"; then top_srcdir=.
12106       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12107   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12108   *) # Relative path.
12109     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12110     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12111   esac
12112
12113   case "$ac_given_INSTALL" in
12114   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12115   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12116   esac
12117
12118   echo creating "$ac_file"
12119   rm -f "$ac_file"
12120   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12121   case "$ac_file" in
12122   *Makefile*) ac_comsub="1i\\
12123 # $configure_input" ;;
12124   *) ac_comsub= ;;
12125   esac
12126
12127   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12128   sed -e "$ac_comsub
12129 s%@configure_input@%$configure_input%g
12130 s%@srcdir@%$srcdir%g
12131 s%@top_srcdir@%$top_srcdir%g
12132 s%@INSTALL@%$INSTALL%g
12133 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12134 fi; done
12135 rm -f conftest.s*
12136
12137 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12138 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12139 #
12140 # ac_d sets the value in "#define NAME VALUE" lines.
12141 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12142 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12143 ac_dC='\3'
12144 ac_dD='%g'
12145 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12146 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12147 ac_uB='\([      ]\)%\1#\2define\3'
12148 ac_uC=' '
12149 ac_uD='\4%g'
12150 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12151 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12152 ac_eB='$%\1#\2define\3'
12153 ac_eC=' '
12154 ac_eD='%g'
12155
12156 if test "${CONFIG_HEADERS+set}" != set; then
12157 EOF
12158 cat >> $CONFIG_STATUS <<EOF
12159   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
12160 EOF
12161 cat >> $CONFIG_STATUS <<\EOF
12162 fi
12163 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12164   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12165   case "$ac_file" in
12166   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12167        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12168   *) ac_file_in="${ac_file}.in" ;;
12169   esac
12170
12171   echo creating $ac_file
12172
12173   rm -f conftest.frag conftest.in conftest.out
12174   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12175   cat $ac_file_inputs > conftest.in
12176
12177 EOF
12178
12179 # Transform confdefs.h into a sed script conftest.vals that substitutes
12180 # the proper values into config.h.in to produce config.h.  And first:
12181 # Protect against being on the right side of a sed subst in config.status.
12182 # Protect against being in an unquoted here document in config.status.
12183 rm -f conftest.vals
12184 cat > conftest.hdr <<\EOF
12185 s/[\\&%]/\\&/g
12186 s%[\\$`]%\\&%g
12187 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12188 s%ac_d%ac_u%gp
12189 s%ac_u%ac_e%gp
12190 EOF
12191 sed -n -f conftest.hdr confdefs.h > conftest.vals
12192 rm -f conftest.hdr
12193
12194 # This sed command replaces #undef with comments.  This is necessary, for
12195 # example, in the case of _POSIX_SOURCE, which is predefined and required
12196 # on some systems where configure will not decide to define it.
12197 cat >> conftest.vals <<\EOF
12198 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12199 EOF
12200
12201 # Break up conftest.vals because some shells have a limit on
12202 # the size of here documents, and old seds have small limits too.
12203
12204 rm -f conftest.tail
12205 while :
12206 do
12207   ac_lines=`grep -c . conftest.vals`
12208   # grep -c gives empty output for an empty file on some AIX systems.
12209   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12210   # Write a limited-size here document to conftest.frag.
12211   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12212   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12213   echo 'CEOF
12214   sed -f conftest.frag conftest.in > conftest.out
12215   rm -f conftest.in
12216   mv conftest.out conftest.in
12217 ' >> $CONFIG_STATUS
12218   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12219   rm -f conftest.vals
12220   mv conftest.tail conftest.vals
12221 done
12222 rm -f conftest.vals
12223
12224 cat >> $CONFIG_STATUS <<\EOF
12225   rm -f conftest.frag conftest.h
12226   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12227   cat conftest.in >> conftest.h
12228   rm -f conftest.in
12229   if cmp -s $ac_file conftest.h 2>/dev/null; then
12230     echo "$ac_file is unchanged"
12231     rm -f conftest.h
12232   else
12233     # Remove last slash and all that follows it.  Not all systems have dirname.
12234       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12235       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12236       # The file is in a subdirectory.
12237       test ! -d "$ac_dir" && mkdir "$ac_dir"
12238     fi
12239     rm -f $ac_file
12240     mv conftest.h $ac_file
12241   fi
12242 fi; done
12243
12244 EOF
12245 cat >> $CONFIG_STATUS <<EOF
12246
12247 EOF
12248 cat >> $CONFIG_STATUS <<\EOF
12249
12250 date > stamp-h
12251 echo Please \"make depend\" to build dependencies
12252
12253 exit 0
12254 EOF
12255 chmod +x $CONFIG_STATUS
12256 rm -fr confdefs* $ac_clean_files
12257 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12258