]> git.sur5r.net Git - openldap/blob - configure
NT port
[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_thread_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_thread_flag=yes
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   ol_cv_thread_flag=no
4607 fi
4608 rm -f conftest*
4609                                                                 LIBS="$save_LIBS"
4610                         
4611 fi
4612
4613 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4614
4615                         if test $ol_cv_thread_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                                 if test $ol_with_yielding_select = auto ; then
4838                                         ol_with_yielding_select=yes
4839                                 fi
4840                                 
4841 else
4842   echo "$ac_t""no" 1>&6
4843 :
4844 fi
4845
4846                         LIBS="$save_LIBS"
4847                 fi
4848
4849                 if test $ol_link_threads = no ; then
4850                                                 save_LIBS="$LIBS"
4851                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4852 echo "configure:4853: checking for pthread_mutex_lock in -lpthread" >&5
4853 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4855   echo $ac_n "(cached) $ac_c" 1>&6
4856 else
4857   ac_save_LIBS="$LIBS"
4858 LIBS="-lpthread -lmach -lexc $LIBS"
4859 cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862 /* Override any gcc2 internal prototype to avoid an error.  */
4863 /* We use char because int might match the return type of a gcc2
4864     builtin and then its argument prototype would still apply.  */
4865 char pthread_mutex_lock();
4866
4867 int main() {
4868 pthread_mutex_lock()
4869 ; return 0; }
4870 EOF
4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4872   rm -rf conftest*
4873   eval "ac_cv_lib_$ac_lib_var=yes"
4874 else
4875   echo "configure: failed program was:" >&5
4876   cat conftest.$ac_ext >&5
4877   rm -rf conftest*
4878   eval "ac_cv_lib_$ac_lib_var=no"
4879 fi
4880 rm -f conftest*
4881 LIBS="$ac_save_LIBS"
4882
4883 fi
4884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4885   echo "$ac_t""yes" 1>&6
4886   
4887                                 ol_link_threads=posix
4888                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
4889                                 if test $ol_with_yielding_select = auto ; then
4890                                         ol_with_yielding_select=yes
4891                                 fi
4892                                 
4893 else
4894   echo "$ac_t""no" 1>&6
4895 :
4896 fi
4897
4898                         LIBS="$save_LIBS"
4899                 fi
4900
4901                 if test $ol_link_threads = no ; then
4902                                                 save_LIBS="$LIBS"
4903                         echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
4904 echo "configure:4905: checking for pthread_mutex_trylock in -lpthread" >&5
4905 ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
4906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4907   echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909   ac_save_LIBS="$LIBS"
4910 LIBS="-lpthread -lexc $LIBS"
4911 cat > conftest.$ac_ext <<EOF
4912 #line 4913 "configure"
4913 #include "confdefs.h"
4914 /* Override any gcc2 internal prototype to avoid an error.  */
4915 /* We use char because int might match the return type of a gcc2
4916     builtin and then its argument prototype would still apply.  */
4917 char pthread_mutex_trylock();
4918
4919 int main() {
4920 pthread_mutex_trylock()
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   eval "ac_cv_lib_$ac_lib_var=yes"
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   eval "ac_cv_lib_$ac_lib_var=no"
4931 fi
4932 rm -f conftest*
4933 LIBS="$ac_save_LIBS"
4934
4935 fi
4936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4937   echo "$ac_t""yes" 1>&6
4938   
4939                                 ol_link_threads=posix
4940                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
4941                                 if test $ol_with_yielding_select = auto ; then
4942                                         ol_with_yielding_select=yes
4943                                 fi
4944                                 
4945 else
4946   echo "$ac_t""no" 1>&6
4947 :
4948 fi
4949
4950                         LIBS="$save_LIBS"
4951                 fi
4952
4953                 if test $ol_link_threads = no ; then
4954                                                 save_LIBS="$LIBS"
4955                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
4956 echo "configure:4957: checking for pthread_create in -lpthread" >&5
4957 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
4958 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4959   echo $ac_n "(cached) $ac_c" 1>&6
4960 else
4961   ac_save_LIBS="$LIBS"
4962 LIBS="-lpthread  $LIBS"
4963 cat > conftest.$ac_ext <<EOF
4964 #line 4965 "configure"
4965 #include "confdefs.h"
4966 /* Override any gcc2 internal prototype to avoid an error.  */
4967 /* We use char because int might match the return type of a gcc2
4968     builtin and then its argument prototype would still apply.  */
4969 char pthread_create();
4970
4971 int main() {
4972 pthread_create()
4973 ; return 0; }
4974 EOF
4975 if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4976   rm -rf conftest*
4977   eval "ac_cv_lib_$ac_lib_var=yes"
4978 else
4979   echo "configure: failed program was:" >&5
4980   cat conftest.$ac_ext >&5
4981   rm -rf conftest*
4982   eval "ac_cv_lib_$ac_lib_var=no"
4983 fi
4984 rm -f conftest*
4985 LIBS="$ac_save_LIBS"
4986
4987 fi
4988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4989   echo "$ac_t""yes" 1>&6
4990   
4991                                 ol_link_threads=posix
4992                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4993 else
4994   echo "$ac_t""no" 1>&6
4995 :
4996 fi
4997
4998                         LIBS="$save_LIBS"
4999                 fi
5000
5001                 if test $ol_link_threads = no ; then
5002                                                 save_LIBS="$LIBS"
5003                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5004 echo "configure:5005: checking for pthread_create in -lc_r" >&5
5005 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
5006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5007   echo $ac_n "(cached) $ac_c" 1>&6
5008 else
5009   ac_save_LIBS="$LIBS"
5010 LIBS="-lc_r  $LIBS"
5011 cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* Override any gcc2 internal prototype to avoid an error.  */
5015 /* We use char because int might match the return type of a gcc2
5016     builtin and then its argument prototype would still apply.  */
5017 char pthread_create();
5018
5019 int main() {
5020 pthread_create()
5021 ; return 0; }
5022 EOF
5023 if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=yes"
5026 else
5027   echo "configure: failed program was:" >&5
5028   cat conftest.$ac_ext >&5
5029   rm -rf conftest*
5030   eval "ac_cv_lib_$ac_lib_var=no"
5031 fi
5032 rm -f conftest*
5033 LIBS="$ac_save_LIBS"
5034
5035 fi
5036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5037   echo "$ac_t""yes" 1>&6
5038   
5039                                 ol_link_threads=posix
5040                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
5041 else
5042   echo "$ac_t""no" 1>&6
5043 :
5044 fi
5045
5046                         LIBS="$save_LIBS"
5047                 fi
5048
5049                 if test $ol_link_threads = no ; then
5050                                                 save_LIBS="$LIBS"
5051                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5052 echo "configure:5053: checking for pthread_create in -lpthreads" >&5
5053 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
5054 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5055   echo $ac_n "(cached) $ac_c" 1>&6
5056 else
5057   ac_save_LIBS="$LIBS"
5058 LIBS="-lpthreads  $LIBS"
5059 cat > conftest.$ac_ext <<EOF
5060 #line 5061 "configure"
5061 #include "confdefs.h"
5062 /* Override any gcc2 internal prototype to avoid an error.  */
5063 /* We use char because int might match the return type of a gcc2
5064     builtin and then its argument prototype would still apply.  */
5065 char pthread_create();
5066
5067 int main() {
5068 pthread_create()
5069 ; return 0; }
5070 EOF
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5072   rm -rf conftest*
5073   eval "ac_cv_lib_$ac_lib_var=yes"
5074 else
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   eval "ac_cv_lib_$ac_lib_var=no"
5079 fi
5080 rm -f conftest*
5081 LIBS="$ac_save_LIBS"
5082
5083 fi
5084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5085   echo "$ac_t""yes" 1>&6
5086   
5087                                 ol_link_threads=posix
5088                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5089 else
5090   echo "$ac_t""no" 1>&6
5091 :
5092 fi
5093
5094                         LIBS="$save_LIBS"
5095                 fi
5096
5097                                 if test $ol_link_threads = no ; then
5098                                                 save_LIBS="$LIBS"
5099                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
5100 echo "configure:5101: checking for pthread_join in -lpthreads" >&5
5101 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
5102 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5103   echo $ac_n "(cached) $ac_c" 1>&6
5104 else
5105   ac_save_LIBS="$LIBS"
5106 LIBS="-lpthreads -Wl,-woff,85 $LIBS"
5107 cat > conftest.$ac_ext <<EOF
5108 #line 5109 "configure"
5109 #include "confdefs.h"
5110 /* Override any gcc2 internal prototype to avoid an error.  */
5111 /* We use char because int might match the return type of a gcc2
5112     builtin and then its argument prototype would still apply.  */
5113 char pthread_join();
5114
5115 int main() {
5116 pthread_join()
5117 ; return 0; }
5118 EOF
5119 if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5120   rm -rf conftest*
5121   eval "ac_cv_lib_$ac_lib_var=yes"
5122 else
5123   echo "configure: failed program was:" >&5
5124   cat conftest.$ac_ext >&5
5125   rm -rf conftest*
5126   eval "ac_cv_lib_$ac_lib_var=no"
5127 fi
5128 rm -f conftest*
5129 LIBS="$ac_save_LIBS"
5130
5131 fi
5132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5133   echo "$ac_t""yes" 1>&6
5134   
5135                                 ol_link_threads=posix
5136                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5137                                 
5138 else
5139   echo "$ac_t""no" 1>&6
5140 :
5141 fi
5142
5143                         LIBS="$save_LIBS"
5144                 fi
5145
5146                 if test $ol_link_threads = no ; then
5147                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
5148 echo "configure:5149: checking for pthread_create with -threads" >&5
5149 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
5150   echo $ac_n "(cached) $ac_c" 1>&6
5151 else
5152   
5153                                                                 save_LIBS="$LIBS"
5154                                 LIBS="-threads $LIBS"
5155                                 cat > conftest.$ac_ext <<EOF
5156 #line 5157 "configure"
5157 #include "confdefs.h"
5158 char pthread_create();
5159 int main() {
5160
5161                                         pthread_create();
5162                                         
5163 ; return 0; }
5164 EOF
5165 if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5166   rm -rf conftest*
5167   ol_cv_thread_flag=yes
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172   ol_cv_thread_flag=no
5173 fi
5174 rm -f conftest*
5175                                                                 LIBS="$save_LIBS"
5176                         
5177 fi
5178
5179 echo "$ac_t""$ol_cv_thread_flag" 1>&6
5180
5181                         if test $ol_cv_thread_flag = yes ; then
5182                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
5183                                 ol_link_threads=posix
5184                         fi
5185                 fi
5186
5187                 if test $ol_link_threads = no ; then
5188                                                 save_LIBS="$LIBS"
5189                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
5190 echo "configure:5191: checking for pthread_mutex_unlock in -lpthreads" >&5
5191 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
5192 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5193   echo $ac_n "(cached) $ac_c" 1>&6
5194 else
5195   ac_save_LIBS="$LIBS"
5196 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5197 cat > conftest.$ac_ext <<EOF
5198 #line 5199 "configure"
5199 #include "confdefs.h"
5200 /* Override any gcc2 internal prototype to avoid an error.  */
5201 /* We use char because int might match the return type of a gcc2
5202     builtin and then its argument prototype would still apply.  */
5203 char pthread_mutex_unlock();
5204
5205 int main() {
5206 pthread_mutex_unlock()
5207 ; return 0; }
5208 EOF
5209 if { (eval echo configure:5210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=yes"
5212 else
5213   echo "configure: failed program was:" >&5
5214   cat conftest.$ac_ext >&5
5215   rm -rf conftest*
5216   eval "ac_cv_lib_$ac_lib_var=no"
5217 fi
5218 rm -f conftest*
5219 LIBS="$ac_save_LIBS"
5220
5221 fi
5222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5223   echo "$ac_t""yes" 1>&6
5224   
5225                                 ol_link_threads=posix
5226                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
5227                                 if test $ol_with_yielding_select = auto ; then
5228                                         ol_with_yielding_select=yes
5229                                 fi
5230                                 
5231 else
5232   echo "$ac_t""no" 1>&6
5233 :
5234 fi
5235
5236                         LIBS="$save_LIBS"
5237                 fi
5238
5239                 if test $ol_link_threads = no ; then
5240                                                 save_LIBS="$LIBS"
5241                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
5242 echo "configure:5243: checking for pthread_mutex_lock in -lpthreads" >&5
5243 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
5244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   ac_save_LIBS="$LIBS"
5248 LIBS="-lpthreads -lmach -lexc $LIBS"
5249 cat > conftest.$ac_ext <<EOF
5250 #line 5251 "configure"
5251 #include "confdefs.h"
5252 /* Override any gcc2 internal prototype to avoid an error.  */
5253 /* We use char because int might match the return type of a gcc2
5254     builtin and then its argument prototype would still apply.  */
5255 char pthread_mutex_lock();
5256
5257 int main() {
5258 pthread_mutex_lock()
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262   rm -rf conftest*
5263   eval "ac_cv_lib_$ac_lib_var=yes"
5264 else
5265   echo "configure: failed program was:" >&5
5266   cat conftest.$ac_ext >&5
5267   rm -rf conftest*
5268   eval "ac_cv_lib_$ac_lib_var=no"
5269 fi
5270 rm -f conftest*
5271 LIBS="$ac_save_LIBS"
5272
5273 fi
5274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5275   echo "$ac_t""yes" 1>&6
5276   
5277                                 ol_link_threads=posix
5278                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc"
5279                                 if test $ol_with_yielding_select = auto ; then
5280                                         ol_with_yielding_select=yes
5281                                 fi
5282                                 
5283 else
5284   echo "$ac_t""no" 1>&6
5285 :
5286 fi
5287
5288                         LIBS="$save_LIBS"
5289                 fi
5290
5291                 if test $ol_link_threads = no ; then
5292                                                 save_LIBS="$LIBS"
5293                         echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6
5294 echo "configure:5295: checking for pthread_mutex_trylock in -lpthreads" >&5
5295 ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
5296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5297   echo $ac_n "(cached) $ac_c" 1>&6
5298 else
5299   ac_save_LIBS="$LIBS"
5300 LIBS="-lpthreads -lexc $LIBS"
5301 cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304 /* Override any gcc2 internal prototype to avoid an error.  */
5305 /* We use char because int might match the return type of a gcc2
5306     builtin and then its argument prototype would still apply.  */
5307 char pthread_mutex_trylock();
5308
5309 int main() {
5310 pthread_mutex_trylock()
5311 ; return 0; }
5312 EOF
5313 if { (eval echo configure:5314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5314   rm -rf conftest*
5315   eval "ac_cv_lib_$ac_lib_var=yes"
5316 else
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319   rm -rf conftest*
5320   eval "ac_cv_lib_$ac_lib_var=no"
5321 fi
5322 rm -f conftest*
5323 LIBS="$ac_save_LIBS"
5324
5325 fi
5326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5327   echo "$ac_t""yes" 1>&6
5328   
5329                                 ol_link_threads=posix
5330                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
5331                                 if test $ol_with_yielding_select = auto ; then
5332                                         ol_with_yielding_select=yes
5333                                 fi
5334                                 
5335 else
5336   echo "$ac_t""no" 1>&6
5337 :
5338 fi
5339
5340                         LIBS="$save_LIBS"
5341                 fi
5342
5343                 if test $ol_link_threads != no ; then
5344                         cat >> confdefs.h <<\EOF
5345 #define HAVE_PTHREADS 1
5346 EOF
5347
5348
5349                                                 save_CPPFLAGS="$CPPFLAGS"
5350                         save_LIBS="$LIBS"
5351                         LIBS="$LTHREAD_LIBS $LIBS"
5352
5353                                                                                                 for ac_func in sched_yield pthread_yield
5354 do
5355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5356 echo "configure:5357: checking for $ac_func" >&5
5357 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5358   echo $ac_n "(cached) $ac_c" 1>&6
5359 else
5360   cat > conftest.$ac_ext <<EOF
5361 #line 5362 "configure"
5362 #include "confdefs.h"
5363 /* System header to define __stub macros and hopefully few prototypes,
5364     which can conflict with char $ac_func(); below.  */
5365 #include <assert.h>
5366 /* Override any gcc2 internal prototype to avoid an error.  */
5367 /* We use char because int might match the return type of a gcc2
5368     builtin and then its argument prototype would still apply.  */
5369 char $ac_func();
5370
5371 int main() {
5372
5373 /* The GNU C library defines this for functions which it implements
5374     to always fail with ENOSYS.  Some functions are actually named
5375     something starting with __ and the normal name is an alias.  */
5376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5377 choke me
5378 #else
5379 $ac_func();
5380 #endif
5381
5382 ; return 0; }
5383 EOF
5384 if { (eval echo configure:5385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5385   rm -rf conftest*
5386   eval "ac_cv_func_$ac_func=yes"
5387 else
5388   echo "configure: failed program was:" >&5
5389   cat conftest.$ac_ext >&5
5390   rm -rf conftest*
5391   eval "ac_cv_func_$ac_func=no"
5392 fi
5393 rm -f conftest*
5394 fi
5395
5396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5397   echo "$ac_t""yes" 1>&6
5398     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5399   cat >> confdefs.h <<EOF
5400 #define $ac_tr_func 1
5401 EOF
5402  
5403 else
5404   echo "$ac_t""no" 1>&6
5405 fi
5406 done
5407
5408
5409                         if test $ac_cv_func_sched_yield = no -a \
5410                                 $ac_cv_func_pthread_yield = no ; then
5411                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5412 echo "configure:5413: checking for sched_yield in -lrt" >&5
5413 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5415   echo $ac_n "(cached) $ac_c" 1>&6
5416 else
5417   ac_save_LIBS="$LIBS"
5418 LIBS="-lrt  $LIBS"
5419 cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 /* Override any gcc2 internal prototype to avoid an error.  */
5423 /* We use char because int might match the return type of a gcc2
5424     builtin and then its argument prototype would still apply.  */
5425 char sched_yield();
5426
5427 int main() {
5428 sched_yield()
5429 ; return 0; }
5430 EOF
5431 if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5432   rm -rf conftest*
5433   eval "ac_cv_lib_$ac_lib_var=yes"
5434 else
5435   echo "configure: failed program was:" >&5
5436   cat conftest.$ac_ext >&5
5437   rm -rf conftest*
5438   eval "ac_cv_lib_$ac_lib_var=no"
5439 fi
5440 rm -f conftest*
5441 LIBS="$ac_save_LIBS"
5442
5443 fi
5444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5445   echo "$ac_t""yes" 1>&6
5446   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5447                                         cat >> confdefs.h <<\EOF
5448 #define HAVE_SCHED_YIELD 1
5449 EOF
5450
5451                                         ac_cv_func_sched_yield=yes
5452 else
5453   echo "$ac_t""no" 1>&6
5454 ac_cv_func_sched_yield=no
5455 fi
5456
5457                         fi
5458                         if test $ac_cv_func_sched_yield = no -a \
5459                                 $ac_cv_func_pthread_yield = no ; then
5460                                                                                                 for ac_func in thr_yield
5461 do
5462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5463 echo "configure:5464: checking for $ac_func" >&5
5464 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5465   echo $ac_n "(cached) $ac_c" 1>&6
5466 else
5467   cat > conftest.$ac_ext <<EOF
5468 #line 5469 "configure"
5469 #include "confdefs.h"
5470 /* System header to define __stub macros and hopefully few prototypes,
5471     which can conflict with char $ac_func(); below.  */
5472 #include <assert.h>
5473 /* Override any gcc2 internal prototype to avoid an error.  */
5474 /* We use char because int might match the return type of a gcc2
5475     builtin and then its argument prototype would still apply.  */
5476 char $ac_func();
5477
5478 int main() {
5479
5480 /* The GNU C library defines this for functions which it implements
5481     to always fail with ENOSYS.  Some functions are actually named
5482     something starting with __ and the normal name is an alias.  */
5483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5484 choke me
5485 #else
5486 $ac_func();
5487 #endif
5488
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5492   rm -rf conftest*
5493   eval "ac_cv_func_$ac_func=yes"
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_func_$ac_func=no"
5499 fi
5500 rm -f conftest*
5501 fi
5502
5503 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5504   echo "$ac_t""yes" 1>&6
5505     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5506   cat >> confdefs.h <<EOF
5507 #define $ac_tr_func 1
5508 EOF
5509  
5510 else
5511   echo "$ac_t""no" 1>&6
5512 fi
5513 done
5514
5515                         fi
5516                         if test $ac_cv_func_sched_yield = no -a \
5517                                 $ac_cv_func_pthread_yield = no -a \
5518                                 "$ac_cv_func_thr_yield" = no ; then
5519                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5520                         fi
5521
5522                                                 for ac_func in pthread_kill
5523 do
5524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5525 echo "configure:5526: checking for $ac_func" >&5
5526 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5527   echo $ac_n "(cached) $ac_c" 1>&6
5528 else
5529   cat > conftest.$ac_ext <<EOF
5530 #line 5531 "configure"
5531 #include "confdefs.h"
5532 /* System header to define __stub macros and hopefully few prototypes,
5533     which can conflict with char $ac_func(); below.  */
5534 #include <assert.h>
5535 /* Override any gcc2 internal prototype to avoid an error.  */
5536 /* We use char because int might match the return type of a gcc2
5537     builtin and then its argument prototype would still apply.  */
5538 char $ac_func();
5539
5540 int main() {
5541
5542 /* The GNU C library defines this for functions which it implements
5543     to always fail with ENOSYS.  Some functions are actually named
5544     something starting with __ and the normal name is an alias.  */
5545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5546 choke me
5547 #else
5548 $ac_func();
5549 #endif
5550
5551 ; return 0; }
5552 EOF
5553 if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5554   rm -rf conftest*
5555   eval "ac_cv_func_$ac_func=yes"
5556 else
5557   echo "configure: failed program was:" >&5
5558   cat conftest.$ac_ext >&5
5559   rm -rf conftest*
5560   eval "ac_cv_func_$ac_func=no"
5561 fi
5562 rm -f conftest*
5563 fi
5564
5565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5566   echo "$ac_t""yes" 1>&6
5567     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5568   cat >> confdefs.h <<EOF
5569 #define $ac_tr_func 1
5570 EOF
5571  
5572 else
5573   echo "$ac_t""no" 1>&6
5574 fi
5575 done
5576
5577
5578                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5579 echo "configure:5580: checking for pthread_detach with <pthread.h>" >&5
5580 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5581   echo $ac_n "(cached) $ac_c" 1>&6
5582 else
5583   
5584                                                                 cat > conftest.$ac_ext <<EOF
5585 #line 5586 "configure"
5586 #include "confdefs.h"
5587
5588 #include <pthread.h>
5589 #ifndef NULL
5590 #define NULL (void*)0
5591 #endif
5592
5593 int main() {
5594 pthread_detach(NULL);
5595 ; return 0; }
5596 EOF
5597 if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5598   rm -rf conftest*
5599   ol_cv_func_pthread_detach=yes
5600 else
5601   echo "configure: failed program was:" >&5
5602   cat conftest.$ac_ext >&5
5603   rm -rf conftest*
5604   ol_cv_func_pthread_detach=no
5605 fi
5606 rm -f conftest*
5607                         
5608 fi
5609
5610 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5611
5612                         if test $ol_cv_func_pthread_detach = no ; then
5613                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
5614                         fi
5615
5616                         cat >> confdefs.h <<\EOF
5617 #define HAVE_PTHREAD_DETACH 1
5618 EOF
5619
5620
5621                                                 for ac_func in \
5622                                 pthread_setconcurrency \
5623                                 pthread_getconcurrency \
5624                                 thr_setconcurrency \
5625                                 thr_getconcurrency \
5626                         
5627 do
5628 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5629 echo "configure:5630: checking for $ac_func" >&5
5630 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5631   echo $ac_n "(cached) $ac_c" 1>&6
5632 else
5633   cat > conftest.$ac_ext <<EOF
5634 #line 5635 "configure"
5635 #include "confdefs.h"
5636 /* System header to define __stub macros and hopefully few prototypes,
5637     which can conflict with char $ac_func(); below.  */
5638 #include <assert.h>
5639 /* Override any gcc2 internal prototype to avoid an error.  */
5640 /* We use char because int might match the return type of a gcc2
5641     builtin and then its argument prototype would still apply.  */
5642 char $ac_func();
5643
5644 int main() {
5645
5646 /* The GNU C library defines this for functions which it implements
5647     to always fail with ENOSYS.  Some functions are actually named
5648     something starting with __ and the normal name is an alias.  */
5649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5650 choke me
5651 #else
5652 $ac_func();
5653 #endif
5654
5655 ; return 0; }
5656 EOF
5657 if { (eval echo configure:5658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5658   rm -rf conftest*
5659   eval "ac_cv_func_$ac_func=yes"
5660 else
5661   echo "configure: failed program was:" >&5
5662   cat conftest.$ac_ext >&5
5663   rm -rf conftest*
5664   eval "ac_cv_func_$ac_func=no"
5665 fi
5666 rm -f conftest*
5667 fi
5668
5669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5670   echo "$ac_t""yes" 1>&6
5671     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5672   cat >> confdefs.h <<EOF
5673 #define $ac_tr_func 1
5674 EOF
5675  
5676 else
5677   echo "$ac_t""no" 1>&6
5678 fi
5679 done
5680
5681
5682                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
5683 echo "configure:5684: checking if pthread_create() works" >&5
5684                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
5685   echo $ac_n "(cached) $ac_c" 1>&6
5686 else
5687   
5688                         if test "$cross_compiling" = yes; then
5689                                 ol_cv_pthread_create_works=yes
5690 else
5691   cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694
5695 #include <pthread.h>
5696 #ifndef NULL
5697 #define NULL (void*)0
5698 #endif
5699
5700 static void *task(p)
5701         void *p;
5702 {
5703         return (void *) (p == NULL);
5704 }
5705
5706 int main(argc, argv)
5707         int argc;
5708         char **argv;
5709 {
5710         pthread_t t;
5711 #if HAVE_PTHREADS_D4
5712         exit(pthread_create(&t, pthread_attr_default, task, NULL));
5713 #else
5714         exit(pthread_create(&t, NULL, task, NULL));
5715 #endif
5716 }
5717
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5720 then
5721   ol_cv_pthread_create_works=yes
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -fr conftest*
5726   ol_cv_pthread_create_works=no
5727 fi
5728 rm -fr conftest*
5729 fi
5730
5731 fi
5732
5733                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
5734
5735                         if test $ol_cv_pthread_create_works = no ; then
5736                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
5737                         fi
5738
5739                                                 if test $ol_with_yielding_select = auto ; then
5740                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
5741 echo "configure:5742: checking if select yields when using pthreads" >&5
5742                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
5743   echo $ac_n "(cached) $ac_c" 1>&6
5744 else
5745   
5746                                 if test "$cross_compiling" = yes; then
5747   
5748                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
5749 else
5750   cat > conftest.$ac_ext <<EOF
5751 #line 5752 "configure"
5752 #include "confdefs.h"
5753
5754 #include <sys/types.h>
5755 #include <sys/time.h>
5756 #include <unistd.h>
5757 #include <pthread.h>
5758 #ifndef NULL
5759 #define NULL (void*) 0
5760 #endif
5761
5762 static int fildes[2];
5763
5764 static void *task(p)
5765         void *p;
5766 {
5767         int i;
5768         struct timeval tv;
5769
5770         fd_set rfds;
5771
5772         tv.tv_sec=10;
5773         tv.tv_usec=0;
5774
5775         FD_ZERO(&rfds);
5776         FD_SET(fildes[0], &rfds);
5777
5778         /* we're not interested in any fds */
5779         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
5780
5781         if(i < 0) {
5782                 perror("select");
5783                 exit(10);
5784         }
5785
5786         exit(0); /* if we exit here, the select blocked the whole process */
5787 }
5788
5789 int main(argc, argv)
5790         int argc;
5791         char **argv;
5792 {
5793         pthread_t t;
5794
5795         /* create a pipe to select */
5796         if(pipe(&fildes[0])) {
5797                 perror("select");
5798                 exit(1);
5799         }
5800
5801 #ifdef HAVE_PTHREAD_SETCONCURRENCY
5802         (void) pthread_setconcurrency(2);
5803 #else
5804 #ifdef HAVE_THR_SETCONCURRENCY
5805         /* Set Solaris LWP concurrency to 2 */
5806         thr_setconcurrency(2);
5807 #endif
5808 #endif
5809
5810 #if HAVE_PTHREADS_D4
5811         pthread_create(&t, pthread_attr_default, task, NULL);
5812 #else
5813         pthread_create(&t, NULL, task, NULL);
5814 #endif
5815
5816 #if HAVE_SCHED_YIELD
5817         sched_yield();  /* make sure task runs first */
5818 #else
5819 #ifdef HAVE_PTHREAD_YIELD
5820         pthread_yield();        /* make sure task runs first */
5821 #endif
5822 #endif
5823
5824         exit(2);
5825 }
5826 EOF
5827 if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5828 then
5829   ol_cv_pthread_select_yields=no
5830 else
5831   echo "configure: failed program was:" >&5
5832   cat conftest.$ac_ext >&5
5833   rm -fr conftest*
5834   ol_cv_pthread_select_yields=yes
5835 fi
5836 rm -fr conftest*
5837 fi
5838
5839 fi
5840
5841                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5842
5843                                 if test $ol_cv_pthread_select_yields = yes ; then
5844                                         ol_with_yielding_select=yes
5845                                 fi
5846                         fi
5847
5848                                                 CPPFLAGS="$save_CPPFLAGS"
5849                         LIBS="$save_LIBS"
5850                 else
5851                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5852                 fi
5853         fi
5854
5855         if test $ol_with_threads = posix ; then
5856                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5857         fi
5858 fi
5859
5860 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5861         -o $ol_with_threads = mach ; then
5862
5863                 for ac_hdr in mach/cthreads.h
5864 do
5865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5867 echo "configure:5868: checking for $ac_hdr" >&5
5868 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5869   echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871   cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 #include <$ac_hdr>
5875 EOF
5876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5877 { (eval echo configure:5878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5879 if test -z "$ac_err"; then
5880   rm -rf conftest*
5881   eval "ac_cv_header_$ac_safe=yes"
5882 else
5883   echo "$ac_err" >&5
5884   echo "configure: failed program was:" >&5
5885   cat conftest.$ac_ext >&5
5886   rm -rf conftest*
5887   eval "ac_cv_header_$ac_safe=no"
5888 fi
5889 rm -f conftest*
5890 fi
5891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5892   echo "$ac_t""yes" 1>&6
5893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5894   cat >> confdefs.h <<EOF
5895 #define $ac_tr_hdr 1
5896 EOF
5897  
5898 else
5899   echo "$ac_t""no" 1>&6
5900 fi
5901 done
5902
5903         if test $ac_cv_header_mach_cthreads_h = yes ; then
5904                 ol_with_threads=found
5905
5906                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
5907 echo "configure:5908: checking for cthread_fork" >&5
5908 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
5909   echo $ac_n "(cached) $ac_c" 1>&6
5910 else
5911   cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* System header to define __stub macros and hopefully few prototypes,
5915     which can conflict with char cthread_fork(); below.  */
5916 #include <assert.h>
5917 /* Override any gcc2 internal prototype to avoid an error.  */
5918 /* We use char because int might match the return type of a gcc2
5919     builtin and then its argument prototype would still apply.  */
5920 char cthread_fork();
5921
5922 int main() {
5923
5924 /* The GNU C library defines this for functions which it implements
5925     to always fail with ENOSYS.  Some functions are actually named
5926     something starting with __ and the normal name is an alias.  */
5927 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
5928 choke me
5929 #else
5930 cthread_fork();
5931 #endif
5932
5933 ; return 0; }
5934 EOF
5935 if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5936   rm -rf conftest*
5937   eval "ac_cv_func_cthread_fork=yes"
5938 else
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   eval "ac_cv_func_cthread_fork=no"
5943 fi
5944 rm -f conftest*
5945 fi
5946
5947 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
5948   echo "$ac_t""yes" 1>&6
5949   ol_link_threads=yes
5950 else
5951   echo "$ac_t""no" 1>&6
5952 fi
5953
5954
5955                 if test $ol_link_threads = no ; then
5956                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
5957 echo "configure:5958: checking for cthread_fork with -all_load" >&5
5958 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
5959   echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961   
5962                                                                 save_LIBS="$LIBS"
5963                                 LIBS="-all_load $LIBS"
5964                                 cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5967 #include <mach/cthreads.h>
5968 int main() {
5969
5970                                         cthread_fork((void *)0, (void *)0);
5971                                         
5972 ; return 0; }
5973 EOF
5974 if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5975   rm -rf conftest*
5976   ol_cv_cthread_all_load=yes
5977 else
5978   echo "configure: failed program was:" >&5
5979   cat conftest.$ac_ext >&5
5980   rm -rf conftest*
5981   ol_cv_cthread_all_load=no
5982 fi
5983 rm -f conftest*
5984                                                                 LIBS="$save_LIBS"
5985                         
5986 fi
5987
5988 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
5989
5990                         if test $ol_cv_cthread_all_load = yes ; then
5991                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
5992                                 ol_link_threads=mach
5993                         fi
5994                 fi
5995
5996                 if test $ol_link_threads != no ; then
5997                         : check for cthread specific functionality here
5998                         cat >> confdefs.h <<\EOF
5999 #define HAVE_MACH_CTHREADS 1
6000 EOF
6001
6002                 else
6003                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6004                 fi
6005         fi
6006
6007         if test $ol_with_threads = mach ; then
6008                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6009         fi
6010 fi
6011
6012 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6013         -o $ol_with_threads = lwp ; then
6014
6015                 for ac_hdr in thread.h synch.h
6016 do
6017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6019 echo "configure:6020: checking for $ac_hdr" >&5
6020 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6021   echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023   cat > conftest.$ac_ext <<EOF
6024 #line 6025 "configure"
6025 #include "confdefs.h"
6026 #include <$ac_hdr>
6027 EOF
6028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6029 { (eval echo configure:6030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6031 if test -z "$ac_err"; then
6032   rm -rf conftest*
6033   eval "ac_cv_header_$ac_safe=yes"
6034 else
6035   echo "$ac_err" >&5
6036   echo "configure: failed program was:" >&5
6037   cat conftest.$ac_ext >&5
6038   rm -rf conftest*
6039   eval "ac_cv_header_$ac_safe=no"
6040 fi
6041 rm -f conftest*
6042 fi
6043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6044   echo "$ac_t""yes" 1>&6
6045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6046   cat >> confdefs.h <<EOF
6047 #define $ac_tr_hdr 1
6048 EOF
6049  
6050 else
6051   echo "$ac_t""no" 1>&6
6052 fi
6053 done
6054
6055         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6056                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6057 echo "configure:6058: checking for thr_create in -lthread" >&5
6058 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6059 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6060   echo $ac_n "(cached) $ac_c" 1>&6
6061 else
6062   ac_save_LIBS="$LIBS"
6063 LIBS="-lthread  $LIBS"
6064 cat > conftest.$ac_ext <<EOF
6065 #line 6066 "configure"
6066 #include "confdefs.h"
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 /* We use char because int might match the return type of a gcc2
6069     builtin and then its argument prototype would still apply.  */
6070 char thr_create();
6071
6072 int main() {
6073 thr_create()
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_lib_$ac_lib_var=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_lib_$ac_lib_var=no"
6084 fi
6085 rm -f conftest*
6086 LIBS="$ac_save_LIBS"
6087
6088 fi
6089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6090   echo "$ac_t""yes" 1>&6
6091   have_thr=yes
6092 else
6093   echo "$ac_t""no" 1>&6
6094 have_thr=no
6095 fi
6096
6097
6098                 if test $have_thr = yes ; then
6099                         cat >> confdefs.h <<\EOF
6100 #define HAVE_THR 1
6101 EOF
6102
6103                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6104                         ol_link_threads=thr
6105
6106                         if test $ol_with_yielding_select = auto ; then
6107                                 ol_with_yielding_select=yes
6108                         fi
6109
6110                                                 for ac_func in \
6111                                 thr_setconcurrency \
6112                                 thr_getconcurrency \
6113                         
6114 do
6115 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6116 echo "configure:6117: checking for $ac_func" >&5
6117 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6118   echo $ac_n "(cached) $ac_c" 1>&6
6119 else
6120   cat > conftest.$ac_ext <<EOF
6121 #line 6122 "configure"
6122 #include "confdefs.h"
6123 /* System header to define __stub macros and hopefully few prototypes,
6124     which can conflict with char $ac_func(); below.  */
6125 #include <assert.h>
6126 /* Override any gcc2 internal prototype to avoid an error.  */
6127 /* We use char because int might match the return type of a gcc2
6128     builtin and then its argument prototype would still apply.  */
6129 char $ac_func();
6130
6131 int main() {
6132
6133 /* The GNU C library defines this for functions which it implements
6134     to always fail with ENOSYS.  Some functions are actually named
6135     something starting with __ and the normal name is an alias.  */
6136 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6137 choke me
6138 #else
6139 $ac_func();
6140 #endif
6141
6142 ; return 0; }
6143 EOF
6144 if { (eval echo configure:6145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6145   rm -rf conftest*
6146   eval "ac_cv_func_$ac_func=yes"
6147 else
6148   echo "configure: failed program was:" >&5
6149   cat conftest.$ac_ext >&5
6150   rm -rf conftest*
6151   eval "ac_cv_func_$ac_func=no"
6152 fi
6153 rm -f conftest*
6154 fi
6155
6156 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6157   echo "$ac_t""yes" 1>&6
6158     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6159   cat >> confdefs.h <<EOF
6160 #define $ac_tr_func 1
6161 EOF
6162  
6163 else
6164   echo "$ac_t""no" 1>&6
6165 fi
6166 done
6167
6168                 fi
6169         fi
6170
6171                 for ac_hdr in lwp/lwp.h
6172 do
6173 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6174 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6175 echo "configure:6176: checking for $ac_hdr" >&5
6176 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182 #include <$ac_hdr>
6183 EOF
6184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6185 { (eval echo configure:6186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6187 if test -z "$ac_err"; then
6188   rm -rf conftest*
6189   eval "ac_cv_header_$ac_safe=yes"
6190 else
6191   echo "$ac_err" >&5
6192   echo "configure: failed program was:" >&5
6193   cat conftest.$ac_ext >&5
6194   rm -rf conftest*
6195   eval "ac_cv_header_$ac_safe=no"
6196 fi
6197 rm -f conftest*
6198 fi
6199 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6200   echo "$ac_t""yes" 1>&6
6201     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6202   cat >> confdefs.h <<EOF
6203 #define $ac_tr_hdr 1
6204 EOF
6205  
6206 else
6207   echo "$ac_t""no" 1>&6
6208 fi
6209 done
6210
6211         if test $ac_cv_header_lwp_lwp_h = yes ; then
6212                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6213 echo "configure:6214: checking for lwp_create in -llwp" >&5
6214 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6215 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6216   echo $ac_n "(cached) $ac_c" 1>&6
6217 else
6218   ac_save_LIBS="$LIBS"
6219 LIBS="-llwp  $LIBS"
6220 cat > conftest.$ac_ext <<EOF
6221 #line 6222 "configure"
6222 #include "confdefs.h"
6223 /* Override any gcc2 internal prototype to avoid an error.  */
6224 /* We use char because int might match the return type of a gcc2
6225     builtin and then its argument prototype would still apply.  */
6226 char lwp_create();
6227
6228 int main() {
6229 lwp_create()
6230 ; return 0; }
6231 EOF
6232 if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6233   rm -rf conftest*
6234   eval "ac_cv_lib_$ac_lib_var=yes"
6235 else
6236   echo "configure: failed program was:" >&5
6237   cat conftest.$ac_ext >&5
6238   rm -rf conftest*
6239   eval "ac_cv_lib_$ac_lib_var=no"
6240 fi
6241 rm -f conftest*
6242 LIBS="$ac_save_LIBS"
6243
6244 fi
6245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6246   echo "$ac_t""yes" 1>&6
6247   have_lwp=yes
6248 else
6249   echo "$ac_t""no" 1>&6
6250 have_lwp=no
6251 fi
6252
6253
6254                 if test $have_lwp = yes ; then
6255                         cat >> confdefs.h <<\EOF
6256 #define HAVE_LWP 1
6257 EOF
6258
6259                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6260                         ol_link_threads=lwp
6261
6262                         if test $ol_with_yielding_select = auto ; then
6263                                 ol_with_yielding_select=no
6264                         fi
6265                 fi
6266         fi
6267 fi
6268
6269 if test $ol_with_yielding_select = yes ; then
6270         cat >> confdefs.h <<\EOF
6271 #define HAVE_YIELDING_SELECT 1
6272 EOF
6273
6274 fi
6275
6276 if test $ol_with_threads = manual ; then
6277                 ol_link_threads=yes
6278
6279         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6280
6281         for ac_hdr in pthread.h sched.h
6282 do
6283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6285 echo "configure:6286: checking for $ac_hdr" >&5
6286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6287   echo $ac_n "(cached) $ac_c" 1>&6
6288 else
6289   cat > conftest.$ac_ext <<EOF
6290 #line 6291 "configure"
6291 #include "confdefs.h"
6292 #include <$ac_hdr>
6293 EOF
6294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6295 { (eval echo configure:6296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6297 if test -z "$ac_err"; then
6298   rm -rf conftest*
6299   eval "ac_cv_header_$ac_safe=yes"
6300 else
6301   echo "$ac_err" >&5
6302   echo "configure: failed program was:" >&5
6303   cat conftest.$ac_ext >&5
6304   rm -rf conftest*
6305   eval "ac_cv_header_$ac_safe=no"
6306 fi
6307 rm -f conftest*
6308 fi
6309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6310   echo "$ac_t""yes" 1>&6
6311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6312   cat >> confdefs.h <<EOF
6313 #define $ac_tr_hdr 1
6314 EOF
6315  
6316 else
6317   echo "$ac_t""no" 1>&6
6318 fi
6319 done
6320
6321         for ac_func in sched_yield pthread_yield
6322 do
6323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6324 echo "configure:6325: checking for $ac_func" >&5
6325 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6326   echo $ac_n "(cached) $ac_c" 1>&6
6327 else
6328   cat > conftest.$ac_ext <<EOF
6329 #line 6330 "configure"
6330 #include "confdefs.h"
6331 /* System header to define __stub macros and hopefully few prototypes,
6332     which can conflict with char $ac_func(); below.  */
6333 #include <assert.h>
6334 /* Override any gcc2 internal prototype to avoid an error.  */
6335 /* We use char because int might match the return type of a gcc2
6336     builtin and then its argument prototype would still apply.  */
6337 char $ac_func();
6338
6339 int main() {
6340
6341 /* The GNU C library defines this for functions which it implements
6342     to always fail with ENOSYS.  Some functions are actually named
6343     something starting with __ and the normal name is an alias.  */
6344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6345 choke me
6346 #else
6347 $ac_func();
6348 #endif
6349
6350 ; return 0; }
6351 EOF
6352 if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6353   rm -rf conftest*
6354   eval "ac_cv_func_$ac_func=yes"
6355 else
6356   echo "configure: failed program was:" >&5
6357   cat conftest.$ac_ext >&5
6358   rm -rf conftest*
6359   eval "ac_cv_func_$ac_func=no"
6360 fi
6361 rm -f conftest*
6362 fi
6363
6364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6365   echo "$ac_t""yes" 1>&6
6366     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6367   cat >> confdefs.h <<EOF
6368 #define $ac_tr_func 1
6369 EOF
6370  
6371 else
6372   echo "$ac_t""no" 1>&6
6373 fi
6374 done
6375
6376         
6377 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
6378 echo "configure:6379: checking for LinuxThreads" >&5
6379 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6380   echo $ac_n "(cached) $ac_c" 1>&6
6381 else
6382   
6383         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
6384         if test "$res" -gt 0 ; then
6385                 ol_cv_linux_threads=yes
6386         else
6387                 ol_cv_linux_threads=no
6388         fi
6389
6390 fi
6391
6392 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6393
6394
6395         for ac_hdr in mach/cthreads.h
6396 do
6397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6399 echo "configure:6400: checking for $ac_hdr" >&5
6400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6401   echo $ac_n "(cached) $ac_c" 1>&6
6402 else
6403   cat > conftest.$ac_ext <<EOF
6404 #line 6405 "configure"
6405 #include "confdefs.h"
6406 #include <$ac_hdr>
6407 EOF
6408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6409 { (eval echo configure:6410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6411 if test -z "$ac_err"; then
6412   rm -rf conftest*
6413   eval "ac_cv_header_$ac_safe=yes"
6414 else
6415   echo "$ac_err" >&5
6416   echo "configure: failed program was:" >&5
6417   cat conftest.$ac_ext >&5
6418   rm -rf conftest*
6419   eval "ac_cv_header_$ac_safe=no"
6420 fi
6421 rm -f conftest*
6422 fi
6423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6424   echo "$ac_t""yes" 1>&6
6425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6426   cat >> confdefs.h <<EOF
6427 #define $ac_tr_hdr 1
6428 EOF
6429  
6430 else
6431   echo "$ac_t""no" 1>&6
6432 fi
6433 done
6434
6435         for ac_hdr in lwp/lwp.h
6436 do
6437 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6438 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6439 echo "configure:6440: checking for $ac_hdr" >&5
6440 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6441   echo $ac_n "(cached) $ac_c" 1>&6
6442 else
6443   cat > conftest.$ac_ext <<EOF
6444 #line 6445 "configure"
6445 #include "confdefs.h"
6446 #include <$ac_hdr>
6447 EOF
6448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6449 { (eval echo configure:6450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6451 if test -z "$ac_err"; then
6452   rm -rf conftest*
6453   eval "ac_cv_header_$ac_safe=yes"
6454 else
6455   echo "$ac_err" >&5
6456   echo "configure: failed program was:" >&5
6457   cat conftest.$ac_ext >&5
6458   rm -rf conftest*
6459   eval "ac_cv_header_$ac_safe=no"
6460 fi
6461 rm -f conftest*
6462 fi
6463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6464   echo "$ac_t""yes" 1>&6
6465     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6466   cat >> confdefs.h <<EOF
6467 #define $ac_tr_hdr 1
6468 EOF
6469  
6470 else
6471   echo "$ac_t""no" 1>&6
6472 fi
6473 done
6474
6475         for ac_hdr in thread.h synch.h
6476 do
6477 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6478 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6479 echo "configure:6480: checking for $ac_hdr" >&5
6480 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6481   echo $ac_n "(cached) $ac_c" 1>&6
6482 else
6483   cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486 #include <$ac_hdr>
6487 EOF
6488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6489 { (eval echo configure:6490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6491 if test -z "$ac_err"; then
6492   rm -rf conftest*
6493   eval "ac_cv_header_$ac_safe=yes"
6494 else
6495   echo "$ac_err" >&5
6496   echo "configure: failed program was:" >&5
6497   cat conftest.$ac_ext >&5
6498   rm -rf conftest*
6499   eval "ac_cv_header_$ac_safe=no"
6500 fi
6501 rm -f conftest*
6502 fi
6503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6504   echo "$ac_t""yes" 1>&6
6505     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6506   cat >> confdefs.h <<EOF
6507 #define $ac_tr_hdr 1
6508 EOF
6509  
6510 else
6511   echo "$ac_t""no" 1>&6
6512 fi
6513 done
6514
6515 fi
6516
6517 if test $ol_link_threads != no ; then  
6518                         cat >> confdefs.h <<\EOF
6519 #define REENTRANT 1
6520 EOF
6521
6522         cat >> confdefs.h <<\EOF
6523 #define _REENTRANT 1
6524 EOF
6525
6526         cat >> confdefs.h <<\EOF
6527 #define THREAD_SAFE 1
6528 EOF
6529
6530         cat >> confdefs.h <<\EOF
6531 #define _THREAD_SAFE 1
6532 EOF
6533
6534         cat >> confdefs.h <<\EOF
6535 #define THREADSAFE 1
6536 EOF
6537
6538         cat >> confdefs.h <<\EOF
6539 #define _THREADSAFE 1
6540 EOF
6541
6542
6543                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
6544 echo "configure:6545: checking for thread specific errno" >&5
6545 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   
6549                 cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 #include <errno.h>
6553 int main() {
6554 int x = errno;
6555 ; return 0; }
6556 EOF
6557 if { (eval echo configure:6558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6558   rm -rf conftest*
6559   ol_cv_errno_thread_specific=yes
6560 else
6561   echo "configure: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   rm -rf conftest*
6564   ol_cv_errno_thread_specific=no
6565 fi
6566 rm -f conftest*
6567         
6568 fi
6569
6570 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
6571
6572         if test $ol_cv_errno_thread_specific != yes ; then
6573                 LIBS="$LTHREAD_LIBS $LIBS"
6574                 LTHREAD_LIBS=""
6575         fi
6576
6577 fi  
6578
6579 if test $ol_link_threads = no ; then
6580         if test $ol_with_threads = yes ; then
6581                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
6582         fi
6583
6584         if test $ol_with_threads = auto ; then
6585                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
6586                 ol_with_threads=no
6587         fi
6588
6589         cat >> confdefs.h <<\EOF
6590 #define NO_THREADS 1
6591 EOF
6592
6593         LTHREAD_LIBS=""
6594 fi
6595
6596 if test $ol_link_threads != no ; then
6597         cat >> confdefs.h <<\EOF
6598 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
6599 EOF
6600
6601 fi
6602
6603
6604 ol_link_ldbm=no 
6605 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
6606         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
6607 echo "configure:6608: checking for DB2 library" >&5
6608 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
6609   echo $ac_n "(cached) $ac_c" 1>&6
6610 else
6611         ol_LIBS="$LIBS"
6612         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
6613 echo "configure:6614: checking for db_open in -ldb" >&5
6614 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
6615 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6616   echo $ac_n "(cached) $ac_c" 1>&6
6617 else
6618   ac_save_LIBS="$LIBS"
6619 LIBS="-ldb  $LIBS"
6620 cat > conftest.$ac_ext <<EOF
6621 #line 6622 "configure"
6622 #include "confdefs.h"
6623 /* Override any gcc2 internal prototype to avoid an error.  */
6624 /* We use char because int might match the return type of a gcc2
6625     builtin and then its argument prototype would still apply.  */
6626 char db_open();
6627
6628 int main() {
6629 db_open()
6630 ; return 0; }
6631 EOF
6632 if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6633   rm -rf conftest*
6634   eval "ac_cv_lib_$ac_lib_var=yes"
6635 else
6636   echo "configure: failed program was:" >&5
6637   cat conftest.$ac_ext >&5
6638   rm -rf conftest*
6639   eval "ac_cv_lib_$ac_lib_var=no"
6640 fi
6641 rm -f conftest*
6642 LIBS="$ac_save_LIBS"
6643
6644 fi
6645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6646   echo "$ac_t""yes" 1>&6
6647   ol_cv_lib_db2=-ldb
6648 else
6649   echo "$ac_t""no" 1>&6
6650 ol_cv_lib_db2=no
6651 fi
6652
6653         LIBS="$ol_LIBS"
6654
6655 fi
6656
6657 echo "$ac_t""$ol_cv_lib_db2" 1>&6
6658
6659 for ac_hdr in db.h
6660 do
6661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6663 echo "configure:6664: checking for $ac_hdr" >&5
6664 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 #include <$ac_hdr>
6671 EOF
6672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6673 { (eval echo configure:6674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6675 if test -z "$ac_err"; then
6676   rm -rf conftest*
6677   eval "ac_cv_header_$ac_safe=yes"
6678 else
6679   echo "$ac_err" >&5
6680   echo "configure: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682   rm -rf conftest*
6683   eval "ac_cv_header_$ac_safe=no"
6684 fi
6685 rm -f conftest*
6686 fi
6687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6688   echo "$ac_t""yes" 1>&6
6689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6690   cat >> confdefs.h <<EOF
6691 #define $ac_tr_hdr 1
6692 EOF
6693  
6694 else
6695   echo "$ac_t""no" 1>&6
6696 fi
6697 done
6698
6699 if test $ac_cv_header_db_h = yes ; then
6700         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
6701 echo "configure:6702: checking if db.h is DB2" >&5
6702 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
6703   echo $ac_n "(cached) $ac_c" 1>&6
6704 else
6705   
6706                 cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709
6710 #                       include <db.h>
6711                         /* this check could be improved */
6712 #                       ifdef DB_VERSION_MAJOR
6713 #                               if DB_VERSION_MAJOR == 2
6714                                         __db_version_2
6715 #                               endif
6716 #                       endif
6717                 
6718 EOF
6719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6720   egrep "__db_version_2" >/dev/null 2>&1; then
6721   rm -rf conftest*
6722   ol_cv_header_db2=yes
6723 else
6724   rm -rf conftest*
6725   ol_cv_header_db2=no
6726 fi
6727 rm -f conftest*
6728
6729 fi
6730
6731 echo "$ac_t""$ol_cv_header_db2" 1>&6
6732 else
6733         ol_cv_header_db2=no
6734 fi
6735
6736
6737  
6738  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
6739 echo "configure:6740: checking for Berkeley DB2" >&5
6740 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   
6744         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
6745                 ol_cv_berkeley_db2=no
6746         else
6747                 ol_cv_berkeley_db2=yes
6748         fi
6749
6750 fi
6751
6752 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
6753  if test $ol_cv_berkeley_db2 = yes ; then
6754         cat >> confdefs.h <<\EOF
6755 #define HAVE_BERKELEY_DB2 1
6756 EOF
6757
6758  fi
6759
6760
6761         if test $ol_cv_berkeley_db2 = yes ; then
6762                 ol_link_ldbm=db2
6763                 ol_with_ldbm_api=db2
6764
6765                 if test $ol_with_ldbm_type = hash ; then
6766                         cat >> confdefs.h <<\EOF
6767 #define LDBM_USE_DBHASH 1
6768 EOF
6769
6770                 else
6771                         cat >> confdefs.h <<\EOF
6772 #define LDBM_USE_DBBTREE 1
6773 EOF
6774
6775                 fi
6776
6777                                                 if test $ol_cv_lib_db2 != yes ; then
6778                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
6779                 fi
6780         fi
6781 fi
6782
6783 ol_link_bdb2=no
6784 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
6785         ol_link_bdb2=yes
6786 fi
6787
6788 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
6789         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
6790 echo "configure:6791: checking for Berkeley DB library" >&5
6791 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
6792   echo $ac_n "(cached) $ac_c" 1>&6
6793 else
6794         ol_LIBS="$LIBS"
6795         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
6796 echo "configure:6797: checking for dbopen" >&5
6797 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
6798   echo $ac_n "(cached) $ac_c" 1>&6
6799 else
6800   cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 /* System header to define __stub macros and hopefully few prototypes,
6804     which can conflict with char dbopen(); below.  */
6805 #include <assert.h>
6806 /* Override any gcc2 internal prototype to avoid an error.  */
6807 /* We use char because int might match the return type of a gcc2
6808     builtin and then its argument prototype would still apply.  */
6809 char dbopen();
6810
6811 int main() {
6812
6813 /* The GNU C library defines this for functions which it implements
6814     to always fail with ENOSYS.  Some functions are actually named
6815     something starting with __ and the normal name is an alias.  */
6816 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6817 choke me
6818 #else
6819 dbopen();
6820 #endif
6821
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6825   rm -rf conftest*
6826   eval "ac_cv_func_dbopen=yes"
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   eval "ac_cv_func_dbopen=no"
6832 fi
6833 rm -f conftest*
6834 fi
6835
6836 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6837   echo "$ac_t""yes" 1>&6
6838   ol_cv_lib_db=yes
6839 else
6840   echo "$ac_t""no" 1>&6
6841
6842                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6843 echo "configure:6844: checking for dbopen in -ldb" >&5
6844 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6845 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6846   echo $ac_n "(cached) $ac_c" 1>&6
6847 else
6848   ac_save_LIBS="$LIBS"
6849 LIBS="-ldb  $LIBS"
6850 cat > conftest.$ac_ext <<EOF
6851 #line 6852 "configure"
6852 #include "confdefs.h"
6853 /* Override any gcc2 internal prototype to avoid an error.  */
6854 /* We use char because int might match the return type of a gcc2
6855     builtin and then its argument prototype would still apply.  */
6856 char dbopen();
6857
6858 int main() {
6859 dbopen()
6860 ; return 0; }
6861 EOF
6862 if { (eval echo configure:6863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6863   rm -rf conftest*
6864   eval "ac_cv_lib_$ac_lib_var=yes"
6865 else
6866   echo "configure: failed program was:" >&5
6867   cat conftest.$ac_ext >&5
6868   rm -rf conftest*
6869   eval "ac_cv_lib_$ac_lib_var=no"
6870 fi
6871 rm -f conftest*
6872 LIBS="$ac_save_LIBS"
6873
6874 fi
6875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6876   echo "$ac_t""yes" 1>&6
6877   ol_cv_lib_db=-ldb
6878 else
6879   echo "$ac_t""no" 1>&6
6880 ol_cv_lib_db=no
6881 fi
6882
6883         
6884 fi
6885
6886         LIBS="$ol_LIBS"
6887
6888 fi
6889
6890 echo "$ac_t""$ol_cv_lib_db" 1>&6
6891
6892
6893 for ac_hdr in db_185.h
6894 do
6895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6896 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6897 echo "configure:6898: checking for $ac_hdr" >&5
6898 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6899   echo $ac_n "(cached) $ac_c" 1>&6
6900 else
6901   cat > conftest.$ac_ext <<EOF
6902 #line 6903 "configure"
6903 #include "confdefs.h"
6904 #include <$ac_hdr>
6905 EOF
6906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6907 { (eval echo configure:6908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6909 if test -z "$ac_err"; then
6910   rm -rf conftest*
6911   eval "ac_cv_header_$ac_safe=yes"
6912 else
6913   echo "$ac_err" >&5
6914   echo "configure: failed program was:" >&5
6915   cat conftest.$ac_ext >&5
6916   rm -rf conftest*
6917   eval "ac_cv_header_$ac_safe=no"
6918 fi
6919 rm -f conftest*
6920 fi
6921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6922   echo "$ac_t""yes" 1>&6
6923     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6924   cat >> confdefs.h <<EOF
6925 #define $ac_tr_hdr 1
6926 EOF
6927  
6928 else
6929   echo "$ac_t""no" 1>&6
6930 fi
6931 done
6932
6933 if test "$ol_cv_header_db2" = yes ; then
6934         
6935         ol_cv_header_db=$ac_cv_header_db_185_h
6936 else
6937         ol_cv_header_db=$ac_cv_header_db_h
6938 fi
6939
6940
6941  
6942  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
6943 echo "configure:6944: checking for Berkeley DB" >&5
6944 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
6945   echo $ac_n "(cached) $ac_c" 1>&6
6946 else
6947   
6948         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
6949                 ol_cv_berkeley_db=no
6950         else
6951                 ol_cv_berkeley_db=yes
6952         fi
6953
6954 fi
6955
6956 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
6957  if test $ol_cv_berkeley_db = yes ; then
6958         cat >> confdefs.h <<\EOF
6959 #define HAVE_BERKELEY_DB 1
6960 EOF
6961
6962  fi
6963
6964
6965         if test $ol_cv_berkeley_db = yes ; then
6966                 ol_link_ldbm=db
6967                 ol_with_ldbm_api=db
6968
6969                 if test $ol_with_ldbm_type = hash ; then
6970                         cat >> confdefs.h <<\EOF
6971 #define LDBM_USE_DBHASH 1
6972 EOF
6973
6974                 else
6975                         cat >> confdefs.h <<\EOF
6976 #define LDBM_USE_DBBTREE 1
6977 EOF
6978
6979                 fi
6980
6981                                                 if test $ol_cv_lib_db != yes ; then
6982                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
6983                 fi
6984         fi
6985 fi
6986
6987 if test $ol_with_ldbm_api = manual ; then
6988                 ol_link_ldbm=yes
6989
6990         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
6991
6992         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
6993 do
6994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6996 echo "configure:6997: checking for $ac_hdr" >&5
6997 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6998   echo $ac_n "(cached) $ac_c" 1>&6
6999 else
7000   cat > conftest.$ac_ext <<EOF
7001 #line 7002 "configure"
7002 #include "confdefs.h"
7003 #include <$ac_hdr>
7004 EOF
7005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7006 { (eval echo configure:7007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7008 if test -z "$ac_err"; then
7009   rm -rf conftest*
7010   eval "ac_cv_header_$ac_safe=yes"
7011 else
7012   echo "$ac_err" >&5
7013   echo "configure: failed program was:" >&5
7014   cat conftest.$ac_ext >&5
7015   rm -rf conftest*
7016   eval "ac_cv_header_$ac_safe=no"
7017 fi
7018 rm -f conftest*
7019 fi
7020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7021   echo "$ac_t""yes" 1>&6
7022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7023   cat >> confdefs.h <<EOF
7024 #define $ac_tr_hdr 1
7025 EOF
7026  
7027 else
7028   echo "$ac_t""no" 1>&6
7029 fi
7030 done
7031
7032 fi
7033
7034 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7035         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7036         ol_with_ldbm_api=none
7037 fi
7038
7039 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7040         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7041 echo "configure:7042: checking for MDBM library" >&5
7042 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045         ol_LIBS="$LIBS"
7046         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7047 echo "configure:7048: checking for mdbm_set_chain" >&5
7048 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7049   echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051   cat > conftest.$ac_ext <<EOF
7052 #line 7053 "configure"
7053 #include "confdefs.h"
7054 /* System header to define __stub macros and hopefully few prototypes,
7055     which can conflict with char mdbm_set_chain(); below.  */
7056 #include <assert.h>
7057 /* Override any gcc2 internal prototype to avoid an error.  */
7058 /* We use char because int might match the return type of a gcc2
7059     builtin and then its argument prototype would still apply.  */
7060 char mdbm_set_chain();
7061
7062 int main() {
7063
7064 /* The GNU C library defines this for functions which it implements
7065     to always fail with ENOSYS.  Some functions are actually named
7066     something starting with __ and the normal name is an alias.  */
7067 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7068 choke me
7069 #else
7070 mdbm_set_chain();
7071 #endif
7072
7073 ; return 0; }
7074 EOF
7075 if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7076   rm -rf conftest*
7077   eval "ac_cv_func_mdbm_set_chain=yes"
7078 else
7079   echo "configure: failed program was:" >&5
7080   cat conftest.$ac_ext >&5
7081   rm -rf conftest*
7082   eval "ac_cv_func_mdbm_set_chain=no"
7083 fi
7084 rm -f conftest*
7085 fi
7086
7087 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7088   echo "$ac_t""yes" 1>&6
7089   ol_cv_lib_mdbm=yes
7090 else
7091   echo "$ac_t""no" 1>&6
7092
7093                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7094 echo "configure:7095: checking for mdbm_set_chain in -lmdbm" >&5
7095 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7096 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099   ac_save_LIBS="$LIBS"
7100 LIBS="-lmdbm  $LIBS"
7101 cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 /* Override any gcc2 internal prototype to avoid an error.  */
7105 /* We use char because int might match the return type of a gcc2
7106     builtin and then its argument prototype would still apply.  */
7107 char mdbm_set_chain();
7108
7109 int main() {
7110 mdbm_set_chain()
7111 ; return 0; }
7112 EOF
7113 if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7114   rm -rf conftest*
7115   eval "ac_cv_lib_$ac_lib_var=yes"
7116 else
7117   echo "configure: failed program was:" >&5
7118   cat conftest.$ac_ext >&5
7119   rm -rf conftest*
7120   eval "ac_cv_lib_$ac_lib_var=no"
7121 fi
7122 rm -f conftest*
7123 LIBS="$ac_save_LIBS"
7124
7125 fi
7126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7127   echo "$ac_t""yes" 1>&6
7128   ol_cv_lib_mdbm=-lmdbm
7129 else
7130   echo "$ac_t""no" 1>&6
7131 ol_cv_lib_mdbm=no
7132 fi
7133
7134         
7135 fi
7136
7137         LIBS="$ol_LIBS"
7138
7139 fi
7140
7141 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7142
7143
7144  for ac_hdr in mdbm.h
7145 do
7146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7148 echo "configure:7149: checking for $ac_hdr" >&5
7149 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7150   echo $ac_n "(cached) $ac_c" 1>&6
7151 else
7152   cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155 #include <$ac_hdr>
7156 EOF
7157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7158 { (eval echo configure:7159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7160 if test -z "$ac_err"; then
7161   rm -rf conftest*
7162   eval "ac_cv_header_$ac_safe=yes"
7163 else
7164   echo "$ac_err" >&5
7165   echo "configure: failed program was:" >&5
7166   cat conftest.$ac_ext >&5
7167   rm -rf conftest*
7168   eval "ac_cv_header_$ac_safe=no"
7169 fi
7170 rm -f conftest*
7171 fi
7172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7173   echo "$ac_t""yes" 1>&6
7174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7175   cat >> confdefs.h <<EOF
7176 #define $ac_tr_hdr 1
7177 EOF
7178  
7179 else
7180   echo "$ac_t""no" 1>&6
7181 fi
7182 done
7183
7184  echo $ac_n "checking for db""... $ac_c" 1>&6
7185 echo "configure:7186: checking for db" >&5
7186 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7187   echo $ac_n "(cached) $ac_c" 1>&6
7188 else
7189   
7190         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7191                 ol_cv_mdbm=no
7192         else
7193                 ol_cv_mdbm=yes
7194         fi
7195
7196 fi
7197
7198 echo "$ac_t""$ol_cv_mdbm" 1>&6
7199  if test $ol_cv_mdbm = yes ; then
7200         cat >> confdefs.h <<\EOF
7201 #define HAVE_MDBM 1
7202 EOF
7203
7204  fi
7205
7206
7207         if test $ol_cv_mdbm = yes ; then
7208                 ol_link_ldbm=mdbm
7209                 ol_with_ldbm_api=mdbm
7210                 if test $ol_cv_lib_mdbm != yes ; then
7211                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7212                 fi
7213         fi
7214 fi
7215
7216 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7217         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7218 echo "configure:7219: checking for GDBM library" >&5
7219 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7220   echo $ac_n "(cached) $ac_c" 1>&6
7221 else
7222         ol_LIBS="$LIBS"
7223         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7224 echo "configure:7225: checking for gdbm_open" >&5
7225 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7226   echo $ac_n "(cached) $ac_c" 1>&6
7227 else
7228   cat > conftest.$ac_ext <<EOF
7229 #line 7230 "configure"
7230 #include "confdefs.h"
7231 /* System header to define __stub macros and hopefully few prototypes,
7232     which can conflict with char gdbm_open(); below.  */
7233 #include <assert.h>
7234 /* Override any gcc2 internal prototype to avoid an error.  */
7235 /* We use char because int might match the return type of a gcc2
7236     builtin and then its argument prototype would still apply.  */
7237 char gdbm_open();
7238
7239 int main() {
7240
7241 /* The GNU C library defines this for functions which it implements
7242     to always fail with ENOSYS.  Some functions are actually named
7243     something starting with __ and the normal name is an alias.  */
7244 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7245 choke me
7246 #else
7247 gdbm_open();
7248 #endif
7249
7250 ; return 0; }
7251 EOF
7252 if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7253   rm -rf conftest*
7254   eval "ac_cv_func_gdbm_open=yes"
7255 else
7256   echo "configure: failed program was:" >&5
7257   cat conftest.$ac_ext >&5
7258   rm -rf conftest*
7259   eval "ac_cv_func_gdbm_open=no"
7260 fi
7261 rm -f conftest*
7262 fi
7263
7264 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7265   echo "$ac_t""yes" 1>&6
7266   ol_cv_lib_gdbm=yes
7267 else
7268   echo "$ac_t""no" 1>&6
7269
7270                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7271 echo "configure:7272: checking for gdbm_open in -lgdbm" >&5
7272 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7274   echo $ac_n "(cached) $ac_c" 1>&6
7275 else
7276   ac_save_LIBS="$LIBS"
7277 LIBS="-lgdbm  $LIBS"
7278 cat > conftest.$ac_ext <<EOF
7279 #line 7280 "configure"
7280 #include "confdefs.h"
7281 /* Override any gcc2 internal prototype to avoid an error.  */
7282 /* We use char because int might match the return type of a gcc2
7283     builtin and then its argument prototype would still apply.  */
7284 char gdbm_open();
7285
7286 int main() {
7287 gdbm_open()
7288 ; return 0; }
7289 EOF
7290 if { (eval echo configure:7291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7291   rm -rf conftest*
7292   eval "ac_cv_lib_$ac_lib_var=yes"
7293 else
7294   echo "configure: failed program was:" >&5
7295   cat conftest.$ac_ext >&5
7296   rm -rf conftest*
7297   eval "ac_cv_lib_$ac_lib_var=no"
7298 fi
7299 rm -f conftest*
7300 LIBS="$ac_save_LIBS"
7301
7302 fi
7303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7304   echo "$ac_t""yes" 1>&6
7305   ol_cv_lib_gdbm=-lgdbm
7306 else
7307   echo "$ac_t""no" 1>&6
7308 ol_cv_lib_gdbm=no
7309 fi
7310
7311         
7312 fi
7313
7314         LIBS="$ol_LIBS"
7315
7316 fi
7317
7318 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7319
7320
7321  for ac_hdr in gdbm.h
7322 do
7323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7325 echo "configure:7326: checking for $ac_hdr" >&5
7326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7327   echo $ac_n "(cached) $ac_c" 1>&6
7328 else
7329   cat > conftest.$ac_ext <<EOF
7330 #line 7331 "configure"
7331 #include "confdefs.h"
7332 #include <$ac_hdr>
7333 EOF
7334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7335 { (eval echo configure:7336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7337 if test -z "$ac_err"; then
7338   rm -rf conftest*
7339   eval "ac_cv_header_$ac_safe=yes"
7340 else
7341   echo "$ac_err" >&5
7342   echo "configure: failed program was:" >&5
7343   cat conftest.$ac_ext >&5
7344   rm -rf conftest*
7345   eval "ac_cv_header_$ac_safe=no"
7346 fi
7347 rm -f conftest*
7348 fi
7349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7350   echo "$ac_t""yes" 1>&6
7351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7352   cat >> confdefs.h <<EOF
7353 #define $ac_tr_hdr 1
7354 EOF
7355  
7356 else
7357   echo "$ac_t""no" 1>&6
7358 fi
7359 done
7360
7361  echo $ac_n "checking for db""... $ac_c" 1>&6
7362 echo "configure:7363: checking for db" >&5
7363 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7364   echo $ac_n "(cached) $ac_c" 1>&6
7365 else
7366   
7367         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7368                 ol_cv_gdbm=no
7369         else
7370                 ol_cv_gdbm=yes
7371         fi
7372
7373 fi
7374
7375 echo "$ac_t""$ol_cv_gdbm" 1>&6
7376  if test $ol_cv_gdbm = yes ; then
7377         cat >> confdefs.h <<\EOF
7378 #define HAVE_GDBM 1
7379 EOF
7380
7381  fi
7382
7383
7384         if test $ol_cv_gdbm = yes ; then
7385                 ol_link_ldbm=gdbm
7386                 ol_with_ldbm_api=gdbm
7387
7388                 if test $ol_cv_lib_gdbm != yes ; then
7389                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7390                 fi
7391         fi
7392 fi
7393
7394 if test $ol_with_ldbm_api = auto ; then
7395         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7396 elif test $ol_with_ldbm_api = ndbm ; then
7397         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7398 echo "configure:7399: checking for NDBM library" >&5
7399 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7400   echo $ac_n "(cached) $ac_c" 1>&6
7401 else
7402         ol_LIBS="$LIBS"
7403         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7404 echo "configure:7405: checking for dbm_open" >&5
7405 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7406   echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408   cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 /* System header to define __stub macros and hopefully few prototypes,
7412     which can conflict with char dbm_open(); below.  */
7413 #include <assert.h>
7414 /* Override any gcc2 internal prototype to avoid an error.  */
7415 /* We use char because int might match the return type of a gcc2
7416     builtin and then its argument prototype would still apply.  */
7417 char dbm_open();
7418
7419 int main() {
7420
7421 /* The GNU C library defines this for functions which it implements
7422     to always fail with ENOSYS.  Some functions are actually named
7423     something starting with __ and the normal name is an alias.  */
7424 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7425 choke me
7426 #else
7427 dbm_open();
7428 #endif
7429
7430 ; return 0; }
7431 EOF
7432 if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7433   rm -rf conftest*
7434   eval "ac_cv_func_dbm_open=yes"
7435 else
7436   echo "configure: failed program was:" >&5
7437   cat conftest.$ac_ext >&5
7438   rm -rf conftest*
7439   eval "ac_cv_func_dbm_open=no"
7440 fi
7441 rm -f conftest*
7442 fi
7443
7444 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7445   echo "$ac_t""yes" 1>&6
7446   ol_cv_lib_ndbm=yes
7447 else
7448   echo "$ac_t""no" 1>&6
7449
7450                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7451 echo "configure:7452: checking for dbm_open in -lndbm" >&5
7452 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7453 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7454   echo $ac_n "(cached) $ac_c" 1>&6
7455 else
7456   ac_save_LIBS="$LIBS"
7457 LIBS="-lndbm  $LIBS"
7458 cat > conftest.$ac_ext <<EOF
7459 #line 7460 "configure"
7460 #include "confdefs.h"
7461 /* Override any gcc2 internal prototype to avoid an error.  */
7462 /* We use char because int might match the return type of a gcc2
7463     builtin and then its argument prototype would still apply.  */
7464 char dbm_open();
7465
7466 int main() {
7467 dbm_open()
7468 ; return 0; }
7469 EOF
7470 if { (eval echo configure:7471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7471   rm -rf conftest*
7472   eval "ac_cv_lib_$ac_lib_var=yes"
7473 else
7474   echo "configure: failed program was:" >&5
7475   cat conftest.$ac_ext >&5
7476   rm -rf conftest*
7477   eval "ac_cv_lib_$ac_lib_var=no"
7478 fi
7479 rm -f conftest*
7480 LIBS="$ac_save_LIBS"
7481
7482 fi
7483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7484   echo "$ac_t""yes" 1>&6
7485   ol_cv_lib_ndbm=-lndbm
7486 else
7487   echo "$ac_t""no" 1>&6
7488
7489                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7490 echo "configure:7491: checking for dbm_open in -ldbm" >&5
7491 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7493   echo $ac_n "(cached) $ac_c" 1>&6
7494 else
7495   ac_save_LIBS="$LIBS"
7496 LIBS="-ldbm  $LIBS"
7497 cat > conftest.$ac_ext <<EOF
7498 #line 7499 "configure"
7499 #include "confdefs.h"
7500 /* Override any gcc2 internal prototype to avoid an error.  */
7501 /* We use char because int might match the return type of a gcc2
7502     builtin and then its argument prototype would still apply.  */
7503 char dbm_open();
7504
7505 int main() {
7506 dbm_open()
7507 ; return 0; }
7508 EOF
7509 if { (eval echo configure:7510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7510   rm -rf conftest*
7511   eval "ac_cv_lib_$ac_lib_var=yes"
7512 else
7513   echo "configure: failed program was:" >&5
7514   cat conftest.$ac_ext >&5
7515   rm -rf conftest*
7516   eval "ac_cv_lib_$ac_lib_var=no"
7517 fi
7518 rm -f conftest*
7519 LIBS="$ac_save_LIBS"
7520
7521 fi
7522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7523   echo "$ac_t""yes" 1>&6
7524   ol_cv_lib_ndbm=-ldbm
7525 else
7526   echo "$ac_t""no" 1>&6
7527 ol_cv_lib_ndbm=no
7528 fi
7529                 
7530 fi
7531
7532         
7533 fi
7534
7535         LIBS="$ol_LIBS"
7536
7537 fi
7538
7539 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
7540
7541
7542  for ac_hdr in ndbm.h
7543 do
7544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7545 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7546 echo "configure:7547: checking for $ac_hdr" >&5
7547 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7548   echo $ac_n "(cached) $ac_c" 1>&6
7549 else
7550   cat > conftest.$ac_ext <<EOF
7551 #line 7552 "configure"
7552 #include "confdefs.h"
7553 #include <$ac_hdr>
7554 EOF
7555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7556 { (eval echo configure:7557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7558 if test -z "$ac_err"; then
7559   rm -rf conftest*
7560   eval "ac_cv_header_$ac_safe=yes"
7561 else
7562   echo "$ac_err" >&5
7563   echo "configure: failed program was:" >&5
7564   cat conftest.$ac_ext >&5
7565   rm -rf conftest*
7566   eval "ac_cv_header_$ac_safe=no"
7567 fi
7568 rm -f conftest*
7569 fi
7570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7571   echo "$ac_t""yes" 1>&6
7572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7573   cat >> confdefs.h <<EOF
7574 #define $ac_tr_hdr 1
7575 EOF
7576  
7577 else
7578   echo "$ac_t""no" 1>&6
7579 fi
7580 done
7581
7582  echo $ac_n "checking for db""... $ac_c" 1>&6
7583 echo "configure:7584: checking for db" >&5
7584 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
7585   echo $ac_n "(cached) $ac_c" 1>&6
7586 else
7587   
7588         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
7589                 ol_cv_ndbm=no
7590         else
7591                 ol_cv_ndbm=yes
7592         fi
7593
7594 fi
7595
7596 echo "$ac_t""$ol_cv_ndbm" 1>&6
7597  if test $ol_cv_ndbm = yes ; then
7598         cat >> confdefs.h <<\EOF
7599 #define HAVE_NDBM 1
7600 EOF
7601
7602  fi
7603
7604
7605         if test $ol_cv_ndbm = yes ; then
7606                 ol_link_ldbm=ndbm
7607                 ol_with_ldbm_api=ndbm
7608
7609                 if test $ol_cv_lib_ndbm != yes ; then
7610                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
7611                 fi
7612         fi
7613 fi
7614
7615 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
7616         echo "configure: warning: could not find suitable LDBM backend" 1>&2
7617         if test $ol_enable_ldbm = yes ; then
7618                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
7619         fi
7620
7621         echo "configure: warning: disabling LDBM" 1>&2
7622         ol_enable_ldbm=no
7623 fi
7624
7625 if test $ol_enable_wrappers != no ; then
7626         for ac_hdr in tcpd.h
7627 do
7628 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7629 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7630 echo "configure:7631: checking for $ac_hdr" >&5
7631 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7632   echo $ac_n "(cached) $ac_c" 1>&6
7633 else
7634   cat > conftest.$ac_ext <<EOF
7635 #line 7636 "configure"
7636 #include "confdefs.h"
7637 #include <$ac_hdr>
7638 EOF
7639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7640 { (eval echo configure:7641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7642 if test -z "$ac_err"; then
7643   rm -rf conftest*
7644   eval "ac_cv_header_$ac_safe=yes"
7645 else
7646   echo "$ac_err" >&5
7647   echo "configure: failed program was:" >&5
7648   cat conftest.$ac_ext >&5
7649   rm -rf conftest*
7650   eval "ac_cv_header_$ac_safe=no"
7651 fi
7652 rm -f conftest*
7653 fi
7654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7657   cat >> confdefs.h <<EOF
7658 #define $ac_tr_hdr 1
7659 EOF
7660  
7661 else
7662   echo "$ac_t""no" 1>&6
7663 fi
7664 done
7665
7666
7667         if test $ac_cv_header_tcpd_h != yes ; then
7668                 have_wrappers=no
7669         else
7670                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
7671 echo "configure:7672: checking for main in -lwrap" >&5
7672 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
7673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7674   echo $ac_n "(cached) $ac_c" 1>&6
7675 else
7676   ac_save_LIBS="$LIBS"
7677 LIBS="-lwrap  $LIBS"
7678 cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681
7682 int main() {
7683 main()
7684 ; return 0; }
7685 EOF
7686 if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=yes"
7689 else
7690   echo "configure: failed program was:" >&5
7691   cat conftest.$ac_ext >&5
7692   rm -rf conftest*
7693   eval "ac_cv_lib_$ac_lib_var=no"
7694 fi
7695 rm -f conftest*
7696 LIBS="$ac_save_LIBS"
7697
7698 fi
7699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7700   echo "$ac_t""yes" 1>&6
7701   have_wrappers=yes
7702 else
7703   echo "$ac_t""no" 1>&6
7704 have_wrappers=no
7705 fi
7706
7707         fi
7708
7709         if test $have_wrappers = yes ; then
7710                 cat >> confdefs.h <<\EOF
7711 #define HAVE_TCPD 1
7712 EOF
7713
7714                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
7715         else
7716                 echo "configure: warning: could not find -lwrap" 1>&2
7717                 if test $ol_enable_wrappers = yes ; then
7718                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
7719                 fi
7720
7721                 echo "configure: warning: disabling wrappers support" 1>&2
7722                 ol_enable_wrappers=no
7723         fi
7724 fi
7725
7726 if test $ol_enable_syslog != no ; then
7727         echo $ac_n "checking for openlog""... $ac_c" 1>&6
7728 echo "configure:7729: checking for openlog" >&5
7729 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
7730   echo $ac_n "(cached) $ac_c" 1>&6
7731 else
7732   cat > conftest.$ac_ext <<EOF
7733 #line 7734 "configure"
7734 #include "confdefs.h"
7735 /* System header to define __stub macros and hopefully few prototypes,
7736     which can conflict with char openlog(); below.  */
7737 #include <assert.h>
7738 /* Override any gcc2 internal prototype to avoid an error.  */
7739 /* We use char because int might match the return type of a gcc2
7740     builtin and then its argument prototype would still apply.  */
7741 char openlog();
7742
7743 int main() {
7744
7745 /* The GNU C library defines this for functions which it implements
7746     to always fail with ENOSYS.  Some functions are actually named
7747     something starting with __ and the normal name is an alias.  */
7748 #if defined (__stub_openlog) || defined (__stub___openlog)
7749 choke me
7750 #else
7751 openlog();
7752 #endif
7753
7754 ; return 0; }
7755 EOF
7756 if { (eval echo configure:7757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7757   rm -rf conftest*
7758   eval "ac_cv_func_openlog=yes"
7759 else
7760   echo "configure: failed program was:" >&5
7761   cat conftest.$ac_ext >&5
7762   rm -rf conftest*
7763   eval "ac_cv_func_openlog=no"
7764 fi
7765 rm -f conftest*
7766 fi
7767
7768 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
7769   echo "$ac_t""yes" 1>&6
7770   :
7771 else
7772   echo "$ac_t""no" 1>&6
7773 fi
7774
7775         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
7776                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
7777         fi
7778         ol_enable_syslog=$ac_cv_func_openlog
7779 fi
7780
7781 if test $ol_enable_dmalloc != no ; then
7782         for ac_hdr in dmalloc.h
7783 do
7784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7786 echo "configure:7787: checking for $ac_hdr" >&5
7787 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7788   echo $ac_n "(cached) $ac_c" 1>&6
7789 else
7790   cat > conftest.$ac_ext <<EOF
7791 #line 7792 "configure"
7792 #include "confdefs.h"
7793 #include <$ac_hdr>
7794 EOF
7795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7796 { (eval echo configure:7797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7798 if test -z "$ac_err"; then
7799   rm -rf conftest*
7800   eval "ac_cv_header_$ac_safe=yes"
7801 else
7802   echo "$ac_err" >&5
7803   echo "configure: failed program was:" >&5
7804   cat conftest.$ac_ext >&5
7805   rm -rf conftest*
7806   eval "ac_cv_header_$ac_safe=no"
7807 fi
7808 rm -f conftest*
7809 fi
7810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7811   echo "$ac_t""yes" 1>&6
7812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7813   cat >> confdefs.h <<EOF
7814 #define $ac_tr_hdr 1
7815 EOF
7816  
7817 else
7818   echo "$ac_t""no" 1>&6
7819 fi
7820 done
7821
7822         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
7823 echo "configure:7824: checking for dmalloc_shutdown in -ldmalloc" >&5
7824 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
7825 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7826   echo $ac_n "(cached) $ac_c" 1>&6
7827 else
7828   ac_save_LIBS="$LIBS"
7829 LIBS="-ldmalloc  $LIBS"
7830 cat > conftest.$ac_ext <<EOF
7831 #line 7832 "configure"
7832 #include "confdefs.h"
7833 /* Override any gcc2 internal prototype to avoid an error.  */
7834 /* We use char because int might match the return type of a gcc2
7835     builtin and then its argument prototype would still apply.  */
7836 char dmalloc_shutdown();
7837
7838 int main() {
7839 dmalloc_shutdown()
7840 ; return 0; }
7841 EOF
7842 if { (eval echo configure:7843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7843   rm -rf conftest*
7844   eval "ac_cv_lib_$ac_lib_var=yes"
7845 else
7846   echo "configure: failed program was:" >&5
7847   cat conftest.$ac_ext >&5
7848   rm -rf conftest*
7849   eval "ac_cv_lib_$ac_lib_var=no"
7850 fi
7851 rm -f conftest*
7852 LIBS="$ac_save_LIBS"
7853
7854 fi
7855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7856   echo "$ac_t""yes" 1>&6
7857     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7858     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7859   cat >> confdefs.h <<EOF
7860 #define $ac_tr_lib 1
7861 EOF
7862
7863   LIBS="-ldmalloc $LIBS"
7864
7865 else
7866   echo "$ac_t""no" 1>&6
7867 fi
7868
7869 fi
7870
7871 if test $ol_enable_tcl != no ; then
7872         for ac_hdr in tcl.h
7873 do
7874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7876 echo "configure:7877: checking for $ac_hdr" >&5
7877 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7878   echo $ac_n "(cached) $ac_c" 1>&6
7879 else
7880   cat > conftest.$ac_ext <<EOF
7881 #line 7882 "configure"
7882 #include "confdefs.h"
7883 #include <$ac_hdr>
7884 EOF
7885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7886 { (eval echo configure:7887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7888 if test -z "$ac_err"; then
7889   rm -rf conftest*
7890   eval "ac_cv_header_$ac_safe=yes"
7891 else
7892   echo "$ac_err" >&5
7893   echo "configure: failed program was:" >&5
7894   cat conftest.$ac_ext >&5
7895   rm -rf conftest*
7896   eval "ac_cv_header_$ac_safe=no"
7897 fi
7898 rm -f conftest*
7899 fi
7900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7901   echo "$ac_t""yes" 1>&6
7902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7903   cat >> confdefs.h <<EOF
7904 #define $ac_tr_hdr 1
7905 EOF
7906  
7907 else
7908   echo "$ac_t""no" 1>&6
7909 fi
7910 done
7911
7912
7913         if test $ac_cv_header_tcl_h != yes ; then
7914                 have_tcl=no
7915         else
7916                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
7917 echo "configure:7918: checking for main in -ltcl" >&5
7918 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
7919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7920   echo $ac_n "(cached) $ac_c" 1>&6
7921 else
7922   ac_save_LIBS="$LIBS"
7923 LIBS="-ltcl  $LIBS"
7924 cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927
7928 int main() {
7929 main()
7930 ; return 0; }
7931 EOF
7932 if { (eval echo configure:7933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7933   rm -rf conftest*
7934   eval "ac_cv_lib_$ac_lib_var=yes"
7935 else
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -rf conftest*
7939   eval "ac_cv_lib_$ac_lib_var=no"
7940 fi
7941 rm -f conftest*
7942 LIBS="$ac_save_LIBS"
7943
7944 fi
7945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7946   echo "$ac_t""yes" 1>&6
7947   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
7948 else
7949   echo "$ac_t""no" 1>&6
7950 have_tcl=no
7951 fi
7952
7953
7954                 if test $have_tcl != yes; then
7955                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
7956 echo "configure:7957: checking for main in -ltcl7.6" >&5
7957 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
7958 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7959   echo $ac_n "(cached) $ac_c" 1>&6
7960 else
7961   ac_save_LIBS="$LIBS"
7962 LIBS="-ltcl7.6  $LIBS"
7963 cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966
7967 int main() {
7968 main()
7969 ; return 0; }
7970 EOF
7971 if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7972   rm -rf conftest*
7973   eval "ac_cv_lib_$ac_lib_var=yes"
7974 else
7975   echo "configure: failed program was:" >&5
7976   cat conftest.$ac_ext >&5
7977   rm -rf conftest*
7978   eval "ac_cv_lib_$ac_lib_var=no"
7979 fi
7980 rm -f conftest*
7981 LIBS="$ac_save_LIBS"
7982
7983 fi
7984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7985   echo "$ac_t""yes" 1>&6
7986   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
7987 else
7988   echo "$ac_t""no" 1>&6
7989 have_tcl=no
7990 fi
7991
7992                 fi
7993
7994                 if test $have_tcl != yes; then
7995                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
7996 echo "configure:7997: checking for main in -ltcl8.0" >&5
7997 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
7998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7999   echo $ac_n "(cached) $ac_c" 1>&6
8000 else
8001   ac_save_LIBS="$LIBS"
8002 LIBS="-ltcl8.0  $LIBS"
8003 cat > conftest.$ac_ext <<EOF
8004 #line 8005 "configure"
8005 #include "confdefs.h"
8006
8007 int main() {
8008 main()
8009 ; return 0; }
8010 EOF
8011 if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8012   rm -rf conftest*
8013   eval "ac_cv_lib_$ac_lib_var=yes"
8014 else
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -rf conftest*
8018   eval "ac_cv_lib_$ac_lib_var=no"
8019 fi
8020 rm -f conftest*
8021 LIBS="$ac_save_LIBS"
8022
8023 fi
8024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8025   echo "$ac_t""yes" 1>&6
8026   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8027 else
8028   echo "$ac_t""no" 1>&6
8029 have_tcl=no
8030 fi
8031
8032                 fi
8033         fi
8034
8035         if test $have_tcl != yes ; then
8036                 echo "configure: warning: could not find -ltcl" 1>&2
8037                 if test $ol_enable_tcl = yes ; then
8038                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8039                 fi
8040
8041                 ol_enable_tcl=no
8042         fi
8043 fi
8044
8045 # ud needs termcap (should insert check here)
8046 ol_link_termcap=no
8047 for ac_hdr in termcap.h ncurses.h
8048 do
8049 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8050 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8051 echo "configure:8052: checking for $ac_hdr" >&5
8052 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8053   echo $ac_n "(cached) $ac_c" 1>&6
8054 else
8055   cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 #include <$ac_hdr>
8059 EOF
8060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8061 { (eval echo configure:8062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8063 if test -z "$ac_err"; then
8064   rm -rf conftest*
8065   eval "ac_cv_header_$ac_safe=yes"
8066 else
8067   echo "$ac_err" >&5
8068   echo "configure: failed program was:" >&5
8069   cat conftest.$ac_ext >&5
8070   rm -rf conftest*
8071   eval "ac_cv_header_$ac_safe=no"
8072 fi
8073 rm -f conftest*
8074 fi
8075 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8076   echo "$ac_t""yes" 1>&6
8077     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8078   cat >> confdefs.h <<EOF
8079 #define $ac_tr_hdr 1
8080 EOF
8081  
8082 else
8083   echo "$ac_t""no" 1>&6
8084 fi
8085 done
8086
8087
8088 if test $ol_link_termcap = no ; then
8089         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8090 echo "configure:8091: checking for tputs in -ltermcap" >&5
8091 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8093   echo $ac_n "(cached) $ac_c" 1>&6
8094 else
8095   ac_save_LIBS="$LIBS"
8096 LIBS="-ltermcap  $LIBS"
8097 cat > conftest.$ac_ext <<EOF
8098 #line 8099 "configure"
8099 #include "confdefs.h"
8100 /* Override any gcc2 internal prototype to avoid an error.  */
8101 /* We use char because int might match the return type of a gcc2
8102     builtin and then its argument prototype would still apply.  */
8103 char tputs();
8104
8105 int main() {
8106 tputs()
8107 ; return 0; }
8108 EOF
8109 if { (eval echo configure:8110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8110   rm -rf conftest*
8111   eval "ac_cv_lib_$ac_lib_var=yes"
8112 else
8113   echo "configure: failed program was:" >&5
8114   cat conftest.$ac_ext >&5
8115   rm -rf conftest*
8116   eval "ac_cv_lib_$ac_lib_var=no"
8117 fi
8118 rm -f conftest*
8119 LIBS="$ac_save_LIBS"
8120
8121 fi
8122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8123   echo "$ac_t""yes" 1>&6
8124   have_termcap=yes
8125 else
8126   echo "$ac_t""no" 1>&6
8127 have_termcap=no
8128 fi
8129
8130         if test $have_termcap = yes ; then
8131                 cat >> confdefs.h <<\EOF
8132 #define HAVE_TERMCAP 1
8133 EOF
8134
8135                 ol_link_termcap=yes
8136                 TERMCAP_LIBS=-ltermcap
8137         fi
8138 fi
8139
8140 if test $ol_link_termcap = no ; then
8141         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8142 echo "configure:8143: checking for initscr in -lncurses" >&5
8143 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8145   echo $ac_n "(cached) $ac_c" 1>&6
8146 else
8147   ac_save_LIBS="$LIBS"
8148 LIBS="-lncurses  $LIBS"
8149 cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 /* Override any gcc2 internal prototype to avoid an error.  */
8153 /* We use char because int might match the return type of a gcc2
8154     builtin and then its argument prototype would still apply.  */
8155 char initscr();
8156
8157 int main() {
8158 initscr()
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162   rm -rf conftest*
8163   eval "ac_cv_lib_$ac_lib_var=yes"
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=no"
8169 fi
8170 rm -f conftest*
8171 LIBS="$ac_save_LIBS"
8172
8173 fi
8174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8175   echo "$ac_t""yes" 1>&6
8176   have_ncurses=yes
8177 else
8178   echo "$ac_t""no" 1>&6
8179 have_ncurses=no
8180 fi
8181
8182         if test $have_ncurses = yes ; then
8183                 cat >> confdefs.h <<\EOF
8184 #define HAVE_NCURSES 1
8185 EOF
8186
8187                 ol_link_termcap=yes
8188                 TERMCAP_LIBS=-lncurses
8189         fi
8190 fi
8191
8192 if test $ol_link_termcap = no ; then
8193         cat >> confdefs.h <<\EOF
8194 #define NO_TERMCAP 1
8195 EOF
8196
8197         TERMCAP_LIBS=
8198 fi
8199
8200 ol_link_readline=no
8201 if test $ol_with_readline != no ; then
8202         for ac_hdr in readline/readline.h readline/history.h
8203 do
8204 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8205 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8206 echo "configure:8207: checking for $ac_hdr" >&5
8207 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8208   echo $ac_n "(cached) $ac_c" 1>&6
8209 else
8210   cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 #include <$ac_hdr>
8214 EOF
8215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8216 { (eval echo configure:8217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8218 if test -z "$ac_err"; then
8219   rm -rf conftest*
8220   eval "ac_cv_header_$ac_safe=yes"
8221 else
8222   echo "$ac_err" >&5
8223   echo "configure: failed program was:" >&5
8224   cat conftest.$ac_ext >&5
8225   rm -rf conftest*
8226   eval "ac_cv_header_$ac_safe=no"
8227 fi
8228 rm -f conftest*
8229 fi
8230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8231   echo "$ac_t""yes" 1>&6
8232     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8233   cat >> confdefs.h <<EOF
8234 #define $ac_tr_hdr 1
8235 EOF
8236  
8237 else
8238   echo "$ac_t""no" 1>&6
8239 fi
8240 done
8241
8242
8243         if test $ac_cv_header_readline_readline_h = yes ; then
8244                 save_LIBS="$LIBS"
8245                 LIBS="$TERMCAP_LIBS $LIBS"
8246                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8247 echo "configure:8248: checking for readline in -lreadline" >&5
8248 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8249 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8250   echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252   ac_save_LIBS="$LIBS"
8253 LIBS="-lreadline  $LIBS"
8254 cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* Override any gcc2 internal prototype to avoid an error.  */
8258 /* We use char because int might match the return type of a gcc2
8259     builtin and then its argument prototype would still apply.  */
8260 char readline();
8261
8262 int main() {
8263 readline()
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=yes"
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=no"
8274 fi
8275 rm -f conftest*
8276 LIBS="$ac_save_LIBS"
8277
8278 fi
8279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8280   echo "$ac_t""yes" 1>&6
8281   have_readline=yes
8282 else
8283   echo "$ac_t""no" 1>&6
8284 have_readline=no
8285 fi
8286
8287                 LIBS="$save_LIBS"
8288                         
8289                 if test $have_readline = yes ; then
8290                         ol_with_readline=found
8291                         ol_link_readline=yes
8292
8293                         READLINE_LIBS="-lreadline"
8294                 fi
8295         fi
8296 fi
8297
8298 if test $ol_link_readline = yes ; then
8299         cat >> confdefs.h <<\EOF
8300 #define HAVE_READLINE 1
8301 EOF
8302
8303 fi
8304
8305
8306 # FreeBSD (and others) have crypt(3) in -lcrypt
8307 if test $ol_enable_crypt != no ; then
8308         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8309 echo "configure:8310: checking for crypt" >&5
8310 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8311   echo $ac_n "(cached) $ac_c" 1>&6
8312 else
8313   cat > conftest.$ac_ext <<EOF
8314 #line 8315 "configure"
8315 #include "confdefs.h"
8316 /* System header to define __stub macros and hopefully few prototypes,
8317     which can conflict with char crypt(); below.  */
8318 #include <assert.h>
8319 /* Override any gcc2 internal prototype to avoid an error.  */
8320 /* We use char because int might match the return type of a gcc2
8321     builtin and then its argument prototype would still apply.  */
8322 char crypt();
8323
8324 int main() {
8325
8326 /* The GNU C library defines this for functions which it implements
8327     to always fail with ENOSYS.  Some functions are actually named
8328     something starting with __ and the normal name is an alias.  */
8329 #if defined (__stub_crypt) || defined (__stub___crypt)
8330 choke me
8331 #else
8332 crypt();
8333 #endif
8334
8335 ; return 0; }
8336 EOF
8337 if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8338   rm -rf conftest*
8339   eval "ac_cv_func_crypt=yes"
8340 else
8341   echo "configure: failed program was:" >&5
8342   cat conftest.$ac_ext >&5
8343   rm -rf conftest*
8344   eval "ac_cv_func_crypt=no"
8345 fi
8346 rm -f conftest*
8347 fi
8348
8349 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8350   echo "$ac_t""yes" 1>&6
8351   have_crypt=yes
8352 else
8353   echo "$ac_t""no" 1>&6
8354
8355                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8356 echo "configure:8357: checking for crypt in -lcrypt" >&5
8357 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8358 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8359   echo $ac_n "(cached) $ac_c" 1>&6
8360 else
8361   ac_save_LIBS="$LIBS"
8362 LIBS="-lcrypt  $LIBS"
8363 cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 /* Override any gcc2 internal prototype to avoid an error.  */
8367 /* We use char because int might match the return type of a gcc2
8368     builtin and then its argument prototype would still apply.  */
8369 char crypt();
8370
8371 int main() {
8372 crypt()
8373 ; return 0; }
8374 EOF
8375 if { (eval echo configure:8376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8376   rm -rf conftest*
8377   eval "ac_cv_lib_$ac_lib_var=yes"
8378 else
8379   echo "configure: failed program was:" >&5
8380   cat conftest.$ac_ext >&5
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=no"
8383 fi
8384 rm -f conftest*
8385 LIBS="$ac_save_LIBS"
8386
8387 fi
8388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8391                         have_crypt=yes
8392 else
8393   echo "$ac_t""no" 1>&6
8394 have_crypt=no
8395 fi
8396
8397 fi
8398
8399
8400         if test $have_crypt = yes ; then
8401                 cat >> confdefs.h <<\EOF
8402 #define HAVE_CRYPT 1
8403 EOF
8404
8405         else
8406                 echo "configure: warning: could not find crypt" 1>&2
8407                 if test $ol_enable_crypt = yes ; then
8408                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8409                 fi
8410
8411                 echo "configure: warning: disabling crypt support" 1>&2
8412                 ol_enable_crypt=no
8413         fi
8414 fi
8415
8416 # FreeBSD (and others) have setproctitle(3) in -lutil
8417 if test $ol_enable_proctitle != no ; then
8418         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8419 echo "configure:8420: checking for setproctitle" >&5
8420 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 /* System header to define __stub macros and hopefully few prototypes,
8427     which can conflict with char setproctitle(); below.  */
8428 #include <assert.h>
8429 /* Override any gcc2 internal prototype to avoid an error.  */
8430 /* We use char because int might match the return type of a gcc2
8431     builtin and then its argument prototype would still apply.  */
8432 char setproctitle();
8433
8434 int main() {
8435
8436 /* The GNU C library defines this for functions which it implements
8437     to always fail with ENOSYS.  Some functions are actually named
8438     something starting with __ and the normal name is an alias.  */
8439 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8440 choke me
8441 #else
8442 setproctitle();
8443 #endif
8444
8445 ; return 0; }
8446 EOF
8447 if { (eval echo configure:8448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8448   rm -rf conftest*
8449   eval "ac_cv_func_setproctitle=yes"
8450 else
8451   echo "configure: failed program was:" >&5
8452   cat conftest.$ac_ext >&5
8453   rm -rf conftest*
8454   eval "ac_cv_func_setproctitle=no"
8455 fi
8456 rm -f conftest*
8457 fi
8458
8459 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8460   echo "$ac_t""yes" 1>&6
8461   have_setproctitle=yes
8462 else
8463   echo "$ac_t""no" 1>&6
8464
8465                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8466 echo "configure:8467: checking for setproctitle in -lutil" >&5
8467 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   ac_save_LIBS="$LIBS"
8472 LIBS="-lutil  $LIBS"
8473 cat > conftest.$ac_ext <<EOF
8474 #line 8475 "configure"
8475 #include "confdefs.h"
8476 /* Override any gcc2 internal prototype to avoid an error.  */
8477 /* We use char because int might match the return type of a gcc2
8478     builtin and then its argument prototype would still apply.  */
8479 char setproctitle();
8480
8481 int main() {
8482 setproctitle()
8483 ; return 0; }
8484 EOF
8485 if { (eval echo configure:8486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8486   rm -rf conftest*
8487   eval "ac_cv_lib_$ac_lib_var=yes"
8488 else
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   eval "ac_cv_lib_$ac_lib_var=no"
8493 fi
8494 rm -f conftest*
8495 LIBS="$ac_save_LIBS"
8496
8497 fi
8498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8499   echo "$ac_t""yes" 1>&6
8500   have_setproctitle=yes
8501                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8502 else
8503   echo "$ac_t""no" 1>&6
8504 have_setproctitle=no
8505                         LIBOBJS="$LIBOBJS setproctitle.o"
8506 fi
8507
8508 fi
8509
8510
8511         if test $have_setproctitle = yes ; then
8512                 cat >> confdefs.h <<\EOF
8513 #define HAVE_SETPROCTITLE 1
8514 EOF
8515
8516         fi
8517 fi
8518
8519 # test for EBCDIC
8520 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8521 echo "configure:8522: checking for EBCDIC" >&5
8522 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
8523   echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525   
8526         cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529
8530 #if !('M' == 0xd4)
8531 #include <__ASCII__/generate_error.h>
8532 #endif
8533
8534 EOF
8535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8536 { (eval echo configure:8537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8538 if test -z "$ac_err"; then
8539   rm -rf conftest*
8540   ol_cv_cpp_ebcdic=yes
8541 else
8542   echo "$ac_err" >&5
8543   echo "configure: failed program was:" >&5
8544   cat conftest.$ac_ext >&5
8545   rm -rf conftest*
8546   ol_cv_cpp_ebcdic=no
8547 fi
8548 rm -f conftest*
8549 fi
8550
8551 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8552 if test $ol_cv_cpp_ebcdic = yes ; then
8553         cat >> confdefs.h <<\EOF
8554 #define HAVE_EBCDIC 1
8555 EOF
8556
8557 fi
8558
8559 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8560 echo "configure:8561: checking for ANSI C header files" >&5
8561 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
8562   echo $ac_n "(cached) $ac_c" 1>&6
8563 else
8564   cat > conftest.$ac_ext <<EOF
8565 #line 8566 "configure"
8566 #include "confdefs.h"
8567 #include <stdlib.h>
8568 #include <stdarg.h>
8569 #include <string.h>
8570 #include <float.h>
8571 EOF
8572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8573 { (eval echo configure:8574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8575 if test -z "$ac_err"; then
8576   rm -rf conftest*
8577   ol_cv_header_stdc=yes
8578 else
8579   echo "$ac_err" >&5
8580   echo "configure: failed program was:" >&5
8581   cat conftest.$ac_ext >&5
8582   rm -rf conftest*
8583   ol_cv_header_stdc=no
8584 fi
8585 rm -f conftest*
8586
8587 if test $ol_cv_header_stdc = yes; then
8588   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 #include <string.h>
8593 EOF
8594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8595   egrep "memchr" >/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   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8607 cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610 #include <stdlib.h>
8611 EOF
8612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8613   egrep "free" >/dev/null 2>&1; then
8614   :
8615 else
8616   rm -rf conftest*
8617   ol_cv_header_stdc=no
8618 fi
8619 rm -f conftest*
8620
8621 fi
8622
8623 if test $ol_cv_header_stdc = yes; then
8624   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8625 if test "$cross_compiling" = yes; then
8626   :
8627 else
8628   cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 #include <ctype.h>
8632 #ifndef HAVE_EBCDIC
8633 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8634 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8635 #else
8636 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8637                 || ('j' <= (c) && (c) <= 'r') \
8638                 || ('s' <= (c) && (c) <= 'z'))
8639 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8640 #endif
8641 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8642 int main () { int i; for (i = 0; i < 256; i++)
8643 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8644 exit (0); }
8645
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8648 then
8649   :
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -fr conftest*
8654   ol_cv_header_stdc=no
8655 fi
8656 rm -fr conftest*
8657 fi
8658
8659 fi
8660 fi
8661
8662 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8663 if test $ol_cv_header_stdc = yes; then
8664   cat >> confdefs.h <<\EOF
8665 #define STDC_HEADERS 1
8666 EOF
8667
8668 fi
8669 ac_cv_header_stdc=disable
8670
8671
8672 if test $ol_cv_header_stdc != yes; then
8673         echo "configure: warning: could not Standard C compliant headers" 1>&2
8674 fi
8675
8676 ac_header_dirent=no
8677 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8678 do
8679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8680 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8681 echo "configure:8682: checking for $ac_hdr that defines DIR" >&5
8682 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
8683   echo $ac_n "(cached) $ac_c" 1>&6
8684 else
8685   cat > conftest.$ac_ext <<EOF
8686 #line 8687 "configure"
8687 #include "confdefs.h"
8688 #include <sys/types.h>
8689 #include <$ac_hdr>
8690 int main() {
8691 DIR *dirp = 0;
8692 ; return 0; }
8693 EOF
8694 if { (eval echo configure:8695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8695   rm -rf conftest*
8696   eval "ac_cv_header_dirent_$ac_safe=yes"
8697 else
8698   echo "configure: failed program was:" >&5
8699   cat conftest.$ac_ext >&5
8700   rm -rf conftest*
8701   eval "ac_cv_header_dirent_$ac_safe=no"
8702 fi
8703 rm -f conftest*
8704 fi
8705 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8706   echo "$ac_t""yes" 1>&6
8707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8708   cat >> confdefs.h <<EOF
8709 #define $ac_tr_hdr 1
8710 EOF
8711  ac_header_dirent=$ac_hdr; break
8712 else
8713   echo "$ac_t""no" 1>&6
8714 fi
8715 done
8716 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8717 if test $ac_header_dirent = dirent.h; then
8718 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8719 echo "configure:8720: checking for opendir in -ldir" >&5
8720 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
8721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8722   echo $ac_n "(cached) $ac_c" 1>&6
8723 else
8724   ac_save_LIBS="$LIBS"
8725 LIBS="-ldir  $LIBS"
8726 cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729 /* Override any gcc2 internal prototype to avoid an error.  */
8730 /* We use char because int might match the return type of a gcc2
8731     builtin and then its argument prototype would still apply.  */
8732 char opendir();
8733
8734 int main() {
8735 opendir()
8736 ; return 0; }
8737 EOF
8738 if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8739   rm -rf conftest*
8740   eval "ac_cv_lib_$ac_lib_var=yes"
8741 else
8742   echo "configure: failed program was:" >&5
8743   cat conftest.$ac_ext >&5
8744   rm -rf conftest*
8745   eval "ac_cv_lib_$ac_lib_var=no"
8746 fi
8747 rm -f conftest*
8748 LIBS="$ac_save_LIBS"
8749
8750 fi
8751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8752   echo "$ac_t""yes" 1>&6
8753   LIBS="$LIBS -ldir"
8754 else
8755   echo "$ac_t""no" 1>&6
8756 fi
8757
8758 else
8759 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8760 echo "configure:8761: checking for opendir in -lx" >&5
8761 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
8762 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8763   echo $ac_n "(cached) $ac_c" 1>&6
8764 else
8765   ac_save_LIBS="$LIBS"
8766 LIBS="-lx  $LIBS"
8767 cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 /* Override any gcc2 internal prototype to avoid an error.  */
8771 /* We use char because int might match the return type of a gcc2
8772     builtin and then its argument prototype would still apply.  */
8773 char opendir();
8774
8775 int main() {
8776 opendir()
8777 ; return 0; }
8778 EOF
8779 if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8780   rm -rf conftest*
8781   eval "ac_cv_lib_$ac_lib_var=yes"
8782 else
8783   echo "configure: failed program was:" >&5
8784   cat conftest.$ac_ext >&5
8785   rm -rf conftest*
8786   eval "ac_cv_lib_$ac_lib_var=no"
8787 fi
8788 rm -f conftest*
8789 LIBS="$ac_save_LIBS"
8790
8791 fi
8792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8793   echo "$ac_t""yes" 1>&6
8794   LIBS="$LIBS -lx"
8795 else
8796   echo "$ac_t""no" 1>&6
8797 fi
8798
8799 fi
8800
8801 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8802 echo "configure:8803: checking for sys/wait.h that is POSIX.1 compatible" >&5
8803 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 #include <sys/types.h>
8810 #include <sys/wait.h>
8811 #ifndef WEXITSTATUS
8812 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8813 #endif
8814 #ifndef WIFEXITED
8815 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8816 #endif
8817 int main() {
8818 int s;
8819 wait (&s);
8820 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8824   rm -rf conftest*
8825   ac_cv_header_sys_wait_h=yes
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   ac_cv_header_sys_wait_h=no
8831 fi
8832 rm -f conftest*
8833 fi
8834
8835 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8836 if test $ac_cv_header_sys_wait_h = yes; then
8837   cat >> confdefs.h <<\EOF
8838 #define HAVE_SYS_WAIT_H 1
8839 EOF
8840
8841 fi
8842
8843 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8844 echo "configure:8845: checking POSIX termios" >&5
8845 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
8846   echo $ac_n "(cached) $ac_c" 1>&6
8847 else
8848   cat > conftest.$ac_ext <<EOF
8849 #line 8850 "configure"
8850 #include "confdefs.h"
8851 #include <sys/types.h>
8852 #include <unistd.h>
8853 #include <termios.h>
8854 int main() {
8855 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8856    tcgetattr(0, 0);
8857 ; return 0; }
8858 EOF
8859 if { (eval echo configure:8860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8860   rm -rf conftest*
8861   am_cv_sys_posix_termios=yes
8862 else
8863   echo "configure: failed program was:" >&5
8864   cat conftest.$ac_ext >&5
8865   rm -rf conftest*
8866   am_cv_sys_posix_termios=no
8867 fi
8868 rm -f conftest*
8869 fi
8870
8871 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8872
8873
8874  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8875 echo "configure:8876: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8876 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
8877   echo $ac_n "(cached) $ac_c" 1>&6
8878 else
8879   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8880
8881   gwinsz_in_termios_h=no
8882   if test $am_cv_sys_posix_termios = yes; then
8883     cat > conftest.$ac_ext <<EOF
8884 #line 8885 "configure"
8885 #include "confdefs.h"
8886 #include <sys/types.h>
8887 #     include <termios.h>
8888 #     ifdef TIOCGWINSZ
8889         yes
8890 #     endif
8891     
8892 EOF
8893 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8894   egrep "yes" >/dev/null 2>&1; then
8895   rm -rf conftest*
8896   gwinsz_in_termios_h=yes
8897 fi
8898 rm -f conftest*
8899
8900   fi
8901
8902   if test $gwinsz_in_termios_h = no; then
8903     cat > conftest.$ac_ext <<EOF
8904 #line 8905 "configure"
8905 #include "confdefs.h"
8906 #include <sys/types.h>
8907 #     include <sys/ioctl.h>
8908 #     ifdef TIOCGWINSZ
8909         yes
8910 #     endif
8911     
8912 EOF
8913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8914   egrep "yes" >/dev/null 2>&1; then
8915   rm -rf conftest*
8916   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8917 fi
8918 rm -f conftest*
8919
8920   fi
8921   
8922 fi
8923
8924 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8925   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8926     cat >> confdefs.h <<\EOF
8927 #define GWINSZ_IN_SYS_IOCTL 1
8928 EOF
8929
8930   fi
8931
8932 if test $am_cv_sys_posix_termios = yes ; then
8933         cat >> confdefs.h <<\EOF
8934 #define HAVE_POSIX_TERMIOS 1
8935 EOF
8936
8937 fi
8938
8939 for ac_hdr in \
8940         arpa/inet.h             \
8941         arpa/nameser.h  \
8942         assert.h                \
8943         crypt.h                 \
8944         errno.h                 \
8945         fcntl.h                 \
8946         filio.h                 \
8947         getopt.h                \
8948         libutil.h               \
8949         limits.h                \
8950         locale.h                \
8951         malloc.h                \
8952         memory.h                \
8953         regex.h                 \
8954         psap.h                  \
8955         pwd.h                   \
8956         resolv.h                \
8957         sgtty.h                 \
8958         stdarg.h                \
8959         stddef.h                \
8960         string.h                \
8961         strings.h               \
8962         sysexits.h              \
8963         sys/file.h              \
8964         sys/filio.h             \
8965         sys/errno.h             \
8966         sys/ioctl.h             \
8967         sys/param.h             \
8968         sys/resource.h  \
8969         sys/socket.h    \
8970         sys/syslog.h    \
8971         sys/time.h              \
8972         sys/types.h             \
8973         syslog.h                \
8974         termios.h               \
8975         unistd.h                \
8976
8977 do
8978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8980 echo "configure:8981: checking for $ac_hdr" >&5
8981 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   cat > conftest.$ac_ext <<EOF
8985 #line 8986 "configure"
8986 #include "confdefs.h"
8987 #include <$ac_hdr>
8988 EOF
8989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8990 { (eval echo configure:8991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8992 if test -z "$ac_err"; then
8993   rm -rf conftest*
8994   eval "ac_cv_header_$ac_safe=yes"
8995 else
8996   echo "$ac_err" >&5
8997   echo "configure: failed program was:" >&5
8998   cat conftest.$ac_ext >&5
8999   rm -rf conftest*
9000   eval "ac_cv_header_$ac_safe=no"
9001 fi
9002 rm -f conftest*
9003 fi
9004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9005   echo "$ac_t""yes" 1>&6
9006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9007   cat >> confdefs.h <<EOF
9008 #define $ac_tr_hdr 1
9009 EOF
9010  
9011 else
9012   echo "$ac_t""no" 1>&6
9013 fi
9014 done
9015
9016
9017 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9018 echo "configure:9019: checking for uid_t in sys/types.h" >&5
9019 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9020   echo $ac_n "(cached) $ac_c" 1>&6
9021 else
9022   cat > conftest.$ac_ext <<EOF
9023 #line 9024 "configure"
9024 #include "confdefs.h"
9025 #include <sys/types.h>
9026 EOF
9027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9028   egrep "uid_t" >/dev/null 2>&1; then
9029   rm -rf conftest*
9030   ac_cv_type_uid_t=yes
9031 else
9032   rm -rf conftest*
9033   ac_cv_type_uid_t=no
9034 fi
9035 rm -f conftest*
9036
9037 fi
9038
9039 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9040 if test $ac_cv_type_uid_t = no; then
9041   cat >> confdefs.h <<\EOF
9042 #define uid_t int
9043 EOF
9044
9045   cat >> confdefs.h <<\EOF
9046 #define gid_t int
9047 EOF
9048
9049 fi
9050
9051 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9052 echo "configure:9053: checking type of array argument to getgroups" >&5
9053 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9054   echo $ac_n "(cached) $ac_c" 1>&6
9055 else
9056   if test "$cross_compiling" = yes; then
9057   ac_cv_type_getgroups=cross
9058 else
9059   cat > conftest.$ac_ext <<EOF
9060 #line 9061 "configure"
9061 #include "confdefs.h"
9062
9063 /* Thanks to Mike Rendell for this test.  */
9064 #include <sys/types.h>
9065 #define NGID 256
9066 #undef MAX
9067 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9068 main()
9069 {
9070   gid_t gidset[NGID];
9071   int i, n;
9072   union { gid_t gval; long lval; }  val;
9073
9074   val.lval = -1;
9075   for (i = 0; i < NGID; i++)
9076     gidset[i] = val.gval;
9077   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9078                  gidset);
9079   /* Exit non-zero if getgroups seems to require an array of ints.  This
9080      happens when gid_t is short but getgroups modifies an array of ints.  */
9081   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9082 }
9083
9084 EOF
9085 if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9086 then
9087     ac_cv_type_getgroups=gid_t
9088 else
9089   echo "configure: failed program was:" >&5
9090   cat conftest.$ac_ext >&5
9091   rm -fr conftest*
9092   ac_cv_type_getgroups=int
9093 fi
9094 rm -fr conftest*
9095 fi
9096
9097 if test $ac_cv_type_getgroups = cross; then
9098         cat > conftest.$ac_ext <<EOF
9099 #line 9100 "configure"
9100 #include "confdefs.h"
9101 #include <unistd.h>
9102 EOF
9103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9104   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9105   rm -rf conftest*
9106   ac_cv_type_getgroups=gid_t
9107 else
9108   rm -rf conftest*
9109   ac_cv_type_getgroups=int
9110 fi
9111 rm -f conftest*
9112
9113 fi
9114 fi
9115
9116 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9117 cat >> confdefs.h <<EOF
9118 #define GETGROUPS_T $ac_cv_type_getgroups
9119 EOF
9120
9121  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9122 echo "configure:9123: checking for ANSI C header files" >&5
9123 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9124   echo $ac_n "(cached) $ac_c" 1>&6
9125 else
9126   cat > conftest.$ac_ext <<EOF
9127 #line 9128 "configure"
9128 #include "confdefs.h"
9129 #include <stdlib.h>
9130 #include <stdarg.h>
9131 #include <string.h>
9132 #include <float.h>
9133 EOF
9134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9135 { (eval echo configure:9136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9137 if test -z "$ac_err"; then
9138   rm -rf conftest*
9139   ac_cv_header_stdc=yes
9140 else
9141   echo "$ac_err" >&5
9142   echo "configure: failed program was:" >&5
9143   cat conftest.$ac_ext >&5
9144   rm -rf conftest*
9145   ac_cv_header_stdc=no
9146 fi
9147 rm -f conftest*
9148
9149 if test $ac_cv_header_stdc = yes; then
9150   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9151 cat > conftest.$ac_ext <<EOF
9152 #line 9153 "configure"
9153 #include "confdefs.h"
9154 #include <string.h>
9155 EOF
9156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9157   egrep "memchr" >/dev/null 2>&1; then
9158   :
9159 else
9160   rm -rf conftest*
9161   ac_cv_header_stdc=no
9162 fi
9163 rm -f conftest*
9164
9165 fi
9166
9167 if test $ac_cv_header_stdc = yes; then
9168   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9169 cat > conftest.$ac_ext <<EOF
9170 #line 9171 "configure"
9171 #include "confdefs.h"
9172 #include <stdlib.h>
9173 EOF
9174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9175   egrep "free" >/dev/null 2>&1; then
9176   :
9177 else
9178   rm -rf conftest*
9179   ac_cv_header_stdc=no
9180 fi
9181 rm -f conftest*
9182
9183 fi
9184
9185 if test $ac_cv_header_stdc = yes; then
9186   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9187 if test "$cross_compiling" = yes; then
9188   :
9189 else
9190   cat > conftest.$ac_ext <<EOF
9191 #line 9192 "configure"
9192 #include "confdefs.h"
9193 #include <ctype.h>
9194 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9195 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9196 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9197 int main () { int i; for (i = 0; i < 256; i++)
9198 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9199 exit (0); }
9200
9201 EOF
9202 if { (eval echo configure:9203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9203 then
9204   :
9205 else
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -fr conftest*
9209   ac_cv_header_stdc=no
9210 fi
9211 rm -fr conftest*
9212 fi
9213
9214 fi
9215 fi
9216
9217 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9218 if test $ac_cv_header_stdc = yes; then
9219   cat >> confdefs.h <<\EOF
9220 #define STDC_HEADERS 1
9221 EOF
9222
9223 fi
9224
9225 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9226 echo "configure:9227: checking for mode_t" >&5
9227 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9228   echo $ac_n "(cached) $ac_c" 1>&6
9229 else
9230   cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 #include <sys/types.h>
9234 #if STDC_HEADERS
9235 #include <stdlib.h>
9236 #include <stddef.h>
9237 #endif
9238 EOF
9239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9240   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9241   rm -rf conftest*
9242   ac_cv_type_mode_t=yes
9243 else
9244   rm -rf conftest*
9245   ac_cv_type_mode_t=no
9246 fi
9247 rm -f conftest*
9248
9249 fi
9250 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9251 if test $ac_cv_type_mode_t = no; then
9252   cat >> confdefs.h <<\EOF
9253 #define mode_t int
9254 EOF
9255
9256 fi
9257
9258 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9259 echo "configure:9260: checking for off_t" >&5
9260 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9261   echo $ac_n "(cached) $ac_c" 1>&6
9262 else
9263   cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9266 #include <sys/types.h>
9267 #if STDC_HEADERS
9268 #include <stdlib.h>
9269 #include <stddef.h>
9270 #endif
9271 EOF
9272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9273   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9274   rm -rf conftest*
9275   ac_cv_type_off_t=yes
9276 else
9277   rm -rf conftest*
9278   ac_cv_type_off_t=no
9279 fi
9280 rm -f conftest*
9281
9282 fi
9283 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9284 if test $ac_cv_type_off_t = no; then
9285   cat >> confdefs.h <<\EOF
9286 #define off_t long
9287 EOF
9288
9289 fi
9290
9291 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9292 echo "configure:9293: checking for pid_t" >&5
9293 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <sys/types.h>
9300 #if STDC_HEADERS
9301 #include <stdlib.h>
9302 #include <stddef.h>
9303 #endif
9304 EOF
9305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9306   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9307   rm -rf conftest*
9308   ac_cv_type_pid_t=yes
9309 else
9310   rm -rf conftest*
9311   ac_cv_type_pid_t=no
9312 fi
9313 rm -f conftest*
9314
9315 fi
9316 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9317 if test $ac_cv_type_pid_t = no; then
9318   cat >> confdefs.h <<\EOF
9319 #define pid_t int
9320 EOF
9321
9322 fi
9323
9324 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9325 echo "configure:9326: checking for ptrdiff_t" >&5
9326 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9327   echo $ac_n "(cached) $ac_c" 1>&6
9328 else
9329   cat > conftest.$ac_ext <<EOF
9330 #line 9331 "configure"
9331 #include "confdefs.h"
9332 #include <stddef.h>
9333 int main() {
9334 ptrdiff_t p
9335 ; return 0; }
9336 EOF
9337 if { (eval echo configure:9338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9338   rm -rf conftest*
9339   am_cv_type_ptrdiff_t=yes
9340 else
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -rf conftest*
9344   am_cv_type_ptrdiff_t=no
9345 fi
9346 rm -f conftest*
9347 fi
9348
9349 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9350    if test $am_cv_type_ptrdiff_t = yes; then
9351      cat >> confdefs.h <<\EOF
9352 #define HAVE_PTRDIFF_T 1
9353 EOF
9354
9355    fi
9356
9357 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9358 echo "configure:9359: checking return type of signal handlers" >&5
9359 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9360   echo $ac_n "(cached) $ac_c" 1>&6
9361 else
9362   cat > conftest.$ac_ext <<EOF
9363 #line 9364 "configure"
9364 #include "confdefs.h"
9365 #include <sys/types.h>
9366 #include <signal.h>
9367 #ifdef signal
9368 #undef signal
9369 #endif
9370 #ifdef __cplusplus
9371 extern "C" void (*signal (int, void (*)(int)))(int);
9372 #else
9373 void (*signal ()) ();
9374 #endif
9375
9376 int main() {
9377 int i;
9378 ; return 0; }
9379 EOF
9380 if { (eval echo configure:9381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9381   rm -rf conftest*
9382   ac_cv_type_signal=void
9383 else
9384   echo "configure: failed program was:" >&5
9385   cat conftest.$ac_ext >&5
9386   rm -rf conftest*
9387   ac_cv_type_signal=int
9388 fi
9389 rm -f conftest*
9390 fi
9391
9392 echo "$ac_t""$ac_cv_type_signal" 1>&6
9393 cat >> confdefs.h <<EOF
9394 #define RETSIGTYPE $ac_cv_type_signal
9395 EOF
9396
9397
9398 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9399 echo "configure:9400: checking for sig_atomic_t" >&5
9400 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9401   echo $ac_n "(cached) $ac_c" 1>&6
9402 else
9403   cat > conftest.$ac_ext <<EOF
9404 #line 9405 "configure"
9405 #include "confdefs.h"
9406 #include <signal.h>
9407 int main() {
9408 sig_atomic_t atomic;
9409 ; return 0; }
9410 EOF
9411 if { (eval echo configure:9412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9412   rm -rf conftest*
9413   ol_cv_type_sig_atomic_t=yes
9414 else
9415   echo "configure: failed program was:" >&5
9416   cat conftest.$ac_ext >&5
9417   rm -rf conftest*
9418   ol_cv_type_sig_atomic_t=no
9419 fi
9420 rm -f conftest*
9421 fi
9422
9423 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9424   if test $ol_cv_type_sig_atomic_t = no; then
9425     cat >> confdefs.h <<\EOF
9426 #define sig_atomic_t int
9427 EOF
9428
9429   fi
9430  
9431 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9432 echo "configure:9433: checking for size_t" >&5
9433 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9434   echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436   cat > conftest.$ac_ext <<EOF
9437 #line 9438 "configure"
9438 #include "confdefs.h"
9439 #include <sys/types.h>
9440 #if STDC_HEADERS
9441 #include <stdlib.h>
9442 #include <stddef.h>
9443 #endif
9444 EOF
9445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9446   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9447   rm -rf conftest*
9448   ac_cv_type_size_t=yes
9449 else
9450   rm -rf conftest*
9451   ac_cv_type_size_t=no
9452 fi
9453 rm -f conftest*
9454
9455 fi
9456 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9457 if test $ac_cv_type_size_t = no; then
9458   cat >> confdefs.h <<\EOF
9459 #define size_t unsigned
9460 EOF
9461
9462 fi
9463
9464 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9465 echo "configure:9466: checking for st_blksize in struct stat" >&5
9466 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469   cat > conftest.$ac_ext <<EOF
9470 #line 9471 "configure"
9471 #include "confdefs.h"
9472 #include <sys/types.h>
9473 #include <sys/stat.h>
9474 int main() {
9475 struct stat s; s.st_blksize;
9476 ; return 0; }
9477 EOF
9478 if { (eval echo configure:9479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9479   rm -rf conftest*
9480   ac_cv_struct_st_blksize=yes
9481 else
9482   echo "configure: failed program was:" >&5
9483   cat conftest.$ac_ext >&5
9484   rm -rf conftest*
9485   ac_cv_struct_st_blksize=no
9486 fi
9487 rm -f conftest*
9488 fi
9489
9490 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9491 if test $ac_cv_struct_st_blksize = yes; then
9492   cat >> confdefs.h <<\EOF
9493 #define HAVE_ST_BLKSIZE 1
9494 EOF
9495
9496 fi
9497
9498 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9499 echo "configure:9500: checking whether time.h and sys/time.h may both be included" >&5
9500 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9501   echo $ac_n "(cached) $ac_c" 1>&6
9502 else
9503   cat > conftest.$ac_ext <<EOF
9504 #line 9505 "configure"
9505 #include "confdefs.h"
9506 #include <sys/types.h>
9507 #include <sys/time.h>
9508 #include <time.h>
9509 int main() {
9510 struct tm *tp;
9511 ; return 0; }
9512 EOF
9513 if { (eval echo configure:9514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9514   rm -rf conftest*
9515   ac_cv_header_time=yes
9516 else
9517   echo "configure: failed program was:" >&5
9518   cat conftest.$ac_ext >&5
9519   rm -rf conftest*
9520   ac_cv_header_time=no
9521 fi
9522 rm -f conftest*
9523 fi
9524
9525 echo "$ac_t""$ac_cv_header_time" 1>&6
9526 if test $ac_cv_header_time = yes; then
9527   cat >> confdefs.h <<\EOF
9528 #define TIME_WITH_SYS_TIME 1
9529 EOF
9530
9531 fi
9532
9533 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
9534 echo "configure:9535: checking whether struct tm is in sys/time.h or time.h" >&5
9535 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
9536   echo $ac_n "(cached) $ac_c" 1>&6
9537 else
9538   cat > conftest.$ac_ext <<EOF
9539 #line 9540 "configure"
9540 #include "confdefs.h"
9541 #include <sys/types.h>
9542 #include <time.h>
9543 int main() {
9544 struct tm *tp; tp->tm_sec;
9545 ; return 0; }
9546 EOF
9547 if { (eval echo configure:9548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9548   rm -rf conftest*
9549   ac_cv_struct_tm=time.h
9550 else
9551   echo "configure: failed program was:" >&5
9552   cat conftest.$ac_ext >&5
9553   rm -rf conftest*
9554   ac_cv_struct_tm=sys/time.h
9555 fi
9556 rm -f conftest*
9557 fi
9558
9559 echo "$ac_t""$ac_cv_struct_tm" 1>&6
9560 if test $ac_cv_struct_tm = sys/time.h; then
9561   cat >> confdefs.h <<\EOF
9562 #define TM_IN_SYS_TIME 1
9563 EOF
9564
9565 fi
9566
9567 # test for pw_gecos in struct passwd
9568 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
9569 echo "configure:9570: checking struct passwd for pw_gecos" >&5
9570 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
9571   echo $ac_n "(cached) $ac_c" 1>&6
9572 else
9573   
9574         cat > conftest.$ac_ext <<EOF
9575 #line 9576 "configure"
9576 #include "confdefs.h"
9577 #include <pwd.h>
9578 int main() {
9579
9580         struct passwd pwd;
9581         pwd.pw_gecos = pwd.pw_name;
9582
9583 ; return 0; }
9584 EOF
9585 if { (eval echo configure:9586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9586   rm -rf conftest*
9587   ol_cv_struct_passwd_pw_gecos=yes
9588 else
9589   echo "configure: failed program was:" >&5
9590   cat conftest.$ac_ext >&5
9591   rm -rf conftest*
9592   ol_cv_struct_passwd_pw_gecos=no
9593 fi
9594 rm -f conftest*
9595 fi
9596
9597 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
9598 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
9599         cat >> confdefs.h <<\EOF
9600 #define HAVE_PW_GECOS 1
9601 EOF
9602
9603 fi
9604
9605
9606
9607 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
9608 echo "configure:9609: checking if toupper() requires islower()" >&5
9609 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
9610   echo $ac_n "(cached) $ac_c" 1>&6
9611 else
9612   
9613         if test "$cross_compiling" = yes; then
9614   ol_cv_c_upper_lower=safe
9615 else
9616   cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619
9620 #include <ctype.h>
9621 main()
9622 {
9623         if ('C' == toupper('C'))
9624                 exit(0);
9625         else
9626                 exit(1);
9627 }
9628 EOF
9629 if { (eval echo configure:9630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9630 then
9631   ol_cv_c_upper_lower=no
9632 else
9633   echo "configure: failed program was:" >&5
9634   cat conftest.$ac_ext >&5
9635   rm -fr conftest*
9636   ol_cv_c_upper_lower=yes
9637 fi
9638 rm -fr conftest*
9639 fi
9640
9641 fi
9642
9643 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
9644 if test $ol_cv_c_upper_lower != no ; then
9645         cat >> confdefs.h <<\EOF
9646 #define C_UPPER_LOWER 1
9647 EOF
9648
9649 fi
9650
9651 echo $ac_n "checking for working const""... $ac_c" 1>&6
9652 echo "configure:9653: checking for working const" >&5
9653 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659
9660 int main() {
9661
9662 /* Ultrix mips cc rejects this.  */
9663 typedef int charset[2]; const charset x;
9664 /* SunOS 4.1.1 cc rejects this.  */
9665 char const *const *ccp;
9666 char **p;
9667 /* NEC SVR4.0.2 mips cc rejects this.  */
9668 struct point {int x, y;};
9669 static struct point const zero = {0,0};
9670 /* AIX XL C 1.02.0.0 rejects this.
9671    It does not let you subtract one const X* pointer from another in an arm
9672    of an if-expression whose if-part is not a constant expression */
9673 const char *g = "string";
9674 ccp = &g + (g ? g-g : 0);
9675 /* HPUX 7.0 cc rejects these. */
9676 ++ccp;
9677 p = (char**) ccp;
9678 ccp = (char const *const *) p;
9679 { /* SCO 3.2v4 cc rejects this.  */
9680   char *t;
9681   char const *s = 0 ? (char *) 0 : (char const *) 0;
9682
9683   *t++ = 0;
9684 }
9685 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9686   int x[] = {25, 17};
9687   const int *foo = &x[0];
9688   ++foo;
9689 }
9690 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9691   typedef const int *iptr;
9692   iptr p = 0;
9693   ++p;
9694 }
9695 { /* AIX XL C 1.02.0.0 rejects this saying
9696      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9697   struct s { int j; const int *ap[3]; };
9698   struct s *b; b->j = 5;
9699 }
9700 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9701   const int foo = 10;
9702 }
9703
9704 ; return 0; }
9705 EOF
9706 if { (eval echo configure:9707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9707   rm -rf conftest*
9708   ac_cv_c_const=yes
9709 else
9710   echo "configure: failed program was:" >&5
9711   cat conftest.$ac_ext >&5
9712   rm -rf conftest*
9713   ac_cv_c_const=no
9714 fi
9715 rm -f conftest*
9716 fi
9717
9718 echo "$ac_t""$ac_cv_c_const" 1>&6
9719 if test $ac_cv_c_const = no; then
9720   cat >> confdefs.h <<\EOF
9721 #define const 
9722 EOF
9723
9724 fi
9725
9726 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
9727 echo "configure:9728: checking if compiler understands volatile" >&5
9728 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
9729   echo $ac_n "(cached) $ac_c" 1>&6
9730 else
9731   cat > conftest.$ac_ext <<EOF
9732 #line 9733 "configure"
9733 #include "confdefs.h"
9734 int x, y, z;
9735 int main() {
9736 volatile int a; int * volatile b = x ? &y : &z;
9737       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
9738       *b = 0;
9739 ; return 0; }
9740 EOF
9741 if { (eval echo configure:9742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9742   rm -rf conftest*
9743   ol_cv_c_volatile=yes
9744 else
9745   echo "configure: failed program was:" >&5
9746   cat conftest.$ac_ext >&5
9747   rm -rf conftest*
9748   ol_cv_c_volatile=no
9749 fi
9750 rm -f conftest*
9751 fi
9752
9753 echo "$ac_t""$ol_cv_c_volatile" 1>&6
9754   if test $ol_cv_c_volatile = yes; then
9755     : 
9756   else
9757     cat >> confdefs.h <<\EOF
9758 #define volatile 
9759 EOF
9760
9761   fi
9762  
9763
9764 if test $cross_compiling = yes ; then
9765         cat >> confdefs.h <<\EOF
9766 #define CROSS_COMPILING 1
9767 EOF
9768
9769 else
9770         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
9771 echo "configure:9772: checking whether byte ordering is bigendian" >&5
9772 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
9773   echo $ac_n "(cached) $ac_c" 1>&6
9774 else
9775   ac_cv_c_bigendian=unknown
9776 # See if sys/param.h defines the BYTE_ORDER macro.
9777 cat > conftest.$ac_ext <<EOF
9778 #line 9779 "configure"
9779 #include "confdefs.h"
9780 #include <sys/types.h>
9781 #include <sys/param.h>
9782 int main() {
9783
9784 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9785  bogus endian macros
9786 #endif
9787 ; return 0; }
9788 EOF
9789 if { (eval echo configure:9790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9790   rm -rf conftest*
9791   # It does; now see whether it defined to BIG_ENDIAN or not.
9792 cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795 #include <sys/types.h>
9796 #include <sys/param.h>
9797 int main() {
9798
9799 #if BYTE_ORDER != BIG_ENDIAN
9800  not big endian
9801 #endif
9802 ; return 0; }
9803 EOF
9804 if { (eval echo configure:9805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9805   rm -rf conftest*
9806   ac_cv_c_bigendian=yes
9807 else
9808   echo "configure: failed program was:" >&5
9809   cat conftest.$ac_ext >&5
9810   rm -rf conftest*
9811   ac_cv_c_bigendian=no
9812 fi
9813 rm -f conftest*
9814 else
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817 fi
9818 rm -f conftest*
9819 if test $ac_cv_c_bigendian = unknown; then
9820 if test "$cross_compiling" = yes; then
9821     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9822 else
9823   cat > conftest.$ac_ext <<EOF
9824 #line 9825 "configure"
9825 #include "confdefs.h"
9826 main () {
9827   /* Are we little or big endian?  From Harbison&Steele.  */
9828   union
9829   {
9830     long l;
9831     char c[sizeof (long)];
9832   } u;
9833   u.l = 1;
9834   exit (u.c[sizeof (long) - 1] == 1);
9835 }
9836 EOF
9837 if { (eval echo configure:9838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9838 then
9839   ac_cv_c_bigendian=no
9840 else
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -fr conftest*
9844   ac_cv_c_bigendian=yes
9845 fi
9846 rm -fr conftest*
9847 fi
9848
9849 fi
9850 fi
9851
9852 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
9853 if test $ac_cv_c_bigendian = yes; then
9854   cat >> confdefs.h <<\EOF
9855 #define WORDS_BIGENDIAN 1
9856 EOF
9857
9858 fi
9859
9860         echo $ac_n "checking size of short""... $ac_c" 1>&6
9861 echo "configure:9862: checking size of short" >&5
9862 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
9863   echo $ac_n "(cached) $ac_c" 1>&6
9864 else
9865   if test "$cross_compiling" = yes; then
9866     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9867 else
9868   cat > conftest.$ac_ext <<EOF
9869 #line 9870 "configure"
9870 #include "confdefs.h"
9871 #include <stdio.h>
9872 main()
9873 {
9874   FILE *f=fopen("conftestval", "w");
9875   if (!f) exit(1);
9876   fprintf(f, "%d\n", sizeof(short));
9877   exit(0);
9878 }
9879 EOF
9880 if { (eval echo configure:9881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9881 then
9882   ac_cv_sizeof_short=`cat conftestval`
9883 else
9884   echo "configure: failed program was:" >&5
9885   cat conftest.$ac_ext >&5
9886   rm -fr conftest*
9887   ac_cv_sizeof_short=0
9888 fi
9889 rm -fr conftest*
9890 fi
9891
9892 fi
9893 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
9894 cat >> confdefs.h <<EOF
9895 #define SIZEOF_SHORT $ac_cv_sizeof_short
9896 EOF
9897
9898  
9899         echo $ac_n "checking size of int""... $ac_c" 1>&6
9900 echo "configure:9901: checking size of int" >&5
9901 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
9902   echo $ac_n "(cached) $ac_c" 1>&6
9903 else
9904   if test "$cross_compiling" = yes; then
9905     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9906 else
9907   cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 #include <stdio.h>
9911 main()
9912 {
9913   FILE *f=fopen("conftestval", "w");
9914   if (!f) exit(1);
9915   fprintf(f, "%d\n", sizeof(int));
9916   exit(0);
9917 }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9920 then
9921   ac_cv_sizeof_int=`cat conftestval`
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -fr conftest*
9926   ac_cv_sizeof_int=0
9927 fi
9928 rm -fr conftest*
9929 fi
9930
9931 fi
9932 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
9933 cat >> confdefs.h <<EOF
9934 #define SIZEOF_INT $ac_cv_sizeof_int
9935 EOF
9936
9937  
9938         echo $ac_n "checking size of long""... $ac_c" 1>&6
9939 echo "configure:9940: checking size of long" >&5
9940 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
9941   echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943   if test "$cross_compiling" = yes; then
9944     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9945 else
9946   cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 #include <stdio.h>
9950 main()
9951 {
9952   FILE *f=fopen("conftestval", "w");
9953   if (!f) exit(1);
9954   fprintf(f, "%d\n", sizeof(long));
9955   exit(0);
9956 }
9957 EOF
9958 if { (eval echo configure:9959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9959 then
9960   ac_cv_sizeof_long=`cat conftestval`
9961 else
9962   echo "configure: failed program was:" >&5
9963   cat conftest.$ac_ext >&5
9964   rm -fr conftest*
9965   ac_cv_sizeof_long=0
9966 fi
9967 rm -fr conftest*
9968 fi
9969
9970 fi
9971 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
9972 cat >> confdefs.h <<EOF
9973 #define SIZEOF_LONG $ac_cv_sizeof_long
9974 EOF
9975
9976
9977 fi
9978
9979 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
9980 echo "configure:9981: checking for 8-bit clean memcmp" >&5
9981 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
9982   echo $ac_n "(cached) $ac_c" 1>&6
9983 else
9984   if test "$cross_compiling" = yes; then
9985   ac_cv_func_memcmp_clean=no
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990
9991 main()
9992 {
9993   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
9994   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
9995 }
9996
9997 EOF
9998 if { (eval echo configure:9999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9999 then
10000   ac_cv_func_memcmp_clean=yes
10001 else
10002   echo "configure: failed program was:" >&5
10003   cat conftest.$ac_ext >&5
10004   rm -fr conftest*
10005   ac_cv_func_memcmp_clean=no
10006 fi
10007 rm -fr conftest*
10008 fi
10009
10010 fi
10011
10012 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10013 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10014
10015 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10016 echo "configure:10017: checking for strftime" >&5
10017 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10018   echo $ac_n "(cached) $ac_c" 1>&6
10019 else
10020   cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023 /* System header to define __stub macros and hopefully few prototypes,
10024     which can conflict with char strftime(); below.  */
10025 #include <assert.h>
10026 /* Override any gcc2 internal prototype to avoid an error.  */
10027 /* We use char because int might match the return type of a gcc2
10028     builtin and then its argument prototype would still apply.  */
10029 char strftime();
10030
10031 int main() {
10032
10033 /* The GNU C library defines this for functions which it implements
10034     to always fail with ENOSYS.  Some functions are actually named
10035     something starting with __ and the normal name is an alias.  */
10036 #if defined (__stub_strftime) || defined (__stub___strftime)
10037 choke me
10038 #else
10039 strftime();
10040 #endif
10041
10042 ; return 0; }
10043 EOF
10044 if { (eval echo configure:10045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10045   rm -rf conftest*
10046   eval "ac_cv_func_strftime=yes"
10047 else
10048   echo "configure: failed program was:" >&5
10049   cat conftest.$ac_ext >&5
10050   rm -rf conftest*
10051   eval "ac_cv_func_strftime=no"
10052 fi
10053 rm -f conftest*
10054 fi
10055
10056 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10057   echo "$ac_t""yes" 1>&6
10058   cat >> confdefs.h <<\EOF
10059 #define HAVE_STRFTIME 1
10060 EOF
10061
10062 else
10063   echo "$ac_t""no" 1>&6
10064 # strftime is in -lintl on SCO UNIX.
10065 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10066 echo "configure:10067: checking for strftime in -lintl" >&5
10067 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   ac_save_LIBS="$LIBS"
10072 LIBS="-lintl  $LIBS"
10073 cat > conftest.$ac_ext <<EOF
10074 #line 10075 "configure"
10075 #include "confdefs.h"
10076 /* Override any gcc2 internal prototype to avoid an error.  */
10077 /* We use char because int might match the return type of a gcc2
10078     builtin and then its argument prototype would still apply.  */
10079 char strftime();
10080
10081 int main() {
10082 strftime()
10083 ; return 0; }
10084 EOF
10085 if { (eval echo configure:10086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10086   rm -rf conftest*
10087   eval "ac_cv_lib_$ac_lib_var=yes"
10088 else
10089   echo "configure: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   rm -rf conftest*
10092   eval "ac_cv_lib_$ac_lib_var=no"
10093 fi
10094 rm -f conftest*
10095 LIBS="$ac_save_LIBS"
10096
10097 fi
10098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10099   echo "$ac_t""yes" 1>&6
10100   cat >> confdefs.h <<\EOF
10101 #define HAVE_STRFTIME 1
10102 EOF
10103
10104 LIBS="-lintl $LIBS"
10105 else
10106   echo "$ac_t""no" 1>&6
10107 fi
10108
10109 fi
10110
10111 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10112 echo "configure:10113: checking for vprintf" >&5
10113 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 /* System header to define __stub macros and hopefully few prototypes,
10120     which can conflict with char vprintf(); below.  */
10121 #include <assert.h>
10122 /* Override any gcc2 internal prototype to avoid an error.  */
10123 /* We use char because int might match the return type of a gcc2
10124     builtin and then its argument prototype would still apply.  */
10125 char vprintf();
10126
10127 int main() {
10128
10129 /* The GNU C library defines this for functions which it implements
10130     to always fail with ENOSYS.  Some functions are actually named
10131     something starting with __ and the normal name is an alias.  */
10132 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10133 choke me
10134 #else
10135 vprintf();
10136 #endif
10137
10138 ; return 0; }
10139 EOF
10140 if { (eval echo configure:10141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10141   rm -rf conftest*
10142   eval "ac_cv_func_vprintf=yes"
10143 else
10144   echo "configure: failed program was:" >&5
10145   cat conftest.$ac_ext >&5
10146   rm -rf conftest*
10147   eval "ac_cv_func_vprintf=no"
10148 fi
10149 rm -f conftest*
10150 fi
10151
10152 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10153   echo "$ac_t""yes" 1>&6
10154   cat >> confdefs.h <<\EOF
10155 #define HAVE_VPRINTF 1
10156 EOF
10157
10158 else
10159   echo "$ac_t""no" 1>&6
10160 fi
10161
10162 if test "$ac_cv_func_vprintf" != yes; then
10163 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10164 echo "configure:10165: checking for _doprnt" >&5
10165 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 /* System header to define __stub macros and hopefully few prototypes,
10172     which can conflict with char _doprnt(); below.  */
10173 #include <assert.h>
10174 /* Override any gcc2 internal prototype to avoid an error.  */
10175 /* We use char because int might match the return type of a gcc2
10176     builtin and then its argument prototype would still apply.  */
10177 char _doprnt();
10178
10179 int main() {
10180
10181 /* The GNU C library defines this for functions which it implements
10182     to always fail with ENOSYS.  Some functions are actually named
10183     something starting with __ and the normal name is an alias.  */
10184 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10185 choke me
10186 #else
10187 _doprnt();
10188 #endif
10189
10190 ; return 0; }
10191 EOF
10192 if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10193   rm -rf conftest*
10194   eval "ac_cv_func__doprnt=yes"
10195 else
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   eval "ac_cv_func__doprnt=no"
10200 fi
10201 rm -f conftest*
10202 fi
10203
10204 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10205   echo "$ac_t""yes" 1>&6
10206   cat >> confdefs.h <<\EOF
10207 #define HAVE_DOPRNT 1
10208 EOF
10209
10210 else
10211   echo "$ac_t""no" 1>&6
10212 fi
10213
10214 fi
10215
10216
10217 if test $ac_cv_func_vprintf = yes ; then
10218                 for ac_func in vsnprintf vsprintf
10219 do
10220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10221 echo "configure:10222: checking for $ac_func" >&5
10222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10223   echo $ac_n "(cached) $ac_c" 1>&6
10224 else
10225   cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 /* System header to define __stub macros and hopefully few prototypes,
10229     which can conflict with char $ac_func(); below.  */
10230 #include <assert.h>
10231 /* Override any gcc2 internal prototype to avoid an error.  */
10232 /* We use char because int might match the return type of a gcc2
10233     builtin and then its argument prototype would still apply.  */
10234 char $ac_func();
10235
10236 int main() {
10237
10238 /* The GNU C library defines this for functions which it implements
10239     to always fail with ENOSYS.  Some functions are actually named
10240     something starting with __ and the normal name is an alias.  */
10241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10242 choke me
10243 #else
10244 $ac_func();
10245 #endif
10246
10247 ; return 0; }
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10250   rm -rf conftest*
10251   eval "ac_cv_func_$ac_func=yes"
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -rf conftest*
10256   eval "ac_cv_func_$ac_func=no"
10257 fi
10258 rm -f conftest*
10259 fi
10260
10261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10264   cat >> confdefs.h <<EOF
10265 #define $ac_tr_func 1
10266 EOF
10267  
10268 else
10269   echo "$ac_t""no" 1>&6
10270 fi
10271 done
10272
10273 fi
10274
10275 for ac_func in \
10276         bcopy                   \
10277         flock                   \
10278         getdtablesize           \
10279         gethostname             \
10280         getpass                 \
10281         getpwuid                \
10282         gettimeofday            \
10283         lockf                   \
10284         memcpy                  \
10285         memmove                 \
10286         mkstemp                 \
10287         select                  \
10288         setpwfile               \
10289         setsid                  \
10290         signal                  \
10291         sigset                  \
10292         snprintf                \
10293         socket                  \
10294         strdup                  \
10295         strerror                \
10296         strpbrk                 \
10297         strrchr                 \
10298         strsep                  \
10299         strstr                  \
10300         strtol                  \
10301         strtoul                 \
10302         strspn                  \
10303         sysconf                 \
10304         waitpid                 \
10305         wait4                   \
10306
10307 do
10308 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10309 echo "configure:10310: checking for $ac_func" >&5
10310 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10311   echo $ac_n "(cached) $ac_c" 1>&6
10312 else
10313   cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316 /* System header to define __stub macros and hopefully few prototypes,
10317     which can conflict with char $ac_func(); below.  */
10318 #include <assert.h>
10319 /* Override any gcc2 internal prototype to avoid an error.  */
10320 /* We use char because int might match the return type of a gcc2
10321     builtin and then its argument prototype would still apply.  */
10322 char $ac_func();
10323
10324 int main() {
10325
10326 /* The GNU C library defines this for functions which it implements
10327     to always fail with ENOSYS.  Some functions are actually named
10328     something starting with __ and the normal name is an alias.  */
10329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10330 choke me
10331 #else
10332 $ac_func();
10333 #endif
10334
10335 ; return 0; }
10336 EOF
10337 if { (eval echo configure:10338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10338   rm -rf conftest*
10339   eval "ac_cv_func_$ac_func=yes"
10340 else
10341   echo "configure: failed program was:" >&5
10342   cat conftest.$ac_ext >&5
10343   rm -rf conftest*
10344   eval "ac_cv_func_$ac_func=no"
10345 fi
10346 rm -f conftest*
10347 fi
10348
10349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10350   echo "$ac_t""yes" 1>&6
10351     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10352   cat >> confdefs.h <<EOF
10353 #define $ac_tr_func 1
10354 EOF
10355  
10356 else
10357   echo "$ac_t""no" 1>&6
10358 fi
10359 done
10360
10361
10362 for ac_func in getopt tempnam
10363 do
10364 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10365 echo "configure:10366: checking for $ac_func" >&5
10366 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10367   echo $ac_n "(cached) $ac_c" 1>&6
10368 else
10369   cat > conftest.$ac_ext <<EOF
10370 #line 10371 "configure"
10371 #include "confdefs.h"
10372 /* System header to define __stub macros and hopefully few prototypes,
10373     which can conflict with char $ac_func(); below.  */
10374 #include <assert.h>
10375 /* Override any gcc2 internal prototype to avoid an error.  */
10376 /* We use char because int might match the return type of a gcc2
10377     builtin and then its argument prototype would still apply.  */
10378 char $ac_func();
10379
10380 int main() {
10381
10382 /* The GNU C library defines this for functions which it implements
10383     to always fail with ENOSYS.  Some functions are actually named
10384     something starting with __ and the normal name is an alias.  */
10385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10386 choke me
10387 #else
10388 $ac_func();
10389 #endif
10390
10391 ; return 0; }
10392 EOF
10393 if { (eval echo configure:10394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10394   rm -rf conftest*
10395   eval "ac_cv_func_$ac_func=yes"
10396 else
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   eval "ac_cv_func_$ac_func=no"
10401 fi
10402 rm -f conftest*
10403 fi
10404
10405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10406   echo "$ac_t""yes" 1>&6
10407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10408   cat >> confdefs.h <<EOF
10409 #define $ac_tr_func 1
10410 EOF
10411  
10412 else
10413   echo "$ac_t""no" 1>&6
10414 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10415 fi
10416 done
10417
10418
10419
10420 # Check Configuration
10421
10422 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10423 echo "configure:10424: checking declaration of sys_errlist" >&5
10424 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10425   echo $ac_n "(cached) $ac_c" 1>&6
10426 else
10427   
10428         cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431
10432 #include <stdio.h>
10433 #include <sys/types.h>
10434 #include <errno.h> 
10435 int main() {
10436 char *c = (char *) *sys_errlist
10437 ; return 0; }
10438 EOF
10439 if { (eval echo configure:10440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10440   rm -rf conftest*
10441   ol_cv_dcl_sys_errlist=yes
10442 else
10443   echo "configure: failed program was:" >&5
10444   cat conftest.$ac_ext >&5
10445   rm -rf conftest*
10446   ol_cv_dcl_sys_errlist=no
10447 fi
10448 rm -f conftest*
10449 fi
10450
10451 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10452 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10453 if test $ol_cv_dcl_sys_errlist = no ; then
10454         cat >> confdefs.h <<\EOF
10455 #define DECL_SYS_ERRLIST 1
10456 EOF
10457
10458         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10459 echo "configure:10460: checking existence of sys_errlist" >&5
10460         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10461   echo $ac_n "(cached) $ac_c" 1>&6
10462 else
10463   
10464                 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 #include <errno.h>
10468 int main() {
10469 char *c = (char *) *sys_errlist
10470 ; return 0; }
10471 EOF
10472 if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10473   rm -rf conftest*
10474   ol_cv_have_sys_errlist=yes
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   ol_cv_have_sys_errlist=no
10480 fi
10481 rm -f conftest*
10482 fi
10483
10484         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10485         if test $ol_cv_have_sys_errlist = yes ; then
10486                 cat >> confdefs.h <<\EOF
10487 #define HAVE_SYS_ERRLIST 1
10488 EOF
10489
10490         fi
10491 fi
10492
10493
10494
10495 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
10496 echo "configure:10497: checking strdup declaration" >&5
10497 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
10498   echo $ac_n "(cached) $ac_c" 1>&6
10499 else
10500   
10501         cat > conftest.$ac_ext <<EOF
10502 #line 10503 "configure"
10503 #include "confdefs.h"
10504
10505 #include <string.h> 
10506 int main() {
10507 extern char *strdup();
10508 ; return 0; }
10509 EOF
10510 if { (eval echo configure:10511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10511   rm -rf conftest*
10512   ol_cv_dcl_strdup=yes
10513 else
10514   echo "configure: failed program was:" >&5
10515   cat conftest.$ac_ext >&5
10516   rm -rf conftest*
10517   ol_cv_dcl_strdup=no
10518 fi
10519 rm -f conftest*
10520 fi
10521
10522 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
10523 if test $ol_cv_dcl_strdup = yes ; then
10524         cat >> confdefs.h <<\EOF
10525 #define DECL_STRDUP 1
10526 EOF
10527
10528 fi
10529
10530
10531
10532 if test "$ol_enable_debug" != no ; then
10533         cat >> confdefs.h <<\EOF
10534 #define LDAP_DEBUG 1
10535 EOF
10536
10537 fi
10538 if test "$ol_enable_syslog" = yes ; then
10539         cat >> confdefs.h <<\EOF
10540 #define LDAP_SYSLOG 1
10541 EOF
10542
10543 fi
10544 if test "$ol_enable_libui" = yes ; then
10545         cat >> confdefs.h <<\EOF
10546 #define LDAP_LIBUI 1
10547 EOF
10548
10549 fi
10550 if test "$ol_enable_cache" = no ; then
10551         cat >> confdefs.h <<\EOF
10552 #define LDAP_NOCACHE 1
10553 EOF
10554
10555 fi
10556 if test "$ol_enable_dns" != no ; then
10557         cat >> confdefs.h <<\EOF
10558 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
10559 EOF
10560
10561 fi
10562 if test "$ol_enable_proctitle" != no ; then
10563         cat >> confdefs.h <<\EOF
10564 #define LDAP_PROCTITLE 1
10565 EOF
10566
10567 fi
10568 if test "$ol_enable_referrals" != no ; then
10569         cat >> confdefs.h <<\EOF
10570 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
10571 EOF
10572
10573 fi
10574 if test "$ol_enable_cldap" != no ; then
10575         cat >> confdefs.h <<\EOF
10576 #define LDAP_CONNECTIONLESS 1
10577 EOF
10578
10579 fi
10580
10581 if test "$ol_enable_aclgroups" != no ; then
10582         cat >> confdefs.h <<\EOF
10583 #define SLAPD_ACLGROUPS 1
10584 EOF
10585
10586 fi
10587 if test "$ol_enable_crypt" != no ; then
10588         cat >> confdefs.h <<\EOF
10589 #define SLAPD_CRYPT 1
10590 EOF
10591
10592 fi
10593 if test "$ol_enable_cleartext" != no ; then
10594         cat >> confdefs.h <<\EOF
10595 #define SLAPD_CLEARTEXT 1
10596 EOF
10597
10598 fi
10599 if test "$ol_enable_phonetic" != no ; then
10600         cat >> confdefs.h <<\EOF
10601 #define SLAPD_PHONETIC 1
10602 EOF
10603
10604 fi
10605 if test "$ol_enable_rlookups" != no ; then
10606         cat >> confdefs.h <<\EOF
10607 #define SLAPD_RLOOKUPS 1
10608 EOF
10609
10610 fi
10611
10612 if test "$ol_link_bdb2" != no ; then
10613         cat >> confdefs.h <<\EOF
10614 #define SLAPD_BDB2 1
10615 EOF
10616
10617         BUILD_SLAPD=yes
10618         BUILD_BDB2=yes
10619 fi
10620
10621 if test "$ol_link_ldbm" != no ; then
10622         cat >> confdefs.h <<\EOF
10623 #define SLAPD_LDBM 1
10624 EOF
10625
10626         BUILD_SLAPD=yes
10627         BUILD_LDBM=yes
10628 fi
10629
10630 if test "$ol_enable_passwd" != no ; then
10631         cat >> confdefs.h <<\EOF
10632 #define SLAPD_PASSWD 1
10633 EOF
10634
10635         BUILD_SLAPD=yes
10636         BUILD_PASSWD=yes
10637 fi
10638
10639 if test "$ol_enable_perl" != no ; then
10640         cat >> confdefs.h <<\EOF
10641 #define SLAPD_PERL 1
10642 EOF
10643
10644         BUILD_SLAPD=yes
10645         BUILD_PERL=yes
10646 fi
10647
10648 if test "$ol_enable_shell" != no ; then
10649         cat >> confdefs.h <<\EOF
10650 #define SLAPD_SHELL 1
10651 EOF
10652
10653         BUILD_SLAPD=yes
10654         BUILD_SHELL=yes
10655 fi
10656
10657 if test "$ol_enable_tcl" != no ; then
10658         cat >> confdefs.h <<\EOF
10659 #define SLAPD_TCL 1
10660 EOF
10661
10662         BUILD_SLAPD=yes
10663         BUILD_TCL=yes
10664 fi
10665
10666 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
10667         $BUILD_SLAPD = yes ; then
10668         BUILD_SLURPD=yes
10669 fi
10670
10671 if test "$ol_link_isode" != no ; then
10672         BUILD_LDAPD=yes
10673 fi
10674
10675
10676
10677
10678   
10679   
10680   
10681   
10682   
10683   
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703 trap '' 1 2 15
10704 cat > confcache <<\EOF
10705 # This file is a shell script that caches the results of configure
10706 # tests run on this system so they can be shared between configure
10707 # scripts and configure runs.  It is not useful on other systems.
10708 # If it contains results you don't want to keep, you may remove or edit it.
10709 #
10710 # By default, configure uses ./config.cache as the cache file,
10711 # creating it if it does not exist already.  You can give configure
10712 # the --cache-file=FILE option to use a different cache file; that is
10713 # what configure does when it calls configure scripts in
10714 # subdirectories, so they share the cache.
10715 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10716 # config.status only pays attention to the cache file if you give it the
10717 # --recheck option to rerun configure.
10718 #
10719 EOF
10720 # The following way of writing the cache mishandles newlines in values,
10721 # but we know of no workaround that is simple, portable, and efficient.
10722 # So, don't put newlines in cache variables' values.
10723 # Ultrix sh set writes to stderr and can't be redirected directly,
10724 # and sets the high bit in the cache file unless we assign to the vars.
10725 (set) 2>&1 |
10726   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10727   *ac_space=\ *)
10728     # `set' does not quote correctly, so add quotes (double-quote substitution
10729     # turns \\\\ into \\, and sed turns \\ into \).
10730     sed -n \
10731       -e "s/'/'\\\\''/g" \
10732       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10733     ;;
10734   *)
10735     # `set' quotes correctly as required by POSIX, so do not add quotes.
10736     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10737     ;;
10738   esac >> confcache
10739 if cmp -s $cache_file confcache; then
10740   :
10741 else
10742   if test -w $cache_file; then
10743     echo "updating cache $cache_file"
10744     cat confcache > $cache_file
10745   else
10746     echo "not updating unwritable cache $cache_file"
10747   fi
10748 fi
10749 rm -f confcache
10750
10751 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10752
10753 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10754 # Let make expand exec_prefix.
10755 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10756
10757 # Any assignment to VPATH causes Sun make to only execute
10758 # the first set of double-colon rules, so remove it if not needed.
10759 # If there is a colon in the path, we need to keep it.
10760 if test "x$srcdir" = x.; then
10761   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10762 fi
10763
10764 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10765
10766 DEFS=-DHAVE_CONFIG_H
10767
10768 # Without the "./", some shells look in PATH for config.status.
10769 : ${CONFIG_STATUS=./config.status}
10770
10771 echo creating $CONFIG_STATUS
10772 rm -f $CONFIG_STATUS
10773 cat > $CONFIG_STATUS <<EOF
10774 #! /bin/sh
10775 # Generated automatically by configure.
10776 # Run this file to recreate the current configuration.
10777 # This directory was configured as follows,
10778 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10779 #
10780 # $0 $ac_configure_args
10781 #
10782 # Compiler output produced by configure, useful for debugging
10783 # configure, is in ./config.log if it exists.
10784
10785 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10786 for ac_option
10787 do
10788   case "\$ac_option" in
10789   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10790     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10791     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10792   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10793     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10794     exit 0 ;;
10795   -help | --help | --hel | --he | --h)
10796     echo "\$ac_cs_usage"; exit 0 ;;
10797   *) echo "\$ac_cs_usage"; exit 1 ;;
10798   esac
10799 done
10800
10801 ac_given_srcdir=$srcdir
10802 ac_given_INSTALL="$INSTALL"
10803
10804 trap 'rm -fr `echo "\
10805 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10806 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10807 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10808 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10809 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10810 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10811 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10812 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10813 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10814 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10815 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10816 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10817 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10818 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10819 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10820 include/Makefile:build/top.mk:include/Makefile.in \
10821 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10822 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10823 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10824 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10825 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10826 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10827 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10828 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10829 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10830 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10831 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10832 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10833 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10834 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10835 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10836 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10837 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10838 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10839 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10840 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10841 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10842 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10843 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10844 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10845 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
10846  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10847 EOF
10848 cat >> $CONFIG_STATUS <<EOF
10849
10850 # Protect against being on the right side of a sed subst in config.status.
10851 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10852  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10853 $ac_vpsub
10854 $extrasub
10855 s%@SHELL@%$SHELL%g
10856 s%@CFLAGS@%$CFLAGS%g
10857 s%@CPPFLAGS@%$CPPFLAGS%g
10858 s%@CXXFLAGS@%$CXXFLAGS%g
10859 s%@FFLAGS@%$FFLAGS%g
10860 s%@DEFS@%$DEFS%g
10861 s%@LDFLAGS@%$LDFLAGS%g
10862 s%@LIBS@%$LIBS%g
10863 s%@exec_prefix@%$exec_prefix%g
10864 s%@prefix@%$prefix%g
10865 s%@program_transform_name@%$program_transform_name%g
10866 s%@bindir@%$bindir%g
10867 s%@sbindir@%$sbindir%g
10868 s%@libexecdir@%$libexecdir%g
10869 s%@datadir@%$datadir%g
10870 s%@sysconfdir@%$sysconfdir%g
10871 s%@sharedstatedir@%$sharedstatedir%g
10872 s%@localstatedir@%$localstatedir%g
10873 s%@libdir@%$libdir%g
10874 s%@includedir@%$includedir%g
10875 s%@oldincludedir@%$oldincludedir%g
10876 s%@infodir@%$infodir%g
10877 s%@mandir@%$mandir%g
10878 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10879 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10880 s%@INSTALL_DATA@%$INSTALL_DATA%g
10881 s%@PACKAGE@%$PACKAGE%g
10882 s%@VERSION@%$VERSION%g
10883 s%@ACLOCAL@%$ACLOCAL%g
10884 s%@AUTOCONF@%$AUTOCONF%g
10885 s%@AUTOMAKE@%$AUTOMAKE%g
10886 s%@AUTOHEADER@%$AUTOHEADER%g
10887 s%@MAKEINFO@%$MAKEINFO%g
10888 s%@SET_MAKE@%$SET_MAKE%g
10889 s%@top_builddir@%$top_builddir%g
10890 s%@ldap_subdir@%$ldap_subdir%g
10891 s%@host@%$host%g
10892 s%@host_alias@%$host_alias%g
10893 s%@host_cpu@%$host_cpu%g
10894 s%@host_vendor@%$host_vendor%g
10895 s%@host_os@%$host_os%g
10896 s%@RANLIB@%$RANLIB%g
10897 s%@CC@%$CC%g
10898 s%@LD@%$LD%g
10899 s%@NM@%$NM%g
10900 s%@LN_S@%$LN_S%g
10901 s%@LIBTOOL@%$LIBTOOL%g
10902 s%@AWK@%$AWK%g
10903 s%@LN_H@%$LN_H%g
10904 s%@SENDMAIL@%$SENDMAIL%g
10905 s%@EDITOR@%$EDITOR%g
10906 s%@FINGER@%$FINGER%g
10907 s%@PERLBIN@%$PERLBIN%g
10908 s%@CPP@%$CPP%g
10909 s%@EXEEXT@%$EXEEXT%g
10910 s%@OBJEXT@%$OBJEXT%g
10911 s%@PEPSY@%$PEPSY%g
10912 s%@LIBOBJS@%$LIBOBJS%g
10913 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
10914 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
10915 s%@BUILD_BDB2@%$BUILD_BDB2%g
10916 s%@BUILD_LDBM@%$BUILD_LDBM%g
10917 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
10918 s%@BUILD_PERL@%$BUILD_PERL%g
10919 s%@BUILD_SHELL@%$BUILD_SHELL%g
10920 s%@BUILD_TCL@%$BUILD_TCL%g
10921 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
10922 s%@LDAP_LIBS@%$LDAP_LIBS%g
10923 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
10924 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
10925 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
10926 s%@LDBM_LIBS@%$LDBM_LIBS%g
10927 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
10928 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
10929 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
10930 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
10931 s%@KRB_LIBS@%$KRB_LIBS%g
10932 s%@READLINE_LIBS@%$READLINE_LIBS%g
10933 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
10934 s%@TLS_LIBS@%$TLS_LIBS%g
10935
10936 CEOF
10937 EOF
10938
10939 cat >> $CONFIG_STATUS <<\EOF
10940
10941 # Split the substitutions into bite-sized pieces for seds with
10942 # small command number limits, like on Digital OSF/1 and HP-UX.
10943 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10944 ac_file=1 # Number of current file.
10945 ac_beg=1 # First line for current file.
10946 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10947 ac_more_lines=:
10948 ac_sed_cmds=""
10949 while $ac_more_lines; do
10950   if test $ac_beg -gt 1; then
10951     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10952   else
10953     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10954   fi
10955   if test ! -s conftest.s$ac_file; then
10956     ac_more_lines=false
10957     rm -f conftest.s$ac_file
10958   else
10959     if test -z "$ac_sed_cmds"; then
10960       ac_sed_cmds="sed -f conftest.s$ac_file"
10961     else
10962       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10963     fi
10964     ac_file=`expr $ac_file + 1`
10965     ac_beg=$ac_end
10966     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10967   fi
10968 done
10969 if test -z "$ac_sed_cmds"; then
10970   ac_sed_cmds=cat
10971 fi
10972 EOF
10973
10974 cat >> $CONFIG_STATUS <<EOF
10975
10976 CONFIG_FILES=\${CONFIG_FILES-"\
10977 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10978 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10979 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10980 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10981 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10982 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10983 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10984 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10985 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10986 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10987 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10988 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10989 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10990 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10991 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10992 include/Makefile:build/top.mk:include/Makefile.in \
10993 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10994 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10995 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10996 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10997 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10998 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10999 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11000 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11001 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11002 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11003 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11004 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11005 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11006 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11007 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11008 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11009 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11010 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11011 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11012 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11013 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11014 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11015 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11016 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11017 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11018 "}
11019 EOF
11020 cat >> $CONFIG_STATUS <<\EOF
11021 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11022   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11023   case "$ac_file" in
11024   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11025        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11026   *) ac_file_in="${ac_file}.in" ;;
11027   esac
11028
11029   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11030
11031   # Remove last slash and all that follows it.  Not all systems have dirname.
11032   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11033   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11034     # The file is in a subdirectory.
11035     test ! -d "$ac_dir" && mkdir "$ac_dir"
11036     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11037     # A "../" for each directory in $ac_dir_suffix.
11038     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11039   else
11040     ac_dir_suffix= ac_dots=
11041   fi
11042
11043   case "$ac_given_srcdir" in
11044   .)  srcdir=.
11045       if test -z "$ac_dots"; then top_srcdir=.
11046       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11047   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11048   *) # Relative path.
11049     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11050     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11051   esac
11052
11053   case "$ac_given_INSTALL" in
11054   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11055   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11056   esac
11057
11058   echo creating "$ac_file"
11059   rm -f "$ac_file"
11060   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11061   case "$ac_file" in
11062   *Makefile*) ac_comsub="1i\\
11063 # $configure_input" ;;
11064   *) ac_comsub= ;;
11065   esac
11066
11067   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11068   sed -e "$ac_comsub
11069 s%@configure_input@%$configure_input%g
11070 s%@srcdir@%$srcdir%g
11071 s%@top_srcdir@%$top_srcdir%g
11072 s%@INSTALL@%$INSTALL%g
11073 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11074 fi; done
11075 rm -f conftest.s*
11076
11077 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11078 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11079 #
11080 # ac_d sets the value in "#define NAME VALUE" lines.
11081 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11082 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11083 ac_dC='\3'
11084 ac_dD='%g'
11085 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11086 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11087 ac_uB='\([      ]\)%\1#\2define\3'
11088 ac_uC=' '
11089 ac_uD='\4%g'
11090 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11091 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11092 ac_eB='$%\1#\2define\3'
11093 ac_eC=' '
11094 ac_eD='%g'
11095
11096 if test "${CONFIG_HEADERS+set}" != set; then
11097 EOF
11098 cat >> $CONFIG_STATUS <<EOF
11099   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11100 EOF
11101 cat >> $CONFIG_STATUS <<\EOF
11102 fi
11103 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11104   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11105   case "$ac_file" in
11106   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11107        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11108   *) ac_file_in="${ac_file}.in" ;;
11109   esac
11110
11111   echo creating $ac_file
11112
11113   rm -f conftest.frag conftest.in conftest.out
11114   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11115   cat $ac_file_inputs > conftest.in
11116
11117 EOF
11118
11119 # Transform confdefs.h into a sed script conftest.vals that substitutes
11120 # the proper values into config.h.in to produce config.h.  And first:
11121 # Protect against being on the right side of a sed subst in config.status.
11122 # Protect against being in an unquoted here document in config.status.
11123 rm -f conftest.vals
11124 cat > conftest.hdr <<\EOF
11125 s/[\\&%]/\\&/g
11126 s%[\\$`]%\\&%g
11127 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11128 s%ac_d%ac_u%gp
11129 s%ac_u%ac_e%gp
11130 EOF
11131 sed -n -f conftest.hdr confdefs.h > conftest.vals
11132 rm -f conftest.hdr
11133
11134 # This sed command replaces #undef with comments.  This is necessary, for
11135 # example, in the case of _POSIX_SOURCE, which is predefined and required
11136 # on some systems where configure will not decide to define it.
11137 cat >> conftest.vals <<\EOF
11138 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11139 EOF
11140
11141 # Break up conftest.vals because some shells have a limit on
11142 # the size of here documents, and old seds have small limits too.
11143
11144 rm -f conftest.tail
11145 while :
11146 do
11147   ac_lines=`grep -c . conftest.vals`
11148   # grep -c gives empty output for an empty file on some AIX systems.
11149   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11150   # Write a limited-size here document to conftest.frag.
11151   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11152   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11153   echo 'CEOF
11154   sed -f conftest.frag conftest.in > conftest.out
11155   rm -f conftest.in
11156   mv conftest.out conftest.in
11157 ' >> $CONFIG_STATUS
11158   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11159   rm -f conftest.vals
11160   mv conftest.tail conftest.vals
11161 done
11162 rm -f conftest.vals
11163
11164 cat >> $CONFIG_STATUS <<\EOF
11165   rm -f conftest.frag conftest.h
11166   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11167   cat conftest.in >> conftest.h
11168   rm -f conftest.in
11169   if cmp -s $ac_file conftest.h 2>/dev/null; then
11170     echo "$ac_file is unchanged"
11171     rm -f conftest.h
11172   else
11173     # Remove last slash and all that follows it.  Not all systems have dirname.
11174       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11175       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11176       # The file is in a subdirectory.
11177       test ! -d "$ac_dir" && mkdir "$ac_dir"
11178     fi
11179     rm -f $ac_file
11180     mv conftest.h $ac_file
11181   fi
11182 fi; done
11183
11184 EOF
11185 cat >> $CONFIG_STATUS <<EOF
11186
11187 EOF
11188 cat >> $CONFIG_STATUS <<\EOF
11189
11190 date > stamp-h
11191 echo Please \"make depend\" to build dependencies
11192
11193 exit 0
11194 EOF
11195 chmod +x $CONFIG_STATUS
11196 rm -fr confdefs* $ac_clean_files
11197 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11198