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