]> git.sur5r.net Git - openldap/blob - configure
comment out OSF/1 yielding select force. Likely incorrect.
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-proctitle    enable proctitle support (yes)"
21 ac_help="$ac_help
22   --enable-cache        enable caching (yes)"
23 ac_help="$ac_help
24   --enable-dns          enable V2 DNS  extension (no)"
25 ac_help="$ac_help
26   --enable-referrals    enable V2 Referrals extension (yes)"
27 ac_help="$ac_help
28   --enable-cldap        enable connectionless ldap (no)"
29 ac_help="$ac_help
30   --enable-x-compile    enable cross compiling (no)"
31 ac_help="$ac_help
32   --enable-dmalloc      enable debug malloc support (no)"
33 ac_help="$ac_help
34   --with-kerberos       with Kerberos support (auto)"
35 ac_help="$ac_help
36   --with-readline  with readline support (auto)"
37 ac_help="$ac_help
38   --with-threads        use threads (auto)"
39 ac_help="$ac_help
40   --with-tls  with TLS/SSL support (auto)"
41 ac_help="$ac_help
42   --with-yielding-select        with implicitly yielding select (auto)"
43 ac_help="$ac_help
44 LDAPD Options:"
45 ac_help="$ac_help
46   --enable-ldapd        enable building ldapd (no)"
47 ac_help="$ac_help
48 SLAPD Options:"
49 ac_help="$ac_help
50   --enable-slapd        enable building slapd (yes)"
51 ac_help="$ac_help
52     --enable-aclgroups  enable ACL group support (auto)"
53 ac_help="$ac_help
54     --enable-cleartext  enable cleartext passwords (yes)"
55 ac_help="$ac_help
56     --enable-crypt      enable crypt(3) passwords (auto)"
57 ac_help="$ac_help
58     --enable-wrappers   enable tcp wrapper support (no)"
59 ac_help="$ac_help
60     --enable-phonetic   enable phonetic/soundex (no)"
61 ac_help="$ac_help
62     --enable-rlookups   enable reverse lookups (auto)"
63 ac_help="$ac_help
64     --enable-bdb2       enable bdb2 backend (no)"
65 ac_help="$ac_help
66     --enable-ldbm       enable ldbm backend (yes)"
67 ac_help="$ac_help
68       --with-ldbm-api   use LDBM API (auto)"
69 ac_help="$ac_help
70       --with-ldbm-type  use LDBM type (auto)"
71 ac_help="$ac_help
72     --enable-passwd     enable passwd backend (no)"
73 ac_help="$ac_help
74     --enable-perl       enable perl backend (no)"
75 ac_help="$ac_help
76     --enable-shell      enable shell backend (no)"
77 ac_help="$ac_help
78     --enable-tcl        enable tcl backend (no)"
79 ac_help="$ac_help
80 SLURPD Options:"
81 ac_help="$ac_help
82   --enable-slurpd       enable building slurpd (auto)"
83 ac_help="$ac_help
84 Library Generation & Linking Options"
85 ac_help="$ac_help
86   --enable-static         build static libraries [default=yes]
87   --enable-static=PKGS    only build shared libraries if the current package
88                           appears as an element in the PKGS list"
89 ac_help="$ac_help
90   --enable-shared         build shared libraries [default=yes]
91   --enable-shared=PKGS    only build shared libraries if the current package
92                           appears as an element in the PKGS list"
93 ac_help="$ac_help
94   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
95
96 # Initialize some variables set by options.
97 # The variables have the same names as the options, with
98 # dashes changed to underlines.
99 build=NONE
100 cache_file=./config.cache
101 exec_prefix=NONE
102 host=NONE
103 no_create=
104 nonopt=NONE
105 no_recursion=
106 prefix=NONE
107 program_prefix=NONE
108 program_suffix=NONE
109 program_transform_name=s,x,x,
110 silent=
111 site=
112 srcdir=
113 target=NONE
114 verbose=
115 x_includes=NONE
116 x_libraries=NONE
117 bindir='${exec_prefix}/bin'
118 sbindir='${exec_prefix}/sbin'
119 libexecdir='${exec_prefix}/libexec'
120 datadir='${prefix}/share'
121 sysconfdir='${prefix}/etc'
122 sharedstatedir='${prefix}/com'
123 localstatedir='${prefix}/var'
124 libdir='${exec_prefix}/lib'
125 includedir='${prefix}/include'
126 oldincludedir='/usr/include'
127 infodir='${prefix}/info'
128 mandir='${prefix}/man'
129
130 # Initialize some other variables.
131 subdirs=
132 MFLAGS= MAKEFLAGS=
133 SHELL=${CONFIG_SHELL-/bin/sh}
134 # Maximum number of lines to put in a shell here document.
135 ac_max_here_lines=12
136
137 ac_prev=
138 for ac_option
139 do
140
141   # If the previous option needs an argument, assign it.
142   if test -n "$ac_prev"; then
143     eval "$ac_prev=\$ac_option"
144     ac_prev=
145     continue
146   fi
147
148   case "$ac_option" in
149   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
150   *) ac_optarg= ;;
151   esac
152
153   # Accept the important Cygnus configure options, so we can diagnose typos.
154
155   case "$ac_option" in
156
157   -bindir | --bindir | --bindi | --bind | --bin | --bi)
158     ac_prev=bindir ;;
159   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
160     bindir="$ac_optarg" ;;
161
162   -build | --build | --buil | --bui | --bu)
163     ac_prev=build ;;
164   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
165     build="$ac_optarg" ;;
166
167   -cache-file | --cache-file | --cache-fil | --cache-fi \
168   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
169     ac_prev=cache_file ;;
170   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
171   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
172     cache_file="$ac_optarg" ;;
173
174   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
175     ac_prev=datadir ;;
176   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
177   | --da=*)
178     datadir="$ac_optarg" ;;
179
180   -disable-* | --disable-*)
181     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
182     # Reject names that are not valid shell variable names.
183     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
184       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
185     fi
186     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187     eval "enable_${ac_feature}=no" ;;
188
189   -enable-* | --enable-*)
190     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
191     # Reject names that are not valid shell variable names.
192     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
193       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194     fi
195     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
196     case "$ac_option" in
197       *=*) ;;
198       *) ac_optarg=yes ;;
199     esac
200     eval "enable_${ac_feature}='$ac_optarg'" ;;
201
202   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
203   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
204   | --exec | --exe | --ex)
205     ac_prev=exec_prefix ;;
206   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
207   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
208   | --exec=* | --exe=* | --ex=*)
209     exec_prefix="$ac_optarg" ;;
210
211   -gas | --gas | --ga | --g)
212     # Obsolete; use --with-gas.
213     with_gas=yes ;;
214
215   -help | --help | --hel | --he)
216     # Omit some internal or obsolete options to make the list less imposing.
217     # This message is too long to be a string in the A/UX 3.1 sh.
218     cat << EOF
219 Usage: configure [options] [host]
220 Options: [defaults in brackets after descriptions]
221 Configuration:
222   --cache-file=FILE       cache test results in FILE
223   --help                  print this message
224   --no-create             do not create output files
225   --quiet, --silent       do not print \`checking...' messages
226   --version               print the version of autoconf that created configure
227 Directory and file names:
228   --prefix=PREFIX         install architecture-independent files in PREFIX
229                           [$ac_default_prefix]
230   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
231                           [same as prefix]
232   --bindir=DIR            user executables in DIR [EPREFIX/bin]
233   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
234   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
235   --datadir=DIR           read-only architecture-independent data in DIR
236                           [PREFIX/share]
237   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
238   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
239                           [PREFIX/com]
240   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
241   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
242   --includedir=DIR        C header files in DIR [PREFIX/include]
243   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
244   --infodir=DIR           info documentation in DIR [PREFIX/info]
245   --mandir=DIR            man documentation in DIR [PREFIX/man]
246   --srcdir=DIR            find the sources in DIR [configure dir or ..]
247   --program-prefix=PREFIX prepend PREFIX to installed program names
248   --program-suffix=SUFFIX append SUFFIX to installed program names
249   --program-transform-name=PROGRAM
250                           run sed PROGRAM on installed program names
251 EOF
252     cat << EOF
253 Host type:
254   --build=BUILD           configure for building on BUILD [BUILD=HOST]
255   --host=HOST             configure for HOST [guessed]
256   --target=TARGET         configure for TARGET [TARGET=HOST]
257 Features and packages:
258   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
259   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
260   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
261   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
262   --x-includes=DIR        X include files are in DIR
263   --x-libraries=DIR       X library files are in DIR
264 EOF
265     if test -n "$ac_help"; then
266       echo "--enable and --with options recognized:$ac_help"
267     fi
268     exit 0 ;;
269
270   -host | --host | --hos | --ho)
271     ac_prev=host ;;
272   -host=* | --host=* | --hos=* | --ho=*)
273     host="$ac_optarg" ;;
274
275   -includedir | --includedir | --includedi | --included | --include \
276   | --includ | --inclu | --incl | --inc)
277     ac_prev=includedir ;;
278   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
279   | --includ=* | --inclu=* | --incl=* | --inc=*)
280     includedir="$ac_optarg" ;;
281
282   -infodir | --infodir | --infodi | --infod | --info | --inf)
283     ac_prev=infodir ;;
284   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
285     infodir="$ac_optarg" ;;
286
287   -libdir | --libdir | --libdi | --libd)
288     ac_prev=libdir ;;
289   -libdir=* | --libdir=* | --libdi=* | --libd=*)
290     libdir="$ac_optarg" ;;
291
292   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
293   | --libexe | --libex | --libe)
294     ac_prev=libexecdir ;;
295   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
296   | --libexe=* | --libex=* | --libe=*)
297     libexecdir="$ac_optarg" ;;
298
299   -localstatedir | --localstatedir | --localstatedi | --localstated \
300   | --localstate | --localstat | --localsta | --localst \
301   | --locals | --local | --loca | --loc | --lo)
302     ac_prev=localstatedir ;;
303   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
304   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
305   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
306     localstatedir="$ac_optarg" ;;
307
308   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
309     ac_prev=mandir ;;
310   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
311     mandir="$ac_optarg" ;;
312
313   -nfp | --nfp | --nf)
314     # Obsolete; use --without-fp.
315     with_fp=no ;;
316
317   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
318   | --no-cr | --no-c)
319     no_create=yes ;;
320
321   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
322   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
323     no_recursion=yes ;;
324
325   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
326   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
327   | --oldin | --oldi | --old | --ol | --o)
328     ac_prev=oldincludedir ;;
329   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
330   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
331   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
332     oldincludedir="$ac_optarg" ;;
333
334   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
335     ac_prev=prefix ;;
336   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
337     prefix="$ac_optarg" ;;
338
339   -program-prefix | --program-prefix | --program-prefi | --program-pref \
340   | --program-pre | --program-pr | --program-p)
341     ac_prev=program_prefix ;;
342   -program-prefix=* | --program-prefix=* | --program-prefi=* \
343   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
344     program_prefix="$ac_optarg" ;;
345
346   -program-suffix | --program-suffix | --program-suffi | --program-suff \
347   | --program-suf | --program-su | --program-s)
348     ac_prev=program_suffix ;;
349   -program-suffix=* | --program-suffix=* | --program-suffi=* \
350   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
351     program_suffix="$ac_optarg" ;;
352
353   -program-transform-name | --program-transform-name \
354   | --program-transform-nam | --program-transform-na \
355   | --program-transform-n | --program-transform- \
356   | --program-transform | --program-transfor \
357   | --program-transfo | --program-transf \
358   | --program-trans | --program-tran \
359   | --progr-tra | --program-tr | --program-t)
360     ac_prev=program_transform_name ;;
361   -program-transform-name=* | --program-transform-name=* \
362   | --program-transform-nam=* | --program-transform-na=* \
363   | --program-transform-n=* | --program-transform-=* \
364   | --program-transform=* | --program-transfor=* \
365   | --program-transfo=* | --program-transf=* \
366   | --program-trans=* | --program-tran=* \
367   | --progr-tra=* | --program-tr=* | --program-t=*)
368     program_transform_name="$ac_optarg" ;;
369
370   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
371   | -silent | --silent | --silen | --sile | --sil)
372     silent=yes ;;
373
374   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
375     ac_prev=sbindir ;;
376   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
377   | --sbi=* | --sb=*)
378     sbindir="$ac_optarg" ;;
379
380   -sharedstatedir | --sharedstatedir | --sharedstatedi \
381   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
382   | --sharedst | --shareds | --shared | --share | --shar \
383   | --sha | --sh)
384     ac_prev=sharedstatedir ;;
385   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
386   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
387   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
388   | --sha=* | --sh=*)
389     sharedstatedir="$ac_optarg" ;;
390
391   -site | --site | --sit)
392     ac_prev=site ;;
393   -site=* | --site=* | --sit=*)
394     site="$ac_optarg" ;;
395
396   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
397     ac_prev=srcdir ;;
398   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
399     srcdir="$ac_optarg" ;;
400
401   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
402   | --syscon | --sysco | --sysc | --sys | --sy)
403     ac_prev=sysconfdir ;;
404   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
405   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
406     sysconfdir="$ac_optarg" ;;
407
408   -target | --target | --targe | --targ | --tar | --ta | --t)
409     ac_prev=target ;;
410   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
411     target="$ac_optarg" ;;
412
413   -v | -verbose | --verbose | --verbos | --verbo | --verb)
414     verbose=yes ;;
415
416   -version | --version | --versio | --versi | --vers)
417     echo "configure generated by autoconf version 2.13"
418     exit 0 ;;
419
420   -with-* | --with-*)
421     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
422     # Reject names that are not valid shell variable names.
423     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
424       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425     fi
426     ac_package=`echo $ac_package| sed 's/-/_/g'`
427     case "$ac_option" in
428       *=*) ;;
429       *) ac_optarg=yes ;;
430     esac
431     eval "with_${ac_package}='$ac_optarg'" ;;
432
433   -without-* | --without-*)
434     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
435     # Reject names that are not valid shell variable names.
436     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
437       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
438     fi
439     ac_package=`echo $ac_package| sed 's/-/_/g'`
440     eval "with_${ac_package}=no" ;;
441
442   --x)
443     # Obsolete; use --with-x.
444     with_x=yes ;;
445
446   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
447   | --x-incl | --x-inc | --x-in | --x-i)
448     ac_prev=x_includes ;;
449   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
450   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
451     x_includes="$ac_optarg" ;;
452
453   -x-libraries | --x-libraries | --x-librarie | --x-librari \
454   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
455     ac_prev=x_libraries ;;
456   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
457   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
458     x_libraries="$ac_optarg" ;;
459
460   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
461     ;;
462
463   *)
464     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
465       echo "configure: warning: $ac_option: invalid host type" 1>&2
466     fi
467     if test "x$nonopt" != xNONE; then
468       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
469     fi
470     nonopt="$ac_option"
471     ;;
472
473   esac
474 done
475
476 if test -n "$ac_prev"; then
477   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 fi
479
480 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
481
482 # File descriptor usage:
483 # 0 standard input
484 # 1 file creation
485 # 2 errors and warnings
486 # 3 some systems may open it to /dev/tty
487 # 4 used on the Kubota Titan
488 # 6 checking for... messages and results
489 # 5 compiler messages saved in config.log
490 if test "$silent" = yes; then
491   exec 6>/dev/null
492 else
493   exec 6>&1
494 fi
495 exec 5>./config.log
496
497 echo "\
498 This file contains any messages produced by compilers while
499 running configure, to aid debugging if configure makes a mistake.
500 " 1>&5
501
502 # Strip out --no-create and --no-recursion so they do not pile up.
503 # Also quote any args containing shell metacharacters.
504 ac_configure_args=
505 for ac_arg
506 do
507   case "$ac_arg" in
508   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
509   | --no-cr | --no-c) ;;
510   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
511   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
512   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
513   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
514   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
515   esac
516 done
517
518 # NLS nuisances.
519 # Only set these to C if already set.  These must not be set unconditionally
520 # because not all systems understand e.g. LANG=C (notably SCO).
521 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
522 # Non-C LC_CTYPE values break the ctype check.
523 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
524 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
525 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
526 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
527
528 # confdefs.h avoids OS command line length limits that DEFS can exceed.
529 rm -rf conftest* confdefs.h
530 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
531 echo > confdefs.h
532
533 # A filename unique to this package, relative to the directory that
534 # configure is in, which we can look for to find out if srcdir is correct.
535 ac_unique_file=include/ldap.h
536
537 # Find the source files, if location was not specified.
538 if test -z "$srcdir"; then
539   ac_srcdir_defaulted=yes
540   # Try the directory containing this script, then its parent.
541   ac_prog=$0
542   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
543   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
544   srcdir=$ac_confdir
545   if test ! -r $srcdir/$ac_unique_file; then
546     srcdir=..
547   fi
548 else
549   ac_srcdir_defaulted=no
550 fi
551 if test ! -r $srcdir/$ac_unique_file; then
552   if test "$ac_srcdir_defaulted" = yes; then
553     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
554   else
555     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556   fi
557 fi
558 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
559
560 # Prefer explicitly selected file to automatically selected ones.
561 if test -z "$CONFIG_SITE"; then
562   if test "x$prefix" != xNONE; then
563     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
564   else
565     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566   fi
567 fi
568 for ac_site_file in $CONFIG_SITE; do
569   if test -r "$ac_site_file"; then
570     echo "loading site script $ac_site_file"
571     . "$ac_site_file"
572   fi
573 done
574
575 if test -r "$cache_file"; then
576   echo "loading cache $cache_file"
577   . $cache_file
578 else
579   echo "creating cache $cache_file"
580   > $cache_file
581 fi
582
583 ac_ext=c
584 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
585 ac_cpp='$CPP $CPPFLAGS'
586 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
587 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
588 cross_compiling=$ac_cv_prog_cc_cross
589
590 ac_exeext=
591 ac_objext=o
592 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
593   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
594   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
595     ac_n= ac_c='
596 ' ac_t='        '
597   else
598     ac_n=-n ac_c= ac_t=
599   fi
600 else
601   ac_n= ac_c='\c' ac_t=
602 fi
603
604 ac_aux_dir=
605 for ac_dir in build $srcdir/build; do
606   if test -f $ac_dir/install-sh; then
607     ac_aux_dir=$ac_dir
608     ac_install_sh="$ac_aux_dir/install-sh -c"
609     break
610   elif test -f $ac_dir/install.sh; then
611     ac_aux_dir=$ac_dir
612     ac_install_sh="$ac_aux_dir/install.sh -c"
613     break
614   fi
615 done
616 if test -z "$ac_aux_dir"; then
617   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
618 fi
619 ac_config_guess=$ac_aux_dir/config.guess
620 ac_config_sub=$ac_aux_dir/config.sub
621 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
622 # Find a good install program.  We prefer a C program (faster),
623 # so one script is as good as another.  But avoid the broken or
624 # incompatible versions:
625 # SysV /etc/install, /usr/sbin/install
626 # SunOS /usr/etc/install
627 # IRIX /sbin/install
628 # AIX /bin/install
629 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
630 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
631 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
632 # ./install, which can be erroneously created by make from ./install.sh.
633 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
634 echo "configure:635: checking for a BSD compatible install" >&5
635 if test -z "$INSTALL"; then
636 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
637   echo $ac_n "(cached) $ac_c" 1>&6
638 else
639     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
640   for ac_dir in $PATH; do
641     # Account for people who put trailing slashes in PATH elements.
642     case "$ac_dir/" in
643     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
644     *)
645       # OSF1 and SCO ODT 3.0 have their own names for install.
646       # Don't use installbsd from OSF since it installs stuff as root
647       # by default.
648       for ac_prog in ginstall scoinst install; do
649         if test -f $ac_dir/$ac_prog; then
650           if test $ac_prog = install &&
651             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
652             # AIX install.  It has an incompatible calling convention.
653             :
654           else
655             ac_cv_path_install="$ac_dir/$ac_prog -c"
656             break 2
657           fi
658         fi
659       done
660       ;;
661     esac
662   done
663   IFS="$ac_save_IFS"
664
665 fi
666   if test "${ac_cv_path_install+set}" = set; then
667     INSTALL="$ac_cv_path_install"
668   else
669     # As a last resort, use the slow shell script.  We don't cache a
670     # path for INSTALL within a source directory, because that will
671     # break other packages using the cache if that directory is
672     # removed, or if the path is relative.
673     INSTALL="$ac_install_sh"
674   fi
675 fi
676 echo "$ac_t""$INSTALL" 1>&6
677
678 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
679 # It thinks the first close brace ends the variable substitution.
680 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
681
682 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
683
684 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
685
686 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
687 echo "configure:688: checking whether build environment is sane" >&5
688 # Just in case
689 sleep 1
690 echo timestamp > conftestfile
691 # Do `set' in a subshell so we don't clobber the current shell's
692 # arguments.  Must try -L first in case configure is actually a
693 # symlink; some systems play weird games with the mod time of symlinks
694 # (eg FreeBSD returns the mod time of the symlink's containing
695 # directory).
696 if (
697    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
698    if test "$*" = "X"; then
699       # -L didn't work.
700       set X `ls -t $srcdir/configure conftestfile`
701    fi
702    if test "$*" != "X $srcdir/configure conftestfile" \
703       && test "$*" != "X conftestfile $srcdir/configure"; then
704
705       # If neither matched, then we have a broken ls.  This can happen
706       # if, for instance, CONFIG_SHELL is bash and it inherits a
707       # broken ls alias from the environment.  This has actually
708       # happened.  Such a system could not be considered "sane".
709       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
710 alias in your environment" 1>&2; exit 1; }
711    fi
712
713    test "$2" = conftestfile
714    )
715 then
716    # Ok.
717    :
718 else
719    { echo "configure: error: newly created file is older than distributed files!
720 Check your system clock" 1>&2; exit 1; }
721 fi
722 rm -f conftest*
723 echo "$ac_t""yes" 1>&6
724 if test "$program_transform_name" = s,x,x,; then
725   program_transform_name=
726 else
727   # Double any \ or $.  echo might interpret backslashes.
728   cat <<\EOF_SED > conftestsed
729 s,\\,\\\\,g; s,\$,$$,g
730 EOF_SED
731   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
732   rm -f conftestsed
733 fi
734 test "$program_prefix" != NONE &&
735   program_transform_name="s,^,${program_prefix},; $program_transform_name"
736 # Use a double $ so make ignores it.
737 test "$program_suffix" != NONE &&
738   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
739
740 # sed with no file args requires a program.
741 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
742
743 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
744 echo "configure:745: checking whether ${MAKE-make} sets \${MAKE}" >&5
745 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
746 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
747   echo $ac_n "(cached) $ac_c" 1>&6
748 else
749   cat > conftestmake <<\EOF
750 all:
751         @echo 'ac_maketemp="${MAKE}"'
752 EOF
753 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
754 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
755 if test -n "$ac_maketemp"; then
756   eval ac_cv_prog_make_${ac_make}_set=yes
757 else
758   eval ac_cv_prog_make_${ac_make}_set=no
759 fi
760 rm -f conftestmake
761 fi
762 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
763   echo "$ac_t""yes" 1>&6
764   SET_MAKE=
765 else
766   echo "$ac_t""no" 1>&6
767   SET_MAKE="MAKE=${MAKE-make}"
768 fi
769
770
771 PACKAGE=OpenLDAP
772
773 VERSION=2.0-devel
774
775 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
776   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
777 fi
778
779
780
781 missing_dir=`cd $ac_aux_dir && pwd`
782 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
783 echo "configure:784: checking for working aclocal" >&5
784 # Run test in a subshell; some versions of sh will print an error if
785 # an executable is not found, even if stderr is redirected.
786 # Redirect stdin to placate older versions of autoconf.  Sigh.
787 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
788    ACLOCAL=aclocal
789    echo "$ac_t""found" 1>&6
790 else
791    ACLOCAL="$missing_dir/missing aclocal"
792    echo "$ac_t""missing" 1>&6
793 fi
794
795 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
796 echo "configure:797: checking for working autoconf" >&5
797 # Run test in a subshell; some versions of sh will print an error if
798 # an executable is not found, even if stderr is redirected.
799 # Redirect stdin to placate older versions of autoconf.  Sigh.
800 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
801    AUTOCONF=autoconf
802    echo "$ac_t""found" 1>&6
803 else
804    AUTOCONF="$missing_dir/missing autoconf"
805    echo "$ac_t""missing" 1>&6
806 fi
807
808 echo $ac_n "checking for working automake""... $ac_c" 1>&6
809 echo "configure:810: checking for working automake" >&5
810 # Run test in a subshell; some versions of sh will print an error if
811 # an executable is not found, even if stderr is redirected.
812 # Redirect stdin to placate older versions of autoconf.  Sigh.
813 if (automake --version) < /dev/null > /dev/null 2>&1; then
814    AUTOMAKE=automake
815    echo "$ac_t""found" 1>&6
816 else
817    AUTOMAKE="$missing_dir/missing automake"
818    echo "$ac_t""missing" 1>&6
819 fi
820
821 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
822 echo "configure:823: checking for working autoheader" >&5
823 # Run test in a subshell; some versions of sh will print an error if
824 # an executable is not found, even if stderr is redirected.
825 # Redirect stdin to placate older versions of autoconf.  Sigh.
826 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
827    AUTOHEADER=autoheader
828    echo "$ac_t""found" 1>&6
829 else
830    AUTOHEADER="$missing_dir/missing autoheader"
831    echo "$ac_t""missing" 1>&6
832 fi
833
834 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
835 echo "configure:836: checking for working makeinfo" >&5
836 # Run test in a subshell; some versions of sh will print an error if
837 # an executable is not found, even if stderr is redirected.
838 # Redirect stdin to placate older versions of autoconf.  Sigh.
839 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
840    MAKEINFO=makeinfo
841    echo "$ac_t""found" 1>&6
842 else
843    MAKEINFO="$missing_dir/missing makeinfo"
844    echo "$ac_t""missing" 1>&6
845 fi
846
847
848
849
850 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
851 echo "configure:852: checking configure arguments" >&5
852
853
854 top_builddir=`pwd`
855
856 ldap_subdir="openldap"
857
858 # Check whether --with-subdir or --without-subdir was given.
859 if test "${with_subdir+set}" = set; then
860   withval="$with_subdir"
861   
862         if test "$withval" = "no"; then
863                 ldap_subdir=""
864         elif test "$withval" != "yes"; then
865                 ldap_subdir="$withval"
866         fi
867
868 fi
869
870
871 # OpenLDAP --enable-debug
872         # Check whether --enable-debug or --disable-debug was given.
873 if test "${enable_debug+set}" = set; then
874   enableval="$enable_debug"
875   
876         ol_arg=invalid
877         for ol_val in auto yes no ; do
878                 if test "$enableval" = "$ol_val" ; then
879                         ol_arg="$ol_val"
880                 fi
881         done
882         if test "$ol_arg" = "invalid" ; then
883                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
884         fi
885         ol_enable_debug="$ol_arg"
886
887 else
888         ol_enable_debug="yes"
889 fi
890 # end --enable-debug
891 ol_enable_syslog=no
892 # OpenLDAP --enable-proctitle
893         # Check whether --enable-proctitle or --disable-proctitle was given.
894 if test "${enable_proctitle+set}" = set; then
895   enableval="$enable_proctitle"
896   
897         ol_arg=invalid
898         for ol_val in auto yes no ; do
899                 if test "$enableval" = "$ol_val" ; then
900                         ol_arg="$ol_val"
901                 fi
902         done
903         if test "$ol_arg" = "invalid" ; then
904                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
905         fi
906         ol_enable_proctitle="$ol_arg"
907
908 else
909         ol_enable_proctitle="yes"
910 fi
911 # end --enable-proctitle
912 # OpenLDAP --enable-cache
913         # Check whether --enable-cache or --disable-cache was given.
914 if test "${enable_cache+set}" = set; then
915   enableval="$enable_cache"
916   
917         ol_arg=invalid
918         for ol_val in auto yes no ; do
919                 if test "$enableval" = "$ol_val" ; then
920                         ol_arg="$ol_val"
921                 fi
922         done
923         if test "$ol_arg" = "invalid" ; then
924                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
925         fi
926         ol_enable_cache="$ol_arg"
927
928 else
929         ol_enable_cache="yes"
930 fi
931 # end --enable-cache
932 # OpenLDAP --enable-dns
933         # Check whether --enable-dns or --disable-dns was given.
934 if test "${enable_dns+set}" = set; then
935   enableval="$enable_dns"
936   
937         ol_arg=invalid
938         for ol_val in auto yes no ; do
939                 if test "$enableval" = "$ol_val" ; then
940                         ol_arg="$ol_val"
941                 fi
942         done
943         if test "$ol_arg" = "invalid" ; then
944                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
945         fi
946         ol_enable_dns="$ol_arg"
947
948 else
949         ol_enable_dns="no"
950 fi
951 # end --enable-dns
952 # OpenLDAP --enable-referrals
953         # Check whether --enable-referrals or --disable-referrals was given.
954 if test "${enable_referrals+set}" = set; then
955   enableval="$enable_referrals"
956   
957         ol_arg=invalid
958         for ol_val in auto yes no ; do
959                 if test "$enableval" = "$ol_val" ; then
960                         ol_arg="$ol_val"
961                 fi
962         done
963         if test "$ol_arg" = "invalid" ; then
964                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
965         fi
966         ol_enable_referrals="$ol_arg"
967
968 else
969         ol_enable_referrals="yes"
970 fi
971 # end --enable-referrals
972 # OpenLDAP --enable-cldap
973         # Check whether --enable-cldap or --disable-cldap was given.
974 if test "${enable_cldap+set}" = set; then
975   enableval="$enable_cldap"
976   
977         ol_arg=invalid
978         for ol_val in auto yes no ; do
979                 if test "$enableval" = "$ol_val" ; then
980                         ol_arg="$ol_val"
981                 fi
982         done
983         if test "$ol_arg" = "invalid" ; then
984                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
985         fi
986         ol_enable_cldap="$ol_arg"
987
988 else
989         ol_enable_cldap="no"
990 fi
991 # end --enable-cldap
992 # OpenLDAP --enable-x_compile
993         # Check whether --enable-x_compile or --disable-x_compile was given.
994 if test "${enable_x_compile+set}" = set; then
995   enableval="$enable_x_compile"
996   
997         ol_arg=invalid
998         for ol_val in yes no ; do
999                 if test "$enableval" = "$ol_val" ; then
1000                         ol_arg="$ol_val"
1001                 fi
1002         done
1003         if test "$ol_arg" = "invalid" ; then
1004                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1005         fi
1006         ol_enable_x_compile="$ol_arg"
1007
1008 else
1009         ol_enable_x_compile="no"
1010 fi
1011 # end --enable-x_compile
1012
1013 # OpenLDAP --enable-dmalloc
1014         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1015 if test "${enable_dmalloc+set}" = set; then
1016   enableval="$enable_dmalloc"
1017   
1018         ol_arg=invalid
1019         for ol_val in auto yes no ; do
1020                 if test "$enableval" = "$ol_val" ; then
1021                         ol_arg="$ol_val"
1022                 fi
1023         done
1024         if test "$ol_arg" = "invalid" ; then
1025                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1026         fi
1027         ol_enable_dmalloc="$ol_arg"
1028
1029 else
1030         ol_enable_dmalloc="no"
1031 fi
1032 # end --enable-dmalloc
1033
1034 # OpenLDAP --with-kerberos
1035         # Check whether --with-kerberos or --without-kerberos was given.
1036 if test "${with_kerberos+set}" = set; then
1037   withval="$with_kerberos"
1038   
1039         ol_arg=invalid
1040         for ol_val in auto k5 k4 afs yes no ; do
1041                 if test "$withval" = "$ol_val" ; then
1042                         ol_arg="$ol_val"
1043                 fi
1044         done
1045         if test "$ol_arg" = "invalid" ; then
1046                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1047         fi
1048         ol_with_kerberos="$ol_arg"
1049
1050 else
1051         ol_with_kerberos="auto"
1052 fi
1053 # end --with-kerberos
1054
1055 # OpenLDAP --with-readline
1056         # Check whether --with-readline or --without-readline was given.
1057 if test "${with_readline+set}" = set; then
1058   withval="$with_readline"
1059   
1060         ol_arg=invalid
1061         for ol_val in auto yes no  ; do
1062                 if test "$withval" = "$ol_val" ; then
1063                         ol_arg="$ol_val"
1064                 fi
1065         done
1066         if test "$ol_arg" = "invalid" ; then
1067                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1068         fi
1069         ol_with_readline="$ol_arg"
1070
1071 else
1072         ol_with_readline="auto"
1073 fi
1074 # end --with-readline
1075
1076 # OpenLDAP --with-threads
1077         # Check whether --with-threads or --without-threads was given.
1078 if test "${with_threads+set}" = set; then
1079   withval="$with_threads"
1080   
1081         ol_arg=invalid
1082         for ol_val in auto posix mach lwp yes no manual  ; do
1083                 if test "$withval" = "$ol_val" ; then
1084                         ol_arg="$ol_val"
1085                 fi
1086         done
1087         if test "$ol_arg" = "invalid" ; then
1088                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1089         fi
1090         ol_with_threads="$ol_arg"
1091
1092 else
1093         ol_with_threads="auto"
1094 fi
1095 # end --with-threads
1096
1097 # OpenLDAP --with-tls
1098         # Check whether --with-tls or --without-tls was given.
1099 if test "${with_tls+set}" = set; then
1100   withval="$with_tls"
1101   
1102         ol_arg=invalid
1103         for ol_val in auto ssleay openssl yes no  ; do
1104                 if test "$withval" = "$ol_val" ; then
1105                         ol_arg="$ol_val"
1106                 fi
1107         done
1108         if test "$ol_arg" = "invalid" ; then
1109                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1110         fi
1111         ol_with_tls="$ol_arg"
1112
1113 else
1114         ol_with_tls="auto"
1115 fi
1116 # end --with-tls
1117
1118 # OpenLDAP --with-yielding_select
1119         # Check whether --with-yielding_select or --without-yielding_select was given.
1120 if test "${with_yielding_select+set}" = set; then
1121   withval="$with_yielding_select"
1122   
1123         ol_arg=invalid
1124         for ol_val in auto yes no manual  ; do
1125                 if test "$withval" = "$ol_val" ; then
1126                         ol_arg="$ol_val"
1127                 fi
1128         done
1129         if test "$ol_arg" = "invalid" ; then
1130                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1131         fi
1132         ol_with_yielding_select="$ol_arg"
1133
1134 else
1135         ol_with_yielding_select="auto"
1136 fi
1137 # end --with-yielding_select
1138
1139
1140
1141 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1142 if test "${with_xxldapdoptions+set}" = set; then
1143   withval="$with_xxldapdoptions"
1144   :
1145 fi
1146
1147 # OpenLDAP --enable-ldapd
1148         # Check whether --enable-ldapd or --disable-ldapd was given.
1149 if test "${enable_ldapd+set}" = set; then
1150   enableval="$enable_ldapd"
1151   
1152         ol_arg=invalid
1153         for ol_val in auto yes no ; do
1154                 if test "$enableval" = "$ol_val" ; then
1155                         ol_arg="$ol_val"
1156                 fi
1157         done
1158         if test "$ol_arg" = "invalid" ; then
1159                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1160         fi
1161         ol_enable_ldapd="$ol_arg"
1162
1163 else
1164         ol_enable_ldapd="no"
1165 fi
1166 # end --enable-ldapd
1167
1168 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1169 if test "${with_xxslapdoptions+set}" = set; then
1170   withval="$with_xxslapdoptions"
1171   :
1172 fi
1173
1174 # OpenLDAP --enable-slapd
1175         # Check whether --enable-slapd or --disable-slapd was given.
1176 if test "${enable_slapd+set}" = set; then
1177   enableval="$enable_slapd"
1178   
1179         ol_arg=invalid
1180         for ol_val in auto yes no ; do
1181                 if test "$enableval" = "$ol_val" ; then
1182                         ol_arg="$ol_val"
1183                 fi
1184         done
1185         if test "$ol_arg" = "invalid" ; then
1186                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1187         fi
1188         ol_enable_slapd="$ol_arg"
1189
1190 else
1191         ol_enable_slapd="yes"
1192 fi
1193 # end --enable-slapd
1194 # OpenLDAP --enable-aclgroups
1195         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1196 if test "${enable_aclgroups+set}" = set; then
1197   enableval="$enable_aclgroups"
1198   
1199         ol_arg=invalid
1200         for ol_val in auto yes no ; do
1201                 if test "$enableval" = "$ol_val" ; then
1202                         ol_arg="$ol_val"
1203                 fi
1204         done
1205         if test "$ol_arg" = "invalid" ; then
1206                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1207         fi
1208         ol_enable_aclgroups="$ol_arg"
1209
1210 else
1211         ol_enable_aclgroups="auto"
1212 fi
1213 # end --enable-aclgroups
1214 # OpenLDAP --enable-cleartext
1215         # Check whether --enable-cleartext or --disable-cleartext was given.
1216 if test "${enable_cleartext+set}" = set; then
1217   enableval="$enable_cleartext"
1218   
1219         ol_arg=invalid
1220         for ol_val in auto yes no ; do
1221                 if test "$enableval" = "$ol_val" ; then
1222                         ol_arg="$ol_val"
1223                 fi
1224         done
1225         if test "$ol_arg" = "invalid" ; then
1226                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1227         fi
1228         ol_enable_cleartext="$ol_arg"
1229
1230 else
1231         ol_enable_cleartext="yes"
1232 fi
1233 # end --enable-cleartext
1234 # OpenLDAP --enable-crypt
1235         # Check whether --enable-crypt or --disable-crypt was given.
1236 if test "${enable_crypt+set}" = set; then
1237   enableval="$enable_crypt"
1238   
1239         ol_arg=invalid
1240         for ol_val in auto yes no ; do
1241                 if test "$enableval" = "$ol_val" ; then
1242                         ol_arg="$ol_val"
1243                 fi
1244         done
1245         if test "$ol_arg" = "invalid" ; then
1246                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1247         fi
1248         ol_enable_crypt="$ol_arg"
1249
1250 else
1251         ol_enable_crypt="auto"
1252 fi
1253 # end --enable-crypt
1254 # OpenLDAP --enable-wrappers
1255         # Check whether --enable-wrappers or --disable-wrappers was given.
1256 if test "${enable_wrappers+set}" = set; then
1257   enableval="$enable_wrappers"
1258   
1259         ol_arg=invalid
1260         for ol_val in auto yes no ; do
1261                 if test "$enableval" = "$ol_val" ; then
1262                         ol_arg="$ol_val"
1263                 fi
1264         done
1265         if test "$ol_arg" = "invalid" ; then
1266                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1267         fi
1268         ol_enable_wrappers="$ol_arg"
1269
1270 else
1271         ol_enable_wrappers="no"
1272 fi
1273 # end --enable-wrappers
1274 # OpenLDAP --enable-phonetic
1275         # Check whether --enable-phonetic or --disable-phonetic was given.
1276 if test "${enable_phonetic+set}" = set; then
1277   enableval="$enable_phonetic"
1278   
1279         ol_arg=invalid
1280         for ol_val in auto yes no ; do
1281                 if test "$enableval" = "$ol_val" ; then
1282                         ol_arg="$ol_val"
1283                 fi
1284         done
1285         if test "$ol_arg" = "invalid" ; then
1286                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1287         fi
1288         ol_enable_phonetic="$ol_arg"
1289
1290 else
1291         ol_enable_phonetic="no"
1292 fi
1293 # end --enable-phonetic
1294 # OpenLDAP --enable-rlookups
1295         # Check whether --enable-rlookups or --disable-rlookups was given.
1296 if test "${enable_rlookups+set}" = set; then
1297   enableval="$enable_rlookups"
1298   
1299         ol_arg=invalid
1300         for ol_val in auto yes no ; do
1301                 if test "$enableval" = "$ol_val" ; then
1302                         ol_arg="$ol_val"
1303                 fi
1304         done
1305         if test "$ol_arg" = "invalid" ; then
1306                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1307         fi
1308         ol_enable_rlookups="$ol_arg"
1309
1310 else
1311         ol_enable_rlookups="auto"
1312 fi
1313 # end --enable-rlookups
1314
1315 # OpenLDAP --enable-bdb2
1316         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1317 if test "${enable_bdb2+set}" = set; then
1318   enableval="$enable_bdb2"
1319   
1320         ol_arg=invalid
1321         for ol_val in auto yes no ; do
1322                 if test "$enableval" = "$ol_val" ; then
1323                         ol_arg="$ol_val"
1324                 fi
1325         done
1326         if test "$ol_arg" = "invalid" ; then
1327                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1328         fi
1329         ol_enable_bdb2="$ol_arg"
1330
1331 else
1332         ol_enable_bdb2="no"
1333 fi
1334 # end --enable-bdb2
1335 # OpenLDAP --enable-ldbm
1336         # Check whether --enable-ldbm or --disable-ldbm was given.
1337 if test "${enable_ldbm+set}" = set; then
1338   enableval="$enable_ldbm"
1339   
1340         ol_arg=invalid
1341         for ol_val in auto yes no ; do
1342                 if test "$enableval" = "$ol_val" ; then
1343                         ol_arg="$ol_val"
1344                 fi
1345         done
1346         if test "$ol_arg" = "invalid" ; then
1347                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1348         fi
1349         ol_enable_ldbm="$ol_arg"
1350
1351 else
1352         ol_enable_ldbm="yes"
1353 fi
1354 # end --enable-ldbm
1355 # OpenLDAP --with-ldbm_api
1356         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1357 if test "${with_ldbm_api+set}" = set; then
1358   withval="$with_ldbm_api"
1359   
1360         ol_arg=invalid
1361         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1362                 if test "$withval" = "$ol_val" ; then
1363                         ol_arg="$ol_val"
1364                 fi
1365         done
1366         if test "$ol_arg" = "invalid" ; then
1367                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1368         fi
1369         ol_with_ldbm_api="$ol_arg"
1370
1371 else
1372         ol_with_ldbm_api="auto"
1373 fi
1374 # end --with-ldbm_api
1375
1376 # OpenLDAP --with-ldbm_type
1377         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1378 if test "${with_ldbm_type+set}" = set; then
1379   withval="$with_ldbm_type"
1380   
1381         ol_arg=invalid
1382         for ol_val in auto btree hash ; do
1383                 if test "$withval" = "$ol_val" ; then
1384                         ol_arg="$ol_val"
1385                 fi
1386         done
1387         if test "$ol_arg" = "invalid" ; then
1388                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1389         fi
1390         ol_with_ldbm_type="$ol_arg"
1391
1392 else
1393         ol_with_ldbm_type="auto"
1394 fi
1395 # end --with-ldbm_type
1396
1397
1398 # OpenLDAP --enable-passwd
1399         # Check whether --enable-passwd or --disable-passwd was given.
1400 if test "${enable_passwd+set}" = set; then
1401   enableval="$enable_passwd"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto yes no ; do
1405                 if test "$enableval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1411         fi
1412         ol_enable_passwd="$ol_arg"
1413
1414 else
1415         ol_enable_passwd="no"
1416 fi
1417 # end --enable-passwd
1418 # OpenLDAP --enable-perl
1419         # Check whether --enable-perl or --disable-perl was given.
1420 if test "${enable_perl+set}" = set; then
1421   enableval="$enable_perl"
1422   
1423         ol_arg=invalid
1424         for ol_val in auto yes no ; do
1425                 if test "$enableval" = "$ol_val" ; then
1426                         ol_arg="$ol_val"
1427                 fi
1428         done
1429         if test "$ol_arg" = "invalid" ; then
1430                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1431         fi
1432         ol_enable_perl="$ol_arg"
1433
1434 else
1435         ol_enable_perl="no"
1436 fi
1437 # end --enable-perl
1438 # OpenLDAP --enable-shell
1439         # Check whether --enable-shell or --disable-shell was given.
1440 if test "${enable_shell+set}" = set; then
1441   enableval="$enable_shell"
1442   
1443         ol_arg=invalid
1444         for ol_val in auto yes no ; do
1445                 if test "$enableval" = "$ol_val" ; then
1446                         ol_arg="$ol_val"
1447                 fi
1448         done
1449         if test "$ol_arg" = "invalid" ; then
1450                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1451         fi
1452         ol_enable_shell="$ol_arg"
1453
1454 else
1455         ol_enable_shell="no"
1456 fi
1457 # end --enable-shell
1458 # OpenLDAP --enable-tcl
1459         # Check whether --enable-tcl or --disable-tcl was given.
1460 if test "${enable_tcl+set}" = set; then
1461   enableval="$enable_tcl"
1462   
1463         ol_arg=invalid
1464         for ol_val in auto yes no ; do
1465                 if test "$enableval" = "$ol_val" ; then
1466                         ol_arg="$ol_val"
1467                 fi
1468         done
1469         if test "$ol_arg" = "invalid" ; then
1470                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1471         fi
1472         ol_enable_tcl="$ol_arg"
1473
1474 else
1475         ol_enable_tcl="no"
1476 fi
1477 # end --enable-tcl
1478
1479 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1480 if test "${with_xxslurpdoptions+set}" = set; then
1481   withval="$with_xxslurpdoptions"
1482   :
1483 fi
1484
1485 # OpenLDAP --enable-slurpd
1486         # Check whether --enable-slurpd or --disable-slurpd was given.
1487 if test "${enable_slurpd+set}" = set; then
1488   enableval="$enable_slurpd"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1498         fi
1499         ol_enable_slurpd="$ol_arg"
1500
1501 else
1502         ol_enable_slurpd="auto"
1503 fi
1504 # end --enable-slurpd
1505
1506 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1507 if test "${with_xxliboptions+set}" = set; then
1508   withval="$with_xxliboptions"
1509   :
1510 fi
1511
1512 # Check whether --enable-static or --disable-static was given.
1513 if test "${enable_static+set}" = set; then
1514   enableval="$enable_static"
1515   p=${PACKAGE-default}
1516 case "$enableval" in
1517 yes) enable_static=yes ;;
1518 no) enable_static=no ;;
1519 *)
1520   enable_static=no
1521   # Look at the argument we got.  We use all the common list separators.
1522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1523   for pkg in $enableval; do
1524     if test "X$pkg" = "X$p"; then
1525       enable_static=yes
1526     fi
1527   done
1528   IFS="$ac_save_ifs"
1529   ;;
1530 esac
1531 else
1532   enable_static=yes
1533 fi
1534
1535 # Check whether --enable-shared or --disable-shared was given.
1536 if test "${enable_shared+set}" = set; then
1537   enableval="$enable_shared"
1538   p=${PACKAGE-default}
1539 case "$enableval" in
1540 yes) enable_shared=yes ;;
1541 no) enable_shared=no ;;
1542 *)
1543   enable_shared=no
1544   # Look at the argument we got.  We use all the common list separators.
1545   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1546   for pkg in $enableval; do
1547     if test "X$pkg" = "X$p"; then
1548       enable_shared=yes
1549     fi
1550   done
1551   IFS="$ac_save_ifs"
1552   ;;
1553 esac
1554 else
1555   enable_shared=yes
1556 fi
1557
1558
1559 # validate options
1560 if test $ol_enable_dns = yes ; then
1561         if test $ol_enable_referrals = no ; then
1562                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1563         fi
1564         if test $ol_enable_referrals = auto ; then
1565                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1566                 ol_enable_referrals=yes
1567         fi
1568 fi
1569
1570 if test $ol_enable_slapd = no ; then
1571                 if test $ol_enable_bdb2 = yes ; then
1572                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1573         fi
1574         if test $ol_enable_ldbm = yes ; then
1575                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1576         fi
1577         if test $ol_enable_passwd = yes ; then
1578                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1579         fi
1580         if test $ol_enable_perl = yes ; then
1581                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1582         fi
1583         if test $ol_enable_shell = yes ; then
1584                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1585         fi
1586         if test $ol_enable_tcl = yes ; then
1587                 echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2
1588         fi
1589         if test $ol_enable_aclgroups = yes ; then
1590                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1591         fi
1592         if test $ol_enable_wrappers = yes ; then
1593                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1594         fi
1595         if test $ol_enable_phonetic = yes ; then
1596                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1597         fi
1598         if test $ol_enable_rlookups = yes ; then
1599                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1600         fi
1601         if test $ol_with_ldbm_api != auto ; then
1602                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1603         fi
1604         if test $ol_with_ldbm_type != auto ; then
1605                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1606         fi
1607         if test $ol_enable_slurpd = yes ; then
1608                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1609         fi
1610
1611         # force settings to no
1612         ol_enable_bdb2=no
1613         ol_enable_ldbm=no
1614         ol_enable_passwd=no
1615         ol_enable_perl=no
1616         ol_enable_shell=no
1617         ol_enable_tcl=no
1618         ol_enable_aclgroups=no
1619         ol_enable_wrappers=no
1620         ol_enable_phonetic=no
1621         ol_enable_rlookups=no
1622         ol_with_ldbm_api=no
1623         ol_with_ldbm_type=no
1624         ol_enable_slurpd=no
1625
1626 elif test $ol_enable_ldbm = no ; then
1627         
1628         if test $ol_with_ldbm_api != auto ; then
1629                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1630         fi
1631
1632         if test $ol_with_ldbm_type != auto ; then
1633                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1634         fi
1635
1636         if test $ol_enable_bdb2 = yes ; then
1637                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1638         fi
1639
1640         if test $ol_enable_passwd = no -a \
1641                 $ol_enable_perl = no -a \
1642                 $ol_enable_shell = no -a \
1643                 $ol_enable_tcl = no ; then
1644                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1645         fi
1646
1647         ol_with_ldbm_api=no
1648         ol_with_ldbm_type=no
1649
1650 elif test $ol_enable_bdb2 = yes ; then
1651         
1652         if test $ol_with_ldbm_api != auto -a \
1653                 $ol_with_ldbm_api != db2 ; then
1654                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1655         fi
1656
1657         ol_with_ldbm_api=db2
1658
1659 else
1660         
1661         if test $ol_enable_bdb2 != no ; then
1662                 if test $ol_with_ldbm_api != auto -a \
1663                         $ol_with_ldbm_api != db2 ; then
1664                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1665                         ol_enable_bdb2=no
1666                 fi
1667         fi
1668
1669         if test $ol_with_ldbm_api = gdbm -a \
1670                 $ol_with_ldbm_type = btree ; then
1671                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1672         fi
1673         if test $ol_with_ldbm_api = mdbm -a \
1674                 $ol_with_ldbm_type = btree ; then
1675                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1676         fi
1677         if test $ol_with_ldbm_api = ndbm -a \
1678                 $ol_with_ldbm_type = btree ; then
1679                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1680         fi
1681 fi
1682
1683 if test $ol_enable_slurpd = yes ; then
1684                 if test $ol_with_threads = no ; then
1685                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1686         fi
1687 fi
1688
1689 echo "$ac_t""done" 1>&6
1690
1691 ## Initialize vars
1692 LDAP_LIBS=
1693 LDBM_LIBS=
1694 LTHREAD_LIBS=
1695 LUTIL_LIBS=
1696
1697 LDAPD_LIBS=
1698 SLAPD_LIBS=
1699 SLURPD_LIBS=
1700
1701 BUILD_LDAPD=no
1702 BUILD_SLAPD=no
1703 BUILD_SLURPD=no
1704
1705 BUILD_BDB2=no
1706 BUILD_LDBM=no
1707 BUILD_PASSWD=no
1708 BUILD_PERL=no
1709 BUILD_SHELL=no
1710 BUILD_TCL=no
1711 BUILD_THREAD=no
1712
1713 SLAPD_PERL_LDFLAGS=
1714 SLAPD_PERL_CPPFLAGS=
1715
1716 KRB_LIBS=
1717 READLINE_LIBS=
1718 TERMCAP_LIBS=
1719 TLS_LIBS=
1720
1721
1722 # Find a good install program.  We prefer a C program (faster),
1723 # so one script is as good as another.  But avoid the broken or
1724 # incompatible versions:
1725 # SysV /etc/install, /usr/sbin/install
1726 # SunOS /usr/etc/install
1727 # IRIX /sbin/install
1728 # AIX /bin/install
1729 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1730 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1731 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1732 # ./install, which can be erroneously created by make from ./install.sh.
1733 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1734 echo "configure:1735: checking for a BSD compatible install" >&5
1735 if test -z "$INSTALL"; then
1736 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1737   echo $ac_n "(cached) $ac_c" 1>&6
1738 else
1739     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1740   for ac_dir in $PATH; do
1741     # Account for people who put trailing slashes in PATH elements.
1742     case "$ac_dir/" in
1743     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1744     *)
1745       # OSF1 and SCO ODT 3.0 have their own names for install.
1746       # Don't use installbsd from OSF since it installs stuff as root
1747       # by default.
1748       for ac_prog in ginstall scoinst install; do
1749         if test -f $ac_dir/$ac_prog; then
1750           if test $ac_prog = install &&
1751             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1752             # AIX install.  It has an incompatible calling convention.
1753             :
1754           else
1755             ac_cv_path_install="$ac_dir/$ac_prog -c"
1756             break 2
1757           fi
1758         fi
1759       done
1760       ;;
1761     esac
1762   done
1763   IFS="$ac_save_IFS"
1764
1765 fi
1766   if test "${ac_cv_path_install+set}" = set; then
1767     INSTALL="$ac_cv_path_install"
1768   else
1769     # As a last resort, use the slow shell script.  We don't cache a
1770     # path for INSTALL within a source directory, because that will
1771     # break other packages using the cache if that directory is
1772     # removed, or if the path is relative.
1773     INSTALL="$ac_install_sh"
1774   fi
1775 fi
1776 echo "$ac_t""$INSTALL" 1>&6
1777
1778 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1779 # It thinks the first close brace ends the variable substitution.
1780 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1781
1782 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1783
1784 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1785
1786
1787 CC=${CC-"cc"}
1788
1789
1790 # Make sure we can run config.sub.
1791 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1792 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1793 fi
1794
1795 echo $ac_n "checking host system type""... $ac_c" 1>&6
1796 echo "configure:1797: checking host system type" >&5
1797
1798 host_alias=$host
1799 case "$host_alias" in
1800 NONE)
1801   case $nonopt in
1802   NONE)
1803     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1804     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1805     fi ;;
1806   *) host_alias=$nonopt ;;
1807   esac ;;
1808 esac
1809
1810 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1811 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1812 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1813 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1814 echo "$ac_t""$host" 1>&6
1815
1816 # Extract the first word of "ranlib", so it can be a program name with args.
1817 set dummy ranlib; ac_word=$2
1818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1819 echo "configure:1820: checking for $ac_word" >&5
1820 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1821   echo $ac_n "(cached) $ac_c" 1>&6
1822 else
1823   if test -n "$RANLIB"; then
1824   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1825 else
1826   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1827   ac_dummy="$PATH"
1828   for ac_dir in $ac_dummy; do
1829     test -z "$ac_dir" && ac_dir=.
1830     if test -f $ac_dir/$ac_word; then
1831       ac_cv_prog_RANLIB="ranlib"
1832       break
1833     fi
1834   done
1835   IFS="$ac_save_ifs"
1836   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1837 fi
1838 fi
1839 RANLIB="$ac_cv_prog_RANLIB"
1840 if test -n "$RANLIB"; then
1841   echo "$ac_t""$RANLIB" 1>&6
1842 else
1843   echo "$ac_t""no" 1>&6
1844 fi
1845
1846 # Extract the first word of "gcc", so it can be a program name with args.
1847 set dummy gcc; ac_word=$2
1848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_word" >&5
1850 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   if test -n "$CC"; then
1854   ac_cv_prog_CC="$CC" # Let the user override the test.
1855 else
1856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1857   ac_dummy="$PATH"
1858   for ac_dir in $ac_dummy; do
1859     test -z "$ac_dir" && ac_dir=.
1860     if test -f $ac_dir/$ac_word; then
1861       ac_cv_prog_CC="gcc"
1862       break
1863     fi
1864   done
1865   IFS="$ac_save_ifs"
1866 fi
1867 fi
1868 CC="$ac_cv_prog_CC"
1869 if test -n "$CC"; then
1870   echo "$ac_t""$CC" 1>&6
1871 else
1872   echo "$ac_t""no" 1>&6
1873 fi
1874
1875 if test -z "$CC"; then
1876   # Extract the first word of "cc", so it can be a program name with args.
1877 set dummy cc; ac_word=$2
1878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1879 echo "configure:1880: checking for $ac_word" >&5
1880 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   if test -n "$CC"; then
1884   ac_cv_prog_CC="$CC" # Let the user override the test.
1885 else
1886   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1887   ac_prog_rejected=no
1888   ac_dummy="$PATH"
1889   for ac_dir in $ac_dummy; do
1890     test -z "$ac_dir" && ac_dir=.
1891     if test -f $ac_dir/$ac_word; then
1892       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1893         ac_prog_rejected=yes
1894         continue
1895       fi
1896       ac_cv_prog_CC="cc"
1897       break
1898     fi
1899   done
1900   IFS="$ac_save_ifs"
1901 if test $ac_prog_rejected = yes; then
1902   # We found a bogon in the path, so make sure we never use it.
1903   set dummy $ac_cv_prog_CC
1904   shift
1905   if test $# -gt 0; then
1906     # We chose a different compiler from the bogus one.
1907     # However, it has the same basename, so the bogon will be chosen
1908     # first if we set CC to just the basename; use the full file name.
1909     shift
1910     set dummy "$ac_dir/$ac_word" "$@"
1911     shift
1912     ac_cv_prog_CC="$@"
1913   fi
1914 fi
1915 fi
1916 fi
1917 CC="$ac_cv_prog_CC"
1918 if test -n "$CC"; then
1919   echo "$ac_t""$CC" 1>&6
1920 else
1921   echo "$ac_t""no" 1>&6
1922 fi
1923
1924   if test -z "$CC"; then
1925     case "`uname -s`" in
1926     *win32* | *WIN32*)
1927       # Extract the first word of "cl", so it can be a program name with args.
1928 set dummy cl; ac_word=$2
1929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1930 echo "configure:1931: checking for $ac_word" >&5
1931 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1932   echo $ac_n "(cached) $ac_c" 1>&6
1933 else
1934   if test -n "$CC"; then
1935   ac_cv_prog_CC="$CC" # Let the user override the test.
1936 else
1937   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1938   ac_dummy="$PATH"
1939   for ac_dir in $ac_dummy; do
1940     test -z "$ac_dir" && ac_dir=.
1941     if test -f $ac_dir/$ac_word; then
1942       ac_cv_prog_CC="cl"
1943       break
1944     fi
1945   done
1946   IFS="$ac_save_ifs"
1947 fi
1948 fi
1949 CC="$ac_cv_prog_CC"
1950 if test -n "$CC"; then
1951   echo "$ac_t""$CC" 1>&6
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955  ;;
1956     esac
1957   fi
1958   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1959 fi
1960
1961 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1962 echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1963
1964 ac_ext=c
1965 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1966 ac_cpp='$CPP $CPPFLAGS'
1967 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1968 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1969 cross_compiling=$ac_cv_prog_cc_cross
1970
1971 cat > conftest.$ac_ext << EOF
1972
1973 #line 1974 "configure"
1974 #include "confdefs.h"
1975
1976 main(){return(0);}
1977 EOF
1978 if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1979   ac_cv_prog_cc_works=yes
1980   # If we can't run a trivial program, we are probably using a cross compiler.
1981   if (./conftest; exit) 2>/dev/null; then
1982     ac_cv_prog_cc_cross=no
1983   else
1984     ac_cv_prog_cc_cross=yes
1985   fi
1986 else
1987   echo "configure: failed program was:" >&5
1988   cat conftest.$ac_ext >&5
1989   ac_cv_prog_cc_works=no
1990 fi
1991 rm -fr conftest*
1992 ac_ext=c
1993 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1994 ac_cpp='$CPP $CPPFLAGS'
1995 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1996 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1997 cross_compiling=$ac_cv_prog_cc_cross
1998
1999 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2000 if test $ac_cv_prog_cc_works = no; then
2001   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2002 fi
2003 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2004 echo "configure:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2005 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2006 cross_compiling=$ac_cv_prog_cc_cross
2007
2008 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2009 echo "configure:2010: checking whether we are using GNU C" >&5
2010 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2011   echo $ac_n "(cached) $ac_c" 1>&6
2012 else
2013   cat > conftest.c <<EOF
2014 #ifdef __GNUC__
2015   yes;
2016 #endif
2017 EOF
2018 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2019   ac_cv_prog_gcc=yes
2020 else
2021   ac_cv_prog_gcc=no
2022 fi
2023 fi
2024
2025 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2026
2027 if test $ac_cv_prog_gcc = yes; then
2028   GCC=yes
2029 else
2030   GCC=
2031 fi
2032
2033 ac_test_CFLAGS="${CFLAGS+set}"
2034 ac_save_CFLAGS="$CFLAGS"
2035 CFLAGS=
2036 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether ${CC-cc} accepts -g" >&5
2038 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2039   echo $ac_n "(cached) $ac_c" 1>&6
2040 else
2041   echo 'void f(){}' > conftest.c
2042 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2043   ac_cv_prog_cc_g=yes
2044 else
2045   ac_cv_prog_cc_g=no
2046 fi
2047 rm -f conftest*
2048
2049 fi
2050
2051 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2052 if test "$ac_test_CFLAGS" = set; then
2053   CFLAGS="$ac_save_CFLAGS"
2054 elif test $ac_cv_prog_cc_g = yes; then
2055   if test "$GCC" = yes; then
2056     CFLAGS="-g -O2"
2057   else
2058     CFLAGS="-g"
2059   fi
2060 else
2061   if test "$GCC" = yes; then
2062     CFLAGS="-O2"
2063   else
2064     CFLAGS=
2065   fi
2066 fi
2067
2068 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2069 if test "${with_gnu_ld+set}" = set; then
2070   withval="$with_gnu_ld"
2071   test "$withval" = no || with_gnu_ld=yes
2072 else
2073   with_gnu_ld=no
2074 fi
2075
2076
2077 ac_prog=ld
2078 if test "$ac_cv_prog_gcc" = yes; then
2079   # Check if gcc -print-prog-name=ld gives a path.
2080   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2081 echo "configure:2082: checking for ld used by GCC" >&5
2082   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2083   case "$ac_prog" in
2084   # Accept absolute paths.
2085   /* | A-Za-z:\\*)
2086     test -z "$LD" && LD="$ac_prog"
2087     ;;
2088   "")
2089     # If it fails, then pretend we aren't using GCC.
2090     ac_prog=ld
2091     ;;
2092   *)
2093     # If it is relative, then search for the first ld in PATH.
2094     with_gnu_ld=unknown
2095     ;;
2096   esac
2097 elif test "$with_gnu_ld" = yes; then
2098   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2099 echo "configure:2100: checking for GNU ld" >&5
2100 else
2101   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2102 echo "configure:2103: checking for non-GNU ld" >&5
2103 fi
2104 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   if test -z "$LD"; then
2108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2109   for ac_dir in $PATH; do
2110     test -z "$ac_dir" && ac_dir=.
2111     if test -f "$ac_dir/$ac_prog"; then
2112       ac_cv_path_LD="$ac_dir/$ac_prog"
2113       # Check to see if the program is GNU ld.  I'd rather use --version,
2114       # but apparently some GNU ld's only accept -v.
2115       # Break only if it was the GNU/non-GNU ld that we prefer.
2116       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2117         test "$with_gnu_ld" != no && break
2118       else
2119         test "$with_gnu_ld" != yes && break
2120       fi
2121     fi
2122   done
2123   IFS="$ac_save_ifs"
2124 else
2125   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2126 fi
2127 fi
2128
2129 LD="$ac_cv_path_LD"
2130 if test -n "$LD"; then
2131   echo "$ac_t""$LD" 1>&6
2132 else
2133   echo "$ac_t""no" 1>&6
2134 fi
2135 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2136
2137 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2138 echo "configure:2139: checking if the linker ($LD) is GNU ld" >&5
2139 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2140   echo $ac_n "(cached) $ac_c" 1>&6
2141 else
2142   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2143 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2144   ac_cv_prog_gnu_ld=yes
2145 else
2146   ac_cv_prog_gnu_ld=no
2147 fi
2148 fi
2149
2150 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2151
2152
2153 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2154 echo "configure:2155: checking for BSD-compatible nm" >&5
2155 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2156   echo $ac_n "(cached) $ac_c" 1>&6
2157 else
2158   case "$NM" in
2159 /* | A-Za-z:\\*)
2160   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2161   ;;
2162 *)
2163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2164   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2165     test -z "$ac_dir" && ac_dir=.
2166     if test -f $ac_dir/nm; then
2167       # Check to see if the nm accepts a BSD-compat flag.
2168       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2169       #   nm: unknown option "B" ignored
2170       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2171         ac_cv_path_NM="$ac_dir/nm -B"
2172       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2173         ac_cv_path_NM="$ac_dir/nm -p"
2174       else
2175         ac_cv_path_NM="$ac_dir/nm"
2176       fi
2177       break
2178     fi
2179   done
2180   IFS="$ac_save_ifs"
2181   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2182   ;;
2183 esac
2184 fi
2185
2186 NM="$ac_cv_path_NM"
2187 echo "$ac_t""$NM" 1>&6
2188
2189
2190 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2191 echo "configure:2192: checking whether ln -s works" >&5
2192 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2193   echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195   rm -f conftestdata
2196 if ln -s X conftestdata 2>/dev/null
2197 then
2198   rm -f conftestdata
2199   ac_cv_prog_LN_S="ln -s"
2200 else
2201   ac_cv_prog_LN_S=ln
2202 fi
2203 fi
2204 LN_S="$ac_cv_prog_LN_S"
2205 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2206   echo "$ac_t""yes" 1>&6
2207 else
2208   echo "$ac_t""no" 1>&6
2209 fi
2210
2211 # Always use our own libtool.
2212 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2213
2214 # Check for any special flags to pass to ltconfig.
2215 libtool_flags=
2216 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2217 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2218 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2219 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2220 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2221
2222 # Some flags need to be propagated to the compiler or linker for good
2223 # libtool support.
2224 case "$host" in
2225 *-*-irix6*)
2226   # Find out which ABI we are using.
2227   echo '#line 2228 "configure"' > conftest.$ac_ext
2228   if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2229     case "`/usr/bin/file conftest.o`" in
2230     *32-bit*)
2231       LD="${LD-ld} -32"
2232       ;;
2233     *N32*)
2234       LD="${LD-ld} -n32"
2235       ;;
2236     *64-bit*)
2237       LD="${LD-ld} -64"
2238       ;;
2239     esac
2240   fi
2241   rm -rf conftest*
2242   ;;
2243
2244 *-*-sco3.2v5*)
2245   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2246   CFLAGS="$CFLAGS -belf"
2247   ;;
2248 esac
2249
2250 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2251 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2252 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2253 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2254 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2255 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2256
2257
2258 for ac_prog in mawk gawk nawk awk
2259 do
2260 # Extract the first word of "$ac_prog", so it can be a program name with args.
2261 set dummy $ac_prog; ac_word=$2
2262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2263 echo "configure:2264: checking for $ac_word" >&5
2264 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2265   echo $ac_n "(cached) $ac_c" 1>&6
2266 else
2267   if test -n "$AWK"; then
2268   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2269 else
2270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2271   ac_dummy="$PATH"
2272   for ac_dir in $ac_dummy; do
2273     test -z "$ac_dir" && ac_dir=.
2274     if test -f $ac_dir/$ac_word; then
2275       ac_cv_prog_AWK="$ac_prog"
2276       break
2277     fi
2278   done
2279   IFS="$ac_save_ifs"
2280 fi
2281 fi
2282 AWK="$ac_cv_prog_AWK"
2283 if test -n "$AWK"; then
2284   echo "$ac_t""$AWK" 1>&6
2285 else
2286   echo "$ac_t""no" 1>&6
2287 fi
2288
2289 test -n "$AWK" && break
2290 done
2291
2292 # test for ln hardlink support
2293 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2294 echo "configure:2295: checking whether ln works" >&5
2295 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2296   echo $ac_n "(cached) $ac_c" 1>&6
2297 else
2298   rm -f conftest.src conftest.dst
2299 echo "conftest" > conftest.src
2300 if ln conftest.src conftest.dst 2>/dev/null
2301 then
2302   ol_cv_prog_LN_H="ln"
2303 else
2304   ol_cv_prog_LN_H="cp"
2305 fi
2306 rm -f conftest.src conftest.dst
2307
2308 fi
2309 LN_H="$ol_cv_prog_LN_H"
2310 if test "$ol_cv_prog_LN_H" = "ln"; then
2311         echo "$ac_t""yes" 1>&6
2312 else
2313         echo "$ac_t""no" 1>&6
2314 fi
2315
2316 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2317 echo "configure:2318: checking whether ln -s works" >&5
2318 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2319   echo $ac_n "(cached) $ac_c" 1>&6
2320 else
2321   rm -f conftestdata
2322 if ln -s X conftestdata 2>/dev/null
2323 then
2324   rm -f conftestdata
2325   ac_cv_prog_LN_S="ln -s"
2326 else
2327   ac_cv_prog_LN_S=ln
2328 fi
2329 fi
2330 LN_S="$ac_cv_prog_LN_S"
2331 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2332   echo "$ac_t""yes" 1>&6
2333 else
2334   echo "$ac_t""no" 1>&6
2335 fi
2336
2337
2338 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2339         LN_S="$LN_H"
2340 fi
2341
2342 # Extract the first word of "sendmail", so it can be a program name with args.
2343 set dummy sendmail; ac_word=$2
2344 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2345 echo "configure:2346: checking for $ac_word" >&5
2346 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2347   echo $ac_n "(cached) $ac_c" 1>&6
2348 else
2349   case "$SENDMAIL" in
2350   /*)
2351   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2352   ;;
2353   ?:/*)                  
2354   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2355   ;;
2356   *)
2357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2358   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2359   for ac_dir in $ac_dummy; do 
2360     test -z "$ac_dir" && ac_dir=.
2361     if test -f $ac_dir/$ac_word; then
2362       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2363       break
2364     fi
2365   done
2366   IFS="$ac_save_ifs"
2367   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2368   ;;
2369 esac
2370 fi
2371 SENDMAIL="$ac_cv_path_SENDMAIL"
2372 if test -n "$SENDMAIL"; then
2373   echo "$ac_t""$SENDMAIL" 1>&6
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377
2378 # Extract the first word of "vi", so it can be a program name with args.
2379 set dummy vi; ac_word=$2
2380 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2381 echo "configure:2382: checking for $ac_word" >&5
2382 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2383   echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385   case "$EDITOR" in
2386   /*)
2387   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2388   ;;
2389   ?:/*)                  
2390   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2391   ;;
2392   *)
2393   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2394   ac_dummy="$PATH:/usr/ucb"
2395   for ac_dir in $ac_dummy; do 
2396     test -z "$ac_dir" && ac_dir=.
2397     if test -f $ac_dir/$ac_word; then
2398       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2399       break
2400     fi
2401   done
2402   IFS="$ac_save_ifs"
2403   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2404   ;;
2405 esac
2406 fi
2407 EDITOR="$ac_cv_path_EDITOR"
2408 if test -n "$EDITOR"; then
2409   echo "$ac_t""$EDITOR" 1>&6
2410 else
2411   echo "$ac_t""no" 1>&6
2412 fi
2413
2414 # Extract the first word of "finger", so it can be a program name with args.
2415 set dummy finger; ac_word=$2
2416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2417 echo "configure:2418: checking for $ac_word" >&5
2418 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2419   echo $ac_n "(cached) $ac_c" 1>&6
2420 else
2421   case "$FINGER" in
2422   /*)
2423   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2424   ;;
2425   ?:/*)                  
2426   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2427   ;;
2428   *)
2429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2430   ac_dummy="$PATH:/usr/ucb"
2431   for ac_dir in $ac_dummy; do 
2432     test -z "$ac_dir" && ac_dir=.
2433     if test -f $ac_dir/$ac_word; then
2434       ac_cv_path_FINGER="$ac_dir/$ac_word"
2435       break
2436     fi
2437   done
2438   IFS="$ac_save_ifs"
2439   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2440   ;;
2441 esac
2442 fi
2443 FINGER="$ac_cv_path_FINGER"
2444 if test -n "$FINGER"; then
2445   echo "$ac_t""$FINGER" 1>&6
2446 else
2447   echo "$ac_t""no" 1>&6
2448 fi
2449
2450
2451 if test $ol_enable_perl = yes ; then
2452         # Extract the first word of "perl", so it can be a program name with args.
2453 set dummy perl; 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_path_PERLBIN'+set}'`\" = set"; then
2457   echo $ac_n "(cached) $ac_c" 1>&6
2458 else
2459   case "$PERLBIN" in
2460   /*)
2461   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2462   ;;
2463   ?:/*)                  
2464   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2465   ;;
2466   *)
2467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2468   ac_dummy="$PATH"
2469   for ac_dir in $ac_dummy; do 
2470     test -z "$ac_dir" && ac_dir=.
2471     if test -f $ac_dir/$ac_word; then
2472       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2473       break
2474     fi
2475   done
2476   IFS="$ac_save_ifs"
2477   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2478   ;;
2479 esac
2480 fi
2481 PERLBIN="$ac_cv_path_PERLBIN"
2482 if test -n "$PERLBIN"; then
2483   echo "$ac_t""$PERLBIN" 1>&6
2484 else
2485   echo "$ac_t""no" 1>&6
2486 fi
2487
2488
2489         if test "no$PERLBIN" = "no" ; then
2490                 ol_enable_perl=no
2491         fi
2492
2493         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2494         SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e perl_inc`"
2495 fi
2496
2497 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2498 echo "configure:2499: checking how to run the C preprocessor" >&5
2499 # On Suns, sometimes $CPP names a directory.
2500 if test -n "$CPP" && test -d "$CPP"; then
2501   CPP=
2502 fi
2503 if test -z "$CPP"; then
2504 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2505   echo $ac_n "(cached) $ac_c" 1>&6
2506 else
2507     # This must be in double quotes, not single quotes, because CPP may get
2508   # substituted into the Makefile and "${CC-cc}" will confuse make.
2509   CPP="${CC-cc} -E"
2510   # On the NeXT, cc -E runs the code through the compiler's parser,
2511   # not just through cpp.
2512   cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 #include <assert.h>
2516 Syntax Error
2517 EOF
2518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2519 { (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2521 if test -z "$ac_err"; then
2522   :
2523 else
2524   echo "$ac_err" >&5
2525   echo "configure: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   rm -rf conftest*
2528   CPP="${CC-cc} -E -traditional-cpp"
2529   cat > conftest.$ac_ext <<EOF
2530 #line 2531 "configure"
2531 #include "confdefs.h"
2532 #include <assert.h>
2533 Syntax Error
2534 EOF
2535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2536 { (eval echo configure:2537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2538 if test -z "$ac_err"; then
2539   :
2540 else
2541   echo "$ac_err" >&5
2542   echo "configure: failed program was:" >&5
2543   cat conftest.$ac_ext >&5
2544   rm -rf conftest*
2545   CPP="${CC-cc} -nologo -E"
2546   cat > conftest.$ac_ext <<EOF
2547 #line 2548 "configure"
2548 #include "confdefs.h"
2549 #include <assert.h>
2550 Syntax Error
2551 EOF
2552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2553 { (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2555 if test -z "$ac_err"; then
2556   :
2557 else
2558   echo "$ac_err" >&5
2559   echo "configure: failed program was:" >&5
2560   cat conftest.$ac_ext >&5
2561   rm -rf conftest*
2562   CPP=/lib/cpp
2563 fi
2564 rm -f conftest*
2565 fi
2566 rm -f conftest*
2567 fi
2568 rm -f conftest*
2569   ac_cv_prog_CPP="$CPP"
2570 fi
2571   CPP="$ac_cv_prog_CPP"
2572 else
2573   ac_cv_prog_CPP="$CPP"
2574 fi
2575 echo "$ac_t""$CPP" 1>&6
2576
2577
2578 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2579         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2580
2581 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2582         echo "configure: warning: programs compiled here do run here..." 1>&2
2583         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2584
2585 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2586         echo "configure: warning: programs compiled here do not run here..." 1>&2
2587         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2588 fi
2589
2590 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2591 echo "configure:2592: checking for AIX" >&5
2592 cat > conftest.$ac_ext <<EOF
2593 #line 2594 "configure"
2594 #include "confdefs.h"
2595 #ifdef _AIX
2596   yes
2597 #endif
2598
2599 EOF
2600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2601   egrep "yes" >/dev/null 2>&1; then
2602   rm -rf conftest*
2603   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2604 #define _ALL_SOURCE 1
2605 EOF
2606
2607 else
2608   rm -rf conftest*
2609   echo "$ac_t""no" 1>&6
2610 fi
2611 rm -f conftest*
2612
2613
2614 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2615 echo "configure:2616: checking for POSIXized ISC" >&5
2616 if test -d /etc/conf/kconfig.d &&
2617   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2618 then
2619   echo "$ac_t""yes" 1>&6
2620   ISC=yes # If later tests want to check for ISC.
2621   cat >> confdefs.h <<\EOF
2622 #define _POSIX_SOURCE 1
2623 EOF
2624
2625   if test "$GCC" = yes; then
2626     CC="$CC -posix"
2627   else
2628     CC="$CC -Xp"
2629   fi
2630 else
2631   echo "$ac_t""no" 1>&6
2632   ISC=
2633 fi
2634
2635 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2636 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2637 echo "configure:2638: checking for minix/config.h" >&5
2638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2639   echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641   cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <minix/config.h>
2645 EOF
2646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2647 { (eval echo configure:2648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2649 if test -z "$ac_err"; then
2650   rm -rf conftest*
2651   eval "ac_cv_header_$ac_safe=yes"
2652 else
2653   echo "$ac_err" >&5
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   rm -rf conftest*
2657   eval "ac_cv_header_$ac_safe=no"
2658 fi
2659 rm -f conftest*
2660 fi
2661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2662   echo "$ac_t""yes" 1>&6
2663   MINIX=yes
2664 else
2665   echo "$ac_t""no" 1>&6
2666 MINIX=
2667 fi
2668
2669 if test "$MINIX" = yes; then
2670   cat >> confdefs.h <<\EOF
2671 #define _POSIX_SOURCE 1
2672 EOF
2673
2674   cat >> confdefs.h <<\EOF
2675 #define _POSIX_1_SOURCE 2
2676 EOF
2677
2678   cat >> confdefs.h <<\EOF
2679 #define _MINIX 1
2680 EOF
2681
2682 fi
2683
2684
2685 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2686 echo "configure:2687: checking for be_app in -lbe" >&5
2687 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2689   echo $ac_n "(cached) $ac_c" 1>&6
2690 else
2691   ac_save_LIBS="$LIBS"
2692 LIBS="-lbe -lroot $LIBS"
2693 cat > conftest.$ac_ext <<EOF
2694 #line 2695 "configure"
2695 #include "confdefs.h"
2696 /* Override any gcc2 internal prototype to avoid an error.  */
2697 /* We use char because int might match the return type of a gcc2
2698     builtin and then its argument prototype would still apply.  */
2699 char be_app();
2700
2701 int main() {
2702 be_app()
2703 ; return 0; }
2704 EOF
2705 if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2706   rm -rf conftest*
2707   eval "ac_cv_lib_$ac_lib_var=yes"
2708 else
2709   echo "configure: failed program was:" >&5
2710   cat conftest.$ac_ext >&5
2711   rm -rf conftest*
2712   eval "ac_cv_lib_$ac_lib_var=no"
2713 fi
2714 rm -f conftest*
2715 LIBS="$ac_save_LIBS"
2716
2717 fi
2718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2719   echo "$ac_t""yes" 1>&6
2720   LIBS="$LIBS -lbe -lroot"
2721 else
2722   echo "$ac_t""no" 1>&6
2723 :
2724 fi
2725
2726
2727 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2728 echo "configure:2729: checking for Cygwin environment" >&5
2729 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2730   echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732   cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735
2736 int main() {
2737
2738 #ifndef __CYGWIN__
2739 #define __CYGWIN__ __CYGWIN32__
2740 #endif
2741 return __CYGWIN__;
2742 ; return 0; }
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2745   rm -rf conftest*
2746   ac_cv_cygwin=yes
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750   rm -rf conftest*
2751   ac_cv_cygwin=no
2752 fi
2753 rm -f conftest*
2754 rm -f conftest*
2755 fi
2756
2757 echo "$ac_t""$ac_cv_cygwin" 1>&6
2758 CYGWIN=
2759 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2760 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2761 echo "configure:2762: checking for mingw32 environment" >&5
2762 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768
2769 int main() {
2770 return __MINGW32__;
2771 ; return 0; }
2772 EOF
2773 if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2774   rm -rf conftest*
2775   ac_cv_mingw32=yes
2776 else
2777   echo "configure: failed program was:" >&5
2778   cat conftest.$ac_ext >&5
2779   rm -rf conftest*
2780   ac_cv_mingw32=no
2781 fi
2782 rm -f conftest*
2783 rm -f conftest*
2784 fi
2785
2786 echo "$ac_t""$ac_cv_mingw32" 1>&6
2787 MINGW32=
2788 test "$ac_cv_mingw32" = yes && MINGW32=yes
2789
2790
2791 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2792 echo "configure:2793: checking for executable suffix" >&5
2793 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2797   ac_cv_exeext=.exe
2798 else
2799   rm -f conftest*
2800   echo 'int main () { return 0; }' > conftest.$ac_ext
2801   ac_cv_exeext=
2802   if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2803     for file in conftest.*; do
2804       case $file in
2805       *.c | *.o | *.obj) ;;
2806       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2807       esac
2808     done
2809   else
2810     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2811   fi
2812   rm -f conftest*
2813   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2814 fi
2815 fi
2816
2817 EXEEXT=""
2818 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2819 echo "$ac_t""${ac_cv_exeext}" 1>&6
2820 ac_exeext=$EXEEXT
2821
2822 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2823 echo "configure:2824: checking for object suffix" >&5
2824 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2825   echo $ac_n "(cached) $ac_c" 1>&6
2826 else
2827   rm -f conftest*
2828 echo 'int i = 1;' > conftest.$ac_ext
2829 if { (eval echo configure:2830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2830   for ac_file in conftest.*; do
2831     case $ac_file in
2832     *.c) ;;
2833     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2834     esac
2835   done
2836 else
2837   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2838 fi
2839 rm -f conftest*
2840 fi
2841
2842 echo "$ac_t""$ac_cv_objext" 1>&6
2843 OBJEXT=$ac_cv_objext
2844 ac_objext=$ac_cv_objext
2845
2846
2847
2848
2849
2850 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2851 echo "configure:2852: checking for ${CC-cc} option to accept ANSI C" >&5
2852 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2853   echo $ac_n "(cached) $ac_c" 1>&6
2854 else
2855   am_cv_prog_cc_stdc=no
2856 ac_save_CC="$CC"
2857 # Don't try gcc -ansi; that turns off useful extensions and
2858 # breaks some systems' header files.
2859 # AIX                   -qlanglvl=ansi
2860 # Ultrix and OSF/1      -std1
2861 # HP-UX                 -Aa -D_HPUX_SOURCE
2862 # SVR4                  -Xc -D__EXTENSIONS__
2863 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2864 do
2865   CC="$ac_save_CC $ac_arg"
2866   cat > conftest.$ac_ext <<EOF
2867 #line 2868 "configure"
2868 #include "confdefs.h"
2869 #include <stdarg.h>
2870 #include <stdio.h>
2871 #include <sys/types.h>
2872 #include <sys/stat.h>
2873 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2874 struct buf { int x; };
2875 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2876 static char *e (p, i)
2877      char **p;
2878      int i;
2879 {
2880   return p[i];
2881 }
2882 static char *f (char * (*g) (char **, int), char **p, ...)
2883 {
2884   char *s;
2885   va_list v;
2886   va_start (v,p);
2887   s = g (p, va_arg (v,int));
2888   va_end (v);
2889   return s;
2890 }
2891 int test (int i, double x);
2892 struct s1 {int (*f) (int a);};
2893 struct s2 {int (*f) (double a);};
2894 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2895 int argc;
2896 char **argv;
2897
2898 int main() {
2899
2900 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2901
2902 ; return 0; }
2903 EOF
2904 if { (eval echo configure:2905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2905   rm -rf conftest*
2906   am_cv_prog_cc_stdc="$ac_arg"; break
2907 else
2908   echo "configure: failed program was:" >&5
2909   cat conftest.$ac_ext >&5
2910 fi
2911 rm -f conftest*
2912 done
2913 CC="$ac_save_CC"
2914
2915 fi
2916
2917 if test -z "$am_cv_prog_cc_stdc"; then
2918   echo "$ac_t""none needed" 1>&6
2919 else
2920   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2921 fi
2922 case "x$am_cv_prog_cc_stdc" in
2923   x|xno) ;;
2924   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2925 esac
2926
2927 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2928         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2929 fi
2930
2931
2932
2933
2934 echo $ac_n "checking for socket""... $ac_c" 1>&6
2935 echo "configure:2936: checking for socket" >&5
2936 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2937   echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939   cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 /* System header to define __stub macros and hopefully few prototypes,
2943     which can conflict with char socket(); below.  */
2944 #include <assert.h>
2945 /* Override any gcc2 internal prototype to avoid an error.  */
2946 /* We use char because int might match the return type of a gcc2
2947     builtin and then its argument prototype would still apply.  */
2948 char socket();
2949
2950 int main() {
2951
2952 /* The GNU C library defines this for functions which it implements
2953     to always fail with ENOSYS.  Some functions are actually named
2954     something starting with __ and the normal name is an alias.  */
2955 #if defined (__stub_socket) || defined (__stub___socket)
2956 choke me
2957 #else
2958 socket();
2959 #endif
2960
2961 ; return 0; }
2962 EOF
2963 if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2964   rm -rf conftest*
2965   eval "ac_cv_func_socket=yes"
2966 else
2967   echo "configure: failed program was:" >&5
2968   cat conftest.$ac_ext >&5
2969   rm -rf conftest*
2970   eval "ac_cv_func_socket=no"
2971 fi
2972 rm -f conftest*
2973 fi
2974
2975 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2976   echo "$ac_t""yes" 1>&6
2977   have_socket=yes
2978 else
2979   echo "$ac_t""no" 1>&6
2980         
2981         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2982 echo "configure:2983: checking for main in -lsocket" >&5
2983 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   ac_save_LIBS="$LIBS"
2988 LIBS="-lsocket  $LIBS"
2989 cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992
2993 int main() {
2994 main()
2995 ; return 0; }
2996 EOF
2997 if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2998   rm -rf conftest*
2999   eval "ac_cv_lib_$ac_lib_var=yes"
3000 else
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   eval "ac_cv_lib_$ac_lib_var=no"
3005 fi
3006 rm -f conftest*
3007 LIBS="$ac_save_LIBS"
3008
3009 fi
3010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3011   echo "$ac_t""yes" 1>&6
3012     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3014   cat >> confdefs.h <<EOF
3015 #define $ac_tr_lib 1
3016 EOF
3017
3018   LIBS="-lsocket $LIBS"
3019
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3025 echo "configure:3026: checking for main in -lnet" >&5
3026 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   ac_save_LIBS="$LIBS"
3031 LIBS="-lnet  $LIBS"
3032 cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035
3036 int main() {
3037 main()
3038 ; return 0; }
3039 EOF
3040 if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3041   rm -rf conftest*
3042   eval "ac_cv_lib_$ac_lib_var=yes"
3043 else
3044   echo "configure: failed program was:" >&5
3045   cat conftest.$ac_ext >&5
3046   rm -rf conftest*
3047   eval "ac_cv_lib_$ac_lib_var=no"
3048 fi
3049 rm -f conftest*
3050 LIBS="$ac_save_LIBS"
3051
3052 fi
3053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3054   echo "$ac_t""yes" 1>&6
3055     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3056     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3057   cat >> confdefs.h <<EOF
3058 #define $ac_tr_lib 1
3059 EOF
3060
3061   LIBS="-lnet $LIBS"
3062
3063 else
3064   echo "$ac_t""no" 1>&6
3065 fi
3066
3067         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3068 echo "configure:3069: checking for main in -lnsl_s" >&5
3069 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073   ac_save_LIBS="$LIBS"
3074 LIBS="-lnsl_s  $LIBS"
3075 cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078
3079 int main() {
3080 main()
3081 ; return 0; }
3082 EOF
3083 if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3084   rm -rf conftest*
3085   eval "ac_cv_lib_$ac_lib_var=yes"
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089   rm -rf conftest*
3090   eval "ac_cv_lib_$ac_lib_var=no"
3091 fi
3092 rm -f conftest*
3093 LIBS="$ac_save_LIBS"
3094
3095 fi
3096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3097   echo "$ac_t""yes" 1>&6
3098     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3099     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3100   cat >> confdefs.h <<EOF
3101 #define $ac_tr_lib 1
3102 EOF
3103
3104   LIBS="-lnsl_s $LIBS"
3105
3106 else
3107   echo "$ac_t""no" 1>&6
3108 fi
3109
3110         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3111 echo "configure:3112: checking for main in -lnsl" >&5
3112 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3113 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116   ac_save_LIBS="$LIBS"
3117 LIBS="-lnsl  $LIBS"
3118 cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121
3122 int main() {
3123 main()
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3127   rm -rf conftest*
3128   eval "ac_cv_lib_$ac_lib_var=yes"
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   eval "ac_cv_lib_$ac_lib_var=no"
3134 fi
3135 rm -f conftest*
3136 LIBS="$ac_save_LIBS"
3137
3138 fi
3139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3140   echo "$ac_t""yes" 1>&6
3141     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3143   cat >> confdefs.h <<EOF
3144 #define $ac_tr_lib 1
3145 EOF
3146
3147   LIBS="-lnsl $LIBS"
3148
3149 else
3150   echo "$ac_t""no" 1>&6
3151 fi
3152
3153         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3154 echo "configure:3155: checking for socket in -linet" >&5
3155 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159   ac_save_LIBS="$LIBS"
3160 LIBS="-linet  $LIBS"
3161 cat > conftest.$ac_ext <<EOF
3162 #line 3163 "configure"
3163 #include "confdefs.h"
3164 /* Override any gcc2 internal prototype to avoid an error.  */
3165 /* We use char because int might match the return type of a gcc2
3166     builtin and then its argument prototype would still apply.  */
3167 char socket();
3168
3169 int main() {
3170 socket()
3171 ; return 0; }
3172 EOF
3173 if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3174   rm -rf conftest*
3175   eval "ac_cv_lib_$ac_lib_var=yes"
3176 else
3177   echo "configure: failed program was:" >&5
3178   cat conftest.$ac_ext >&5
3179   rm -rf conftest*
3180   eval "ac_cv_lib_$ac_lib_var=no"
3181 fi
3182 rm -f conftest*
3183 LIBS="$ac_save_LIBS"
3184
3185 fi
3186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3187   echo "$ac_t""yes" 1>&6
3188     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3189     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3190   cat >> confdefs.h <<EOF
3191 #define $ac_tr_lib 1
3192 EOF
3193
3194   LIBS="-linet $LIBS"
3195
3196 else
3197   echo "$ac_t""no" 1>&6
3198 fi
3199
3200         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3201 echo "configure:3202: checking for main in -lgen" >&5
3202 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3204   echo $ac_n "(cached) $ac_c" 1>&6
3205 else
3206   ac_save_LIBS="$LIBS"
3207 LIBS="-lgen  $LIBS"
3208 cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 main()
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3217   rm -rf conftest*
3218   eval "ac_cv_lib_$ac_lib_var=yes"
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   eval "ac_cv_lib_$ac_lib_var=no"
3224 fi
3225 rm -f conftest*
3226 LIBS="$ac_save_LIBS"
3227
3228 fi
3229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3230   echo "$ac_t""yes" 1>&6
3231     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3232     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3233   cat >> confdefs.h <<EOF
3234 #define $ac_tr_lib 1
3235 EOF
3236
3237   LIBS="-lgen $LIBS"
3238
3239 else
3240   echo "$ac_t""no" 1>&6
3241 fi
3242
3243
3244 fi
3245
3246
3247 for ac_func in res_search
3248 do
3249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $ac_func" >&5
3251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254   cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 /* System header to define __stub macros and hopefully few prototypes,
3258     which can conflict with char $ac_func(); below.  */
3259 #include <assert.h>
3260 /* Override any gcc2 internal prototype to avoid an error.  */
3261 /* We use char because int might match the return type of a gcc2
3262     builtin and then its argument prototype would still apply.  */
3263 char $ac_func();
3264
3265 int main() {
3266
3267 /* The GNU C library defines this for functions which it implements
3268     to always fail with ENOSYS.  Some functions are actually named
3269     something starting with __ and the normal name is an alias.  */
3270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3271 choke me
3272 #else
3273 $ac_func();
3274 #endif
3275
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279   rm -rf conftest*
3280   eval "ac_cv_func_$ac_func=yes"
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   rm -rf conftest*
3285   eval "ac_cv_func_$ac_func=no"
3286 fi
3287 rm -f conftest*
3288 fi
3289
3290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3291   echo "$ac_t""yes" 1>&6
3292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3293   cat >> confdefs.h <<EOF
3294 #define $ac_tr_func 1
3295 EOF
3296  
3297 else
3298   echo "$ac_t""no" 1>&6
3299 fi
3300 done
3301
3302 if test $ac_cv_func_res_search = "no" ; then 
3303         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3304 echo "configure:3305: checking for res_search in -lbind" >&5
3305 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3307   echo $ac_n "(cached) $ac_c" 1>&6
3308 else
3309   ac_save_LIBS="$LIBS"
3310 LIBS="-lbind  $LIBS"
3311 cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 /* Override any gcc2 internal prototype to avoid an error.  */
3315 /* We use char because int might match the return type of a gcc2
3316     builtin and then its argument prototype would still apply.  */
3317 char res_search();
3318
3319 int main() {
3320 res_search()
3321 ; return 0; }
3322 EOF
3323 if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3324   rm -rf conftest*
3325   eval "ac_cv_lib_$ac_lib_var=yes"
3326 else
3327   echo "configure: failed program was:" >&5
3328   cat conftest.$ac_ext >&5
3329   rm -rf conftest*
3330   eval "ac_cv_lib_$ac_lib_var=no"
3331 fi
3332 rm -f conftest*
3333 LIBS="$ac_save_LIBS"
3334
3335 fi
3336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3337   echo "$ac_t""yes" 1>&6
3338     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3339     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3340   cat >> confdefs.h <<EOF
3341 #define $ac_tr_lib 1
3342 EOF
3343
3344   LIBS="-lbind $LIBS"
3345
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349
3350         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3351                 cat >> confdefs.h <<\EOF
3352 #define HAVE_RES_SEARCH 1
3353 EOF
3354
3355         else
3356                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3357 echo "configure:3358: checking for res_search in -lresolv" >&5
3358 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   ac_save_LIBS="$LIBS"
3363 LIBS="-lresolv  $LIBS"
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367 /* Override any gcc2 internal prototype to avoid an error.  */
3368 /* We use char because int might match the return type of a gcc2
3369     builtin and then its argument prototype would still apply.  */
3370 char res_search();
3371
3372 int main() {
3373 res_search()
3374 ; return 0; }
3375 EOF
3376 if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=yes"
3379 else
3380   echo "configure: failed program was:" >&5
3381   cat conftest.$ac_ext >&5
3382   rm -rf conftest*
3383   eval "ac_cv_lib_$ac_lib_var=no"
3384 fi
3385 rm -f conftest*
3386 LIBS="$ac_save_LIBS"
3387
3388 fi
3389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3390   echo "$ac_t""yes" 1>&6
3391     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3393   cat >> confdefs.h <<EOF
3394 #define $ac_tr_lib 1
3395 EOF
3396
3397   LIBS="-lresolv $LIBS"
3398
3399 else
3400   echo "$ac_t""no" 1>&6
3401 fi
3402
3403                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3404                         cat >> confdefs.h <<\EOF
3405 #define HAVE_RES_SEARCH 1
3406 EOF
3407
3408                 fi
3409         fi
3410 fi
3411
3412 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3413 echo "configure:3414: checking for sigset in -lV3" >&5
3414 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   ac_save_LIBS="$LIBS"
3419 LIBS="-lV3  $LIBS"
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3423 /* Override any gcc2 internal prototype to avoid an error.  */
3424 /* We use char because int might match the return type of a gcc2
3425     builtin and then its argument prototype would still apply.  */
3426 char sigset();
3427
3428 int main() {
3429 sigset()
3430 ; return 0; }
3431 EOF
3432 if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3433   rm -rf conftest*
3434   eval "ac_cv_lib_$ac_lib_var=yes"
3435 else
3436   echo "configure: failed program was:" >&5
3437   cat conftest.$ac_ext >&5
3438   rm -rf conftest*
3439   eval "ac_cv_lib_$ac_lib_var=no"
3440 fi
3441 rm -f conftest*
3442 LIBS="$ac_save_LIBS"
3443
3444 fi
3445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3446   echo "$ac_t""yes" 1>&6
3447     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3449   cat >> confdefs.h <<EOF
3450 #define $ac_tr_lib 1
3451 EOF
3452
3453   LIBS="-lV3 $LIBS"
3454
3455 else
3456   echo "$ac_t""no" 1>&6
3457 fi
3458
3459
3460 # ISODE tests
3461 ol_link_isode=no
3462 if test $ol_enable_ldapd != no ; then
3463                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3464 echo "configure:3465: checking for main in -lxtpp" >&5
3465 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3466 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3467   echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469   ac_save_LIBS="$LIBS"
3470 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3471 cat > conftest.$ac_ext <<EOF
3472 #line 3473 "configure"
3473 #include "confdefs.h"
3474
3475 int main() {
3476 main()
3477 ; return 0; }
3478 EOF
3479 if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3480   rm -rf conftest*
3481   eval "ac_cv_lib_$ac_lib_var=yes"
3482 else
3483   echo "configure: failed program was:" >&5
3484   cat conftest.$ac_ext >&5
3485   rm -rf conftest*
3486   eval "ac_cv_lib_$ac_lib_var=no"
3487 fi
3488 rm -f conftest*
3489 LIBS="$ac_save_LIBS"
3490
3491 fi
3492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3493   echo "$ac_t""yes" 1>&6
3494   
3495                 ol_link_isode=yes
3496                 cat >> confdefs.h <<\EOF
3497 #define HAVE_XTPP 1
3498 EOF
3499
3500                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3501                 
3502 else
3503   echo "$ac_t""no" 1>&6
3504 :
3505 fi
3506
3507         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3508 echo "configure:3509: checking for main in -ldsap" >&5
3509 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3510 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   ac_save_LIBS="$LIBS"
3514 LIBS="-ldsap -lisode $LIBS"
3515 cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3518
3519 int main() {
3520 main()
3521 ; return 0; }
3522 EOF
3523 if { (eval echo configure:3524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3524   rm -rf conftest*
3525   eval "ac_cv_lib_$ac_lib_var=yes"
3526 else
3527   echo "configure: failed program was:" >&5
3528   cat conftest.$ac_ext >&5
3529   rm -rf conftest*
3530   eval "ac_cv_lib_$ac_lib_var=no"
3531 fi
3532 rm -f conftest*
3533 LIBS="$ac_save_LIBS"
3534
3535 fi
3536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3537   echo "$ac_t""yes" 1>&6
3538   
3539                 ol_link_isode=yes
3540                 cat >> confdefs.h <<\EOF
3541 #define HAVE_DSAP 1
3542 EOF
3543
3544                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3545                 
3546 else
3547   echo "$ac_t""no" 1>&6
3548 :
3549 fi
3550
3551         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3552 echo "configure:3553: checking for main in -lisode" >&5
3553 ac_lib_var=`echo isode'_'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="-lisode  $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   
3583                 ol_link_isode=yes
3584                 cat >> confdefs.h <<\EOF
3585 #define HAVE_ISODE 1
3586 EOF
3587
3588                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3589                 
3590 else
3591   echo "$ac_t""no" 1>&6
3592 :
3593 fi
3594
3595 fi
3596
3597 if test $ol_link_isode != no; then
3598         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3599 echo "configure:3600: checking for main in -lpp" >&5
3600 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3602   echo $ac_n "(cached) $ac_c" 1>&6
3603 else
3604   ac_save_LIBS="$LIBS"
3605 LIBS="-lpp  $LIBS"
3606 cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609
3610 int main() {
3611 main()
3612 ; return 0; }
3613 EOF
3614 if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3615   rm -rf conftest*
3616   eval "ac_cv_lib_$ac_lib_var=yes"
3617 else
3618   echo "configure: failed program was:" >&5
3619   cat conftest.$ac_ext >&5
3620   rm -rf conftest*
3621   eval "ac_cv_lib_$ac_lib_var=no"
3622 fi
3623 rm -f conftest*
3624 LIBS="$ac_save_LIBS"
3625
3626 fi
3627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3628   echo "$ac_t""yes" 1>&6
3629   
3630                 cat >> confdefs.h <<\EOF
3631 #define HAVE_PP 1
3632 EOF
3633
3634                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3635                 
3636 else
3637   echo "$ac_t""no" 1>&6
3638 :
3639 fi
3640
3641
3642         # Extract the first word of "pepsy", so it can be a program name with args.
3643 set dummy pepsy; ac_word=$2
3644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3645 echo "configure:3646: checking for $ac_word" >&5
3646 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3647   echo $ac_n "(cached) $ac_c" 1>&6
3648 else
3649   case "$PEPSY" in
3650   /*)
3651   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3652   ;;
3653   ?:/*)                  
3654   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3655   ;;
3656   *)
3657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3658   ac_dummy="$PATH"
3659   for ac_dir in $ac_dummy; do 
3660     test -z "$ac_dir" && ac_dir=.
3661     if test -f $ac_dir/$ac_word; then
3662       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3663       break
3664     fi
3665   done
3666   IFS="$ac_save_ifs"
3667   ;;
3668 esac
3669 fi
3670 PEPSY="$ac_cv_path_PEPSY"
3671 if test -n "$PEPSY"; then
3672   echo "$ac_t""$PEPSY" 1>&6
3673 else
3674   echo "$ac_t""no" 1>&6
3675 fi
3676
3677 fi
3678
3679 ol_link_kerberos=no
3680
3681 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3682         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3683 do
3684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3686 echo "configure:3687: checking for $ac_hdr" >&5
3687 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   cat > conftest.$ac_ext <<EOF
3691 #line 3692 "configure"
3692 #include "confdefs.h"
3693 #include <$ac_hdr>
3694 EOF
3695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3696 { (eval echo configure:3697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3698 if test -z "$ac_err"; then
3699   rm -rf conftest*
3700   eval "ac_cv_header_$ac_safe=yes"
3701 else
3702   echo "$ac_err" >&5
3703   echo "configure: failed program was:" >&5
3704   cat conftest.$ac_ext >&5
3705   rm -rf conftest*
3706   eval "ac_cv_header_$ac_safe=no"
3707 fi
3708 rm -f conftest*
3709 fi
3710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3711   echo "$ac_t""yes" 1>&6
3712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3713   cat >> confdefs.h <<EOF
3714 #define $ac_tr_hdr 1
3715 EOF
3716  
3717 else
3718   echo "$ac_t""no" 1>&6
3719 fi
3720 done
3721
3722
3723         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3724                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3725 echo "configure:3726: checking for main in -lkrb4" >&5
3726 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3727 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3728   echo $ac_n "(cached) $ac_c" 1>&6
3729 else
3730   ac_save_LIBS="$LIBS"
3731 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3732 cat > conftest.$ac_ext <<EOF
3733 #line 3734 "configure"
3734 #include "confdefs.h"
3735
3736 int main() {
3737 main()
3738 ; return 0; }
3739 EOF
3740 if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3741   rm -rf conftest*
3742   eval "ac_cv_lib_$ac_lib_var=yes"
3743 else
3744   echo "configure: failed program was:" >&5
3745   cat conftest.$ac_ext >&5
3746   rm -rf conftest*
3747   eval "ac_cv_lib_$ac_lib_var=no"
3748 fi
3749 rm -f conftest*
3750 LIBS="$ac_save_LIBS"
3751
3752 fi
3753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3754   echo "$ac_t""yes" 1>&6
3755   have_k5=yes
3756 else
3757   echo "$ac_t""no" 1>&6
3758 have_k5=no
3759 fi
3760
3761
3762                 if test $have_k5 = yes ; then
3763                         ol_with_kerberos=found
3764                         ol_link_kerberos=yes
3765
3766                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3767
3768                         LIBS="$KRB_LIBS $LIBS"
3769
3770                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3771 echo "configure:3772: checking for des_debug in Kerberos libraries" >&5
3772 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
3773   echo $ac_n "(cached) $ac_c" 1>&6
3774 else
3775   
3776                                                                 save_LIBS="$LIBS"
3777                                 LIBS="$KRB_LIBS $LIBS"
3778                                 cat > conftest.$ac_ext <<EOF
3779 #line 3780 "configure"
3780 #include "confdefs.h"
3781
3782 #include <kerberosIV/krb.h>
3783 #include <kerberosIV/des.h>
3784 extern int des_debug;
3785
3786 int main() {
3787
3788 des_debug = 1;
3789
3790 ; return 0; }
3791 EOF
3792 if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3793   rm -rf conftest*
3794   ol_cv_var_des_debug=yes
3795 else
3796   echo "configure: failed program was:" >&5
3797   cat conftest.$ac_ext >&5
3798   rm -rf conftest*
3799   ol_cv_var_des_debug=no
3800 fi
3801 rm -f conftest*
3802                                                                 LIBS="$save_LIBS"
3803                         
3804 fi
3805
3806 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
3807
3808                         if test $ol_cv_var_des_debug = yes ; then
3809                                 cat >> confdefs.h <<\EOF
3810 #define HAVE_DES_DEBUG 1
3811 EOF
3812
3813                         fi
3814
3815                         LIBS="$save_LIBS"
3816                 fi
3817         fi
3818 fi
3819
3820 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3821         for ac_hdr in krb.h des.h
3822 do
3823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3825 echo "configure:3826: checking for $ac_hdr" >&5
3826 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3827   echo $ac_n "(cached) $ac_c" 1>&6
3828 else
3829   cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832 #include <$ac_hdr>
3833 EOF
3834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3835 { (eval echo configure:3836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3837 if test -z "$ac_err"; then
3838   rm -rf conftest*
3839   eval "ac_cv_header_$ac_safe=yes"
3840 else
3841   echo "$ac_err" >&5
3842   echo "configure: failed program was:" >&5
3843   cat conftest.$ac_ext >&5
3844   rm -rf conftest*
3845   eval "ac_cv_header_$ac_safe=no"
3846 fi
3847 rm -f conftest*
3848 fi
3849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3850   echo "$ac_t""yes" 1>&6
3851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3852   cat >> confdefs.h <<EOF
3853 #define $ac_tr_hdr 1
3854 EOF
3855  
3856 else
3857   echo "$ac_t""no" 1>&6
3858 fi
3859 done
3860
3861
3862         if test $ac_cv_header_krb_h = yes ; then
3863                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3864 echo "configure:3865: checking for main in -lkrb" >&5
3865 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3866 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   ac_save_LIBS="$LIBS"
3870 LIBS="-lkrb -ldes $LIBS"
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874
3875 int main() {
3876 main()
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=yes"
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=no"
3887 fi
3888 rm -f conftest*
3889 LIBS="$ac_save_LIBS"
3890
3891 fi
3892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3893   echo "$ac_t""yes" 1>&6
3894   have_k4=yes
3895 else
3896   echo "$ac_t""no" 1>&6
3897 have_k4=no
3898 fi
3899
3900
3901                 if test $have_k4 = yes ; then
3902                         ol_with_kerberos=found
3903                         ol_link_kerberos=yes
3904
3905                         KRB_LIBS="-lkrb -ldes"
3906                 fi
3907         fi
3908 fi
3909
3910 if test $ol_link_kerberos = yes ; then
3911         cat >> confdefs.h <<\EOF
3912 #define HAVE_KERBEROS 1
3913 EOF
3914
3915 fi
3916
3917 ol_link_tls=no
3918 if test $ol_with_tls != no ; then
3919         
3920         for ac_hdr in ssl.h
3921 do
3922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3924 echo "configure:3925: checking for $ac_hdr" >&5
3925 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   cat > conftest.$ac_ext <<EOF
3929 #line 3930 "configure"
3930 #include "confdefs.h"
3931 #include <$ac_hdr>
3932 EOF
3933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3934 { (eval echo configure:3935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3936 if test -z "$ac_err"; then
3937   rm -rf conftest*
3938   eval "ac_cv_header_$ac_safe=yes"
3939 else
3940   echo "$ac_err" >&5
3941   echo "configure: failed program was:" >&5
3942   cat conftest.$ac_ext >&5
3943   rm -rf conftest*
3944   eval "ac_cv_header_$ac_safe=no"
3945 fi
3946 rm -f conftest*
3947 fi
3948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3949   echo "$ac_t""yes" 1>&6
3950     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3951   cat >> confdefs.h <<EOF
3952 #define $ac_tr_hdr 1
3953 EOF
3954  
3955 else
3956   echo "$ac_t""no" 1>&6
3957 fi
3958 done
3959
3960         
3961         if test $ac_cv_header_ssl_h = yes ; then
3962                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
3963 echo "configure:3964: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
3964 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
3965 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3966   echo $ac_n "(cached) $ac_c" 1>&6
3967 else
3968   ac_save_LIBS="$LIBS"
3969 LIBS="-lssl -lcrypto $LIBS"
3970 cat > conftest.$ac_ext <<EOF
3971 #line 3972 "configure"
3972 #include "confdefs.h"
3973 /* Override any gcc2 internal prototype to avoid an error.  */
3974 /* We use char because int might match the return type of a gcc2
3975     builtin and then its argument prototype would still apply.  */
3976 char SSLeay_add_ssl_algorithms();
3977
3978 int main() {
3979 SSLeay_add_ssl_algorithms()
3980 ; return 0; }
3981 EOF
3982 if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3983   rm -rf conftest*
3984   eval "ac_cv_lib_$ac_lib_var=yes"
3985 else
3986   echo "configure: failed program was:" >&5
3987   cat conftest.$ac_ext >&5
3988   rm -rf conftest*
3989   eval "ac_cv_lib_$ac_lib_var=no"
3990 fi
3991 rm -f conftest*
3992 LIBS="$ac_save_LIBS"
3993
3994 fi
3995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3996   echo "$ac_t""yes" 1>&6
3997   have_ssleay=yes
3998                         need_rsaref=no
3999 else
4000   echo "$ac_t""no" 1>&6
4001 have_ssleay=no
4002 fi
4003
4004                         
4005                 if test $have_ssleay = no ; then
4006                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4007 echo "configure:4008: checking for ssl3_accept in -lssl" >&5
4008 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4009 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   ac_save_LIBS="$LIBS"
4013 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4014 cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 /* Override any gcc2 internal prototype to avoid an error.  */
4018 /* We use char because int might match the return type of a gcc2
4019     builtin and then its argument prototype would still apply.  */
4020 char ssl3_accept();
4021
4022 int main() {
4023 ssl3_accept()
4024 ; return 0; }
4025 EOF
4026 if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4027   rm -rf conftest*
4028   eval "ac_cv_lib_$ac_lib_var=yes"
4029 else
4030   echo "configure: failed program was:" >&5
4031   cat conftest.$ac_ext >&5
4032   rm -rf conftest*
4033   eval "ac_cv_lib_$ac_lib_var=no"
4034 fi
4035 rm -f conftest*
4036 LIBS="$ac_save_LIBS"
4037
4038 fi
4039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4040   echo "$ac_t""yes" 1>&6
4041   have_ssleay=yes
4042                                 need_rsaref=yes
4043 else
4044   echo "$ac_t""no" 1>&6
4045 have_ssleay=no
4046 fi
4047
4048                 fi
4049
4050                 if test $have_ssleay = yes ; then
4051                         ol_with_tls=found
4052                         ol_link_tls=yes
4053
4054                         cat >> confdefs.h <<\EOF
4055 #define HAVE_SSLEAY 1
4056 EOF
4057
4058
4059                         if test $need_rsaref = yes; then
4060                                 cat >> confdefs.h <<\EOF
4061 #define HAVE_RSAREF 1
4062 EOF
4063
4064
4065                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4066                         else
4067                                 TLS_LIBS="-lssl -lcrypto"
4068                         fi
4069                 fi
4070         fi
4071 fi
4072
4073 if test $ol_link_tls = yes ; then
4074         cat >> confdefs.h <<\EOF
4075 #define HAVE_TLS 1
4076 EOF
4077
4078 fi      
4079
4080 for ac_func in \
4081         ctime_r                 \
4082         gethostbyname_r gethostbyaddr_r \
4083
4084 do
4085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4086 echo "configure:4087: checking for $ac_func" >&5
4087 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4088   echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090   cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* System header to define __stub macros and hopefully few prototypes,
4094     which can conflict with char $ac_func(); below.  */
4095 #include <assert.h>
4096 /* Override any gcc2 internal prototype to avoid an error.  */
4097 /* We use char because int might match the return type of a gcc2
4098     builtin and then its argument prototype would still apply.  */
4099 char $ac_func();
4100
4101 int main() {
4102
4103 /* The GNU C library defines this for functions which it implements
4104     to always fail with ENOSYS.  Some functions are actually named
4105     something starting with __ and the normal name is an alias.  */
4106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4107 choke me
4108 #else
4109 $ac_func();
4110 #endif
4111
4112 ; return 0; }
4113 EOF
4114 if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4115   rm -rf conftest*
4116   eval "ac_cv_func_$ac_func=yes"
4117 else
4118   echo "configure: failed program was:" >&5
4119   cat conftest.$ac_ext >&5
4120   rm -rf conftest*
4121   eval "ac_cv_func_$ac_func=no"
4122 fi
4123 rm -f conftest*
4124 fi
4125
4126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4127   echo "$ac_t""yes" 1>&6
4128     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4129   cat >> confdefs.h <<EOF
4130 #define $ac_tr_func 1
4131 EOF
4132  
4133 else
4134   echo "$ac_t""no" 1>&6
4135 fi
4136 done
4137
4138
4139 if test "$ac_cv_func_ctime_r" = no ; then
4140         ol_cv_func_ctime_r_nargs=0
4141 else
4142         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4143 echo "configure:4144: checking number of arguments of ctime_r" >&5
4144 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4145   echo $ac_n "(cached) $ac_c" 1>&6
4146 else
4147   cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 #include <time.h>
4151 int main() {
4152 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4153 ; return 0; }
4154 EOF
4155 if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4156   rm -rf conftest*
4157   ol_cv_func_ctime_r_nargs=3
4158 else
4159   echo "configure: failed program was:" >&5
4160   cat conftest.$ac_ext >&5
4161   rm -rf conftest*
4162   cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4165 #include <time.h>
4166 int main() {
4167 time_t ti; char *buffer; ctime_r(&ti,buffer);
4168 ; return 0; }
4169 EOF
4170 if { (eval echo configure:4171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4171   rm -rf conftest*
4172   ol_cv_func_ctime_r_nargs=2
4173 else
4174   echo "configure: failed program was:" >&5
4175   cat conftest.$ac_ext >&5
4176   rm -rf conftest*
4177   ol_cv_func_ctime_r_nargs=0
4178 fi
4179 rm -f conftest*
4180 fi
4181 rm -f conftest*
4182 fi
4183
4184 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4185   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4186     cat >> confdefs.h <<EOF
4187 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4188 EOF
4189
4190   fi
4191
4192 fi
4193
4194 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4195         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4196 echo "configure:4197: checking number of arguments of gethostbyname_r" >&5
4197 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4198   echo $ac_n "(cached) $ac_c" 1>&6
4199 else
4200   cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 #include <sys/types.h>
4204 #include <sys/socket.h>
4205 #include <netinet/in.h>
4206 #include <netdb.h>
4207 #define BUFSIZE (sizeof(struct hostent)+10)
4208 int main() {
4209 struct hostent hent; char buffer[BUFSIZE];
4210                 int bufsize=BUFSIZE;int h_errno;
4211                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4212                         buffer, bufsize, &h_errno);
4213 ; return 0; }
4214 EOF
4215 if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4216   rm -rf conftest*
4217   ol_cv_func_gethostbyname_r_nargs=5
4218 else
4219   echo "configure: failed program was:" >&5
4220   cat conftest.$ac_ext >&5
4221   rm -rf conftest*
4222   cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 #include <sys/types.h>
4226 #include <sys/socket.h>
4227 #include <netinet/in.h>
4228 #include <netdb.h>
4229 #define BUFSIZE (sizeof(struct hostent)+10)
4230 int main() {
4231 struct hostent hent;struct hostent *rhent;
4232                         char buffer[BUFSIZE];
4233                         int bufsize=BUFSIZE;int h_errno;
4234                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4235                                 &rhent, &h_errno);
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4239   rm -rf conftest*
4240   ol_cv_func_gethostbyname_r_nargs=6
4241 else
4242   echo "configure: failed program was:" >&5
4243   cat conftest.$ac_ext >&5
4244   rm -rf conftest*
4245   ol_cv_func_gethostbyname_r_nargs=0
4246 fi
4247 rm -f conftest*
4248 fi
4249 rm -f conftest*
4250 fi
4251
4252 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4253   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4254         cat >> confdefs.h <<EOF
4255 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4256 EOF
4257
4258   fi
4259
4260 else
4261         ol_cv_func_gethostbyname_r_nargs=0
4262 fi
4263  
4264 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4265         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4266 echo "configure:4267: checking number of arguments of gethostbyaddr_r" >&5
4267 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4268   echo $ac_n "(cached) $ac_c" 1>&6
4269 else
4270   cat > conftest.$ac_ext <<EOF
4271 #line 4272 "configure"
4272 #include "confdefs.h"
4273 #include <sys/types.h>
4274 #include <sys/socket.h>
4275 #include <netinet/in.h>
4276 #include <netdb.h>
4277 #define BUFSIZE (sizeof(struct hostent)+10)
4278 int main() {
4279 struct hostent hent; char buffer[BUFSIZE]; 
4280             struct in_addr add;
4281             size_t alen=sizeof(struct in_addr);
4282             int bufsize=BUFSIZE;int h_errno;
4283                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4284                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4285 ; return 0; }
4286 EOF
4287 if { (eval echo configure:4288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4288   rm -rf conftest*
4289   ol_cv_func_gethostbyaddr_r_nargs=7
4290 else
4291   echo "configure: failed program was:" >&5
4292   cat conftest.$ac_ext >&5
4293   rm -rf conftest*
4294   cat > conftest.$ac_ext <<EOF
4295 #line 4296 "configure"
4296 #include "confdefs.h"
4297 #include <sys/types.h>
4298 #include <sys/socket.h>
4299 #include <netinet/in.h>
4300 #include <netdb.h>
4301 #define BUFSIZE (sizeof(struct hostent)+10)
4302 int main() {
4303 struct hostent hent;
4304                         struct hostent *rhent; char buffer[BUFSIZE]; 
4305                         struct in_addr add;
4306                         size_t alen=sizeof(struct in_addr);
4307                         int bufsize=BUFSIZE;int h_errno;
4308                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4309                                 alen, AF_INET, &hent, buffer, bufsize, 
4310                                 &rhent, &h_errno);
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4314   rm -rf conftest*
4315   ol_cv_func_gethostbyaddr_r_nargs=8
4316 else
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -rf conftest*
4320   ol_cv_func_gethostbyaddr_r_nargs=0
4321 fi
4322 rm -f conftest*
4323 fi
4324 rm -f conftest*
4325 fi
4326
4327 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4328   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4329     cat >> confdefs.h <<EOF
4330 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4331 EOF
4332
4333   fi
4334
4335 else
4336         ol_cv_func_gethostbyaddr_r_nargs=0
4337 fi
4338
4339 if test "$ac_cv_func_ctime_r" = yes \
4340         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4341         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4342         -a "$ac_cv_func_gethostbyname_r" = yes \
4343         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4344         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4345         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4346         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4347         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4348         ; then
4349  
4350         cat >> confdefs.h <<\EOF
4351 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4352 EOF
4353
4354 fi
4355
4356 ol_link_threads=no
4357 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4358         -o $ol_with_threads = posix ; then
4359
4360         for ac_hdr in pthread.h sched.h
4361 do
4362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4364 echo "configure:4365: checking for $ac_hdr" >&5
4365 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4366   echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368   cat > conftest.$ac_ext <<EOF
4369 #line 4370 "configure"
4370 #include "confdefs.h"
4371 #include <$ac_hdr>
4372 EOF
4373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4374 { (eval echo configure:4375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4376 if test -z "$ac_err"; then
4377   rm -rf conftest*
4378   eval "ac_cv_header_$ac_safe=yes"
4379 else
4380   echo "$ac_err" >&5
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -rf conftest*
4384   eval "ac_cv_header_$ac_safe=no"
4385 fi
4386 rm -f conftest*
4387 fi
4388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4389   echo "$ac_t""yes" 1>&6
4390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4391   cat >> confdefs.h <<EOF
4392 #define $ac_tr_hdr 1
4393 EOF
4394  
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398 done
4399
4400
4401         if test $ac_cv_header_pthread_h = yes ; then
4402                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4403 echo "configure:4404: checking POSIX thread version" >&5
4404 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   
4408         cat > conftest.$ac_ext <<EOF
4409 #line 4410 "configure"
4410 #include "confdefs.h"
4411
4412 #               include <pthread.h>
4413                 /* this check could be improved */
4414 #               ifdef PTHREAD_ONCE_INIT
4415                         pthread_version_final
4416 #               endif
4417         
4418 EOF
4419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4420   egrep "pthread_version_final" >/dev/null 2>&1; then
4421   rm -rf conftest*
4422   ol_pthread_final=yes
4423 else
4424   rm -rf conftest*
4425   ol_pthread_final=no
4426 fi
4427 rm -f conftest*
4428
4429
4430         cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433
4434 #               include <pthread.h>
4435                 /* this check could be improved */
4436 #               ifdef pthread_once_init
4437                         pthread_version_draft4
4438 #               endif
4439         
4440 EOF
4441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4442   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4443   rm -rf conftest*
4444   ol_pthread_draft4=yes
4445 else
4446   rm -rf conftest*
4447   ol_pthread_draft4=no
4448 fi
4449 rm -f conftest*
4450
4451
4452         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4453                 ol_cv_pthread_version=final
4454         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4455                 ol_cv_pthread_version=draft4
4456         else
4457                 ol_cv_pthread_version=unknown
4458         fi
4459
4460 fi
4461
4462 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4463
4464
4465                 if test $ol_cv_pthread_version = final ; then
4466                         cat >> confdefs.h <<\EOF
4467 #define HAVE_PTHREADS_FINAL 1
4468 EOF
4469
4470                 elif test $ol_cv_pthread_version = draft4 ; then
4471                         cat >> confdefs.h <<\EOF
4472 #define HAVE_PTHREADS_D4 1
4473 EOF
4474
4475                 else
4476                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4477                 fi
4478
4479                 # consider threads found
4480                 ol_with_threads=found
4481
4482                 
4483 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
4484 echo "configure:4485: checking for LinuxThreads" >&5
4485 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
4486   echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488   
4489         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
4490         if test "$res" -gt 0 ; then
4491                 ol_cv_linux_threads=yes
4492         else
4493                 ol_cv_linux_threads=no
4494         fi
4495
4496 fi
4497
4498 echo "$ac_t""$ol_cv_linux_threads" 1>&6
4499
4500
4501                 if test $ol_cv_linux_threads = yes ; then
4502                         cat >> confdefs.h <<\EOF
4503 #define HAVE_LINUX_THREADS 1
4504 EOF
4505
4506                 fi
4507
4508                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4509                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4510 echo "configure:4511: checking for pthread_create in default libraries" >&5
4511                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4512   echo $ac_n "(cached) $ac_c" 1>&6
4513 else
4514   
4515                 if test "$cross_compiling" = yes; then
4516                         ol_cv_pthread_create=yes
4517 else
4518   cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4521
4522 #include <pthread.h>
4523 #ifndef NULL
4524 #define NULL (void*)0
4525 #endif
4526
4527 static void *task(p)
4528         void *p;
4529 {
4530         return (void *) (p == NULL);
4531 }
4532
4533 int main(argc, argv)
4534         int argc;
4535         char **argv;
4536 {
4537         pthread_t t;
4538         int status;
4539
4540         /* make sure pthread_create() isn't just a stub */
4541 #if HAVE_PTHREADS_D4
4542         status = pthread_create(&t, pthread_attr_default, task, NULL));
4543 #else
4544         status = pthread_create(&t, NULL, task, NULL);
4545 #endif
4546
4547         if( status ) return status;
4548
4549         /* make sure pthread_detach() isn't just a stub */
4550 #if HAVE_PTHREADS_D4
4551         status = pthread_detach( &t );
4552 #else
4553         status = pthread_detach( t );
4554 #endif
4555
4556         if( status ) return status;
4557
4558         return status;
4559 }
4560
4561 EOF
4562 if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4563 then
4564   ol_cv_pthread_create=yes
4565 else
4566   echo "configure: failed program was:" >&5
4567   cat conftest.$ac_ext >&5
4568   rm -fr conftest*
4569   ol_cv_pthread_create=no
4570 fi
4571 rm -fr conftest*
4572 fi
4573
4574 fi
4575
4576                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4577
4578                 if test $ol_cv_pthread_create != no ; then
4579                         ol_link_threads=posix
4580                 fi
4581
4582                 if test $ol_link_threads = no ; then
4583                                                 echo $ac_n "checking for pthread_create with -mt""... $ac_c" 1>&6
4584 echo "configure:4585: checking for pthread_create with -mt" >&5
4585 if eval "test \"`echo '$''{'ol_cv_pthread_mt_flag'+set}'`\" = set"; then
4586   echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588   
4589                                                                 save_LIBS="$LIBS"
4590                                 LIBS="-mt $LIBS"
4591                                 cat > conftest.$ac_ext <<EOF
4592 #line 4593 "configure"
4593 #include "confdefs.h"
4594 char pthread_create();
4595 int main() {
4596 pthread_create();
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4600   rm -rf conftest*
4601   ol_cv_pthread_mt_flag=yes
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   ol_cv_pthread_mt_flag=no
4607 fi
4608 rm -f conftest*
4609                                                                 LIBS="$save_LIBS"
4610                         
4611 fi
4612
4613 echo "$ac_t""$ol_cv_pthread_mt_flag" 1>&6
4614
4615                         if test $ol_cv_pthread_mt_flag = yes ; then
4616                                 LTHREAD_LIBS="$LTHREAD_LIBS -mt"
4617                                 ol_link_threads=posix
4618                         fi
4619                 fi
4620
4621                 if test $ol_link_threads = no ; then
4622                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
4623 echo "configure:4624: checking for pthread_create with -kthread" >&5
4624 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   
4628                                                                 save_LIBS="$LIBS"
4629                                 LIBS="-kthread $LIBS"
4630                                 cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 #include <pthread.h>
4634 int main() {
4635
4636 #if HAVE_PTHREADS_D4
4637         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4638 #else
4639         pthread_t t;
4640         pthread_create(&t,NULL,NULL,NULL);
4641         pthread_detach(t);
4642 #endif
4643
4644 ; return 0; }
4645 EOF
4646 if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4647   rm -rf conftest*
4648   ol_cv_kthread_flag=yes
4649 else
4650   echo "configure: failed program was:" >&5
4651   cat conftest.$ac_ext >&5
4652   rm -rf conftest*
4653   ol_cv_kthread_flag=no
4654 fi
4655 rm -f conftest*
4656                                                                 LIBS="$save_LIBS"
4657                         
4658 fi
4659
4660 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
4661
4662                         if test $ol_cv_kthread_flag = yes ; then
4663                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
4664                                 ol_link_threads=posix
4665                         fi
4666                 fi
4667
4668                 if test $ol_link_threads = no ; then
4669                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
4670 echo "configure:4671: checking for pthread_create with -pthread" >&5
4671 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   
4675                                                                 save_LIBS="$LIBS"
4676                                 LIBS="-pthread $LIBS"
4677                                 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 #include <pthread.h>
4681 int main() {
4682
4683 #if HAVE_PTHREADS_D4
4684         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4685 #else
4686         pthread_create(NULL,NULL,NULL,NULL);
4687 #endif
4688
4689 ; return 0; }
4690 EOF
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4692   rm -rf conftest*
4693   ol_cv_pthread_flag=yes
4694 else
4695   echo "configure: failed program was:" >&5
4696   cat conftest.$ac_ext >&5
4697   rm -rf conftest*
4698   ol_cv_pthread_flag=no
4699 fi
4700 rm -f conftest*
4701                                                                 LIBS="$save_LIBS"
4702                         
4703 fi
4704
4705 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
4706
4707                         if test $ol_cv_pthread_flag = yes ; then
4708                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
4709                                 ol_link_threads=posix
4710                         fi
4711                 fi
4712
4713                 if test $ol_link_threads = no ; then
4714                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
4715 echo "configure:4716: checking for pthread_create with -pthreads" >&5
4716 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   
4720                                                                 save_LIBS="$LIBS"
4721                                 LIBS="-pthreads $LIBS"
4722                                 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 #include <pthread.h>
4726 int main() {
4727
4728 #if HAVE_PTHREADS_D4
4729         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4730 #else
4731         pthread_create(NULL,NULL,NULL,NULL);
4732 #endif
4733
4734 ; return 0; }
4735 EOF
4736 if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4737   rm -rf conftest*
4738   ol_cv_pthreads_flag=yes
4739 else
4740   echo "configure: failed program was:" >&5
4741   cat conftest.$ac_ext >&5
4742   rm -rf conftest*
4743   ol_cv_pthreads_flag=no
4744 fi
4745 rm -f conftest*
4746                                                                 LIBS="$save_LIBS"
4747                         
4748 fi
4749
4750 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
4751
4752                         if test $ol_cv_pthreads_flag = yes ; then
4753                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
4754                                 ol_link_threads=posix
4755                         fi
4756                 fi
4757
4758                 if test $ol_link_threads = no ; then
4759                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
4760 echo "configure:4761: checking for pthread_create with -thread" >&5
4761 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4762   echo $ac_n "(cached) $ac_c" 1>&6
4763 else
4764   
4765                                                                 save_LIBS="$LIBS"
4766                                 LIBS="-thread $LIBS"
4767                                 cat > conftest.$ac_ext <<EOF
4768 #line 4769 "configure"
4769 #include "confdefs.h"
4770 char pthread_create();
4771 int main() {
4772 pthread_create();
4773 ; return 0; }
4774 EOF
4775 if { (eval echo configure:4776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4776   rm -rf conftest*
4777   ol_cv_thread_flag=yes
4778 else
4779   echo "configure: failed program was:" >&5
4780   cat conftest.$ac_ext >&5
4781   rm -rf conftest*
4782   ol_cv_thread_flag=no
4783 fi
4784 rm -f conftest*
4785                                                                 LIBS="$save_LIBS"
4786                         
4787 fi
4788
4789 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4790
4791                         if test $ol_cv_thread_flag = yes ; then
4792                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
4793                                 ol_link_threads=posix
4794                         fi
4795                 fi
4796
4797                 if test $ol_link_threads = no ; then
4798                                                 save_LIBS="$LIBS"
4799                         echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
4800 echo "configure:4801: checking for pthread_mutex_unlock in -lpthread" >&5
4801 ac_lib_var=`echo pthread'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4803   echo $ac_n "(cached) $ac_c" 1>&6
4804 else
4805   ac_save_LIBS="$LIBS"
4806 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
4807 cat > conftest.$ac_ext <<EOF
4808 #line 4809 "configure"
4809 #include "confdefs.h"
4810 /* Override any gcc2 internal prototype to avoid an error.  */
4811 /* We use char because int might match the return type of a gcc2
4812     builtin and then its argument prototype would still apply.  */
4813 char pthread_mutex_unlock();
4814
4815 int main() {
4816 pthread_mutex_unlock()
4817 ; return 0; }
4818 EOF
4819 if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820   rm -rf conftest*
4821   eval "ac_cv_lib_$ac_lib_var=yes"
4822 else
4823   echo "configure: failed program was:" >&5
4824   cat conftest.$ac_ext >&5
4825   rm -rf conftest*
4826   eval "ac_cv_lib_$ac_lib_var=no"
4827 fi
4828 rm -f conftest*
4829 LIBS="$ac_save_LIBS"
4830
4831 fi
4832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4833   echo "$ac_t""yes" 1>&6
4834   
4835                                 ol_link_threads=posix
4836                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
4837                                 
4838 else
4839   echo "$ac_t""no" 1>&6
4840 :
4841 fi
4842
4843                         LIBS="$save_LIBS"
4844                 fi
4845
4846                 if test $ol_link_threads = no ; then
4847                                                 save_LIBS="$LIBS"
4848                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4849 echo "configure:4850: checking for pthread_mutex_lock in -lpthread" >&5
4850 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4851 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4852   echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854   ac_save_LIBS="$LIBS"
4855 LIBS="-lpthread -lmach -lexc $LIBS"
4856 cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859 /* Override any gcc2 internal prototype to avoid an error.  */
4860 /* We use char because int might match the return type of a gcc2
4861     builtin and then its argument prototype would still apply.  */
4862 char pthread_mutex_lock();
4863
4864 int main() {
4865 pthread_mutex_lock()
4866 ; return 0; }
4867 EOF
4868 if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4869   rm -rf conftest*
4870   eval "ac_cv_lib_$ac_lib_var=yes"
4871 else
4872   echo "configure: failed program was:" >&5
4873   cat conftest.$ac_ext >&5
4874   rm -rf conftest*
4875   eval "ac_cv_lib_$ac_lib_var=no"
4876 fi
4877 rm -f conftest*
4878 LIBS="$ac_save_LIBS"
4879
4880 fi
4881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4882   echo "$ac_t""yes" 1>&6
4883   
4884                                 ol_link_threads=posix
4885                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
4886                                 
4887 else
4888   echo "$ac_t""no" 1>&6
4889 :
4890 fi
4891
4892                         LIBS="$save_LIBS"
4893                 fi
4894
4895                 if test $ol_link_threads = no ; then
4896                                                 save_LIBS="$LIBS"
4897                         echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
4898 echo "configure:4899: checking for pthread_mutex_trylock in -lpthread" >&5
4899 ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
4900 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   ac_save_LIBS="$LIBS"
4904 LIBS="-lpthread -lexc $LIBS"
4905 cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 /* Override any gcc2 internal prototype to avoid an error.  */
4909 /* We use char because int might match the return type of a gcc2
4910     builtin and then its argument prototype would still apply.  */
4911 char pthread_mutex_trylock();
4912
4913 int main() {
4914 pthread_mutex_trylock()
4915 ; return 0; }
4916 EOF
4917 if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4918   rm -rf conftest*
4919   eval "ac_cv_lib_$ac_lib_var=yes"
4920 else
4921   echo "configure: failed program was:" >&5
4922   cat conftest.$ac_ext >&5
4923   rm -rf conftest*
4924   eval "ac_cv_lib_$ac_lib_var=no"
4925 fi
4926 rm -f conftest*
4927 LIBS="$ac_save_LIBS"
4928
4929 fi
4930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4931   echo "$ac_t""yes" 1>&6
4932   
4933                                 ol_link_threads=posix
4934                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
4935                                 
4936 else
4937   echo "$ac_t""no" 1>&6
4938 :
4939 fi
4940
4941                         LIBS="$save_LIBS"
4942                 fi
4943
4944                                 if test $ol_link_threads = no ; then
4945                                                 save_LIBS="$LIBS"
4946                         echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
4947 echo "configure:4948: checking for pthread_join in -lpthread" >&5
4948 ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
4949 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4950   echo $ac_n "(cached) $ac_c" 1>&6
4951 else
4952   ac_save_LIBS="$LIBS"
4953 LIBS="-lpthread -Wl,-woff,85 $LIBS"
4954 cat > conftest.$ac_ext <<EOF
4955 #line 4956 "configure"
4956 #include "confdefs.h"
4957 /* Override any gcc2 internal prototype to avoid an error.  */
4958 /* We use char because int might match the return type of a gcc2
4959     builtin and then its argument prototype would still apply.  */
4960 char pthread_join();
4961
4962 int main() {
4963 pthread_join()
4964 ; return 0; }
4965 EOF
4966 if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4967   rm -rf conftest*
4968   eval "ac_cv_lib_$ac_lib_var=yes"
4969 else
4970   echo "configure: failed program was:" >&5
4971   cat conftest.$ac_ext >&5
4972   rm -rf conftest*
4973   eval "ac_cv_lib_$ac_lib_var=no"
4974 fi
4975 rm -f conftest*
4976 LIBS="$ac_save_LIBS"
4977
4978 fi
4979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4980   echo "$ac_t""yes" 1>&6
4981   
4982                                 ol_link_threads=posix
4983                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4984                                 
4985 else
4986   echo "$ac_t""no" 1>&6
4987 :
4988 fi
4989
4990                         LIBS="$save_LIBS"
4991                 fi
4992
4993                 if test $ol_link_threads = no ; then
4994                                                 save_LIBS="$LIBS"
4995                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
4996 echo "configure:4997: checking for pthread_create in -lpthread" >&5
4997 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
4998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4999   echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001   ac_save_LIBS="$LIBS"
5002 LIBS="-lpthread  $LIBS"
5003 cat > conftest.$ac_ext <<EOF
5004 #line 5005 "configure"
5005 #include "confdefs.h"
5006 /* Override any gcc2 internal prototype to avoid an error.  */
5007 /* We use char because int might match the return type of a gcc2
5008     builtin and then its argument prototype would still apply.  */
5009 char pthread_create();
5010
5011 int main() {
5012 pthread_create()
5013 ; return 0; }
5014 EOF
5015 if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5016   rm -rf conftest*
5017   eval "ac_cv_lib_$ac_lib_var=yes"
5018 else
5019   echo "configure: failed program was:" >&5
5020   cat conftest.$ac_ext >&5
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=no"
5023 fi
5024 rm -f conftest*
5025 LIBS="$ac_save_LIBS"
5026
5027 fi
5028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5029   echo "$ac_t""yes" 1>&6
5030   
5031                                 ol_link_threads=posix
5032                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
5033 else
5034   echo "$ac_t""no" 1>&6
5035 :
5036 fi
5037
5038                         LIBS="$save_LIBS"
5039                 fi
5040
5041                 if test $ol_link_threads = no ; then
5042                                                 save_LIBS="$LIBS"
5043                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5044 echo "configure:5045: checking for pthread_create in -lc_r" >&5
5045 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
5046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5047   echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049   ac_save_LIBS="$LIBS"
5050 LIBS="-lc_r  $LIBS"
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 /* Override any gcc2 internal prototype to avoid an error.  */
5055 /* We use char because int might match the return type of a gcc2
5056     builtin and then its argument prototype would still apply.  */
5057 char pthread_create();
5058
5059 int main() {
5060 pthread_create()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078   
5079                                 ol_link_threads=posix
5080                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
5081 else
5082   echo "$ac_t""no" 1>&6
5083 :
5084 fi
5085
5086                         LIBS="$save_LIBS"
5087                 fi
5088
5089                 if test $ol_link_threads = no ; then
5090                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
5091 echo "configure:5092: checking for pthread_create with -threads" >&5
5092 if eval "test \"`echo '$''{'ol_cv_threads_flag'+set}'`\" = set"; then
5093   echo $ac_n "(cached) $ac_c" 1>&6
5094 else
5095   
5096                                                                 save_LIBS="$LIBS"
5097                                 LIBS="-threads $LIBS"
5098                                 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101 char pthread_create();
5102 int main() {
5103
5104                                         pthread_create();
5105                                         
5106 ; return 0; }
5107 EOF
5108 if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5109   rm -rf conftest*
5110   ol_cv_threads_flag=yes
5111 else
5112   echo "configure: failed program was:" >&5
5113   cat conftest.$ac_ext >&5
5114   rm -rf conftest*
5115   ol_cv_threads_flag=no
5116 fi
5117 rm -f conftest*
5118                                                                 LIBS="$save_LIBS"
5119                         
5120 fi
5121
5122 echo "$ac_t""$ol_cv_threads_flag" 1>&6
5123
5124                         if test $ol_cv_threads_flag = yes ; then
5125                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
5126                                 ol_link_threads=posix
5127                         fi
5128                 fi
5129
5130                 if test $ol_link_threads = no ; then
5131                                                 save_LIBS="$LIBS"
5132                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
5133 echo "configure:5134: checking for pthread_mutex_unlock in -lpthreads" >&5
5134 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
5135 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5136   echo $ac_n "(cached) $ac_c" 1>&6
5137 else
5138   ac_save_LIBS="$LIBS"
5139 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5140 cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143 /* Override any gcc2 internal prototype to avoid an error.  */
5144 /* We use char because int might match the return type of a gcc2
5145     builtin and then its argument prototype would still apply.  */
5146 char pthread_mutex_unlock();
5147
5148 int main() {
5149 pthread_mutex_unlock()
5150 ; return 0; }
5151 EOF
5152 if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153   rm -rf conftest*
5154   eval "ac_cv_lib_$ac_lib_var=yes"
5155 else
5156   echo "configure: failed program was:" >&5
5157   cat conftest.$ac_ext >&5
5158   rm -rf conftest*
5159   eval "ac_cv_lib_$ac_lib_var=no"
5160 fi
5161 rm -f conftest*
5162 LIBS="$ac_save_LIBS"
5163
5164 fi
5165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5166   echo "$ac_t""yes" 1>&6
5167   
5168                                 ol_link_threads=posix
5169                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
5170                                 
5171 else
5172   echo "$ac_t""no" 1>&6
5173 :
5174 fi
5175
5176                         LIBS="$save_LIBS"
5177                 fi
5178
5179                 if test $ol_link_threads = no ; then
5180                                                 save_LIBS="$LIBS"
5181                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
5182 echo "configure:5183: checking for pthread_mutex_lock in -lpthreads" >&5
5183 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
5184 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   ac_save_LIBS="$LIBS"
5188 LIBS="-lpthreads -lmach -lexc $LIBS"
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192 /* Override any gcc2 internal prototype to avoid an error.  */
5193 /* We use char because int might match the return type of a gcc2
5194     builtin and then its argument prototype would still apply.  */
5195 char pthread_mutex_lock();
5196
5197 int main() {
5198 pthread_mutex_lock()
5199 ; return 0; }
5200 EOF
5201 if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5202   rm -rf conftest*
5203   eval "ac_cv_lib_$ac_lib_var=yes"
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208   eval "ac_cv_lib_$ac_lib_var=no"
5209 fi
5210 rm -f conftest*
5211 LIBS="$ac_save_LIBS"
5212
5213 fi
5214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5215   echo "$ac_t""yes" 1>&6
5216   
5217                                 ol_link_threads=posix
5218                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc"
5219                                 
5220 else
5221   echo "$ac_t""no" 1>&6
5222 :
5223 fi
5224
5225                         LIBS="$save_LIBS"
5226                 fi
5227
5228                 if test $ol_link_threads = no ; then
5229                                                 save_LIBS="$LIBS"
5230                         echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6
5231 echo "configure:5232: checking for pthread_mutex_trylock in -lpthreads" >&5
5232 ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
5233 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5234   echo $ac_n "(cached) $ac_c" 1>&6
5235 else
5236   ac_save_LIBS="$LIBS"
5237 LIBS="-lpthreads -lexc $LIBS"
5238 cat > conftest.$ac_ext <<EOF
5239 #line 5240 "configure"
5240 #include "confdefs.h"
5241 /* Override any gcc2 internal prototype to avoid an error.  */
5242 /* We use char because int might match the return type of a gcc2
5243     builtin and then its argument prototype would still apply.  */
5244 char pthread_mutex_trylock();
5245
5246 int main() {
5247 pthread_mutex_trylock()
5248 ; return 0; }
5249 EOF
5250 if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5251   rm -rf conftest*
5252   eval "ac_cv_lib_$ac_lib_var=yes"
5253 else
5254   echo "configure: failed program was:" >&5
5255   cat conftest.$ac_ext >&5
5256   rm -rf conftest*
5257   eval "ac_cv_lib_$ac_lib_var=no"
5258 fi
5259 rm -f conftest*
5260 LIBS="$ac_save_LIBS"
5261
5262 fi
5263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5264   echo "$ac_t""yes" 1>&6
5265   
5266                                 ol_link_threads=posix
5267                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
5268                                 
5269 else
5270   echo "$ac_t""no" 1>&6
5271 :
5272 fi
5273
5274                         LIBS="$save_LIBS"
5275                 fi
5276
5277                 if test $ol_link_threads = no ; then
5278                                                 save_LIBS="$LIBS"
5279                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5280 echo "configure:5281: checking for pthread_create in -lpthreads" >&5
5281 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
5282 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285   ac_save_LIBS="$LIBS"
5286 LIBS="-lpthreads  $LIBS"
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290 /* Override any gcc2 internal prototype to avoid an error.  */
5291 /* We use char because int might match the return type of a gcc2
5292     builtin and then its argument prototype would still apply.  */
5293 char pthread_create();
5294
5295 int main() {
5296 pthread_create()
5297 ; return 0; }
5298 EOF
5299 if { (eval echo configure:5300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5300   rm -rf conftest*
5301   eval "ac_cv_lib_$ac_lib_var=yes"
5302 else
5303   echo "configure: failed program was:" >&5
5304   cat conftest.$ac_ext >&5
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=no"
5307 fi
5308 rm -f conftest*
5309 LIBS="$ac_save_LIBS"
5310
5311 fi
5312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5313   echo "$ac_t""yes" 1>&6
5314   
5315                                 ol_link_threads=posix
5316                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5317 else
5318   echo "$ac_t""no" 1>&6
5319 :
5320 fi
5321
5322                         LIBS="$save_LIBS"
5323                 fi
5324
5325                 if test $ol_link_threads != no ; then
5326                         cat >> confdefs.h <<\EOF
5327 #define HAVE_PTHREADS 1
5328 EOF
5329
5330
5331                                                 save_CPPFLAGS="$CPPFLAGS"
5332                         save_LIBS="$LIBS"
5333                         LIBS="$LTHREAD_LIBS $LIBS"
5334
5335                                                                                                 for ac_func in sched_yield pthread_yield
5336 do
5337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5338 echo "configure:5339: checking for $ac_func" >&5
5339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 /* System header to define __stub macros and hopefully few prototypes,
5346     which can conflict with char $ac_func(); below.  */
5347 #include <assert.h>
5348 /* Override any gcc2 internal prototype to avoid an error.  */
5349 /* We use char because int might match the return type of a gcc2
5350     builtin and then its argument prototype would still apply.  */
5351 char $ac_func();
5352
5353 int main() {
5354
5355 /* The GNU C library defines this for functions which it implements
5356     to always fail with ENOSYS.  Some functions are actually named
5357     something starting with __ and the normal name is an alias.  */
5358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5359 choke me
5360 #else
5361 $ac_func();
5362 #endif
5363
5364 ; return 0; }
5365 EOF
5366 if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5367   rm -rf conftest*
5368   eval "ac_cv_func_$ac_func=yes"
5369 else
5370   echo "configure: failed program was:" >&5
5371   cat conftest.$ac_ext >&5
5372   rm -rf conftest*
5373   eval "ac_cv_func_$ac_func=no"
5374 fi
5375 rm -f conftest*
5376 fi
5377
5378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5379   echo "$ac_t""yes" 1>&6
5380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5381   cat >> confdefs.h <<EOF
5382 #define $ac_tr_func 1
5383 EOF
5384  
5385 else
5386   echo "$ac_t""no" 1>&6
5387 fi
5388 done
5389
5390
5391                         if test $ac_cv_func_sched_yield = no -a \
5392                                 $ac_cv_func_pthread_yield = no ; then
5393                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5394 echo "configure:5395: checking for sched_yield in -lrt" >&5
5395 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5396 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5397   echo $ac_n "(cached) $ac_c" 1>&6
5398 else
5399   ac_save_LIBS="$LIBS"
5400 LIBS="-lrt  $LIBS"
5401 cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404 /* Override any gcc2 internal prototype to avoid an error.  */
5405 /* We use char because int might match the return type of a gcc2
5406     builtin and then its argument prototype would still apply.  */
5407 char sched_yield();
5408
5409 int main() {
5410 sched_yield()
5411 ; return 0; }
5412 EOF
5413 if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5414   rm -rf conftest*
5415   eval "ac_cv_lib_$ac_lib_var=yes"
5416 else
5417   echo "configure: failed program was:" >&5
5418   cat conftest.$ac_ext >&5
5419   rm -rf conftest*
5420   eval "ac_cv_lib_$ac_lib_var=no"
5421 fi
5422 rm -f conftest*
5423 LIBS="$ac_save_LIBS"
5424
5425 fi
5426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5427   echo "$ac_t""yes" 1>&6
5428   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5429                                         cat >> confdefs.h <<\EOF
5430 #define HAVE_SCHED_YIELD 1
5431 EOF
5432
5433                                         ac_cv_func_sched_yield=yes
5434 else
5435   echo "$ac_t""no" 1>&6
5436 ac_cv_func_sched_yield=no
5437 fi
5438
5439                         fi
5440                         if test $ac_cv_func_sched_yield = no -a \
5441                                 $ac_cv_func_pthread_yield = no ; then
5442                                                                                                 for ac_func in thr_yield
5443 do
5444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5445 echo "configure:5446: checking for $ac_func" >&5
5446 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5447   echo $ac_n "(cached) $ac_c" 1>&6
5448 else
5449   cat > conftest.$ac_ext <<EOF
5450 #line 5451 "configure"
5451 #include "confdefs.h"
5452 /* System header to define __stub macros and hopefully few prototypes,
5453     which can conflict with char $ac_func(); below.  */
5454 #include <assert.h>
5455 /* Override any gcc2 internal prototype to avoid an error.  */
5456 /* We use char because int might match the return type of a gcc2
5457     builtin and then its argument prototype would still apply.  */
5458 char $ac_func();
5459
5460 int main() {
5461
5462 /* The GNU C library defines this for functions which it implements
5463     to always fail with ENOSYS.  Some functions are actually named
5464     something starting with __ and the normal name is an alias.  */
5465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5466 choke me
5467 #else
5468 $ac_func();
5469 #endif
5470
5471 ; return 0; }
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5474   rm -rf conftest*
5475   eval "ac_cv_func_$ac_func=yes"
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479   rm -rf conftest*
5480   eval "ac_cv_func_$ac_func=no"
5481 fi
5482 rm -f conftest*
5483 fi
5484
5485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5486   echo "$ac_t""yes" 1>&6
5487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5488   cat >> confdefs.h <<EOF
5489 #define $ac_tr_func 1
5490 EOF
5491  
5492 else
5493   echo "$ac_t""no" 1>&6
5494 fi
5495 done
5496
5497                         fi
5498                         if test $ac_cv_func_sched_yield = no -a \
5499                                 $ac_cv_func_pthread_yield = no -a \
5500                                 "$ac_cv_func_thr_yield" = no ; then
5501                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5502                         fi
5503
5504                                                 for ac_func in pthread_kill
5505 do
5506 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5507 echo "configure:5508: checking for $ac_func" >&5
5508 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5509   echo $ac_n "(cached) $ac_c" 1>&6
5510 else
5511   cat > conftest.$ac_ext <<EOF
5512 #line 5513 "configure"
5513 #include "confdefs.h"
5514 /* System header to define __stub macros and hopefully few prototypes,
5515     which can conflict with char $ac_func(); below.  */
5516 #include <assert.h>
5517 /* Override any gcc2 internal prototype to avoid an error.  */
5518 /* We use char because int might match the return type of a gcc2
5519     builtin and then its argument prototype would still apply.  */
5520 char $ac_func();
5521
5522 int main() {
5523
5524 /* The GNU C library defines this for functions which it implements
5525     to always fail with ENOSYS.  Some functions are actually named
5526     something starting with __ and the normal name is an alias.  */
5527 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5528 choke me
5529 #else
5530 $ac_func();
5531 #endif
5532
5533 ; return 0; }
5534 EOF
5535 if { (eval echo configure:5536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5536   rm -rf conftest*
5537   eval "ac_cv_func_$ac_func=yes"
5538 else
5539   echo "configure: failed program was:" >&5
5540   cat conftest.$ac_ext >&5
5541   rm -rf conftest*
5542   eval "ac_cv_func_$ac_func=no"
5543 fi
5544 rm -f conftest*
5545 fi
5546
5547 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5548   echo "$ac_t""yes" 1>&6
5549     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5550   cat >> confdefs.h <<EOF
5551 #define $ac_tr_func 1
5552 EOF
5553  
5554 else
5555   echo "$ac_t""no" 1>&6
5556 fi
5557 done
5558
5559
5560                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5561 echo "configure:5562: checking for pthread_detach with <pthread.h>" >&5
5562 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5563   echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565   
5566                                                                 cat > conftest.$ac_ext <<EOF
5567 #line 5568 "configure"
5568 #include "confdefs.h"
5569
5570 #include <pthread.h>
5571 #ifndef NULL
5572 #define NULL (void*)0
5573 #endif
5574
5575 int main() {
5576 pthread_detach(NULL);
5577 ; return 0; }
5578 EOF
5579 if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5580   rm -rf conftest*
5581   ol_cv_func_pthread_detach=yes
5582 else
5583   echo "configure: failed program was:" >&5
5584   cat conftest.$ac_ext >&5
5585   rm -rf conftest*
5586   ol_cv_func_pthread_detach=no
5587 fi
5588 rm -f conftest*
5589                         
5590 fi
5591
5592 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5593
5594                         if test $ol_cv_func_pthread_detach = no ; then
5595                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
5596                         fi
5597
5598                         cat >> confdefs.h <<\EOF
5599 #define HAVE_PTHREAD_DETACH 1
5600 EOF
5601
5602
5603                                                 for ac_func in \
5604                                 pthread_setconcurrency \
5605                                 pthread_getconcurrency \
5606                                 thr_setconcurrency \
5607                                 thr_getconcurrency \
5608                         
5609 do
5610 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5611 echo "configure:5612: checking for $ac_func" >&5
5612 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5613   echo $ac_n "(cached) $ac_c" 1>&6
5614 else
5615   cat > conftest.$ac_ext <<EOF
5616 #line 5617 "configure"
5617 #include "confdefs.h"
5618 /* System header to define __stub macros and hopefully few prototypes,
5619     which can conflict with char $ac_func(); below.  */
5620 #include <assert.h>
5621 /* Override any gcc2 internal prototype to avoid an error.  */
5622 /* We use char because int might match the return type of a gcc2
5623     builtin and then its argument prototype would still apply.  */
5624 char $ac_func();
5625
5626 int main() {
5627
5628 /* The GNU C library defines this for functions which it implements
5629     to always fail with ENOSYS.  Some functions are actually named
5630     something starting with __ and the normal name is an alias.  */
5631 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5632 choke me
5633 #else
5634 $ac_func();
5635 #endif
5636
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   eval "ac_cv_func_$ac_func=yes"
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_func_$ac_func=no"
5647 fi
5648 rm -f conftest*
5649 fi
5650
5651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5652   echo "$ac_t""yes" 1>&6
5653     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5654   cat >> confdefs.h <<EOF
5655 #define $ac_tr_func 1
5656 EOF
5657  
5658 else
5659   echo "$ac_t""no" 1>&6
5660 fi
5661 done
5662
5663
5664                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
5665 echo "configure:5666: checking if pthread_create() works" >&5
5666                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
5667   echo $ac_n "(cached) $ac_c" 1>&6
5668 else
5669   
5670                         if test "$cross_compiling" = yes; then
5671                                 ol_cv_pthread_create_works=yes
5672 else
5673   cat > conftest.$ac_ext <<EOF
5674 #line 5675 "configure"
5675 #include "confdefs.h"
5676
5677 #include <pthread.h>
5678 #ifndef NULL
5679 #define NULL (void*)0
5680 #endif
5681
5682 static void *task(p)
5683         void *p;
5684 {
5685         return (void *) (p == NULL);
5686 }
5687
5688 int main(argc, argv)
5689         int argc;
5690         char **argv;
5691 {
5692         pthread_t t;
5693 #if HAVE_PTHREADS_D4
5694         exit(pthread_create(&t, pthread_attr_default, task, NULL));
5695 #else
5696         exit(pthread_create(&t, NULL, task, NULL));
5697 #endif
5698 }
5699
5700 EOF
5701 if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5702 then
5703   ol_cv_pthread_create_works=yes
5704 else
5705   echo "configure: failed program was:" >&5
5706   cat conftest.$ac_ext >&5
5707   rm -fr conftest*
5708   ol_cv_pthread_create_works=no
5709 fi
5710 rm -fr conftest*
5711 fi
5712
5713 fi
5714
5715                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
5716
5717                         if test $ol_cv_pthread_create_works = no ; then
5718                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
5719                         fi
5720
5721                                                 if test $ol_with_yielding_select = auto ; then
5722                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
5723 echo "configure:5724: checking if select yields when using pthreads" >&5
5724                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
5725   echo $ac_n "(cached) $ac_c" 1>&6
5726 else
5727   
5728                                 if test "$cross_compiling" = yes; then
5729   
5730                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
5731 else
5732   cat > conftest.$ac_ext <<EOF
5733 #line 5734 "configure"
5734 #include "confdefs.h"
5735
5736 #include <sys/types.h>
5737 #include <sys/time.h>
5738 #include <unistd.h>
5739 #include <pthread.h>
5740 #ifndef NULL
5741 #define NULL (void*) 0
5742 #endif
5743
5744 static int fildes[2];
5745
5746 static void *task(p)
5747         void *p;
5748 {
5749         int i;
5750         struct timeval tv;
5751
5752         fd_set rfds;
5753
5754         tv.tv_sec=10;
5755         tv.tv_usec=0;
5756
5757         FD_ZERO(&rfds);
5758         FD_SET(fildes[0], &rfds);
5759
5760         /* we're not interested in any fds */
5761         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
5762
5763         if(i < 0) {
5764                 perror("select");
5765                 exit(10);
5766         }
5767
5768         exit(0); /* if we exit here, the select blocked the whole process */
5769 }
5770
5771 int main(argc, argv)
5772         int argc;
5773         char **argv;
5774 {
5775         pthread_t t;
5776
5777         /* create a pipe to select */
5778         if(pipe(&fildes[0])) {
5779                 perror("select");
5780                 exit(1);
5781         }
5782
5783 #ifdef HAVE_PTHREAD_SETCONCURRENCY
5784         (void) pthread_setconcurrency(2);
5785 #else
5786 #ifdef HAVE_THR_SETCONCURRENCY
5787         /* Set Solaris LWP concurrency to 2 */
5788         thr_setconcurrency(2);
5789 #endif
5790 #endif
5791
5792 #if HAVE_PTHREADS_D4
5793         pthread_create(&t, pthread_attr_default, task, NULL);
5794 #else
5795         pthread_create(&t, NULL, task, NULL);
5796 #endif
5797
5798 #if HAVE_SCHED_YIELD
5799         sched_yield();  /* make sure task runs first */
5800 #else
5801 #ifdef HAVE_PTHREAD_YIELD
5802         pthread_yield();        /* make sure task runs first */
5803 #endif
5804 #endif
5805
5806         exit(2);
5807 }
5808 EOF
5809 if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5810 then
5811   ol_cv_pthread_select_yields=no
5812 else
5813   echo "configure: failed program was:" >&5
5814   cat conftest.$ac_ext >&5
5815   rm -fr conftest*
5816   ol_cv_pthread_select_yields=yes
5817 fi
5818 rm -fr conftest*
5819 fi
5820
5821 fi
5822
5823                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5824
5825                                 if test $ol_cv_pthread_select_yields = yes ; then
5826                                         ol_with_yielding_select=yes
5827                                 fi
5828                         fi
5829
5830                                                 CPPFLAGS="$save_CPPFLAGS"
5831                         LIBS="$save_LIBS"
5832                 else
5833                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5834                 fi
5835         fi
5836
5837         if test $ol_with_threads = posix ; then
5838                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5839         fi
5840 fi
5841
5842 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5843         -o $ol_with_threads = mach ; then
5844
5845                 for ac_hdr in mach/cthreads.h
5846 do
5847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5849 echo "configure:5850: checking for $ac_hdr" >&5
5850 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5851   echo $ac_n "(cached) $ac_c" 1>&6
5852 else
5853   cat > conftest.$ac_ext <<EOF
5854 #line 5855 "configure"
5855 #include "confdefs.h"
5856 #include <$ac_hdr>
5857 EOF
5858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5859 { (eval echo configure:5860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5861 if test -z "$ac_err"; then
5862   rm -rf conftest*
5863   eval "ac_cv_header_$ac_safe=yes"
5864 else
5865   echo "$ac_err" >&5
5866   echo "configure: failed program was:" >&5
5867   cat conftest.$ac_ext >&5
5868   rm -rf conftest*
5869   eval "ac_cv_header_$ac_safe=no"
5870 fi
5871 rm -f conftest*
5872 fi
5873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5874   echo "$ac_t""yes" 1>&6
5875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5876   cat >> confdefs.h <<EOF
5877 #define $ac_tr_hdr 1
5878 EOF
5879  
5880 else
5881   echo "$ac_t""no" 1>&6
5882 fi
5883 done
5884
5885         if test $ac_cv_header_mach_cthreads_h = yes ; then
5886                 ol_with_threads=found
5887
5888                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
5889 echo "configure:5890: checking for cthread_fork" >&5
5890 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
5891   echo $ac_n "(cached) $ac_c" 1>&6
5892 else
5893   cat > conftest.$ac_ext <<EOF
5894 #line 5895 "configure"
5895 #include "confdefs.h"
5896 /* System header to define __stub macros and hopefully few prototypes,
5897     which can conflict with char cthread_fork(); below.  */
5898 #include <assert.h>
5899 /* Override any gcc2 internal prototype to avoid an error.  */
5900 /* We use char because int might match the return type of a gcc2
5901     builtin and then its argument prototype would still apply.  */
5902 char cthread_fork();
5903
5904 int main() {
5905
5906 /* The GNU C library defines this for functions which it implements
5907     to always fail with ENOSYS.  Some functions are actually named
5908     something starting with __ and the normal name is an alias.  */
5909 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
5910 choke me
5911 #else
5912 cthread_fork();
5913 #endif
5914
5915 ; return 0; }
5916 EOF
5917 if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5918   rm -rf conftest*
5919   eval "ac_cv_func_cthread_fork=yes"
5920 else
5921   echo "configure: failed program was:" >&5
5922   cat conftest.$ac_ext >&5
5923   rm -rf conftest*
5924   eval "ac_cv_func_cthread_fork=no"
5925 fi
5926 rm -f conftest*
5927 fi
5928
5929 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
5930   echo "$ac_t""yes" 1>&6
5931   ol_link_threads=yes
5932 else
5933   echo "$ac_t""no" 1>&6
5934 fi
5935
5936
5937                 if test $ol_link_threads = no ; then
5938                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
5939 echo "configure:5940: checking for cthread_fork with -all_load" >&5
5940 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
5941   echo $ac_n "(cached) $ac_c" 1>&6
5942 else
5943   
5944                                                                 save_LIBS="$LIBS"
5945                                 LIBS="-all_load $LIBS"
5946                                 cat > conftest.$ac_ext <<EOF
5947 #line 5948 "configure"
5948 #include "confdefs.h"
5949 #include <mach/cthreads.h>
5950 int main() {
5951
5952                                         cthread_fork((void *)0, (void *)0);
5953                                         
5954 ; return 0; }
5955 EOF
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5957   rm -rf conftest*
5958   ol_cv_cthread_all_load=yes
5959 else
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   ol_cv_cthread_all_load=no
5964 fi
5965 rm -f conftest*
5966                                                                 LIBS="$save_LIBS"
5967                         
5968 fi
5969
5970 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
5971
5972                         if test $ol_cv_cthread_all_load = yes ; then
5973                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
5974                                 ol_link_threads=mach
5975                         fi
5976                 fi
5977
5978                 if test $ol_link_threads != no ; then
5979                         : check for cthread specific functionality here
5980                         cat >> confdefs.h <<\EOF
5981 #define HAVE_MACH_CTHREADS 1
5982 EOF
5983
5984                 else
5985                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
5986                 fi
5987         fi
5988
5989         if test $ol_with_threads = mach ; then
5990                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
5991         fi
5992 fi
5993
5994 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5995         -o $ol_with_threads = lwp ; then
5996
5997                 for ac_hdr in thread.h synch.h
5998 do
5999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6001 echo "configure:6002: checking for $ac_hdr" >&5
6002 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6003   echo $ac_n "(cached) $ac_c" 1>&6
6004 else
6005   cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008 #include <$ac_hdr>
6009 EOF
6010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6011 { (eval echo configure:6012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6013 if test -z "$ac_err"; then
6014   rm -rf conftest*
6015   eval "ac_cv_header_$ac_safe=yes"
6016 else
6017   echo "$ac_err" >&5
6018   echo "configure: failed program was:" >&5
6019   cat conftest.$ac_ext >&5
6020   rm -rf conftest*
6021   eval "ac_cv_header_$ac_safe=no"
6022 fi
6023 rm -f conftest*
6024 fi
6025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6026   echo "$ac_t""yes" 1>&6
6027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6028   cat >> confdefs.h <<EOF
6029 #define $ac_tr_hdr 1
6030 EOF
6031  
6032 else
6033   echo "$ac_t""no" 1>&6
6034 fi
6035 done
6036
6037         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6038                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6039 echo "configure:6040: checking for thr_create in -lthread" >&5
6040 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6041 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6042   echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6044   ac_save_LIBS="$LIBS"
6045 LIBS="-lthread  $LIBS"
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 /* Override any gcc2 internal prototype to avoid an error.  */
6050 /* We use char because int might match the return type of a gcc2
6051     builtin and then its argument prototype would still apply.  */
6052 char thr_create();
6053
6054 int main() {
6055 thr_create()
6056 ; return 0; }
6057 EOF
6058 if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6059   rm -rf conftest*
6060   eval "ac_cv_lib_$ac_lib_var=yes"
6061 else
6062   echo "configure: failed program was:" >&5
6063   cat conftest.$ac_ext >&5
6064   rm -rf conftest*
6065   eval "ac_cv_lib_$ac_lib_var=no"
6066 fi
6067 rm -f conftest*
6068 LIBS="$ac_save_LIBS"
6069
6070 fi
6071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6072   echo "$ac_t""yes" 1>&6
6073   have_thr=yes
6074 else
6075   echo "$ac_t""no" 1>&6
6076 have_thr=no
6077 fi
6078
6079
6080                 if test $have_thr = yes ; then
6081                         cat >> confdefs.h <<\EOF
6082 #define HAVE_THR 1
6083 EOF
6084
6085                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6086                         ol_link_threads=thr
6087
6088                         if test $ol_with_yielding_select = auto ; then
6089                                 ol_with_yielding_select=yes
6090                         fi
6091
6092                                                 for ac_func in \
6093                                 thr_setconcurrency \
6094                                 thr_getconcurrency \
6095                         
6096 do
6097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6098 echo "configure:6099: checking for $ac_func" >&5
6099 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6100   echo $ac_n "(cached) $ac_c" 1>&6
6101 else
6102   cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105 /* System header to define __stub macros and hopefully few prototypes,
6106     which can conflict with char $ac_func(); below.  */
6107 #include <assert.h>
6108 /* Override any gcc2 internal prototype to avoid an error.  */
6109 /* We use char because int might match the return type of a gcc2
6110     builtin and then its argument prototype would still apply.  */
6111 char $ac_func();
6112
6113 int main() {
6114
6115 /* The GNU C library defines this for functions which it implements
6116     to always fail with ENOSYS.  Some functions are actually named
6117     something starting with __ and the normal name is an alias.  */
6118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6119 choke me
6120 #else
6121 $ac_func();
6122 #endif
6123
6124 ; return 0; }
6125 EOF
6126 if { (eval echo configure:6127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6127   rm -rf conftest*
6128   eval "ac_cv_func_$ac_func=yes"
6129 else
6130   echo "configure: failed program was:" >&5
6131   cat conftest.$ac_ext >&5
6132   rm -rf conftest*
6133   eval "ac_cv_func_$ac_func=no"
6134 fi
6135 rm -f conftest*
6136 fi
6137
6138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6139   echo "$ac_t""yes" 1>&6
6140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6141   cat >> confdefs.h <<EOF
6142 #define $ac_tr_func 1
6143 EOF
6144  
6145 else
6146   echo "$ac_t""no" 1>&6
6147 fi
6148 done
6149
6150                 fi
6151         fi
6152
6153                 for ac_hdr in lwp/lwp.h
6154 do
6155 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6156 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6157 echo "configure:6158: checking for $ac_hdr" >&5
6158 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6159   echo $ac_n "(cached) $ac_c" 1>&6
6160 else
6161   cat > conftest.$ac_ext <<EOF
6162 #line 6163 "configure"
6163 #include "confdefs.h"
6164 #include <$ac_hdr>
6165 EOF
6166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6167 { (eval echo configure:6168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6169 if test -z "$ac_err"; then
6170   rm -rf conftest*
6171   eval "ac_cv_header_$ac_safe=yes"
6172 else
6173   echo "$ac_err" >&5
6174   echo "configure: failed program was:" >&5
6175   cat conftest.$ac_ext >&5
6176   rm -rf conftest*
6177   eval "ac_cv_header_$ac_safe=no"
6178 fi
6179 rm -f conftest*
6180 fi
6181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6182   echo "$ac_t""yes" 1>&6
6183     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6184   cat >> confdefs.h <<EOF
6185 #define $ac_tr_hdr 1
6186 EOF
6187  
6188 else
6189   echo "$ac_t""no" 1>&6
6190 fi
6191 done
6192
6193         if test $ac_cv_header_lwp_lwp_h = yes ; then
6194                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6195 echo "configure:6196: checking for lwp_create in -llwp" >&5
6196 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6198   echo $ac_n "(cached) $ac_c" 1>&6
6199 else
6200   ac_save_LIBS="$LIBS"
6201 LIBS="-llwp  $LIBS"
6202 cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205 /* Override any gcc2 internal prototype to avoid an error.  */
6206 /* We use char because int might match the return type of a gcc2
6207     builtin and then its argument prototype would still apply.  */
6208 char lwp_create();
6209
6210 int main() {
6211 lwp_create()
6212 ; return 0; }
6213 EOF
6214 if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6215   rm -rf conftest*
6216   eval "ac_cv_lib_$ac_lib_var=yes"
6217 else
6218   echo "configure: failed program was:" >&5
6219   cat conftest.$ac_ext >&5
6220   rm -rf conftest*
6221   eval "ac_cv_lib_$ac_lib_var=no"
6222 fi
6223 rm -f conftest*
6224 LIBS="$ac_save_LIBS"
6225
6226 fi
6227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6228   echo "$ac_t""yes" 1>&6
6229   have_lwp=yes
6230 else
6231   echo "$ac_t""no" 1>&6
6232 have_lwp=no
6233 fi
6234
6235
6236                 if test $have_lwp = yes ; then
6237                         cat >> confdefs.h <<\EOF
6238 #define HAVE_LWP 1
6239 EOF
6240
6241                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6242                         ol_link_threads=lwp
6243
6244                         if test $ol_with_yielding_select = auto ; then
6245                                 ol_with_yielding_select=no
6246                         fi
6247                 fi
6248         fi
6249 fi
6250
6251 if test $ol_with_yielding_select = yes ; then
6252         cat >> confdefs.h <<\EOF
6253 #define HAVE_YIELDING_SELECT 1
6254 EOF
6255
6256 fi
6257
6258 if test $ol_with_threads = manual ; then
6259                 ol_link_threads=yes
6260
6261         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6262
6263         for ac_hdr in pthread.h sched.h
6264 do
6265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6267 echo "configure:6268: checking for $ac_hdr" >&5
6268 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6269   echo $ac_n "(cached) $ac_c" 1>&6
6270 else
6271   cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274 #include <$ac_hdr>
6275 EOF
6276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6277 { (eval echo configure:6278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6279 if test -z "$ac_err"; then
6280   rm -rf conftest*
6281   eval "ac_cv_header_$ac_safe=yes"
6282 else
6283   echo "$ac_err" >&5
6284   echo "configure: failed program was:" >&5
6285   cat conftest.$ac_ext >&5
6286   rm -rf conftest*
6287   eval "ac_cv_header_$ac_safe=no"
6288 fi
6289 rm -f conftest*
6290 fi
6291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6292   echo "$ac_t""yes" 1>&6
6293     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6294   cat >> confdefs.h <<EOF
6295 #define $ac_tr_hdr 1
6296 EOF
6297  
6298 else
6299   echo "$ac_t""no" 1>&6
6300 fi
6301 done
6302
6303         for ac_func in sched_yield pthread_yield
6304 do
6305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6306 echo "configure:6307: checking for $ac_func" >&5
6307 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6308   echo $ac_n "(cached) $ac_c" 1>&6
6309 else
6310   cat > conftest.$ac_ext <<EOF
6311 #line 6312 "configure"
6312 #include "confdefs.h"
6313 /* System header to define __stub macros and hopefully few prototypes,
6314     which can conflict with char $ac_func(); below.  */
6315 #include <assert.h>
6316 /* Override any gcc2 internal prototype to avoid an error.  */
6317 /* We use char because int might match the return type of a gcc2
6318     builtin and then its argument prototype would still apply.  */
6319 char $ac_func();
6320
6321 int main() {
6322
6323 /* The GNU C library defines this for functions which it implements
6324     to always fail with ENOSYS.  Some functions are actually named
6325     something starting with __ and the normal name is an alias.  */
6326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6327 choke me
6328 #else
6329 $ac_func();
6330 #endif
6331
6332 ; return 0; }
6333 EOF
6334 if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6335   rm -rf conftest*
6336   eval "ac_cv_func_$ac_func=yes"
6337 else
6338   echo "configure: failed program was:" >&5
6339   cat conftest.$ac_ext >&5
6340   rm -rf conftest*
6341   eval "ac_cv_func_$ac_func=no"
6342 fi
6343 rm -f conftest*
6344 fi
6345
6346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6347   echo "$ac_t""yes" 1>&6
6348     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6349   cat >> confdefs.h <<EOF
6350 #define $ac_tr_func 1
6351 EOF
6352  
6353 else
6354   echo "$ac_t""no" 1>&6
6355 fi
6356 done
6357
6358         
6359 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
6360 echo "configure:6361: checking for LinuxThreads" >&5
6361 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6362   echo $ac_n "(cached) $ac_c" 1>&6
6363 else
6364   
6365         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
6366         if test "$res" -gt 0 ; then
6367                 ol_cv_linux_threads=yes
6368         else
6369                 ol_cv_linux_threads=no
6370         fi
6371
6372 fi
6373
6374 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6375
6376
6377         for ac_hdr in mach/cthreads.h
6378 do
6379 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6380 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6381 echo "configure:6382: checking for $ac_hdr" >&5
6382 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6383   echo $ac_n "(cached) $ac_c" 1>&6
6384 else
6385   cat > conftest.$ac_ext <<EOF
6386 #line 6387 "configure"
6387 #include "confdefs.h"
6388 #include <$ac_hdr>
6389 EOF
6390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6391 { (eval echo configure:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6393 if test -z "$ac_err"; then
6394   rm -rf conftest*
6395   eval "ac_cv_header_$ac_safe=yes"
6396 else
6397   echo "$ac_err" >&5
6398   echo "configure: failed program was:" >&5
6399   cat conftest.$ac_ext >&5
6400   rm -rf conftest*
6401   eval "ac_cv_header_$ac_safe=no"
6402 fi
6403 rm -f conftest*
6404 fi
6405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6406   echo "$ac_t""yes" 1>&6
6407     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6408   cat >> confdefs.h <<EOF
6409 #define $ac_tr_hdr 1
6410 EOF
6411  
6412 else
6413   echo "$ac_t""no" 1>&6
6414 fi
6415 done
6416
6417         for ac_hdr in lwp/lwp.h
6418 do
6419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6421 echo "configure:6422: checking for $ac_hdr" >&5
6422 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6423   echo $ac_n "(cached) $ac_c" 1>&6
6424 else
6425   cat > conftest.$ac_ext <<EOF
6426 #line 6427 "configure"
6427 #include "confdefs.h"
6428 #include <$ac_hdr>
6429 EOF
6430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6431 { (eval echo configure:6432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6433 if test -z "$ac_err"; then
6434   rm -rf conftest*
6435   eval "ac_cv_header_$ac_safe=yes"
6436 else
6437   echo "$ac_err" >&5
6438   echo "configure: failed program was:" >&5
6439   cat conftest.$ac_ext >&5
6440   rm -rf conftest*
6441   eval "ac_cv_header_$ac_safe=no"
6442 fi
6443 rm -f conftest*
6444 fi
6445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6446   echo "$ac_t""yes" 1>&6
6447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6448   cat >> confdefs.h <<EOF
6449 #define $ac_tr_hdr 1
6450 EOF
6451  
6452 else
6453   echo "$ac_t""no" 1>&6
6454 fi
6455 done
6456
6457         for ac_hdr in thread.h synch.h
6458 do
6459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6461 echo "configure:6462: checking for $ac_hdr" >&5
6462 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6463   echo $ac_n "(cached) $ac_c" 1>&6
6464 else
6465   cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6468 #include <$ac_hdr>
6469 EOF
6470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6471 { (eval echo configure:6472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6473 if test -z "$ac_err"; then
6474   rm -rf conftest*
6475   eval "ac_cv_header_$ac_safe=yes"
6476 else
6477   echo "$ac_err" >&5
6478   echo "configure: failed program was:" >&5
6479   cat conftest.$ac_ext >&5
6480   rm -rf conftest*
6481   eval "ac_cv_header_$ac_safe=no"
6482 fi
6483 rm -f conftest*
6484 fi
6485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6486   echo "$ac_t""yes" 1>&6
6487     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6488   cat >> confdefs.h <<EOF
6489 #define $ac_tr_hdr 1
6490 EOF
6491  
6492 else
6493   echo "$ac_t""no" 1>&6
6494 fi
6495 done
6496
6497 fi
6498
6499 if test $ol_link_threads != no ; then  
6500                         cat >> confdefs.h <<\EOF
6501 #define REENTRANT 1
6502 EOF
6503
6504         cat >> confdefs.h <<\EOF
6505 #define _REENTRANT 1
6506 EOF
6507
6508         cat >> confdefs.h <<\EOF
6509 #define THREAD_SAFE 1
6510 EOF
6511
6512         cat >> confdefs.h <<\EOF
6513 #define _THREAD_SAFE 1
6514 EOF
6515
6516         cat >> confdefs.h <<\EOF
6517 #define THREADSAFE 1
6518 EOF
6519
6520         cat >> confdefs.h <<\EOF
6521 #define _THREADSAFE 1
6522 EOF
6523
6524
6525                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
6526 echo "configure:6527: checking for thread specific errno" >&5
6527 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
6528   echo $ac_n "(cached) $ac_c" 1>&6
6529 else
6530   
6531                 cat > conftest.$ac_ext <<EOF
6532 #line 6533 "configure"
6533 #include "confdefs.h"
6534 #include <errno.h>
6535 int main() {
6536 int x = errno;
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   ol_cv_errno_thread_specific=yes
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   ol_cv_errno_thread_specific=no
6547 fi
6548 rm -f conftest*
6549         
6550 fi
6551
6552 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
6553
6554         if test $ol_cv_errno_thread_specific != yes ; then
6555                 LIBS="$LTHREAD_LIBS $LIBS"
6556                 LTHREAD_LIBS=""
6557         fi
6558
6559 fi  
6560
6561 if test $ol_link_threads = no ; then
6562         if test $ol_with_threads = yes ; then
6563                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
6564         fi
6565
6566         if test $ol_with_threads = auto ; then
6567                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
6568                 ol_with_threads=no
6569         fi
6570
6571         cat >> confdefs.h <<\EOF
6572 #define NO_THREADS 1
6573 EOF
6574
6575         LTHREAD_LIBS=""
6576 fi
6577
6578 if test $ol_link_threads != no ; then
6579         cat >> confdefs.h <<\EOF
6580 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
6581 EOF
6582
6583 fi
6584
6585
6586 ol_link_ldbm=no 
6587 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
6588         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
6589 echo "configure:6590: checking for DB2 library" >&5
6590 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
6591   echo $ac_n "(cached) $ac_c" 1>&6
6592 else
6593         ol_LIBS="$LIBS"
6594         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
6595 echo "configure:6596: checking for db_open in -ldb" >&5
6596 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
6597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6598   echo $ac_n "(cached) $ac_c" 1>&6
6599 else
6600   ac_save_LIBS="$LIBS"
6601 LIBS="-ldb  $LIBS"
6602 cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6605 /* Override any gcc2 internal prototype to avoid an error.  */
6606 /* We use char because int might match the return type of a gcc2
6607     builtin and then its argument prototype would still apply.  */
6608 char db_open();
6609
6610 int main() {
6611 db_open()
6612 ; return 0; }
6613 EOF
6614 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6615   rm -rf conftest*
6616   eval "ac_cv_lib_$ac_lib_var=yes"
6617 else
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_lib_$ac_lib_var=no"
6622 fi
6623 rm -f conftest*
6624 LIBS="$ac_save_LIBS"
6625
6626 fi
6627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6628   echo "$ac_t""yes" 1>&6
6629   ol_cv_lib_db2=-ldb
6630 else
6631   echo "$ac_t""no" 1>&6
6632 ol_cv_lib_db2=no
6633 fi
6634
6635         LIBS="$ol_LIBS"
6636
6637 fi
6638
6639 echo "$ac_t""$ol_cv_lib_db2" 1>&6
6640
6641 for ac_hdr in db.h
6642 do
6643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6645 echo "configure:6646: checking for $ac_hdr" >&5
6646 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6647   echo $ac_n "(cached) $ac_c" 1>&6
6648 else
6649   cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 #include <$ac_hdr>
6653 EOF
6654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6655 { (eval echo configure:6656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6657 if test -z "$ac_err"; then
6658   rm -rf conftest*
6659   eval "ac_cv_header_$ac_safe=yes"
6660 else
6661   echo "$ac_err" >&5
6662   echo "configure: failed program was:" >&5
6663   cat conftest.$ac_ext >&5
6664   rm -rf conftest*
6665   eval "ac_cv_header_$ac_safe=no"
6666 fi
6667 rm -f conftest*
6668 fi
6669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6670   echo "$ac_t""yes" 1>&6
6671     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6672   cat >> confdefs.h <<EOF
6673 #define $ac_tr_hdr 1
6674 EOF
6675  
6676 else
6677   echo "$ac_t""no" 1>&6
6678 fi
6679 done
6680
6681 if test $ac_cv_header_db_h = yes ; then
6682         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
6683 echo "configure:6684: checking if db.h is DB2" >&5
6684 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
6685   echo $ac_n "(cached) $ac_c" 1>&6
6686 else
6687   
6688                 cat > conftest.$ac_ext <<EOF
6689 #line 6690 "configure"
6690 #include "confdefs.h"
6691
6692 #                       include <db.h>
6693                         /* this check could be improved */
6694 #                       ifdef DB_VERSION_MAJOR
6695 #                               if DB_VERSION_MAJOR == 2
6696                                         __db_version_2
6697 #                               endif
6698 #                       endif
6699                 
6700 EOF
6701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6702   egrep "__db_version_2" >/dev/null 2>&1; then
6703   rm -rf conftest*
6704   ol_cv_header_db2=yes
6705 else
6706   rm -rf conftest*
6707   ol_cv_header_db2=no
6708 fi
6709 rm -f conftest*
6710
6711 fi
6712
6713 echo "$ac_t""$ol_cv_header_db2" 1>&6
6714 else
6715         ol_cv_header_db2=no
6716 fi
6717
6718
6719  
6720  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
6721 echo "configure:6722: checking for Berkeley DB2" >&5
6722 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
6723   echo $ac_n "(cached) $ac_c" 1>&6
6724 else
6725   
6726         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
6727                 ol_cv_berkeley_db2=no
6728         else
6729                 ol_cv_berkeley_db2=yes
6730         fi
6731
6732 fi
6733
6734 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
6735  if test $ol_cv_berkeley_db2 = yes ; then
6736         cat >> confdefs.h <<\EOF
6737 #define HAVE_BERKELEY_DB2 1
6738 EOF
6739
6740  fi
6741
6742
6743         if test $ol_cv_berkeley_db2 = yes ; then
6744                 ol_link_ldbm=db2
6745                 ol_with_ldbm_api=db2
6746
6747                 if test $ol_with_ldbm_type = hash ; then
6748                         cat >> confdefs.h <<\EOF
6749 #define LDBM_USE_DBHASH 1
6750 EOF
6751
6752                 else
6753                         cat >> confdefs.h <<\EOF
6754 #define LDBM_USE_DBBTREE 1
6755 EOF
6756
6757                 fi
6758
6759                                                 if test $ol_cv_lib_db2 != yes ; then
6760                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
6761                 fi
6762         fi
6763 fi
6764
6765 ol_link_bdb2=no
6766 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
6767         ol_link_bdb2=yes
6768 fi
6769
6770 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
6771         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
6772 echo "configure:6773: checking for Berkeley DB library" >&5
6773 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
6774   echo $ac_n "(cached) $ac_c" 1>&6
6775 else
6776         ol_LIBS="$LIBS"
6777         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
6778 echo "configure:6779: checking for dbopen" >&5
6779 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
6780   echo $ac_n "(cached) $ac_c" 1>&6
6781 else
6782   cat > conftest.$ac_ext <<EOF
6783 #line 6784 "configure"
6784 #include "confdefs.h"
6785 /* System header to define __stub macros and hopefully few prototypes,
6786     which can conflict with char dbopen(); below.  */
6787 #include <assert.h>
6788 /* Override any gcc2 internal prototype to avoid an error.  */
6789 /* We use char because int might match the return type of a gcc2
6790     builtin and then its argument prototype would still apply.  */
6791 char dbopen();
6792
6793 int main() {
6794
6795 /* The GNU C library defines this for functions which it implements
6796     to always fail with ENOSYS.  Some functions are actually named
6797     something starting with __ and the normal name is an alias.  */
6798 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6799 choke me
6800 #else
6801 dbopen();
6802 #endif
6803
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6807   rm -rf conftest*
6808   eval "ac_cv_func_dbopen=yes"
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   eval "ac_cv_func_dbopen=no"
6814 fi
6815 rm -f conftest*
6816 fi
6817
6818 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820   ol_cv_lib_db=yes
6821 else
6822   echo "$ac_t""no" 1>&6
6823
6824                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6825 echo "configure:6826: checking for dbopen in -ldb" >&5
6826 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6827 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6828   echo $ac_n "(cached) $ac_c" 1>&6
6829 else
6830   ac_save_LIBS="$LIBS"
6831 LIBS="-ldb  $LIBS"
6832 cat > conftest.$ac_ext <<EOF
6833 #line 6834 "configure"
6834 #include "confdefs.h"
6835 /* Override any gcc2 internal prototype to avoid an error.  */
6836 /* We use char because int might match the return type of a gcc2
6837     builtin and then its argument prototype would still apply.  */
6838 char dbopen();
6839
6840 int main() {
6841 dbopen()
6842 ; return 0; }
6843 EOF
6844 if { (eval echo configure:6845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6845   rm -rf conftest*
6846   eval "ac_cv_lib_$ac_lib_var=yes"
6847 else
6848   echo "configure: failed program was:" >&5
6849   cat conftest.$ac_ext >&5
6850   rm -rf conftest*
6851   eval "ac_cv_lib_$ac_lib_var=no"
6852 fi
6853 rm -f conftest*
6854 LIBS="$ac_save_LIBS"
6855
6856 fi
6857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6858   echo "$ac_t""yes" 1>&6
6859   ol_cv_lib_db=-ldb
6860 else
6861   echo "$ac_t""no" 1>&6
6862 ol_cv_lib_db=no
6863 fi
6864
6865         
6866 fi
6867
6868         LIBS="$ol_LIBS"
6869
6870 fi
6871
6872 echo "$ac_t""$ol_cv_lib_db" 1>&6
6873
6874
6875 for ac_hdr in db_185.h
6876 do
6877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6879 echo "configure:6880: checking for $ac_hdr" >&5
6880 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 #include <$ac_hdr>
6887 EOF
6888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6889 { (eval echo configure:6890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6891 if test -z "$ac_err"; then
6892   rm -rf conftest*
6893   eval "ac_cv_header_$ac_safe=yes"
6894 else
6895   echo "$ac_err" >&5
6896   echo "configure: failed program was:" >&5
6897   cat conftest.$ac_ext >&5
6898   rm -rf conftest*
6899   eval "ac_cv_header_$ac_safe=no"
6900 fi
6901 rm -f conftest*
6902 fi
6903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6904   echo "$ac_t""yes" 1>&6
6905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6906   cat >> confdefs.h <<EOF
6907 #define $ac_tr_hdr 1
6908 EOF
6909  
6910 else
6911   echo "$ac_t""no" 1>&6
6912 fi
6913 done
6914
6915 if test "$ol_cv_header_db2" = yes ; then
6916         
6917         ol_cv_header_db=$ac_cv_header_db_185_h
6918 else
6919         ol_cv_header_db=$ac_cv_header_db_h
6920 fi
6921
6922
6923  
6924  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
6925 echo "configure:6926: checking for Berkeley DB" >&5
6926 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
6927   echo $ac_n "(cached) $ac_c" 1>&6
6928 else
6929   
6930         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
6931                 ol_cv_berkeley_db=no
6932         else
6933                 ol_cv_berkeley_db=yes
6934         fi
6935
6936 fi
6937
6938 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
6939  if test $ol_cv_berkeley_db = yes ; then
6940         cat >> confdefs.h <<\EOF
6941 #define HAVE_BERKELEY_DB 1
6942 EOF
6943
6944  fi
6945
6946
6947         if test $ol_cv_berkeley_db = yes ; then
6948                 ol_link_ldbm=db
6949                 ol_with_ldbm_api=db
6950
6951                 if test $ol_with_ldbm_type = hash ; then
6952                         cat >> confdefs.h <<\EOF
6953 #define LDBM_USE_DBHASH 1
6954 EOF
6955
6956                 else
6957                         cat >> confdefs.h <<\EOF
6958 #define LDBM_USE_DBBTREE 1
6959 EOF
6960
6961                 fi
6962
6963                                                 if test $ol_cv_lib_db != yes ; then
6964                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
6965                 fi
6966         fi
6967 fi
6968
6969 if test $ol_with_ldbm_api = manual ; then
6970                 ol_link_ldbm=yes
6971
6972         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
6973
6974         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
6975 do
6976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6978 echo "configure:6979: checking for $ac_hdr" >&5
6979 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   cat > conftest.$ac_ext <<EOF
6983 #line 6984 "configure"
6984 #include "confdefs.h"
6985 #include <$ac_hdr>
6986 EOF
6987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6988 { (eval echo configure:6989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6990 if test -z "$ac_err"; then
6991   rm -rf conftest*
6992   eval "ac_cv_header_$ac_safe=yes"
6993 else
6994   echo "$ac_err" >&5
6995   echo "configure: failed program was:" >&5
6996   cat conftest.$ac_ext >&5
6997   rm -rf conftest*
6998   eval "ac_cv_header_$ac_safe=no"
6999 fi
7000 rm -f conftest*
7001 fi
7002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7003   echo "$ac_t""yes" 1>&6
7004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7005   cat >> confdefs.h <<EOF
7006 #define $ac_tr_hdr 1
7007 EOF
7008  
7009 else
7010   echo "$ac_t""no" 1>&6
7011 fi
7012 done
7013
7014 fi
7015
7016 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7017         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7018         ol_with_ldbm_api=none
7019 fi
7020
7021 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7022         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7023 echo "configure:7024: checking for MDBM library" >&5
7024 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7025   echo $ac_n "(cached) $ac_c" 1>&6
7026 else
7027         ol_LIBS="$LIBS"
7028         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7029 echo "configure:7030: checking for mdbm_set_chain" >&5
7030 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033   cat > conftest.$ac_ext <<EOF
7034 #line 7035 "configure"
7035 #include "confdefs.h"
7036 /* System header to define __stub macros and hopefully few prototypes,
7037     which can conflict with char mdbm_set_chain(); below.  */
7038 #include <assert.h>
7039 /* Override any gcc2 internal prototype to avoid an error.  */
7040 /* We use char because int might match the return type of a gcc2
7041     builtin and then its argument prototype would still apply.  */
7042 char mdbm_set_chain();
7043
7044 int main() {
7045
7046 /* The GNU C library defines this for functions which it implements
7047     to always fail with ENOSYS.  Some functions are actually named
7048     something starting with __ and the normal name is an alias.  */
7049 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7050 choke me
7051 #else
7052 mdbm_set_chain();
7053 #endif
7054
7055 ; return 0; }
7056 EOF
7057 if { (eval echo configure:7058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7058   rm -rf conftest*
7059   eval "ac_cv_func_mdbm_set_chain=yes"
7060 else
7061   echo "configure: failed program was:" >&5
7062   cat conftest.$ac_ext >&5
7063   rm -rf conftest*
7064   eval "ac_cv_func_mdbm_set_chain=no"
7065 fi
7066 rm -f conftest*
7067 fi
7068
7069 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7070   echo "$ac_t""yes" 1>&6
7071   ol_cv_lib_mdbm=yes
7072 else
7073   echo "$ac_t""no" 1>&6
7074
7075                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7076 echo "configure:7077: checking for mdbm_set_chain in -lmdbm" >&5
7077 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7078 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7079   echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081   ac_save_LIBS="$LIBS"
7082 LIBS="-lmdbm  $LIBS"
7083 cat > conftest.$ac_ext <<EOF
7084 #line 7085 "configure"
7085 #include "confdefs.h"
7086 /* Override any gcc2 internal prototype to avoid an error.  */
7087 /* We use char because int might match the return type of a gcc2
7088     builtin and then its argument prototype would still apply.  */
7089 char mdbm_set_chain();
7090
7091 int main() {
7092 mdbm_set_chain()
7093 ; return 0; }
7094 EOF
7095 if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7096   rm -rf conftest*
7097   eval "ac_cv_lib_$ac_lib_var=yes"
7098 else
7099   echo "configure: failed program was:" >&5
7100   cat conftest.$ac_ext >&5
7101   rm -rf conftest*
7102   eval "ac_cv_lib_$ac_lib_var=no"
7103 fi
7104 rm -f conftest*
7105 LIBS="$ac_save_LIBS"
7106
7107 fi
7108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7109   echo "$ac_t""yes" 1>&6
7110   ol_cv_lib_mdbm=-lmdbm
7111 else
7112   echo "$ac_t""no" 1>&6
7113 ol_cv_lib_mdbm=no
7114 fi
7115
7116         
7117 fi
7118
7119         LIBS="$ol_LIBS"
7120
7121 fi
7122
7123 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7124
7125
7126  for ac_hdr in mdbm.h
7127 do
7128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7130 echo "configure:7131: checking for $ac_hdr" >&5
7131 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7132   echo $ac_n "(cached) $ac_c" 1>&6
7133 else
7134   cat > conftest.$ac_ext <<EOF
7135 #line 7136 "configure"
7136 #include "confdefs.h"
7137 #include <$ac_hdr>
7138 EOF
7139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7140 { (eval echo configure:7141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7142 if test -z "$ac_err"; then
7143   rm -rf conftest*
7144   eval "ac_cv_header_$ac_safe=yes"
7145 else
7146   echo "$ac_err" >&5
7147   echo "configure: failed program was:" >&5
7148   cat conftest.$ac_ext >&5
7149   rm -rf conftest*
7150   eval "ac_cv_header_$ac_safe=no"
7151 fi
7152 rm -f conftest*
7153 fi
7154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7155   echo "$ac_t""yes" 1>&6
7156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7157   cat >> confdefs.h <<EOF
7158 #define $ac_tr_hdr 1
7159 EOF
7160  
7161 else
7162   echo "$ac_t""no" 1>&6
7163 fi
7164 done
7165
7166  echo $ac_n "checking for db""... $ac_c" 1>&6
7167 echo "configure:7168: checking for db" >&5
7168 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7169   echo $ac_n "(cached) $ac_c" 1>&6
7170 else
7171   
7172         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7173                 ol_cv_mdbm=no
7174         else
7175                 ol_cv_mdbm=yes
7176         fi
7177
7178 fi
7179
7180 echo "$ac_t""$ol_cv_mdbm" 1>&6
7181  if test $ol_cv_mdbm = yes ; then
7182         cat >> confdefs.h <<\EOF
7183 #define HAVE_MDBM 1
7184 EOF
7185
7186  fi
7187
7188
7189         if test $ol_cv_mdbm = yes ; then
7190                 ol_link_ldbm=mdbm
7191                 ol_with_ldbm_api=mdbm
7192                 if test $ol_cv_lib_mdbm != yes ; then
7193                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7194                 fi
7195         fi
7196 fi
7197
7198 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7199         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7200 echo "configure:7201: checking for GDBM library" >&5
7201 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7202   echo $ac_n "(cached) $ac_c" 1>&6
7203 else
7204         ol_LIBS="$LIBS"
7205         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7206 echo "configure:7207: checking for gdbm_open" >&5
7207 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7208   echo $ac_n "(cached) $ac_c" 1>&6
7209 else
7210   cat > conftest.$ac_ext <<EOF
7211 #line 7212 "configure"
7212 #include "confdefs.h"
7213 /* System header to define __stub macros and hopefully few prototypes,
7214     which can conflict with char gdbm_open(); below.  */
7215 #include <assert.h>
7216 /* Override any gcc2 internal prototype to avoid an error.  */
7217 /* We use char because int might match the return type of a gcc2
7218     builtin and then its argument prototype would still apply.  */
7219 char gdbm_open();
7220
7221 int main() {
7222
7223 /* The GNU C library defines this for functions which it implements
7224     to always fail with ENOSYS.  Some functions are actually named
7225     something starting with __ and the normal name is an alias.  */
7226 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7227 choke me
7228 #else
7229 gdbm_open();
7230 #endif
7231
7232 ; return 0; }
7233 EOF
7234 if { (eval echo configure:7235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7235   rm -rf conftest*
7236   eval "ac_cv_func_gdbm_open=yes"
7237 else
7238   echo "configure: failed program was:" >&5
7239   cat conftest.$ac_ext >&5
7240   rm -rf conftest*
7241   eval "ac_cv_func_gdbm_open=no"
7242 fi
7243 rm -f conftest*
7244 fi
7245
7246 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7247   echo "$ac_t""yes" 1>&6
7248   ol_cv_lib_gdbm=yes
7249 else
7250   echo "$ac_t""no" 1>&6
7251
7252                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7253 echo "configure:7254: checking for gdbm_open in -lgdbm" >&5
7254 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7255 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7256   echo $ac_n "(cached) $ac_c" 1>&6
7257 else
7258   ac_save_LIBS="$LIBS"
7259 LIBS="-lgdbm  $LIBS"
7260 cat > conftest.$ac_ext <<EOF
7261 #line 7262 "configure"
7262 #include "confdefs.h"
7263 /* Override any gcc2 internal prototype to avoid an error.  */
7264 /* We use char because int might match the return type of a gcc2
7265     builtin and then its argument prototype would still apply.  */
7266 char gdbm_open();
7267
7268 int main() {
7269 gdbm_open()
7270 ; return 0; }
7271 EOF
7272 if { (eval echo configure:7273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7273   rm -rf conftest*
7274   eval "ac_cv_lib_$ac_lib_var=yes"
7275 else
7276   echo "configure: failed program was:" >&5
7277   cat conftest.$ac_ext >&5
7278   rm -rf conftest*
7279   eval "ac_cv_lib_$ac_lib_var=no"
7280 fi
7281 rm -f conftest*
7282 LIBS="$ac_save_LIBS"
7283
7284 fi
7285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7286   echo "$ac_t""yes" 1>&6
7287   ol_cv_lib_gdbm=-lgdbm
7288 else
7289   echo "$ac_t""no" 1>&6
7290 ol_cv_lib_gdbm=no
7291 fi
7292
7293         
7294 fi
7295
7296         LIBS="$ol_LIBS"
7297
7298 fi
7299
7300 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7301
7302
7303  for ac_hdr in gdbm.h
7304 do
7305 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7306 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7307 echo "configure:7308: checking for $ac_hdr" >&5
7308 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7309   echo $ac_n "(cached) $ac_c" 1>&6
7310 else
7311   cat > conftest.$ac_ext <<EOF
7312 #line 7313 "configure"
7313 #include "confdefs.h"
7314 #include <$ac_hdr>
7315 EOF
7316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7317 { (eval echo configure:7318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7319 if test -z "$ac_err"; then
7320   rm -rf conftest*
7321   eval "ac_cv_header_$ac_safe=yes"
7322 else
7323   echo "$ac_err" >&5
7324   echo "configure: failed program was:" >&5
7325   cat conftest.$ac_ext >&5
7326   rm -rf conftest*
7327   eval "ac_cv_header_$ac_safe=no"
7328 fi
7329 rm -f conftest*
7330 fi
7331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7332   echo "$ac_t""yes" 1>&6
7333     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7334   cat >> confdefs.h <<EOF
7335 #define $ac_tr_hdr 1
7336 EOF
7337  
7338 else
7339   echo "$ac_t""no" 1>&6
7340 fi
7341 done
7342
7343  echo $ac_n "checking for db""... $ac_c" 1>&6
7344 echo "configure:7345: checking for db" >&5
7345 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7346   echo $ac_n "(cached) $ac_c" 1>&6
7347 else
7348   
7349         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7350                 ol_cv_gdbm=no
7351         else
7352                 ol_cv_gdbm=yes
7353         fi
7354
7355 fi
7356
7357 echo "$ac_t""$ol_cv_gdbm" 1>&6
7358  if test $ol_cv_gdbm = yes ; then
7359         cat >> confdefs.h <<\EOF
7360 #define HAVE_GDBM 1
7361 EOF
7362
7363  fi
7364
7365
7366         if test $ol_cv_gdbm = yes ; then
7367                 ol_link_ldbm=gdbm
7368                 ol_with_ldbm_api=gdbm
7369
7370                 if test $ol_cv_lib_gdbm != yes ; then
7371                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7372                 fi
7373         fi
7374 fi
7375
7376 if test $ol_with_ldbm_api = auto ; then
7377         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7378 elif test $ol_with_ldbm_api = ndbm ; then
7379         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7380 echo "configure:7381: checking for NDBM library" >&5
7381 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7382   echo $ac_n "(cached) $ac_c" 1>&6
7383 else
7384         ol_LIBS="$LIBS"
7385         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7386 echo "configure:7387: checking for dbm_open" >&5
7387 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7388   echo $ac_n "(cached) $ac_c" 1>&6
7389 else
7390   cat > conftest.$ac_ext <<EOF
7391 #line 7392 "configure"
7392 #include "confdefs.h"
7393 /* System header to define __stub macros and hopefully few prototypes,
7394     which can conflict with char dbm_open(); below.  */
7395 #include <assert.h>
7396 /* Override any gcc2 internal prototype to avoid an error.  */
7397 /* We use char because int might match the return type of a gcc2
7398     builtin and then its argument prototype would still apply.  */
7399 char dbm_open();
7400
7401 int main() {
7402
7403 /* The GNU C library defines this for functions which it implements
7404     to always fail with ENOSYS.  Some functions are actually named
7405     something starting with __ and the normal name is an alias.  */
7406 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7407 choke me
7408 #else
7409 dbm_open();
7410 #endif
7411
7412 ; return 0; }
7413 EOF
7414 if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7415   rm -rf conftest*
7416   eval "ac_cv_func_dbm_open=yes"
7417 else
7418   echo "configure: failed program was:" >&5
7419   cat conftest.$ac_ext >&5
7420   rm -rf conftest*
7421   eval "ac_cv_func_dbm_open=no"
7422 fi
7423 rm -f conftest*
7424 fi
7425
7426 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7427   echo "$ac_t""yes" 1>&6
7428   ol_cv_lib_ndbm=yes
7429 else
7430   echo "$ac_t""no" 1>&6
7431
7432                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7433 echo "configure:7434: checking for dbm_open in -lndbm" >&5
7434 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7435 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7436   echo $ac_n "(cached) $ac_c" 1>&6
7437 else
7438   ac_save_LIBS="$LIBS"
7439 LIBS="-lndbm  $LIBS"
7440 cat > conftest.$ac_ext <<EOF
7441 #line 7442 "configure"
7442 #include "confdefs.h"
7443 /* Override any gcc2 internal prototype to avoid an error.  */
7444 /* We use char because int might match the return type of a gcc2
7445     builtin and then its argument prototype would still apply.  */
7446 char dbm_open();
7447
7448 int main() {
7449 dbm_open()
7450 ; return 0; }
7451 EOF
7452 if { (eval echo configure:7453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7453   rm -rf conftest*
7454   eval "ac_cv_lib_$ac_lib_var=yes"
7455 else
7456   echo "configure: failed program was:" >&5
7457   cat conftest.$ac_ext >&5
7458   rm -rf conftest*
7459   eval "ac_cv_lib_$ac_lib_var=no"
7460 fi
7461 rm -f conftest*
7462 LIBS="$ac_save_LIBS"
7463
7464 fi
7465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7466   echo "$ac_t""yes" 1>&6
7467   ol_cv_lib_ndbm=-lndbm
7468 else
7469   echo "$ac_t""no" 1>&6
7470
7471                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7472 echo "configure:7473: checking for dbm_open in -ldbm" >&5
7473 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7475   echo $ac_n "(cached) $ac_c" 1>&6
7476 else
7477   ac_save_LIBS="$LIBS"
7478 LIBS="-ldbm  $LIBS"
7479 cat > conftest.$ac_ext <<EOF
7480 #line 7481 "configure"
7481 #include "confdefs.h"
7482 /* Override any gcc2 internal prototype to avoid an error.  */
7483 /* We use char because int might match the return type of a gcc2
7484     builtin and then its argument prototype would still apply.  */
7485 char dbm_open();
7486
7487 int main() {
7488 dbm_open()
7489 ; return 0; }
7490 EOF
7491 if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7492   rm -rf conftest*
7493   eval "ac_cv_lib_$ac_lib_var=yes"
7494 else
7495   echo "configure: failed program was:" >&5
7496   cat conftest.$ac_ext >&5
7497   rm -rf conftest*
7498   eval "ac_cv_lib_$ac_lib_var=no"
7499 fi
7500 rm -f conftest*
7501 LIBS="$ac_save_LIBS"
7502
7503 fi
7504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7505   echo "$ac_t""yes" 1>&6
7506   ol_cv_lib_ndbm=-ldbm
7507 else
7508   echo "$ac_t""no" 1>&6
7509 ol_cv_lib_ndbm=no
7510 fi
7511                 
7512 fi
7513
7514         
7515 fi
7516
7517         LIBS="$ol_LIBS"
7518
7519 fi
7520
7521 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
7522
7523
7524  for ac_hdr in ndbm.h
7525 do
7526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7528 echo "configure:7529: checking for $ac_hdr" >&5
7529 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7530   echo $ac_n "(cached) $ac_c" 1>&6
7531 else
7532   cat > conftest.$ac_ext <<EOF
7533 #line 7534 "configure"
7534 #include "confdefs.h"
7535 #include <$ac_hdr>
7536 EOF
7537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7538 { (eval echo configure:7539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7540 if test -z "$ac_err"; then
7541   rm -rf conftest*
7542   eval "ac_cv_header_$ac_safe=yes"
7543 else
7544   echo "$ac_err" >&5
7545   echo "configure: failed program was:" >&5
7546   cat conftest.$ac_ext >&5
7547   rm -rf conftest*
7548   eval "ac_cv_header_$ac_safe=no"
7549 fi
7550 rm -f conftest*
7551 fi
7552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7553   echo "$ac_t""yes" 1>&6
7554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7555   cat >> confdefs.h <<EOF
7556 #define $ac_tr_hdr 1
7557 EOF
7558  
7559 else
7560   echo "$ac_t""no" 1>&6
7561 fi
7562 done
7563
7564  echo $ac_n "checking for db""... $ac_c" 1>&6
7565 echo "configure:7566: checking for db" >&5
7566 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
7567   echo $ac_n "(cached) $ac_c" 1>&6
7568 else
7569   
7570         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
7571                 ol_cv_ndbm=no
7572         else
7573                 ol_cv_ndbm=yes
7574         fi
7575
7576 fi
7577
7578 echo "$ac_t""$ol_cv_ndbm" 1>&6
7579  if test $ol_cv_ndbm = yes ; then
7580         cat >> confdefs.h <<\EOF
7581 #define HAVE_NDBM 1
7582 EOF
7583
7584  fi
7585
7586
7587         if test $ol_cv_ndbm = yes ; then
7588                 ol_link_ldbm=ndbm
7589                 ol_with_ldbm_api=ndbm
7590
7591                 if test $ol_cv_lib_ndbm != yes ; then
7592                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
7593                 fi
7594         fi
7595 fi
7596
7597 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
7598         echo "configure: warning: could not find suitable LDBM backend" 1>&2
7599         if test $ol_enable_ldbm = yes ; then
7600                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
7601         fi
7602
7603         echo "configure: warning: disabling LDBM" 1>&2
7604         ol_enable_ldbm=no
7605 fi
7606
7607 if test $ol_enable_wrappers != no ; then
7608         for ac_hdr in tcpd.h
7609 do
7610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7611 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7612 echo "configure:7613: checking for $ac_hdr" >&5
7613 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7614   echo $ac_n "(cached) $ac_c" 1>&6
7615 else
7616   cat > conftest.$ac_ext <<EOF
7617 #line 7618 "configure"
7618 #include "confdefs.h"
7619 #include <$ac_hdr>
7620 EOF
7621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7622 { (eval echo configure:7623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7624 if test -z "$ac_err"; then
7625   rm -rf conftest*
7626   eval "ac_cv_header_$ac_safe=yes"
7627 else
7628   echo "$ac_err" >&5
7629   echo "configure: failed program was:" >&5
7630   cat conftest.$ac_ext >&5
7631   rm -rf conftest*
7632   eval "ac_cv_header_$ac_safe=no"
7633 fi
7634 rm -f conftest*
7635 fi
7636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7637   echo "$ac_t""yes" 1>&6
7638     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7639   cat >> confdefs.h <<EOF
7640 #define $ac_tr_hdr 1
7641 EOF
7642  
7643 else
7644   echo "$ac_t""no" 1>&6
7645 fi
7646 done
7647
7648
7649         if test $ac_cv_header_tcpd_h != yes ; then
7650                 have_wrappers=no
7651         else
7652                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
7653 echo "configure:7654: checking for main in -lwrap" >&5
7654 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
7655 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7656   echo $ac_n "(cached) $ac_c" 1>&6
7657 else
7658   ac_save_LIBS="$LIBS"
7659 LIBS="-lwrap  $LIBS"
7660 cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663
7664 int main() {
7665 main()
7666 ; return 0; }
7667 EOF
7668 if { (eval echo configure:7669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7669   rm -rf conftest*
7670   eval "ac_cv_lib_$ac_lib_var=yes"
7671 else
7672   echo "configure: failed program was:" >&5
7673   cat conftest.$ac_ext >&5
7674   rm -rf conftest*
7675   eval "ac_cv_lib_$ac_lib_var=no"
7676 fi
7677 rm -f conftest*
7678 LIBS="$ac_save_LIBS"
7679
7680 fi
7681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7682   echo "$ac_t""yes" 1>&6
7683   have_wrappers=yes
7684 else
7685   echo "$ac_t""no" 1>&6
7686 have_wrappers=no
7687 fi
7688
7689         fi
7690
7691         if test $have_wrappers = yes ; then
7692                 cat >> confdefs.h <<\EOF
7693 #define HAVE_TCPD 1
7694 EOF
7695
7696                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
7697         else
7698                 echo "configure: warning: could not find -lwrap" 1>&2
7699                 if test $ol_enable_wrappers = yes ; then
7700                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
7701                 fi
7702
7703                 echo "configure: warning: disabling wrappers support" 1>&2
7704                 ol_enable_wrappers=no
7705         fi
7706 fi
7707
7708 if test $ol_enable_syslog != no ; then
7709         echo $ac_n "checking for openlog""... $ac_c" 1>&6
7710 echo "configure:7711: checking for openlog" >&5
7711 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   cat > conftest.$ac_ext <<EOF
7715 #line 7716 "configure"
7716 #include "confdefs.h"
7717 /* System header to define __stub macros and hopefully few prototypes,
7718     which can conflict with char openlog(); below.  */
7719 #include <assert.h>
7720 /* Override any gcc2 internal prototype to avoid an error.  */
7721 /* We use char because int might match the return type of a gcc2
7722     builtin and then its argument prototype would still apply.  */
7723 char openlog();
7724
7725 int main() {
7726
7727 /* The GNU C library defines this for functions which it implements
7728     to always fail with ENOSYS.  Some functions are actually named
7729     something starting with __ and the normal name is an alias.  */
7730 #if defined (__stub_openlog) || defined (__stub___openlog)
7731 choke me
7732 #else
7733 openlog();
7734 #endif
7735
7736 ; return 0; }
7737 EOF
7738 if { (eval echo configure:7739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7739   rm -rf conftest*
7740   eval "ac_cv_func_openlog=yes"
7741 else
7742   echo "configure: failed program was:" >&5
7743   cat conftest.$ac_ext >&5
7744   rm -rf conftest*
7745   eval "ac_cv_func_openlog=no"
7746 fi
7747 rm -f conftest*
7748 fi
7749
7750 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
7751   echo "$ac_t""yes" 1>&6
7752   :
7753 else
7754   echo "$ac_t""no" 1>&6
7755 fi
7756
7757         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
7758                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
7759         fi
7760         ol_enable_syslog=$ac_cv_func_openlog
7761 fi
7762
7763 if test $ol_enable_dmalloc != no ; then
7764         for ac_hdr in dmalloc.h
7765 do
7766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7768 echo "configure:7769: checking for $ac_hdr" >&5
7769 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   cat > conftest.$ac_ext <<EOF
7773 #line 7774 "configure"
7774 #include "confdefs.h"
7775 #include <$ac_hdr>
7776 EOF
7777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7778 { (eval echo configure:7779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7780 if test -z "$ac_err"; then
7781   rm -rf conftest*
7782   eval "ac_cv_header_$ac_safe=yes"
7783 else
7784   echo "$ac_err" >&5
7785   echo "configure: failed program was:" >&5
7786   cat conftest.$ac_ext >&5
7787   rm -rf conftest*
7788   eval "ac_cv_header_$ac_safe=no"
7789 fi
7790 rm -f conftest*
7791 fi
7792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7793   echo "$ac_t""yes" 1>&6
7794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7795   cat >> confdefs.h <<EOF
7796 #define $ac_tr_hdr 1
7797 EOF
7798  
7799 else
7800   echo "$ac_t""no" 1>&6
7801 fi
7802 done
7803
7804         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
7805 echo "configure:7806: checking for dmalloc_shutdown in -ldmalloc" >&5
7806 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
7807 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7808   echo $ac_n "(cached) $ac_c" 1>&6
7809 else
7810   ac_save_LIBS="$LIBS"
7811 LIBS="-ldmalloc  $LIBS"
7812 cat > conftest.$ac_ext <<EOF
7813 #line 7814 "configure"
7814 #include "confdefs.h"
7815 /* Override any gcc2 internal prototype to avoid an error.  */
7816 /* We use char because int might match the return type of a gcc2
7817     builtin and then its argument prototype would still apply.  */
7818 char dmalloc_shutdown();
7819
7820 int main() {
7821 dmalloc_shutdown()
7822 ; return 0; }
7823 EOF
7824 if { (eval echo configure:7825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7825   rm -rf conftest*
7826   eval "ac_cv_lib_$ac_lib_var=yes"
7827 else
7828   echo "configure: failed program was:" >&5
7829   cat conftest.$ac_ext >&5
7830   rm -rf conftest*
7831   eval "ac_cv_lib_$ac_lib_var=no"
7832 fi
7833 rm -f conftest*
7834 LIBS="$ac_save_LIBS"
7835
7836 fi
7837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7838   echo "$ac_t""yes" 1>&6
7839     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7840     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7841   cat >> confdefs.h <<EOF
7842 #define $ac_tr_lib 1
7843 EOF
7844
7845   LIBS="-ldmalloc $LIBS"
7846
7847 else
7848   echo "$ac_t""no" 1>&6
7849 fi
7850
7851 fi
7852
7853 if test $ol_enable_tcl != no ; then
7854         for ac_hdr in tcl.h
7855 do
7856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7858 echo "configure:7859: checking for $ac_hdr" >&5
7859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7860   echo $ac_n "(cached) $ac_c" 1>&6
7861 else
7862   cat > conftest.$ac_ext <<EOF
7863 #line 7864 "configure"
7864 #include "confdefs.h"
7865 #include <$ac_hdr>
7866 EOF
7867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7868 { (eval echo configure:7869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7870 if test -z "$ac_err"; then
7871   rm -rf conftest*
7872   eval "ac_cv_header_$ac_safe=yes"
7873 else
7874   echo "$ac_err" >&5
7875   echo "configure: failed program was:" >&5
7876   cat conftest.$ac_ext >&5
7877   rm -rf conftest*
7878   eval "ac_cv_header_$ac_safe=no"
7879 fi
7880 rm -f conftest*
7881 fi
7882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7883   echo "$ac_t""yes" 1>&6
7884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7885   cat >> confdefs.h <<EOF
7886 #define $ac_tr_hdr 1
7887 EOF
7888  
7889 else
7890   echo "$ac_t""no" 1>&6
7891 fi
7892 done
7893
7894
7895         if test $ac_cv_header_tcl_h != yes ; then
7896                 have_tcl=no
7897         else
7898                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
7899 echo "configure:7900: checking for main in -ltcl" >&5
7900 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
7901 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7902   echo $ac_n "(cached) $ac_c" 1>&6
7903 else
7904   ac_save_LIBS="$LIBS"
7905 LIBS="-ltcl  $LIBS"
7906 cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909
7910 int main() {
7911 main()
7912 ; return 0; }
7913 EOF
7914 if { (eval echo configure:7915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7915   rm -rf conftest*
7916   eval "ac_cv_lib_$ac_lib_var=yes"
7917 else
7918   echo "configure: failed program was:" >&5
7919   cat conftest.$ac_ext >&5
7920   rm -rf conftest*
7921   eval "ac_cv_lib_$ac_lib_var=no"
7922 fi
7923 rm -f conftest*
7924 LIBS="$ac_save_LIBS"
7925
7926 fi
7927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7928   echo "$ac_t""yes" 1>&6
7929   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
7930 else
7931   echo "$ac_t""no" 1>&6
7932 have_tcl=no
7933 fi
7934
7935
7936                 if test $have_tcl != yes; then
7937                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
7938 echo "configure:7939: checking for main in -ltcl7.6" >&5
7939 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
7940 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7941   echo $ac_n "(cached) $ac_c" 1>&6
7942 else
7943   ac_save_LIBS="$LIBS"
7944 LIBS="-ltcl7.6  $LIBS"
7945 cat > conftest.$ac_ext <<EOF
7946 #line 7947 "configure"
7947 #include "confdefs.h"
7948
7949 int main() {
7950 main()
7951 ; return 0; }
7952 EOF
7953 if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7954   rm -rf conftest*
7955   eval "ac_cv_lib_$ac_lib_var=yes"
7956 else
7957   echo "configure: failed program was:" >&5
7958   cat conftest.$ac_ext >&5
7959   rm -rf conftest*
7960   eval "ac_cv_lib_$ac_lib_var=no"
7961 fi
7962 rm -f conftest*
7963 LIBS="$ac_save_LIBS"
7964
7965 fi
7966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7967   echo "$ac_t""yes" 1>&6
7968   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
7969 else
7970   echo "$ac_t""no" 1>&6
7971 have_tcl=no
7972 fi
7973
7974                 fi
7975
7976                 if test $have_tcl != yes; then
7977                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
7978 echo "configure:7979: checking for main in -ltcl8.0" >&5
7979 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
7980 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7981   echo $ac_n "(cached) $ac_c" 1>&6
7982 else
7983   ac_save_LIBS="$LIBS"
7984 LIBS="-ltcl8.0  $LIBS"
7985 cat > conftest.$ac_ext <<EOF
7986 #line 7987 "configure"
7987 #include "confdefs.h"
7988
7989 int main() {
7990 main()
7991 ; return 0; }
7992 EOF
7993 if { (eval echo configure:7994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7994   rm -rf conftest*
7995   eval "ac_cv_lib_$ac_lib_var=yes"
7996 else
7997   echo "configure: failed program was:" >&5
7998   cat conftest.$ac_ext >&5
7999   rm -rf conftest*
8000   eval "ac_cv_lib_$ac_lib_var=no"
8001 fi
8002 rm -f conftest*
8003 LIBS="$ac_save_LIBS"
8004
8005 fi
8006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8007   echo "$ac_t""yes" 1>&6
8008   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8009 else
8010   echo "$ac_t""no" 1>&6
8011 have_tcl=no
8012 fi
8013
8014                 fi
8015         fi
8016
8017         if test $have_tcl != yes ; then
8018                 echo "configure: warning: could not find -ltcl" 1>&2
8019                 if test $ol_enable_tcl = yes ; then
8020                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8021                 fi
8022
8023                 ol_enable_tcl=no
8024         fi
8025 fi
8026
8027 # ud needs termcap (should insert check here)
8028 ol_link_termcap=no
8029 for ac_hdr in termcap.h ncurses.h
8030 do
8031 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8032 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8033 echo "configure:8034: checking for $ac_hdr" >&5
8034 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8035   echo $ac_n "(cached) $ac_c" 1>&6
8036 else
8037   cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 #include <$ac_hdr>
8041 EOF
8042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8043 { (eval echo configure:8044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8045 if test -z "$ac_err"; then
8046   rm -rf conftest*
8047   eval "ac_cv_header_$ac_safe=yes"
8048 else
8049   echo "$ac_err" >&5
8050   echo "configure: failed program was:" >&5
8051   cat conftest.$ac_ext >&5
8052   rm -rf conftest*
8053   eval "ac_cv_header_$ac_safe=no"
8054 fi
8055 rm -f conftest*
8056 fi
8057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8058   echo "$ac_t""yes" 1>&6
8059     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8060   cat >> confdefs.h <<EOF
8061 #define $ac_tr_hdr 1
8062 EOF
8063  
8064 else
8065   echo "$ac_t""no" 1>&6
8066 fi
8067 done
8068
8069
8070 if test $ol_link_termcap = no ; then
8071         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8072 echo "configure:8073: checking for tputs in -ltermcap" >&5
8073 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8074 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8075   echo $ac_n "(cached) $ac_c" 1>&6
8076 else
8077   ac_save_LIBS="$LIBS"
8078 LIBS="-ltermcap  $LIBS"
8079 cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 /* Override any gcc2 internal prototype to avoid an error.  */
8083 /* We use char because int might match the return type of a gcc2
8084     builtin and then its argument prototype would still apply.  */
8085 char tputs();
8086
8087 int main() {
8088 tputs()
8089 ; return 0; }
8090 EOF
8091 if { (eval echo configure:8092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8092   rm -rf conftest*
8093   eval "ac_cv_lib_$ac_lib_var=yes"
8094 else
8095   echo "configure: failed program was:" >&5
8096   cat conftest.$ac_ext >&5
8097   rm -rf conftest*
8098   eval "ac_cv_lib_$ac_lib_var=no"
8099 fi
8100 rm -f conftest*
8101 LIBS="$ac_save_LIBS"
8102
8103 fi
8104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8105   echo "$ac_t""yes" 1>&6
8106   have_termcap=yes
8107 else
8108   echo "$ac_t""no" 1>&6
8109 have_termcap=no
8110 fi
8111
8112         if test $have_termcap = yes ; then
8113                 cat >> confdefs.h <<\EOF
8114 #define HAVE_TERMCAP 1
8115 EOF
8116
8117                 ol_link_termcap=yes
8118                 TERMCAP_LIBS=-ltermcap
8119         fi
8120 fi
8121
8122 if test $ol_link_termcap = no ; then
8123         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8124 echo "configure:8125: checking for initscr in -lncurses" >&5
8125 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8127   echo $ac_n "(cached) $ac_c" 1>&6
8128 else
8129   ac_save_LIBS="$LIBS"
8130 LIBS="-lncurses  $LIBS"
8131 cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 /* Override any gcc2 internal prototype to avoid an error.  */
8135 /* We use char because int might match the return type of a gcc2
8136     builtin and then its argument prototype would still apply.  */
8137 char initscr();
8138
8139 int main() {
8140 initscr()
8141 ; return 0; }
8142 EOF
8143 if { (eval echo configure:8144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8144   rm -rf conftest*
8145   eval "ac_cv_lib_$ac_lib_var=yes"
8146 else
8147   echo "configure: failed program was:" >&5
8148   cat conftest.$ac_ext >&5
8149   rm -rf conftest*
8150   eval "ac_cv_lib_$ac_lib_var=no"
8151 fi
8152 rm -f conftest*
8153 LIBS="$ac_save_LIBS"
8154
8155 fi
8156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8157   echo "$ac_t""yes" 1>&6
8158   have_ncurses=yes
8159 else
8160   echo "$ac_t""no" 1>&6
8161 have_ncurses=no
8162 fi
8163
8164         if test $have_ncurses = yes ; then
8165                 cat >> confdefs.h <<\EOF
8166 #define HAVE_NCURSES 1
8167 EOF
8168
8169                 ol_link_termcap=yes
8170                 TERMCAP_LIBS=-lncurses
8171         fi
8172 fi
8173
8174 if test $ol_link_termcap = no ; then
8175         cat >> confdefs.h <<\EOF
8176 #define NO_TERMCAP 1
8177 EOF
8178
8179         TERMCAP_LIBS=
8180 fi
8181
8182 ol_link_readline=no
8183 if test $ol_with_readline != no ; then
8184         for ac_hdr in readline/readline.h readline/history.h
8185 do
8186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8188 echo "configure:8189: checking for $ac_hdr" >&5
8189 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8190   echo $ac_n "(cached) $ac_c" 1>&6
8191 else
8192   cat > conftest.$ac_ext <<EOF
8193 #line 8194 "configure"
8194 #include "confdefs.h"
8195 #include <$ac_hdr>
8196 EOF
8197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8198 { (eval echo configure:8199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8200 if test -z "$ac_err"; then
8201   rm -rf conftest*
8202   eval "ac_cv_header_$ac_safe=yes"
8203 else
8204   echo "$ac_err" >&5
8205   echo "configure: failed program was:" >&5
8206   cat conftest.$ac_ext >&5
8207   rm -rf conftest*
8208   eval "ac_cv_header_$ac_safe=no"
8209 fi
8210 rm -f conftest*
8211 fi
8212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8213   echo "$ac_t""yes" 1>&6
8214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8215   cat >> confdefs.h <<EOF
8216 #define $ac_tr_hdr 1
8217 EOF
8218  
8219 else
8220   echo "$ac_t""no" 1>&6
8221 fi
8222 done
8223
8224
8225         if test $ac_cv_header_readline_readline_h = yes ; then
8226                 save_LIBS="$LIBS"
8227                 LIBS="$TERMCAP_LIBS $LIBS"
8228                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8229 echo "configure:8230: checking for readline in -lreadline" >&5
8230 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8231 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8232   echo $ac_n "(cached) $ac_c" 1>&6
8233 else
8234   ac_save_LIBS="$LIBS"
8235 LIBS="-lreadline  $LIBS"
8236 cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239 /* Override any gcc2 internal prototype to avoid an error.  */
8240 /* We use char because int might match the return type of a gcc2
8241     builtin and then its argument prototype would still apply.  */
8242 char readline();
8243
8244 int main() {
8245 readline()
8246 ; return 0; }
8247 EOF
8248 if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8249   rm -rf conftest*
8250   eval "ac_cv_lib_$ac_lib_var=yes"
8251 else
8252   echo "configure: failed program was:" >&5
8253   cat conftest.$ac_ext >&5
8254   rm -rf conftest*
8255   eval "ac_cv_lib_$ac_lib_var=no"
8256 fi
8257 rm -f conftest*
8258 LIBS="$ac_save_LIBS"
8259
8260 fi
8261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8262   echo "$ac_t""yes" 1>&6
8263   have_readline=yes
8264 else
8265   echo "$ac_t""no" 1>&6
8266 have_readline=no
8267 fi
8268
8269                 LIBS="$save_LIBS"
8270                         
8271                 if test $have_readline = yes ; then
8272                         ol_with_readline=found
8273                         ol_link_readline=yes
8274
8275                         READLINE_LIBS="-lreadline"
8276                 fi
8277         fi
8278 fi
8279
8280 if test $ol_link_readline = yes ; then
8281         cat >> confdefs.h <<\EOF
8282 #define HAVE_READLINE 1
8283 EOF
8284
8285 fi
8286
8287
8288 # FreeBSD (and others) have crypt(3) in -lcrypt
8289 if test $ol_enable_crypt != no ; then
8290         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8291 echo "configure:8292: checking for crypt" >&5
8292 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8293   echo $ac_n "(cached) $ac_c" 1>&6
8294 else
8295   cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 /* System header to define __stub macros and hopefully few prototypes,
8299     which can conflict with char crypt(); below.  */
8300 #include <assert.h>
8301 /* Override any gcc2 internal prototype to avoid an error.  */
8302 /* We use char because int might match the return type of a gcc2
8303     builtin and then its argument prototype would still apply.  */
8304 char crypt();
8305
8306 int main() {
8307
8308 /* The GNU C library defines this for functions which it implements
8309     to always fail with ENOSYS.  Some functions are actually named
8310     something starting with __ and the normal name is an alias.  */
8311 #if defined (__stub_crypt) || defined (__stub___crypt)
8312 choke me
8313 #else
8314 crypt();
8315 #endif
8316
8317 ; return 0; }
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8320   rm -rf conftest*
8321   eval "ac_cv_func_crypt=yes"
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -rf conftest*
8326   eval "ac_cv_func_crypt=no"
8327 fi
8328 rm -f conftest*
8329 fi
8330
8331 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8332   echo "$ac_t""yes" 1>&6
8333   have_crypt=yes
8334 else
8335   echo "$ac_t""no" 1>&6
8336
8337                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8338 echo "configure:8339: checking for crypt in -lcrypt" >&5
8339 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8341   echo $ac_n "(cached) $ac_c" 1>&6
8342 else
8343   ac_save_LIBS="$LIBS"
8344 LIBS="-lcrypt  $LIBS"
8345 cat > conftest.$ac_ext <<EOF
8346 #line 8347 "configure"
8347 #include "confdefs.h"
8348 /* Override any gcc2 internal prototype to avoid an error.  */
8349 /* We use char because int might match the return type of a gcc2
8350     builtin and then its argument prototype would still apply.  */
8351 char crypt();
8352
8353 int main() {
8354 crypt()
8355 ; return 0; }
8356 EOF
8357 if { (eval echo configure:8358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8358   rm -rf conftest*
8359   eval "ac_cv_lib_$ac_lib_var=yes"
8360 else
8361   echo "configure: failed program was:" >&5
8362   cat conftest.$ac_ext >&5
8363   rm -rf conftest*
8364   eval "ac_cv_lib_$ac_lib_var=no"
8365 fi
8366 rm -f conftest*
8367 LIBS="$ac_save_LIBS"
8368
8369 fi
8370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8371   echo "$ac_t""yes" 1>&6
8372   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8373                         have_crypt=yes
8374 else
8375   echo "$ac_t""no" 1>&6
8376 have_crypt=no
8377 fi
8378
8379 fi
8380
8381
8382         if test $have_crypt = yes ; then
8383                 cat >> confdefs.h <<\EOF
8384 #define HAVE_CRYPT 1
8385 EOF
8386
8387         else
8388                 echo "configure: warning: could not find crypt" 1>&2
8389                 if test $ol_enable_crypt = yes ; then
8390                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8391                 fi
8392
8393                 echo "configure: warning: disabling crypt support" 1>&2
8394                 ol_enable_crypt=no
8395         fi
8396 fi
8397
8398 # FreeBSD (and others) have setproctitle(3) in -lutil
8399 if test $ol_enable_proctitle != no ; then
8400         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8401 echo "configure:8402: checking for setproctitle" >&5
8402 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8403   echo $ac_n "(cached) $ac_c" 1>&6
8404 else
8405   cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8408 /* System header to define __stub macros and hopefully few prototypes,
8409     which can conflict with char setproctitle(); below.  */
8410 #include <assert.h>
8411 /* Override any gcc2 internal prototype to avoid an error.  */
8412 /* We use char because int might match the return type of a gcc2
8413     builtin and then its argument prototype would still apply.  */
8414 char setproctitle();
8415
8416 int main() {
8417
8418 /* The GNU C library defines this for functions which it implements
8419     to always fail with ENOSYS.  Some functions are actually named
8420     something starting with __ and the normal name is an alias.  */
8421 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8422 choke me
8423 #else
8424 setproctitle();
8425 #endif
8426
8427 ; return 0; }
8428 EOF
8429 if { (eval echo configure:8430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8430   rm -rf conftest*
8431   eval "ac_cv_func_setproctitle=yes"
8432 else
8433   echo "configure: failed program was:" >&5
8434   cat conftest.$ac_ext >&5
8435   rm -rf conftest*
8436   eval "ac_cv_func_setproctitle=no"
8437 fi
8438 rm -f conftest*
8439 fi
8440
8441 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8442   echo "$ac_t""yes" 1>&6
8443   have_setproctitle=yes
8444 else
8445   echo "$ac_t""no" 1>&6
8446
8447                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8448 echo "configure:8449: checking for setproctitle in -lutil" >&5
8449 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8450 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8451   echo $ac_n "(cached) $ac_c" 1>&6
8452 else
8453   ac_save_LIBS="$LIBS"
8454 LIBS="-lutil  $LIBS"
8455 cat > conftest.$ac_ext <<EOF
8456 #line 8457 "configure"
8457 #include "confdefs.h"
8458 /* Override any gcc2 internal prototype to avoid an error.  */
8459 /* We use char because int might match the return type of a gcc2
8460     builtin and then its argument prototype would still apply.  */
8461 char setproctitle();
8462
8463 int main() {
8464 setproctitle()
8465 ; return 0; }
8466 EOF
8467 if { (eval echo configure:8468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8468   rm -rf conftest*
8469   eval "ac_cv_lib_$ac_lib_var=yes"
8470 else
8471   echo "configure: failed program was:" >&5
8472   cat conftest.$ac_ext >&5
8473   rm -rf conftest*
8474   eval "ac_cv_lib_$ac_lib_var=no"
8475 fi
8476 rm -f conftest*
8477 LIBS="$ac_save_LIBS"
8478
8479 fi
8480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8481   echo "$ac_t""yes" 1>&6
8482   have_setproctitle=yes
8483                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8484 else
8485   echo "$ac_t""no" 1>&6
8486 have_setproctitle=no
8487                         LIBOBJS="$LIBOBJS setproctitle.o"
8488 fi
8489
8490 fi
8491
8492
8493         if test $have_setproctitle = yes ; then
8494                 cat >> confdefs.h <<\EOF
8495 #define HAVE_SETPROCTITLE 1
8496 EOF
8497
8498         fi
8499 fi
8500
8501 # test for EBCDIC
8502 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8503 echo "configure:8504: checking for EBCDIC" >&5
8504 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
8505   echo $ac_n "(cached) $ac_c" 1>&6
8506 else
8507   
8508         cat > conftest.$ac_ext <<EOF
8509 #line 8510 "configure"
8510 #include "confdefs.h"
8511
8512 #if !('M' == 0xd4)
8513 #include <__ASCII__/generate_error.h>
8514 #endif
8515
8516 EOF
8517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8518 { (eval echo configure:8519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8520 if test -z "$ac_err"; then
8521   rm -rf conftest*
8522   ol_cv_cpp_ebcdic=yes
8523 else
8524   echo "$ac_err" >&5
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   ol_cv_cpp_ebcdic=no
8529 fi
8530 rm -f conftest*
8531 fi
8532
8533 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8534 if test $ol_cv_cpp_ebcdic = yes ; then
8535         cat >> confdefs.h <<\EOF
8536 #define HAVE_EBCDIC 1
8537 EOF
8538
8539 fi
8540
8541 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8542 echo "configure:8543: checking for ANSI C header files" >&5
8543 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
8544   echo $ac_n "(cached) $ac_c" 1>&6
8545 else
8546   cat > conftest.$ac_ext <<EOF
8547 #line 8548 "configure"
8548 #include "confdefs.h"
8549 #include <stdlib.h>
8550 #include <stdarg.h>
8551 #include <string.h>
8552 #include <float.h>
8553 EOF
8554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8555 { (eval echo configure:8556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8557 if test -z "$ac_err"; then
8558   rm -rf conftest*
8559   ol_cv_header_stdc=yes
8560 else
8561   echo "$ac_err" >&5
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -rf conftest*
8565   ol_cv_header_stdc=no
8566 fi
8567 rm -f conftest*
8568
8569 if test $ol_cv_header_stdc = yes; then
8570   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8571 cat > conftest.$ac_ext <<EOF
8572 #line 8573 "configure"
8573 #include "confdefs.h"
8574 #include <string.h>
8575 EOF
8576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8577   egrep "memchr" >/dev/null 2>&1; then
8578   :
8579 else
8580   rm -rf conftest*
8581   ol_cv_header_stdc=no
8582 fi
8583 rm -f conftest*
8584
8585 fi
8586
8587 if test $ol_cv_header_stdc = yes; then
8588   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 #include <stdlib.h>
8593 EOF
8594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8595   egrep "free" >/dev/null 2>&1; then
8596   :
8597 else
8598   rm -rf conftest*
8599   ol_cv_header_stdc=no
8600 fi
8601 rm -f conftest*
8602
8603 fi
8604
8605 if test $ol_cv_header_stdc = yes; then
8606   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8607 if test "$cross_compiling" = yes; then
8608   :
8609 else
8610   cat > conftest.$ac_ext <<EOF
8611 #line 8612 "configure"
8612 #include "confdefs.h"
8613 #include <ctype.h>
8614 #ifndef HAVE_EBCDIC
8615 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8616 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8617 #else
8618 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8619                 || ('j' <= (c) && (c) <= 'r') \
8620                 || ('s' <= (c) && (c) <= 'z'))
8621 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8622 #endif
8623 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8624 int main () { int i; for (i = 0; i < 256; i++)
8625 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8626 exit (0); }
8627
8628 EOF
8629 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8630 then
8631   :
8632 else
8633   echo "configure: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   rm -fr conftest*
8636   ol_cv_header_stdc=no
8637 fi
8638 rm -fr conftest*
8639 fi
8640
8641 fi
8642 fi
8643
8644 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8645 if test $ol_cv_header_stdc = yes; then
8646   cat >> confdefs.h <<\EOF
8647 #define STDC_HEADERS 1
8648 EOF
8649
8650 fi
8651 ac_cv_header_stdc=disable
8652
8653
8654 if test $ol_cv_header_stdc != yes; then
8655         echo "configure: warning: could not Standard C compliant headers" 1>&2
8656 fi
8657
8658 ac_header_dirent=no
8659 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8660 do
8661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8662 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8663 echo "configure:8664: checking for $ac_hdr that defines DIR" >&5
8664 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 #include <sys/types.h>
8671 #include <$ac_hdr>
8672 int main() {
8673 DIR *dirp = 0;
8674 ; return 0; }
8675 EOF
8676 if { (eval echo configure:8677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8677   rm -rf conftest*
8678   eval "ac_cv_header_dirent_$ac_safe=yes"
8679 else
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   eval "ac_cv_header_dirent_$ac_safe=no"
8684 fi
8685 rm -f conftest*
8686 fi
8687 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8688   echo "$ac_t""yes" 1>&6
8689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8690   cat >> confdefs.h <<EOF
8691 #define $ac_tr_hdr 1
8692 EOF
8693  ac_header_dirent=$ac_hdr; break
8694 else
8695   echo "$ac_t""no" 1>&6
8696 fi
8697 done
8698 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8699 if test $ac_header_dirent = dirent.h; then
8700 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8701 echo "configure:8702: checking for opendir in -ldir" >&5
8702 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
8703 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8704   echo $ac_n "(cached) $ac_c" 1>&6
8705 else
8706   ac_save_LIBS="$LIBS"
8707 LIBS="-ldir  $LIBS"
8708 cat > conftest.$ac_ext <<EOF
8709 #line 8710 "configure"
8710 #include "confdefs.h"
8711 /* Override any gcc2 internal prototype to avoid an error.  */
8712 /* We use char because int might match the return type of a gcc2
8713     builtin and then its argument prototype would still apply.  */
8714 char opendir();
8715
8716 int main() {
8717 opendir()
8718 ; return 0; }
8719 EOF
8720 if { (eval echo configure:8721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8721   rm -rf conftest*
8722   eval "ac_cv_lib_$ac_lib_var=yes"
8723 else
8724   echo "configure: failed program was:" >&5
8725   cat conftest.$ac_ext >&5
8726   rm -rf conftest*
8727   eval "ac_cv_lib_$ac_lib_var=no"
8728 fi
8729 rm -f conftest*
8730 LIBS="$ac_save_LIBS"
8731
8732 fi
8733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8734   echo "$ac_t""yes" 1>&6
8735   LIBS="$LIBS -ldir"
8736 else
8737   echo "$ac_t""no" 1>&6
8738 fi
8739
8740 else
8741 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8742 echo "configure:8743: checking for opendir in -lx" >&5
8743 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
8744 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8745   echo $ac_n "(cached) $ac_c" 1>&6
8746 else
8747   ac_save_LIBS="$LIBS"
8748 LIBS="-lx  $LIBS"
8749 cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752 /* Override any gcc2 internal prototype to avoid an error.  */
8753 /* We use char because int might match the return type of a gcc2
8754     builtin and then its argument prototype would still apply.  */
8755 char opendir();
8756
8757 int main() {
8758 opendir()
8759 ; return 0; }
8760 EOF
8761 if { (eval echo configure:8762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8762   rm -rf conftest*
8763   eval "ac_cv_lib_$ac_lib_var=yes"
8764 else
8765   echo "configure: failed program was:" >&5
8766   cat conftest.$ac_ext >&5
8767   rm -rf conftest*
8768   eval "ac_cv_lib_$ac_lib_var=no"
8769 fi
8770 rm -f conftest*
8771 LIBS="$ac_save_LIBS"
8772
8773 fi
8774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8775   echo "$ac_t""yes" 1>&6
8776   LIBS="$LIBS -lx"
8777 else
8778   echo "$ac_t""no" 1>&6
8779 fi
8780
8781 fi
8782
8783 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8784 echo "configure:8785: checking for sys/wait.h that is POSIX.1 compatible" >&5
8785 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
8786   echo $ac_n "(cached) $ac_c" 1>&6
8787 else
8788   cat > conftest.$ac_ext <<EOF
8789 #line 8790 "configure"
8790 #include "confdefs.h"
8791 #include <sys/types.h>
8792 #include <sys/wait.h>
8793 #ifndef WEXITSTATUS
8794 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8795 #endif
8796 #ifndef WIFEXITED
8797 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8798 #endif
8799 int main() {
8800 int s;
8801 wait (&s);
8802 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8803 ; return 0; }
8804 EOF
8805 if { (eval echo configure:8806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8806   rm -rf conftest*
8807   ac_cv_header_sys_wait_h=yes
8808 else
8809   echo "configure: failed program was:" >&5
8810   cat conftest.$ac_ext >&5
8811   rm -rf conftest*
8812   ac_cv_header_sys_wait_h=no
8813 fi
8814 rm -f conftest*
8815 fi
8816
8817 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8818 if test $ac_cv_header_sys_wait_h = yes; then
8819   cat >> confdefs.h <<\EOF
8820 #define HAVE_SYS_WAIT_H 1
8821 EOF
8822
8823 fi
8824
8825 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8826 echo "configure:8827: checking POSIX termios" >&5
8827 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
8828   echo $ac_n "(cached) $ac_c" 1>&6
8829 else
8830   cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833 #include <sys/types.h>
8834 #include <unistd.h>
8835 #include <termios.h>
8836 int main() {
8837 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8838    tcgetattr(0, 0);
8839 ; return 0; }
8840 EOF
8841 if { (eval echo configure:8842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8842   rm -rf conftest*
8843   am_cv_sys_posix_termios=yes
8844 else
8845   echo "configure: failed program was:" >&5
8846   cat conftest.$ac_ext >&5
8847   rm -rf conftest*
8848   am_cv_sys_posix_termios=no
8849 fi
8850 rm -f conftest*
8851 fi
8852
8853 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8854
8855
8856  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8857 echo "configure:8858: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8858 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8862
8863   gwinsz_in_termios_h=no
8864   if test $am_cv_sys_posix_termios = yes; then
8865     cat > conftest.$ac_ext <<EOF
8866 #line 8867 "configure"
8867 #include "confdefs.h"
8868 #include <sys/types.h>
8869 #     include <termios.h>
8870 #     ifdef TIOCGWINSZ
8871         yes
8872 #     endif
8873     
8874 EOF
8875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8876   egrep "yes" >/dev/null 2>&1; then
8877   rm -rf conftest*
8878   gwinsz_in_termios_h=yes
8879 fi
8880 rm -f conftest*
8881
8882   fi
8883
8884   if test $gwinsz_in_termios_h = no; then
8885     cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8888 #include <sys/types.h>
8889 #     include <sys/ioctl.h>
8890 #     ifdef TIOCGWINSZ
8891         yes
8892 #     endif
8893     
8894 EOF
8895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8896   egrep "yes" >/dev/null 2>&1; then
8897   rm -rf conftest*
8898   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8899 fi
8900 rm -f conftest*
8901
8902   fi
8903   
8904 fi
8905
8906 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8907   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8908     cat >> confdefs.h <<\EOF
8909 #define GWINSZ_IN_SYS_IOCTL 1
8910 EOF
8911
8912   fi
8913
8914 if test $am_cv_sys_posix_termios = yes ; then
8915         cat >> confdefs.h <<\EOF
8916 #define HAVE_POSIX_TERMIOS 1
8917 EOF
8918
8919 fi
8920
8921 for ac_hdr in \
8922         arpa/inet.h             \
8923         arpa/nameser.h  \
8924         assert.h                \
8925         crypt.h                 \
8926         errno.h                 \
8927         fcntl.h                 \
8928         filio.h                 \
8929         getopt.h                \
8930         grp.h                   \
8931         libutil.h               \
8932         limits.h                \
8933         locale.h                \
8934         malloc.h                \
8935         memory.h                \
8936         regex.h                 \
8937         psap.h                  \
8938         pwd.h                   \
8939         resolv.h                \
8940         sgtty.h                 \
8941         stdarg.h                \
8942         stddef.h                \
8943         string.h                \
8944         strings.h               \
8945         sysexits.h              \
8946         sys/file.h              \
8947         sys/filio.h             \
8948         sys/errno.h             \
8949         sys/ioctl.h             \
8950         sys/param.h             \
8951         sys/resource.h  \
8952         sys/socket.h    \
8953         sys/syslog.h    \
8954         sys/time.h              \
8955         sys/types.h             \
8956         syslog.h                \
8957         termios.h               \
8958         unistd.h                \
8959
8960 do
8961 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8962 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8963 echo "configure:8964: checking for $ac_hdr" >&5
8964 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8965   echo $ac_n "(cached) $ac_c" 1>&6
8966 else
8967   cat > conftest.$ac_ext <<EOF
8968 #line 8969 "configure"
8969 #include "confdefs.h"
8970 #include <$ac_hdr>
8971 EOF
8972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8973 { (eval echo configure:8974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8975 if test -z "$ac_err"; then
8976   rm -rf conftest*
8977   eval "ac_cv_header_$ac_safe=yes"
8978 else
8979   echo "$ac_err" >&5
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -rf conftest*
8983   eval "ac_cv_header_$ac_safe=no"
8984 fi
8985 rm -f conftest*
8986 fi
8987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8988   echo "$ac_t""yes" 1>&6
8989     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8990   cat >> confdefs.h <<EOF
8991 #define $ac_tr_hdr 1
8992 EOF
8993  
8994 else
8995   echo "$ac_t""no" 1>&6
8996 fi
8997 done
8998
8999
9000 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9001 echo "configure:9002: checking for uid_t in sys/types.h" >&5
9002 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9003   echo $ac_n "(cached) $ac_c" 1>&6
9004 else
9005   cat > conftest.$ac_ext <<EOF
9006 #line 9007 "configure"
9007 #include "confdefs.h"
9008 #include <sys/types.h>
9009 EOF
9010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9011   egrep "uid_t" >/dev/null 2>&1; then
9012   rm -rf conftest*
9013   ac_cv_type_uid_t=yes
9014 else
9015   rm -rf conftest*
9016   ac_cv_type_uid_t=no
9017 fi
9018 rm -f conftest*
9019
9020 fi
9021
9022 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9023 if test $ac_cv_type_uid_t = no; then
9024   cat >> confdefs.h <<\EOF
9025 #define uid_t int
9026 EOF
9027
9028   cat >> confdefs.h <<\EOF
9029 #define gid_t int
9030 EOF
9031
9032 fi
9033
9034 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9035 echo "configure:9036: checking type of array argument to getgroups" >&5
9036 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9037   echo $ac_n "(cached) $ac_c" 1>&6
9038 else
9039   if test "$cross_compiling" = yes; then
9040   ac_cv_type_getgroups=cross
9041 else
9042   cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045
9046 /* Thanks to Mike Rendell for this test.  */
9047 #include <sys/types.h>
9048 #define NGID 256
9049 #undef MAX
9050 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9051 main()
9052 {
9053   gid_t gidset[NGID];
9054   int i, n;
9055   union { gid_t gval; long lval; }  val;
9056
9057   val.lval = -1;
9058   for (i = 0; i < NGID; i++)
9059     gidset[i] = val.gval;
9060   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9061                  gidset);
9062   /* Exit non-zero if getgroups seems to require an array of ints.  This
9063      happens when gid_t is short but getgroups modifies an array of ints.  */
9064   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9065 }
9066
9067 EOF
9068 if { (eval echo configure:9069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9069 then
9070     ac_cv_type_getgroups=gid_t
9071 else
9072   echo "configure: failed program was:" >&5
9073   cat conftest.$ac_ext >&5
9074   rm -fr conftest*
9075   ac_cv_type_getgroups=int
9076 fi
9077 rm -fr conftest*
9078 fi
9079
9080 if test $ac_cv_type_getgroups = cross; then
9081         cat > conftest.$ac_ext <<EOF
9082 #line 9083 "configure"
9083 #include "confdefs.h"
9084 #include <unistd.h>
9085 EOF
9086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9087   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9088   rm -rf conftest*
9089   ac_cv_type_getgroups=gid_t
9090 else
9091   rm -rf conftest*
9092   ac_cv_type_getgroups=int
9093 fi
9094 rm -f conftest*
9095
9096 fi
9097 fi
9098
9099 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9100 cat >> confdefs.h <<EOF
9101 #define GETGROUPS_T $ac_cv_type_getgroups
9102 EOF
9103
9104  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9105 echo "configure:9106: checking for ANSI C header files" >&5
9106 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109   cat > conftest.$ac_ext <<EOF
9110 #line 9111 "configure"
9111 #include "confdefs.h"
9112 #include <stdlib.h>
9113 #include <stdarg.h>
9114 #include <string.h>
9115 #include <float.h>
9116 EOF
9117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9118 { (eval echo configure:9119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9120 if test -z "$ac_err"; then
9121   rm -rf conftest*
9122   ac_cv_header_stdc=yes
9123 else
9124   echo "$ac_err" >&5
9125   echo "configure: failed program was:" >&5
9126   cat conftest.$ac_ext >&5
9127   rm -rf conftest*
9128   ac_cv_header_stdc=no
9129 fi
9130 rm -f conftest*
9131
9132 if test $ac_cv_header_stdc = yes; then
9133   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9134 cat > conftest.$ac_ext <<EOF
9135 #line 9136 "configure"
9136 #include "confdefs.h"
9137 #include <string.h>
9138 EOF
9139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9140   egrep "memchr" >/dev/null 2>&1; then
9141   :
9142 else
9143   rm -rf conftest*
9144   ac_cv_header_stdc=no
9145 fi
9146 rm -f conftest*
9147
9148 fi
9149
9150 if test $ac_cv_header_stdc = yes; then
9151   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9152 cat > conftest.$ac_ext <<EOF
9153 #line 9154 "configure"
9154 #include "confdefs.h"
9155 #include <stdlib.h>
9156 EOF
9157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9158   egrep "free" >/dev/null 2>&1; then
9159   :
9160 else
9161   rm -rf conftest*
9162   ac_cv_header_stdc=no
9163 fi
9164 rm -f conftest*
9165
9166 fi
9167
9168 if test $ac_cv_header_stdc = yes; then
9169   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9170 if test "$cross_compiling" = yes; then
9171   :
9172 else
9173   cat > conftest.$ac_ext <<EOF
9174 #line 9175 "configure"
9175 #include "confdefs.h"
9176 #include <ctype.h>
9177 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9178 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9179 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9180 int main () { int i; for (i = 0; i < 256; i++)
9181 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9182 exit (0); }
9183
9184 EOF
9185 if { (eval echo configure:9186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9186 then
9187   :
9188 else
9189   echo "configure: failed program was:" >&5
9190   cat conftest.$ac_ext >&5
9191   rm -fr conftest*
9192   ac_cv_header_stdc=no
9193 fi
9194 rm -fr conftest*
9195 fi
9196
9197 fi
9198 fi
9199
9200 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9201 if test $ac_cv_header_stdc = yes; then
9202   cat >> confdefs.h <<\EOF
9203 #define STDC_HEADERS 1
9204 EOF
9205
9206 fi
9207
9208 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9209 echo "configure:9210: checking for mode_t" >&5
9210 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9211   echo $ac_n "(cached) $ac_c" 1>&6
9212 else
9213   cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 #include <sys/types.h>
9217 #if STDC_HEADERS
9218 #include <stdlib.h>
9219 #include <stddef.h>
9220 #endif
9221 EOF
9222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9223   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9224   rm -rf conftest*
9225   ac_cv_type_mode_t=yes
9226 else
9227   rm -rf conftest*
9228   ac_cv_type_mode_t=no
9229 fi
9230 rm -f conftest*
9231
9232 fi
9233 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9234 if test $ac_cv_type_mode_t = no; then
9235   cat >> confdefs.h <<\EOF
9236 #define mode_t int
9237 EOF
9238
9239 fi
9240
9241 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9242 echo "configure:9243: checking for off_t" >&5
9243 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9244   echo $ac_n "(cached) $ac_c" 1>&6
9245 else
9246   cat > conftest.$ac_ext <<EOF
9247 #line 9248 "configure"
9248 #include "confdefs.h"
9249 #include <sys/types.h>
9250 #if STDC_HEADERS
9251 #include <stdlib.h>
9252 #include <stddef.h>
9253 #endif
9254 EOF
9255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9256   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9257   rm -rf conftest*
9258   ac_cv_type_off_t=yes
9259 else
9260   rm -rf conftest*
9261   ac_cv_type_off_t=no
9262 fi
9263 rm -f conftest*
9264
9265 fi
9266 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9267 if test $ac_cv_type_off_t = no; then
9268   cat >> confdefs.h <<\EOF
9269 #define off_t long
9270 EOF
9271
9272 fi
9273
9274 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9275 echo "configure:9276: checking for pid_t" >&5
9276 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282 #include <sys/types.h>
9283 #if STDC_HEADERS
9284 #include <stdlib.h>
9285 #include <stddef.h>
9286 #endif
9287 EOF
9288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9289   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9290   rm -rf conftest*
9291   ac_cv_type_pid_t=yes
9292 else
9293   rm -rf conftest*
9294   ac_cv_type_pid_t=no
9295 fi
9296 rm -f conftest*
9297
9298 fi
9299 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9300 if test $ac_cv_type_pid_t = no; then
9301   cat >> confdefs.h <<\EOF
9302 #define pid_t int
9303 EOF
9304
9305 fi
9306
9307 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9308 echo "configure:9309: checking for ptrdiff_t" >&5
9309 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9310   echo $ac_n "(cached) $ac_c" 1>&6
9311 else
9312   cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315 #include <stddef.h>
9316 int main() {
9317 ptrdiff_t p
9318 ; return 0; }
9319 EOF
9320 if { (eval echo configure:9321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9321   rm -rf conftest*
9322   am_cv_type_ptrdiff_t=yes
9323 else
9324   echo "configure: failed program was:" >&5
9325   cat conftest.$ac_ext >&5
9326   rm -rf conftest*
9327   am_cv_type_ptrdiff_t=no
9328 fi
9329 rm -f conftest*
9330 fi
9331
9332 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9333    if test $am_cv_type_ptrdiff_t = yes; then
9334      cat >> confdefs.h <<\EOF
9335 #define HAVE_PTRDIFF_T 1
9336 EOF
9337
9338    fi
9339
9340 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9341 echo "configure:9342: checking return type of signal handlers" >&5
9342 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9343   echo $ac_n "(cached) $ac_c" 1>&6
9344 else
9345   cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348 #include <sys/types.h>
9349 #include <signal.h>
9350 #ifdef signal
9351 #undef signal
9352 #endif
9353 #ifdef __cplusplus
9354 extern "C" void (*signal (int, void (*)(int)))(int);
9355 #else
9356 void (*signal ()) ();
9357 #endif
9358
9359 int main() {
9360 int i;
9361 ; return 0; }
9362 EOF
9363 if { (eval echo configure:9364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9364   rm -rf conftest*
9365   ac_cv_type_signal=void
9366 else
9367   echo "configure: failed program was:" >&5
9368   cat conftest.$ac_ext >&5
9369   rm -rf conftest*
9370   ac_cv_type_signal=int
9371 fi
9372 rm -f conftest*
9373 fi
9374
9375 echo "$ac_t""$ac_cv_type_signal" 1>&6
9376 cat >> confdefs.h <<EOF
9377 #define RETSIGTYPE $ac_cv_type_signal
9378 EOF
9379
9380
9381 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9382 echo "configure:9383: checking for sig_atomic_t" >&5
9383 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9384   echo $ac_n "(cached) $ac_c" 1>&6
9385 else
9386   cat > conftest.$ac_ext <<EOF
9387 #line 9388 "configure"
9388 #include "confdefs.h"
9389 #include <signal.h>
9390 int main() {
9391 sig_atomic_t atomic;
9392 ; return 0; }
9393 EOF
9394 if { (eval echo configure:9395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9395   rm -rf conftest*
9396   ol_cv_type_sig_atomic_t=yes
9397 else
9398   echo "configure: failed program was:" >&5
9399   cat conftest.$ac_ext >&5
9400   rm -rf conftest*
9401   ol_cv_type_sig_atomic_t=no
9402 fi
9403 rm -f conftest*
9404 fi
9405
9406 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9407   if test $ol_cv_type_sig_atomic_t = no; then
9408     cat >> confdefs.h <<\EOF
9409 #define sig_atomic_t int
9410 EOF
9411
9412   fi
9413  
9414 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9415 echo "configure:9416: checking for size_t" >&5
9416 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9417   echo $ac_n "(cached) $ac_c" 1>&6
9418 else
9419   cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422 #include <sys/types.h>
9423 #if STDC_HEADERS
9424 #include <stdlib.h>
9425 #include <stddef.h>
9426 #endif
9427 EOF
9428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9429   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9430   rm -rf conftest*
9431   ac_cv_type_size_t=yes
9432 else
9433   rm -rf conftest*
9434   ac_cv_type_size_t=no
9435 fi
9436 rm -f conftest*
9437
9438 fi
9439 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9440 if test $ac_cv_type_size_t = no; then
9441   cat >> confdefs.h <<\EOF
9442 #define size_t unsigned
9443 EOF
9444
9445 fi
9446
9447 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9448 echo "configure:9449: checking for st_blksize in struct stat" >&5
9449 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9450   echo $ac_n "(cached) $ac_c" 1>&6
9451 else
9452   cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 #include <sys/types.h>
9456 #include <sys/stat.h>
9457 int main() {
9458 struct stat s; s.st_blksize;
9459 ; return 0; }
9460 EOF
9461 if { (eval echo configure:9462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9462   rm -rf conftest*
9463   ac_cv_struct_st_blksize=yes
9464 else
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -rf conftest*
9468   ac_cv_struct_st_blksize=no
9469 fi
9470 rm -f conftest*
9471 fi
9472
9473 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9474 if test $ac_cv_struct_st_blksize = yes; then
9475   cat >> confdefs.h <<\EOF
9476 #define HAVE_ST_BLKSIZE 1
9477 EOF
9478
9479 fi
9480
9481 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9482 echo "configure:9483: checking whether time.h and sys/time.h may both be included" >&5
9483 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9484   echo $ac_n "(cached) $ac_c" 1>&6
9485 else
9486   cat > conftest.$ac_ext <<EOF
9487 #line 9488 "configure"
9488 #include "confdefs.h"
9489 #include <sys/types.h>
9490 #include <sys/time.h>
9491 #include <time.h>
9492 int main() {
9493 struct tm *tp;
9494 ; return 0; }
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9497   rm -rf conftest*
9498   ac_cv_header_time=yes
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -rf conftest*
9503   ac_cv_header_time=no
9504 fi
9505 rm -f conftest*
9506 fi
9507
9508 echo "$ac_t""$ac_cv_header_time" 1>&6
9509 if test $ac_cv_header_time = yes; then
9510   cat >> confdefs.h <<\EOF
9511 #define TIME_WITH_SYS_TIME 1
9512 EOF
9513
9514 fi
9515
9516 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
9517 echo "configure:9518: checking whether struct tm is in sys/time.h or time.h" >&5
9518 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
9519   echo $ac_n "(cached) $ac_c" 1>&6
9520 else
9521   cat > conftest.$ac_ext <<EOF
9522 #line 9523 "configure"
9523 #include "confdefs.h"
9524 #include <sys/types.h>
9525 #include <time.h>
9526 int main() {
9527 struct tm *tp; tp->tm_sec;
9528 ; return 0; }
9529 EOF
9530 if { (eval echo configure:9531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9531   rm -rf conftest*
9532   ac_cv_struct_tm=time.h
9533 else
9534   echo "configure: failed program was:" >&5
9535   cat conftest.$ac_ext >&5
9536   rm -rf conftest*
9537   ac_cv_struct_tm=sys/time.h
9538 fi
9539 rm -f conftest*
9540 fi
9541
9542 echo "$ac_t""$ac_cv_struct_tm" 1>&6
9543 if test $ac_cv_struct_tm = sys/time.h; then
9544   cat >> confdefs.h <<\EOF
9545 #define TM_IN_SYS_TIME 1
9546 EOF
9547
9548 fi
9549
9550 # test for pw_gecos in struct passwd
9551 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
9552 echo "configure:9553: checking struct passwd for pw_gecos" >&5
9553 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
9554   echo $ac_n "(cached) $ac_c" 1>&6
9555 else
9556   
9557         cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 #include <pwd.h>
9561 int main() {
9562
9563         struct passwd pwd;
9564         pwd.pw_gecos = pwd.pw_name;
9565
9566 ; return 0; }
9567 EOF
9568 if { (eval echo configure:9569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9569   rm -rf conftest*
9570   ol_cv_struct_passwd_pw_gecos=yes
9571 else
9572   echo "configure: failed program was:" >&5
9573   cat conftest.$ac_ext >&5
9574   rm -rf conftest*
9575   ol_cv_struct_passwd_pw_gecos=no
9576 fi
9577 rm -f conftest*
9578 fi
9579
9580 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
9581 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
9582         cat >> confdefs.h <<\EOF
9583 #define HAVE_PW_GECOS 1
9584 EOF
9585
9586 fi
9587
9588
9589
9590 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
9591 echo "configure:9592: checking if toupper() requires islower()" >&5
9592 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
9593   echo $ac_n "(cached) $ac_c" 1>&6
9594 else
9595   
9596         if test "$cross_compiling" = yes; then
9597   ol_cv_c_upper_lower=safe
9598 else
9599   cat > conftest.$ac_ext <<EOF
9600 #line 9601 "configure"
9601 #include "confdefs.h"
9602
9603 #include <ctype.h>
9604 main()
9605 {
9606         if ('C' == toupper('C'))
9607                 exit(0);
9608         else
9609                 exit(1);
9610 }
9611 EOF
9612 if { (eval echo configure:9613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9613 then
9614   ol_cv_c_upper_lower=no
9615 else
9616   echo "configure: failed program was:" >&5
9617   cat conftest.$ac_ext >&5
9618   rm -fr conftest*
9619   ol_cv_c_upper_lower=yes
9620 fi
9621 rm -fr conftest*
9622 fi
9623
9624 fi
9625
9626 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
9627 if test $ol_cv_c_upper_lower != no ; then
9628         cat >> confdefs.h <<\EOF
9629 #define C_UPPER_LOWER 1
9630 EOF
9631
9632 fi
9633
9634 echo $ac_n "checking for working const""... $ac_c" 1>&6
9635 echo "configure:9636: checking for working const" >&5
9636 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
9637   echo $ac_n "(cached) $ac_c" 1>&6
9638 else
9639   cat > conftest.$ac_ext <<EOF
9640 #line 9641 "configure"
9641 #include "confdefs.h"
9642
9643 int main() {
9644
9645 /* Ultrix mips cc rejects this.  */
9646 typedef int charset[2]; const charset x;
9647 /* SunOS 4.1.1 cc rejects this.  */
9648 char const *const *ccp;
9649 char **p;
9650 /* NEC SVR4.0.2 mips cc rejects this.  */
9651 struct point {int x, y;};
9652 static struct point const zero = {0,0};
9653 /* AIX XL C 1.02.0.0 rejects this.
9654    It does not let you subtract one const X* pointer from another in an arm
9655    of an if-expression whose if-part is not a constant expression */
9656 const char *g = "string";
9657 ccp = &g + (g ? g-g : 0);
9658 /* HPUX 7.0 cc rejects these. */
9659 ++ccp;
9660 p = (char**) ccp;
9661 ccp = (char const *const *) p;
9662 { /* SCO 3.2v4 cc rejects this.  */
9663   char *t;
9664   char const *s = 0 ? (char *) 0 : (char const *) 0;
9665
9666   *t++ = 0;
9667 }
9668 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9669   int x[] = {25, 17};
9670   const int *foo = &x[0];
9671   ++foo;
9672 }
9673 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9674   typedef const int *iptr;
9675   iptr p = 0;
9676   ++p;
9677 }
9678 { /* AIX XL C 1.02.0.0 rejects this saying
9679      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9680   struct s { int j; const int *ap[3]; };
9681   struct s *b; b->j = 5;
9682 }
9683 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9684   const int foo = 10;
9685 }
9686
9687 ; return 0; }
9688 EOF
9689 if { (eval echo configure:9690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9690   rm -rf conftest*
9691   ac_cv_c_const=yes
9692 else
9693   echo "configure: failed program was:" >&5
9694   cat conftest.$ac_ext >&5
9695   rm -rf conftest*
9696   ac_cv_c_const=no
9697 fi
9698 rm -f conftest*
9699 fi
9700
9701 echo "$ac_t""$ac_cv_c_const" 1>&6
9702 if test $ac_cv_c_const = no; then
9703   cat >> confdefs.h <<\EOF
9704 #define const 
9705 EOF
9706
9707 fi
9708
9709 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
9710 echo "configure:9711: checking if compiler understands volatile" >&5
9711 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
9712   echo $ac_n "(cached) $ac_c" 1>&6
9713 else
9714   cat > conftest.$ac_ext <<EOF
9715 #line 9716 "configure"
9716 #include "confdefs.h"
9717 int x, y, z;
9718 int main() {
9719 volatile int a; int * volatile b = x ? &y : &z;
9720       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
9721       *b = 0;
9722 ; return 0; }
9723 EOF
9724 if { (eval echo configure:9725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9725   rm -rf conftest*
9726   ol_cv_c_volatile=yes
9727 else
9728   echo "configure: failed program was:" >&5
9729   cat conftest.$ac_ext >&5
9730   rm -rf conftest*
9731   ol_cv_c_volatile=no
9732 fi
9733 rm -f conftest*
9734 fi
9735
9736 echo "$ac_t""$ol_cv_c_volatile" 1>&6
9737   if test $ol_cv_c_volatile = yes; then
9738     : 
9739   else
9740     cat >> confdefs.h <<\EOF
9741 #define volatile 
9742 EOF
9743
9744   fi
9745  
9746
9747 if test $cross_compiling = yes ; then
9748         cat >> confdefs.h <<\EOF
9749 #define CROSS_COMPILING 1
9750 EOF
9751
9752 else
9753         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
9754 echo "configure:9755: checking whether byte ordering is bigendian" >&5
9755 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
9756   echo $ac_n "(cached) $ac_c" 1>&6
9757 else
9758   ac_cv_c_bigendian=unknown
9759 # See if sys/param.h defines the BYTE_ORDER macro.
9760 cat > conftest.$ac_ext <<EOF
9761 #line 9762 "configure"
9762 #include "confdefs.h"
9763 #include <sys/types.h>
9764 #include <sys/param.h>
9765 int main() {
9766
9767 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9768  bogus endian macros
9769 #endif
9770 ; return 0; }
9771 EOF
9772 if { (eval echo configure:9773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9773   rm -rf conftest*
9774   # It does; now see whether it defined to BIG_ENDIAN or not.
9775 cat > conftest.$ac_ext <<EOF
9776 #line 9777 "configure"
9777 #include "confdefs.h"
9778 #include <sys/types.h>
9779 #include <sys/param.h>
9780 int main() {
9781
9782 #if BYTE_ORDER != BIG_ENDIAN
9783  not big endian
9784 #endif
9785 ; return 0; }
9786 EOF
9787 if { (eval echo configure:9788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9788   rm -rf conftest*
9789   ac_cv_c_bigendian=yes
9790 else
9791   echo "configure: failed program was:" >&5
9792   cat conftest.$ac_ext >&5
9793   rm -rf conftest*
9794   ac_cv_c_bigendian=no
9795 fi
9796 rm -f conftest*
9797 else
9798   echo "configure: failed program was:" >&5
9799   cat conftest.$ac_ext >&5
9800 fi
9801 rm -f conftest*
9802 if test $ac_cv_c_bigendian = unknown; then
9803 if test "$cross_compiling" = yes; then
9804     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9805 else
9806   cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 main () {
9810   /* Are we little or big endian?  From Harbison&Steele.  */
9811   union
9812   {
9813     long l;
9814     char c[sizeof (long)];
9815   } u;
9816   u.l = 1;
9817   exit (u.c[sizeof (long) - 1] == 1);
9818 }
9819 EOF
9820 if { (eval echo configure:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9821 then
9822   ac_cv_c_bigendian=no
9823 else
9824   echo "configure: failed program was:" >&5
9825   cat conftest.$ac_ext >&5
9826   rm -fr conftest*
9827   ac_cv_c_bigendian=yes
9828 fi
9829 rm -fr conftest*
9830 fi
9831
9832 fi
9833 fi
9834
9835 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
9836 if test $ac_cv_c_bigendian = yes; then
9837   cat >> confdefs.h <<\EOF
9838 #define WORDS_BIGENDIAN 1
9839 EOF
9840
9841 fi
9842
9843         echo $ac_n "checking size of short""... $ac_c" 1>&6
9844 echo "configure:9845: checking size of short" >&5
9845 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
9846   echo $ac_n "(cached) $ac_c" 1>&6
9847 else
9848   if test "$cross_compiling" = yes; then
9849     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9850 else
9851   cat > conftest.$ac_ext <<EOF
9852 #line 9853 "configure"
9853 #include "confdefs.h"
9854 #include <stdio.h>
9855 main()
9856 {
9857   FILE *f=fopen("conftestval", "w");
9858   if (!f) exit(1);
9859   fprintf(f, "%d\n", sizeof(short));
9860   exit(0);
9861 }
9862 EOF
9863 if { (eval echo configure:9864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9864 then
9865   ac_cv_sizeof_short=`cat conftestval`
9866 else
9867   echo "configure: failed program was:" >&5
9868   cat conftest.$ac_ext >&5
9869   rm -fr conftest*
9870   ac_cv_sizeof_short=0
9871 fi
9872 rm -fr conftest*
9873 fi
9874
9875 fi
9876 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
9877 cat >> confdefs.h <<EOF
9878 #define SIZEOF_SHORT $ac_cv_sizeof_short
9879 EOF
9880
9881  
9882         echo $ac_n "checking size of int""... $ac_c" 1>&6
9883 echo "configure:9884: checking size of int" >&5
9884 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
9885   echo $ac_n "(cached) $ac_c" 1>&6
9886 else
9887   if test "$cross_compiling" = yes; then
9888     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9889 else
9890   cat > conftest.$ac_ext <<EOF
9891 #line 9892 "configure"
9892 #include "confdefs.h"
9893 #include <stdio.h>
9894 main()
9895 {
9896   FILE *f=fopen("conftestval", "w");
9897   if (!f) exit(1);
9898   fprintf(f, "%d\n", sizeof(int));
9899   exit(0);
9900 }
9901 EOF
9902 if { (eval echo configure:9903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9903 then
9904   ac_cv_sizeof_int=`cat conftestval`
9905 else
9906   echo "configure: failed program was:" >&5
9907   cat conftest.$ac_ext >&5
9908   rm -fr conftest*
9909   ac_cv_sizeof_int=0
9910 fi
9911 rm -fr conftest*
9912 fi
9913
9914 fi
9915 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
9916 cat >> confdefs.h <<EOF
9917 #define SIZEOF_INT $ac_cv_sizeof_int
9918 EOF
9919
9920  
9921         echo $ac_n "checking size of long""... $ac_c" 1>&6
9922 echo "configure:9923: checking size of long" >&5
9923 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
9924   echo $ac_n "(cached) $ac_c" 1>&6
9925 else
9926   if test "$cross_compiling" = yes; then
9927     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9928 else
9929   cat > conftest.$ac_ext <<EOF
9930 #line 9931 "configure"
9931 #include "confdefs.h"
9932 #include <stdio.h>
9933 main()
9934 {
9935   FILE *f=fopen("conftestval", "w");
9936   if (!f) exit(1);
9937   fprintf(f, "%d\n", sizeof(long));
9938   exit(0);
9939 }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9942 then
9943   ac_cv_sizeof_long=`cat conftestval`
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -fr conftest*
9948   ac_cv_sizeof_long=0
9949 fi
9950 rm -fr conftest*
9951 fi
9952
9953 fi
9954 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
9955 cat >> confdefs.h <<EOF
9956 #define SIZEOF_LONG $ac_cv_sizeof_long
9957 EOF
9958
9959
9960 fi
9961
9962 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
9963 echo "configure:9964: checking for 8-bit clean memcmp" >&5
9964 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
9965   echo $ac_n "(cached) $ac_c" 1>&6
9966 else
9967   if test "$cross_compiling" = yes; then
9968   ac_cv_func_memcmp_clean=no
9969 else
9970   cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973
9974 main()
9975 {
9976   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
9977   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
9978 }
9979
9980 EOF
9981 if { (eval echo configure:9982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9982 then
9983   ac_cv_func_memcmp_clean=yes
9984 else
9985   echo "configure: failed program was:" >&5
9986   cat conftest.$ac_ext >&5
9987   rm -fr conftest*
9988   ac_cv_func_memcmp_clean=no
9989 fi
9990 rm -fr conftest*
9991 fi
9992
9993 fi
9994
9995 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
9996 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
9997
9998 echo $ac_n "checking for strftime""... $ac_c" 1>&6
9999 echo "configure:10000: checking for strftime" >&5
10000 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10001   echo $ac_n "(cached) $ac_c" 1>&6
10002 else
10003   cat > conftest.$ac_ext <<EOF
10004 #line 10005 "configure"
10005 #include "confdefs.h"
10006 /* System header to define __stub macros and hopefully few prototypes,
10007     which can conflict with char strftime(); below.  */
10008 #include <assert.h>
10009 /* Override any gcc2 internal prototype to avoid an error.  */
10010 /* We use char because int might match the return type of a gcc2
10011     builtin and then its argument prototype would still apply.  */
10012 char strftime();
10013
10014 int main() {
10015
10016 /* The GNU C library defines this for functions which it implements
10017     to always fail with ENOSYS.  Some functions are actually named
10018     something starting with __ and the normal name is an alias.  */
10019 #if defined (__stub_strftime) || defined (__stub___strftime)
10020 choke me
10021 #else
10022 strftime();
10023 #endif
10024
10025 ; return 0; }
10026 EOF
10027 if { (eval echo configure:10028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10028   rm -rf conftest*
10029   eval "ac_cv_func_strftime=yes"
10030 else
10031   echo "configure: failed program was:" >&5
10032   cat conftest.$ac_ext >&5
10033   rm -rf conftest*
10034   eval "ac_cv_func_strftime=no"
10035 fi
10036 rm -f conftest*
10037 fi
10038
10039 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10040   echo "$ac_t""yes" 1>&6
10041   cat >> confdefs.h <<\EOF
10042 #define HAVE_STRFTIME 1
10043 EOF
10044
10045 else
10046   echo "$ac_t""no" 1>&6
10047 # strftime is in -lintl on SCO UNIX.
10048 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10049 echo "configure:10050: checking for strftime in -lintl" >&5
10050 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10052   echo $ac_n "(cached) $ac_c" 1>&6
10053 else
10054   ac_save_LIBS="$LIBS"
10055 LIBS="-lintl  $LIBS"
10056 cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 /* Override any gcc2 internal prototype to avoid an error.  */
10060 /* We use char because int might match the return type of a gcc2
10061     builtin and then its argument prototype would still apply.  */
10062 char strftime();
10063
10064 int main() {
10065 strftime()
10066 ; return 0; }
10067 EOF
10068 if { (eval echo configure:10069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10069   rm -rf conftest*
10070   eval "ac_cv_lib_$ac_lib_var=yes"
10071 else
10072   echo "configure: failed program was:" >&5
10073   cat conftest.$ac_ext >&5
10074   rm -rf conftest*
10075   eval "ac_cv_lib_$ac_lib_var=no"
10076 fi
10077 rm -f conftest*
10078 LIBS="$ac_save_LIBS"
10079
10080 fi
10081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10082   echo "$ac_t""yes" 1>&6
10083   cat >> confdefs.h <<\EOF
10084 #define HAVE_STRFTIME 1
10085 EOF
10086
10087 LIBS="-lintl $LIBS"
10088 else
10089   echo "$ac_t""no" 1>&6
10090 fi
10091
10092 fi
10093
10094 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10095 echo "configure:10096: checking for vprintf" >&5
10096 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10097   echo $ac_n "(cached) $ac_c" 1>&6
10098 else
10099   cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102 /* System header to define __stub macros and hopefully few prototypes,
10103     which can conflict with char vprintf(); below.  */
10104 #include <assert.h>
10105 /* Override any gcc2 internal prototype to avoid an error.  */
10106 /* We use char because int might match the return type of a gcc2
10107     builtin and then its argument prototype would still apply.  */
10108 char vprintf();
10109
10110 int main() {
10111
10112 /* The GNU C library defines this for functions which it implements
10113     to always fail with ENOSYS.  Some functions are actually named
10114     something starting with __ and the normal name is an alias.  */
10115 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10116 choke me
10117 #else
10118 vprintf();
10119 #endif
10120
10121 ; return 0; }
10122 EOF
10123 if { (eval echo configure:10124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10124   rm -rf conftest*
10125   eval "ac_cv_func_vprintf=yes"
10126 else
10127   echo "configure: failed program was:" >&5
10128   cat conftest.$ac_ext >&5
10129   rm -rf conftest*
10130   eval "ac_cv_func_vprintf=no"
10131 fi
10132 rm -f conftest*
10133 fi
10134
10135 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10136   echo "$ac_t""yes" 1>&6
10137   cat >> confdefs.h <<\EOF
10138 #define HAVE_VPRINTF 1
10139 EOF
10140
10141 else
10142   echo "$ac_t""no" 1>&6
10143 fi
10144
10145 if test "$ac_cv_func_vprintf" != yes; then
10146 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10147 echo "configure:10148: checking for _doprnt" >&5
10148 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 /* System header to define __stub macros and hopefully few prototypes,
10155     which can conflict with char _doprnt(); below.  */
10156 #include <assert.h>
10157 /* Override any gcc2 internal prototype to avoid an error.  */
10158 /* We use char because int might match the return type of a gcc2
10159     builtin and then its argument prototype would still apply.  */
10160 char _doprnt();
10161
10162 int main() {
10163
10164 /* The GNU C library defines this for functions which it implements
10165     to always fail with ENOSYS.  Some functions are actually named
10166     something starting with __ and the normal name is an alias.  */
10167 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10168 choke me
10169 #else
10170 _doprnt();
10171 #endif
10172
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_func__doprnt=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_func__doprnt=no"
10183 fi
10184 rm -f conftest*
10185 fi
10186
10187 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10188   echo "$ac_t""yes" 1>&6
10189   cat >> confdefs.h <<\EOF
10190 #define HAVE_DOPRNT 1
10191 EOF
10192
10193 else
10194   echo "$ac_t""no" 1>&6
10195 fi
10196
10197 fi
10198
10199
10200 if test $ac_cv_func_vprintf = yes ; then
10201                 for ac_func in vsnprintf vsprintf
10202 do
10203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10204 echo "configure:10205: checking for $ac_func" >&5
10205 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10206   echo $ac_n "(cached) $ac_c" 1>&6
10207 else
10208   cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211 /* System header to define __stub macros and hopefully few prototypes,
10212     which can conflict with char $ac_func(); below.  */
10213 #include <assert.h>
10214 /* Override any gcc2 internal prototype to avoid an error.  */
10215 /* We use char because int might match the return type of a gcc2
10216     builtin and then its argument prototype would still apply.  */
10217 char $ac_func();
10218
10219 int main() {
10220
10221 /* The GNU C library defines this for functions which it implements
10222     to always fail with ENOSYS.  Some functions are actually named
10223     something starting with __ and the normal name is an alias.  */
10224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10225 choke me
10226 #else
10227 $ac_func();
10228 #endif
10229
10230 ; return 0; }
10231 EOF
10232 if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10233   rm -rf conftest*
10234   eval "ac_cv_func_$ac_func=yes"
10235 else
10236   echo "configure: failed program was:" >&5
10237   cat conftest.$ac_ext >&5
10238   rm -rf conftest*
10239   eval "ac_cv_func_$ac_func=no"
10240 fi
10241 rm -f conftest*
10242 fi
10243
10244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10245   echo "$ac_t""yes" 1>&6
10246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10247   cat >> confdefs.h <<EOF
10248 #define $ac_tr_func 1
10249 EOF
10250  
10251 else
10252   echo "$ac_t""no" 1>&6
10253 fi
10254 done
10255
10256 fi
10257
10258 for ac_func in \
10259         bcopy                   \
10260         endgrent                \
10261         endpwent                \
10262         flock                   \
10263         getdtablesize           \
10264         getgrgid                \
10265         gethostname             \
10266         getpass                 \
10267         getpwuid                \
10268         gettimeofday            \
10269         lockf                   \
10270         memcpy                  \
10271         memmove                 \
10272         mkstemp                 \
10273         recv                    \
10274         recvfrom                \
10275         select                  \
10276         setpwfile               \
10277         setsid                  \
10278         signal                  \
10279         sigset                  \
10280         snprintf                \
10281         socket                  \
10282         strdup                  \
10283         strerror                \
10284         strpbrk                 \
10285         strrchr                 \
10286         strsep                  \
10287         strstr                  \
10288         strtol                  \
10289         strtoul                 \
10290         strspn                  \
10291         sysconf                 \
10292         waitpid                 \
10293         wait4                   \
10294
10295 do
10296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10297 echo "configure:10298: checking for $ac_func" >&5
10298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10299   echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301   cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 /* System header to define __stub macros and hopefully few prototypes,
10305     which can conflict with char $ac_func(); below.  */
10306 #include <assert.h>
10307 /* Override any gcc2 internal prototype to avoid an error.  */
10308 /* We use char because int might match the return type of a gcc2
10309     builtin and then its argument prototype would still apply.  */
10310 char $ac_func();
10311
10312 int main() {
10313
10314 /* The GNU C library defines this for functions which it implements
10315     to always fail with ENOSYS.  Some functions are actually named
10316     something starting with __ and the normal name is an alias.  */
10317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10318 choke me
10319 #else
10320 $ac_func();
10321 #endif
10322
10323 ; return 0; }
10324 EOF
10325 if { (eval echo configure:10326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10326   rm -rf conftest*
10327   eval "ac_cv_func_$ac_func=yes"
10328 else
10329   echo "configure: failed program was:" >&5
10330   cat conftest.$ac_ext >&5
10331   rm -rf conftest*
10332   eval "ac_cv_func_$ac_func=no"
10333 fi
10334 rm -f conftest*
10335 fi
10336
10337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10338   echo "$ac_t""yes" 1>&6
10339     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10340   cat >> confdefs.h <<EOF
10341 #define $ac_tr_func 1
10342 EOF
10343  
10344 else
10345   echo "$ac_t""no" 1>&6
10346 fi
10347 done
10348
10349
10350 for ac_func in getopt tempnam
10351 do
10352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10353 echo "configure:10354: checking for $ac_func" >&5
10354 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10355   echo $ac_n "(cached) $ac_c" 1>&6
10356 else
10357   cat > conftest.$ac_ext <<EOF
10358 #line 10359 "configure"
10359 #include "confdefs.h"
10360 /* System header to define __stub macros and hopefully few prototypes,
10361     which can conflict with char $ac_func(); below.  */
10362 #include <assert.h>
10363 /* Override any gcc2 internal prototype to avoid an error.  */
10364 /* We use char because int might match the return type of a gcc2
10365     builtin and then its argument prototype would still apply.  */
10366 char $ac_func();
10367
10368 int main() {
10369
10370 /* The GNU C library defines this for functions which it implements
10371     to always fail with ENOSYS.  Some functions are actually named
10372     something starting with __ and the normal name is an alias.  */
10373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10374 choke me
10375 #else
10376 $ac_func();
10377 #endif
10378
10379 ; return 0; }
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10382   rm -rf conftest*
10383   eval "ac_cv_func_$ac_func=yes"
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_func_$ac_func=no"
10389 fi
10390 rm -f conftest*
10391 fi
10392
10393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10394   echo "$ac_t""yes" 1>&6
10395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10396   cat >> confdefs.h <<EOF
10397 #define $ac_tr_func 1
10398 EOF
10399  
10400 else
10401   echo "$ac_t""no" 1>&6
10402 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10403 fi
10404 done
10405
10406
10407
10408 # Check Configuration
10409
10410 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10411 echo "configure:10412: checking declaration of sys_errlist" >&5
10412 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10413   echo $ac_n "(cached) $ac_c" 1>&6
10414 else
10415   
10416         cat > conftest.$ac_ext <<EOF
10417 #line 10418 "configure"
10418 #include "confdefs.h"
10419
10420 #include <stdio.h>
10421 #include <sys/types.h>
10422 #include <errno.h> 
10423 int main() {
10424 char *c = (char *) *sys_errlist
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   ol_cv_dcl_sys_errlist=yes
10430 else
10431   echo "configure: failed program was:" >&5
10432   cat conftest.$ac_ext >&5
10433   rm -rf conftest*
10434   ol_cv_dcl_sys_errlist=no
10435 fi
10436 rm -f conftest*
10437 fi
10438
10439 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10440 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10441 if test $ol_cv_dcl_sys_errlist = no ; then
10442         cat >> confdefs.h <<\EOF
10443 #define DECL_SYS_ERRLIST 1
10444 EOF
10445
10446         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10447 echo "configure:10448: checking existence of sys_errlist" >&5
10448         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10449   echo $ac_n "(cached) $ac_c" 1>&6
10450 else
10451   
10452                 cat > conftest.$ac_ext <<EOF
10453 #line 10454 "configure"
10454 #include "confdefs.h"
10455 #include <errno.h>
10456 int main() {
10457 char *c = (char *) *sys_errlist
10458 ; return 0; }
10459 EOF
10460 if { (eval echo configure:10461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10461   rm -rf conftest*
10462   ol_cv_have_sys_errlist=yes
10463 else
10464   echo "configure: failed program was:" >&5
10465   cat conftest.$ac_ext >&5
10466   rm -rf conftest*
10467   ol_cv_have_sys_errlist=no
10468 fi
10469 rm -f conftest*
10470 fi
10471
10472         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10473         if test $ol_cv_have_sys_errlist = yes ; then
10474                 cat >> confdefs.h <<\EOF
10475 #define HAVE_SYS_ERRLIST 1
10476 EOF
10477
10478         fi
10479 fi
10480
10481
10482
10483 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
10484 echo "configure:10485: checking strdup declaration" >&5
10485 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
10486   echo $ac_n "(cached) $ac_c" 1>&6
10487 else
10488   
10489         cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492
10493 #include <string.h> 
10494 int main() {
10495 extern char *strdup();
10496 ; return 0; }
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10499   rm -rf conftest*
10500   ol_cv_dcl_strdup=yes
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   ol_cv_dcl_strdup=no
10506 fi
10507 rm -f conftest*
10508 fi
10509
10510 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
10511 if test $ol_cv_dcl_strdup = yes ; then
10512         cat >> confdefs.h <<\EOF
10513 #define DECL_STRDUP 1
10514 EOF
10515
10516 fi
10517
10518
10519
10520 if test "$ol_enable_debug" != no ; then
10521         cat >> confdefs.h <<\EOF
10522 #define LDAP_DEBUG 1
10523 EOF
10524
10525 fi
10526 if test "$ol_enable_syslog" = yes ; then
10527         cat >> confdefs.h <<\EOF
10528 #define LDAP_SYSLOG 1
10529 EOF
10530
10531 fi
10532 if test "$ol_enable_libui" = yes ; then
10533         cat >> confdefs.h <<\EOF
10534 #define LDAP_LIBUI 1
10535 EOF
10536
10537 fi
10538 if test "$ol_enable_cache" = no ; then
10539         cat >> confdefs.h <<\EOF
10540 #define LDAP_NOCACHE 1
10541 EOF
10542
10543 fi
10544 if test "$ol_enable_dns" != no ; then
10545         cat >> confdefs.h <<\EOF
10546 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
10547 EOF
10548
10549 fi
10550 if test "$ol_enable_proctitle" != no ; then
10551         cat >> confdefs.h <<\EOF
10552 #define LDAP_PROCTITLE 1
10553 EOF
10554
10555 fi
10556 if test "$ol_enable_referrals" != no ; then
10557         cat >> confdefs.h <<\EOF
10558 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
10559 EOF
10560
10561 fi
10562 if test "$ol_enable_cldap" != no ; then
10563         cat >> confdefs.h <<\EOF
10564 #define LDAP_CONNECTIONLESS 1
10565 EOF
10566
10567 fi
10568
10569 if test "$ol_enable_aclgroups" != no ; then
10570         cat >> confdefs.h <<\EOF
10571 #define SLAPD_ACLGROUPS 1
10572 EOF
10573
10574 fi
10575 if test "$ol_enable_crypt" != no ; then
10576         cat >> confdefs.h <<\EOF
10577 #define SLAPD_CRYPT 1
10578 EOF
10579
10580 fi
10581 if test "$ol_enable_cleartext" != no ; then
10582         cat >> confdefs.h <<\EOF
10583 #define SLAPD_CLEARTEXT 1
10584 EOF
10585
10586 fi
10587 if test "$ol_enable_phonetic" != no ; then
10588         cat >> confdefs.h <<\EOF
10589 #define SLAPD_PHONETIC 1
10590 EOF
10591
10592 fi
10593 if test "$ol_enable_rlookups" != no ; then
10594         cat >> confdefs.h <<\EOF
10595 #define SLAPD_RLOOKUPS 1
10596 EOF
10597
10598 fi
10599
10600 if test "$ol_link_bdb2" != no ; then
10601         cat >> confdefs.h <<\EOF
10602 #define SLAPD_BDB2 1
10603 EOF
10604
10605         BUILD_SLAPD=yes
10606         BUILD_BDB2=yes
10607 fi
10608
10609 if test "$ol_link_ldbm" != no ; then
10610         cat >> confdefs.h <<\EOF
10611 #define SLAPD_LDBM 1
10612 EOF
10613
10614         BUILD_SLAPD=yes
10615         BUILD_LDBM=yes
10616 fi
10617
10618 if test "$ol_enable_passwd" != no ; then
10619         cat >> confdefs.h <<\EOF
10620 #define SLAPD_PASSWD 1
10621 EOF
10622
10623         BUILD_SLAPD=yes
10624         BUILD_PASSWD=yes
10625 fi
10626
10627 if test "$ol_enable_perl" != no ; then
10628         cat >> confdefs.h <<\EOF
10629 #define SLAPD_PERL 1
10630 EOF
10631
10632         BUILD_SLAPD=yes
10633         BUILD_PERL=yes
10634 fi
10635
10636 if test "$ol_enable_shell" != no ; then
10637         cat >> confdefs.h <<\EOF
10638 #define SLAPD_SHELL 1
10639 EOF
10640
10641         BUILD_SLAPD=yes
10642         BUILD_SHELL=yes
10643 fi
10644
10645 if test "$ol_enable_tcl" != no ; then
10646         cat >> confdefs.h <<\EOF
10647 #define SLAPD_TCL 1
10648 EOF
10649
10650         BUILD_SLAPD=yes
10651         BUILD_TCL=yes
10652 fi
10653
10654 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
10655         $BUILD_SLAPD = yes ; then
10656         BUILD_SLURPD=yes
10657 fi
10658
10659 if test "$ol_link_isode" != no ; then
10660         BUILD_LDAPD=yes
10661 fi
10662
10663
10664
10665
10666   
10667   
10668   
10669   
10670   
10671   
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691 trap '' 1 2 15
10692 cat > confcache <<\EOF
10693 # This file is a shell script that caches the results of configure
10694 # tests run on this system so they can be shared between configure
10695 # scripts and configure runs.  It is not useful on other systems.
10696 # If it contains results you don't want to keep, you may remove or edit it.
10697 #
10698 # By default, configure uses ./config.cache as the cache file,
10699 # creating it if it does not exist already.  You can give configure
10700 # the --cache-file=FILE option to use a different cache file; that is
10701 # what configure does when it calls configure scripts in
10702 # subdirectories, so they share the cache.
10703 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10704 # config.status only pays attention to the cache file if you give it the
10705 # --recheck option to rerun configure.
10706 #
10707 EOF
10708 # The following way of writing the cache mishandles newlines in values,
10709 # but we know of no workaround that is simple, portable, and efficient.
10710 # So, don't put newlines in cache variables' values.
10711 # Ultrix sh set writes to stderr and can't be redirected directly,
10712 # and sets the high bit in the cache file unless we assign to the vars.
10713 (set) 2>&1 |
10714   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10715   *ac_space=\ *)
10716     # `set' does not quote correctly, so add quotes (double-quote substitution
10717     # turns \\\\ into \\, and sed turns \\ into \).
10718     sed -n \
10719       -e "s/'/'\\\\''/g" \
10720       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10721     ;;
10722   *)
10723     # `set' quotes correctly as required by POSIX, so do not add quotes.
10724     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10725     ;;
10726   esac >> confcache
10727 if cmp -s $cache_file confcache; then
10728   :
10729 else
10730   if test -w $cache_file; then
10731     echo "updating cache $cache_file"
10732     cat confcache > $cache_file
10733   else
10734     echo "not updating unwritable cache $cache_file"
10735   fi
10736 fi
10737 rm -f confcache
10738
10739 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10740
10741 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10742 # Let make expand exec_prefix.
10743 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10744
10745 # Any assignment to VPATH causes Sun make to only execute
10746 # the first set of double-colon rules, so remove it if not needed.
10747 # If there is a colon in the path, we need to keep it.
10748 if test "x$srcdir" = x.; then
10749   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10750 fi
10751
10752 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10753
10754 DEFS=-DHAVE_CONFIG_H
10755
10756 # Without the "./", some shells look in PATH for config.status.
10757 : ${CONFIG_STATUS=./config.status}
10758
10759 echo creating $CONFIG_STATUS
10760 rm -f $CONFIG_STATUS
10761 cat > $CONFIG_STATUS <<EOF
10762 #! /bin/sh
10763 # Generated automatically by configure.
10764 # Run this file to recreate the current configuration.
10765 # This directory was configured as follows,
10766 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10767 #
10768 # $0 $ac_configure_args
10769 #
10770 # Compiler output produced by configure, useful for debugging
10771 # configure, is in ./config.log if it exists.
10772
10773 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10774 for ac_option
10775 do
10776   case "\$ac_option" in
10777   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10778     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10779     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10780   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10781     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10782     exit 0 ;;
10783   -help | --help | --hel | --he | --h)
10784     echo "\$ac_cs_usage"; exit 0 ;;
10785   *) echo "\$ac_cs_usage"; exit 1 ;;
10786   esac
10787 done
10788
10789 ac_given_srcdir=$srcdir
10790 ac_given_INSTALL="$INSTALL"
10791
10792 trap 'rm -fr `echo "\
10793 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10794 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10795 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10796 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10797 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10798 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10799 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10800 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10801 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10802 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10803 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10804 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10805 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10806 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10807 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10808 include/Makefile:build/top.mk:include/Makefile.in \
10809 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10810 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10811 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10812 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10813 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10814 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10815 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10816 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10817 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10818 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10819 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10820 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10821 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10822 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10823 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10824 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10825 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10826 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10827 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10828 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10829 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10830 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10831 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10832 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10833 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
10834  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10835 EOF
10836 cat >> $CONFIG_STATUS <<EOF
10837
10838 # Protect against being on the right side of a sed subst in config.status.
10839 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10840  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10841 $ac_vpsub
10842 $extrasub
10843 s%@SHELL@%$SHELL%g
10844 s%@CFLAGS@%$CFLAGS%g
10845 s%@CPPFLAGS@%$CPPFLAGS%g
10846 s%@CXXFLAGS@%$CXXFLAGS%g
10847 s%@FFLAGS@%$FFLAGS%g
10848 s%@DEFS@%$DEFS%g
10849 s%@LDFLAGS@%$LDFLAGS%g
10850 s%@LIBS@%$LIBS%g
10851 s%@exec_prefix@%$exec_prefix%g
10852 s%@prefix@%$prefix%g
10853 s%@program_transform_name@%$program_transform_name%g
10854 s%@bindir@%$bindir%g
10855 s%@sbindir@%$sbindir%g
10856 s%@libexecdir@%$libexecdir%g
10857 s%@datadir@%$datadir%g
10858 s%@sysconfdir@%$sysconfdir%g
10859 s%@sharedstatedir@%$sharedstatedir%g
10860 s%@localstatedir@%$localstatedir%g
10861 s%@libdir@%$libdir%g
10862 s%@includedir@%$includedir%g
10863 s%@oldincludedir@%$oldincludedir%g
10864 s%@infodir@%$infodir%g
10865 s%@mandir@%$mandir%g
10866 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10867 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10868 s%@INSTALL_DATA@%$INSTALL_DATA%g
10869 s%@PACKAGE@%$PACKAGE%g
10870 s%@VERSION@%$VERSION%g
10871 s%@ACLOCAL@%$ACLOCAL%g
10872 s%@AUTOCONF@%$AUTOCONF%g
10873 s%@AUTOMAKE@%$AUTOMAKE%g
10874 s%@AUTOHEADER@%$AUTOHEADER%g
10875 s%@MAKEINFO@%$MAKEINFO%g
10876 s%@SET_MAKE@%$SET_MAKE%g
10877 s%@top_builddir@%$top_builddir%g
10878 s%@ldap_subdir@%$ldap_subdir%g
10879 s%@host@%$host%g
10880 s%@host_alias@%$host_alias%g
10881 s%@host_cpu@%$host_cpu%g
10882 s%@host_vendor@%$host_vendor%g
10883 s%@host_os@%$host_os%g
10884 s%@RANLIB@%$RANLIB%g
10885 s%@CC@%$CC%g
10886 s%@LD@%$LD%g
10887 s%@NM@%$NM%g
10888 s%@LN_S@%$LN_S%g
10889 s%@LIBTOOL@%$LIBTOOL%g
10890 s%@AWK@%$AWK%g
10891 s%@LN_H@%$LN_H%g
10892 s%@SENDMAIL@%$SENDMAIL%g
10893 s%@EDITOR@%$EDITOR%g
10894 s%@FINGER@%$FINGER%g
10895 s%@PERLBIN@%$PERLBIN%g
10896 s%@CPP@%$CPP%g
10897 s%@EXEEXT@%$EXEEXT%g
10898 s%@OBJEXT@%$OBJEXT%g
10899 s%@PEPSY@%$PEPSY%g
10900 s%@LIBOBJS@%$LIBOBJS%g
10901 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
10902 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
10903 s%@BUILD_BDB2@%$BUILD_BDB2%g
10904 s%@BUILD_LDBM@%$BUILD_LDBM%g
10905 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
10906 s%@BUILD_PERL@%$BUILD_PERL%g
10907 s%@BUILD_SHELL@%$BUILD_SHELL%g
10908 s%@BUILD_TCL@%$BUILD_TCL%g
10909 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
10910 s%@LDAP_LIBS@%$LDAP_LIBS%g
10911 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
10912 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
10913 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
10914 s%@LDBM_LIBS@%$LDBM_LIBS%g
10915 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
10916 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
10917 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
10918 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
10919 s%@KRB_LIBS@%$KRB_LIBS%g
10920 s%@READLINE_LIBS@%$READLINE_LIBS%g
10921 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
10922 s%@TLS_LIBS@%$TLS_LIBS%g
10923
10924 CEOF
10925 EOF
10926
10927 cat >> $CONFIG_STATUS <<\EOF
10928
10929 # Split the substitutions into bite-sized pieces for seds with
10930 # small command number limits, like on Digital OSF/1 and HP-UX.
10931 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10932 ac_file=1 # Number of current file.
10933 ac_beg=1 # First line for current file.
10934 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10935 ac_more_lines=:
10936 ac_sed_cmds=""
10937 while $ac_more_lines; do
10938   if test $ac_beg -gt 1; then
10939     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10940   else
10941     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10942   fi
10943   if test ! -s conftest.s$ac_file; then
10944     ac_more_lines=false
10945     rm -f conftest.s$ac_file
10946   else
10947     if test -z "$ac_sed_cmds"; then
10948       ac_sed_cmds="sed -f conftest.s$ac_file"
10949     else
10950       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10951     fi
10952     ac_file=`expr $ac_file + 1`
10953     ac_beg=$ac_end
10954     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10955   fi
10956 done
10957 if test -z "$ac_sed_cmds"; then
10958   ac_sed_cmds=cat
10959 fi
10960 EOF
10961
10962 cat >> $CONFIG_STATUS <<EOF
10963
10964 CONFIG_FILES=\${CONFIG_FILES-"\
10965 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10966 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10967 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10968 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10969 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10970 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10971 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10972 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10973 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10974 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10975 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10976 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10977 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10978 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10979 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10980 include/Makefile:build/top.mk:include/Makefile.in \
10981 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10982 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10983 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10984 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10985 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10986 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10987 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10988 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10989 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10990 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10991 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10992 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10993 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10994 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10995 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10996 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10997 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10998 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10999 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11000 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11001 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11002 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11003 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11004 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11005 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11006 "}
11007 EOF
11008 cat >> $CONFIG_STATUS <<\EOF
11009 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11010   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11011   case "$ac_file" in
11012   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11013        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11014   *) ac_file_in="${ac_file}.in" ;;
11015   esac
11016
11017   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11018
11019   # Remove last slash and all that follows it.  Not all systems have dirname.
11020   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11021   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11022     # The file is in a subdirectory.
11023     test ! -d "$ac_dir" && mkdir "$ac_dir"
11024     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11025     # A "../" for each directory in $ac_dir_suffix.
11026     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11027   else
11028     ac_dir_suffix= ac_dots=
11029   fi
11030
11031   case "$ac_given_srcdir" in
11032   .)  srcdir=.
11033       if test -z "$ac_dots"; then top_srcdir=.
11034       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11035   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11036   *) # Relative path.
11037     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11038     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11039   esac
11040
11041   case "$ac_given_INSTALL" in
11042   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11043   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11044   esac
11045
11046   echo creating "$ac_file"
11047   rm -f "$ac_file"
11048   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11049   case "$ac_file" in
11050   *Makefile*) ac_comsub="1i\\
11051 # $configure_input" ;;
11052   *) ac_comsub= ;;
11053   esac
11054
11055   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11056   sed -e "$ac_comsub
11057 s%@configure_input@%$configure_input%g
11058 s%@srcdir@%$srcdir%g
11059 s%@top_srcdir@%$top_srcdir%g
11060 s%@INSTALL@%$INSTALL%g
11061 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11062 fi; done
11063 rm -f conftest.s*
11064
11065 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11066 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11067 #
11068 # ac_d sets the value in "#define NAME VALUE" lines.
11069 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11070 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11071 ac_dC='\3'
11072 ac_dD='%g'
11073 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11074 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11075 ac_uB='\([      ]\)%\1#\2define\3'
11076 ac_uC=' '
11077 ac_uD='\4%g'
11078 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11079 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11080 ac_eB='$%\1#\2define\3'
11081 ac_eC=' '
11082 ac_eD='%g'
11083
11084 if test "${CONFIG_HEADERS+set}" != set; then
11085 EOF
11086 cat >> $CONFIG_STATUS <<EOF
11087   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11088 EOF
11089 cat >> $CONFIG_STATUS <<\EOF
11090 fi
11091 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11092   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11093   case "$ac_file" in
11094   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11095        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11096   *) ac_file_in="${ac_file}.in" ;;
11097   esac
11098
11099   echo creating $ac_file
11100
11101   rm -f conftest.frag conftest.in conftest.out
11102   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11103   cat $ac_file_inputs > conftest.in
11104
11105 EOF
11106
11107 # Transform confdefs.h into a sed script conftest.vals that substitutes
11108 # the proper values into config.h.in to produce config.h.  And first:
11109 # Protect against being on the right side of a sed subst in config.status.
11110 # Protect against being in an unquoted here document in config.status.
11111 rm -f conftest.vals
11112 cat > conftest.hdr <<\EOF
11113 s/[\\&%]/\\&/g
11114 s%[\\$`]%\\&%g
11115 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11116 s%ac_d%ac_u%gp
11117 s%ac_u%ac_e%gp
11118 EOF
11119 sed -n -f conftest.hdr confdefs.h > conftest.vals
11120 rm -f conftest.hdr
11121
11122 # This sed command replaces #undef with comments.  This is necessary, for
11123 # example, in the case of _POSIX_SOURCE, which is predefined and required
11124 # on some systems where configure will not decide to define it.
11125 cat >> conftest.vals <<\EOF
11126 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11127 EOF
11128
11129 # Break up conftest.vals because some shells have a limit on
11130 # the size of here documents, and old seds have small limits too.
11131
11132 rm -f conftest.tail
11133 while :
11134 do
11135   ac_lines=`grep -c . conftest.vals`
11136   # grep -c gives empty output for an empty file on some AIX systems.
11137   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11138   # Write a limited-size here document to conftest.frag.
11139   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11140   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11141   echo 'CEOF
11142   sed -f conftest.frag conftest.in > conftest.out
11143   rm -f conftest.in
11144   mv conftest.out conftest.in
11145 ' >> $CONFIG_STATUS
11146   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11147   rm -f conftest.vals
11148   mv conftest.tail conftest.vals
11149 done
11150 rm -f conftest.vals
11151
11152 cat >> $CONFIG_STATUS <<\EOF
11153   rm -f conftest.frag conftest.h
11154   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11155   cat conftest.in >> conftest.h
11156   rm -f conftest.in
11157   if cmp -s $ac_file conftest.h 2>/dev/null; then
11158     echo "$ac_file is unchanged"
11159     rm -f conftest.h
11160   else
11161     # Remove last slash and all that follows it.  Not all systems have dirname.
11162       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11163       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11164       # The file is in a subdirectory.
11165       test ! -d "$ac_dir" && mkdir "$ac_dir"
11166     fi
11167     rm -f $ac_file
11168     mv conftest.h $ac_file
11169   fi
11170 fi; done
11171
11172 EOF
11173 cat >> $CONFIG_STATUS <<EOF
11174
11175 EOF
11176 cat >> $CONFIG_STATUS <<\EOF
11177
11178 date > stamp-h
11179 echo Please \"make depend\" to build dependencies
11180
11181 exit 0
11182 EOF
11183 chmod +x $CONFIG_STATUS
11184 rm -fr confdefs* $ac_clean_files
11185 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11186