]> git.sur5r.net Git - openldap/blob - configure
Fix typo ol_cv_pthread_pthread -> ol_cv_pthread_threads for -threads option
[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 ccopts`"
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   :
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 echo $ac_n "checking for select""... $ac_c" 1>&6
3461 echo "configure:3462: checking for select" >&5
3462 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 /* System header to define __stub macros and hopefully few prototypes,
3469     which can conflict with char select(); below.  */
3470 #include <assert.h>
3471 /* Override any gcc2 internal prototype to avoid an error.  */
3472 /* We use char because int might match the return type of a gcc2
3473     builtin and then its argument prototype would still apply.  */
3474 char select();
3475
3476 int main() {
3477
3478 /* The GNU C library defines this for functions which it implements
3479     to always fail with ENOSYS.  Some functions are actually named
3480     something starting with __ and the normal name is an alias.  */
3481 #if defined (__stub_select) || defined (__stub___select)
3482 choke me
3483 #else
3484 select();
3485 #endif
3486
3487 ; return 0; }
3488 EOF
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3490   rm -rf conftest*
3491   eval "ac_cv_func_select=yes"
3492 else
3493   echo "configure: failed program was:" >&5
3494   cat conftest.$ac_ext >&5
3495   rm -rf conftest*
3496   eval "ac_cv_func_select=no"
3497 fi
3498 rm -f conftest*
3499 fi
3500
3501 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3502   echo "$ac_t""yes" 1>&6
3503   :
3504 else
3505   echo "$ac_t""no" 1>&6
3506 { echo "configure: error: select() required." 1>&2; exit 1; }
3507 fi
3508
3509
3510 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3511 echo "configure:3512: checking types of arguments for select()" >&5
3512  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
3516   echo $ac_n "(cached) $ac_c" 1>&6
3517 else
3518     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
3519   echo $ac_n "(cached) $ac_c" 1>&6
3520 else
3521      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
3522      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3523       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3524        cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527 #ifdef HAVE_SYS_TYPES_H
3528 #include <sys/types.h>
3529 #endif
3530 #ifdef HAVE_SYS_TIME_H
3531 #include <sys/time.h>
3532 #endif
3533 #ifdef HAVE_SYS_SELECT_H
3534 #include <sys/select.h>
3535 #endif
3536 #ifdef HAVE_SYS_SOCKET_H
3537 #include <sys/socket.h>
3538 #endif
3539 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
3540 int main() {
3541
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3545   rm -rf conftest*
3546           ac_not_found=no ; break 3
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   ac_not_found=yes
3552 fi
3553 rm -f conftest*
3554       done
3555      done
3556     done
3557    
3558 fi
3559   
3560 fi
3561  
3562 fi
3563  if test "$ac_not_found" = yes; then
3564   ac_cv_func_select_arg1=int 
3565   ac_cv_func_select_arg234='int *' 
3566   ac_cv_func_select_arg5='struct timeval *'
3567  fi
3568  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
3569  cat >> confdefs.h <<EOF
3570 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
3571 EOF
3572
3573  cat >> confdefs.h <<EOF
3574 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
3575 EOF
3576
3577  cat >> confdefs.h <<EOF
3578 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
3579 EOF
3580
3581
3582
3583 # ISODE tests
3584 ol_link_isode=no
3585 if test $ol_enable_ldapd != no ; then
3586                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3587 echo "configure:3588: checking for main in -lxtpp" >&5
3588 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   ac_save_LIBS="$LIBS"
3593 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597
3598 int main() {
3599 main()
3600 ; return 0; }
3601 EOF
3602 if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3603   rm -rf conftest*
3604   eval "ac_cv_lib_$ac_lib_var=yes"
3605 else
3606   echo "configure: failed program was:" >&5
3607   cat conftest.$ac_ext >&5
3608   rm -rf conftest*
3609   eval "ac_cv_lib_$ac_lib_var=no"
3610 fi
3611 rm -f conftest*
3612 LIBS="$ac_save_LIBS"
3613
3614 fi
3615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3616   echo "$ac_t""yes" 1>&6
3617   
3618                 ol_link_isode=yes
3619                 cat >> confdefs.h <<\EOF
3620 #define HAVE_XTPP 1
3621 EOF
3622
3623                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3624                 
3625 else
3626   echo "$ac_t""no" 1>&6
3627 :
3628 fi
3629
3630         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3631 echo "configure:3632: checking for main in -ldsap" >&5
3632 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   ac_save_LIBS="$LIBS"
3637 LIBS="-ldsap -lisode $LIBS"
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641
3642 int main() {
3643 main()
3644 ; return 0; }
3645 EOF
3646 if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3647   rm -rf conftest*
3648   eval "ac_cv_lib_$ac_lib_var=yes"
3649 else
3650   echo "configure: failed program was:" >&5
3651   cat conftest.$ac_ext >&5
3652   rm -rf conftest*
3653   eval "ac_cv_lib_$ac_lib_var=no"
3654 fi
3655 rm -f conftest*
3656 LIBS="$ac_save_LIBS"
3657
3658 fi
3659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3660   echo "$ac_t""yes" 1>&6
3661   
3662                 ol_link_isode=yes
3663                 cat >> confdefs.h <<\EOF
3664 #define HAVE_DSAP 1
3665 EOF
3666
3667                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3668                 
3669 else
3670   echo "$ac_t""no" 1>&6
3671 :
3672 fi
3673
3674         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3675 echo "configure:3676: checking for main in -lisode" >&5
3676 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   ac_save_LIBS="$LIBS"
3681 LIBS="-lisode  $LIBS"
3682 cat > conftest.$ac_ext <<EOF
3683 #line 3684 "configure"
3684 #include "confdefs.h"
3685
3686 int main() {
3687 main()
3688 ; return 0; }
3689 EOF
3690 if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3691   rm -rf conftest*
3692   eval "ac_cv_lib_$ac_lib_var=yes"
3693 else
3694   echo "configure: failed program was:" >&5
3695   cat conftest.$ac_ext >&5
3696   rm -rf conftest*
3697   eval "ac_cv_lib_$ac_lib_var=no"
3698 fi
3699 rm -f conftest*
3700 LIBS="$ac_save_LIBS"
3701
3702 fi
3703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3704   echo "$ac_t""yes" 1>&6
3705   
3706                 ol_link_isode=yes
3707                 cat >> confdefs.h <<\EOF
3708 #define HAVE_ISODE 1
3709 EOF
3710
3711                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3712                 
3713 else
3714   echo "$ac_t""no" 1>&6
3715 :
3716 fi
3717
3718 fi
3719
3720 if test $ol_link_isode != no; then
3721         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3722 echo "configure:3723: checking for main in -lpp" >&5
3723 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3725   echo $ac_n "(cached) $ac_c" 1>&6
3726 else
3727   ac_save_LIBS="$LIBS"
3728 LIBS="-lpp  $LIBS"
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732
3733 int main() {
3734 main()
3735 ; return 0; }
3736 EOF
3737 if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3738   rm -rf conftest*
3739   eval "ac_cv_lib_$ac_lib_var=yes"
3740 else
3741   echo "configure: failed program was:" >&5
3742   cat conftest.$ac_ext >&5
3743   rm -rf conftest*
3744   eval "ac_cv_lib_$ac_lib_var=no"
3745 fi
3746 rm -f conftest*
3747 LIBS="$ac_save_LIBS"
3748
3749 fi
3750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3751   echo "$ac_t""yes" 1>&6
3752   
3753                 cat >> confdefs.h <<\EOF
3754 #define HAVE_PP 1
3755 EOF
3756
3757                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3758                 
3759 else
3760   echo "$ac_t""no" 1>&6
3761 :
3762 fi
3763
3764
3765         # Extract the first word of "pepsy", so it can be a program name with args.
3766 set dummy pepsy; ac_word=$2
3767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3768 echo "configure:3769: checking for $ac_word" >&5
3769 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   case "$PEPSY" in
3773   /*)
3774   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3775   ;;
3776   ?:/*)                  
3777   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3778   ;;
3779   *)
3780   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3781   ac_dummy="$PATH"
3782   for ac_dir in $ac_dummy; do 
3783     test -z "$ac_dir" && ac_dir=.
3784     if test -f $ac_dir/$ac_word; then
3785       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3786       break
3787     fi
3788   done
3789   IFS="$ac_save_ifs"
3790   ;;
3791 esac
3792 fi
3793 PEPSY="$ac_cv_path_PEPSY"
3794 if test -n "$PEPSY"; then
3795   echo "$ac_t""$PEPSY" 1>&6
3796 else
3797   echo "$ac_t""no" 1>&6
3798 fi
3799
3800 fi
3801
3802 ol_link_kerberos=no
3803
3804 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3805         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3806 do
3807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3809 echo "configure:3810: checking for $ac_hdr" >&5
3810 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3816 #include <$ac_hdr>
3817 EOF
3818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3819 { (eval echo configure:3820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3821 if test -z "$ac_err"; then
3822   rm -rf conftest*
3823   eval "ac_cv_header_$ac_safe=yes"
3824 else
3825   echo "$ac_err" >&5
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   eval "ac_cv_header_$ac_safe=no"
3830 fi
3831 rm -f conftest*
3832 fi
3833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3834   echo "$ac_t""yes" 1>&6
3835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3836   cat >> confdefs.h <<EOF
3837 #define $ac_tr_hdr 1
3838 EOF
3839  
3840 else
3841   echo "$ac_t""no" 1>&6
3842 fi
3843 done
3844
3845
3846         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3847                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3848 echo "configure:3849: checking for main in -lkrb4" >&5
3849 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3851   echo $ac_n "(cached) $ac_c" 1>&6
3852 else
3853   ac_save_LIBS="$LIBS"
3854 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3855 cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858
3859 int main() {
3860 main()
3861 ; return 0; }
3862 EOF
3863 if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3864   rm -rf conftest*
3865   eval "ac_cv_lib_$ac_lib_var=yes"
3866 else
3867   echo "configure: failed program was:" >&5
3868   cat conftest.$ac_ext >&5
3869   rm -rf conftest*
3870   eval "ac_cv_lib_$ac_lib_var=no"
3871 fi
3872 rm -f conftest*
3873 LIBS="$ac_save_LIBS"
3874
3875 fi
3876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3877   echo "$ac_t""yes" 1>&6
3878   have_k5=yes
3879 else
3880   echo "$ac_t""no" 1>&6
3881 have_k5=no
3882 fi
3883
3884
3885                 if test $have_k5 = yes ; then
3886                         ol_with_kerberos=found
3887                         ol_link_kerberos=yes
3888
3889                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3890
3891                         LIBS="$KRB_LIBS $LIBS"
3892
3893                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3894 echo "configure:3895: checking for des_debug in Kerberos libraries" >&5
3895 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
3896   echo $ac_n "(cached) $ac_c" 1>&6
3897 else
3898   
3899                                                                 save_LIBS="$LIBS"
3900                                 LIBS="$KRB_LIBS $LIBS"
3901                                 cat > conftest.$ac_ext <<EOF
3902 #line 3903 "configure"
3903 #include "confdefs.h"
3904
3905 #include <kerberosIV/krb.h>
3906 #include <kerberosIV/des.h>
3907 extern int des_debug;
3908
3909 int main() {
3910
3911 des_debug = 1;
3912
3913 ; return 0; }
3914 EOF
3915 if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3916   rm -rf conftest*
3917   ol_cv_var_des_debug=yes
3918 else
3919   echo "configure: failed program was:" >&5
3920   cat conftest.$ac_ext >&5
3921   rm -rf conftest*
3922   ol_cv_var_des_debug=no
3923 fi
3924 rm -f conftest*
3925                                                                 LIBS="$save_LIBS"
3926                         
3927 fi
3928
3929 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
3930
3931                         if test $ol_cv_var_des_debug = yes ; then
3932                                 cat >> confdefs.h <<\EOF
3933 #define HAVE_DES_DEBUG 1
3934 EOF
3935
3936                         fi
3937
3938                         LIBS="$save_LIBS"
3939                 fi
3940         fi
3941 fi
3942
3943 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3944         for ac_hdr in krb.h des.h
3945 do
3946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3948 echo "configure:3949: checking for $ac_hdr" >&5
3949 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 #include <$ac_hdr>
3956 EOF
3957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3958 { (eval echo configure:3959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3960 if test -z "$ac_err"; then
3961   rm -rf conftest*
3962   eval "ac_cv_header_$ac_safe=yes"
3963 else
3964   echo "$ac_err" >&5
3965   echo "configure: failed program was:" >&5
3966   cat conftest.$ac_ext >&5
3967   rm -rf conftest*
3968   eval "ac_cv_header_$ac_safe=no"
3969 fi
3970 rm -f conftest*
3971 fi
3972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3973   echo "$ac_t""yes" 1>&6
3974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3975   cat >> confdefs.h <<EOF
3976 #define $ac_tr_hdr 1
3977 EOF
3978  
3979 else
3980   echo "$ac_t""no" 1>&6
3981 fi
3982 done
3983
3984
3985         if test $ac_cv_header_krb_h = yes ; then
3986                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3987 echo "configure:3988: checking for main in -lkrb" >&5
3988 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3990   echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992   ac_save_LIBS="$LIBS"
3993 LIBS="-lkrb -ldes $LIBS"
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997
3998 int main() {
3999 main()
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4003   rm -rf conftest*
4004   eval "ac_cv_lib_$ac_lib_var=yes"
4005 else
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   eval "ac_cv_lib_$ac_lib_var=no"
4010 fi
4011 rm -f conftest*
4012 LIBS="$ac_save_LIBS"
4013
4014 fi
4015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4016   echo "$ac_t""yes" 1>&6
4017   have_k4=yes
4018 else
4019   echo "$ac_t""no" 1>&6
4020 have_k4=no
4021 fi
4022
4023
4024                 if test $have_k4 = yes ; then
4025                         ol_with_kerberos=found
4026                         ol_link_kerberos=yes
4027
4028                         KRB_LIBS="-lkrb -ldes"
4029                 fi
4030         fi
4031 fi
4032
4033 if test $ol_link_kerberos = yes ; then
4034         cat >> confdefs.h <<\EOF
4035 #define HAVE_KERBEROS 1
4036 EOF
4037
4038 fi
4039
4040 ol_link_tls=no
4041 if test $ol_with_tls != no ; then
4042         
4043         for ac_hdr in ssl.h
4044 do
4045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4047 echo "configure:4048: checking for $ac_hdr" >&5
4048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4049   echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051   cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 #include <$ac_hdr>
4055 EOF
4056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4057 { (eval echo configure:4058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4059 if test -z "$ac_err"; then
4060   rm -rf conftest*
4061   eval "ac_cv_header_$ac_safe=yes"
4062 else
4063   echo "$ac_err" >&5
4064   echo "configure: failed program was:" >&5
4065   cat conftest.$ac_ext >&5
4066   rm -rf conftest*
4067   eval "ac_cv_header_$ac_safe=no"
4068 fi
4069 rm -f conftest*
4070 fi
4071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4072   echo "$ac_t""yes" 1>&6
4073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4074   cat >> confdefs.h <<EOF
4075 #define $ac_tr_hdr 1
4076 EOF
4077  
4078 else
4079   echo "$ac_t""no" 1>&6
4080 fi
4081 done
4082
4083         
4084         if test $ac_cv_header_ssl_h = yes ; then
4085                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4086 echo "configure:4087: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4087 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4089   echo $ac_n "(cached) $ac_c" 1>&6
4090 else
4091   ac_save_LIBS="$LIBS"
4092 LIBS="-lssl -lcrypto $LIBS"
4093 cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.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 SSLeay_add_ssl_algorithms();
4100
4101 int main() {
4102 SSLeay_add_ssl_algorithms()
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106   rm -rf conftest*
4107   eval "ac_cv_lib_$ac_lib_var=yes"
4108 else
4109   echo "configure: failed program was:" >&5
4110   cat conftest.$ac_ext >&5
4111   rm -rf conftest*
4112   eval "ac_cv_lib_$ac_lib_var=no"
4113 fi
4114 rm -f conftest*
4115 LIBS="$ac_save_LIBS"
4116
4117 fi
4118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4119   echo "$ac_t""yes" 1>&6
4120   have_ssleay=yes
4121                         need_rsaref=no
4122 else
4123   echo "$ac_t""no" 1>&6
4124 have_ssleay=no
4125 fi
4126
4127                         
4128                 if test $have_ssleay = no ; then
4129                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4130 echo "configure:4131: checking for ssl3_accept in -lssl" >&5
4131 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4133   echo $ac_n "(cached) $ac_c" 1>&6
4134 else
4135   ac_save_LIBS="$LIBS"
4136 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4137 cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 /* Override any gcc2 internal prototype to avoid an error.  */
4141 /* We use char because int might match the return type of a gcc2
4142     builtin and then its argument prototype would still apply.  */
4143 char ssl3_accept();
4144
4145 int main() {
4146 ssl3_accept()
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4150   rm -rf conftest*
4151   eval "ac_cv_lib_$ac_lib_var=yes"
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   eval "ac_cv_lib_$ac_lib_var=no"
4157 fi
4158 rm -f conftest*
4159 LIBS="$ac_save_LIBS"
4160
4161 fi
4162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4163   echo "$ac_t""yes" 1>&6
4164   have_ssleay=yes
4165                                 need_rsaref=yes
4166 else
4167   echo "$ac_t""no" 1>&6
4168 have_ssleay=no
4169 fi
4170
4171                 fi
4172
4173                 if test $have_ssleay = yes ; then
4174                         ol_with_tls=found
4175                         ol_link_tls=yes
4176
4177                         cat >> confdefs.h <<\EOF
4178 #define HAVE_SSLEAY 1
4179 EOF
4180
4181
4182                         if test $need_rsaref = yes; then
4183                                 cat >> confdefs.h <<\EOF
4184 #define HAVE_RSAREF 1
4185 EOF
4186
4187
4188                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4189                         else
4190                                 TLS_LIBS="-lssl -lcrypto"
4191                         fi
4192                 fi
4193         fi
4194 fi
4195
4196 if test $ol_link_tls = yes ; then
4197         cat >> confdefs.h <<\EOF
4198 #define HAVE_TLS 1
4199 EOF
4200
4201 fi      
4202
4203 for ac_func in \
4204         ctime_r                 \
4205         gethostbyname_r gethostbyaddr_r \
4206
4207 do
4208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4209 echo "configure:4210: checking for $ac_func" >&5
4210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4211   echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213   cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 /* System header to define __stub macros and hopefully few prototypes,
4217     which can conflict with char $ac_func(); below.  */
4218 #include <assert.h>
4219 /* Override any gcc2 internal prototype to avoid an error.  */
4220 /* We use char because int might match the return type of a gcc2
4221     builtin and then its argument prototype would still apply.  */
4222 char $ac_func();
4223
4224 int main() {
4225
4226 /* The GNU C library defines this for functions which it implements
4227     to always fail with ENOSYS.  Some functions are actually named
4228     something starting with __ and the normal name is an alias.  */
4229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4230 choke me
4231 #else
4232 $ac_func();
4233 #endif
4234
4235 ; return 0; }
4236 EOF
4237 if { (eval echo configure:4238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4238   rm -rf conftest*
4239   eval "ac_cv_func_$ac_func=yes"
4240 else
4241   echo "configure: failed program was:" >&5
4242   cat conftest.$ac_ext >&5
4243   rm -rf conftest*
4244   eval "ac_cv_func_$ac_func=no"
4245 fi
4246 rm -f conftest*
4247 fi
4248
4249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4250   echo "$ac_t""yes" 1>&6
4251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4252   cat >> confdefs.h <<EOF
4253 #define $ac_tr_func 1
4254 EOF
4255  
4256 else
4257   echo "$ac_t""no" 1>&6
4258 fi
4259 done
4260
4261
4262 if test "$ac_cv_func_ctime_r" = no ; then
4263         ol_cv_func_ctime_r_nargs=0
4264 else
4265         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4266 echo "configure:4267: checking number of arguments of ctime_r" >&5
4267 if eval "test \"`echo '$''{'ol_cv_func_ctime_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 <time.h>
4274 int main() {
4275 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4276 ; return 0; }
4277 EOF
4278 if { (eval echo configure:4279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4279   rm -rf conftest*
4280   ol_cv_func_ctime_r_nargs=3
4281 else
4282   echo "configure: failed program was:" >&5
4283   cat conftest.$ac_ext >&5
4284   rm -rf conftest*
4285   cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 #include <time.h>
4289 int main() {
4290 time_t ti; char *buffer; ctime_r(&ti,buffer);
4291 ; return 0; }
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4294   rm -rf conftest*
4295   ol_cv_func_ctime_r_nargs=2
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -rf conftest*
4300   ol_cv_func_ctime_r_nargs=0
4301 fi
4302 rm -f conftest*
4303 fi
4304 rm -f conftest*
4305 fi
4306
4307 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4308   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4309     cat >> confdefs.h <<EOF
4310 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4311 EOF
4312
4313   fi
4314
4315 fi
4316
4317 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4318         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4319 echo "configure:4320: checking number of arguments of gethostbyname_r" >&5
4320 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <sys/types.h>
4327 #include <sys/socket.h>
4328 #include <netinet/in.h>
4329 #include <netdb.h>
4330 #define BUFSIZE (sizeof(struct hostent)+10)
4331 int main() {
4332 struct hostent hent; char buffer[BUFSIZE];
4333                 int bufsize=BUFSIZE;int h_errno;
4334                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4335                         buffer, bufsize, &h_errno);
4336 ; return 0; }
4337 EOF
4338 if { (eval echo configure:4339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4339   rm -rf conftest*
4340   ol_cv_func_gethostbyname_r_nargs=5
4341 else
4342   echo "configure: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   rm -rf conftest*
4345   cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 #include <sys/types.h>
4349 #include <sys/socket.h>
4350 #include <netinet/in.h>
4351 #include <netdb.h>
4352 #define BUFSIZE (sizeof(struct hostent)+10)
4353 int main() {
4354 struct hostent hent;struct hostent *rhent;
4355                         char buffer[BUFSIZE];
4356                         int bufsize=BUFSIZE;int h_errno;
4357                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4358                                 &rhent, &h_errno);
4359 ; return 0; }
4360 EOF
4361 if { (eval echo configure:4362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4362   rm -rf conftest*
4363   ol_cv_func_gethostbyname_r_nargs=6
4364 else
4365   echo "configure: failed program was:" >&5
4366   cat conftest.$ac_ext >&5
4367   rm -rf conftest*
4368   ol_cv_func_gethostbyname_r_nargs=0
4369 fi
4370 rm -f conftest*
4371 fi
4372 rm -f conftest*
4373 fi
4374
4375 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4376   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4377         cat >> confdefs.h <<EOF
4378 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4379 EOF
4380
4381   fi
4382
4383 else
4384         ol_cv_func_gethostbyname_r_nargs=0
4385 fi
4386  
4387 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4388         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4389 echo "configure:4390: checking number of arguments of gethostbyaddr_r" >&5
4390 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4391   echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393   cat > conftest.$ac_ext <<EOF
4394 #line 4395 "configure"
4395 #include "confdefs.h"
4396 #include <sys/types.h>
4397 #include <sys/socket.h>
4398 #include <netinet/in.h>
4399 #include <netdb.h>
4400 #define BUFSIZE (sizeof(struct hostent)+10)
4401 int main() {
4402 struct hostent hent; char buffer[BUFSIZE]; 
4403             struct in_addr add;
4404             size_t alen=sizeof(struct in_addr);
4405             int bufsize=BUFSIZE;int h_errno;
4406                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4407                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4408 ; return 0; }
4409 EOF
4410 if { (eval echo configure:4411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4411   rm -rf conftest*
4412   ol_cv_func_gethostbyaddr_r_nargs=7
4413 else
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 #include <sys/types.h>
4421 #include <sys/socket.h>
4422 #include <netinet/in.h>
4423 #include <netdb.h>
4424 #define BUFSIZE (sizeof(struct hostent)+10)
4425 int main() {
4426 struct hostent hent;
4427                         struct hostent *rhent; char buffer[BUFSIZE]; 
4428                         struct in_addr add;
4429                         size_t alen=sizeof(struct in_addr);
4430                         int bufsize=BUFSIZE;int h_errno;
4431                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4432                                 alen, AF_INET, &hent, buffer, bufsize, 
4433                                 &rhent, &h_errno);
4434 ; return 0; }
4435 EOF
4436 if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4437   rm -rf conftest*
4438   ol_cv_func_gethostbyaddr_r_nargs=8
4439 else
4440   echo "configure: failed program was:" >&5
4441   cat conftest.$ac_ext >&5
4442   rm -rf conftest*
4443   ol_cv_func_gethostbyaddr_r_nargs=0
4444 fi
4445 rm -f conftest*
4446 fi
4447 rm -f conftest*
4448 fi
4449
4450 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4451   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4452     cat >> confdefs.h <<EOF
4453 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4454 EOF
4455
4456   fi
4457
4458 else
4459         ol_cv_func_gethostbyaddr_r_nargs=0
4460 fi
4461
4462 if test "$ac_cv_func_ctime_r" = yes \
4463         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4464         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4465         -a "$ac_cv_func_gethostbyname_r" = yes \
4466         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4467         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4468         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4469         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4470         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4471         ; then
4472  
4473         cat >> confdefs.h <<\EOF
4474 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4475 EOF
4476
4477 fi
4478
4479 ol_link_threads=no
4480 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4481         -o $ol_with_threads = posix ; then
4482
4483         for ac_hdr in pthread.h sched.h
4484 do
4485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4487 echo "configure:4488: checking for $ac_hdr" >&5
4488 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4494 #include <$ac_hdr>
4495 EOF
4496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4497 { (eval echo configure:4498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4499 if test -z "$ac_err"; then
4500   rm -rf conftest*
4501   eval "ac_cv_header_$ac_safe=yes"
4502 else
4503   echo "$ac_err" >&5
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   eval "ac_cv_header_$ac_safe=no"
4508 fi
4509 rm -f conftest*
4510 fi
4511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4512   echo "$ac_t""yes" 1>&6
4513     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4514   cat >> confdefs.h <<EOF
4515 #define $ac_tr_hdr 1
4516 EOF
4517  
4518 else
4519   echo "$ac_t""no" 1>&6
4520 fi
4521 done
4522
4523
4524         if test $ac_cv_header_pthread_h = yes ; then
4525                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4526 echo "configure:4527: checking POSIX thread version" >&5
4527 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   
4531         cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534
4535 #               include <pthread.h>
4536                 /* this check could be improved */
4537 #               ifdef PTHREAD_ONCE_INIT
4538                         pthread_version_final
4539 #               endif
4540         
4541 EOF
4542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4543   egrep "pthread_version_final" >/dev/null 2>&1; then
4544   rm -rf conftest*
4545   ol_pthread_final=yes
4546 else
4547   rm -rf conftest*
4548   ol_pthread_final=no
4549 fi
4550 rm -f conftest*
4551
4552
4553         cat > conftest.$ac_ext <<EOF
4554 #line 4555 "configure"
4555 #include "confdefs.h"
4556
4557 #               include <pthread.h>
4558                 /* this check could be improved */
4559 #               ifdef pthread_once_init
4560                         pthread_version_draft4
4561 #               endif
4562         
4563 EOF
4564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4565   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4566   rm -rf conftest*
4567   ol_pthread_draft4=yes
4568 else
4569   rm -rf conftest*
4570   ol_pthread_draft4=no
4571 fi
4572 rm -f conftest*
4573
4574
4575         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4576                 ol_cv_pthread_version=final
4577         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4578                 ol_cv_pthread_version=draft4
4579         else
4580                 ol_cv_pthread_version=unknown
4581         fi
4582
4583 fi
4584
4585 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4586
4587
4588                 if test $ol_cv_pthread_version = final ; then
4589                         cat >> confdefs.h <<\EOF
4590 #define HAVE_PTHREADS_FINAL 1
4591 EOF
4592
4593                 elif test $ol_cv_pthread_version = draft4 ; then
4594                         cat >> confdefs.h <<\EOF
4595 #define HAVE_PTHREADS_D4 1
4596 EOF
4597
4598                 else
4599                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4600                 fi
4601
4602                 # consider threads found
4603                 ol_with_threads=found
4604
4605                 
4606         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
4607 echo "configure:4608: checking for LinuxThreads pthread.h" >&5
4608 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
4609   echo $ac_n "(cached) $ac_c" 1>&6
4610 else
4611   cat > conftest.$ac_ext <<EOF
4612 #line 4613 "configure"
4613 #include "confdefs.h"
4614 #include <pthread.h>
4615 EOF
4616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4617   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
4618   rm -rf conftest*
4619   ol_cv_header_linux_threads=yes
4620 else
4621   rm -rf conftest*
4622   ol_cv_header_linux_threads=no
4623 fi
4624 rm -f conftest*
4625
4626                 
4627 fi
4628
4629 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
4630         if test $ol_cv_header_linux_threads = yes; then
4631                 cat >> confdefs.h <<\EOF
4632 #define HAVE_LINUX_THREADS 1
4633 EOF
4634
4635         fi
4636
4637
4638                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4639                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4640 echo "configure:4641: checking for pthread_create in default libraries" >&5
4641                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   
4645                 if test "$cross_compiling" = yes; then
4646                         ol_cv_pthread_create=yes
4647 else
4648   cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651
4652 #include <pthread.h>
4653 #ifndef NULL
4654 #define NULL (void*)0
4655 #endif
4656
4657 static void *task(p)
4658         void *p;
4659 {
4660         return (void *) (p == NULL);
4661 }
4662
4663 int main(argc, argv)
4664         int argc;
4665         char **argv;
4666 {
4667         pthread_t t;
4668         int status;
4669
4670         /* make sure pthread_create() isn't just a stub */
4671 #if HAVE_PTHREADS_D4
4672         status = pthread_create(&t, pthread_attr_default, task, NULL);
4673 #else
4674         status = pthread_create(&t, NULL, task, NULL);
4675 #endif
4676
4677         if( status ) return status;
4678
4679         /* make sure pthread_detach() isn't just a stub */
4680 #if HAVE_PTHREADS_D4
4681         status = pthread_detach( &t );
4682 #else
4683         status = pthread_detach( t );
4684 #endif
4685
4686         if( status ) return status;
4687
4688         return status;
4689 }
4690
4691 EOF
4692 if { (eval echo configure:4693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4693 then
4694   ol_cv_pthread_create=yes
4695 else
4696   echo "configure: failed program was:" >&5
4697   cat conftest.$ac_ext >&5
4698   rm -fr conftest*
4699   ol_cv_pthread_create=no
4700 fi
4701 rm -fr conftest*
4702 fi
4703
4704 fi
4705
4706                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4707
4708                 if test $ol_cv_pthread_create != no ; then
4709                         ol_link_threads=posix
4710                         ol_link_pthreads=""
4711                 fi
4712                 
4713                 # Pthread try link: -mt (ol_cv_pthread_mt)
4714         if test "$ol_link_threads" = no ; then
4715                 # try -mt
4716                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
4717 echo "configure:4718: checking for pthread link with -mt" >&5
4718 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   
4722                         # save the flags
4723                         save_LIBS="$LIBS"
4724                         LIBS="-mt $LIBS"
4725
4726                         cat > conftest.$ac_ext <<EOF
4727 #line 4728 "configure"
4728 #include "confdefs.h"
4729
4730 #include <pthread.h>
4731 #ifndef NULL
4732 #define NULL (void*)0
4733 #endif
4734
4735 int main() {
4736
4737         pthread_t t;
4738
4739 #if HAVE_PTHREADS_D4
4740         pthread_create(&t, pthread_attr_default, NULL, NULL);
4741         pthread_detach( &t );
4742 #else
4743         pthread_create(&t, NULL, NULL, NULL);
4744         pthread_detach( t );
4745 #endif
4746 #ifdef HAVE_LINUX_THREADS
4747         pthread_kill_other_threads_np();
4748 #endif
4749
4750 ; return 0; }
4751 EOF
4752 if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4753   rm -rf conftest*
4754   ol_cv_pthread_mt=yes
4755 else
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   ol_cv_pthread_mt=no
4760 fi
4761 rm -f conftest*
4762
4763                 # restore the LIBS
4764                 LIBS="$save_LIBS"
4765                 
4766 fi
4767
4768 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
4769
4770                 if test $ol_cv_pthread_mt = yes ; then
4771                         ol_link_pthreads="-mt"
4772                         ol_link_threads=posix
4773                 fi
4774         fi
4775
4776                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
4777         if test "$ol_link_threads" = no ; then
4778                 # try -kthread
4779                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
4780 echo "configure:4781: checking for pthread link with -kthread" >&5
4781 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
4782   echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784   
4785                         # save the flags
4786                         save_LIBS="$LIBS"
4787                         LIBS="-kthread $LIBS"
4788
4789                         cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792
4793 #include <pthread.h>
4794 #ifndef NULL
4795 #define NULL (void*)0
4796 #endif
4797
4798 int main() {
4799
4800         pthread_t t;
4801
4802 #if HAVE_PTHREADS_D4
4803         pthread_create(&t, pthread_attr_default, NULL, NULL);
4804         pthread_detach( &t );
4805 #else
4806         pthread_create(&t, NULL, NULL, NULL);
4807         pthread_detach( t );
4808 #endif
4809 #ifdef HAVE_LINUX_THREADS
4810         pthread_kill_other_threads_np();
4811 #endif
4812
4813 ; return 0; }
4814 EOF
4815 if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4816   rm -rf conftest*
4817   ol_cv_pthread_kthread=yes
4818 else
4819   echo "configure: failed program was:" >&5
4820   cat conftest.$ac_ext >&5
4821   rm -rf conftest*
4822   ol_cv_pthread_kthread=no
4823 fi
4824 rm -f conftest*
4825
4826                 # restore the LIBS
4827                 LIBS="$save_LIBS"
4828                 
4829 fi
4830
4831 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
4832
4833                 if test $ol_cv_pthread_kthread = yes ; then
4834                         ol_link_pthreads="-kthread"
4835                         ol_link_threads=posix
4836                 fi
4837         fi
4838
4839                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
4840         if test "$ol_link_threads" = no ; then
4841                 # try -pthread
4842                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
4843 echo "configure:4844: checking for pthread link with -pthread" >&5
4844 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
4845   echo $ac_n "(cached) $ac_c" 1>&6
4846 else
4847   
4848                         # save the flags
4849                         save_LIBS="$LIBS"
4850                         LIBS="-pthread $LIBS"
4851
4852                         cat > conftest.$ac_ext <<EOF
4853 #line 4854 "configure"
4854 #include "confdefs.h"
4855
4856 #include <pthread.h>
4857 #ifndef NULL
4858 #define NULL (void*)0
4859 #endif
4860
4861 int main() {
4862
4863         pthread_t t;
4864
4865 #if HAVE_PTHREADS_D4
4866         pthread_create(&t, pthread_attr_default, NULL, NULL);
4867         pthread_detach( &t );
4868 #else
4869         pthread_create(&t, NULL, NULL, NULL);
4870         pthread_detach( t );
4871 #endif
4872 #ifdef HAVE_LINUX_THREADS
4873         pthread_kill_other_threads_np();
4874 #endif
4875
4876 ; return 0; }
4877 EOF
4878 if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879   rm -rf conftest*
4880   ol_cv_pthread_pthread=yes
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   ol_cv_pthread_pthread=no
4886 fi
4887 rm -f conftest*
4888
4889                 # restore the LIBS
4890                 LIBS="$save_LIBS"
4891                 
4892 fi
4893
4894 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
4895
4896                 if test $ol_cv_pthread_pthread = yes ; then
4897                         ol_link_pthreads="-pthread"
4898                         ol_link_threads=posix
4899                 fi
4900         fi
4901
4902                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
4903         if test "$ol_link_threads" = no ; then
4904                 # try -pthreads
4905                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
4906 echo "configure:4907: checking for pthread link with -pthreads" >&5
4907 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
4908   echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910   
4911                         # save the flags
4912                         save_LIBS="$LIBS"
4913                         LIBS="-pthreads $LIBS"
4914
4915                         cat > conftest.$ac_ext <<EOF
4916 #line 4917 "configure"
4917 #include "confdefs.h"
4918
4919 #include <pthread.h>
4920 #ifndef NULL
4921 #define NULL (void*)0
4922 #endif
4923
4924 int main() {
4925
4926         pthread_t t;
4927
4928 #if HAVE_PTHREADS_D4
4929         pthread_create(&t, pthread_attr_default, NULL, NULL);
4930         pthread_detach( &t );
4931 #else
4932         pthread_create(&t, NULL, NULL, NULL);
4933         pthread_detach( t );
4934 #endif
4935 #ifdef HAVE_LINUX_THREADS
4936         pthread_kill_other_threads_np();
4937 #endif
4938
4939 ; return 0; }
4940 EOF
4941 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4942   rm -rf conftest*
4943   ol_cv_pthread_pthreads=yes
4944 else
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   ol_cv_pthread_pthreads=no
4949 fi
4950 rm -f conftest*
4951
4952                 # restore the LIBS
4953                 LIBS="$save_LIBS"
4954                 
4955 fi
4956
4957 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
4958
4959                 if test $ol_cv_pthread_pthreads = yes ; then
4960                         ol_link_pthreads="-pthreads"
4961                         ol_link_threads=posix
4962                 fi
4963         fi
4964
4965                 # Pthread try link: -thread (ol_cv_pthread_thread)
4966         if test "$ol_link_threads" = no ; then
4967                 # try -thread
4968                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
4969 echo "configure:4970: checking for pthread link with -thread" >&5
4970 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
4971   echo $ac_n "(cached) $ac_c" 1>&6
4972 else
4973   
4974                         # save the flags
4975                         save_LIBS="$LIBS"
4976                         LIBS="-thread $LIBS"
4977
4978                         cat > conftest.$ac_ext <<EOF
4979 #line 4980 "configure"
4980 #include "confdefs.h"
4981
4982 #include <pthread.h>
4983 #ifndef NULL
4984 #define NULL (void*)0
4985 #endif
4986
4987 int main() {
4988
4989         pthread_t t;
4990
4991 #if HAVE_PTHREADS_D4
4992         pthread_create(&t, pthread_attr_default, NULL, NULL);
4993         pthread_detach( &t );
4994 #else
4995         pthread_create(&t, NULL, NULL, NULL);
4996         pthread_detach( t );
4997 #endif
4998 #ifdef HAVE_LINUX_THREADS
4999         pthread_kill_other_threads_np();
5000 #endif
5001
5002 ; return 0; }
5003 EOF
5004 if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5005   rm -rf conftest*
5006   ol_cv_pthread_thread=yes
5007 else
5008   echo "configure: failed program was:" >&5
5009   cat conftest.$ac_ext >&5
5010   rm -rf conftest*
5011   ol_cv_pthread_thread=no
5012 fi
5013 rm -f conftest*
5014
5015                 # restore the LIBS
5016                 LIBS="$save_LIBS"
5017                 
5018 fi
5019
5020 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5021
5022                 if test $ol_cv_pthread_thread = yes ; then
5023                         ol_link_pthreads="-thread"
5024                         ol_link_threads=posix
5025                 fi
5026         fi
5027
5028
5029                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5030         if test "$ol_link_threads" = no ; then
5031                 # try -lpthread -lmach -lexc -lc_r
5032                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5033 echo "configure:5034: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5034 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5035   echo $ac_n "(cached) $ac_c" 1>&6
5036 else
5037   
5038                         # save the flags
5039                         save_LIBS="$LIBS"
5040                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5041
5042                         cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045
5046 #include <pthread.h>
5047 #ifndef NULL
5048 #define NULL (void*)0
5049 #endif
5050
5051 int main() {
5052
5053         pthread_t t;
5054
5055 #if HAVE_PTHREADS_D4
5056         pthread_create(&t, pthread_attr_default, NULL, NULL);
5057         pthread_detach( &t );
5058 #else
5059         pthread_create(&t, NULL, NULL, NULL);
5060         pthread_detach( t );
5061 #endif
5062 #ifdef HAVE_LINUX_THREADS
5063         pthread_kill_other_threads_np();
5064 #endif
5065
5066 ; return 0; }
5067 EOF
5068 if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5069   rm -rf conftest*
5070   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5071 else
5072   echo "configure: failed program was:" >&5
5073   cat conftest.$ac_ext >&5
5074   rm -rf conftest*
5075   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5076 fi
5077 rm -f conftest*
5078
5079                 # restore the LIBS
5080                 LIBS="$save_LIBS"
5081                 
5082 fi
5083
5084 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5085
5086                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5087                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5088                         ol_link_threads=posix
5089                 fi
5090         fi
5091
5092                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5093         if test "$ol_link_threads" = no ; then
5094                 # try -lpthread -lmach -lexc
5095                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5096 echo "configure:5097: checking for pthread link with -lpthread -lmach -lexc" >&5
5097 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   
5101                         # save the flags
5102                         save_LIBS="$LIBS"
5103                         LIBS="-lpthread -lmach -lexc $LIBS"
5104
5105                         cat > conftest.$ac_ext <<EOF
5106 #line 5107 "configure"
5107 #include "confdefs.h"
5108
5109 #include <pthread.h>
5110 #ifndef NULL
5111 #define NULL (void*)0
5112 #endif
5113
5114 int main() {
5115
5116         pthread_t t;
5117
5118 #if HAVE_PTHREADS_D4
5119         pthread_create(&t, pthread_attr_default, NULL, NULL);
5120         pthread_detach( &t );
5121 #else
5122         pthread_create(&t, NULL, NULL, NULL);
5123         pthread_detach( t );
5124 #endif
5125 #ifdef HAVE_LINUX_THREADS
5126         pthread_kill_other_threads_np();
5127 #endif
5128
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5132   rm -rf conftest*
5133   ol_cv_pthread_lpthread_lmach_lexc=yes
5134 else
5135   echo "configure: failed program was:" >&5
5136   cat conftest.$ac_ext >&5
5137   rm -rf conftest*
5138   ol_cv_pthread_lpthread_lmach_lexc=no
5139 fi
5140 rm -f conftest*
5141
5142                 # restore the LIBS
5143                 LIBS="$save_LIBS"
5144                 
5145 fi
5146
5147 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5148
5149                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5150                         ol_link_pthreads="-lpthread -lmach -lexc"
5151                         ol_link_threads=posix
5152                 fi
5153         fi
5154
5155                 # Pthread try link: -lpthread -lexc (ol_cv_pthread_lpthread_lexc)
5156         if test "$ol_link_threads" = no ; then
5157                 # try -lpthread -lexc
5158                 echo $ac_n "checking for pthread link with -lpthread -lexc""... $ac_c" 1>&6
5159 echo "configure:5160: checking for pthread link with -lpthread -lexc" >&5
5160 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lexc'+set}'`\" = set"; then
5161   echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5163   
5164                         # save the flags
5165                         save_LIBS="$LIBS"
5166                         LIBS="-lpthread -lexc $LIBS"
5167
5168                         cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171
5172 #include <pthread.h>
5173 #ifndef NULL
5174 #define NULL (void*)0
5175 #endif
5176
5177 int main() {
5178
5179         pthread_t t;
5180
5181 #if HAVE_PTHREADS_D4
5182         pthread_create(&t, pthread_attr_default, NULL, NULL);
5183         pthread_detach( &t );
5184 #else
5185         pthread_create(&t, NULL, NULL, NULL);
5186         pthread_detach( t );
5187 #endif
5188 #ifdef HAVE_LINUX_THREADS
5189         pthread_kill_other_threads_np();
5190 #endif
5191
5192 ; return 0; }
5193 EOF
5194 if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5195   rm -rf conftest*
5196   ol_cv_pthread_lpthread_lexc=yes
5197 else
5198   echo "configure: failed program was:" >&5
5199   cat conftest.$ac_ext >&5
5200   rm -rf conftest*
5201   ol_cv_pthread_lpthread_lexc=no
5202 fi
5203 rm -f conftest*
5204
5205                 # restore the LIBS
5206                 LIBS="$save_LIBS"
5207                 
5208 fi
5209
5210 echo "$ac_t""$ol_cv_pthread_lpthread_lexc" 1>&6
5211
5212                 if test $ol_cv_pthread_lpthread_lexc = yes ; then
5213                         ol_link_pthreads="-lpthread -lexc"
5214                         ol_link_threads=posix
5215                 fi
5216         fi
5217
5218
5219                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5220         if test "$ol_link_threads" = no ; then
5221                 # try -lpthread -Wl,-woff,85
5222                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5223 echo "configure:5224: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5224 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   
5228                         # save the flags
5229                         save_LIBS="$LIBS"
5230                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5231
5232                         cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235
5236 #include <pthread.h>
5237 #ifndef NULL
5238 #define NULL (void*)0
5239 #endif
5240
5241 int main() {
5242
5243         pthread_t t;
5244
5245 #if HAVE_PTHREADS_D4
5246         pthread_create(&t, pthread_attr_default, NULL, NULL);
5247         pthread_detach( &t );
5248 #else
5249         pthread_create(&t, NULL, NULL, NULL);
5250         pthread_detach( t );
5251 #endif
5252 #ifdef HAVE_LINUX_THREADS
5253         pthread_kill_other_threads_np();
5254 #endif
5255
5256 ; return 0; }
5257 EOF
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259   rm -rf conftest*
5260   ol_cv_pthread_lib_lpthread_woff=yes
5261 else
5262   echo "configure: failed program was:" >&5
5263   cat conftest.$ac_ext >&5
5264   rm -rf conftest*
5265   ol_cv_pthread_lib_lpthread_woff=no
5266 fi
5267 rm -f conftest*
5268
5269                 # restore the LIBS
5270                 LIBS="$save_LIBS"
5271                 
5272 fi
5273
5274 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5275
5276                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5277                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5278                         ol_link_threads=posix
5279                 fi
5280         fi
5281
5282
5283                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5284         if test "$ol_link_threads" = no ; then
5285                 # try -lpthread
5286                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5287 echo "configure:5288: checking for pthread link with -lpthread" >&5
5288 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5289   echo $ac_n "(cached) $ac_c" 1>&6
5290 else
5291   
5292                         # save the flags
5293                         save_LIBS="$LIBS"
5294                         LIBS="-lpthread $LIBS"
5295
5296                         cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 #include <pthread.h>
5301 #ifndef NULL
5302 #define NULL (void*)0
5303 #endif
5304
5305 int main() {
5306
5307         pthread_t t;
5308
5309 #if HAVE_PTHREADS_D4
5310         pthread_create(&t, pthread_attr_default, NULL, NULL);
5311         pthread_detach( &t );
5312 #else
5313         pthread_create(&t, NULL, NULL, NULL);
5314         pthread_detach( t );
5315 #endif
5316 #ifdef HAVE_LINUX_THREADS
5317         pthread_kill_other_threads_np();
5318 #endif
5319
5320 ; return 0; }
5321 EOF
5322 if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5323   rm -rf conftest*
5324   ol_cv_pthread_lpthread=yes
5325 else
5326   echo "configure: failed program was:" >&5
5327   cat conftest.$ac_ext >&5
5328   rm -rf conftest*
5329   ol_cv_pthread_lpthread=no
5330 fi
5331 rm -f conftest*
5332
5333                 # restore the LIBS
5334                 LIBS="$save_LIBS"
5335                 
5336 fi
5337
5338 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5339
5340                 if test $ol_cv_pthread_lpthread = yes ; then
5341                         ol_link_pthreads="-lpthread"
5342                         ol_link_threads=posix
5343                 fi
5344         fi
5345
5346                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5347         if test "$ol_link_threads" = no ; then
5348                 # try -lc_r
5349                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5350 echo "configure:5351: checking for pthread link with -lc_r" >&5
5351 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5352   echo $ac_n "(cached) $ac_c" 1>&6
5353 else
5354   
5355                         # save the flags
5356                         save_LIBS="$LIBS"
5357                         LIBS="-lc_r $LIBS"
5358
5359                         cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362
5363 #include <pthread.h>
5364 #ifndef NULL
5365 #define NULL (void*)0
5366 #endif
5367
5368 int main() {
5369
5370         pthread_t t;
5371
5372 #if HAVE_PTHREADS_D4
5373         pthread_create(&t, pthread_attr_default, NULL, NULL);
5374         pthread_detach( &t );
5375 #else
5376         pthread_create(&t, NULL, NULL, NULL);
5377         pthread_detach( t );
5378 #endif
5379 #ifdef HAVE_LINUX_THREADS
5380         pthread_kill_other_threads_np();
5381 #endif
5382
5383 ; return 0; }
5384 EOF
5385 if { (eval echo configure:5386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5386   rm -rf conftest*
5387   ol_cv_pthread_lc_r=yes
5388 else
5389   echo "configure: failed program was:" >&5
5390   cat conftest.$ac_ext >&5
5391   rm -rf conftest*
5392   ol_cv_pthread_lc_r=no
5393 fi
5394 rm -f conftest*
5395
5396                 # restore the LIBS
5397                 LIBS="$save_LIBS"
5398                 
5399 fi
5400
5401 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5402
5403                 if test $ol_cv_pthread_lc_r = yes ; then
5404                         ol_link_pthreads="-lc_r"
5405                         ol_link_threads=posix
5406                 fi
5407         fi
5408
5409
5410                 # Pthread try link: -threads (ol_cv_pthread_threads)
5411         if test "$ol_link_threads" = no ; then
5412                 # try -threads
5413                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5414 echo "configure:5415: checking for pthread link with -threads" >&5
5415 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5416   echo $ac_n "(cached) $ac_c" 1>&6
5417 else
5418   
5419                         # save the flags
5420                         save_LIBS="$LIBS"
5421                         LIBS="-threads $LIBS"
5422
5423                         cat > conftest.$ac_ext <<EOF
5424 #line 5425 "configure"
5425 #include "confdefs.h"
5426
5427 #include <pthread.h>
5428 #ifndef NULL
5429 #define NULL (void*)0
5430 #endif
5431
5432 int main() {
5433
5434         pthread_t t;
5435
5436 #if HAVE_PTHREADS_D4
5437         pthread_create(&t, pthread_attr_default, NULL, NULL);
5438         pthread_detach( &t );
5439 #else
5440         pthread_create(&t, NULL, NULL, NULL);
5441         pthread_detach( t );
5442 #endif
5443 #ifdef HAVE_LINUX_THREADS
5444         pthread_kill_other_threads_np();
5445 #endif
5446
5447 ; return 0; }
5448 EOF
5449 if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5450   rm -rf conftest*
5451   ol_cv_pthread_threads=yes
5452 else
5453   echo "configure: failed program was:" >&5
5454   cat conftest.$ac_ext >&5
5455   rm -rf conftest*
5456   ol_cv_pthread_threads=no
5457 fi
5458 rm -f conftest*
5459
5460                 # restore the LIBS
5461                 LIBS="$save_LIBS"
5462                 
5463 fi
5464
5465 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5466
5467                 if test $ol_cv_pthread_threads = yes ; then
5468                         ol_link_pthreads="-threads"
5469                         ol_link_threads=posix
5470                 fi
5471         fi
5472
5473
5474                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5475         if test "$ol_link_threads" = no ; then
5476                 # try -lpthreads -lmach -lexc -lc_r
5477                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5478 echo "configure:5479: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5479 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5480   echo $ac_n "(cached) $ac_c" 1>&6
5481 else
5482   
5483                         # save the flags
5484                         save_LIBS="$LIBS"
5485                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5486
5487                         cat > conftest.$ac_ext <<EOF
5488 #line 5489 "configure"
5489 #include "confdefs.h"
5490
5491 #include <pthread.h>
5492 #ifndef NULL
5493 #define NULL (void*)0
5494 #endif
5495
5496 int main() {
5497
5498         pthread_t t;
5499
5500 #if HAVE_PTHREADS_D4
5501         pthread_create(&t, pthread_attr_default, NULL, NULL);
5502         pthread_detach( &t );
5503 #else
5504         pthread_create(&t, NULL, NULL, NULL);
5505         pthread_detach( t );
5506 #endif
5507 #ifdef HAVE_LINUX_THREADS
5508         pthread_kill_other_threads_np();
5509 #endif
5510
5511 ; return 0; }
5512 EOF
5513 if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5514   rm -rf conftest*
5515   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5516 else
5517   echo "configure: failed program was:" >&5
5518   cat conftest.$ac_ext >&5
5519   rm -rf conftest*
5520   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5521 fi
5522 rm -f conftest*
5523
5524                 # restore the LIBS
5525                 LIBS="$save_LIBS"
5526                 
5527 fi
5528
5529 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5530
5531                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5532                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5533                         ol_link_threads=posix
5534                 fi
5535         fi
5536
5537                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5538         if test "$ol_link_threads" = no ; then
5539                 # try -lpthreads -lmach -lexc
5540                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5541 echo "configure:5542: checking for pthread link with -lpthreads -lmach -lexc" >&5
5542 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   
5546                         # save the flags
5547                         save_LIBS="$LIBS"
5548                         LIBS="-lpthreads -lmach -lexc $LIBS"
5549
5550                         cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553
5554 #include <pthread.h>
5555 #ifndef NULL
5556 #define NULL (void*)0
5557 #endif
5558
5559 int main() {
5560
5561         pthread_t t;
5562
5563 #if HAVE_PTHREADS_D4
5564         pthread_create(&t, pthread_attr_default, NULL, NULL);
5565         pthread_detach( &t );
5566 #else
5567         pthread_create(&t, NULL, NULL, NULL);
5568         pthread_detach( t );
5569 #endif
5570 #ifdef HAVE_LINUX_THREADS
5571         pthread_kill_other_threads_np();
5572 #endif
5573
5574 ; return 0; }
5575 EOF
5576 if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5577   rm -rf conftest*
5578   ol_cv_pthread_lpthreads_lmach_lexc=yes
5579 else
5580   echo "configure: failed program was:" >&5
5581   cat conftest.$ac_ext >&5
5582   rm -rf conftest*
5583   ol_cv_pthread_lpthreads_lmach_lexc=no
5584 fi
5585 rm -f conftest*
5586
5587                 # restore the LIBS
5588                 LIBS="$save_LIBS"
5589                 
5590 fi
5591
5592 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
5593
5594                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
5595                         ol_link_pthreads="-lpthreads -lmach -lexc"
5596                         ol_link_threads=posix
5597                 fi
5598         fi
5599
5600                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
5601         if test "$ol_link_threads" = no ; then
5602                 # try -lpthreads -lexc
5603                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
5604 echo "configure:5605: checking for pthread link with -lpthreads -lexc" >&5
5605 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
5606   echo $ac_n "(cached) $ac_c" 1>&6
5607 else
5608   
5609                         # save the flags
5610                         save_LIBS="$LIBS"
5611                         LIBS="-lpthreads -lexc $LIBS"
5612
5613                         cat > conftest.$ac_ext <<EOF
5614 #line 5615 "configure"
5615 #include "confdefs.h"
5616
5617 #include <pthread.h>
5618 #ifndef NULL
5619 #define NULL (void*)0
5620 #endif
5621
5622 int main() {
5623
5624         pthread_t t;
5625
5626 #if HAVE_PTHREADS_D4
5627         pthread_create(&t, pthread_attr_default, NULL, NULL);
5628         pthread_detach( &t );
5629 #else
5630         pthread_create(&t, NULL, NULL, NULL);
5631         pthread_detach( t );
5632 #endif
5633 #ifdef HAVE_LINUX_THREADS
5634         pthread_kill_other_threads_np();
5635 #endif
5636
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   ol_cv_pthread_lpthreads_lexc=yes
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   ol_cv_pthread_lpthreads_lexc=no
5647 fi
5648 rm -f conftest*
5649
5650                 # restore the LIBS
5651                 LIBS="$save_LIBS"
5652                 
5653 fi
5654
5655 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
5656
5657                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
5658                         ol_link_pthreads="-lpthreads -lexc"
5659                         ol_link_threads=posix
5660                 fi
5661         fi
5662
5663
5664                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
5665         if test "$ol_link_threads" = no ; then
5666                 # try -lpthreads
5667                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
5668 echo "configure:5669: checking for pthread link with -lpthreads" >&5
5669 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
5670   echo $ac_n "(cached) $ac_c" 1>&6
5671 else
5672   
5673                         # save the flags
5674                         save_LIBS="$LIBS"
5675                         LIBS="-lpthreads $LIBS"
5676
5677                         cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680
5681 #include <pthread.h>
5682 #ifndef NULL
5683 #define NULL (void*)0
5684 #endif
5685
5686 int main() {
5687
5688         pthread_t t;
5689
5690 #if HAVE_PTHREADS_D4
5691         pthread_create(&t, pthread_attr_default, NULL, NULL);
5692         pthread_detach( &t );
5693 #else
5694         pthread_create(&t, NULL, NULL, NULL);
5695         pthread_detach( t );
5696 #endif
5697 #ifdef HAVE_LINUX_THREADS
5698         pthread_kill_other_threads_np();
5699 #endif
5700
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704   rm -rf conftest*
5705   ol_cv_pthread_lib_lpthreads=yes
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   ol_cv_pthread_lib_lpthreads=no
5711 fi
5712 rm -f conftest*
5713
5714                 # restore the LIBS
5715                 LIBS="$save_LIBS"
5716                 
5717 fi
5718
5719 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
5720
5721                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
5722                         ol_link_pthreads="-lpthreads"
5723                         ol_link_threads=posix
5724                 fi
5725         fi
5726
5727
5728                 if test $ol_link_threads != no ; then
5729                         cat >> confdefs.h <<\EOF
5730 #define HAVE_PTHREADS 1
5731 EOF
5732
5733
5734                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
5735
5736                                                 save_CPPFLAGS="$CPPFLAGS"
5737                         save_LIBS="$LIBS"
5738                         LIBS="$LTHREAD_LIBS $LIBS"
5739
5740                                                                                                 for ac_func in sched_yield pthread_yield
5741 do
5742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5743 echo "configure:5744: checking for $ac_func" >&5
5744 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5745   echo $ac_n "(cached) $ac_c" 1>&6
5746 else
5747   cat > conftest.$ac_ext <<EOF
5748 #line 5749 "configure"
5749 #include "confdefs.h"
5750 /* System header to define __stub macros and hopefully few prototypes,
5751     which can conflict with char $ac_func(); below.  */
5752 #include <assert.h>
5753 /* Override any gcc2 internal prototype to avoid an error.  */
5754 /* We use char because int might match the return type of a gcc2
5755     builtin and then its argument prototype would still apply.  */
5756 char $ac_func();
5757
5758 int main() {
5759
5760 /* The GNU C library defines this for functions which it implements
5761     to always fail with ENOSYS.  Some functions are actually named
5762     something starting with __ and the normal name is an alias.  */
5763 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5764 choke me
5765 #else
5766 $ac_func();
5767 #endif
5768
5769 ; return 0; }
5770 EOF
5771 if { (eval echo configure:5772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5772   rm -rf conftest*
5773   eval "ac_cv_func_$ac_func=yes"
5774 else
5775   echo "configure: failed program was:" >&5
5776   cat conftest.$ac_ext >&5
5777   rm -rf conftest*
5778   eval "ac_cv_func_$ac_func=no"
5779 fi
5780 rm -f conftest*
5781 fi
5782
5783 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5784   echo "$ac_t""yes" 1>&6
5785     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5786   cat >> confdefs.h <<EOF
5787 #define $ac_tr_func 1
5788 EOF
5789  
5790 else
5791   echo "$ac_t""no" 1>&6
5792 fi
5793 done
5794
5795
5796                         if test $ac_cv_func_sched_yield = no -a \
5797                                 $ac_cv_func_pthread_yield = no ; then
5798                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5799 echo "configure:5800: checking for sched_yield in -lrt" >&5
5800 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5801 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5802   echo $ac_n "(cached) $ac_c" 1>&6
5803 else
5804   ac_save_LIBS="$LIBS"
5805 LIBS="-lrt  $LIBS"
5806 cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809 /* Override any gcc2 internal prototype to avoid an error.  */
5810 /* We use char because int might match the return type of a gcc2
5811     builtin and then its argument prototype would still apply.  */
5812 char sched_yield();
5813
5814 int main() {
5815 sched_yield()
5816 ; return 0; }
5817 EOF
5818 if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5819   rm -rf conftest*
5820   eval "ac_cv_lib_$ac_lib_var=yes"
5821 else
5822   echo "configure: failed program was:" >&5
5823   cat conftest.$ac_ext >&5
5824   rm -rf conftest*
5825   eval "ac_cv_lib_$ac_lib_var=no"
5826 fi
5827 rm -f conftest*
5828 LIBS="$ac_save_LIBS"
5829
5830 fi
5831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5832   echo "$ac_t""yes" 1>&6
5833   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5834                                         cat >> confdefs.h <<\EOF
5835 #define HAVE_SCHED_YIELD 1
5836 EOF
5837
5838                                         ac_cv_func_sched_yield=yes
5839 else
5840   echo "$ac_t""no" 1>&6
5841 ac_cv_func_sched_yield=no
5842 fi
5843
5844                         fi
5845                         if test $ac_cv_func_sched_yield = no -a \
5846                                 $ac_cv_func_pthread_yield = no ; then
5847                                                                                                 for ac_func in thr_yield
5848 do
5849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5850 echo "configure:5851: checking for $ac_func" >&5
5851 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5852   echo $ac_n "(cached) $ac_c" 1>&6
5853 else
5854   cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857 /* System header to define __stub macros and hopefully few prototypes,
5858     which can conflict with char $ac_func(); below.  */
5859 #include <assert.h>
5860 /* Override any gcc2 internal prototype to avoid an error.  */
5861 /* We use char because int might match the return type of a gcc2
5862     builtin and then its argument prototype would still apply.  */
5863 char $ac_func();
5864
5865 int main() {
5866
5867 /* The GNU C library defines this for functions which it implements
5868     to always fail with ENOSYS.  Some functions are actually named
5869     something starting with __ and the normal name is an alias.  */
5870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5871 choke me
5872 #else
5873 $ac_func();
5874 #endif
5875
5876 ; return 0; }
5877 EOF
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5879   rm -rf conftest*
5880   eval "ac_cv_func_$ac_func=yes"
5881 else
5882   echo "configure: failed program was:" >&5
5883   cat conftest.$ac_ext >&5
5884   rm -rf conftest*
5885   eval "ac_cv_func_$ac_func=no"
5886 fi
5887 rm -f conftest*
5888 fi
5889
5890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5891   echo "$ac_t""yes" 1>&6
5892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5893   cat >> confdefs.h <<EOF
5894 #define $ac_tr_func 1
5895 EOF
5896  
5897 else
5898   echo "$ac_t""no" 1>&6
5899 fi
5900 done
5901
5902                         fi
5903                         if test $ac_cv_func_sched_yield = no -a \
5904                                 $ac_cv_func_pthread_yield = no -a \
5905                                 "$ac_cv_func_thr_yield" = no ; then
5906                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5907                         fi
5908
5909                                                 for ac_func in pthread_kill
5910 do
5911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5912 echo "configure:5913: checking for $ac_func" >&5
5913 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 /* System header to define __stub macros and hopefully few prototypes,
5920     which can conflict with char $ac_func(); below.  */
5921 #include <assert.h>
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 /* We use char because int might match the return type of a gcc2
5924     builtin and then its argument prototype would still apply.  */
5925 char $ac_func();
5926
5927 int main() {
5928
5929 /* The GNU C library defines this for functions which it implements
5930     to always fail with ENOSYS.  Some functions are actually named
5931     something starting with __ and the normal name is an alias.  */
5932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5933 choke me
5934 #else
5935 $ac_func();
5936 #endif
5937
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5941   rm -rf conftest*
5942   eval "ac_cv_func_$ac_func=yes"
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   eval "ac_cv_func_$ac_func=no"
5948 fi
5949 rm -f conftest*
5950 fi
5951
5952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5953   echo "$ac_t""yes" 1>&6
5954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5955   cat >> confdefs.h <<EOF
5956 #define $ac_tr_func 1
5957 EOF
5958  
5959 else
5960   echo "$ac_t""no" 1>&6
5961 fi
5962 done
5963
5964
5965                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5966 echo "configure:5967: checking for pthread_detach with <pthread.h>" >&5
5967 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5968   echo $ac_n "(cached) $ac_c" 1>&6
5969 else
5970   
5971                                                                 cat > conftest.$ac_ext <<EOF
5972 #line 5973 "configure"
5973 #include "confdefs.h"
5974
5975 #include <pthread.h>
5976 #ifndef NULL
5977 #define NULL (void*)0
5978 #endif
5979
5980 int main() {
5981 pthread_detach(NULL);
5982 ; return 0; }
5983 EOF
5984 if { (eval echo configure:5985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5985   rm -rf conftest*
5986   ol_cv_func_pthread_detach=yes
5987 else
5988   echo "configure: failed program was:" >&5
5989   cat conftest.$ac_ext >&5
5990   rm -rf conftest*
5991   ol_cv_func_pthread_detach=no
5992 fi
5993 rm -f conftest*
5994                         
5995 fi
5996
5997 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5998
5999                         if test $ol_cv_func_pthread_detach = no ; then
6000                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6001                         fi
6002
6003                         cat >> confdefs.h <<\EOF
6004 #define HAVE_PTHREAD_DETACH 1
6005 EOF
6006
6007
6008                                                 for ac_func in \
6009                                 pthread_setconcurrency \
6010                                 pthread_getconcurrency \
6011                                 thr_setconcurrency \
6012                                 thr_getconcurrency \
6013                         
6014 do
6015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6016 echo "configure:6017: checking for $ac_func" >&5
6017 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6018   echo $ac_n "(cached) $ac_c" 1>&6
6019 else
6020   cat > conftest.$ac_ext <<EOF
6021 #line 6022 "configure"
6022 #include "confdefs.h"
6023 /* System header to define __stub macros and hopefully few prototypes,
6024     which can conflict with char $ac_func(); below.  */
6025 #include <assert.h>
6026 /* Override any gcc2 internal prototype to avoid an error.  */
6027 /* We use char because int might match the return type of a gcc2
6028     builtin and then its argument prototype would still apply.  */
6029 char $ac_func();
6030
6031 int main() {
6032
6033 /* The GNU C library defines this for functions which it implements
6034     to always fail with ENOSYS.  Some functions are actually named
6035     something starting with __ and the normal name is an alias.  */
6036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6037 choke me
6038 #else
6039 $ac_func();
6040 #endif
6041
6042 ; return 0; }
6043 EOF
6044 if { (eval echo configure:6045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6045   rm -rf conftest*
6046   eval "ac_cv_func_$ac_func=yes"
6047 else
6048   echo "configure: failed program was:" >&5
6049   cat conftest.$ac_ext >&5
6050   rm -rf conftest*
6051   eval "ac_cv_func_$ac_func=no"
6052 fi
6053 rm -f conftest*
6054 fi
6055
6056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6057   echo "$ac_t""yes" 1>&6
6058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6059   cat >> confdefs.h <<EOF
6060 #define $ac_tr_func 1
6061 EOF
6062  
6063 else
6064   echo "$ac_t""no" 1>&6
6065 fi
6066 done
6067
6068
6069                         
6070         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6071 echo "configure:6072: checking for pthread_kill_other_threads_np" >&5
6072 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6073   echo $ac_n "(cached) $ac_c" 1>&6
6074 else
6075   cat > conftest.$ac_ext <<EOF
6076 #line 6077 "configure"
6077 #include "confdefs.h"
6078 /* System header to define __stub macros and hopefully few prototypes,
6079     which can conflict with char pthread_kill_other_threads_np(); below.  */
6080 #include <assert.h>
6081 /* Override any gcc2 internal prototype to avoid an error.  */
6082 /* We use char because int might match the return type of a gcc2
6083     builtin and then its argument prototype would still apply.  */
6084 char pthread_kill_other_threads_np();
6085
6086 int main() {
6087
6088 /* The GNU C library defines this for functions which it implements
6089     to always fail with ENOSYS.  Some functions are actually named
6090     something starting with __ and the normal name is an alias.  */
6091 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6092 choke me
6093 #else
6094 pthread_kill_other_threads_np();
6095 #endif
6096
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6100   rm -rf conftest*
6101   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105   rm -rf conftest*
6106   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6107 fi
6108 rm -f conftest*
6109 fi
6110
6111 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6112   echo "$ac_t""yes" 1>&6
6113   :
6114 else
6115   echo "$ac_t""no" 1>&6
6116 fi
6117
6118         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6119 echo "configure:6120: checking for LinuxThreads implementation" >&5
6120 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6121   echo $ac_n "(cached) $ac_c" 1>&6
6122 else
6123   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6124 fi
6125
6126 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6127
6128                         
6129         
6130         
6131         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6132 echo "configure:6133: checking for LinuxThreads consistency" >&5
6133 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6134   echo $ac_n "(cached) $ac_c" 1>&6
6135 else
6136   
6137                 if test $ol_cv_header_linux_threads = yes -a \
6138                         $ol_cv_sys_linux_threads = yes; then
6139                         ol_cv_linux_threads=yes
6140                 elif test $ol_cv_header_linux_threads = no -a \
6141                         $ol_cv_sys_linux_threads = no; then
6142                         ol_cv_linux_threads=no
6143                 else
6144                         ol_cv_linux_threads=error
6145                 fi
6146         
6147 fi
6148
6149 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6150
6151
6152                         if test $ol_cv_linux_threads = error; then
6153                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6154                         fi
6155
6156                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6157 echo "configure:6158: checking if pthread_create() works" >&5
6158                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6159   echo $ac_n "(cached) $ac_c" 1>&6
6160 else
6161   
6162                         if test "$cross_compiling" = yes; then
6163                                 ol_cv_pthread_create_works=yes
6164 else
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168
6169 #include <pthread.h>
6170 #ifndef NULL
6171 #define NULL (void*)0
6172 #endif
6173
6174 static void *task(p)
6175         void *p;
6176 {
6177         return (void *) (p == NULL);
6178 }
6179
6180 int main(argc, argv)
6181         int argc;
6182         char **argv;
6183 {
6184         pthread_t t;
6185 #if HAVE_PTHREADS_D4
6186         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6187 #else
6188         exit(pthread_create(&t, NULL, task, NULL));
6189 #endif
6190 }
6191
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6194 then
6195   ol_cv_pthread_create_works=yes
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -fr conftest*
6200   ol_cv_pthread_create_works=no
6201 fi
6202 rm -fr conftest*
6203 fi
6204
6205 fi
6206
6207                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6208
6209                         if test $ol_cv_pthread_create_works = no ; then
6210                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6211                         fi
6212
6213                                                 if test $ol_with_yielding_select = auto ; then
6214                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6215 echo "configure:6216: checking if select yields when using pthreads" >&5
6216                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   
6220                                 if test "$cross_compiling" = yes; then
6221   
6222                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6223 else
6224   cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227
6228 #include <sys/types.h>
6229 #include <sys/time.h>
6230 #include <unistd.h>
6231 #include <pthread.h>
6232 #ifndef NULL
6233 #define NULL (void*) 0
6234 #endif
6235
6236 static int fildes[2];
6237
6238 static void *task(p)
6239         void *p;
6240 {
6241         int i;
6242         struct timeval tv;
6243
6244         fd_set rfds;
6245
6246         tv.tv_sec=10;
6247         tv.tv_usec=0;
6248
6249         FD_ZERO(&rfds);
6250         FD_SET(fildes[0], &rfds);
6251
6252         /* we're not interested in any fds */
6253         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6254
6255         if(i < 0) {
6256                 perror("select");
6257                 exit(10);
6258         }
6259
6260         exit(0); /* if we exit here, the select blocked the whole process */
6261 }
6262
6263 int main(argc, argv)
6264         int argc;
6265         char **argv;
6266 {
6267         pthread_t t;
6268
6269         /* create a pipe to select */
6270         if(pipe(&fildes[0])) {
6271                 perror("select");
6272                 exit(1);
6273         }
6274
6275 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6276         (void) pthread_setconcurrency(2);
6277 #else
6278 #ifdef HAVE_THR_SETCONCURRENCY
6279         /* Set Solaris LWP concurrency to 2 */
6280         thr_setconcurrency(2);
6281 #endif
6282 #endif
6283
6284 #if HAVE_PTHREADS_D4
6285         pthread_create(&t, pthread_attr_default, task, NULL);
6286 #else
6287         pthread_create(&t, NULL, task, NULL);
6288 #endif
6289
6290 #if HAVE_SCHED_YIELD
6291         sched_yield();  /* make sure task runs first */
6292 #else
6293 #ifdef HAVE_PTHREAD_YIELD
6294         pthread_yield();        /* make sure task runs first */
6295 #endif
6296 #endif
6297
6298         exit(2);
6299 }
6300 EOF
6301 if { (eval echo configure:6302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6302 then
6303   ol_cv_pthread_select_yields=no
6304 else
6305   echo "configure: failed program was:" >&5
6306   cat conftest.$ac_ext >&5
6307   rm -fr conftest*
6308   ol_cv_pthread_select_yields=yes
6309 fi
6310 rm -fr conftest*
6311 fi
6312
6313 fi
6314
6315                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6316
6317                                 if test $ol_cv_pthread_select_yields = yes ; then
6318                                         ol_with_yielding_select=yes
6319                                 fi
6320                         fi
6321
6322                                                 CPPFLAGS="$save_CPPFLAGS"
6323                         LIBS="$save_LIBS"
6324                 else
6325                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6326                 fi
6327         fi
6328
6329         if test $ol_with_threads = posix ; then
6330                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6331         fi
6332 fi
6333
6334 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6335         -o $ol_with_threads = mach ; then
6336
6337                 for ac_hdr in mach/cthreads.h
6338 do
6339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6341 echo "configure:6342: checking for $ac_hdr" >&5
6342 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6343   echo $ac_n "(cached) $ac_c" 1>&6
6344 else
6345   cat > conftest.$ac_ext <<EOF
6346 #line 6347 "configure"
6347 #include "confdefs.h"
6348 #include <$ac_hdr>
6349 EOF
6350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6351 { (eval echo configure:6352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6353 if test -z "$ac_err"; then
6354   rm -rf conftest*
6355   eval "ac_cv_header_$ac_safe=yes"
6356 else
6357   echo "$ac_err" >&5
6358   echo "configure: failed program was:" >&5
6359   cat conftest.$ac_ext >&5
6360   rm -rf conftest*
6361   eval "ac_cv_header_$ac_safe=no"
6362 fi
6363 rm -f conftest*
6364 fi
6365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6366   echo "$ac_t""yes" 1>&6
6367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6368   cat >> confdefs.h <<EOF
6369 #define $ac_tr_hdr 1
6370 EOF
6371  
6372 else
6373   echo "$ac_t""no" 1>&6
6374 fi
6375 done
6376
6377         if test $ac_cv_header_mach_cthreads_h = yes ; then
6378                 ol_with_threads=found
6379
6380                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6381 echo "configure:6382: checking for cthread_fork" >&5
6382 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6383   echo $ac_n "(cached) $ac_c" 1>&6
6384 else
6385   cat > conftest.$ac_ext <<EOF
6386 #line 6387 "configure"
6387 #include "confdefs.h"
6388 /* System header to define __stub macros and hopefully few prototypes,
6389     which can conflict with char cthread_fork(); below.  */
6390 #include <assert.h>
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 /* We use char because int might match the return type of a gcc2
6393     builtin and then its argument prototype would still apply.  */
6394 char cthread_fork();
6395
6396 int main() {
6397
6398 /* The GNU C library defines this for functions which it implements
6399     to always fail with ENOSYS.  Some functions are actually named
6400     something starting with __ and the normal name is an alias.  */
6401 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6402 choke me
6403 #else
6404 cthread_fork();
6405 #endif
6406
6407 ; return 0; }
6408 EOF
6409 if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6410   rm -rf conftest*
6411   eval "ac_cv_func_cthread_fork=yes"
6412 else
6413   echo "configure: failed program was:" >&5
6414   cat conftest.$ac_ext >&5
6415   rm -rf conftest*
6416   eval "ac_cv_func_cthread_fork=no"
6417 fi
6418 rm -f conftest*
6419 fi
6420
6421 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6422   echo "$ac_t""yes" 1>&6
6423   ol_link_threads=yes
6424 else
6425   echo "$ac_t""no" 1>&6
6426 fi
6427
6428
6429                 if test $ol_link_threads = no ; then
6430                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6431 echo "configure:6432: checking for cthread_fork with -all_load" >&5
6432 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6433   echo $ac_n "(cached) $ac_c" 1>&6
6434 else
6435   
6436                                                                 save_LIBS="$LIBS"
6437                                 LIBS="-all_load $LIBS"
6438                                 cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441 #include <mach/cthreads.h>
6442 int main() {
6443
6444                                         cthread_fork((void *)0, (void *)0);
6445                                         
6446 ; return 0; }
6447 EOF
6448 if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6449   rm -rf conftest*
6450   ol_cv_cthread_all_load=yes
6451 else
6452   echo "configure: failed program was:" >&5
6453   cat conftest.$ac_ext >&5
6454   rm -rf conftest*
6455   ol_cv_cthread_all_load=no
6456 fi
6457 rm -f conftest*
6458                                                                 LIBS="$save_LIBS"
6459                         
6460 fi
6461
6462 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6463
6464                         if test $ol_cv_cthread_all_load = yes ; then
6465                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6466                                 ol_link_threads=mach
6467                         fi
6468                 fi
6469
6470                 if test $ol_link_threads != no ; then
6471                         : check for cthread specific functionality here
6472                         cat >> confdefs.h <<\EOF
6473 #define HAVE_MACH_CTHREADS 1
6474 EOF
6475
6476                 else
6477                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6478                 fi
6479         fi
6480
6481         if test $ol_with_threads = mach ; then
6482                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6483         fi
6484 fi
6485
6486 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6487         -o $ol_with_threads = lwp ; then
6488
6489                 for ac_hdr in thread.h synch.h
6490 do
6491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6493 echo "configure:6494: checking for $ac_hdr" >&5
6494 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6495   echo $ac_n "(cached) $ac_c" 1>&6
6496 else
6497   cat > conftest.$ac_ext <<EOF
6498 #line 6499 "configure"
6499 #include "confdefs.h"
6500 #include <$ac_hdr>
6501 EOF
6502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6503 { (eval echo configure:6504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6505 if test -z "$ac_err"; then
6506   rm -rf conftest*
6507   eval "ac_cv_header_$ac_safe=yes"
6508 else
6509   echo "$ac_err" >&5
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   eval "ac_cv_header_$ac_safe=no"
6514 fi
6515 rm -f conftest*
6516 fi
6517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6518   echo "$ac_t""yes" 1>&6
6519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6520   cat >> confdefs.h <<EOF
6521 #define $ac_tr_hdr 1
6522 EOF
6523  
6524 else
6525   echo "$ac_t""no" 1>&6
6526 fi
6527 done
6528
6529         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6530                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6531 echo "configure:6532: checking for thr_create in -lthread" >&5
6532 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6534   echo $ac_n "(cached) $ac_c" 1>&6
6535 else
6536   ac_save_LIBS="$LIBS"
6537 LIBS="-lthread  $LIBS"
6538 cat > conftest.$ac_ext <<EOF
6539 #line 6540 "configure"
6540 #include "confdefs.h"
6541 /* Override any gcc2 internal prototype to avoid an error.  */
6542 /* We use char because int might match the return type of a gcc2
6543     builtin and then its argument prototype would still apply.  */
6544 char thr_create();
6545
6546 int main() {
6547 thr_create()
6548 ; return 0; }
6549 EOF
6550 if { (eval echo configure:6551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6551   rm -rf conftest*
6552   eval "ac_cv_lib_$ac_lib_var=yes"
6553 else
6554   echo "configure: failed program was:" >&5
6555   cat conftest.$ac_ext >&5
6556   rm -rf conftest*
6557   eval "ac_cv_lib_$ac_lib_var=no"
6558 fi
6559 rm -f conftest*
6560 LIBS="$ac_save_LIBS"
6561
6562 fi
6563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6564   echo "$ac_t""yes" 1>&6
6565   have_thr=yes
6566 else
6567   echo "$ac_t""no" 1>&6
6568 have_thr=no
6569 fi
6570
6571
6572                 if test $have_thr = yes ; then
6573                         cat >> confdefs.h <<\EOF
6574 #define HAVE_THR 1
6575 EOF
6576
6577                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6578                         ol_link_threads=thr
6579
6580                         if test $ol_with_yielding_select = auto ; then
6581                                 ol_with_yielding_select=yes
6582                         fi
6583
6584                                                 for ac_func in \
6585                                 thr_setconcurrency \
6586                                 thr_getconcurrency \
6587                         
6588 do
6589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6590 echo "configure:6591: checking for $ac_func" >&5
6591 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6592   echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594   cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 /* System header to define __stub macros and hopefully few prototypes,
6598     which can conflict with char $ac_func(); below.  */
6599 #include <assert.h>
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char $ac_func();
6604
6605 int main() {
6606
6607 /* The GNU C library defines this for functions which it implements
6608     to always fail with ENOSYS.  Some functions are actually named
6609     something starting with __ and the normal name is an alias.  */
6610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6611 choke me
6612 #else
6613 $ac_func();
6614 #endif
6615
6616 ; return 0; }
6617 EOF
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619   rm -rf conftest*
6620   eval "ac_cv_func_$ac_func=yes"
6621 else
6622   echo "configure: failed program was:" >&5
6623   cat conftest.$ac_ext >&5
6624   rm -rf conftest*
6625   eval "ac_cv_func_$ac_func=no"
6626 fi
6627 rm -f conftest*
6628 fi
6629
6630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6631   echo "$ac_t""yes" 1>&6
6632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6633   cat >> confdefs.h <<EOF
6634 #define $ac_tr_func 1
6635 EOF
6636  
6637 else
6638   echo "$ac_t""no" 1>&6
6639 fi
6640 done
6641
6642                 fi
6643         fi
6644
6645                 for ac_hdr in lwp/lwp.h
6646 do
6647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6649 echo "configure:6650: checking for $ac_hdr" >&5
6650 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6651   echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653   cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656 #include <$ac_hdr>
6657 EOF
6658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6659 { (eval echo configure:6660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6661 if test -z "$ac_err"; then
6662   rm -rf conftest*
6663   eval "ac_cv_header_$ac_safe=yes"
6664 else
6665   echo "$ac_err" >&5
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -rf conftest*
6669   eval "ac_cv_header_$ac_safe=no"
6670 fi
6671 rm -f conftest*
6672 fi
6673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6674   echo "$ac_t""yes" 1>&6
6675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6676   cat >> confdefs.h <<EOF
6677 #define $ac_tr_hdr 1
6678 EOF
6679  
6680 else
6681   echo "$ac_t""no" 1>&6
6682 fi
6683 done
6684
6685         if test $ac_cv_header_lwp_lwp_h = yes ; then
6686                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6687 echo "configure:6688: checking for lwp_create in -llwp" >&5
6688 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6689 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6690   echo $ac_n "(cached) $ac_c" 1>&6
6691 else
6692   ac_save_LIBS="$LIBS"
6693 LIBS="-llwp  $LIBS"
6694 cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 /* Override any gcc2 internal prototype to avoid an error.  */
6698 /* We use char because int might match the return type of a gcc2
6699     builtin and then its argument prototype would still apply.  */
6700 char lwp_create();
6701
6702 int main() {
6703 lwp_create()
6704 ; return 0; }
6705 EOF
6706 if { (eval echo configure:6707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6707   rm -rf conftest*
6708   eval "ac_cv_lib_$ac_lib_var=yes"
6709 else
6710   echo "configure: failed program was:" >&5
6711   cat conftest.$ac_ext >&5
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=no"
6714 fi
6715 rm -f conftest*
6716 LIBS="$ac_save_LIBS"
6717
6718 fi
6719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6720   echo "$ac_t""yes" 1>&6
6721   have_lwp=yes
6722 else
6723   echo "$ac_t""no" 1>&6
6724 have_lwp=no
6725 fi
6726
6727
6728                 if test $have_lwp = yes ; then
6729                         cat >> confdefs.h <<\EOF
6730 #define HAVE_LWP 1
6731 EOF
6732
6733                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6734                         ol_link_threads=lwp
6735
6736                         if test $ol_with_yielding_select = auto ; then
6737                                 ol_with_yielding_select=no
6738                         fi
6739                 fi
6740         fi
6741 fi
6742
6743 if test $ol_with_yielding_select = yes ; then
6744         cat >> confdefs.h <<\EOF
6745 #define HAVE_YIELDING_SELECT 1
6746 EOF
6747
6748 fi
6749
6750 if test $ol_with_threads = manual ; then
6751                 ol_link_threads=yes
6752
6753         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6754
6755         for ac_hdr in pthread.h sched.h
6756 do
6757 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6758 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6759 echo "configure:6760: checking for $ac_hdr" >&5
6760 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6761   echo $ac_n "(cached) $ac_c" 1>&6
6762 else
6763   cat > conftest.$ac_ext <<EOF
6764 #line 6765 "configure"
6765 #include "confdefs.h"
6766 #include <$ac_hdr>
6767 EOF
6768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6769 { (eval echo configure:6770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6771 if test -z "$ac_err"; then
6772   rm -rf conftest*
6773   eval "ac_cv_header_$ac_safe=yes"
6774 else
6775   echo "$ac_err" >&5
6776   echo "configure: failed program was:" >&5
6777   cat conftest.$ac_ext >&5
6778   rm -rf conftest*
6779   eval "ac_cv_header_$ac_safe=no"
6780 fi
6781 rm -f conftest*
6782 fi
6783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6784   echo "$ac_t""yes" 1>&6
6785     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6786   cat >> confdefs.h <<EOF
6787 #define $ac_tr_hdr 1
6788 EOF
6789  
6790 else
6791   echo "$ac_t""no" 1>&6
6792 fi
6793 done
6794
6795         for ac_func in sched_yield pthread_yield
6796 do
6797 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6798 echo "configure:6799: checking for $ac_func" >&5
6799 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6800   echo $ac_n "(cached) $ac_c" 1>&6
6801 else
6802   cat > conftest.$ac_ext <<EOF
6803 #line 6804 "configure"
6804 #include "confdefs.h"
6805 /* System header to define __stub macros and hopefully few prototypes,
6806     which can conflict with char $ac_func(); below.  */
6807 #include <assert.h>
6808 /* Override any gcc2 internal prototype to avoid an error.  */
6809 /* We use char because int might match the return type of a gcc2
6810     builtin and then its argument prototype would still apply.  */
6811 char $ac_func();
6812
6813 int main() {
6814
6815 /* The GNU C library defines this for functions which it implements
6816     to always fail with ENOSYS.  Some functions are actually named
6817     something starting with __ and the normal name is an alias.  */
6818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6819 choke me
6820 #else
6821 $ac_func();
6822 #endif
6823
6824 ; return 0; }
6825 EOF
6826 if { (eval echo configure:6827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6827   rm -rf conftest*
6828   eval "ac_cv_func_$ac_func=yes"
6829 else
6830   echo "configure: failed program was:" >&5
6831   cat conftest.$ac_ext >&5
6832   rm -rf conftest*
6833   eval "ac_cv_func_$ac_func=no"
6834 fi
6835 rm -f conftest*
6836 fi
6837
6838 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6839   echo "$ac_t""yes" 1>&6
6840     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6841   cat >> confdefs.h <<EOF
6842 #define $ac_tr_func 1
6843 EOF
6844  
6845 else
6846   echo "$ac_t""no" 1>&6
6847 fi
6848 done
6849
6850         
6851         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6852 echo "configure:6853: checking for LinuxThreads pthread.h" >&5
6853 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 #include <pthread.h>
6860 EOF
6861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6862   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6863   rm -rf conftest*
6864   ol_cv_header_linux_threads=yes
6865 else
6866   rm -rf conftest*
6867   ol_cv_header_linux_threads=no
6868 fi
6869 rm -f conftest*
6870
6871                 
6872 fi
6873
6874 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6875         if test $ol_cv_header_linux_threads = yes; then
6876                 cat >> confdefs.h <<\EOF
6877 #define HAVE_LINUX_THREADS 1
6878 EOF
6879
6880         fi
6881
6882
6883         for ac_hdr in mach/cthreads.h
6884 do
6885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6887 echo "configure:6888: checking for $ac_hdr" >&5
6888 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6889   echo $ac_n "(cached) $ac_c" 1>&6
6890 else
6891   cat > conftest.$ac_ext <<EOF
6892 #line 6893 "configure"
6893 #include "confdefs.h"
6894 #include <$ac_hdr>
6895 EOF
6896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6897 { (eval echo configure:6898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6899 if test -z "$ac_err"; then
6900   rm -rf conftest*
6901   eval "ac_cv_header_$ac_safe=yes"
6902 else
6903   echo "$ac_err" >&5
6904   echo "configure: failed program was:" >&5
6905   cat conftest.$ac_ext >&5
6906   rm -rf conftest*
6907   eval "ac_cv_header_$ac_safe=no"
6908 fi
6909 rm -f conftest*
6910 fi
6911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6912   echo "$ac_t""yes" 1>&6
6913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6914   cat >> confdefs.h <<EOF
6915 #define $ac_tr_hdr 1
6916 EOF
6917  
6918 else
6919   echo "$ac_t""no" 1>&6
6920 fi
6921 done
6922
6923         for ac_hdr in lwp/lwp.h
6924 do
6925 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6926 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6927 echo "configure:6928: checking for $ac_hdr" >&5
6928 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6929   echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931   cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934 #include <$ac_hdr>
6935 EOF
6936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6937 { (eval echo configure:6938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6939 if test -z "$ac_err"; then
6940   rm -rf conftest*
6941   eval "ac_cv_header_$ac_safe=yes"
6942 else
6943   echo "$ac_err" >&5
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -rf conftest*
6947   eval "ac_cv_header_$ac_safe=no"
6948 fi
6949 rm -f conftest*
6950 fi
6951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6952   echo "$ac_t""yes" 1>&6
6953     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6954   cat >> confdefs.h <<EOF
6955 #define $ac_tr_hdr 1
6956 EOF
6957  
6958 else
6959   echo "$ac_t""no" 1>&6
6960 fi
6961 done
6962
6963         for ac_hdr in thread.h synch.h
6964 do
6965 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6966 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6967 echo "configure:6968: checking for $ac_hdr" >&5
6968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 #include <$ac_hdr>
6975 EOF
6976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6977 { (eval echo configure:6978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6979 if test -z "$ac_err"; then
6980   rm -rf conftest*
6981   eval "ac_cv_header_$ac_safe=yes"
6982 else
6983   echo "$ac_err" >&5
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   eval "ac_cv_header_$ac_safe=no"
6988 fi
6989 rm -f conftest*
6990 fi
6991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6992   echo "$ac_t""yes" 1>&6
6993     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6994   cat >> confdefs.h <<EOF
6995 #define $ac_tr_hdr 1
6996 EOF
6997  
6998 else
6999   echo "$ac_t""no" 1>&6
7000 fi
7001 done
7002
7003 fi
7004
7005 if test $ol_link_threads != no ; then  
7006                         cat >> confdefs.h <<\EOF
7007 #define REENTRANT 1
7008 EOF
7009
7010         cat >> confdefs.h <<\EOF
7011 #define _REENTRANT 1
7012 EOF
7013
7014         cat >> confdefs.h <<\EOF
7015 #define THREAD_SAFE 1
7016 EOF
7017
7018         cat >> confdefs.h <<\EOF
7019 #define _THREAD_SAFE 1
7020 EOF
7021
7022         cat >> confdefs.h <<\EOF
7023 #define THREADSAFE 1
7024 EOF
7025
7026         cat >> confdefs.h <<\EOF
7027 #define _THREADSAFE 1
7028 EOF
7029
7030
7031                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7032 echo "configure:7033: checking for thread specific errno" >&5
7033 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7034   echo $ac_n "(cached) $ac_c" 1>&6
7035 else
7036   
7037                 cat > conftest.$ac_ext <<EOF
7038 #line 7039 "configure"
7039 #include "confdefs.h"
7040 #include <errno.h>
7041 int main() {
7042 errno = 0;
7043 ; return 0; }
7044 EOF
7045 if { (eval echo configure:7046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7046   rm -rf conftest*
7047   ol_cv_errno_thread_specific=yes
7048 else
7049   echo "configure: failed program was:" >&5
7050   cat conftest.$ac_ext >&5
7051   rm -rf conftest*
7052   ol_cv_errno_thread_specific=no
7053 fi
7054 rm -f conftest*
7055         
7056 fi
7057
7058 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7059
7060         if test $ol_cv_errno_thread_specific != yes ; then
7061                 LIBS="$LTHREAD_LIBS $LIBS"
7062                 LTHREAD_LIBS=""
7063         fi
7064
7065 fi  
7066
7067 if test $ol_link_threads = no ; then
7068         if test $ol_with_threads = yes ; then
7069                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7070         fi
7071
7072         if test $ol_with_threads = auto ; then
7073                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7074                 ol_with_threads=no
7075         fi
7076
7077         cat >> confdefs.h <<\EOF
7078 #define NO_THREADS 1
7079 EOF
7080
7081         LTHREAD_LIBS=""
7082 fi
7083
7084 if test $ol_link_threads != no ; then
7085         cat >> confdefs.h <<\EOF
7086 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7087 EOF
7088
7089 fi
7090
7091
7092 ol_link_ldbm=no 
7093 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7094         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7095 echo "configure:7096: checking for DB2 library" >&5
7096 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099         ol_LIBS="$LIBS"
7100         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7101 echo "configure:7102: checking for db_open in -ldb" >&5
7102 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7104   echo $ac_n "(cached) $ac_c" 1>&6
7105 else
7106   ac_save_LIBS="$LIBS"
7107 LIBS="-ldb  $LIBS"
7108 cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111 /* Override any gcc2 internal prototype to avoid an error.  */
7112 /* We use char because int might match the return type of a gcc2
7113     builtin and then its argument prototype would still apply.  */
7114 char db_open();
7115
7116 int main() {
7117 db_open()
7118 ; return 0; }
7119 EOF
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7121   rm -rf conftest*
7122   eval "ac_cv_lib_$ac_lib_var=yes"
7123 else
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_lib_$ac_lib_var=no"
7128 fi
7129 rm -f conftest*
7130 LIBS="$ac_save_LIBS"
7131
7132 fi
7133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7134   echo "$ac_t""yes" 1>&6
7135   ol_cv_lib_db2=-ldb
7136 else
7137   echo "$ac_t""no" 1>&6
7138 ol_cv_lib_db2=no
7139 fi
7140
7141         LIBS="$ol_LIBS"
7142
7143 fi
7144
7145 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7146
7147 for ac_hdr in db.h
7148 do
7149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7151 echo "configure:7152: checking for $ac_hdr" >&5
7152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   cat > conftest.$ac_ext <<EOF
7156 #line 7157 "configure"
7157 #include "confdefs.h"
7158 #include <$ac_hdr>
7159 EOF
7160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7161 { (eval echo configure:7162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7163 if test -z "$ac_err"; then
7164   rm -rf conftest*
7165   eval "ac_cv_header_$ac_safe=yes"
7166 else
7167   echo "$ac_err" >&5
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -rf conftest*
7171   eval "ac_cv_header_$ac_safe=no"
7172 fi
7173 rm -f conftest*
7174 fi
7175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7178   cat >> confdefs.h <<EOF
7179 #define $ac_tr_hdr 1
7180 EOF
7181  
7182 else
7183   echo "$ac_t""no" 1>&6
7184 fi
7185 done
7186
7187 if test $ac_cv_header_db_h = yes ; then
7188         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7189 echo "configure:7190: checking if db.h is DB2" >&5
7190 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7191   echo $ac_n "(cached) $ac_c" 1>&6
7192 else
7193   
7194                 cat > conftest.$ac_ext <<EOF
7195 #line 7196 "configure"
7196 #include "confdefs.h"
7197
7198 #                       include <db.h>
7199                         /* this check could be improved */
7200 #                       ifdef DB_VERSION_MAJOR
7201 #                               if DB_VERSION_MAJOR == 2
7202                                         __db_version_2
7203 #                               endif
7204 #                       endif
7205                 
7206 EOF
7207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7208   egrep "__db_version_2" >/dev/null 2>&1; then
7209   rm -rf conftest*
7210   ol_cv_header_db2=yes
7211 else
7212   rm -rf conftest*
7213   ol_cv_header_db2=no
7214 fi
7215 rm -f conftest*
7216
7217 fi
7218
7219 echo "$ac_t""$ol_cv_header_db2" 1>&6
7220 else
7221         ol_cv_header_db2=no
7222 fi
7223
7224
7225  
7226  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7227 echo "configure:7228: checking for Berkeley DB2" >&5
7228 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7229   echo $ac_n "(cached) $ac_c" 1>&6
7230 else
7231   
7232         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7233                 ol_cv_berkeley_db2=no
7234         else
7235                 ol_cv_berkeley_db2=yes
7236         fi
7237
7238 fi
7239
7240 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7241  if test $ol_cv_berkeley_db2 = yes ; then
7242         cat >> confdefs.h <<\EOF
7243 #define HAVE_BERKELEY_DB2 1
7244 EOF
7245
7246  fi
7247
7248
7249         if test $ol_cv_berkeley_db2 = yes ; then
7250                 ol_link_ldbm=db2
7251                 ol_with_ldbm_api=db2
7252
7253                 if test $ol_with_ldbm_type = hash ; then
7254                         cat >> confdefs.h <<\EOF
7255 #define LDBM_USE_DBHASH 1
7256 EOF
7257
7258                 else
7259                         cat >> confdefs.h <<\EOF
7260 #define LDBM_USE_DBBTREE 1
7261 EOF
7262
7263                 fi
7264
7265                                                 if test $ol_cv_lib_db2 != yes ; then
7266                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7267                 fi
7268         fi
7269 fi
7270
7271 ol_link_bdb2=no
7272 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7273         ol_link_bdb2=yes
7274 fi
7275
7276 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7277         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7278 echo "configure:7279: checking for Berkeley DB library" >&5
7279 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7280   echo $ac_n "(cached) $ac_c" 1>&6
7281 else
7282         ol_LIBS="$LIBS"
7283         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7284 echo "configure:7285: checking for dbopen" >&5
7285 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7286   echo $ac_n "(cached) $ac_c" 1>&6
7287 else
7288   cat > conftest.$ac_ext <<EOF
7289 #line 7290 "configure"
7290 #include "confdefs.h"
7291 /* System header to define __stub macros and hopefully few prototypes,
7292     which can conflict with char dbopen(); below.  */
7293 #include <assert.h>
7294 /* Override any gcc2 internal prototype to avoid an error.  */
7295 /* We use char because int might match the return type of a gcc2
7296     builtin and then its argument prototype would still apply.  */
7297 char dbopen();
7298
7299 int main() {
7300
7301 /* The GNU C library defines this for functions which it implements
7302     to always fail with ENOSYS.  Some functions are actually named
7303     something starting with __ and the normal name is an alias.  */
7304 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7305 choke me
7306 #else
7307 dbopen();
7308 #endif
7309
7310 ; return 0; }
7311 EOF
7312 if { (eval echo configure:7313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7313   rm -rf conftest*
7314   eval "ac_cv_func_dbopen=yes"
7315 else
7316   echo "configure: failed program was:" >&5
7317   cat conftest.$ac_ext >&5
7318   rm -rf conftest*
7319   eval "ac_cv_func_dbopen=no"
7320 fi
7321 rm -f conftest*
7322 fi
7323
7324 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7325   echo "$ac_t""yes" 1>&6
7326   ol_cv_lib_db=yes
7327 else
7328   echo "$ac_t""no" 1>&6
7329
7330                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7331 echo "configure:7332: checking for dbopen in -ldb" >&5
7332 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7333 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7334   echo $ac_n "(cached) $ac_c" 1>&6
7335 else
7336   ac_save_LIBS="$LIBS"
7337 LIBS="-ldb  $LIBS"
7338 cat > conftest.$ac_ext <<EOF
7339 #line 7340 "configure"
7340 #include "confdefs.h"
7341 /* Override any gcc2 internal prototype to avoid an error.  */
7342 /* We use char because int might match the return type of a gcc2
7343     builtin and then its argument prototype would still apply.  */
7344 char dbopen();
7345
7346 int main() {
7347 dbopen()
7348 ; return 0; }
7349 EOF
7350 if { (eval echo configure:7351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7351   rm -rf conftest*
7352   eval "ac_cv_lib_$ac_lib_var=yes"
7353 else
7354   echo "configure: failed program was:" >&5
7355   cat conftest.$ac_ext >&5
7356   rm -rf conftest*
7357   eval "ac_cv_lib_$ac_lib_var=no"
7358 fi
7359 rm -f conftest*
7360 LIBS="$ac_save_LIBS"
7361
7362 fi
7363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7364   echo "$ac_t""yes" 1>&6
7365   ol_cv_lib_db=-ldb
7366 else
7367   echo "$ac_t""no" 1>&6
7368 ol_cv_lib_db=no
7369 fi
7370
7371         
7372 fi
7373
7374         LIBS="$ol_LIBS"
7375
7376 fi
7377
7378 echo "$ac_t""$ol_cv_lib_db" 1>&6
7379
7380
7381 for ac_hdr in db_185.h
7382 do
7383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7385 echo "configure:7386: checking for $ac_hdr" >&5
7386 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7387   echo $ac_n "(cached) $ac_c" 1>&6
7388 else
7389   cat > conftest.$ac_ext <<EOF
7390 #line 7391 "configure"
7391 #include "confdefs.h"
7392 #include <$ac_hdr>
7393 EOF
7394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7395 { (eval echo configure:7396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7397 if test -z "$ac_err"; then
7398   rm -rf conftest*
7399   eval "ac_cv_header_$ac_safe=yes"
7400 else
7401   echo "$ac_err" >&5
7402   echo "configure: failed program was:" >&5
7403   cat conftest.$ac_ext >&5
7404   rm -rf conftest*
7405   eval "ac_cv_header_$ac_safe=no"
7406 fi
7407 rm -f conftest*
7408 fi
7409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7410   echo "$ac_t""yes" 1>&6
7411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7412   cat >> confdefs.h <<EOF
7413 #define $ac_tr_hdr 1
7414 EOF
7415  
7416 else
7417   echo "$ac_t""no" 1>&6
7418 fi
7419 done
7420
7421 if test "$ol_cv_header_db2" = yes ; then
7422         
7423         ol_cv_header_db=$ac_cv_header_db_185_h
7424 else
7425         ol_cv_header_db=$ac_cv_header_db_h
7426 fi
7427
7428
7429  
7430  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7431 echo "configure:7432: checking for Berkeley DB" >&5
7432 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7433   echo $ac_n "(cached) $ac_c" 1>&6
7434 else
7435   
7436         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7437                 ol_cv_berkeley_db=no
7438         else
7439                 ol_cv_berkeley_db=yes
7440         fi
7441
7442 fi
7443
7444 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
7445  if test $ol_cv_berkeley_db = yes ; then
7446         cat >> confdefs.h <<\EOF
7447 #define HAVE_BERKELEY_DB 1
7448 EOF
7449
7450  fi
7451
7452
7453         if test $ol_cv_berkeley_db = yes ; then
7454                 ol_link_ldbm=db
7455                 ol_with_ldbm_api=db
7456
7457                 if test $ol_with_ldbm_type = hash ; then
7458                         cat >> confdefs.h <<\EOF
7459 #define LDBM_USE_DBHASH 1
7460 EOF
7461
7462                 else
7463                         cat >> confdefs.h <<\EOF
7464 #define LDBM_USE_DBBTREE 1
7465 EOF
7466
7467                 fi
7468
7469                                                 if test $ol_cv_lib_db != yes ; then
7470                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
7471                 fi
7472         fi
7473 fi
7474
7475 if test $ol_with_ldbm_api = manual ; then
7476                 ol_link_ldbm=yes
7477
7478         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
7479
7480         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
7481 do
7482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7484 echo "configure:7485: checking for $ac_hdr" >&5
7485 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7486   echo $ac_n "(cached) $ac_c" 1>&6
7487 else
7488   cat > conftest.$ac_ext <<EOF
7489 #line 7490 "configure"
7490 #include "confdefs.h"
7491 #include <$ac_hdr>
7492 EOF
7493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7494 { (eval echo configure:7495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7496 if test -z "$ac_err"; then
7497   rm -rf conftest*
7498   eval "ac_cv_header_$ac_safe=yes"
7499 else
7500   echo "$ac_err" >&5
7501   echo "configure: failed program was:" >&5
7502   cat conftest.$ac_ext >&5
7503   rm -rf conftest*
7504   eval "ac_cv_header_$ac_safe=no"
7505 fi
7506 rm -f conftest*
7507 fi
7508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7509   echo "$ac_t""yes" 1>&6
7510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7511   cat >> confdefs.h <<EOF
7512 #define $ac_tr_hdr 1
7513 EOF
7514  
7515 else
7516   echo "$ac_t""no" 1>&6
7517 fi
7518 done
7519
7520 fi
7521
7522 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7523         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7524         ol_with_ldbm_api=none
7525 fi
7526
7527 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7528         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7529 echo "configure:7530: checking for MDBM library" >&5
7530 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7531   echo $ac_n "(cached) $ac_c" 1>&6
7532 else
7533         ol_LIBS="$LIBS"
7534         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7535 echo "configure:7536: checking for mdbm_set_chain" >&5
7536 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7537   echo $ac_n "(cached) $ac_c" 1>&6
7538 else
7539   cat > conftest.$ac_ext <<EOF
7540 #line 7541 "configure"
7541 #include "confdefs.h"
7542 /* System header to define __stub macros and hopefully few prototypes,
7543     which can conflict with char mdbm_set_chain(); below.  */
7544 #include <assert.h>
7545 /* Override any gcc2 internal prototype to avoid an error.  */
7546 /* We use char because int might match the return type of a gcc2
7547     builtin and then its argument prototype would still apply.  */
7548 char mdbm_set_chain();
7549
7550 int main() {
7551
7552 /* The GNU C library defines this for functions which it implements
7553     to always fail with ENOSYS.  Some functions are actually named
7554     something starting with __ and the normal name is an alias.  */
7555 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7556 choke me
7557 #else
7558 mdbm_set_chain();
7559 #endif
7560
7561 ; return 0; }
7562 EOF
7563 if { (eval echo configure:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7564   rm -rf conftest*
7565   eval "ac_cv_func_mdbm_set_chain=yes"
7566 else
7567   echo "configure: failed program was:" >&5
7568   cat conftest.$ac_ext >&5
7569   rm -rf conftest*
7570   eval "ac_cv_func_mdbm_set_chain=no"
7571 fi
7572 rm -f conftest*
7573 fi
7574
7575 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7576   echo "$ac_t""yes" 1>&6
7577   ol_cv_lib_mdbm=yes
7578 else
7579   echo "$ac_t""no" 1>&6
7580
7581                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7582 echo "configure:7583: checking for mdbm_set_chain in -lmdbm" >&5
7583 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7585   echo $ac_n "(cached) $ac_c" 1>&6
7586 else
7587   ac_save_LIBS="$LIBS"
7588 LIBS="-lmdbm  $LIBS"
7589 cat > conftest.$ac_ext <<EOF
7590 #line 7591 "configure"
7591 #include "confdefs.h"
7592 /* Override any gcc2 internal prototype to avoid an error.  */
7593 /* We use char because int might match the return type of a gcc2
7594     builtin and then its argument prototype would still apply.  */
7595 char mdbm_set_chain();
7596
7597 int main() {
7598 mdbm_set_chain()
7599 ; return 0; }
7600 EOF
7601 if { (eval echo configure:7602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7602   rm -rf conftest*
7603   eval "ac_cv_lib_$ac_lib_var=yes"
7604 else
7605   echo "configure: failed program was:" >&5
7606   cat conftest.$ac_ext >&5
7607   rm -rf conftest*
7608   eval "ac_cv_lib_$ac_lib_var=no"
7609 fi
7610 rm -f conftest*
7611 LIBS="$ac_save_LIBS"
7612
7613 fi
7614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7615   echo "$ac_t""yes" 1>&6
7616   ol_cv_lib_mdbm=-lmdbm
7617 else
7618   echo "$ac_t""no" 1>&6
7619 ol_cv_lib_mdbm=no
7620 fi
7621
7622         
7623 fi
7624
7625         LIBS="$ol_LIBS"
7626
7627 fi
7628
7629 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7630
7631
7632  for ac_hdr in mdbm.h
7633 do
7634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7636 echo "configure:7637: checking for $ac_hdr" >&5
7637 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7638   echo $ac_n "(cached) $ac_c" 1>&6
7639 else
7640   cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 #include <$ac_hdr>
7644 EOF
7645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7646 { (eval echo configure:7647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7648 if test -z "$ac_err"; then
7649   rm -rf conftest*
7650   eval "ac_cv_header_$ac_safe=yes"
7651 else
7652   echo "$ac_err" >&5
7653   echo "configure: failed program was:" >&5
7654   cat conftest.$ac_ext >&5
7655   rm -rf conftest*
7656   eval "ac_cv_header_$ac_safe=no"
7657 fi
7658 rm -f conftest*
7659 fi
7660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7661   echo "$ac_t""yes" 1>&6
7662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7663   cat >> confdefs.h <<EOF
7664 #define $ac_tr_hdr 1
7665 EOF
7666  
7667 else
7668   echo "$ac_t""no" 1>&6
7669 fi
7670 done
7671
7672  echo $ac_n "checking for db""... $ac_c" 1>&6
7673 echo "configure:7674: checking for db" >&5
7674 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7675   echo $ac_n "(cached) $ac_c" 1>&6
7676 else
7677   
7678         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7679                 ol_cv_mdbm=no
7680         else
7681                 ol_cv_mdbm=yes
7682         fi
7683
7684 fi
7685
7686 echo "$ac_t""$ol_cv_mdbm" 1>&6
7687  if test $ol_cv_mdbm = yes ; then
7688         cat >> confdefs.h <<\EOF
7689 #define HAVE_MDBM 1
7690 EOF
7691
7692  fi
7693
7694
7695         if test $ol_cv_mdbm = yes ; then
7696                 ol_link_ldbm=mdbm
7697                 ol_with_ldbm_api=mdbm
7698                 if test $ol_cv_lib_mdbm != yes ; then
7699                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7700                 fi
7701         fi
7702 fi
7703
7704 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7705         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7706 echo "configure:7707: checking for GDBM library" >&5
7707 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7708   echo $ac_n "(cached) $ac_c" 1>&6
7709 else
7710         ol_LIBS="$LIBS"
7711         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7712 echo "configure:7713: checking for gdbm_open" >&5
7713 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7714   echo $ac_n "(cached) $ac_c" 1>&6
7715 else
7716   cat > conftest.$ac_ext <<EOF
7717 #line 7718 "configure"
7718 #include "confdefs.h"
7719 /* System header to define __stub macros and hopefully few prototypes,
7720     which can conflict with char gdbm_open(); below.  */
7721 #include <assert.h>
7722 /* Override any gcc2 internal prototype to avoid an error.  */
7723 /* We use char because int might match the return type of a gcc2
7724     builtin and then its argument prototype would still apply.  */
7725 char gdbm_open();
7726
7727 int main() {
7728
7729 /* The GNU C library defines this for functions which it implements
7730     to always fail with ENOSYS.  Some functions are actually named
7731     something starting with __ and the normal name is an alias.  */
7732 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7733 choke me
7734 #else
7735 gdbm_open();
7736 #endif
7737
7738 ; return 0; }
7739 EOF
7740 if { (eval echo configure:7741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7741   rm -rf conftest*
7742   eval "ac_cv_func_gdbm_open=yes"
7743 else
7744   echo "configure: failed program was:" >&5
7745   cat conftest.$ac_ext >&5
7746   rm -rf conftest*
7747   eval "ac_cv_func_gdbm_open=no"
7748 fi
7749 rm -f conftest*
7750 fi
7751
7752 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7753   echo "$ac_t""yes" 1>&6
7754   ol_cv_lib_gdbm=yes
7755 else
7756   echo "$ac_t""no" 1>&6
7757
7758                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7759 echo "configure:7760: checking for gdbm_open in -lgdbm" >&5
7760 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7762   echo $ac_n "(cached) $ac_c" 1>&6
7763 else
7764   ac_save_LIBS="$LIBS"
7765 LIBS="-lgdbm  $LIBS"
7766 cat > conftest.$ac_ext <<EOF
7767 #line 7768 "configure"
7768 #include "confdefs.h"
7769 /* Override any gcc2 internal prototype to avoid an error.  */
7770 /* We use char because int might match the return type of a gcc2
7771     builtin and then its argument prototype would still apply.  */
7772 char gdbm_open();
7773
7774 int main() {
7775 gdbm_open()
7776 ; return 0; }
7777 EOF
7778 if { (eval echo configure:7779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7779   rm -rf conftest*
7780   eval "ac_cv_lib_$ac_lib_var=yes"
7781 else
7782   echo "configure: failed program was:" >&5
7783   cat conftest.$ac_ext >&5
7784   rm -rf conftest*
7785   eval "ac_cv_lib_$ac_lib_var=no"
7786 fi
7787 rm -f conftest*
7788 LIBS="$ac_save_LIBS"
7789
7790 fi
7791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7792   echo "$ac_t""yes" 1>&6
7793   ol_cv_lib_gdbm=-lgdbm
7794 else
7795   echo "$ac_t""no" 1>&6
7796 ol_cv_lib_gdbm=no
7797 fi
7798
7799         
7800 fi
7801
7802         LIBS="$ol_LIBS"
7803
7804 fi
7805
7806 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7807
7808
7809  for ac_hdr in gdbm.h
7810 do
7811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7813 echo "configure:7814: checking for $ac_hdr" >&5
7814 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7815   echo $ac_n "(cached) $ac_c" 1>&6
7816 else
7817   cat > conftest.$ac_ext <<EOF
7818 #line 7819 "configure"
7819 #include "confdefs.h"
7820 #include <$ac_hdr>
7821 EOF
7822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7823 { (eval echo configure:7824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7825 if test -z "$ac_err"; then
7826   rm -rf conftest*
7827   eval "ac_cv_header_$ac_safe=yes"
7828 else
7829   echo "$ac_err" >&5
7830   echo "configure: failed program was:" >&5
7831   cat conftest.$ac_ext >&5
7832   rm -rf conftest*
7833   eval "ac_cv_header_$ac_safe=no"
7834 fi
7835 rm -f conftest*
7836 fi
7837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7838   echo "$ac_t""yes" 1>&6
7839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7840   cat >> confdefs.h <<EOF
7841 #define $ac_tr_hdr 1
7842 EOF
7843  
7844 else
7845   echo "$ac_t""no" 1>&6
7846 fi
7847 done
7848
7849  echo $ac_n "checking for db""... $ac_c" 1>&6
7850 echo "configure:7851: checking for db" >&5
7851 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   
7855         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7856                 ol_cv_gdbm=no
7857         else
7858                 ol_cv_gdbm=yes
7859         fi
7860
7861 fi
7862
7863 echo "$ac_t""$ol_cv_gdbm" 1>&6
7864  if test $ol_cv_gdbm = yes ; then
7865         cat >> confdefs.h <<\EOF
7866 #define HAVE_GDBM 1
7867 EOF
7868
7869  fi
7870
7871
7872         if test $ol_cv_gdbm = yes ; then
7873                 ol_link_ldbm=gdbm
7874                 ol_with_ldbm_api=gdbm
7875
7876                 if test $ol_cv_lib_gdbm != yes ; then
7877                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7878                 fi
7879         fi
7880 fi
7881
7882 if test $ol_with_ldbm_api = auto ; then
7883         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7884 elif test $ol_with_ldbm_api = ndbm ; then
7885         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7886 echo "configure:7887: checking for NDBM library" >&5
7887 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890         ol_LIBS="$LIBS"
7891         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7892 echo "configure:7893: checking for dbm_open" >&5
7893 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   cat > conftest.$ac_ext <<EOF
7897 #line 7898 "configure"
7898 #include "confdefs.h"
7899 /* System header to define __stub macros and hopefully few prototypes,
7900     which can conflict with char dbm_open(); below.  */
7901 #include <assert.h>
7902 /* Override any gcc2 internal prototype to avoid an error.  */
7903 /* We use char because int might match the return type of a gcc2
7904     builtin and then its argument prototype would still apply.  */
7905 char dbm_open();
7906
7907 int main() {
7908
7909 /* The GNU C library defines this for functions which it implements
7910     to always fail with ENOSYS.  Some functions are actually named
7911     something starting with __ and the normal name is an alias.  */
7912 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7913 choke me
7914 #else
7915 dbm_open();
7916 #endif
7917
7918 ; return 0; }
7919 EOF
7920 if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7921   rm -rf conftest*
7922   eval "ac_cv_func_dbm_open=yes"
7923 else
7924   echo "configure: failed program was:" >&5
7925   cat conftest.$ac_ext >&5
7926   rm -rf conftest*
7927   eval "ac_cv_func_dbm_open=no"
7928 fi
7929 rm -f conftest*
7930 fi
7931
7932 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7933   echo "$ac_t""yes" 1>&6
7934   ol_cv_lib_ndbm=yes
7935 else
7936   echo "$ac_t""no" 1>&6
7937
7938                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7939 echo "configure:7940: checking for dbm_open in -lndbm" >&5
7940 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7942   echo $ac_n "(cached) $ac_c" 1>&6
7943 else
7944   ac_save_LIBS="$LIBS"
7945 LIBS="-lndbm  $LIBS"
7946 cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949 /* Override any gcc2 internal prototype to avoid an error.  */
7950 /* We use char because int might match the return type of a gcc2
7951     builtin and then its argument prototype would still apply.  */
7952 char dbm_open();
7953
7954 int main() {
7955 dbm_open()
7956 ; return 0; }
7957 EOF
7958 if { (eval echo configure:7959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7959   rm -rf conftest*
7960   eval "ac_cv_lib_$ac_lib_var=yes"
7961 else
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -rf conftest*
7965   eval "ac_cv_lib_$ac_lib_var=no"
7966 fi
7967 rm -f conftest*
7968 LIBS="$ac_save_LIBS"
7969
7970 fi
7971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7972   echo "$ac_t""yes" 1>&6
7973   ol_cv_lib_ndbm=-lndbm
7974 else
7975   echo "$ac_t""no" 1>&6
7976
7977                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7978 echo "configure:7979: checking for dbm_open in -ldbm" >&5
7979 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7980 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7981   echo $ac_n "(cached) $ac_c" 1>&6
7982 else
7983   ac_save_LIBS="$LIBS"
7984 LIBS="-ldbm  $LIBS"
7985 cat > conftest.$ac_ext <<EOF
7986 #line 7987 "configure"
7987 #include "confdefs.h"
7988 /* Override any gcc2 internal prototype to avoid an error.  */
7989 /* We use char because int might match the return type of a gcc2
7990     builtin and then its argument prototype would still apply.  */
7991 char dbm_open();
7992
7993 int main() {
7994 dbm_open()
7995 ; return 0; }
7996 EOF
7997 if { (eval echo configure:7998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7998   rm -rf conftest*
7999   eval "ac_cv_lib_$ac_lib_var=yes"
8000 else
8001   echo "configure: failed program was:" >&5
8002   cat conftest.$ac_ext >&5
8003   rm -rf conftest*
8004   eval "ac_cv_lib_$ac_lib_var=no"
8005 fi
8006 rm -f conftest*
8007 LIBS="$ac_save_LIBS"
8008
8009 fi
8010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8011   echo "$ac_t""yes" 1>&6
8012   ol_cv_lib_ndbm=-ldbm
8013 else
8014   echo "$ac_t""no" 1>&6
8015 ol_cv_lib_ndbm=no
8016 fi
8017                 
8018 fi
8019
8020         
8021 fi
8022
8023         LIBS="$ol_LIBS"
8024
8025 fi
8026
8027 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8028
8029
8030  for ac_hdr in ndbm.h
8031 do
8032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8034 echo "configure:8035: checking for $ac_hdr" >&5
8035 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8036   echo $ac_n "(cached) $ac_c" 1>&6
8037 else
8038   cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 #include <$ac_hdr>
8042 EOF
8043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8044 { (eval echo configure:8045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8046 if test -z "$ac_err"; then
8047   rm -rf conftest*
8048   eval "ac_cv_header_$ac_safe=yes"
8049 else
8050   echo "$ac_err" >&5
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -rf conftest*
8054   eval "ac_cv_header_$ac_safe=no"
8055 fi
8056 rm -f conftest*
8057 fi
8058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8059   echo "$ac_t""yes" 1>&6
8060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8061   cat >> confdefs.h <<EOF
8062 #define $ac_tr_hdr 1
8063 EOF
8064  
8065 else
8066   echo "$ac_t""no" 1>&6
8067 fi
8068 done
8069
8070  echo $ac_n "checking for db""... $ac_c" 1>&6
8071 echo "configure:8072: checking for db" >&5
8072 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8073   echo $ac_n "(cached) $ac_c" 1>&6
8074 else
8075   
8076         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8077                 ol_cv_ndbm=no
8078         else
8079                 ol_cv_ndbm=yes
8080         fi
8081
8082 fi
8083
8084 echo "$ac_t""$ol_cv_ndbm" 1>&6
8085  if test $ol_cv_ndbm = yes ; then
8086         cat >> confdefs.h <<\EOF
8087 #define HAVE_NDBM 1
8088 EOF
8089
8090  fi
8091
8092
8093         if test $ol_cv_ndbm = yes ; then
8094                 ol_link_ldbm=ndbm
8095                 ol_with_ldbm_api=ndbm
8096
8097                 if test $ol_cv_lib_ndbm != yes ; then
8098                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8099                 fi
8100         fi
8101 fi
8102
8103 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8104         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8105         if test $ol_enable_ldbm = yes ; then
8106                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8107         fi
8108
8109         echo "configure: warning: disabling LDBM" 1>&2
8110         ol_enable_ldbm=no
8111 fi
8112
8113 if test $ol_enable_wrappers != no ; then
8114         for ac_hdr in tcpd.h
8115 do
8116 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8117 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8118 echo "configure:8119: checking for $ac_hdr" >&5
8119 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8120   echo $ac_n "(cached) $ac_c" 1>&6
8121 else
8122   cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125 #include <$ac_hdr>
8126 EOF
8127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8128 { (eval echo configure:8129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8130 if test -z "$ac_err"; then
8131   rm -rf conftest*
8132   eval "ac_cv_header_$ac_safe=yes"
8133 else
8134   echo "$ac_err" >&5
8135   echo "configure: failed program was:" >&5
8136   cat conftest.$ac_ext >&5
8137   rm -rf conftest*
8138   eval "ac_cv_header_$ac_safe=no"
8139 fi
8140 rm -f conftest*
8141 fi
8142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8143   echo "$ac_t""yes" 1>&6
8144     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8145   cat >> confdefs.h <<EOF
8146 #define $ac_tr_hdr 1
8147 EOF
8148  
8149 else
8150   echo "$ac_t""no" 1>&6
8151 fi
8152 done
8153
8154
8155         if test $ac_cv_header_tcpd_h != yes ; then
8156                 have_wrappers=no
8157         else
8158                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8159 echo "configure:8160: checking for main in -lwrap" >&5
8160 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8162   echo $ac_n "(cached) $ac_c" 1>&6
8163 else
8164   ac_save_LIBS="$LIBS"
8165 LIBS="-lwrap  $LIBS"
8166 cat > conftest.$ac_ext <<EOF
8167 #line 8168 "configure"
8168 #include "confdefs.h"
8169
8170 int main() {
8171 main()
8172 ; return 0; }
8173 EOF
8174 if { (eval echo configure:8175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8175   rm -rf conftest*
8176   eval "ac_cv_lib_$ac_lib_var=yes"
8177 else
8178   echo "configure: failed program was:" >&5
8179   cat conftest.$ac_ext >&5
8180   rm -rf conftest*
8181   eval "ac_cv_lib_$ac_lib_var=no"
8182 fi
8183 rm -f conftest*
8184 LIBS="$ac_save_LIBS"
8185
8186 fi
8187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8188   echo "$ac_t""yes" 1>&6
8189   have_wrappers=yes
8190 else
8191   echo "$ac_t""no" 1>&6
8192 have_wrappers=no
8193 fi
8194
8195         fi
8196
8197         if test $have_wrappers = yes ; then
8198                 cat >> confdefs.h <<\EOF
8199 #define HAVE_TCPD 1
8200 EOF
8201
8202                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8203         else
8204                 echo "configure: warning: could not find -lwrap" 1>&2
8205                 if test $ol_enable_wrappers = yes ; then
8206                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8207                 fi
8208
8209                 echo "configure: warning: disabling wrappers support" 1>&2
8210                 ol_enable_wrappers=no
8211         fi
8212 fi
8213
8214 if test $ol_enable_syslog != no ; then
8215         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8216 echo "configure:8217: checking for openlog" >&5
8217 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8218   echo $ac_n "(cached) $ac_c" 1>&6
8219 else
8220   cat > conftest.$ac_ext <<EOF
8221 #line 8222 "configure"
8222 #include "confdefs.h"
8223 /* System header to define __stub macros and hopefully few prototypes,
8224     which can conflict with char openlog(); below.  */
8225 #include <assert.h>
8226 /* Override any gcc2 internal prototype to avoid an error.  */
8227 /* We use char because int might match the return type of a gcc2
8228     builtin and then its argument prototype would still apply.  */
8229 char openlog();
8230
8231 int main() {
8232
8233 /* The GNU C library defines this for functions which it implements
8234     to always fail with ENOSYS.  Some functions are actually named
8235     something starting with __ and the normal name is an alias.  */
8236 #if defined (__stub_openlog) || defined (__stub___openlog)
8237 choke me
8238 #else
8239 openlog();
8240 #endif
8241
8242 ; return 0; }
8243 EOF
8244 if { (eval echo configure:8245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8245   rm -rf conftest*
8246   eval "ac_cv_func_openlog=yes"
8247 else
8248   echo "configure: failed program was:" >&5
8249   cat conftest.$ac_ext >&5
8250   rm -rf conftest*
8251   eval "ac_cv_func_openlog=no"
8252 fi
8253 rm -f conftest*
8254 fi
8255
8256 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8257   echo "$ac_t""yes" 1>&6
8258   :
8259 else
8260   echo "$ac_t""no" 1>&6
8261 fi
8262
8263         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8264                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8265         fi
8266         ol_enable_syslog=$ac_cv_func_openlog
8267 fi
8268
8269 if test $ol_enable_dmalloc != no ; then
8270         for ac_hdr in dmalloc.h
8271 do
8272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8274 echo "configure:8275: checking for $ac_hdr" >&5
8275 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8276   echo $ac_n "(cached) $ac_c" 1>&6
8277 else
8278   cat > conftest.$ac_ext <<EOF
8279 #line 8280 "configure"
8280 #include "confdefs.h"
8281 #include <$ac_hdr>
8282 EOF
8283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8284 { (eval echo configure:8285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8286 if test -z "$ac_err"; then
8287   rm -rf conftest*
8288   eval "ac_cv_header_$ac_safe=yes"
8289 else
8290   echo "$ac_err" >&5
8291   echo "configure: failed program was:" >&5
8292   cat conftest.$ac_ext >&5
8293   rm -rf conftest*
8294   eval "ac_cv_header_$ac_safe=no"
8295 fi
8296 rm -f conftest*
8297 fi
8298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8299   echo "$ac_t""yes" 1>&6
8300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8301   cat >> confdefs.h <<EOF
8302 #define $ac_tr_hdr 1
8303 EOF
8304  
8305 else
8306   echo "$ac_t""no" 1>&6
8307 fi
8308 done
8309
8310         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8311 echo "configure:8312: checking for dmalloc_shutdown in -ldmalloc" >&5
8312 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8313 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8314   echo $ac_n "(cached) $ac_c" 1>&6
8315 else
8316   ac_save_LIBS="$LIBS"
8317 LIBS="-ldmalloc  $LIBS"
8318 cat > conftest.$ac_ext <<EOF
8319 #line 8320 "configure"
8320 #include "confdefs.h"
8321 /* Override any gcc2 internal prototype to avoid an error.  */
8322 /* We use char because int might match the return type of a gcc2
8323     builtin and then its argument prototype would still apply.  */
8324 char dmalloc_shutdown();
8325
8326 int main() {
8327 dmalloc_shutdown()
8328 ; return 0; }
8329 EOF
8330 if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8331   rm -rf conftest*
8332   eval "ac_cv_lib_$ac_lib_var=yes"
8333 else
8334   echo "configure: failed program was:" >&5
8335   cat conftest.$ac_ext >&5
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=no"
8338 fi
8339 rm -f conftest*
8340 LIBS="$ac_save_LIBS"
8341
8342 fi
8343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8344   echo "$ac_t""yes" 1>&6
8345     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8347   cat >> confdefs.h <<EOF
8348 #define $ac_tr_lib 1
8349 EOF
8350
8351   LIBS="-ldmalloc $LIBS"
8352
8353 else
8354   echo "$ac_t""no" 1>&6
8355 fi
8356
8357 fi
8358
8359 if test $ol_enable_tcl != no ; then
8360         for ac_hdr in tcl.h
8361 do
8362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8364 echo "configure:8365: checking for $ac_hdr" >&5
8365 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8366   echo $ac_n "(cached) $ac_c" 1>&6
8367 else
8368   cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 #include <$ac_hdr>
8372 EOF
8373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8374 { (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8376 if test -z "$ac_err"; then
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=yes"
8379 else
8380   echo "$ac_err" >&5
8381   echo "configure: failed program was:" >&5
8382   cat conftest.$ac_ext >&5
8383   rm -rf conftest*
8384   eval "ac_cv_header_$ac_safe=no"
8385 fi
8386 rm -f conftest*
8387 fi
8388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8391   cat >> confdefs.h <<EOF
8392 #define $ac_tr_hdr 1
8393 EOF
8394  
8395 else
8396   echo "$ac_t""no" 1>&6
8397 fi
8398 done
8399
8400
8401         if test $ac_cv_header_tcl_h != yes ; then
8402                 have_tcl=no
8403         else
8404                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
8405 echo "configure:8406: checking for main in -ltcl" >&5
8406 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
8407 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8408   echo $ac_n "(cached) $ac_c" 1>&6
8409 else
8410   ac_save_LIBS="$LIBS"
8411 LIBS="-ltcl  $LIBS"
8412 cat > conftest.$ac_ext <<EOF
8413 #line 8414 "configure"
8414 #include "confdefs.h"
8415
8416 int main() {
8417 main()
8418 ; return 0; }
8419 EOF
8420 if { (eval echo configure:8421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8421   rm -rf conftest*
8422   eval "ac_cv_lib_$ac_lib_var=yes"
8423 else
8424   echo "configure: failed program was:" >&5
8425   cat conftest.$ac_ext >&5
8426   rm -rf conftest*
8427   eval "ac_cv_lib_$ac_lib_var=no"
8428 fi
8429 rm -f conftest*
8430 LIBS="$ac_save_LIBS"
8431
8432 fi
8433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8434   echo "$ac_t""yes" 1>&6
8435   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
8436 else
8437   echo "$ac_t""no" 1>&6
8438 have_tcl=no
8439 fi
8440
8441
8442                 if test $have_tcl != yes; then
8443                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
8444 echo "configure:8445: checking for main in -ltcl7.6" >&5
8445 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
8446 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8447   echo $ac_n "(cached) $ac_c" 1>&6
8448 else
8449   ac_save_LIBS="$LIBS"
8450 LIBS="-ltcl7.6  $LIBS"
8451 cat > conftest.$ac_ext <<EOF
8452 #line 8453 "configure"
8453 #include "confdefs.h"
8454
8455 int main() {
8456 main()
8457 ; return 0; }
8458 EOF
8459 if { (eval echo configure:8460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8460   rm -rf conftest*
8461   eval "ac_cv_lib_$ac_lib_var=yes"
8462 else
8463   echo "configure: failed program was:" >&5
8464   cat conftest.$ac_ext >&5
8465   rm -rf conftest*
8466   eval "ac_cv_lib_$ac_lib_var=no"
8467 fi
8468 rm -f conftest*
8469 LIBS="$ac_save_LIBS"
8470
8471 fi
8472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8473   echo "$ac_t""yes" 1>&6
8474   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
8475 else
8476   echo "$ac_t""no" 1>&6
8477 have_tcl=no
8478 fi
8479
8480                 fi
8481
8482                 if test $have_tcl != yes; then
8483                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
8484 echo "configure:8485: checking for main in -ltcl8.0" >&5
8485 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
8486 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8487   echo $ac_n "(cached) $ac_c" 1>&6
8488 else
8489   ac_save_LIBS="$LIBS"
8490 LIBS="-ltcl8.0  $LIBS"
8491 cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494
8495 int main() {
8496 main()
8497 ; return 0; }
8498 EOF
8499 if { (eval echo configure:8500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8500   rm -rf conftest*
8501   eval "ac_cv_lib_$ac_lib_var=yes"
8502 else
8503   echo "configure: failed program was:" >&5
8504   cat conftest.$ac_ext >&5
8505   rm -rf conftest*
8506   eval "ac_cv_lib_$ac_lib_var=no"
8507 fi
8508 rm -f conftest*
8509 LIBS="$ac_save_LIBS"
8510
8511 fi
8512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8513   echo "$ac_t""yes" 1>&6
8514   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8515 else
8516   echo "$ac_t""no" 1>&6
8517 have_tcl=no
8518 fi
8519
8520                 fi
8521         fi
8522
8523         if test $have_tcl != yes ; then
8524                 echo "configure: warning: could not find -ltcl" 1>&2
8525                 if test $ol_enable_tcl = yes ; then
8526                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8527                 fi
8528
8529                 ol_enable_tcl=no
8530         fi
8531 fi
8532
8533 # ud needs termcap (should insert check here)
8534 ol_link_termcap=no
8535 for ac_hdr in termcap.h ncurses.h
8536 do
8537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8539 echo "configure:8540: checking for $ac_hdr" >&5
8540 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8541   echo $ac_n "(cached) $ac_c" 1>&6
8542 else
8543   cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 #include <$ac_hdr>
8547 EOF
8548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8549 { (eval echo configure:8550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8551 if test -z "$ac_err"; then
8552   rm -rf conftest*
8553   eval "ac_cv_header_$ac_safe=yes"
8554 else
8555   echo "$ac_err" >&5
8556   echo "configure: failed program was:" >&5
8557   cat conftest.$ac_ext >&5
8558   rm -rf conftest*
8559   eval "ac_cv_header_$ac_safe=no"
8560 fi
8561 rm -f conftest*
8562 fi
8563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8564   echo "$ac_t""yes" 1>&6
8565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8566   cat >> confdefs.h <<EOF
8567 #define $ac_tr_hdr 1
8568 EOF
8569  
8570 else
8571   echo "$ac_t""no" 1>&6
8572 fi
8573 done
8574
8575
8576 if test $ol_link_termcap = no ; then
8577         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8578 echo "configure:8579: checking for tputs in -ltermcap" >&5
8579 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8581   echo $ac_n "(cached) $ac_c" 1>&6
8582 else
8583   ac_save_LIBS="$LIBS"
8584 LIBS="-ltermcap  $LIBS"
8585 cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 /* Override any gcc2 internal prototype to avoid an error.  */
8589 /* We use char because int might match the return type of a gcc2
8590     builtin and then its argument prototype would still apply.  */
8591 char tputs();
8592
8593 int main() {
8594 tputs()
8595 ; return 0; }
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8598   rm -rf conftest*
8599   eval "ac_cv_lib_$ac_lib_var=yes"
8600 else
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -rf conftest*
8604   eval "ac_cv_lib_$ac_lib_var=no"
8605 fi
8606 rm -f conftest*
8607 LIBS="$ac_save_LIBS"
8608
8609 fi
8610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8611   echo "$ac_t""yes" 1>&6
8612   have_termcap=yes
8613 else
8614   echo "$ac_t""no" 1>&6
8615 have_termcap=no
8616 fi
8617
8618         if test $have_termcap = yes ; then
8619                 cat >> confdefs.h <<\EOF
8620 #define HAVE_TERMCAP 1
8621 EOF
8622
8623                 ol_link_termcap=yes
8624                 TERMCAP_LIBS=-ltermcap
8625         fi
8626 fi
8627
8628 if test $ol_link_termcap = no ; then
8629         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8630 echo "configure:8631: checking for initscr in -lncurses" >&5
8631 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8633   echo $ac_n "(cached) $ac_c" 1>&6
8634 else
8635   ac_save_LIBS="$LIBS"
8636 LIBS="-lncurses  $LIBS"
8637 cat > conftest.$ac_ext <<EOF
8638 #line 8639 "configure"
8639 #include "confdefs.h"
8640 /* Override any gcc2 internal prototype to avoid an error.  */
8641 /* We use char because int might match the return type of a gcc2
8642     builtin and then its argument prototype would still apply.  */
8643 char initscr();
8644
8645 int main() {
8646 initscr()
8647 ; return 0; }
8648 EOF
8649 if { (eval echo configure:8650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8650   rm -rf conftest*
8651   eval "ac_cv_lib_$ac_lib_var=yes"
8652 else
8653   echo "configure: failed program was:" >&5
8654   cat conftest.$ac_ext >&5
8655   rm -rf conftest*
8656   eval "ac_cv_lib_$ac_lib_var=no"
8657 fi
8658 rm -f conftest*
8659 LIBS="$ac_save_LIBS"
8660
8661 fi
8662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8663   echo "$ac_t""yes" 1>&6
8664   have_ncurses=yes
8665 else
8666   echo "$ac_t""no" 1>&6
8667 have_ncurses=no
8668 fi
8669
8670         if test $have_ncurses = yes ; then
8671                 cat >> confdefs.h <<\EOF
8672 #define HAVE_NCURSES 1
8673 EOF
8674
8675                 ol_link_termcap=yes
8676                 TERMCAP_LIBS=-lncurses
8677         fi
8678 fi
8679
8680 if test $ol_link_termcap = no ; then
8681         cat >> confdefs.h <<\EOF
8682 #define NO_TERMCAP 1
8683 EOF
8684
8685         TERMCAP_LIBS=
8686 fi
8687
8688 ol_link_readline=no
8689 if test $ol_with_readline != no ; then
8690         for ac_hdr in readline/readline.h readline/history.h
8691 do
8692 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8693 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8694 echo "configure:8695: checking for $ac_hdr" >&5
8695 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8696   echo $ac_n "(cached) $ac_c" 1>&6
8697 else
8698   cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 #include <$ac_hdr>
8702 EOF
8703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8704 { (eval echo configure:8705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8706 if test -z "$ac_err"; then
8707   rm -rf conftest*
8708   eval "ac_cv_header_$ac_safe=yes"
8709 else
8710   echo "$ac_err" >&5
8711   echo "configure: failed program was:" >&5
8712   cat conftest.$ac_ext >&5
8713   rm -rf conftest*
8714   eval "ac_cv_header_$ac_safe=no"
8715 fi
8716 rm -f conftest*
8717 fi
8718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8719   echo "$ac_t""yes" 1>&6
8720     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8721   cat >> confdefs.h <<EOF
8722 #define $ac_tr_hdr 1
8723 EOF
8724  
8725 else
8726   echo "$ac_t""no" 1>&6
8727 fi
8728 done
8729
8730
8731         if test $ac_cv_header_readline_readline_h = yes ; then
8732                 save_LIBS="$LIBS"
8733                 LIBS="$TERMCAP_LIBS $LIBS"
8734                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8735 echo "configure:8736: checking for readline in -lreadline" >&5
8736 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8737 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   ac_save_LIBS="$LIBS"
8741 LIBS="-lreadline  $LIBS"
8742 cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 /* Override any gcc2 internal prototype to avoid an error.  */
8746 /* We use char because int might match the return type of a gcc2
8747     builtin and then its argument prototype would still apply.  */
8748 char readline();
8749
8750 int main() {
8751 readline()
8752 ; return 0; }
8753 EOF
8754 if { (eval echo configure:8755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8755   rm -rf conftest*
8756   eval "ac_cv_lib_$ac_lib_var=yes"
8757 else
8758   echo "configure: failed program was:" >&5
8759   cat conftest.$ac_ext >&5
8760   rm -rf conftest*
8761   eval "ac_cv_lib_$ac_lib_var=no"
8762 fi
8763 rm -f conftest*
8764 LIBS="$ac_save_LIBS"
8765
8766 fi
8767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8768   echo "$ac_t""yes" 1>&6
8769   have_readline=yes
8770 else
8771   echo "$ac_t""no" 1>&6
8772 have_readline=no
8773 fi
8774
8775                 LIBS="$save_LIBS"
8776                         
8777                 if test $have_readline = yes ; then
8778                         ol_with_readline=found
8779                         ol_link_readline=yes
8780
8781                         READLINE_LIBS="-lreadline"
8782                 fi
8783         fi
8784 fi
8785
8786 if test $ol_link_readline = yes ; then
8787         cat >> confdefs.h <<\EOF
8788 #define HAVE_READLINE 1
8789 EOF
8790
8791 fi
8792
8793
8794 # FreeBSD (and others) have crypt(3) in -lcrypt
8795 if test $ol_enable_crypt != no ; then
8796         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8797 echo "configure:8798: checking for crypt" >&5
8798 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8799   echo $ac_n "(cached) $ac_c" 1>&6
8800 else
8801   cat > conftest.$ac_ext <<EOF
8802 #line 8803 "configure"
8803 #include "confdefs.h"
8804 /* System header to define __stub macros and hopefully few prototypes,
8805     which can conflict with char crypt(); below.  */
8806 #include <assert.h>
8807 /* Override any gcc2 internal prototype to avoid an error.  */
8808 /* We use char because int might match the return type of a gcc2
8809     builtin and then its argument prototype would still apply.  */
8810 char crypt();
8811
8812 int main() {
8813
8814 /* The GNU C library defines this for functions which it implements
8815     to always fail with ENOSYS.  Some functions are actually named
8816     something starting with __ and the normal name is an alias.  */
8817 #if defined (__stub_crypt) || defined (__stub___crypt)
8818 choke me
8819 #else
8820 crypt();
8821 #endif
8822
8823 ; return 0; }
8824 EOF
8825 if { (eval echo configure:8826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8826   rm -rf conftest*
8827   eval "ac_cv_func_crypt=yes"
8828 else
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -rf conftest*
8832   eval "ac_cv_func_crypt=no"
8833 fi
8834 rm -f conftest*
8835 fi
8836
8837 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8838   echo "$ac_t""yes" 1>&6
8839   have_crypt=yes
8840 else
8841   echo "$ac_t""no" 1>&6
8842
8843                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8844 echo "configure:8845: checking for crypt in -lcrypt" >&5
8845 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8846 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8847   echo $ac_n "(cached) $ac_c" 1>&6
8848 else
8849   ac_save_LIBS="$LIBS"
8850 LIBS="-lcrypt  $LIBS"
8851 cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 /* Override any gcc2 internal prototype to avoid an error.  */
8855 /* We use char because int might match the return type of a gcc2
8856     builtin and then its argument prototype would still apply.  */
8857 char crypt();
8858
8859 int main() {
8860 crypt()
8861 ; return 0; }
8862 EOF
8863 if { (eval echo configure:8864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8864   rm -rf conftest*
8865   eval "ac_cv_lib_$ac_lib_var=yes"
8866 else
8867   echo "configure: failed program was:" >&5
8868   cat conftest.$ac_ext >&5
8869   rm -rf conftest*
8870   eval "ac_cv_lib_$ac_lib_var=no"
8871 fi
8872 rm -f conftest*
8873 LIBS="$ac_save_LIBS"
8874
8875 fi
8876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8877   echo "$ac_t""yes" 1>&6
8878   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8879                         have_crypt=yes
8880 else
8881   echo "$ac_t""no" 1>&6
8882 have_crypt=no
8883 fi
8884
8885 fi
8886
8887
8888         if test $have_crypt = yes ; then
8889                 cat >> confdefs.h <<\EOF
8890 #define HAVE_CRYPT 1
8891 EOF
8892
8893         else
8894                 echo "configure: warning: could not find crypt" 1>&2
8895                 if test $ol_enable_crypt = yes ; then
8896                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8897                 fi
8898
8899                 echo "configure: warning: disabling crypt support" 1>&2
8900                 ol_enable_crypt=no
8901         fi
8902 fi
8903
8904 # FreeBSD (and others) have setproctitle(3) in -lutil
8905 if test $ol_enable_proctitle != no ; then
8906         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8907 echo "configure:8908: checking for setproctitle" >&5
8908 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8909   echo $ac_n "(cached) $ac_c" 1>&6
8910 else
8911   cat > conftest.$ac_ext <<EOF
8912 #line 8913 "configure"
8913 #include "confdefs.h"
8914 /* System header to define __stub macros and hopefully few prototypes,
8915     which can conflict with char setproctitle(); below.  */
8916 #include <assert.h>
8917 /* Override any gcc2 internal prototype to avoid an error.  */
8918 /* We use char because int might match the return type of a gcc2
8919     builtin and then its argument prototype would still apply.  */
8920 char setproctitle();
8921
8922 int main() {
8923
8924 /* The GNU C library defines this for functions which it implements
8925     to always fail with ENOSYS.  Some functions are actually named
8926     something starting with __ and the normal name is an alias.  */
8927 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8928 choke me
8929 #else
8930 setproctitle();
8931 #endif
8932
8933 ; return 0; }
8934 EOF
8935 if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8936   rm -rf conftest*
8937   eval "ac_cv_func_setproctitle=yes"
8938 else
8939   echo "configure: failed program was:" >&5
8940   cat conftest.$ac_ext >&5
8941   rm -rf conftest*
8942   eval "ac_cv_func_setproctitle=no"
8943 fi
8944 rm -f conftest*
8945 fi
8946
8947 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8948   echo "$ac_t""yes" 1>&6
8949   have_setproctitle=yes
8950 else
8951   echo "$ac_t""no" 1>&6
8952
8953                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8954 echo "configure:8955: checking for setproctitle in -lutil" >&5
8955 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8957   echo $ac_n "(cached) $ac_c" 1>&6
8958 else
8959   ac_save_LIBS="$LIBS"
8960 LIBS="-lutil  $LIBS"
8961 cat > conftest.$ac_ext <<EOF
8962 #line 8963 "configure"
8963 #include "confdefs.h"
8964 /* Override any gcc2 internal prototype to avoid an error.  */
8965 /* We use char because int might match the return type of a gcc2
8966     builtin and then its argument prototype would still apply.  */
8967 char setproctitle();
8968
8969 int main() {
8970 setproctitle()
8971 ; return 0; }
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8974   rm -rf conftest*
8975   eval "ac_cv_lib_$ac_lib_var=yes"
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -rf conftest*
8980   eval "ac_cv_lib_$ac_lib_var=no"
8981 fi
8982 rm -f conftest*
8983 LIBS="$ac_save_LIBS"
8984
8985 fi
8986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8987   echo "$ac_t""yes" 1>&6
8988   have_setproctitle=yes
8989                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8990 else
8991   echo "$ac_t""no" 1>&6
8992 have_setproctitle=no
8993                         LIBOBJS="$LIBOBJS setproctitle.o"
8994 fi
8995
8996 fi
8997
8998
8999         if test $have_setproctitle = yes ; then
9000                 cat >> confdefs.h <<\EOF
9001 #define HAVE_SETPROCTITLE 1
9002 EOF
9003
9004         fi
9005 fi
9006
9007 # test for EBCDIC
9008 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9009 echo "configure:9010: checking for EBCDIC" >&5
9010 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9011   echo $ac_n "(cached) $ac_c" 1>&6
9012 else
9013   
9014         cat > conftest.$ac_ext <<EOF
9015 #line 9016 "configure"
9016 #include "confdefs.h"
9017
9018 #if !('M' == 0xd4)
9019 #include <__ASCII__/generate_error.h>
9020 #endif
9021
9022 EOF
9023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9024 { (eval echo configure:9025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9026 if test -z "$ac_err"; then
9027   rm -rf conftest*
9028   ol_cv_cpp_ebcdic=yes
9029 else
9030   echo "$ac_err" >&5
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   ol_cv_cpp_ebcdic=no
9035 fi
9036 rm -f conftest*
9037 fi
9038
9039 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9040 if test $ol_cv_cpp_ebcdic = yes ; then
9041         cat >> confdefs.h <<\EOF
9042 #define HAVE_EBCDIC 1
9043 EOF
9044
9045 fi
9046
9047 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9048 echo "configure:9049: checking for ANSI C header files" >&5
9049 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9050   echo $ac_n "(cached) $ac_c" 1>&6
9051 else
9052   cat > conftest.$ac_ext <<EOF
9053 #line 9054 "configure"
9054 #include "confdefs.h"
9055 #include <stdlib.h>
9056 #include <stdarg.h>
9057 #include <string.h>
9058 #include <float.h>
9059 EOF
9060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9061 { (eval echo configure:9062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9063 if test -z "$ac_err"; then
9064   rm -rf conftest*
9065   ol_cv_header_stdc=yes
9066 else
9067   echo "$ac_err" >&5
9068   echo "configure: failed program was:" >&5
9069   cat conftest.$ac_ext >&5
9070   rm -rf conftest*
9071   ol_cv_header_stdc=no
9072 fi
9073 rm -f conftest*
9074
9075 if test $ol_cv_header_stdc = yes; then
9076   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9077 cat > conftest.$ac_ext <<EOF
9078 #line 9079 "configure"
9079 #include "confdefs.h"
9080 #include <string.h>
9081 EOF
9082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9083   egrep "memchr" >/dev/null 2>&1; then
9084   :
9085 else
9086   rm -rf conftest*
9087   ol_cv_header_stdc=no
9088 fi
9089 rm -f conftest*
9090
9091 fi
9092
9093 if test $ol_cv_header_stdc = yes; then
9094   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 #include <stdlib.h>
9099 EOF
9100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9101   egrep "free" >/dev/null 2>&1; then
9102   :
9103 else
9104   rm -rf conftest*
9105   ol_cv_header_stdc=no
9106 fi
9107 rm -f conftest*
9108
9109 fi
9110
9111 if test $ol_cv_header_stdc = yes; then
9112   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9113 if test "$cross_compiling" = yes; then
9114   :
9115 else
9116   cat > conftest.$ac_ext <<EOF
9117 #line 9118 "configure"
9118 #include "confdefs.h"
9119 #include <ctype.h>
9120 #ifndef HAVE_EBCDIC
9121 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9122 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9123 #else
9124 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9125                 || ('j' <= (c) && (c) <= 'r') \
9126                 || ('s' <= (c) && (c) <= 'z'))
9127 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9128 #endif
9129 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9130 int main () { int i; for (i = 0; i < 256; i++)
9131 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9132 exit (0); }
9133
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9136 then
9137   :
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -fr conftest*
9142   ol_cv_header_stdc=no
9143 fi
9144 rm -fr conftest*
9145 fi
9146
9147 fi
9148 fi
9149
9150 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9151 if test $ol_cv_header_stdc = yes; then
9152   cat >> confdefs.h <<\EOF
9153 #define STDC_HEADERS 1
9154 EOF
9155
9156 fi
9157 ac_cv_header_stdc=disable
9158
9159
9160 if test $ol_cv_header_stdc != yes; then
9161         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9162 fi
9163
9164 ac_header_dirent=no
9165 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9166 do
9167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9168 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9169 echo "configure:9170: checking for $ac_hdr that defines DIR" >&5
9170 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9171   echo $ac_n "(cached) $ac_c" 1>&6
9172 else
9173   cat > conftest.$ac_ext <<EOF
9174 #line 9175 "configure"
9175 #include "confdefs.h"
9176 #include <sys/types.h>
9177 #include <$ac_hdr>
9178 int main() {
9179 DIR *dirp = 0;
9180 ; return 0; }
9181 EOF
9182 if { (eval echo configure:9183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9183   rm -rf conftest*
9184   eval "ac_cv_header_dirent_$ac_safe=yes"
9185 else
9186   echo "configure: failed program was:" >&5
9187   cat conftest.$ac_ext >&5
9188   rm -rf conftest*
9189   eval "ac_cv_header_dirent_$ac_safe=no"
9190 fi
9191 rm -f conftest*
9192 fi
9193 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9194   echo "$ac_t""yes" 1>&6
9195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9196   cat >> confdefs.h <<EOF
9197 #define $ac_tr_hdr 1
9198 EOF
9199  ac_header_dirent=$ac_hdr; break
9200 else
9201   echo "$ac_t""no" 1>&6
9202 fi
9203 done
9204 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9205 if test $ac_header_dirent = dirent.h; then
9206 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9207 echo "configure:9208: checking for opendir in -ldir" >&5
9208 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9209 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9210   echo $ac_n "(cached) $ac_c" 1>&6
9211 else
9212   ac_save_LIBS="$LIBS"
9213 LIBS="-ldir  $LIBS"
9214 cat > conftest.$ac_ext <<EOF
9215 #line 9216 "configure"
9216 #include "confdefs.h"
9217 /* Override any gcc2 internal prototype to avoid an error.  */
9218 /* We use char because int might match the return type of a gcc2
9219     builtin and then its argument prototype would still apply.  */
9220 char opendir();
9221
9222 int main() {
9223 opendir()
9224 ; return 0; }
9225 EOF
9226 if { (eval echo configure:9227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9227   rm -rf conftest*
9228   eval "ac_cv_lib_$ac_lib_var=yes"
9229 else
9230   echo "configure: failed program was:" >&5
9231   cat conftest.$ac_ext >&5
9232   rm -rf conftest*
9233   eval "ac_cv_lib_$ac_lib_var=no"
9234 fi
9235 rm -f conftest*
9236 LIBS="$ac_save_LIBS"
9237
9238 fi
9239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9240   echo "$ac_t""yes" 1>&6
9241   LIBS="$LIBS -ldir"
9242 else
9243   echo "$ac_t""no" 1>&6
9244 fi
9245
9246 else
9247 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9248 echo "configure:9249: checking for opendir in -lx" >&5
9249 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9250 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   ac_save_LIBS="$LIBS"
9254 LIBS="-lx  $LIBS"
9255 cat > conftest.$ac_ext <<EOF
9256 #line 9257 "configure"
9257 #include "confdefs.h"
9258 /* Override any gcc2 internal prototype to avoid an error.  */
9259 /* We use char because int might match the return type of a gcc2
9260     builtin and then its argument prototype would still apply.  */
9261 char opendir();
9262
9263 int main() {
9264 opendir()
9265 ; return 0; }
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9268   rm -rf conftest*
9269   eval "ac_cv_lib_$ac_lib_var=yes"
9270 else
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -rf conftest*
9274   eval "ac_cv_lib_$ac_lib_var=no"
9275 fi
9276 rm -f conftest*
9277 LIBS="$ac_save_LIBS"
9278
9279 fi
9280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9281   echo "$ac_t""yes" 1>&6
9282   LIBS="$LIBS -lx"
9283 else
9284   echo "$ac_t""no" 1>&6
9285 fi
9286
9287 fi
9288
9289 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9290 echo "configure:9291: checking for sys/wait.h that is POSIX.1 compatible" >&5
9291 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9292   echo $ac_n "(cached) $ac_c" 1>&6
9293 else
9294   cat > conftest.$ac_ext <<EOF
9295 #line 9296 "configure"
9296 #include "confdefs.h"
9297 #include <sys/types.h>
9298 #include <sys/wait.h>
9299 #ifndef WEXITSTATUS
9300 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9301 #endif
9302 #ifndef WIFEXITED
9303 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9304 #endif
9305 int main() {
9306 int s;
9307 wait (&s);
9308 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9309 ; return 0; }
9310 EOF
9311 if { (eval echo configure:9312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9312   rm -rf conftest*
9313   ac_cv_header_sys_wait_h=yes
9314 else
9315   echo "configure: failed program was:" >&5
9316   cat conftest.$ac_ext >&5
9317   rm -rf conftest*
9318   ac_cv_header_sys_wait_h=no
9319 fi
9320 rm -f conftest*
9321 fi
9322
9323 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9324 if test $ac_cv_header_sys_wait_h = yes; then
9325   cat >> confdefs.h <<\EOF
9326 #define HAVE_SYS_WAIT_H 1
9327 EOF
9328
9329 fi
9330
9331 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9332 echo "configure:9333: checking POSIX termios" >&5
9333 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 #include <sys/types.h>
9340 #include <unistd.h>
9341 #include <termios.h>
9342 int main() {
9343 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9344    tcgetattr(0, 0);
9345 ; return 0; }
9346 EOF
9347 if { (eval echo configure:9348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9348   rm -rf conftest*
9349   am_cv_sys_posix_termios=yes
9350 else
9351   echo "configure: failed program was:" >&5
9352   cat conftest.$ac_ext >&5
9353   rm -rf conftest*
9354   am_cv_sys_posix_termios=no
9355 fi
9356 rm -f conftest*
9357 fi
9358
9359 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9360
9361
9362  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9363 echo "configure:9364: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9364 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9368
9369   gwinsz_in_termios_h=no
9370   if test $am_cv_sys_posix_termios = yes; then
9371     cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374 #include <sys/types.h>
9375 #     include <termios.h>
9376 #     ifdef TIOCGWINSZ
9377         yes
9378 #     endif
9379     
9380 EOF
9381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9382   egrep "yes" >/dev/null 2>&1; then
9383   rm -rf conftest*
9384   gwinsz_in_termios_h=yes
9385 fi
9386 rm -f conftest*
9387
9388   fi
9389
9390   if test $gwinsz_in_termios_h = no; then
9391     cat > conftest.$ac_ext <<EOF
9392 #line 9393 "configure"
9393 #include "confdefs.h"
9394 #include <sys/types.h>
9395 #     include <sys/ioctl.h>
9396 #     ifdef TIOCGWINSZ
9397         yes
9398 #     endif
9399     
9400 EOF
9401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9402   egrep "yes" >/dev/null 2>&1; then
9403   rm -rf conftest*
9404   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9405 fi
9406 rm -f conftest*
9407
9408   fi
9409   
9410 fi
9411
9412 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9413   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9414     cat >> confdefs.h <<\EOF
9415 #define GWINSZ_IN_SYS_IOCTL 1
9416 EOF
9417
9418   fi
9419
9420 if test $am_cv_sys_posix_termios = yes ; then
9421         cat >> confdefs.h <<\EOF
9422 #define HAVE_POSIX_TERMIOS 1
9423 EOF
9424
9425 fi
9426
9427 for ac_hdr in \
9428         arpa/inet.h             \
9429         arpa/nameser.h  \
9430         assert.h                \
9431         crypt.h                 \
9432         errno.h                 \
9433         fcntl.h                 \
9434         filio.h                 \
9435         getopt.h                \
9436         grp.h                   \
9437         libutil.h               \
9438         limits.h                \
9439         locale.h                \
9440         malloc.h                \
9441         memory.h                \
9442         regex.h                 \
9443         psap.h                  \
9444         pwd.h                   \
9445         resolv.h                \
9446         sgtty.h                 \
9447         stdarg.h                \
9448         stddef.h                \
9449         string.h                \
9450         strings.h               \
9451         sysexits.h              \
9452         sys/file.h              \
9453         sys/filio.h             \
9454         sys/errno.h             \
9455         sys/ioctl.h             \
9456         sys/param.h             \
9457         sys/resource.h  \
9458         sys/socket.h    \
9459         sys/syslog.h    \
9460         sys/time.h              \
9461         sys/types.h             \
9462         syslog.h                \
9463         termios.h               \
9464         unistd.h                \
9465
9466 do
9467 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9468 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9469 echo "configure:9470: checking for $ac_hdr" >&5
9470 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9471   echo $ac_n "(cached) $ac_c" 1>&6
9472 else
9473   cat > conftest.$ac_ext <<EOF
9474 #line 9475 "configure"
9475 #include "confdefs.h"
9476 #include <$ac_hdr>
9477 EOF
9478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9479 { (eval echo configure:9480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9481 if test -z "$ac_err"; then
9482   rm -rf conftest*
9483   eval "ac_cv_header_$ac_safe=yes"
9484 else
9485   echo "$ac_err" >&5
9486   echo "configure: failed program was:" >&5
9487   cat conftest.$ac_ext >&5
9488   rm -rf conftest*
9489   eval "ac_cv_header_$ac_safe=no"
9490 fi
9491 rm -f conftest*
9492 fi
9493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9494   echo "$ac_t""yes" 1>&6
9495     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9496   cat >> confdefs.h <<EOF
9497 #define $ac_tr_hdr 1
9498 EOF
9499  
9500 else
9501   echo "$ac_t""no" 1>&6
9502 fi
9503 done
9504
9505
9506 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9507 echo "configure:9508: checking for uid_t in sys/types.h" >&5
9508 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9509   echo $ac_n "(cached) $ac_c" 1>&6
9510 else
9511   cat > conftest.$ac_ext <<EOF
9512 #line 9513 "configure"
9513 #include "confdefs.h"
9514 #include <sys/types.h>
9515 EOF
9516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9517   egrep "uid_t" >/dev/null 2>&1; then
9518   rm -rf conftest*
9519   ac_cv_type_uid_t=yes
9520 else
9521   rm -rf conftest*
9522   ac_cv_type_uid_t=no
9523 fi
9524 rm -f conftest*
9525
9526 fi
9527
9528 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9529 if test $ac_cv_type_uid_t = no; then
9530   cat >> confdefs.h <<\EOF
9531 #define uid_t int
9532 EOF
9533
9534   cat >> confdefs.h <<\EOF
9535 #define gid_t int
9536 EOF
9537
9538 fi
9539
9540 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9541 echo "configure:9542: checking type of array argument to getgroups" >&5
9542 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9543   echo $ac_n "(cached) $ac_c" 1>&6
9544 else
9545   if test "$cross_compiling" = yes; then
9546   ac_cv_type_getgroups=cross
9547 else
9548   cat > conftest.$ac_ext <<EOF
9549 #line 9550 "configure"
9550 #include "confdefs.h"
9551
9552 /* Thanks to Mike Rendell for this test.  */
9553 #include <sys/types.h>
9554 #define NGID 256
9555 #undef MAX
9556 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9557 main()
9558 {
9559   gid_t gidset[NGID];
9560   int i, n;
9561   union { gid_t gval; long lval; }  val;
9562
9563   val.lval = -1;
9564   for (i = 0; i < NGID; i++)
9565     gidset[i] = val.gval;
9566   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9567                  gidset);
9568   /* Exit non-zero if getgroups seems to require an array of ints.  This
9569      happens when gid_t is short but getgroups modifies an array of ints.  */
9570   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9571 }
9572
9573 EOF
9574 if { (eval echo configure:9575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9575 then
9576     ac_cv_type_getgroups=gid_t
9577 else
9578   echo "configure: failed program was:" >&5
9579   cat conftest.$ac_ext >&5
9580   rm -fr conftest*
9581   ac_cv_type_getgroups=int
9582 fi
9583 rm -fr conftest*
9584 fi
9585
9586 if test $ac_cv_type_getgroups = cross; then
9587         cat > conftest.$ac_ext <<EOF
9588 #line 9589 "configure"
9589 #include "confdefs.h"
9590 #include <unistd.h>
9591 EOF
9592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9593   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9594   rm -rf conftest*
9595   ac_cv_type_getgroups=gid_t
9596 else
9597   rm -rf conftest*
9598   ac_cv_type_getgroups=int
9599 fi
9600 rm -f conftest*
9601
9602 fi
9603 fi
9604
9605 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9606 cat >> confdefs.h <<EOF
9607 #define GETGROUPS_T $ac_cv_type_getgroups
9608 EOF
9609
9610  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9611 echo "configure:9612: checking for ANSI C header files" >&5
9612 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9613   echo $ac_n "(cached) $ac_c" 1>&6
9614 else
9615   cat > conftest.$ac_ext <<EOF
9616 #line 9617 "configure"
9617 #include "confdefs.h"
9618 #include <stdlib.h>
9619 #include <stdarg.h>
9620 #include <string.h>
9621 #include <float.h>
9622 EOF
9623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9624 { (eval echo configure:9625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9626 if test -z "$ac_err"; then
9627   rm -rf conftest*
9628   ac_cv_header_stdc=yes
9629 else
9630   echo "$ac_err" >&5
9631   echo "configure: failed program was:" >&5
9632   cat conftest.$ac_ext >&5
9633   rm -rf conftest*
9634   ac_cv_header_stdc=no
9635 fi
9636 rm -f conftest*
9637
9638 if test $ac_cv_header_stdc = yes; then
9639   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9640 cat > conftest.$ac_ext <<EOF
9641 #line 9642 "configure"
9642 #include "confdefs.h"
9643 #include <string.h>
9644 EOF
9645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9646   egrep "memchr" >/dev/null 2>&1; then
9647   :
9648 else
9649   rm -rf conftest*
9650   ac_cv_header_stdc=no
9651 fi
9652 rm -f conftest*
9653
9654 fi
9655
9656 if test $ac_cv_header_stdc = yes; then
9657   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9658 cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 #include <stdlib.h>
9662 EOF
9663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9664   egrep "free" >/dev/null 2>&1; then
9665   :
9666 else
9667   rm -rf conftest*
9668   ac_cv_header_stdc=no
9669 fi
9670 rm -f conftest*
9671
9672 fi
9673
9674 if test $ac_cv_header_stdc = yes; then
9675   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9676 if test "$cross_compiling" = yes; then
9677   :
9678 else
9679   cat > conftest.$ac_ext <<EOF
9680 #line 9681 "configure"
9681 #include "confdefs.h"
9682 #include <ctype.h>
9683 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9684 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9685 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9686 int main () { int i; for (i = 0; i < 256; i++)
9687 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9688 exit (0); }
9689
9690 EOF
9691 if { (eval echo configure:9692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9692 then
9693   :
9694 else
9695   echo "configure: failed program was:" >&5
9696   cat conftest.$ac_ext >&5
9697   rm -fr conftest*
9698   ac_cv_header_stdc=no
9699 fi
9700 rm -fr conftest*
9701 fi
9702
9703 fi
9704 fi
9705
9706 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9707 if test $ac_cv_header_stdc = yes; then
9708   cat >> confdefs.h <<\EOF
9709 #define STDC_HEADERS 1
9710 EOF
9711
9712 fi
9713
9714 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9715 echo "configure:9716: checking for mode_t" >&5
9716 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9717   echo $ac_n "(cached) $ac_c" 1>&6
9718 else
9719   cat > conftest.$ac_ext <<EOF
9720 #line 9721 "configure"
9721 #include "confdefs.h"
9722 #include <sys/types.h>
9723 #if STDC_HEADERS
9724 #include <stdlib.h>
9725 #include <stddef.h>
9726 #endif
9727 EOF
9728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9729   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9730   rm -rf conftest*
9731   ac_cv_type_mode_t=yes
9732 else
9733   rm -rf conftest*
9734   ac_cv_type_mode_t=no
9735 fi
9736 rm -f conftest*
9737
9738 fi
9739 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9740 if test $ac_cv_type_mode_t = no; then
9741   cat >> confdefs.h <<\EOF
9742 #define mode_t int
9743 EOF
9744
9745 fi
9746
9747 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9748 echo "configure:9749: checking for off_t" >&5
9749 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9750   echo $ac_n "(cached) $ac_c" 1>&6
9751 else
9752   cat > conftest.$ac_ext <<EOF
9753 #line 9754 "configure"
9754 #include "confdefs.h"
9755 #include <sys/types.h>
9756 #if STDC_HEADERS
9757 #include <stdlib.h>
9758 #include <stddef.h>
9759 #endif
9760 EOF
9761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9762   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9763   rm -rf conftest*
9764   ac_cv_type_off_t=yes
9765 else
9766   rm -rf conftest*
9767   ac_cv_type_off_t=no
9768 fi
9769 rm -f conftest*
9770
9771 fi
9772 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9773 if test $ac_cv_type_off_t = no; then
9774   cat >> confdefs.h <<\EOF
9775 #define off_t long
9776 EOF
9777
9778 fi
9779
9780 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9781 echo "configure:9782: checking for pid_t" >&5
9782 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9783   echo $ac_n "(cached) $ac_c" 1>&6
9784 else
9785   cat > conftest.$ac_ext <<EOF
9786 #line 9787 "configure"
9787 #include "confdefs.h"
9788 #include <sys/types.h>
9789 #if STDC_HEADERS
9790 #include <stdlib.h>
9791 #include <stddef.h>
9792 #endif
9793 EOF
9794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9795   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9796   rm -rf conftest*
9797   ac_cv_type_pid_t=yes
9798 else
9799   rm -rf conftest*
9800   ac_cv_type_pid_t=no
9801 fi
9802 rm -f conftest*
9803
9804 fi
9805 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9806 if test $ac_cv_type_pid_t = no; then
9807   cat >> confdefs.h <<\EOF
9808 #define pid_t int
9809 EOF
9810
9811 fi
9812
9813 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9814 echo "configure:9815: checking for ptrdiff_t" >&5
9815 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9816   echo $ac_n "(cached) $ac_c" 1>&6
9817 else
9818   cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 #include <stddef.h>
9822 int main() {
9823 ptrdiff_t p
9824 ; return 0; }
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9827   rm -rf conftest*
9828   am_cv_type_ptrdiff_t=yes
9829 else
9830   echo "configure: failed program was:" >&5
9831   cat conftest.$ac_ext >&5
9832   rm -rf conftest*
9833   am_cv_type_ptrdiff_t=no
9834 fi
9835 rm -f conftest*
9836 fi
9837
9838 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9839    if test $am_cv_type_ptrdiff_t = yes; then
9840      cat >> confdefs.h <<\EOF
9841 #define HAVE_PTRDIFF_T 1
9842 EOF
9843
9844    fi
9845
9846 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9847 echo "configure:9848: checking return type of signal handlers" >&5
9848 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9849   echo $ac_n "(cached) $ac_c" 1>&6
9850 else
9851   cat > conftest.$ac_ext <<EOF
9852 #line 9853 "configure"
9853 #include "confdefs.h"
9854 #include <sys/types.h>
9855 #include <signal.h>
9856 #ifdef signal
9857 #undef signal
9858 #endif
9859 #ifdef __cplusplus
9860 extern "C" void (*signal (int, void (*)(int)))(int);
9861 #else
9862 void (*signal ()) ();
9863 #endif
9864
9865 int main() {
9866 int i;
9867 ; return 0; }
9868 EOF
9869 if { (eval echo configure:9870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9870   rm -rf conftest*
9871   ac_cv_type_signal=void
9872 else
9873   echo "configure: failed program was:" >&5
9874   cat conftest.$ac_ext >&5
9875   rm -rf conftest*
9876   ac_cv_type_signal=int
9877 fi
9878 rm -f conftest*
9879 fi
9880
9881 echo "$ac_t""$ac_cv_type_signal" 1>&6
9882 cat >> confdefs.h <<EOF
9883 #define RETSIGTYPE $ac_cv_type_signal
9884 EOF
9885
9886
9887 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9888 echo "configure:9889: checking for sig_atomic_t" >&5
9889 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9890   echo $ac_n "(cached) $ac_c" 1>&6
9891 else
9892   cat > conftest.$ac_ext <<EOF
9893 #line 9894 "configure"
9894 #include "confdefs.h"
9895 #include <signal.h>
9896 int main() {
9897 sig_atomic_t atomic;
9898 ; return 0; }
9899 EOF
9900 if { (eval echo configure:9901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9901   rm -rf conftest*
9902   ol_cv_type_sig_atomic_t=yes
9903 else
9904   echo "configure: failed program was:" >&5
9905   cat conftest.$ac_ext >&5
9906   rm -rf conftest*
9907   ol_cv_type_sig_atomic_t=no
9908 fi
9909 rm -f conftest*
9910 fi
9911
9912 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9913   if test $ol_cv_type_sig_atomic_t = no; then
9914     cat >> confdefs.h <<\EOF
9915 #define sig_atomic_t int
9916 EOF
9917
9918   fi
9919  
9920 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9921 echo "configure:9922: checking for size_t" >&5
9922 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9923   echo $ac_n "(cached) $ac_c" 1>&6
9924 else
9925   cat > conftest.$ac_ext <<EOF
9926 #line 9927 "configure"
9927 #include "confdefs.h"
9928 #include <sys/types.h>
9929 #if STDC_HEADERS
9930 #include <stdlib.h>
9931 #include <stddef.h>
9932 #endif
9933 EOF
9934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9935   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9936   rm -rf conftest*
9937   ac_cv_type_size_t=yes
9938 else
9939   rm -rf conftest*
9940   ac_cv_type_size_t=no
9941 fi
9942 rm -f conftest*
9943
9944 fi
9945 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9946 if test $ac_cv_type_size_t = no; then
9947   cat >> confdefs.h <<\EOF
9948 #define size_t unsigned
9949 EOF
9950
9951 fi
9952
9953 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9954 echo "configure:9955: checking for st_blksize in struct stat" >&5
9955 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9956   echo $ac_n "(cached) $ac_c" 1>&6
9957 else
9958   cat > conftest.$ac_ext <<EOF
9959 #line 9960 "configure"
9960 #include "confdefs.h"
9961 #include <sys/types.h>
9962 #include <sys/stat.h>
9963 int main() {
9964 struct stat s; s.st_blksize;
9965 ; return 0; }
9966 EOF
9967 if { (eval echo configure:9968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9968   rm -rf conftest*
9969   ac_cv_struct_st_blksize=yes
9970 else
9971   echo "configure: failed program was:" >&5
9972   cat conftest.$ac_ext >&5
9973   rm -rf conftest*
9974   ac_cv_struct_st_blksize=no
9975 fi
9976 rm -f conftest*
9977 fi
9978
9979 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9980 if test $ac_cv_struct_st_blksize = yes; then
9981   cat >> confdefs.h <<\EOF
9982 #define HAVE_ST_BLKSIZE 1
9983 EOF
9984
9985 fi
9986
9987 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9988 echo "configure:9989: checking whether time.h and sys/time.h may both be included" >&5
9989 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9990   echo $ac_n "(cached) $ac_c" 1>&6
9991 else
9992   cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995 #include <sys/types.h>
9996 #include <sys/time.h>
9997 #include <time.h>
9998 int main() {
9999 struct tm *tp;
10000 ; return 0; }
10001 EOF
10002 if { (eval echo configure:10003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10003   rm -rf conftest*
10004   ac_cv_header_time=yes
10005 else
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -rf conftest*
10009   ac_cv_header_time=no
10010 fi
10011 rm -f conftest*
10012 fi
10013
10014 echo "$ac_t""$ac_cv_header_time" 1>&6
10015 if test $ac_cv_header_time = yes; then
10016   cat >> confdefs.h <<\EOF
10017 #define TIME_WITH_SYS_TIME 1
10018 EOF
10019
10020 fi
10021
10022 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10023 echo "configure:10024: checking whether struct tm is in sys/time.h or time.h" >&5
10024 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10025   echo $ac_n "(cached) $ac_c" 1>&6
10026 else
10027   cat > conftest.$ac_ext <<EOF
10028 #line 10029 "configure"
10029 #include "confdefs.h"
10030 #include <sys/types.h>
10031 #include <time.h>
10032 int main() {
10033 struct tm *tp; tp->tm_sec;
10034 ; return 0; }
10035 EOF
10036 if { (eval echo configure:10037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10037   rm -rf conftest*
10038   ac_cv_struct_tm=time.h
10039 else
10040   echo "configure: failed program was:" >&5
10041   cat conftest.$ac_ext >&5
10042   rm -rf conftest*
10043   ac_cv_struct_tm=sys/time.h
10044 fi
10045 rm -f conftest*
10046 fi
10047
10048 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10049 if test $ac_cv_struct_tm = sys/time.h; then
10050   cat >> confdefs.h <<\EOF
10051 #define TM_IN_SYS_TIME 1
10052 EOF
10053
10054 fi
10055
10056 # test for pw_gecos in struct passwd
10057 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10058 echo "configure:10059: checking struct passwd for pw_gecos" >&5
10059 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   
10063         cat > conftest.$ac_ext <<EOF
10064 #line 10065 "configure"
10065 #include "confdefs.h"
10066 #include <pwd.h>
10067 int main() {
10068
10069         struct passwd pwd;
10070         pwd.pw_gecos = pwd.pw_name;
10071
10072 ; return 0; }
10073 EOF
10074 if { (eval echo configure:10075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10075   rm -rf conftest*
10076   ol_cv_struct_passwd_pw_gecos=yes
10077 else
10078   echo "configure: failed program was:" >&5
10079   cat conftest.$ac_ext >&5
10080   rm -rf conftest*
10081   ol_cv_struct_passwd_pw_gecos=no
10082 fi
10083 rm -f conftest*
10084 fi
10085
10086 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10087 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10088         cat >> confdefs.h <<\EOF
10089 #define HAVE_PW_GECOS 1
10090 EOF
10091
10092 fi
10093
10094
10095
10096 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10097 echo "configure:10098: checking if toupper() requires islower()" >&5
10098 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10099   echo $ac_n "(cached) $ac_c" 1>&6
10100 else
10101   
10102         if test "$cross_compiling" = yes; then
10103   ol_cv_c_upper_lower=safe
10104 else
10105   cat > conftest.$ac_ext <<EOF
10106 #line 10107 "configure"
10107 #include "confdefs.h"
10108
10109 #include <ctype.h>
10110 main()
10111 {
10112         if ('C' == toupper('C'))
10113                 exit(0);
10114         else
10115                 exit(1);
10116 }
10117 EOF
10118 if { (eval echo configure:10119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10119 then
10120   ol_cv_c_upper_lower=no
10121 else
10122   echo "configure: failed program was:" >&5
10123   cat conftest.$ac_ext >&5
10124   rm -fr conftest*
10125   ol_cv_c_upper_lower=yes
10126 fi
10127 rm -fr conftest*
10128 fi
10129
10130 fi
10131
10132 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10133 if test $ol_cv_c_upper_lower != no ; then
10134         cat >> confdefs.h <<\EOF
10135 #define C_UPPER_LOWER 1
10136 EOF
10137
10138 fi
10139
10140 echo $ac_n "checking for working const""... $ac_c" 1>&6
10141 echo "configure:10142: checking for working const" >&5
10142 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10143   echo $ac_n "(cached) $ac_c" 1>&6
10144 else
10145   cat > conftest.$ac_ext <<EOF
10146 #line 10147 "configure"
10147 #include "confdefs.h"
10148
10149 int main() {
10150
10151 /* Ultrix mips cc rejects this.  */
10152 typedef int charset[2]; const charset x;
10153 /* SunOS 4.1.1 cc rejects this.  */
10154 char const *const *ccp;
10155 char **p;
10156 /* NEC SVR4.0.2 mips cc rejects this.  */
10157 struct point {int x, y;};
10158 static struct point const zero = {0,0};
10159 /* AIX XL C 1.02.0.0 rejects this.
10160    It does not let you subtract one const X* pointer from another in an arm
10161    of an if-expression whose if-part is not a constant expression */
10162 const char *g = "string";
10163 ccp = &g + (g ? g-g : 0);
10164 /* HPUX 7.0 cc rejects these. */
10165 ++ccp;
10166 p = (char**) ccp;
10167 ccp = (char const *const *) p;
10168 { /* SCO 3.2v4 cc rejects this.  */
10169   char *t;
10170   char const *s = 0 ? (char *) 0 : (char const *) 0;
10171
10172   *t++ = 0;
10173 }
10174 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10175   int x[] = {25, 17};
10176   const int *foo = &x[0];
10177   ++foo;
10178 }
10179 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10180   typedef const int *iptr;
10181   iptr p = 0;
10182   ++p;
10183 }
10184 { /* AIX XL C 1.02.0.0 rejects this saying
10185      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10186   struct s { int j; const int *ap[3]; };
10187   struct s *b; b->j = 5;
10188 }
10189 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10190   const int foo = 10;
10191 }
10192
10193 ; return 0; }
10194 EOF
10195 if { (eval echo configure:10196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10196   rm -rf conftest*
10197   ac_cv_c_const=yes
10198 else
10199   echo "configure: failed program was:" >&5
10200   cat conftest.$ac_ext >&5
10201   rm -rf conftest*
10202   ac_cv_c_const=no
10203 fi
10204 rm -f conftest*
10205 fi
10206
10207 echo "$ac_t""$ac_cv_c_const" 1>&6
10208 if test $ac_cv_c_const = no; then
10209   cat >> confdefs.h <<\EOF
10210 #define const 
10211 EOF
10212
10213 fi
10214
10215 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10216 echo "configure:10217: checking if compiler understands volatile" >&5
10217 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10218   echo $ac_n "(cached) $ac_c" 1>&6
10219 else
10220   cat > conftest.$ac_ext <<EOF
10221 #line 10222 "configure"
10222 #include "confdefs.h"
10223 int x, y, z;
10224 int main() {
10225 volatile int a; int * volatile b = x ? &y : &z;
10226       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10227       *b = 0;
10228 ; return 0; }
10229 EOF
10230 if { (eval echo configure:10231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10231   rm -rf conftest*
10232   ol_cv_c_volatile=yes
10233 else
10234   echo "configure: failed program was:" >&5
10235   cat conftest.$ac_ext >&5
10236   rm -rf conftest*
10237   ol_cv_c_volatile=no
10238 fi
10239 rm -f conftest*
10240 fi
10241
10242 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10243   if test $ol_cv_c_volatile = yes; then
10244     : 
10245   else
10246     cat >> confdefs.h <<\EOF
10247 #define volatile 
10248 EOF
10249
10250   fi
10251  
10252
10253 if test $cross_compiling = yes ; then
10254         cat >> confdefs.h <<\EOF
10255 #define CROSS_COMPILING 1
10256 EOF
10257
10258 else
10259         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10260 echo "configure:10261: checking whether byte ordering is bigendian" >&5
10261 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10262   echo $ac_n "(cached) $ac_c" 1>&6
10263 else
10264   ac_cv_c_bigendian=unknown
10265 # See if sys/param.h defines the BYTE_ORDER macro.
10266 cat > conftest.$ac_ext <<EOF
10267 #line 10268 "configure"
10268 #include "confdefs.h"
10269 #include <sys/types.h>
10270 #include <sys/param.h>
10271 int main() {
10272
10273 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10274  bogus endian macros
10275 #endif
10276 ; return 0; }
10277 EOF
10278 if { (eval echo configure:10279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10279   rm -rf conftest*
10280   # It does; now see whether it defined to BIG_ENDIAN or not.
10281 cat > conftest.$ac_ext <<EOF
10282 #line 10283 "configure"
10283 #include "confdefs.h"
10284 #include <sys/types.h>
10285 #include <sys/param.h>
10286 int main() {
10287
10288 #if BYTE_ORDER != BIG_ENDIAN
10289  not big endian
10290 #endif
10291 ; return 0; }
10292 EOF
10293 if { (eval echo configure:10294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10294   rm -rf conftest*
10295   ac_cv_c_bigendian=yes
10296 else
10297   echo "configure: failed program was:" >&5
10298   cat conftest.$ac_ext >&5
10299   rm -rf conftest*
10300   ac_cv_c_bigendian=no
10301 fi
10302 rm -f conftest*
10303 else
10304   echo "configure: failed program was:" >&5
10305   cat conftest.$ac_ext >&5
10306 fi
10307 rm -f conftest*
10308 if test $ac_cv_c_bigendian = unknown; then
10309 if test "$cross_compiling" = yes; then
10310     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10311 else
10312   cat > conftest.$ac_ext <<EOF
10313 #line 10314 "configure"
10314 #include "confdefs.h"
10315 main () {
10316   /* Are we little or big endian?  From Harbison&Steele.  */
10317   union
10318   {
10319     long l;
10320     char c[sizeof (long)];
10321   } u;
10322   u.l = 1;
10323   exit (u.c[sizeof (long) - 1] == 1);
10324 }
10325 EOF
10326 if { (eval echo configure:10327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10327 then
10328   ac_cv_c_bigendian=no
10329 else
10330   echo "configure: failed program was:" >&5
10331   cat conftest.$ac_ext >&5
10332   rm -fr conftest*
10333   ac_cv_c_bigendian=yes
10334 fi
10335 rm -fr conftest*
10336 fi
10337
10338 fi
10339 fi
10340
10341 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10342 if test $ac_cv_c_bigendian = yes; then
10343   cat >> confdefs.h <<\EOF
10344 #define WORDS_BIGENDIAN 1
10345 EOF
10346
10347 fi
10348
10349         echo $ac_n "checking size of short""... $ac_c" 1>&6
10350 echo "configure:10351: checking size of short" >&5
10351 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10352   echo $ac_n "(cached) $ac_c" 1>&6
10353 else
10354   if test "$cross_compiling" = yes; then
10355     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10356 else
10357   cat > conftest.$ac_ext <<EOF
10358 #line 10359 "configure"
10359 #include "confdefs.h"
10360 #include <stdio.h>
10361 main()
10362 {
10363   FILE *f=fopen("conftestval", "w");
10364   if (!f) exit(1);
10365   fprintf(f, "%d\n", sizeof(short));
10366   exit(0);
10367 }
10368 EOF
10369 if { (eval echo configure:10370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10370 then
10371   ac_cv_sizeof_short=`cat conftestval`
10372 else
10373   echo "configure: failed program was:" >&5
10374   cat conftest.$ac_ext >&5
10375   rm -fr conftest*
10376   ac_cv_sizeof_short=0
10377 fi
10378 rm -fr conftest*
10379 fi
10380
10381 fi
10382 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10383 cat >> confdefs.h <<EOF
10384 #define SIZEOF_SHORT $ac_cv_sizeof_short
10385 EOF
10386
10387  
10388         echo $ac_n "checking size of int""... $ac_c" 1>&6
10389 echo "configure:10390: checking size of int" >&5
10390 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393   if test "$cross_compiling" = yes; then
10394     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10395 else
10396   cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399 #include <stdio.h>
10400 main()
10401 {
10402   FILE *f=fopen("conftestval", "w");
10403   if (!f) exit(1);
10404   fprintf(f, "%d\n", sizeof(int));
10405   exit(0);
10406 }
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10409 then
10410   ac_cv_sizeof_int=`cat conftestval`
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -fr conftest*
10415   ac_cv_sizeof_int=0
10416 fi
10417 rm -fr conftest*
10418 fi
10419
10420 fi
10421 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
10422 cat >> confdefs.h <<EOF
10423 #define SIZEOF_INT $ac_cv_sizeof_int
10424 EOF
10425
10426  
10427         echo $ac_n "checking size of long""... $ac_c" 1>&6
10428 echo "configure:10429: checking size of long" >&5
10429 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
10430   echo $ac_n "(cached) $ac_c" 1>&6
10431 else
10432   if test "$cross_compiling" = yes; then
10433     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10434 else
10435   cat > conftest.$ac_ext <<EOF
10436 #line 10437 "configure"
10437 #include "confdefs.h"
10438 #include <stdio.h>
10439 main()
10440 {
10441   FILE *f=fopen("conftestval", "w");
10442   if (!f) exit(1);
10443   fprintf(f, "%d\n", sizeof(long));
10444   exit(0);
10445 }
10446 EOF
10447 if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10448 then
10449   ac_cv_sizeof_long=`cat conftestval`
10450 else
10451   echo "configure: failed program was:" >&5
10452   cat conftest.$ac_ext >&5
10453   rm -fr conftest*
10454   ac_cv_sizeof_long=0
10455 fi
10456 rm -fr conftest*
10457 fi
10458
10459 fi
10460 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
10461 cat >> confdefs.h <<EOF
10462 #define SIZEOF_LONG $ac_cv_sizeof_long
10463 EOF
10464
10465
10466 fi
10467
10468 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
10469 echo "configure:10470: checking for 8-bit clean memcmp" >&5
10470 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
10471   echo $ac_n "(cached) $ac_c" 1>&6
10472 else
10473   if test "$cross_compiling" = yes; then
10474   ac_cv_func_memcmp_clean=no
10475 else
10476   cat > conftest.$ac_ext <<EOF
10477 #line 10478 "configure"
10478 #include "confdefs.h"
10479
10480 main()
10481 {
10482   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10483   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
10484 }
10485
10486 EOF
10487 if { (eval echo configure:10488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10488 then
10489   ac_cv_func_memcmp_clean=yes
10490 else
10491   echo "configure: failed program was:" >&5
10492   cat conftest.$ac_ext >&5
10493   rm -fr conftest*
10494   ac_cv_func_memcmp_clean=no
10495 fi
10496 rm -fr conftest*
10497 fi
10498
10499 fi
10500
10501 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10502 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10503
10504 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10505 echo "configure:10506: checking for strftime" >&5
10506 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10507   echo $ac_n "(cached) $ac_c" 1>&6
10508 else
10509   cat > conftest.$ac_ext <<EOF
10510 #line 10511 "configure"
10511 #include "confdefs.h"
10512 /* System header to define __stub macros and hopefully few prototypes,
10513     which can conflict with char strftime(); below.  */
10514 #include <assert.h>
10515 /* Override any gcc2 internal prototype to avoid an error.  */
10516 /* We use char because int might match the return type of a gcc2
10517     builtin and then its argument prototype would still apply.  */
10518 char strftime();
10519
10520 int main() {
10521
10522 /* The GNU C library defines this for functions which it implements
10523     to always fail with ENOSYS.  Some functions are actually named
10524     something starting with __ and the normal name is an alias.  */
10525 #if defined (__stub_strftime) || defined (__stub___strftime)
10526 choke me
10527 #else
10528 strftime();
10529 #endif
10530
10531 ; return 0; }
10532 EOF
10533 if { (eval echo configure:10534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10534   rm -rf conftest*
10535   eval "ac_cv_func_strftime=yes"
10536 else
10537   echo "configure: failed program was:" >&5
10538   cat conftest.$ac_ext >&5
10539   rm -rf conftest*
10540   eval "ac_cv_func_strftime=no"
10541 fi
10542 rm -f conftest*
10543 fi
10544
10545 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10546   echo "$ac_t""yes" 1>&6
10547   cat >> confdefs.h <<\EOF
10548 #define HAVE_STRFTIME 1
10549 EOF
10550
10551 else
10552   echo "$ac_t""no" 1>&6
10553 # strftime is in -lintl on SCO UNIX.
10554 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10555 echo "configure:10556: checking for strftime in -lintl" >&5
10556 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10557 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10558   echo $ac_n "(cached) $ac_c" 1>&6
10559 else
10560   ac_save_LIBS="$LIBS"
10561 LIBS="-lintl  $LIBS"
10562 cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 /* Override any gcc2 internal prototype to avoid an error.  */
10566 /* We use char because int might match the return type of a gcc2
10567     builtin and then its argument prototype would still apply.  */
10568 char strftime();
10569
10570 int main() {
10571 strftime()
10572 ; return 0; }
10573 EOF
10574 if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10575   rm -rf conftest*
10576   eval "ac_cv_lib_$ac_lib_var=yes"
10577 else
10578   echo "configure: failed program was:" >&5
10579   cat conftest.$ac_ext >&5
10580   rm -rf conftest*
10581   eval "ac_cv_lib_$ac_lib_var=no"
10582 fi
10583 rm -f conftest*
10584 LIBS="$ac_save_LIBS"
10585
10586 fi
10587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10588   echo "$ac_t""yes" 1>&6
10589   cat >> confdefs.h <<\EOF
10590 #define HAVE_STRFTIME 1
10591 EOF
10592
10593 LIBS="-lintl $LIBS"
10594 else
10595   echo "$ac_t""no" 1>&6
10596 fi
10597
10598 fi
10599
10600 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10601 echo "configure:10602: checking for vprintf" >&5
10602 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10603   echo $ac_n "(cached) $ac_c" 1>&6
10604 else
10605   cat > conftest.$ac_ext <<EOF
10606 #line 10607 "configure"
10607 #include "confdefs.h"
10608 /* System header to define __stub macros and hopefully few prototypes,
10609     which can conflict with char vprintf(); below.  */
10610 #include <assert.h>
10611 /* Override any gcc2 internal prototype to avoid an error.  */
10612 /* We use char because int might match the return type of a gcc2
10613     builtin and then its argument prototype would still apply.  */
10614 char vprintf();
10615
10616 int main() {
10617
10618 /* The GNU C library defines this for functions which it implements
10619     to always fail with ENOSYS.  Some functions are actually named
10620     something starting with __ and the normal name is an alias.  */
10621 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10622 choke me
10623 #else
10624 vprintf();
10625 #endif
10626
10627 ; return 0; }
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10630   rm -rf conftest*
10631   eval "ac_cv_func_vprintf=yes"
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_func_vprintf=no"
10637 fi
10638 rm -f conftest*
10639 fi
10640
10641 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643   cat >> confdefs.h <<\EOF
10644 #define HAVE_VPRINTF 1
10645 EOF
10646
10647 else
10648   echo "$ac_t""no" 1>&6
10649 fi
10650
10651 if test "$ac_cv_func_vprintf" != yes; then
10652 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10653 echo "configure:10654: checking for _doprnt" >&5
10654 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   cat > conftest.$ac_ext <<EOF
10658 #line 10659 "configure"
10659 #include "confdefs.h"
10660 /* System header to define __stub macros and hopefully few prototypes,
10661     which can conflict with char _doprnt(); below.  */
10662 #include <assert.h>
10663 /* Override any gcc2 internal prototype to avoid an error.  */
10664 /* We use char because int might match the return type of a gcc2
10665     builtin and then its argument prototype would still apply.  */
10666 char _doprnt();
10667
10668 int main() {
10669
10670 /* The GNU C library defines this for functions which it implements
10671     to always fail with ENOSYS.  Some functions are actually named
10672     something starting with __ and the normal name is an alias.  */
10673 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10674 choke me
10675 #else
10676 _doprnt();
10677 #endif
10678
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10682   rm -rf conftest*
10683   eval "ac_cv_func__doprnt=yes"
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_func__doprnt=no"
10689 fi
10690 rm -f conftest*
10691 fi
10692
10693 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10694   echo "$ac_t""yes" 1>&6
10695   cat >> confdefs.h <<\EOF
10696 #define HAVE_DOPRNT 1
10697 EOF
10698
10699 else
10700   echo "$ac_t""no" 1>&6
10701 fi
10702
10703 fi
10704
10705
10706 if test $ac_cv_func_vprintf = yes ; then
10707                 for ac_func in vsnprintf vsprintf
10708 do
10709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10710 echo "configure:10711: checking for $ac_func" >&5
10711 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10712   echo $ac_n "(cached) $ac_c" 1>&6
10713 else
10714   cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717 /* System header to define __stub macros and hopefully few prototypes,
10718     which can conflict with char $ac_func(); below.  */
10719 #include <assert.h>
10720 /* Override any gcc2 internal prototype to avoid an error.  */
10721 /* We use char because int might match the return type of a gcc2
10722     builtin and then its argument prototype would still apply.  */
10723 char $ac_func();
10724
10725 int main() {
10726
10727 /* The GNU C library defines this for functions which it implements
10728     to always fail with ENOSYS.  Some functions are actually named
10729     something starting with __ and the normal name is an alias.  */
10730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10731 choke me
10732 #else
10733 $ac_func();
10734 #endif
10735
10736 ; return 0; }
10737 EOF
10738 if { (eval echo configure:10739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10739   rm -rf conftest*
10740   eval "ac_cv_func_$ac_func=yes"
10741 else
10742   echo "configure: failed program was:" >&5
10743   cat conftest.$ac_ext >&5
10744   rm -rf conftest*
10745   eval "ac_cv_func_$ac_func=no"
10746 fi
10747 rm -f conftest*
10748 fi
10749
10750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10751   echo "$ac_t""yes" 1>&6
10752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10753   cat >> confdefs.h <<EOF
10754 #define $ac_tr_func 1
10755 EOF
10756  
10757 else
10758   echo "$ac_t""no" 1>&6
10759 fi
10760 done
10761
10762 fi
10763
10764 for ac_func in \
10765         bcopy                   \
10766         endgrent                \
10767         endpwent                \
10768         flock                   \
10769         getdtablesize           \
10770         getgrgid                \
10771         gethostname             \
10772         getpass                 \
10773         getpwuid                \
10774         gettimeofday            \
10775         lockf                   \
10776         memcpy                  \
10777         memmove                 \
10778         mkstemp                 \
10779         recv                    \
10780         recvfrom                \
10781         setpwfile               \
10782         setsid                  \
10783         signal                  \
10784         sigset                  \
10785         snprintf                \
10786         strdup                  \
10787         strerror                \
10788         strpbrk                 \
10789         strrchr                 \
10790         strsep                  \
10791         strstr                  \
10792         strtol                  \
10793         strtoul                 \
10794         strspn                  \
10795         sysconf                 \
10796         waitpid                 \
10797         wait4                   \
10798
10799 do
10800 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10801 echo "configure:10802: checking for $ac_func" >&5
10802 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10803   echo $ac_n "(cached) $ac_c" 1>&6
10804 else
10805   cat > conftest.$ac_ext <<EOF
10806 #line 10807 "configure"
10807 #include "confdefs.h"
10808 /* System header to define __stub macros and hopefully few prototypes,
10809     which can conflict with char $ac_func(); below.  */
10810 #include <assert.h>
10811 /* Override any gcc2 internal prototype to avoid an error.  */
10812 /* We use char because int might match the return type of a gcc2
10813     builtin and then its argument prototype would still apply.  */
10814 char $ac_func();
10815
10816 int main() {
10817
10818 /* The GNU C library defines this for functions which it implements
10819     to always fail with ENOSYS.  Some functions are actually named
10820     something starting with __ and the normal name is an alias.  */
10821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10822 choke me
10823 #else
10824 $ac_func();
10825 #endif
10826
10827 ; return 0; }
10828 EOF
10829 if { (eval echo configure:10830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10830   rm -rf conftest*
10831   eval "ac_cv_func_$ac_func=yes"
10832 else
10833   echo "configure: failed program was:" >&5
10834   cat conftest.$ac_ext >&5
10835   rm -rf conftest*
10836   eval "ac_cv_func_$ac_func=no"
10837 fi
10838 rm -f conftest*
10839 fi
10840
10841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10842   echo "$ac_t""yes" 1>&6
10843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10844   cat >> confdefs.h <<EOF
10845 #define $ac_tr_func 1
10846 EOF
10847  
10848 else
10849   echo "$ac_t""no" 1>&6
10850 fi
10851 done
10852
10853
10854 for ac_func in getopt tempnam
10855 do
10856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10857 echo "configure:10858: checking for $ac_func" >&5
10858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10859   echo $ac_n "(cached) $ac_c" 1>&6
10860 else
10861   cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 /* System header to define __stub macros and hopefully few prototypes,
10865     which can conflict with char $ac_func(); below.  */
10866 #include <assert.h>
10867 /* Override any gcc2 internal prototype to avoid an error.  */
10868 /* We use char because int might match the return type of a gcc2
10869     builtin and then its argument prototype would still apply.  */
10870 char $ac_func();
10871
10872 int main() {
10873
10874 /* The GNU C library defines this for functions which it implements
10875     to always fail with ENOSYS.  Some functions are actually named
10876     something starting with __ and the normal name is an alias.  */
10877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10878 choke me
10879 #else
10880 $ac_func();
10881 #endif
10882
10883 ; return 0; }
10884 EOF
10885 if { (eval echo configure:10886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10886   rm -rf conftest*
10887   eval "ac_cv_func_$ac_func=yes"
10888 else
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -rf conftest*
10892   eval "ac_cv_func_$ac_func=no"
10893 fi
10894 rm -f conftest*
10895 fi
10896
10897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10898   echo "$ac_t""yes" 1>&6
10899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10900   cat >> confdefs.h <<EOF
10901 #define $ac_tr_func 1
10902 EOF
10903  
10904 else
10905   echo "$ac_t""no" 1>&6
10906 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10907 fi
10908 done
10909
10910
10911
10912 # Check Configuration
10913
10914 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10915 echo "configure:10916: checking declaration of sys_errlist" >&5
10916 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10917   echo $ac_n "(cached) $ac_c" 1>&6
10918 else
10919   
10920         cat > conftest.$ac_ext <<EOF
10921 #line 10922 "configure"
10922 #include "confdefs.h"
10923
10924 #include <stdio.h>
10925 #include <sys/types.h>
10926 #include <errno.h> 
10927 int main() {
10928 char *c = (char *) *sys_errlist
10929 ; return 0; }
10930 EOF
10931 if { (eval echo configure:10932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10932   rm -rf conftest*
10933   ol_cv_dcl_sys_errlist=yes
10934 else
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -rf conftest*
10938   ol_cv_dcl_sys_errlist=no
10939 fi
10940 rm -f conftest*
10941 fi
10942
10943 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10944 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10945 if test $ol_cv_dcl_sys_errlist = no ; then
10946         cat >> confdefs.h <<\EOF
10947 #define DECL_SYS_ERRLIST 1
10948 EOF
10949
10950         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10951 echo "configure:10952: checking existence of sys_errlist" >&5
10952         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10953   echo $ac_n "(cached) $ac_c" 1>&6
10954 else
10955   
10956                 cat > conftest.$ac_ext <<EOF
10957 #line 10958 "configure"
10958 #include "confdefs.h"
10959 #include <errno.h>
10960 int main() {
10961 char *c = (char *) *sys_errlist
10962 ; return 0; }
10963 EOF
10964 if { (eval echo configure:10965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10965   rm -rf conftest*
10966   ol_cv_have_sys_errlist=yes
10967 else
10968   echo "configure: failed program was:" >&5
10969   cat conftest.$ac_ext >&5
10970   rm -rf conftest*
10971   ol_cv_have_sys_errlist=no
10972 fi
10973 rm -f conftest*
10974 fi
10975
10976         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10977         if test $ol_cv_have_sys_errlist = yes ; then
10978                 cat >> confdefs.h <<\EOF
10979 #define HAVE_SYS_ERRLIST 1
10980 EOF
10981
10982         fi
10983 fi
10984
10985
10986
10987 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
10988 echo "configure:10989: checking strdup declaration" >&5
10989 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
10990   echo $ac_n "(cached) $ac_c" 1>&6
10991 else
10992   
10993         cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996
10997 #include <string.h> 
10998 int main() {
10999 extern char *strdup();
11000 ; return 0; }
11001 EOF
11002 if { (eval echo configure:11003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11003   rm -rf conftest*
11004   ol_cv_dcl_strdup=yes
11005 else
11006   echo "configure: failed program was:" >&5
11007   cat conftest.$ac_ext >&5
11008   rm -rf conftest*
11009   ol_cv_dcl_strdup=no
11010 fi
11011 rm -f conftest*
11012 fi
11013
11014 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
11015 if test $ol_cv_dcl_strdup = yes ; then
11016         cat >> confdefs.h <<\EOF
11017 #define DECL_STRDUP 1
11018 EOF
11019
11020 fi
11021
11022
11023
11024 if test "$ol_enable_debug" != no ; then
11025         cat >> confdefs.h <<\EOF
11026 #define LDAP_DEBUG 1
11027 EOF
11028
11029 fi
11030 if test "$ol_enable_syslog" = yes ; then
11031         cat >> confdefs.h <<\EOF
11032 #define LDAP_SYSLOG 1
11033 EOF
11034
11035 fi
11036 if test "$ol_enable_libui" = yes ; then
11037         cat >> confdefs.h <<\EOF
11038 #define LDAP_LIBUI 1
11039 EOF
11040
11041 fi
11042 if test "$ol_enable_cache" = no ; then
11043         cat >> confdefs.h <<\EOF
11044 #define LDAP_NOCACHE 1
11045 EOF
11046
11047 fi
11048 if test "$ol_enable_dns" != no ; then
11049         cat >> confdefs.h <<\EOF
11050 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11051 EOF
11052
11053 fi
11054 if test "$ol_enable_proctitle" != no ; then
11055         cat >> confdefs.h <<\EOF
11056 #define LDAP_PROCTITLE 1
11057 EOF
11058
11059 fi
11060 if test "$ol_enable_referrals" != no ; then
11061         cat >> confdefs.h <<\EOF
11062 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11063 EOF
11064
11065 fi
11066 if test "$ol_enable_cldap" != no ; then
11067         cat >> confdefs.h <<\EOF
11068 #define LDAP_CONNECTIONLESS 1
11069 EOF
11070
11071 fi
11072
11073 if test "$ol_enable_aclgroups" != no ; then
11074         cat >> confdefs.h <<\EOF
11075 #define SLAPD_ACLGROUPS 1
11076 EOF
11077
11078 fi
11079 if test "$ol_enable_crypt" != no ; then
11080         cat >> confdefs.h <<\EOF
11081 #define SLAPD_CRYPT 1
11082 EOF
11083
11084 fi
11085 if test "$ol_enable_cleartext" != no ; then
11086         cat >> confdefs.h <<\EOF
11087 #define SLAPD_CLEARTEXT 1
11088 EOF
11089
11090 fi
11091 if test "$ol_enable_phonetic" != no ; then
11092         cat >> confdefs.h <<\EOF
11093 #define SLAPD_PHONETIC 1
11094 EOF
11095
11096 fi
11097 if test "$ol_enable_rlookups" != no ; then
11098         cat >> confdefs.h <<\EOF
11099 #define SLAPD_RLOOKUPS 1
11100 EOF
11101
11102 fi
11103
11104 if test "$ol_link_bdb2" != no ; then
11105         cat >> confdefs.h <<\EOF
11106 #define SLAPD_BDB2 1
11107 EOF
11108
11109         BUILD_SLAPD=yes
11110         BUILD_BDB2=yes
11111 fi
11112
11113 if test "$ol_link_ldbm" != no ; then
11114         cat >> confdefs.h <<\EOF
11115 #define SLAPD_LDBM 1
11116 EOF
11117
11118         BUILD_SLAPD=yes
11119         BUILD_LDBM=yes
11120 fi
11121
11122 if test "$ol_enable_passwd" != no ; then
11123         cat >> confdefs.h <<\EOF
11124 #define SLAPD_PASSWD 1
11125 EOF
11126
11127         BUILD_SLAPD=yes
11128         BUILD_PASSWD=yes
11129 fi
11130
11131 if test "$ol_enable_perl" != no ; then
11132         cat >> confdefs.h <<\EOF
11133 #define SLAPD_PERL 1
11134 EOF
11135
11136         BUILD_SLAPD=yes
11137         BUILD_PERL=yes
11138 fi
11139
11140 if test "$ol_enable_shell" != no ; then
11141         cat >> confdefs.h <<\EOF
11142 #define SLAPD_SHELL 1
11143 EOF
11144
11145         BUILD_SLAPD=yes
11146         BUILD_SHELL=yes
11147 fi
11148
11149 if test "$ol_enable_tcl" != no ; then
11150         cat >> confdefs.h <<\EOF
11151 #define SLAPD_TCL 1
11152 EOF
11153
11154         BUILD_SLAPD=yes
11155         BUILD_TCL=yes
11156 fi
11157
11158 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11159         $BUILD_SLAPD = yes ; then
11160         BUILD_SLURPD=yes
11161 fi
11162
11163 if test "$ol_link_isode" != no ; then
11164         BUILD_LDAPD=yes
11165 fi
11166
11167
11168
11169
11170   
11171   
11172   
11173   
11174   
11175   
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195 trap '' 1 2 15
11196 cat > confcache <<\EOF
11197 # This file is a shell script that caches the results of configure
11198 # tests run on this system so they can be shared between configure
11199 # scripts and configure runs.  It is not useful on other systems.
11200 # If it contains results you don't want to keep, you may remove or edit it.
11201 #
11202 # By default, configure uses ./config.cache as the cache file,
11203 # creating it if it does not exist already.  You can give configure
11204 # the --cache-file=FILE option to use a different cache file; that is
11205 # what configure does when it calls configure scripts in
11206 # subdirectories, so they share the cache.
11207 # Giving --cache-file=/dev/null disables caching, for debugging configure.
11208 # config.status only pays attention to the cache file if you give it the
11209 # --recheck option to rerun configure.
11210 #
11211 EOF
11212 # The following way of writing the cache mishandles newlines in values,
11213 # but we know of no workaround that is simple, portable, and efficient.
11214 # So, don't put newlines in cache variables' values.
11215 # Ultrix sh set writes to stderr and can't be redirected directly,
11216 # and sets the high bit in the cache file unless we assign to the vars.
11217 (set) 2>&1 |
11218   case `(ac_space=' '; set | grep ac_space) 2>&1` in
11219   *ac_space=\ *)
11220     # `set' does not quote correctly, so add quotes (double-quote substitution
11221     # turns \\\\ into \\, and sed turns \\ into \).
11222     sed -n \
11223       -e "s/'/'\\\\''/g" \
11224       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11225     ;;
11226   *)
11227     # `set' quotes correctly as required by POSIX, so do not add quotes.
11228     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11229     ;;
11230   esac >> confcache
11231 if cmp -s $cache_file confcache; then
11232   :
11233 else
11234   if test -w $cache_file; then
11235     echo "updating cache $cache_file"
11236     cat confcache > $cache_file
11237   else
11238     echo "not updating unwritable cache $cache_file"
11239   fi
11240 fi
11241 rm -f confcache
11242
11243 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11244
11245 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11246 # Let make expand exec_prefix.
11247 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11248
11249 # Any assignment to VPATH causes Sun make to only execute
11250 # the first set of double-colon rules, so remove it if not needed.
11251 # If there is a colon in the path, we need to keep it.
11252 if test "x$srcdir" = x.; then
11253   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11254 fi
11255
11256 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11257
11258 DEFS=-DHAVE_CONFIG_H
11259
11260 # Without the "./", some shells look in PATH for config.status.
11261 : ${CONFIG_STATUS=./config.status}
11262
11263 echo creating $CONFIG_STATUS
11264 rm -f $CONFIG_STATUS
11265 cat > $CONFIG_STATUS <<EOF
11266 #! /bin/sh
11267 # Generated automatically by configure.
11268 # Run this file to recreate the current configuration.
11269 # This directory was configured as follows,
11270 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11271 #
11272 # $0 $ac_configure_args
11273 #
11274 # Compiler output produced by configure, useful for debugging
11275 # configure, is in ./config.log if it exists.
11276
11277 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11278 for ac_option
11279 do
11280   case "\$ac_option" in
11281   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11282     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11283     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11284   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11285     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11286     exit 0 ;;
11287   -help | --help | --hel | --he | --h)
11288     echo "\$ac_cs_usage"; exit 0 ;;
11289   *) echo "\$ac_cs_usage"; exit 1 ;;
11290   esac
11291 done
11292
11293 ac_given_srcdir=$srcdir
11294 ac_given_INSTALL="$INSTALL"
11295
11296 trap 'rm -fr `echo "\
11297 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11298 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11299 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11300 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11301 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11302 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11303 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11304 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11305 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11306 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11307 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11308 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11309 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11310 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11311 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11312 include/Makefile:build/top.mk:include/Makefile.in \
11313 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11314 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11315 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11316 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11317 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11318 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11319 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11320 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11321 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11322 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11323 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11324 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11325 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11326 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11327 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11328 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11329 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11330 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11331 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11332 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11333 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11334 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11335 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11336 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11337 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11338  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11339 EOF
11340 cat >> $CONFIG_STATUS <<EOF
11341
11342 # Protect against being on the right side of a sed subst in config.status.
11343 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11344  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11345 $ac_vpsub
11346 $extrasub
11347 s%@SHELL@%$SHELL%g
11348 s%@CFLAGS@%$CFLAGS%g
11349 s%@CPPFLAGS@%$CPPFLAGS%g
11350 s%@CXXFLAGS@%$CXXFLAGS%g
11351 s%@FFLAGS@%$FFLAGS%g
11352 s%@DEFS@%$DEFS%g
11353 s%@LDFLAGS@%$LDFLAGS%g
11354 s%@LIBS@%$LIBS%g
11355 s%@exec_prefix@%$exec_prefix%g
11356 s%@prefix@%$prefix%g
11357 s%@program_transform_name@%$program_transform_name%g
11358 s%@bindir@%$bindir%g
11359 s%@sbindir@%$sbindir%g
11360 s%@libexecdir@%$libexecdir%g
11361 s%@datadir@%$datadir%g
11362 s%@sysconfdir@%$sysconfdir%g
11363 s%@sharedstatedir@%$sharedstatedir%g
11364 s%@localstatedir@%$localstatedir%g
11365 s%@libdir@%$libdir%g
11366 s%@includedir@%$includedir%g
11367 s%@oldincludedir@%$oldincludedir%g
11368 s%@infodir@%$infodir%g
11369 s%@mandir@%$mandir%g
11370 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11371 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11372 s%@INSTALL_DATA@%$INSTALL_DATA%g
11373 s%@PACKAGE@%$PACKAGE%g
11374 s%@VERSION@%$VERSION%g
11375 s%@ACLOCAL@%$ACLOCAL%g
11376 s%@AUTOCONF@%$AUTOCONF%g
11377 s%@AUTOMAKE@%$AUTOMAKE%g
11378 s%@AUTOHEADER@%$AUTOHEADER%g
11379 s%@MAKEINFO@%$MAKEINFO%g
11380 s%@SET_MAKE@%$SET_MAKE%g
11381 s%@top_builddir@%$top_builddir%g
11382 s%@ldap_subdir@%$ldap_subdir%g
11383 s%@host@%$host%g
11384 s%@host_alias@%$host_alias%g
11385 s%@host_cpu@%$host_cpu%g
11386 s%@host_vendor@%$host_vendor%g
11387 s%@host_os@%$host_os%g
11388 s%@RANLIB@%$RANLIB%g
11389 s%@CC@%$CC%g
11390 s%@LD@%$LD%g
11391 s%@NM@%$NM%g
11392 s%@LN_S@%$LN_S%g
11393 s%@LIBTOOL@%$LIBTOOL%g
11394 s%@AWK@%$AWK%g
11395 s%@LN_H@%$LN_H%g
11396 s%@SENDMAIL@%$SENDMAIL%g
11397 s%@EDITOR@%$EDITOR%g
11398 s%@FINGER@%$FINGER%g
11399 s%@PERLBIN@%$PERLBIN%g
11400 s%@CPP@%$CPP%g
11401 s%@EXEEXT@%$EXEEXT%g
11402 s%@OBJEXT@%$OBJEXT%g
11403 s%@PEPSY@%$PEPSY%g
11404 s%@LIBOBJS@%$LIBOBJS%g
11405 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11406 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11407 s%@BUILD_BDB2@%$BUILD_BDB2%g
11408 s%@BUILD_LDBM@%$BUILD_LDBM%g
11409 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11410 s%@BUILD_PERL@%$BUILD_PERL%g
11411 s%@BUILD_SHELL@%$BUILD_SHELL%g
11412 s%@BUILD_TCL@%$BUILD_TCL%g
11413 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11414 s%@LDAP_LIBS@%$LDAP_LIBS%g
11415 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11416 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11417 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11418 s%@LDBM_LIBS@%$LDBM_LIBS%g
11419 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11420 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11421 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11422 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11423 s%@KRB_LIBS@%$KRB_LIBS%g
11424 s%@READLINE_LIBS@%$READLINE_LIBS%g
11425 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11426 s%@TLS_LIBS@%$TLS_LIBS%g
11427
11428 CEOF
11429 EOF
11430
11431 cat >> $CONFIG_STATUS <<\EOF
11432
11433 # Split the substitutions into bite-sized pieces for seds with
11434 # small command number limits, like on Digital OSF/1 and HP-UX.
11435 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11436 ac_file=1 # Number of current file.
11437 ac_beg=1 # First line for current file.
11438 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11439 ac_more_lines=:
11440 ac_sed_cmds=""
11441 while $ac_more_lines; do
11442   if test $ac_beg -gt 1; then
11443     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11444   else
11445     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11446   fi
11447   if test ! -s conftest.s$ac_file; then
11448     ac_more_lines=false
11449     rm -f conftest.s$ac_file
11450   else
11451     if test -z "$ac_sed_cmds"; then
11452       ac_sed_cmds="sed -f conftest.s$ac_file"
11453     else
11454       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11455     fi
11456     ac_file=`expr $ac_file + 1`
11457     ac_beg=$ac_end
11458     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11459   fi
11460 done
11461 if test -z "$ac_sed_cmds"; then
11462   ac_sed_cmds=cat
11463 fi
11464 EOF
11465
11466 cat >> $CONFIG_STATUS <<EOF
11467
11468 CONFIG_FILES=\${CONFIG_FILES-"\
11469 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11470 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11471 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11472 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11473 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11474 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11475 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11476 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11477 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11478 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11479 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11480 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11481 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11482 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11483 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11484 include/Makefile:build/top.mk:include/Makefile.in \
11485 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11486 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11487 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11488 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11489 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11490 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11491 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11492 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11493 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11494 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11495 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11496 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11497 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11498 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11499 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11500 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11501 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11502 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11503 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11504 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11505 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11506 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11507 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11508 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11509 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11510 "}
11511 EOF
11512 cat >> $CONFIG_STATUS <<\EOF
11513 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11514   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11515   case "$ac_file" in
11516   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11517        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11518   *) ac_file_in="${ac_file}.in" ;;
11519   esac
11520
11521   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11522
11523   # Remove last slash and all that follows it.  Not all systems have dirname.
11524   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11525   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11526     # The file is in a subdirectory.
11527     test ! -d "$ac_dir" && mkdir "$ac_dir"
11528     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11529     # A "../" for each directory in $ac_dir_suffix.
11530     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11531   else
11532     ac_dir_suffix= ac_dots=
11533   fi
11534
11535   case "$ac_given_srcdir" in
11536   .)  srcdir=.
11537       if test -z "$ac_dots"; then top_srcdir=.
11538       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11539   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11540   *) # Relative path.
11541     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11542     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11543   esac
11544
11545   case "$ac_given_INSTALL" in
11546   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11547   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11548   esac
11549
11550   echo creating "$ac_file"
11551   rm -f "$ac_file"
11552   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11553   case "$ac_file" in
11554   *Makefile*) ac_comsub="1i\\
11555 # $configure_input" ;;
11556   *) ac_comsub= ;;
11557   esac
11558
11559   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11560   sed -e "$ac_comsub
11561 s%@configure_input@%$configure_input%g
11562 s%@srcdir@%$srcdir%g
11563 s%@top_srcdir@%$top_srcdir%g
11564 s%@INSTALL@%$INSTALL%g
11565 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11566 fi; done
11567 rm -f conftest.s*
11568
11569 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11570 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11571 #
11572 # ac_d sets the value in "#define NAME VALUE" lines.
11573 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11574 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11575 ac_dC='\3'
11576 ac_dD='%g'
11577 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11578 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11579 ac_uB='\([      ]\)%\1#\2define\3'
11580 ac_uC=' '
11581 ac_uD='\4%g'
11582 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11583 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11584 ac_eB='$%\1#\2define\3'
11585 ac_eC=' '
11586 ac_eD='%g'
11587
11588 if test "${CONFIG_HEADERS+set}" != set; then
11589 EOF
11590 cat >> $CONFIG_STATUS <<EOF
11591   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11592 EOF
11593 cat >> $CONFIG_STATUS <<\EOF
11594 fi
11595 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11596   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11597   case "$ac_file" in
11598   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11599        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11600   *) ac_file_in="${ac_file}.in" ;;
11601   esac
11602
11603   echo creating $ac_file
11604
11605   rm -f conftest.frag conftest.in conftest.out
11606   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11607   cat $ac_file_inputs > conftest.in
11608
11609 EOF
11610
11611 # Transform confdefs.h into a sed script conftest.vals that substitutes
11612 # the proper values into config.h.in to produce config.h.  And first:
11613 # Protect against being on the right side of a sed subst in config.status.
11614 # Protect against being in an unquoted here document in config.status.
11615 rm -f conftest.vals
11616 cat > conftest.hdr <<\EOF
11617 s/[\\&%]/\\&/g
11618 s%[\\$`]%\\&%g
11619 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11620 s%ac_d%ac_u%gp
11621 s%ac_u%ac_e%gp
11622 EOF
11623 sed -n -f conftest.hdr confdefs.h > conftest.vals
11624 rm -f conftest.hdr
11625
11626 # This sed command replaces #undef with comments.  This is necessary, for
11627 # example, in the case of _POSIX_SOURCE, which is predefined and required
11628 # on some systems where configure will not decide to define it.
11629 cat >> conftest.vals <<\EOF
11630 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11631 EOF
11632
11633 # Break up conftest.vals because some shells have a limit on
11634 # the size of here documents, and old seds have small limits too.
11635
11636 rm -f conftest.tail
11637 while :
11638 do
11639   ac_lines=`grep -c . conftest.vals`
11640   # grep -c gives empty output for an empty file on some AIX systems.
11641   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11642   # Write a limited-size here document to conftest.frag.
11643   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11644   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11645   echo 'CEOF
11646   sed -f conftest.frag conftest.in > conftest.out
11647   rm -f conftest.in
11648   mv conftest.out conftest.in
11649 ' >> $CONFIG_STATUS
11650   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11651   rm -f conftest.vals
11652   mv conftest.tail conftest.vals
11653 done
11654 rm -f conftest.vals
11655
11656 cat >> $CONFIG_STATUS <<\EOF
11657   rm -f conftest.frag conftest.h
11658   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11659   cat conftest.in >> conftest.h
11660   rm -f conftest.in
11661   if cmp -s $ac_file conftest.h 2>/dev/null; then
11662     echo "$ac_file is unchanged"
11663     rm -f conftest.h
11664   else
11665     # Remove last slash and all that follows it.  Not all systems have dirname.
11666       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11667       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11668       # The file is in a subdirectory.
11669       test ! -d "$ac_dir" && mkdir "$ac_dir"
11670     fi
11671     rm -f $ac_file
11672     mv conftest.h $ac_file
11673   fi
11674 fi; done
11675
11676 EOF
11677 cat >> $CONFIG_STATUS <<EOF
11678
11679 EOF
11680 cat >> $CONFIG_STATUS <<\EOF
11681
11682 date > stamp-h
11683 echo Please \"make depend\" to build dependencies
11684
11685 exit 0
11686 EOF
11687 chmod +x $CONFIG_STATUS
11688 rm -fr confdefs* $ac_clean_files
11689 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11690