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