]> git.sur5r.net Git - openldap/blob - configure
Initial inet_aton() detection.
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
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-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 LDAPD Options:"
51 ac_help="$ac_help
52   --enable-ldapd        enable building ldapd (no)"
53 ac_help="$ac_help
54 SLAPD Options:"
55 ac_help="$ac_help
56   --enable-slapd        enable building slapd (yes)"
57 ac_help="$ac_help
58     --enable-cleartext  enable cleartext passwords (yes)"
59 ac_help="$ac_help
60     --enable-crypt      enable crypt(3) passwords (auto)"
61 ac_help="$ac_help
62     --enable-modules    enable dynamic module support (no)"
63 ac_help="$ac_help
64     --enable-phonetic   enable phonetic/soundex (no)"
65 ac_help="$ac_help
66     --enable-rlookups   enable reverse lookups (auto)"
67 ac_help="$ac_help
68     --enable-wrappers   enable tcp wrapper support (no)"
69 ac_help="$ac_help
70     --enable-bdb2       enable bdb2 backend (no)"
71 ac_help="$ac_help
72       --with-bdb2-module        module type (static)"
73 ac_help="$ac_help
74     --enable-ldap       enable ldap backend (no)"
75 ac_help="$ac_help
76       --with-ldap-module        module type (static)"
77 ac_help="$ac_help
78     --enable-ldbm       enable ldbm backend (yes)"
79 ac_help="$ac_help
80       --with-ldbm-module        module type (static)"
81 ac_help="$ac_help
82       --with-ldbm-api   use LDBM API (auto)"
83 ac_help="$ac_help
84       --with-ldbm-type  use LDBM type (auto)"
85 ac_help="$ac_help
86     --enable-passwd     enable passwd backend (no)"
87 ac_help="$ac_help
88       --with-passwd-module      module type (static)"
89 ac_help="$ac_help
90     --enable-perl       enable perl backend (no)"
91 ac_help="$ac_help
92       --with-perl-module        module type (static)"
93 ac_help="$ac_help
94     --enable-shell      enable shell backend (no)"
95 ac_help="$ac_help
96       --with-shell-module       module type (static)"
97 ac_help="$ac_help
98     --enable-tcl        enable tcl backend (no)"
99 ac_help="$ac_help
100       --with-tcl-module module type (static)"
101 ac_help="$ac_help
102 SLURPD Options:"
103 ac_help="$ac_help
104   --enable-slurpd       enable building slurpd (auto)"
105 ac_help="$ac_help
106 Library Generation & Linking Options"
107 ac_help="$ac_help
108   --enable-static[=PKGS]  build static libraries [default=yes]"
109 ac_help="$ac_help
110   --enable-shared[=PKGS]  build shared libraries [default=yes]"
111 ac_help="$ac_help
112   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
113 ac_help="$ac_help
114   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
115 ac_help="$ac_help
116   --disable-libtool-lock  avoid locking (might break parallel builds)"
117
118 # Initialize some variables set by options.
119 # The variables have the same names as the options, with
120 # dashes changed to underlines.
121 build=NONE
122 cache_file=./config.cache
123 exec_prefix=NONE
124 host=NONE
125 no_create=
126 nonopt=NONE
127 no_recursion=
128 prefix=NONE
129 program_prefix=NONE
130 program_suffix=NONE
131 program_transform_name=s,x,x,
132 silent=
133 site=
134 srcdir=
135 target=NONE
136 verbose=
137 x_includes=NONE
138 x_libraries=NONE
139 bindir='${exec_prefix}/bin'
140 sbindir='${exec_prefix}/sbin'
141 libexecdir='${exec_prefix}/libexec'
142 datadir='${prefix}/share'
143 sysconfdir='${prefix}/etc'
144 sharedstatedir='${prefix}/com'
145 localstatedir='${prefix}/var'
146 libdir='${exec_prefix}/lib'
147 includedir='${prefix}/include'
148 oldincludedir='/usr/include'
149 infodir='${prefix}/info'
150 mandir='${prefix}/man'
151
152 # Initialize some other variables.
153 subdirs=
154 MFLAGS= MAKEFLAGS=
155 SHELL=${CONFIG_SHELL-/bin/sh}
156 # Maximum number of lines to put in a shell here document.
157 ac_max_here_lines=12
158
159 ac_prev=
160 for ac_option
161 do
162
163   # If the previous option needs an argument, assign it.
164   if test -n "$ac_prev"; then
165     eval "$ac_prev=\$ac_option"
166     ac_prev=
167     continue
168   fi
169
170   case "$ac_option" in
171   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
172   *) ac_optarg= ;;
173   esac
174
175   # Accept the important Cygnus configure options, so we can diagnose typos.
176
177   case "$ac_option" in
178
179   -bindir | --bindir | --bindi | --bind | --bin | --bi)
180     ac_prev=bindir ;;
181   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
182     bindir="$ac_optarg" ;;
183
184   -build | --build | --buil | --bui | --bu)
185     ac_prev=build ;;
186   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
187     build="$ac_optarg" ;;
188
189   -cache-file | --cache-file | --cache-fil | --cache-fi \
190   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
191     ac_prev=cache_file ;;
192   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
193   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
194     cache_file="$ac_optarg" ;;
195
196   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
197     ac_prev=datadir ;;
198   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
199   | --da=*)
200     datadir="$ac_optarg" ;;
201
202   -disable-* | --disable-*)
203     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
204     # Reject names that are not valid shell variable names.
205     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
206       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
207     fi
208     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209     eval "enable_${ac_feature}=no" ;;
210
211   -enable-* | --enable-*)
212     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
213     # Reject names that are not valid shell variable names.
214     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
215       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
216     fi
217     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
218     case "$ac_option" in
219       *=*) ;;
220       *) ac_optarg=yes ;;
221     esac
222     eval "enable_${ac_feature}='$ac_optarg'" ;;
223
224   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
225   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
226   | --exec | --exe | --ex)
227     ac_prev=exec_prefix ;;
228   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
229   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
230   | --exec=* | --exe=* | --ex=*)
231     exec_prefix="$ac_optarg" ;;
232
233   -gas | --gas | --ga | --g)
234     # Obsolete; use --with-gas.
235     with_gas=yes ;;
236
237   -help | --help | --hel | --he)
238     # Omit some internal or obsolete options to make the list less imposing.
239     # This message is too long to be a string in the A/UX 3.1 sh.
240     cat << EOF
241 Usage: configure [options] [host]
242 Options: [defaults in brackets after descriptions]
243 Configuration:
244   --cache-file=FILE       cache test results in FILE
245   --help                  print this message
246   --no-create             do not create output files
247   --quiet, --silent       do not print \`checking...' messages
248   --version               print the version of autoconf that created configure
249 Directory and file names:
250   --prefix=PREFIX         install architecture-independent files in PREFIX
251                           [$ac_default_prefix]
252   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
253                           [same as prefix]
254   --bindir=DIR            user executables in DIR [EPREFIX/bin]
255   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
256   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
257   --datadir=DIR           read-only architecture-independent data in DIR
258                           [PREFIX/share]
259   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
260   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
261                           [PREFIX/com]
262   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
263   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
264   --includedir=DIR        C header files in DIR [PREFIX/include]
265   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
266   --infodir=DIR           info documentation in DIR [PREFIX/info]
267   --mandir=DIR            man documentation in DIR [PREFIX/man]
268   --srcdir=DIR            find the sources in DIR [configure dir or ..]
269   --program-prefix=PREFIX prepend PREFIX to installed program names
270   --program-suffix=SUFFIX append SUFFIX to installed program names
271   --program-transform-name=PROGRAM
272                           run sed PROGRAM on installed program names
273 EOF
274     cat << EOF
275 Host type:
276   --build=BUILD           configure for building on BUILD [BUILD=HOST]
277   --host=HOST             configure for HOST [guessed]
278   --target=TARGET         configure for TARGET [TARGET=HOST]
279 Features and packages:
280   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
281   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
282   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
283   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
284   --x-includes=DIR        X include files are in DIR
285   --x-libraries=DIR       X library files are in DIR
286 EOF
287     if test -n "$ac_help"; then
288       echo "--enable and --with options recognized:$ac_help"
289     fi
290     exit 0 ;;
291
292   -host | --host | --hos | --ho)
293     ac_prev=host ;;
294   -host=* | --host=* | --hos=* | --ho=*)
295     host="$ac_optarg" ;;
296
297   -includedir | --includedir | --includedi | --included | --include \
298   | --includ | --inclu | --incl | --inc)
299     ac_prev=includedir ;;
300   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
301   | --includ=* | --inclu=* | --incl=* | --inc=*)
302     includedir="$ac_optarg" ;;
303
304   -infodir | --infodir | --infodi | --infod | --info | --inf)
305     ac_prev=infodir ;;
306   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
307     infodir="$ac_optarg" ;;
308
309   -libdir | --libdir | --libdi | --libd)
310     ac_prev=libdir ;;
311   -libdir=* | --libdir=* | --libdi=* | --libd=*)
312     libdir="$ac_optarg" ;;
313
314   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
315   | --libexe | --libex | --libe)
316     ac_prev=libexecdir ;;
317   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
318   | --libexe=* | --libex=* | --libe=*)
319     libexecdir="$ac_optarg" ;;
320
321   -localstatedir | --localstatedir | --localstatedi | --localstated \
322   | --localstate | --localstat | --localsta | --localst \
323   | --locals | --local | --loca | --loc | --lo)
324     ac_prev=localstatedir ;;
325   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
326   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
327   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
328     localstatedir="$ac_optarg" ;;
329
330   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
331     ac_prev=mandir ;;
332   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
333     mandir="$ac_optarg" ;;
334
335   -nfp | --nfp | --nf)
336     # Obsolete; use --without-fp.
337     with_fp=no ;;
338
339   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
340   | --no-cr | --no-c)
341     no_create=yes ;;
342
343   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
344   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
345     no_recursion=yes ;;
346
347   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
348   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
349   | --oldin | --oldi | --old | --ol | --o)
350     ac_prev=oldincludedir ;;
351   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
352   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
353   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
354     oldincludedir="$ac_optarg" ;;
355
356   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
357     ac_prev=prefix ;;
358   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
359     prefix="$ac_optarg" ;;
360
361   -program-prefix | --program-prefix | --program-prefi | --program-pref \
362   | --program-pre | --program-pr | --program-p)
363     ac_prev=program_prefix ;;
364   -program-prefix=* | --program-prefix=* | --program-prefi=* \
365   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
366     program_prefix="$ac_optarg" ;;
367
368   -program-suffix | --program-suffix | --program-suffi | --program-suff \
369   | --program-suf | --program-su | --program-s)
370     ac_prev=program_suffix ;;
371   -program-suffix=* | --program-suffix=* | --program-suffi=* \
372   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
373     program_suffix="$ac_optarg" ;;
374
375   -program-transform-name | --program-transform-name \
376   | --program-transform-nam | --program-transform-na \
377   | --program-transform-n | --program-transform- \
378   | --program-transform | --program-transfor \
379   | --program-transfo | --program-transf \
380   | --program-trans | --program-tran \
381   | --progr-tra | --program-tr | --program-t)
382     ac_prev=program_transform_name ;;
383   -program-transform-name=* | --program-transform-name=* \
384   | --program-transform-nam=* | --program-transform-na=* \
385   | --program-transform-n=* | --program-transform-=* \
386   | --program-transform=* | --program-transfor=* \
387   | --program-transfo=* | --program-transf=* \
388   | --program-trans=* | --program-tran=* \
389   | --progr-tra=* | --program-tr=* | --program-t=*)
390     program_transform_name="$ac_optarg" ;;
391
392   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
393   | -silent | --silent | --silen | --sile | --sil)
394     silent=yes ;;
395
396   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
397     ac_prev=sbindir ;;
398   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
399   | --sbi=* | --sb=*)
400     sbindir="$ac_optarg" ;;
401
402   -sharedstatedir | --sharedstatedir | --sharedstatedi \
403   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
404   | --sharedst | --shareds | --shared | --share | --shar \
405   | --sha | --sh)
406     ac_prev=sharedstatedir ;;
407   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
408   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
409   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
410   | --sha=* | --sh=*)
411     sharedstatedir="$ac_optarg" ;;
412
413   -site | --site | --sit)
414     ac_prev=site ;;
415   -site=* | --site=* | --sit=*)
416     site="$ac_optarg" ;;
417
418   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
419     ac_prev=srcdir ;;
420   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
421     srcdir="$ac_optarg" ;;
422
423   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
424   | --syscon | --sysco | --sysc | --sys | --sy)
425     ac_prev=sysconfdir ;;
426   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
427   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
428     sysconfdir="$ac_optarg" ;;
429
430   -target | --target | --targe | --targ | --tar | --ta | --t)
431     ac_prev=target ;;
432   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
433     target="$ac_optarg" ;;
434
435   -v | -verbose | --verbose | --verbos | --verbo | --verb)
436     verbose=yes ;;
437
438   -version | --version | --versio | --versi | --vers)
439     echo "configure generated by autoconf version 2.13.1"
440     exit 0 ;;
441
442   -with-* | --with-*)
443     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
444     # Reject names that are not valid shell variable names.
445     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
446       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
447     fi
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case "$ac_option" in
450       *=*) ;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_${ac_package}='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
457     # Reject names that are not valid shell variable names.
458     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
459       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
460     fi
461     ac_package=`echo $ac_package| sed 's/-/_/g'`
462     eval "with_${ac_package}=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes="$ac_optarg" ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries="$ac_optarg" ;;
481
482   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
483     ;;
484
485   *)
486     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
487       echo "configure: warning: $ac_option: invalid host type" 1>&2
488     fi
489     if test "x$nonopt" != xNONE; then
490       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
491     fi
492     nonopt="$ac_option"
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
500 fi
501
502 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
503
504 # File descriptor usage:
505 # 0 standard input
506 # 1 file creation
507 # 2 errors and warnings
508 # 3 some systems may open it to /dev/tty
509 # 4 used on the Kubota Titan
510 # 6 checking for... messages and results
511 # 5 compiler messages saved in config.log
512 if test "$silent" = yes; then
513   exec 6>/dev/null
514 else
515   exec 6>&1
516 fi
517 exec 5>./config.log
518
519 echo "\
520 This file contains any messages produced by compilers while
521 running configure, to aid debugging if configure makes a mistake.
522 " 1>&5
523
524 # Strip out --no-create and --no-recursion so they do not pile up.
525 # Also quote any args containing shell metacharacters.
526 ac_configure_args=
527 for ac_arg
528 do
529   case "$ac_arg" in
530   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
531   | --no-cr | --no-c) ;;
532   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
533   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
534   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
535   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
536   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
537   esac
538 done
539
540 # NLS nuisances.
541 # Only set these to C if already set.  These must not be set unconditionally
542 # because not all systems understand e.g. LANG=C (notably SCO).
543 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
544 # Non-C LC_CTYPE values break the ctype check.
545 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
546 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
547 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
548 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
549
550 # confdefs.h avoids OS command line length limits that DEFS can exceed.
551 rm -rf conftest* confdefs.h
552 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
553 echo > confdefs.h
554
555 # A filename unique to this package, relative to the directory that
556 # configure is in, which we can look for to find out if srcdir is correct.
557 ac_unique_file=build/version
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
576   else
577     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
578   fi
579 fi
580 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
581
582 # Prefer explicitly selected file to automatically selected ones.
583 if test -z "$CONFIG_SITE"; then
584   if test "x$prefix" != xNONE; then
585     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
586   else
587     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
588   fi
589 fi
590 for ac_site_file in $CONFIG_SITE; do
591   if test -r "$ac_site_file"; then
592     echo "loading site script $ac_site_file"
593     . "$ac_site_file"
594   fi
595 done
596
597
598 ac_ext=c
599 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
600 ac_cpp='$CPP $CPPFLAGS'
601 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
602 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
603 cross_compiling=$ac_cv_prog_cc_cross
604
605 ac_exeext=
606 ac_objext=o
607 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
608   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
609   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
610     ac_n= ac_c='
611 ' ac_t='        '
612   else
613     ac_n=-n ac_c= ac_t=
614   fi
615 else
616   ac_n= ac_c='\c' ac_t=
617 fi
618
619 ac_aux_dir=
620 for ac_dir in build $srcdir/build; do
621   if test -f $ac_dir/install-sh; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/install-sh -c"
624     break
625   elif test -f $ac_dir/install.sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install.sh -c"
628     break
629   fi
630 done
631 if test -z "$ac_aux_dir"; then
632   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
633 fi
634 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
635 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
636 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
637
638 OL_VERSION=`cat $ac_aux_dir/version`
639 if test -z "$OL_VERSION"; then
640         { echo "configure: error: could not determine version" 1>&2; exit 1; }
641 fi
642
643
644 echo $ac_n "checking host system type""... $ac_c" 1>&6
645 echo "configure:646: checking host system type" >&5
646 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
647
648 # Make sure we can run config.sub.
649   if $ac_config_sub sun4 >/dev/null 2>&1; then :
650     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
651   fi
652
653   ac_cv_host_alias=$host
654   case "$ac_cv_host_alias" in
655   NONE)
656     case $nonopt in
657     NONE)
658       if ac_cv_host_alias=`$ac_config_guess`; then :
659       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
660       fi ;;
661     *) ac_cv_host_alias=$nonopt ;;
662     esac ;;
663   esac
664
665   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
666   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
667   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
668   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
669 else
670   echo $ac_n "(cached) $ac_c" 1>&6
671 fi
672
673 echo "$ac_t""$ac_cv_host" 1>&6
674
675 host=$ac_cv_host
676 host_alias=$ac_cv_host_alias
677 host_cpu=$ac_cv_host_cpu
678 host_vendor=$ac_cv_host_vendor
679 host_os=$ac_cv_host_os
680
681
682
683
684
685 echo $ac_n "checking target system type""... $ac_c" 1>&6
686 echo "configure:687: checking target system type" >&5
687 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
688
689 # Make sure we can run config.sub.
690   if $ac_config_sub sun4 >/dev/null 2>&1; then :
691     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
692   fi
693
694   ac_cv_target_alias=$target
695   case "$ac_cv_target_alias" in
696   NONE)
697     case $nonopt in
698     NONE)
699       ac_cv_target_alias=$host_alias ;;
700
701     *) ac_cv_target_alias=$nonopt ;;
702     esac ;;
703   esac
704
705   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
706   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 else
710   echo $ac_n "(cached) $ac_c" 1>&6
711 fi
712
713 echo "$ac_t""$ac_cv_target" 1>&6
714
715 target=$ac_cv_target
716 target_alias=$ac_cv_target_alias
717 target_cpu=$ac_cv_target_cpu
718 target_vendor=$ac_cv_target_vendor
719 target_os=$ac_cv_target_os
720
721
722
723
724
725 echo $ac_n "checking build system type""... $ac_c" 1>&6
726 echo "configure:727: checking build system type" >&5
727 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
728
729 # Make sure we can run config.sub.
730   if $ac_config_sub sun4 >/dev/null 2>&1; then :
731     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
732   fi
733
734   ac_cv_build_alias=$build
735   case "$ac_cv_build_alias" in
736   NONE)
737     case $nonopt in
738     NONE)
739       ac_cv_build_alias=$host_alias ;;
740
741     *) ac_cv_build_alias=$nonopt ;;
742     esac ;;
743   esac
744
745   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
746   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749 else
750   echo $ac_n "(cached) $ac_c" 1>&6
751 fi
752
753 echo "$ac_t""$ac_cv_build" 1>&6
754
755 build=$ac_cv_build
756 build_alias=$ac_cv_build_alias
757 build_cpu=$ac_cv_build_cpu
758 build_vendor=$ac_cv_build_vendor
759 build_os=$ac_cv_build_os
760
761
762
763
764
765 # Do some error checking and defaulting for the host and target type.
766 # The inputs are:
767 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
768 #
769 # The rules are:
770 # 1. You are not allowed to specify --host, --target, and nonopt at the
771 #    same time.
772 # 2. Host defaults to nonopt.
773 # 3. If nonopt is not specified, then host defaults to the current host,
774 #    as determined by config.guess.
775 # 4. Target and build default to nonopt.
776 # 5. If nonopt is not specified, then target and build default to host.
777
778 # The aliases save the names the user supplied, while $host etc.
779 # will get canonicalized.
780 case $host---$target---$nonopt in
781 NONE---*---* | *---NONE---* | *---*---NONE) ;;
782 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
783 esac
784
785 test "$host_alias" != "$target_alias" &&
786   test "$program_prefix$program_suffix$program_transform_name" = \
787     NONENONEs,x,x, &&
788   program_prefix=${target_alias}-
789
790
791 # Find a good install program.  We prefer a C program (faster),
792 # so one script is as good as another.  But avoid the broken or
793 # incompatible versions:
794 # SysV /etc/install, /usr/sbin/install
795 # SunOS /usr/etc/install
796 # IRIX /sbin/install
797 # AIX /bin/install
798 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
799 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
800 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
801 # ./install, which can be erroneously created by make from ./install.sh.
802 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
803 echo "configure:804: checking for a BSD compatible install" >&5
804 if test -z "$INSTALL"; then
805 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
806   echo $ac_n "(cached) $ac_c" 1>&6
807 else
808     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
809   for ac_dir in $PATH; do
810     # Account for people who put trailing slashes in PATH elements.
811     case "$ac_dir/" in
812     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
813     *)
814       # OSF1 and SCO ODT 3.0 have their own names for install.
815       # Don't use installbsd from OSF since it installs stuff as root
816       # by default.
817       for ac_prog in ginstall scoinst install; do
818         if test -f $ac_dir/$ac_prog; then
819           if test $ac_prog = install &&
820             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
821             # AIX install.  It has an incompatible calling convention.
822             :
823           elif test $ac_prog = install &&
824             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
825             # program-specific install script used by HP pwplus--don't use.
826             :
827           else
828             ac_cv_path_install="$ac_dir/$ac_prog -c"
829             break 2
830           fi
831         fi
832       done
833       ;;
834     esac
835   done
836   IFS="$ac_save_IFS"
837
838 fi
839   if test "${ac_cv_path_install+set}" = set; then
840     INSTALL="$ac_cv_path_install"
841   else
842     # As a last resort, use the slow shell script.  We don't cache a
843     # path for INSTALL within a source directory, because that will
844     # break other packages using the cache if that directory is
845     # removed, or if the path is relative.
846     INSTALL="$ac_install_sh"
847   fi
848 fi
849 echo "$ac_t""$INSTALL" 1>&6
850
851 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
852 # It thinks the first close brace ends the variable substitution.
853 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
854
855 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
856
857 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
858
859 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
860 echo "configure:861: checking whether build environment is sane" >&5
861 # Just in case
862 sleep 1
863 echo timestamp > conftestfile
864 # Do `set' in a subshell so we don't clobber the current shell's
865 # arguments.  Must try -L first in case configure is actually a
866 # symlink; some systems play weird games with the mod time of symlinks
867 # (eg FreeBSD returns the mod time of the symlink's containing
868 # directory).
869 if (
870    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
871    if test "$*" = "X"; then
872       # -L didn't work.
873       set X `ls -t $srcdir/configure conftestfile`
874    fi
875    if test "$*" != "X $srcdir/configure conftestfile" \
876       && test "$*" != "X conftestfile $srcdir/configure"; then
877
878       # If neither matched, then we have a broken ls.  This can happen
879       # if, for instance, CONFIG_SHELL is bash and it inherits a
880       # broken ls alias from the environment.  This has actually
881       # happened.  Such a system could not be considered "sane".
882       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
883 alias in your environment" 1>&2; exit 1; }
884    fi
885
886    test "$2" = conftestfile
887    )
888 then
889    # Ok.
890    :
891 else
892    { echo "configure: error: newly created file is older than distributed files!
893 Check your system clock" 1>&2; exit 1; }
894 fi
895 rm -f conftest*
896 echo "$ac_t""yes" 1>&6
897 if test "$program_transform_name" = s,x,x,; then
898   program_transform_name=
899 else
900   # Double any \ or $.  echo might interpret backslashes.
901   cat <<\EOF_SED > conftestsed
902 s,\\,\\\\,g; s,\$,$$,g
903 EOF_SED
904   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
905   rm -f conftestsed
906 fi
907 test "$program_prefix" != NONE &&
908   program_transform_name="s,^,${program_prefix},;$program_transform_name"
909 # Use a double $ so make ignores it.
910 test "$program_suffix" != NONE &&
911   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
912
913 # sed with no file args requires a program.
914 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
915
916 for ac_prog in mawk gawk nawk awk
917 do
918 # Extract the first word of "$ac_prog", so it can be a program name with args.
919 set dummy $ac_prog; ac_word=$2
920 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921 echo "configure:922: checking for $ac_word" >&5
922 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
923   echo $ac_n "(cached) $ac_c" 1>&6
924 else
925   if test -n "$AWK"; then
926   ac_cv_prog_AWK="$AWK" # Let the user override the test.
927 else
928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
929   ac_dummy="$PATH"
930   for ac_dir in $ac_dummy; do
931     test -z "$ac_dir" && ac_dir=.
932     if test -f $ac_dir/$ac_word; then
933       ac_cv_prog_AWK="$ac_prog"
934       break
935     fi
936   done
937   IFS="$ac_save_ifs"
938 fi
939 fi
940 AWK="$ac_cv_prog_AWK"
941 if test -n "$AWK"; then
942   echo "$ac_t""$AWK" 1>&6
943 else
944   echo "$ac_t""no" 1>&6
945 fi
946
947 test -n "$AWK" && break
948 done
949
950 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
951 echo "configure:952: checking whether ${MAKE-make} sets \${MAKE}" >&5
952 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
953 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
954   echo $ac_n "(cached) $ac_c" 1>&6
955 else
956   cat > conftestmake <<\EOF
957 all:
958         @echo 'ac_maketemp="${MAKE}"'
959 EOF
960 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
961 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
962 if test -n "$ac_maketemp"; then
963   eval ac_cv_prog_make_${ac_make}_set=yes
964 else
965   eval ac_cv_prog_make_${ac_make}_set=no
966 fi
967 rm -f conftestmake
968 fi
969 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
970   echo "$ac_t""yes" 1>&6
971   SET_MAKE=
972 else
973   echo "$ac_t""no" 1>&6
974   SET_MAKE="MAKE=${MAKE-make}"
975 fi
976
977
978
979 PACKAGE=OpenLDAP
980
981 VERSION=$OL_VERSION
982
983 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
984   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
985 fi
986
987
988
989 missing_dir=`cd $ac_aux_dir && pwd`
990 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
991 echo "configure:992: checking for working aclocal" >&5
992 # Run test in a subshell; some versions of sh will print an error if
993 # an executable is not found, even if stderr is redirected.
994 # Redirect stdin to placate older versions of autoconf.  Sigh.
995 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
996    ACLOCAL=aclocal
997    echo "$ac_t""found" 1>&6
998 else
999    ACLOCAL="$missing_dir/missing aclocal"
1000    echo "$ac_t""missing" 1>&6
1001 fi
1002
1003 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1004 echo "configure:1005: checking for working autoconf" >&5
1005 # Run test in a subshell; some versions of sh will print an error if
1006 # an executable is not found, even if stderr is redirected.
1007 # Redirect stdin to placate older versions of autoconf.  Sigh.
1008 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1009    AUTOCONF=autoconf
1010    echo "$ac_t""found" 1>&6
1011 else
1012    AUTOCONF="$missing_dir/missing autoconf"
1013    echo "$ac_t""missing" 1>&6
1014 fi
1015
1016 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1017 echo "configure:1018: checking for working automake" >&5
1018 # Run test in a subshell; some versions of sh will print an error if
1019 # an executable is not found, even if stderr is redirected.
1020 # Redirect stdin to placate older versions of autoconf.  Sigh.
1021 if (automake --version) < /dev/null > /dev/null 2>&1; then
1022    AUTOMAKE=automake
1023    echo "$ac_t""found" 1>&6
1024 else
1025    AUTOMAKE="$missing_dir/missing automake"
1026    echo "$ac_t""missing" 1>&6
1027 fi
1028
1029 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1030 echo "configure:1031: checking for working autoheader" >&5
1031 # Run test in a subshell; some versions of sh will print an error if
1032 # an executable is not found, even if stderr is redirected.
1033 # Redirect stdin to placate older versions of autoconf.  Sigh.
1034 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1035    AUTOHEADER=autoheader
1036    echo "$ac_t""found" 1>&6
1037 else
1038    AUTOHEADER="$missing_dir/missing autoheader"
1039    echo "$ac_t""missing" 1>&6
1040 fi
1041
1042 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1043 echo "configure:1044: checking for working makeinfo" >&5
1044 # Run test in a subshell; some versions of sh will print an error if
1045 # an executable is not found, even if stderr is redirected.
1046 # Redirect stdin to placate older versions of autoconf.  Sigh.
1047 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1048    MAKEINFO=makeinfo
1049    echo "$ac_t""found" 1>&6
1050 else
1051    MAKEINFO="$missing_dir/missing makeinfo"
1052    echo "$ac_t""missing" 1>&6
1053 fi
1054
1055 install_sh="$missing_dir/install-sh"
1056 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1057
1058 for ac_prog in gnutar gtar tar
1059 do
1060 # Extract the first word of "$ac_prog", so it can be a program name with args.
1061 set dummy $ac_prog; ac_word=$2
1062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1063 echo "configure:1064: checking for $ac_word" >&5
1064 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1065   echo $ac_n "(cached) $ac_c" 1>&6
1066 else
1067   if test -n "$AMTAR"; then
1068   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1069 else
1070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1071   ac_dummy="$PATH"
1072   for ac_dir in $ac_dummy; do
1073     test -z "$ac_dir" && ac_dir=.
1074     if test -f $ac_dir/$ac_word; then
1075       ac_cv_prog_AMTAR="$ac_prog"
1076       break
1077     fi
1078   done
1079   IFS="$ac_save_ifs"
1080 fi
1081 fi
1082 AMTAR="$ac_cv_prog_AMTAR"
1083 if test -n "$AMTAR"; then
1084   echo "$ac_t""$AMTAR" 1>&6
1085 else
1086   echo "$ac_t""no" 1>&6
1087 fi
1088
1089 test -n "$AMTAR" && break
1090 done
1091
1092
1093 AMTARFLAGS=
1094 if test -n "$AMTAR"; then
1095   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1096         AMTARFLAGS=o
1097   fi
1098 fi
1099
1100
1101
1102 cat >> confdefs.h <<EOF
1103 #define OPENLDAP_PACKAGE "$PACKAGE"
1104 EOF
1105
1106 cat >> confdefs.h <<EOF
1107 #define OPENLDAP_VERSION "$VERSION"
1108 EOF
1109
1110
1111
1112
1113 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1114 echo "configure:1115: checking configure arguments" >&5
1115
1116
1117 top_builddir=`pwd`
1118
1119 ldap_subdir="openldap"
1120
1121 # Check whether --with-subdir or --without-subdir was given.
1122 if test "${with_subdir+set}" = set; then
1123   withval="$with_subdir"
1124   
1125         if test "$withval" = "no"; then
1126                 ldap_subdir=""
1127         elif test "$withval" != "yes"; then
1128                 ldap_subdir="$withval"
1129         fi
1130
1131 fi
1132
1133
1134 # OpenLDAP --enable-debug
1135         # Check whether --enable-debug or --disable-debug was given.
1136 if test "${enable_debug+set}" = set; then
1137   enableval="$enable_debug"
1138   
1139         ol_arg=invalid
1140         for ol_val in auto yes no ; do
1141                 if test "$enableval" = "$ol_val" ; then
1142                         ol_arg="$ol_val"
1143                 fi
1144         done
1145         if test "$ol_arg" = "invalid" ; then
1146                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1147         fi
1148         ol_enable_debug="$ol_arg"
1149
1150 else
1151         ol_enable_debug="yes"
1152 fi
1153 # end --enable-debug
1154 # OpenLDAP --enable-syslog
1155         # Check whether --enable-syslog or --disable-syslog was given.
1156 if test "${enable_syslog+set}" = set; then
1157   enableval="$enable_syslog"
1158   
1159         ol_arg=invalid
1160         for ol_val in auto yes no ; do
1161                 if test "$enableval" = "$ol_val" ; then
1162                         ol_arg="$ol_val"
1163                 fi
1164         done
1165         if test "$ol_arg" = "invalid" ; then
1166                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1167         fi
1168         ol_enable_syslog="$ol_arg"
1169
1170 else
1171         ol_enable_syslog="auto"
1172 fi
1173 # end --enable-syslog
1174 # OpenLDAP --enable-proctitle
1175         # Check whether --enable-proctitle or --disable-proctitle was given.
1176 if test "${enable_proctitle+set}" = set; then
1177   enableval="$enable_proctitle"
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-proctitle" 1>&2; exit 1; }
1187         fi
1188         ol_enable_proctitle="$ol_arg"
1189
1190 else
1191         ol_enable_proctitle="yes"
1192 fi
1193 # end --enable-proctitle
1194 # OpenLDAP --enable-cache
1195         # Check whether --enable-cache or --disable-cache was given.
1196 if test "${enable_cache+set}" = set; then
1197   enableval="$enable_cache"
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-cache" 1>&2; exit 1; }
1207         fi
1208         ol_enable_cache="$ol_arg"
1209
1210 else
1211         ol_enable_cache="yes"
1212 fi
1213 # end --enable-cache
1214 # OpenLDAP --enable-dns
1215         # Check whether --enable-dns or --disable-dns was given.
1216 if test "${enable_dns+set}" = set; then
1217   enableval="$enable_dns"
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-dns" 1>&2; exit 1; }
1227         fi
1228         ol_enable_dns="$ol_arg"
1229
1230 else
1231         ol_enable_dns="no"
1232 fi
1233 # end --enable-dns
1234 # OpenLDAP --enable-referrals
1235         # Check whether --enable-referrals or --disable-referrals was given.
1236 if test "${enable_referrals+set}" = set; then
1237   enableval="$enable_referrals"
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-referrals" 1>&2; exit 1; }
1247         fi
1248         ol_enable_referrals="$ol_arg"
1249
1250 else
1251         ol_enable_referrals="yes"
1252 fi
1253 # end --enable-referrals
1254 # OpenLDAP --enable-cldap
1255         # Check whether --enable-cldap or --disable-cldap was given.
1256 if test "${enable_cldap+set}" = set; then
1257   enableval="$enable_cldap"
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-cldap" 1>&2; exit 1; }
1267         fi
1268         ol_enable_cldap="$ol_arg"
1269
1270 else
1271         ol_enable_cldap="no"
1272 fi
1273 # end --enable-cldap
1274 # OpenLDAP --enable-x_compile
1275         # Check whether --enable-x_compile or --disable-x_compile was given.
1276 if test "${enable_x_compile+set}" = set; then
1277   enableval="$enable_x_compile"
1278   
1279         ol_arg=invalid
1280         for ol_val in 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-x_compile" 1>&2; exit 1; }
1287         fi
1288         ol_enable_x_compile="$ol_arg"
1289
1290 else
1291         ol_enable_x_compile="no"
1292 fi
1293 # end --enable-x_compile
1294
1295 # OpenLDAP --enable-dmalloc
1296         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1297 if test "${enable_dmalloc+set}" = set; then
1298   enableval="$enable_dmalloc"
1299   
1300         ol_arg=invalid
1301         for ol_val in auto yes no ; do
1302                 if test "$enableval" = "$ol_val" ; then
1303                         ol_arg="$ol_val"
1304                 fi
1305         done
1306         if test "$ol_arg" = "invalid" ; then
1307                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1308         fi
1309         ol_enable_dmalloc="$ol_arg"
1310
1311 else
1312         ol_enable_dmalloc="no"
1313 fi
1314 # end --enable-dmalloc
1315
1316 # OpenLDAP --with-cyrus_sasl
1317         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1318 if test "${with_cyrus_sasl+set}" = set; then
1319   withval="$with_cyrus_sasl"
1320   
1321         ol_arg=invalid
1322         for ol_val in auto yes no  ; do
1323                 if test "$withval" = "$ol_val" ; then
1324                         ol_arg="$ol_val"
1325                 fi
1326         done
1327         if test "$ol_arg" = "invalid" ; then
1328                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1329         fi
1330         ol_with_cyrus_sasl="$ol_arg"
1331
1332 else
1333         ol_with_cyrus_sasl="auto"
1334 fi
1335 # end --with-cyrus_sasl
1336
1337 # OpenLDAP --with-fetch
1338         # Check whether --with-fetch or --without-fetch was given.
1339 if test "${with_fetch+set}" = set; then
1340   withval="$with_fetch"
1341   
1342         ol_arg=invalid
1343         for ol_val in auto yes no  ; do
1344                 if test "$withval" = "$ol_val" ; then
1345                         ol_arg="$ol_val"
1346                 fi
1347         done
1348         if test "$ol_arg" = "invalid" ; then
1349                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1350         fi
1351         ol_with_fetch="$ol_arg"
1352
1353 else
1354         ol_with_fetch="auto"
1355 fi
1356 # end --with-fetch
1357
1358 # OpenLDAP --with-kerberos
1359         # Check whether --with-kerberos or --without-kerberos was given.
1360 if test "${with_kerberos+set}" = set; then
1361   withval="$with_kerberos"
1362   
1363         ol_arg=invalid
1364         for ol_val in auto k5 k4 afs yes no ; do
1365                 if test "$withval" = "$ol_val" ; then
1366                         ol_arg="$ol_val"
1367                 fi
1368         done
1369         if test "$ol_arg" = "invalid" ; then
1370                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1371         fi
1372         ol_with_kerberos="$ol_arg"
1373
1374 else
1375         ol_with_kerberos="auto"
1376 fi
1377 # end --with-kerberos
1378
1379 # OpenLDAP --with-readline
1380         # Check whether --with-readline or --without-readline was given.
1381 if test "${with_readline+set}" = set; then
1382   withval="$with_readline"
1383   
1384         ol_arg=invalid
1385         for ol_val in auto yes no  ; do
1386                 if test "$withval" = "$ol_val" ; then
1387                         ol_arg="$ol_val"
1388                 fi
1389         done
1390         if test "$ol_arg" = "invalid" ; then
1391                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1392         fi
1393         ol_with_readline="$ol_arg"
1394
1395 else
1396         ol_with_readline="auto"
1397 fi
1398 # end --with-readline
1399
1400 # OpenLDAP --with-threads
1401         # Check whether --with-threads or --without-threads was given.
1402 if test "${with_threads+set}" = set; then
1403   withval="$with_threads"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto posix mach lwp yes no manual  ; do
1407                 if test "$withval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1413         fi
1414         ol_with_threads="$ol_arg"
1415
1416 else
1417         ol_with_threads="auto"
1418 fi
1419 # end --with-threads
1420
1421 # OpenLDAP --with-tls
1422         # Check whether --with-tls or --without-tls was given.
1423 if test "${with_tls+set}" = set; then
1424   withval="$with_tls"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto ssleay openssl yes no  ; do
1428                 if test "$withval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1434         fi
1435         ol_with_tls="$ol_arg"
1436
1437 else
1438         ol_with_tls="auto"
1439 fi
1440 # end --with-tls
1441
1442 # OpenLDAP --with-yielding_select
1443         # Check whether --with-yielding_select or --without-yielding_select was given.
1444 if test "${with_yielding_select+set}" = set; then
1445   withval="$with_yielding_select"
1446   
1447         ol_arg=invalid
1448         for ol_val in auto yes no manual  ; do
1449                 if test "$withval" = "$ol_val" ; then
1450                         ol_arg="$ol_val"
1451                 fi
1452         done
1453         if test "$ol_arg" = "invalid" ; then
1454                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1455         fi
1456         ol_with_yielding_select="$ol_arg"
1457
1458 else
1459         ol_with_yielding_select="auto"
1460 fi
1461 # end --with-yielding_select
1462
1463
1464
1465 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1466 if test "${with_xxldapdoptions+set}" = set; then
1467   withval="$with_xxldapdoptions"
1468   :
1469 fi
1470
1471 # OpenLDAP --enable-ldapd
1472         # Check whether --enable-ldapd or --disable-ldapd was given.
1473 if test "${enable_ldapd+set}" = set; then
1474   enableval="$enable_ldapd"
1475   
1476         ol_arg=invalid
1477         for ol_val in auto yes no ; do
1478                 if test "$enableval" = "$ol_val" ; then
1479                         ol_arg="$ol_val"
1480                 fi
1481         done
1482         if test "$ol_arg" = "invalid" ; then
1483                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1484         fi
1485         ol_enable_ldapd="$ol_arg"
1486
1487 else
1488         ol_enable_ldapd="no"
1489 fi
1490 # end --enable-ldapd
1491
1492 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1493 if test "${with_xxslapdoptions+set}" = set; then
1494   withval="$with_xxslapdoptions"
1495   :
1496 fi
1497
1498 # OpenLDAP --enable-slapd
1499         # Check whether --enable-slapd or --disable-slapd was given.
1500 if test "${enable_slapd+set}" = set; then
1501   enableval="$enable_slapd"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto yes no ; do
1505                 if test "$enableval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1511         fi
1512         ol_enable_slapd="$ol_arg"
1513
1514 else
1515         ol_enable_slapd="yes"
1516 fi
1517 # end --enable-slapd
1518 # OpenLDAP --enable-cleartext
1519         # Check whether --enable-cleartext or --disable-cleartext was given.
1520 if test "${enable_cleartext+set}" = set; then
1521   enableval="$enable_cleartext"
1522   
1523         ol_arg=invalid
1524         for ol_val in auto yes no ; do
1525                 if test "$enableval" = "$ol_val" ; then
1526                         ol_arg="$ol_val"
1527                 fi
1528         done
1529         if test "$ol_arg" = "invalid" ; then
1530                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1531         fi
1532         ol_enable_cleartext="$ol_arg"
1533
1534 else
1535         ol_enable_cleartext="yes"
1536 fi
1537 # end --enable-cleartext
1538 # OpenLDAP --enable-crypt
1539         # Check whether --enable-crypt or --disable-crypt was given.
1540 if test "${enable_crypt+set}" = set; then
1541   enableval="$enable_crypt"
1542   
1543         ol_arg=invalid
1544         for ol_val in auto yes no ; do
1545                 if test "$enableval" = "$ol_val" ; then
1546                         ol_arg="$ol_val"
1547                 fi
1548         done
1549         if test "$ol_arg" = "invalid" ; then
1550                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1551         fi
1552         ol_enable_crypt="$ol_arg"
1553
1554 else
1555         ol_enable_crypt="auto"
1556 fi
1557 # end --enable-crypt
1558 # OpenLDAP --enable-modules
1559         # Check whether --enable-modules or --disable-modules was given.
1560 if test "${enable_modules+set}" = set; then
1561   enableval="$enable_modules"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no ; do
1565                 if test "$enableval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1571         fi
1572         ol_enable_modules="$ol_arg"
1573
1574 else
1575         ol_enable_modules="no"
1576 fi
1577 # end --enable-modules
1578 # OpenLDAP --enable-phonetic
1579         # Check whether --enable-phonetic or --disable-phonetic was given.
1580 if test "${enable_phonetic+set}" = set; then
1581   enableval="$enable_phonetic"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no ; do
1585                 if test "$enableval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1591         fi
1592         ol_enable_phonetic="$ol_arg"
1593
1594 else
1595         ol_enable_phonetic="no"
1596 fi
1597 # end --enable-phonetic
1598 # OpenLDAP --enable-rlookups
1599         # Check whether --enable-rlookups or --disable-rlookups was given.
1600 if test "${enable_rlookups+set}" = set; then
1601   enableval="$enable_rlookups"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto yes no ; do
1605                 if test "$enableval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1611         fi
1612         ol_enable_rlookups="$ol_arg"
1613
1614 else
1615         ol_enable_rlookups="auto"
1616 fi
1617 # end --enable-rlookups
1618 # OpenLDAP --enable-wrappers
1619         # Check whether --enable-wrappers or --disable-wrappers was given.
1620 if test "${enable_wrappers+set}" = set; then
1621   enableval="$enable_wrappers"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto yes no ; do
1625                 if test "$enableval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1631         fi
1632         ol_enable_wrappers="$ol_arg"
1633
1634 else
1635         ol_enable_wrappers="no"
1636 fi
1637 # end --enable-wrappers
1638
1639 # OpenLDAP --enable-bdb2
1640         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1641 if test "${enable_bdb2+set}" = set; then
1642   enableval="$enable_bdb2"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no ; do
1646                 if test "$enableval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1652         fi
1653         ol_enable_bdb2="$ol_arg"
1654
1655 else
1656         ol_enable_bdb2="no"
1657 fi
1658 # end --enable-bdb2
1659 # OpenLDAP --with-bdb2_module
1660         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1661 if test "${with_bdb2_module+set}" = set; then
1662   withval="$with_bdb2_module"
1663   
1664         ol_arg=invalid
1665         for ol_val in static dynamic ; do
1666                 if test "$withval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1672         fi
1673         ol_with_bdb2_module="$ol_arg"
1674
1675 else
1676         ol_with_bdb2_module="static"
1677 fi
1678 # end --with-bdb2_module
1679
1680 # OpenLDAP --enable-ldap
1681         # Check whether --enable-ldap or --disable-ldap was given.
1682 if test "${enable_ldap+set}" = set; then
1683   enableval="$enable_ldap"
1684   
1685         ol_arg=invalid
1686         for ol_val in auto yes no ; do
1687                 if test "$enableval" = "$ol_val" ; then
1688                         ol_arg="$ol_val"
1689                 fi
1690         done
1691         if test "$ol_arg" = "invalid" ; then
1692                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1693         fi
1694         ol_enable_ldap="$ol_arg"
1695
1696 else
1697         ol_enable_ldap="no"
1698 fi
1699 # end --enable-ldap
1700 # OpenLDAP --with-ldap_module
1701         # Check whether --with-ldap_module or --without-ldap_module was given.
1702 if test "${with_ldap_module+set}" = set; then
1703   withval="$with_ldap_module"
1704   
1705         ol_arg=invalid
1706         for ol_val in static dynamic ; do
1707                 if test "$withval" = "$ol_val" ; then
1708                         ol_arg="$ol_val"
1709                 fi
1710         done
1711         if test "$ol_arg" = "invalid" ; then
1712                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1713         fi
1714         ol_with_ldap_module="$ol_arg"
1715
1716 else
1717         ol_with_ldap_module="static"
1718 fi
1719 # end --with-ldap_module
1720
1721 # OpenLDAP --enable-ldbm
1722         # Check whether --enable-ldbm or --disable-ldbm was given.
1723 if test "${enable_ldbm+set}" = set; then
1724   enableval="$enable_ldbm"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto yes no ; do
1728                 if test "$enableval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1734         fi
1735         ol_enable_ldbm="$ol_arg"
1736
1737 else
1738         ol_enable_ldbm="yes"
1739 fi
1740 # end --enable-ldbm
1741 # OpenLDAP --with-ldbm_module
1742         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1743 if test "${with_ldbm_module+set}" = set; then
1744   withval="$with_ldbm_module"
1745   
1746         ol_arg=invalid
1747         for ol_val in static dynamic ; do
1748                 if test "$withval" = "$ol_val" ; then
1749                         ol_arg="$ol_val"
1750                 fi
1751         done
1752         if test "$ol_arg" = "invalid" ; then
1753                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1754         fi
1755         ol_with_ldbm_module="$ol_arg"
1756
1757 else
1758         ol_with_ldbm_module="static"
1759 fi
1760 # end --with-ldbm_module
1761
1762 # OpenLDAP --with-ldbm_api
1763         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1764 if test "${with_ldbm_api+set}" = set; then
1765   withval="$with_ldbm_api"
1766   
1767         ol_arg=invalid
1768         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1769                 if test "$withval" = "$ol_val" ; then
1770                         ol_arg="$ol_val"
1771                 fi
1772         done
1773         if test "$ol_arg" = "invalid" ; then
1774                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1775         fi
1776         ol_with_ldbm_api="$ol_arg"
1777
1778 else
1779         ol_with_ldbm_api="auto"
1780 fi
1781 # end --with-ldbm_api
1782
1783 # OpenLDAP --with-ldbm_type
1784         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1785 if test "${with_ldbm_type+set}" = set; then
1786   withval="$with_ldbm_type"
1787   
1788         ol_arg=invalid
1789         for ol_val in auto btree hash ; do
1790                 if test "$withval" = "$ol_val" ; then
1791                         ol_arg="$ol_val"
1792                 fi
1793         done
1794         if test "$ol_arg" = "invalid" ; then
1795                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1796         fi
1797         ol_with_ldbm_type="$ol_arg"
1798
1799 else
1800         ol_with_ldbm_type="auto"
1801 fi
1802 # end --with-ldbm_type
1803
1804
1805 # OpenLDAP --enable-passwd
1806         # Check whether --enable-passwd or --disable-passwd was given.
1807 if test "${enable_passwd+set}" = set; then
1808   enableval="$enable_passwd"
1809   
1810         ol_arg=invalid
1811         for ol_val in auto yes no ; do
1812                 if test "$enableval" = "$ol_val" ; then
1813                         ol_arg="$ol_val"
1814                 fi
1815         done
1816         if test "$ol_arg" = "invalid" ; then
1817                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1818         fi
1819         ol_enable_passwd="$ol_arg"
1820
1821 else
1822         ol_enable_passwd="no"
1823 fi
1824 # end --enable-passwd
1825 # OpenLDAP --with-passwd_module
1826         # Check whether --with-passwd_module or --without-passwd_module was given.
1827 if test "${with_passwd_module+set}" = set; then
1828   withval="$with_passwd_module"
1829   
1830         ol_arg=invalid
1831         for ol_val in static dynamic ; do
1832                 if test "$withval" = "$ol_val" ; then
1833                         ol_arg="$ol_val"
1834                 fi
1835         done
1836         if test "$ol_arg" = "invalid" ; then
1837                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1838         fi
1839         ol_with_passwd_module="$ol_arg"
1840
1841 else
1842         ol_with_passwd_module="static"
1843 fi
1844 # end --with-passwd_module
1845
1846 # OpenLDAP --enable-perl
1847         # Check whether --enable-perl or --disable-perl was given.
1848 if test "${enable_perl+set}" = set; then
1849   enableval="$enable_perl"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1859         fi
1860         ol_enable_perl="$ol_arg"
1861
1862 else
1863         ol_enable_perl="no"
1864 fi
1865 # end --enable-perl
1866 # OpenLDAP --with-perl_module
1867         # Check whether --with-perl_module or --without-perl_module was given.
1868 if test "${with_perl_module+set}" = set; then
1869   withval="$with_perl_module"
1870   
1871         ol_arg=invalid
1872         for ol_val in static dynamic ; do
1873                 if test "$withval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1879         fi
1880         ol_with_perl_module="$ol_arg"
1881
1882 else
1883         ol_with_perl_module="static"
1884 fi
1885 # end --with-perl_module
1886
1887 # OpenLDAP --enable-shell
1888         # Check whether --enable-shell or --disable-shell was given.
1889 if test "${enable_shell+set}" = set; then
1890   enableval="$enable_shell"
1891   
1892         ol_arg=invalid
1893         for ol_val in auto yes no ; do
1894                 if test "$enableval" = "$ol_val" ; then
1895                         ol_arg="$ol_val"
1896                 fi
1897         done
1898         if test "$ol_arg" = "invalid" ; then
1899                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1900         fi
1901         ol_enable_shell="$ol_arg"
1902
1903 else
1904         ol_enable_shell="no"
1905 fi
1906 # end --enable-shell
1907 # OpenLDAP --with-shell_module
1908         # Check whether --with-shell_module or --without-shell_module was given.
1909 if test "${with_shell_module+set}" = set; then
1910   withval="$with_shell_module"
1911   
1912         ol_arg=invalid
1913         for ol_val in static dynamic ; do
1914                 if test "$withval" = "$ol_val" ; then
1915                         ol_arg="$ol_val"
1916                 fi
1917         done
1918         if test "$ol_arg" = "invalid" ; then
1919                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1920         fi
1921         ol_with_shell_module="$ol_arg"
1922
1923 else
1924         ol_with_shell_module="static"
1925 fi
1926 # end --with-shell_module
1927
1928 # OpenLDAP --enable-tcl
1929         # Check whether --enable-tcl or --disable-tcl was given.
1930 if test "${enable_tcl+set}" = set; then
1931   enableval="$enable_tcl"
1932   
1933         ol_arg=invalid
1934         for ol_val in auto yes no ; do
1935                 if test "$enableval" = "$ol_val" ; then
1936                         ol_arg="$ol_val"
1937                 fi
1938         done
1939         if test "$ol_arg" = "invalid" ; then
1940                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1941         fi
1942         ol_enable_tcl="$ol_arg"
1943
1944 else
1945         ol_enable_tcl="no"
1946 fi
1947 # end --enable-tcl
1948 # OpenLDAP --with-tcl_module
1949         # Check whether --with-tcl_module or --without-tcl_module was given.
1950 if test "${with_tcl_module+set}" = set; then
1951   withval="$with_tcl_module"
1952   
1953         ol_arg=invalid
1954         for ol_val in static dynamic ; do
1955                 if test "$withval" = "$ol_val" ; then
1956                         ol_arg="$ol_val"
1957                 fi
1958         done
1959         if test "$ol_arg" = "invalid" ; then
1960                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1961         fi
1962         ol_with_tcl_module="$ol_arg"
1963
1964 else
1965         ol_with_tcl_module="static"
1966 fi
1967 # end --with-tcl_module
1968
1969
1970 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1971 if test "${with_xxslurpdoptions+set}" = set; then
1972   withval="$with_xxslurpdoptions"
1973   :
1974 fi
1975
1976 # OpenLDAP --enable-slurpd
1977         # Check whether --enable-slurpd or --disable-slurpd was given.
1978 if test "${enable_slurpd+set}" = set; then
1979   enableval="$enable_slurpd"
1980   
1981         ol_arg=invalid
1982         for ol_val in auto yes no ; do
1983                 if test "$enableval" = "$ol_val" ; then
1984                         ol_arg="$ol_val"
1985                 fi
1986         done
1987         if test "$ol_arg" = "invalid" ; then
1988                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1989         fi
1990         ol_enable_slurpd="$ol_arg"
1991
1992 else
1993         ol_enable_slurpd="auto"
1994 fi
1995 # end --enable-slurpd
1996
1997 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1998 if test "${with_xxliboptions+set}" = set; then
1999   withval="$with_xxliboptions"
2000   :
2001 fi
2002
2003 # Check whether --enable-static or --disable-static was given.
2004 if test "${enable_static+set}" = set; then
2005   enableval="$enable_static"
2006   p=${PACKAGE-default}
2007 case "$enableval" in
2008 yes) enable_static=yes ;;
2009 no) enable_static=no ;;
2010 *)
2011   enable_static=no
2012   # Look at the argument we got.  We use all the common list separators.
2013   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2014   for pkg in $enableval; do
2015     if test "X$pkg" = "X$p"; then
2016       enable_static=yes
2017     fi
2018   done
2019   IFS="$ac_save_ifs"
2020   ;;
2021 esac
2022 else
2023   enable_static=yes
2024 fi
2025
2026 # Check whether --enable-shared or --disable-shared was given.
2027 if test "${enable_shared+set}" = set; then
2028   enableval="$enable_shared"
2029   p=${PACKAGE-default}
2030 case "$enableval" in
2031 yes) enable_shared=yes ;;
2032 no) enable_shared=no ;;
2033 *)
2034   enable_shared=no
2035   # Look at the argument we got.  We use all the common list separators.
2036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2037   for pkg in $enableval; do
2038     if test "X$pkg" = "X$p"; then
2039       enable_shared=yes
2040     fi
2041   done
2042   IFS="$ac_save_ifs"
2043   ;;
2044 esac
2045 else
2046   enable_shared=yes
2047 fi
2048
2049
2050 # validate options
2051 if test $ol_enable_dns = yes ; then
2052         if test $ol_enable_referrals = no ; then
2053                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2054         fi
2055         if test $ol_enable_referrals = auto ; then
2056                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2057                 ol_enable_referrals=yes
2058         fi
2059 fi
2060
2061 if test $ol_enable_slapd = no ; then
2062                 if test $ol_enable_bdb2 = yes ; then
2063                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2064         fi
2065         if test $ol_enable_ldap = yes ; then
2066                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2067         fi
2068         if test $ol_enable_ldbm = yes ; then
2069                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2070         fi
2071         if test $ol_enable_passwd = yes ; then
2072                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2073         fi
2074         if test $ol_enable_perl = yes ; then
2075                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2076         fi
2077         if test $ol_enable_shell = yes ; then
2078                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2079         fi
2080         if test $ol_enable_tcl = yes ; then
2081                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2082         fi
2083         if test $ol_enable_modules = yes ; then
2084                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2085         fi
2086         if test $ol_enable_wrappers = yes ; then
2087                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2088         fi
2089         if test $ol_enable_phonetic = yes ; then
2090                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2091         fi
2092         if test $ol_enable_rlookups = yes ; then
2093                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2094         fi
2095         if test $ol_with_ldbm_api != auto ; then
2096                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2097         fi
2098         if test $ol_with_ldbm_type != auto ; then
2099                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2100         fi
2101         if test $ol_with_bdb2_module != static ; then
2102                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2103         fi
2104         if test $ol_with_ldap_module != static ; then
2105                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2106         fi
2107         if test $ol_with_ldbm_module != static ; then
2108                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2109         fi
2110         if test $ol_with_passwd_module != static ; then
2111                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2112         fi
2113         if test $ol_with_perl_module != static ; then
2114                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2115         fi
2116         if test $ol_with_shell_module != static ; then
2117                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2118         fi
2119         if test $ol_with_tcl_module != static ; then
2120                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2121         fi
2122         if test $ol_enable_slurpd = yes ; then
2123                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2124         fi
2125
2126         # force settings to no
2127         ol_enable_bdb2=no
2128         ol_enable_ldap=no
2129         ol_enable_ldbm=no
2130         ol_enable_passwd=no
2131         ol_enable_perl=no
2132         ol_enable_shell=no
2133         ol_enable_tcl=no
2134
2135         ol_enable_modules=no
2136         ol_enable_phonetic=no
2137         ol_enable_rlookups=no
2138         ol_enable_wrappers=no
2139
2140         ol_with_ldbm_api=no
2141         ol_with_ldbm_type=no
2142
2143         ol_with_bdb2_module=static
2144         ol_with_ldap_module=static
2145         ol_with_ldbm_module=static
2146         ol_with_passwd_module=static
2147         ol_with_perl_module=static
2148         ol_with_shell_module=static
2149         ol_with_tcl_module=static
2150
2151         ol_enable_slurpd=no
2152
2153 elif test $ol_enable_ldbm = no ; then
2154         
2155         if test $ol_with_ldbm_api != auto ; then
2156                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2157         fi
2158
2159         if test $ol_with_ldbm_type != auto ; then
2160                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2161         fi
2162
2163         if test $ol_with_ldbm_module != static ; then
2164                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2165         fi
2166
2167         if test $ol_enable_bdb2 = yes ; then
2168                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2169         fi
2170
2171         if test $ol_enable_modules != yes -a \
2172                 $ol_enable_ldap = no -a \
2173                 $ol_enable_passwd = no -a \
2174                 $ol_enable_perl = no -a \
2175                 $ol_enable_shell = no -a \
2176                 $ol_enable_tcl = no ; then
2177                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2178         fi
2179
2180         ol_with_ldbm_api=no
2181         ol_with_ldbm_type=no
2182         ol_with_ldbm_module=static
2183
2184 elif test $ol_enable_bdb2 = yes ; then
2185         
2186         if test $ol_with_ldbm_api != auto -a \
2187                 $ol_with_ldbm_api != db2 ; then
2188                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2189         fi
2190
2191         ol_with_ldbm_api=db2
2192
2193 else
2194         
2195         if test $ol_enable_bdb2 != no ; then
2196                 if test $ol_with_ldbm_api != auto -a \
2197                         $ol_with_ldbm_api != db2 ; then
2198                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2199                         ol_enable_bdb2=no
2200                 fi
2201         fi
2202
2203         if test $ol_with_ldbm_api = gdbm -a \
2204                 $ol_with_ldbm_type = btree ; then
2205                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2206         fi
2207         if test $ol_with_ldbm_api = mdbm -a \
2208                 $ol_with_ldbm_type = btree ; then
2209                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2210         fi
2211         if test $ol_with_ldbm_api = ndbm -a \
2212                 $ol_with_ldbm_type = btree ; then
2213                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2214         fi
2215 fi
2216
2217 if test $ol_enable_slurpd = yes ; then
2218                 if test $ol_with_threads = no ; then
2219                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2220         fi
2221 fi
2222
2223 echo "$ac_t""done" 1>&6
2224
2225 ## Initialize vars
2226 LDAP_LIBS=
2227 LDIF_LIBS=
2228 LDBM_LIBS=
2229 LTHREAD_LIBS=
2230 LUTIL_LIBS=
2231
2232 LDAPD_LIBS=
2233 SLAPD_LIBS=
2234 SLURPD_LIBS=
2235
2236 BUILD_LDAPD=no
2237 BUILD_SLAPD=no
2238 BUILD_SLURPD=no
2239
2240 BUILD_BDB2=no
2241 BUILD_LDAP=no
2242 BUILD_LDBM=no
2243 BUILD_PASSWD=no
2244 BUILD_PERL=no
2245 BUILD_SHELL=no
2246 BUILD_TCL=no
2247 BUILD_THREAD=no
2248
2249 BUILD_BDB2_DYNAMIC=no
2250 BUILD_LDAP_DYNAMIC=no
2251 BUILD_LDBM_DYNAMIC=no
2252 BUILD_PASSWD_DYNAMIC=no
2253 BUILD_PERL_DYNAMIC=no
2254 BUILD_SHELL_DYNAMIC=no
2255 BUILD_TCL_DYNAMIC=no
2256
2257 SLAPD_MODULES_LDFLAGS=
2258 SLAPD_MODULES_CPPFLAGS=
2259
2260 SLAPD_PERL_LDFLAGS=
2261 SLAPD_PERL_CPPFLAGS=
2262
2263 KRB_LIBS=
2264 READLINE_LIBS=
2265 TERMCAP_LIBS=
2266 TLS_LIBS=
2267
2268
2269
2270 cat >> confdefs.h <<\EOF
2271 #define HAVE_MKVERSION 1
2272 EOF
2273
2274
2275
2276
2277
2278 ol_aix_threads=no
2279 case "$target" in
2280 *-*-aix*)       if test -z "$CC" ; then
2281                 case "$ol_with_threads" in
2282                 auto | yes |  posix) ol_aix_threads=yes ;;
2283                 esac
2284         fi
2285 ;;
2286 esac
2287
2288 if test $ol_aix_threads = yes ; then
2289         if test -z "${CC}" ; then
2290                 for ac_prog in cc_r xlc_r cc
2291 do
2292 # Extract the first word of "$ac_prog", so it can be a program name with args.
2293 set dummy $ac_prog; ac_word=$2
2294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2295 echo "configure:2296: checking for $ac_word" >&5
2296 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2297   echo $ac_n "(cached) $ac_c" 1>&6
2298 else
2299   if test -n "$CC"; then
2300   ac_cv_prog_CC="$CC" # Let the user override the test.
2301 else
2302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2303   ac_dummy="$PATH"
2304   for ac_dir in $ac_dummy; do
2305     test -z "$ac_dir" && ac_dir=.
2306     if test -f $ac_dir/$ac_word; then
2307       ac_cv_prog_CC="$ac_prog"
2308       break
2309     fi
2310   done
2311   IFS="$ac_save_ifs"
2312 fi
2313 fi
2314 CC="$ac_cv_prog_CC"
2315 if test -n "$CC"; then
2316   echo "$ac_t""$CC" 1>&6
2317 else
2318   echo "$ac_t""no" 1>&6
2319 fi
2320
2321 test -n "$CC" && break
2322 done
2323
2324
2325                 if test "$CC" = cc ; then
2326                                                 if test $ol_with_threads != auto ; then
2327                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2328                         else
2329                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2330                         fi
2331                         ol_with_threads=no
2332                 fi
2333         fi
2334
2335         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2336                 ol_with_threads=posix
2337                 ol_cv_pthread_create=yes
2338         fi
2339 fi
2340
2341 if test -z "${CC}"; then
2342         for ac_prog in cc
2343 do
2344 # Extract the first word of "$ac_prog", so it can be a program name with args.
2345 set dummy $ac_prog; ac_word=$2
2346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2347 echo "configure:2348: checking for $ac_word" >&5
2348 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2349   echo $ac_n "(cached) $ac_c" 1>&6
2350 else
2351   if test -n "$CC"; then
2352   ac_cv_prog_CC="$CC" # Let the user override the test.
2353 else
2354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2355   ac_dummy="$PATH"
2356   for ac_dir in $ac_dummy; do
2357     test -z "$ac_dir" && ac_dir=.
2358     if test -f $ac_dir/$ac_word; then
2359       ac_cv_prog_CC="$ac_prog"
2360       break
2361     fi
2362   done
2363   IFS="$ac_save_ifs"
2364 fi
2365 fi
2366 CC="$ac_cv_prog_CC"
2367 if test -n "$CC"; then
2368   echo "$ac_t""$CC" 1>&6
2369 else
2370   echo "$ac_t""no" 1>&6
2371 fi
2372
2373 test -n "$CC" && break
2374 done
2375
2376 fi
2377
2378
2379 # Check whether --enable-fast-install or --disable-fast-install was given.
2380 if test "${enable_fast_install+set}" = set; then
2381   enableval="$enable_fast_install"
2382   p=${PACKAGE-default}
2383 case "$enableval" in
2384 yes) enable_fast_install=yes ;;
2385 no) enable_fast_install=no ;;
2386 *)
2387   enable_fast_install=no
2388   # Look at the argument we got.  We use all the common list separators.
2389   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2390   for pkg in $enableval; do
2391     if test "X$pkg" = "X$p"; then
2392       enable_fast_install=yes
2393     fi
2394   done
2395   IFS="$ac_save_ifs"
2396   ;;
2397 esac
2398 else
2399   enable_fast_install=yes
2400 fi
2401
2402 # Extract the first word of "ranlib", so it can be a program name with args.
2403 set dummy ranlib; ac_word=$2
2404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2405 echo "configure:2406: checking for $ac_word" >&5
2406 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2407   echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409   if test -n "$RANLIB"; then
2410   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2411 else
2412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2413   ac_dummy="$PATH"
2414   for ac_dir in $ac_dummy; do
2415     test -z "$ac_dir" && ac_dir=.
2416     if test -f $ac_dir/$ac_word; then
2417       ac_cv_prog_RANLIB="ranlib"
2418       break
2419     fi
2420   done
2421   IFS="$ac_save_ifs"
2422   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2423 fi
2424 fi
2425 RANLIB="$ac_cv_prog_RANLIB"
2426 if test -n "$RANLIB"; then
2427   echo "$ac_t""$RANLIB" 1>&6
2428 else
2429   echo "$ac_t""no" 1>&6
2430 fi
2431
2432 # Extract the first word of "gcc", so it can be a program name with args.
2433 set dummy gcc; ac_word=$2
2434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_word" >&5
2436 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   if test -n "$CC"; then
2440   ac_cv_prog_CC="$CC" # Let the user override the test.
2441 else
2442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2443   ac_dummy="$PATH"
2444   for ac_dir in $ac_dummy; do
2445     test -z "$ac_dir" && ac_dir=.
2446     if test -f $ac_dir/$ac_word; then
2447       ac_cv_prog_CC="gcc"
2448       break
2449     fi
2450   done
2451   IFS="$ac_save_ifs"
2452 fi
2453 fi
2454 CC="$ac_cv_prog_CC"
2455 if test -n "$CC"; then
2456   echo "$ac_t""$CC" 1>&6
2457 else
2458   echo "$ac_t""no" 1>&6
2459 fi
2460
2461 if test -z "$CC"; then
2462   # Extract the first word of "cc", so it can be a program name with args.
2463 set dummy cc; ac_word=$2
2464 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2465 echo "configure:2466: checking for $ac_word" >&5
2466 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2467   echo $ac_n "(cached) $ac_c" 1>&6
2468 else
2469   if test -n "$CC"; then
2470   ac_cv_prog_CC="$CC" # Let the user override the test.
2471 else
2472   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2473   ac_prog_rejected=no
2474   ac_dummy="$PATH"
2475   for ac_dir in $ac_dummy; do
2476     test -z "$ac_dir" && ac_dir=.
2477     if test -f $ac_dir/$ac_word; then
2478       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2479         ac_prog_rejected=yes
2480         continue
2481       fi
2482       ac_cv_prog_CC="cc"
2483       break
2484     fi
2485   done
2486   IFS="$ac_save_ifs"
2487 if test $ac_prog_rejected = yes; then
2488   # We found a bogon in the path, so make sure we never use it.
2489   set dummy $ac_cv_prog_CC
2490   shift
2491   if test $# -gt 0; then
2492     # We chose a different compiler from the bogus one.
2493     # However, it has the same basename, so the bogon will be chosen
2494     # first if we set CC to just the basename; use the full file name.
2495     shift
2496     set dummy "$ac_dir/$ac_word" "$@"
2497     shift
2498     ac_cv_prog_CC="$@"
2499   fi
2500 fi
2501 fi
2502 fi
2503 CC="$ac_cv_prog_CC"
2504 if test -n "$CC"; then
2505   echo "$ac_t""$CC" 1>&6
2506 else
2507   echo "$ac_t""no" 1>&6
2508 fi
2509
2510   if test -z "$CC"; then
2511     case "`uname -s`" in
2512     *win32* | *WIN32* | *CYGWIN*)
2513       # Extract the first word of "cl", so it can be a program name with args.
2514 set dummy cl; ac_word=$2
2515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2516 echo "configure:2517: checking for $ac_word" >&5
2517 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   if test -n "$CC"; then
2521   ac_cv_prog_CC="$CC" # Let the user override the test.
2522 else
2523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2524   ac_dummy="$PATH"
2525   for ac_dir in $ac_dummy; do
2526     test -z "$ac_dir" && ac_dir=.
2527     if test -f $ac_dir/$ac_word; then
2528       ac_cv_prog_CC="cl"
2529       break
2530     fi
2531   done
2532   IFS="$ac_save_ifs"
2533 fi
2534 fi
2535 CC="$ac_cv_prog_CC"
2536 if test -n "$CC"; then
2537   echo "$ac_t""$CC" 1>&6
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541  ;;
2542     esac
2543   fi
2544   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2545 fi
2546
2547 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2548 echo "configure:2549: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2549
2550 ac_ext=c
2551 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2552 ac_cpp='$CPP $CPPFLAGS'
2553 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2554 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2555 cross_compiling=$ac_cv_prog_cc_cross
2556
2557 cat > conftest.$ac_ext << EOF
2558
2559 #line 2560 "configure"
2560 #include "confdefs.h"
2561
2562 main(){return(0);}
2563 EOF
2564 if { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2565   ac_cv_prog_cc_works=yes
2566   # If we can't run a trivial program, we are probably using a cross compiler.
2567   if (./conftest; exit) 2>/dev/null; then
2568     ac_cv_prog_cc_cross=no
2569   else
2570     ac_cv_prog_cc_cross=yes
2571   fi
2572 else
2573   echo "configure: failed program was:" >&5
2574   cat conftest.$ac_ext >&5
2575   ac_cv_prog_cc_works=no
2576 fi
2577 rm -fr conftest*
2578 ac_ext=c
2579 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2580 ac_cpp='$CPP $CPPFLAGS'
2581 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2582 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2583 cross_compiling=$ac_cv_prog_cc_cross
2584
2585 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2586 if test $ac_cv_prog_cc_works = no; then
2587   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2588 fi
2589 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2590 echo "configure:2591: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2591 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2592 cross_compiling=$ac_cv_prog_cc_cross
2593
2594 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2595 echo "configure:2596: checking whether we are using GNU C" >&5
2596 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2597   echo $ac_n "(cached) $ac_c" 1>&6
2598 else
2599   cat > conftest.c <<EOF
2600 #ifdef __GNUC__
2601   yes;
2602 #endif
2603 EOF
2604 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2605   ac_cv_prog_gcc=yes
2606 else
2607   ac_cv_prog_gcc=no
2608 fi
2609 fi
2610
2611 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2612
2613 if test $ac_cv_prog_gcc = yes; then
2614   GCC=yes
2615 else
2616   GCC=
2617 fi
2618
2619 ac_test_CFLAGS="${CFLAGS+set}"
2620 ac_save_CFLAGS="$CFLAGS"
2621 CFLAGS=
2622 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2623 echo "configure:2624: checking whether ${CC-cc} accepts -g" >&5
2624 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2625   echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627   echo 'void f(){}' > conftest.c
2628 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2629   ac_cv_prog_cc_g=yes
2630 else
2631   ac_cv_prog_cc_g=no
2632 fi
2633 rm -f conftest*
2634
2635 fi
2636
2637 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2638 if test "$ac_test_CFLAGS" = set; then
2639   CFLAGS="$ac_save_CFLAGS"
2640 elif test $ac_cv_prog_cc_g = yes; then
2641   if test "$GCC" = yes; then
2642     CFLAGS="-g -O2"
2643   else
2644     CFLAGS="-g"
2645   fi
2646 else
2647   if test "$GCC" = yes; then
2648     CFLAGS="-O2"
2649   else
2650     CFLAGS=
2651   fi
2652 fi
2653
2654 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2655 if test "${with_gnu_ld+set}" = set; then
2656   withval="$with_gnu_ld"
2657   test "$withval" = no || with_gnu_ld=yes
2658 else
2659   with_gnu_ld=no
2660 fi
2661
2662 ac_prog=ld
2663 if test "$ac_cv_prog_gcc" = yes; then
2664   # Check if gcc -print-prog-name=ld gives a path.
2665   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2666 echo "configure:2667: checking for ld used by GCC" >&5
2667   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2668   case "$ac_prog" in
2669     # Accept absolute paths.
2670     [\\/]* | [A-Za-z]:[\\/]*)
2671       re_direlt='/[^/][^/]*/\.\./'
2672       # Canonicalize the path of ld
2673       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2674       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2675         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2676       done
2677       test -z "$LD" && LD="$ac_prog"
2678       ;;
2679   "")
2680     # If it fails, then pretend we aren't using GCC.
2681     ac_prog=ld
2682     ;;
2683   *)
2684     # If it is relative, then search for the first ld in PATH.
2685     with_gnu_ld=unknown
2686     ;;
2687   esac
2688 elif test "$with_gnu_ld" = yes; then
2689   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2690 echo "configure:2691: checking for GNU ld" >&5
2691 else
2692   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2693 echo "configure:2694: checking for non-GNU ld" >&5
2694 fi
2695 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2696   echo $ac_n "(cached) $ac_c" 1>&6
2697 else
2698   if test -z "$LD"; then
2699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2700   for ac_dir in $PATH; do
2701     test -z "$ac_dir" && ac_dir=.
2702     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2703       ac_cv_path_LD="$ac_dir/$ac_prog"
2704       # Check to see if the program is GNU ld.  I'd rather use --version,
2705       # but apparently some GNU ld's only accept -v.
2706       # Break only if it was the GNU/non-GNU ld that we prefer.
2707       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2708         test "$with_gnu_ld" != no && break
2709       else
2710         test "$with_gnu_ld" != yes && break
2711       fi
2712     fi
2713   done
2714   IFS="$ac_save_ifs"
2715 else
2716   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2717 fi
2718 fi
2719
2720 LD="$ac_cv_path_LD"
2721 if test -n "$LD"; then
2722   echo "$ac_t""$LD" 1>&6
2723 else
2724   echo "$ac_t""no" 1>&6
2725 fi
2726 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2727
2728 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2729 echo "configure:2730: checking if the linker ($LD) is GNU ld" >&5
2730 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2731   echo $ac_n "(cached) $ac_c" 1>&6
2732 else
2733   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2734 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2735   ac_cv_prog_gnu_ld=yes
2736 else
2737   ac_cv_prog_gnu_ld=no
2738 fi
2739 fi
2740
2741 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2742
2743
2744 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2745 echo "configure:2746: checking for BSD-compatible nm" >&5
2746 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2747   echo $ac_n "(cached) $ac_c" 1>&6
2748 else
2749   if test -n "$NM"; then
2750   # Let the user override the test.
2751   ac_cv_path_NM="$NM"
2752 else
2753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2754   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2755     test -z "$ac_dir" && ac_dir=.
2756     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2757       # Check to see if the nm accepts a BSD-compat flag.
2758       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2759       #   nm: unknown option "B" ignored
2760       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2761         ac_cv_path_NM="$ac_dir/nm -B"
2762         break
2763       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2764         ac_cv_path_NM="$ac_dir/nm -p"
2765         break
2766       else
2767         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2768         continue # so that we can try to find one that supports BSD flags
2769       fi
2770     fi
2771   done
2772   IFS="$ac_save_ifs"
2773   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2774 fi
2775 fi
2776
2777 NM="$ac_cv_path_NM"
2778 echo "$ac_t""$NM" 1>&6
2779
2780
2781 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2782 echo "configure:2783: checking whether ln -s works" >&5
2783 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2784   echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786   rm -f conftestdata
2787 if ln -s X conftestdata 2>/dev/null
2788 then
2789   rm -f conftestdata
2790   ac_cv_prog_LN_S="ln -s"
2791 else
2792   ac_cv_prog_LN_S=ln
2793 fi
2794 fi
2795 LN_S="$ac_cv_prog_LN_S"
2796 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2797   echo "$ac_t""yes" 1>&6
2798 else
2799   echo "$ac_t""no" 1>&6
2800 fi
2801
2802
2803 # Check for any special flags to pass to ltconfig.
2804 libtool_flags="--cache-file=$cache_file"
2805 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2806 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2807 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2808 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2809 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2810
2811
2812 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2813 if test "${enable_libtool_lock+set}" = set; then
2814   enableval="$enable_libtool_lock"
2815   :
2816 fi
2817
2818 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2819 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2820
2821 # Some flags need to be propagated to the compiler or linker for good
2822 # libtool support.
2823 case "$host" in
2824 *-*-irix6*)
2825   # Find out which ABI we are using.
2826   echo '#line 2827 "configure"' > conftest.$ac_ext
2827   if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2828     case "`/usr/bin/file conftest.o`" in
2829     *32-bit*)
2830       LD="${LD-ld} -32"
2831       ;;
2832     *N32*)
2833       LD="${LD-ld} -n32"
2834       ;;
2835     *64-bit*)
2836       LD="${LD-ld} -64"
2837       ;;
2838     esac
2839   fi
2840   rm -rf conftest*
2841   ;;
2842
2843 *-*-sco3.2v5*)
2844   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2845   SAVE_CFLAGS="$CFLAGS"
2846   CFLAGS="$CFLAGS -belf"
2847   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2848 echo "configure:2849: checking whether the C compiler needs -belf" >&5
2849 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2850   echo $ac_n "(cached) $ac_c" 1>&6
2851 else
2852   cat > conftest.$ac_ext <<EOF
2853 #line 2854 "configure"
2854 #include "confdefs.h"
2855
2856 int main() {
2857
2858 ; return 0; }
2859 EOF
2860 if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2861   rm -rf conftest*
2862   lt_cv_cc_needs_belf=yes
2863 else
2864   echo "configure: failed program was:" >&5
2865   cat conftest.$ac_ext >&5
2866   rm -rf conftest*
2867   lt_cv_cc_needs_belf=no
2868 fi
2869 rm -f conftest*
2870 fi
2871
2872 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2873   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2874     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2875     CFLAGS="$SAVE_CFLAGS"
2876   fi
2877   ;;
2878
2879
2880 esac
2881
2882
2883 # Save cache, so that ltconfig can load it
2884
2885
2886 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2887 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2888 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2889 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2890 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2891 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2892 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2893 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2894
2895 # Reload cache, that may have been modified by ltconfig
2896
2897
2898 # This can be used to rebuild libtool when needed
2899 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2900
2901 # Always use our own libtool.
2902 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2903
2904 # Redirect the config.log output again, so that the ltconfig log is not
2905 # clobbered by the next message.
2906 exec 5>>./config.log
2907
2908
2909 for ac_prog in mawk gawk nawk awk
2910 do
2911 # Extract the first word of "$ac_prog", so it can be a program name with args.
2912 set dummy $ac_prog; ac_word=$2
2913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2914 echo "configure:2915: checking for $ac_word" >&5
2915 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2916   echo $ac_n "(cached) $ac_c" 1>&6
2917 else
2918   if test -n "$AWK"; then
2919   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2920 else
2921   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2922   ac_dummy="$PATH"
2923   for ac_dir in $ac_dummy; do
2924     test -z "$ac_dir" && ac_dir=.
2925     if test -f $ac_dir/$ac_word; then
2926       ac_cv_prog_AWK="$ac_prog"
2927       break
2928     fi
2929   done
2930   IFS="$ac_save_ifs"
2931 fi
2932 fi
2933 AWK="$ac_cv_prog_AWK"
2934 if test -n "$AWK"; then
2935   echo "$ac_t""$AWK" 1>&6
2936 else
2937   echo "$ac_t""no" 1>&6
2938 fi
2939
2940 test -n "$AWK" && break
2941 done
2942
2943 # test for ln hardlink support
2944 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2945 echo "configure:2946: checking whether ln works" >&5
2946 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   rm -f conftest.src conftest.dst
2950 echo "conftest" > conftest.src
2951 if ln conftest.src conftest.dst 2>/dev/null
2952 then
2953   ol_cv_prog_LN_H="ln"
2954 else
2955   ol_cv_prog_LN_H="cp"
2956 fi
2957 rm -f conftest.src conftest.dst
2958
2959 fi
2960 LN_H="$ol_cv_prog_LN_H"
2961 if test "$ol_cv_prog_LN_H" = "ln"; then
2962         echo "$ac_t""yes" 1>&6
2963 else
2964         echo "$ac_t""no" 1>&6
2965 fi
2966
2967 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2968 echo "configure:2969: checking whether ln -s works" >&5
2969 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2970   echo $ac_n "(cached) $ac_c" 1>&6
2971 else
2972   rm -f conftestdata
2973 if ln -s X conftestdata 2>/dev/null
2974 then
2975   rm -f conftestdata
2976   ac_cv_prog_LN_S="ln -s"
2977 else
2978   ac_cv_prog_LN_S=ln
2979 fi
2980 fi
2981 LN_S="$ac_cv_prog_LN_S"
2982 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2983   echo "$ac_t""yes" 1>&6
2984 else
2985   echo "$ac_t""no" 1>&6
2986 fi
2987
2988
2989 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2990         LN_S="$LN_H"
2991 fi
2992
2993 # Extract the first word of "sendmail", so it can be a program name with args.
2994 set dummy sendmail; ac_word=$2
2995 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2996 echo "configure:2997: checking for $ac_word" >&5
2997 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   case "$SENDMAIL" in
3001   /*)
3002   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3003   ;;
3004   ?:/*)                  
3005   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3006   ;;
3007   *)
3008   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3009   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3010   for ac_dir in $ac_dummy; do 
3011     test -z "$ac_dir" && ac_dir=.
3012     if test -f $ac_dir/$ac_word; then
3013       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3014       break
3015     fi
3016   done
3017   IFS="$ac_save_ifs"
3018   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3019   ;;
3020 esac
3021 fi
3022 SENDMAIL="$ac_cv_path_SENDMAIL"
3023 if test -n "$SENDMAIL"; then
3024   echo "$ac_t""$SENDMAIL" 1>&6
3025 else
3026   echo "$ac_t""no" 1>&6
3027 fi
3028
3029 # Extract the first word of "vi", so it can be a program name with args.
3030 set dummy vi; ac_word=$2
3031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_word" >&5
3033 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   case "$EDITOR" in
3037   /*)
3038   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3039   ;;
3040   ?:/*)                  
3041   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3042   ;;
3043   *)
3044   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3045   ac_dummy="$PATH:/usr/ucb"
3046   for ac_dir in $ac_dummy; do 
3047     test -z "$ac_dir" && ac_dir=.
3048     if test -f $ac_dir/$ac_word; then
3049       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3050       break
3051     fi
3052   done
3053   IFS="$ac_save_ifs"
3054   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3055   ;;
3056 esac
3057 fi
3058 EDITOR="$ac_cv_path_EDITOR"
3059 if test -n "$EDITOR"; then
3060   echo "$ac_t""$EDITOR" 1>&6
3061 else
3062   echo "$ac_t""no" 1>&6
3063 fi
3064
3065 # Extract the first word of "finger", so it can be a program name with args.
3066 set dummy finger; ac_word=$2
3067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3068 echo "configure:3069: checking for $ac_word" >&5
3069 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   case "$FINGER" in
3073   /*)
3074   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3075   ;;
3076   ?:/*)                  
3077   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3078   ;;
3079   *)
3080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3081   ac_dummy="$PATH:/usr/ucb"
3082   for ac_dir in $ac_dummy; do 
3083     test -z "$ac_dir" && ac_dir=.
3084     if test -f $ac_dir/$ac_word; then
3085       ac_cv_path_FINGER="$ac_dir/$ac_word"
3086       break
3087     fi
3088   done
3089   IFS="$ac_save_ifs"
3090   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3091   ;;
3092 esac
3093 fi
3094 FINGER="$ac_cv_path_FINGER"
3095 if test -n "$FINGER"; then
3096   echo "$ac_t""$FINGER" 1>&6
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100
3101
3102 ol_link_perl=no
3103 if test $ol_enable_perl != no ; then
3104         # Extract the first word of "perl", so it can be a program name with args.
3105 set dummy perl; ac_word=$2
3106 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3107 echo "configure:3108: checking for $ac_word" >&5
3108 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3109   echo $ac_n "(cached) $ac_c" 1>&6
3110 else
3111   case "$PERLBIN" in
3112   /*)
3113   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3114   ;;
3115   ?:/*)                  
3116   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3117   ;;
3118   *)
3119   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3120   ac_dummy="$PATH"
3121   for ac_dir in $ac_dummy; do 
3122     test -z "$ac_dir" && ac_dir=.
3123     if test -f $ac_dir/$ac_word; then
3124       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3125       break
3126     fi
3127   done
3128   IFS="$ac_save_ifs"
3129   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3130   ;;
3131 esac
3132 fi
3133 PERLBIN="$ac_cv_path_PERLBIN"
3134 if test -n "$PERLBIN"; then
3135   echo "$ac_t""$PERLBIN" 1>&6
3136 else
3137   echo "$ac_t""no" 1>&6
3138 fi
3139
3140
3141         if test "no$PERLBIN" = "no" ; then
3142                 if test $ol_enable_perl = yes ; then
3143                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3144                 fi
3145
3146         else
3147                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3148                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3149
3150                                 ol_link_perl=yes
3151         fi
3152 fi
3153
3154 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3155 echo "configure:3156: checking how to run the C preprocessor" >&5
3156 # On Suns, sometimes $CPP names a directory.
3157 if test -n "$CPP" && test -d "$CPP"; then
3158   CPP=
3159 fi
3160 if test -z "$CPP"; then
3161 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3162   echo $ac_n "(cached) $ac_c" 1>&6
3163 else
3164     # This must be in double quotes, not single quotes, because CPP may get
3165   # substituted into the Makefile and "${CC-cc}" will confuse make.
3166   CPP="${CC-cc} -E"
3167   # On the NeXT, cc -E runs the code through the compiler's parser,
3168   # not just through cpp.
3169   cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <assert.h>
3173 Syntax Error
3174 EOF
3175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3176 { (eval echo configure:3177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3178 if test -z "$ac_err"; then
3179   :
3180 else
3181   echo "$ac_err" >&5
3182   echo "configure: failed program was:" >&5
3183   cat conftest.$ac_ext >&5
3184   rm -rf conftest*
3185   CPP="${CC-cc} -E -traditional-cpp"
3186   cat > conftest.$ac_ext <<EOF
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189 #include <assert.h>
3190 Syntax Error
3191 EOF
3192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3193 { (eval echo configure:3194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3195 if test -z "$ac_err"; then
3196   :
3197 else
3198   echo "$ac_err" >&5
3199   echo "configure: failed program was:" >&5
3200   cat conftest.$ac_ext >&5
3201   rm -rf conftest*
3202   CPP="${CC-cc} -nologo -E"
3203   cat > conftest.$ac_ext <<EOF
3204 #line 3205 "configure"
3205 #include "confdefs.h"
3206 #include <assert.h>
3207 Syntax Error
3208 EOF
3209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3210 { (eval echo configure:3211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3212 if test -z "$ac_err"; then
3213   :
3214 else
3215   echo "$ac_err" >&5
3216   echo "configure: failed program was:" >&5
3217   cat conftest.$ac_ext >&5
3218   rm -rf conftest*
3219   CPP=/lib/cpp
3220 fi
3221 rm -f conftest*
3222 fi
3223 rm -f conftest*
3224 fi
3225 rm -f conftest*
3226   ac_cv_prog_CPP="$CPP"
3227 fi
3228   CPP="$ac_cv_prog_CPP"
3229 else
3230   ac_cv_prog_CPP="$CPP"
3231 fi
3232 echo "$ac_t""$CPP" 1>&6
3233
3234
3235 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3236         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3237
3238 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3239         echo "configure: warning: programs compiled here do run here..." 1>&2
3240         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3241
3242 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3243         echo "configure: warning: programs compiled here do not run here..." 1>&2
3244         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3245 fi
3246
3247 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3248 echo "configure:3249: checking for AIX" >&5
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #ifdef _AIX
3253   yes
3254 #endif
3255
3256 EOF
3257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3258   egrep "yes" >/dev/null 2>&1; then
3259   rm -rf conftest*
3260   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3261 #define _ALL_SOURCE 1
3262 EOF
3263
3264 else
3265   rm -rf conftest*
3266   echo "$ac_t""no" 1>&6
3267 fi
3268 rm -f conftest*
3269
3270
3271 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3272 echo "configure:3273: checking for POSIXized ISC" >&5
3273 if test -d /etc/conf/kconfig.d &&
3274   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3275 then
3276   echo "$ac_t""yes" 1>&6
3277   ISC=yes # If later tests want to check for ISC.
3278   cat >> confdefs.h <<\EOF
3279 #define _POSIX_SOURCE 1
3280 EOF
3281
3282   if test "$GCC" = yes; then
3283     CC="$CC -posix"
3284   else
3285     CC="$CC -Xp"
3286   fi
3287 else
3288   echo "$ac_t""no" 1>&6
3289   ISC=
3290 fi
3291
3292 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3293 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3294 echo "configure:3295: checking for minix/config.h" >&5
3295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3296   echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298   cat > conftest.$ac_ext <<EOF
3299 #line 3300 "configure"
3300 #include "confdefs.h"
3301 #include <minix/config.h>
3302 EOF
3303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3304 { (eval echo configure:3305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3306 if test -z "$ac_err"; then
3307   rm -rf conftest*
3308   eval "ac_cv_header_$ac_safe=yes"
3309 else
3310   echo "$ac_err" >&5
3311   echo "configure: failed program was:" >&5
3312   cat conftest.$ac_ext >&5
3313   rm -rf conftest*
3314   eval "ac_cv_header_$ac_safe=no"
3315 fi
3316 rm -f conftest*
3317 fi
3318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3319   echo "$ac_t""yes" 1>&6
3320   MINIX=yes
3321 else
3322   echo "$ac_t""no" 1>&6
3323 MINIX=
3324 fi
3325
3326 if test "$MINIX" = yes; then
3327   cat >> confdefs.h <<\EOF
3328 #define _POSIX_SOURCE 1
3329 EOF
3330
3331   cat >> confdefs.h <<\EOF
3332 #define _POSIX_1_SOURCE 2
3333 EOF
3334
3335   cat >> confdefs.h <<\EOF
3336 #define _MINIX 1
3337 EOF
3338
3339 fi
3340
3341
3342 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3343 echo "configure:3344: checking for Cygwin environment" >&5
3344 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3345   echo $ac_n "(cached) $ac_c" 1>&6
3346 else
3347   cat > conftest.$ac_ext <<EOF
3348 #line 3349 "configure"
3349 #include "confdefs.h"
3350
3351 int main() {
3352
3353 #ifndef __CYGWIN__
3354 #define __CYGWIN__ __CYGWIN32__
3355 #endif
3356 return __CYGWIN__;
3357 ; return 0; }
3358 EOF
3359 if { (eval echo configure:3360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3360   rm -rf conftest*
3361   ac_cv_cygwin=yes
3362 else
3363   echo "configure: failed program was:" >&5
3364   cat conftest.$ac_ext >&5
3365   rm -rf conftest*
3366   ac_cv_cygwin=no
3367 fi
3368 rm -f conftest*
3369 fi
3370
3371 echo "$ac_t""$ac_cv_cygwin" 1>&6
3372 CYGWIN=
3373 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3374 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3375 echo "configure:3376: checking for mingw32 environment" >&5
3376 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3377   echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379   cat > conftest.$ac_ext <<EOF
3380 #line 3381 "configure"
3381 #include "confdefs.h"
3382
3383 int main() {
3384 return __MINGW32__;
3385 ; return 0; }
3386 EOF
3387 if { (eval echo configure:3388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3388   rm -rf conftest*
3389   ac_cv_mingw32=yes
3390 else
3391   echo "configure: failed program was:" >&5
3392   cat conftest.$ac_ext >&5
3393   rm -rf conftest*
3394   ac_cv_mingw32=no
3395 fi
3396 rm -f conftest*
3397 fi
3398
3399 echo "$ac_t""$ac_cv_mingw32" 1>&6
3400 MINGW32=
3401 test "$ac_cv_mingw32" = yes && MINGW32=yes
3402 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3403 echo "configure:3404: checking for EMX OS/2 environment" >&5
3404 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3405   echo $ac_n "(cached) $ac_c" 1>&6
3406 else
3407   cat > conftest.$ac_ext <<EOF
3408 #line 3409 "configure"
3409 #include "confdefs.h"
3410
3411 int main() {
3412 return __EMX__;
3413 ; return 0; }
3414 EOF
3415 if { (eval echo configure:3416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3416   rm -rf conftest*
3417   ac_cv_emxos2=yes
3418 else
3419   echo "configure: failed program was:" >&5
3420   cat conftest.$ac_ext >&5
3421   rm -rf conftest*
3422   ac_cv_emxos2=no
3423 fi
3424 rm -f conftest*
3425 fi
3426
3427 echo "$ac_t""$ac_cv_emxos2" 1>&6
3428 EMXOS2=
3429 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3430
3431
3432
3433 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3434 echo "configure:3435: checking for executable suffix" >&5
3435 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3439   ac_cv_exeext=.exe
3440 else
3441   rm -f conftest*
3442   echo 'int main () { return 0; }' > conftest.$ac_ext
3443   ac_cv_exeext=
3444   if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3445     for file in conftest.*; do
3446       case $file in
3447       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3448       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3449       esac
3450     done
3451   else
3452     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3453   fi
3454   rm -f conftest*
3455   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3456 fi
3457 fi
3458
3459 EXEEXT=""
3460 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3461 echo "$ac_t""${ac_cv_exeext}" 1>&6
3462 ac_exeext=$EXEEXT
3463
3464 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3465 echo "configure:3466: checking for object suffix" >&5
3466 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3467   echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469   rm -f conftest*
3470 echo 'int i = 1;' > conftest.$ac_ext
3471 if { (eval echo configure:3472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3472   for ac_file in conftest.*; do
3473     case $ac_file in
3474     *.c) ;;
3475     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3476     esac
3477   done
3478 else
3479   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3480 fi
3481 rm -f conftest*
3482 fi
3483
3484 echo "$ac_t""$ac_cv_objext" 1>&6
3485 OBJEXT=$ac_cv_objext
3486 ac_objext=$ac_cv_objext
3487
3488
3489 cat >> confdefs.h <<EOF
3490 #define EXEEXT "${EXEEXT}"
3491 EOF
3492
3493
3494 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3495 echo "configure:3496: checking for be_app in -lbe" >&5
3496 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   ac_save_LIBS="$LIBS"
3501 LIBS="-lbe -lroot -lnet $LIBS"
3502 cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 /* Override any gcc2 internal prototype to avoid an error.  */
3506 /* We use char because int might match the return type of a gcc2
3507     builtin and then its argument prototype would still apply.  */
3508 char be_app();
3509
3510 int main() {
3511 be_app()
3512 ; return 0; }
3513 EOF
3514 if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3515   rm -rf conftest*
3516   eval "ac_cv_lib_$ac_lib_var=yes"
3517 else
3518   echo "configure: failed program was:" >&5
3519   cat conftest.$ac_ext >&5
3520   rm -rf conftest*
3521   eval "ac_cv_lib_$ac_lib_var=no"
3522 fi
3523 rm -f conftest*
3524 LIBS="$ac_save_LIBS"
3525
3526 fi
3527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3528   echo "$ac_t""yes" 1>&6
3529   LIBS="$LIBS -lbe -lroot -lnet"
3530 else
3531   echo "$ac_t""no" 1>&6
3532 :
3533 fi
3534
3535
3536
3537
3538
3539 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3540 echo "configure:3541: checking for ${CC-cc} option to accept ANSI C" >&5
3541 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   am_cv_prog_cc_stdc=no
3545 ac_save_CC="$CC"
3546 # Don't try gcc -ansi; that turns off useful extensions and
3547 # breaks some systems' header files.
3548 # AIX                   -qlanglvl=ansi
3549 # Ultrix and OSF/1      -std1
3550 # HP-UX 10.20 and later -Ae
3551 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3552 # SVR4                  -Xc -D__EXTENSIONS__
3553 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3554 do
3555   CC="$ac_save_CC $ac_arg"
3556   cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3559 #include <stdarg.h>
3560 #include <stdio.h>
3561 #include <sys/types.h>
3562 #include <sys/stat.h>
3563 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3564 struct buf { int x; };
3565 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3566 static char *e (p, i)
3567      char **p;
3568      int i;
3569 {
3570   return p[i];
3571 }
3572 static char *f (char * (*g) (char **, int), char **p, ...)
3573 {
3574   char *s;
3575   va_list v;
3576   va_start (v,p);
3577   s = g (p, va_arg (v,int));
3578   va_end (v);
3579   return s;
3580 }
3581 int test (int i, double x);
3582 struct s1 {int (*f) (int a);};
3583 struct s2 {int (*f) (double a);};
3584 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3585 int argc;
3586 char **argv;
3587
3588 int main() {
3589
3590 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3591
3592 ; return 0; }
3593 EOF
3594 if { (eval echo configure:3595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3595   rm -rf conftest*
3596   am_cv_prog_cc_stdc="$ac_arg"; break
3597 else
3598   echo "configure: failed program was:" >&5
3599   cat conftest.$ac_ext >&5
3600 fi
3601 rm -f conftest*
3602 done
3603 CC="$ac_save_CC"
3604
3605 fi
3606
3607 if test -z "$am_cv_prog_cc_stdc"; then
3608   echo "$ac_t""none needed" 1>&6
3609 else
3610   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3611 fi
3612 case "x$am_cv_prog_cc_stdc" in
3613   x|xno) ;;
3614   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3615 esac
3616
3617 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3618         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3619 fi
3620
3621 # test for make depend flag
3622 OL_MKDEP=
3623 OL_MKDEP_FLAGS=
3624 if test -z "${MKDEP}"; then
3625         OL_MKDEP="${CC-cc}"
3626         if test -z "${MKDEP_FLAGS}"; then
3627                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3628 echo "configure:3629: checking for ${OL_MKDEP} depend flag" >&5
3629 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632   
3633                         ol_cv_mkdep=no
3634                         for flag in "-M" "-xM"; do
3635                                 cat > conftest.c <<EOF
3636  noCode;
3637 EOF
3638                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3639                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3640                                 then
3641                                         if test ! -f conftest."${ac_object}" ; then
3642                                                 ol_cv_mkdep=$flag
3643                                                 OL_MKDEP_FLAGS="$flag"
3644                                                 break
3645                                         fi
3646                                 fi
3647                         done
3648                         rm -f conftest*
3649                 
3650 fi
3651
3652 echo "$ac_t""$ol_cv_mkdep" 1>&6
3653         else
3654                 cc_cv_mkdep=yes
3655                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3656         fi
3657 else
3658         cc_cv_mkdep=yes
3659         OL_MKDEP="${MKDEP}"
3660         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3661 fi
3662
3663
3664
3665 if test "${ol_cv_mkdep}" = no ; then
3666         # this will soon become an error
3667         echo "configure: warning: do not know how to generate dependencies" 1>&2
3668 fi
3669
3670 ol_link_modules=no
3671 if test $ol_enable_modules != no ; then
3672         # Extract the first word of "glib-config", so it can be a program name with args.
3673 set dummy glib-config; ac_word=$2
3674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3675 echo "configure:3676: checking for $ac_word" >&5
3676 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   case "$GLIBCONFIG" in
3680   /*)
3681   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
3682   ;;
3683   ?:/*)                  
3684   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
3685   ;;
3686   *)
3687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3688   ac_dummy="$PATH"
3689   for ac_dir in $ac_dummy; do 
3690     test -z "$ac_dir" && ac_dir=.
3691     if test -f $ac_dir/$ac_word; then
3692       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
3693       break
3694     fi
3695   done
3696   IFS="$ac_save_ifs"
3697   ;;
3698 esac
3699 fi
3700 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
3701 if test -n "$GLIBCONFIG"; then
3702   echo "$ac_t""$GLIBCONFIG" 1>&6
3703 else
3704   echo "$ac_t""no" 1>&6
3705 fi
3706
3707
3708         if test "no$GLIBCONFIG" = "no" ; then
3709                 if test $ol_enable_modules = yes ; then
3710                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
3711                 fi
3712
3713         else
3714                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
3715                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
3716                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
3717
3718                                 ol_link_modules=yes
3719         fi
3720 else
3721         ol_with_bdb2_module=static
3722         ol_with_ldap_module=static
3723         ol_with_ldbm_module=static
3724         ol_with_passwd_module=static
3725         ol_with_perl_module=static
3726         ol_with_shell_module=static
3727         ol_with_tcl_module=static
3728 fi
3729
3730 # test for EBCDIC
3731 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3732 echo "configure:3733: checking for EBCDIC" >&5
3733 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3734   echo $ac_n "(cached) $ac_c" 1>&6
3735 else
3736   
3737         cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740
3741 #if !('M' == 0xd4)
3742 #include <__ASCII__/generate_error.h>
3743 #endif
3744
3745 EOF
3746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3747 { (eval echo configure:3748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3749 if test -z "$ac_err"; then
3750   rm -rf conftest*
3751   ol_cv_cpp_ebcdic=yes
3752 else
3753   echo "$ac_err" >&5
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ol_cv_cpp_ebcdic=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3763 if test $ol_cv_cpp_ebcdic = yes ; then
3764         cat >> confdefs.h <<\EOF
3765 #define HAVE_EBCDIC 1
3766 EOF
3767
3768 fi
3769
3770 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3771 echo "configure:3772: checking for ANSI C header files" >&5
3772 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3773   echo $ac_n "(cached) $ac_c" 1>&6
3774 else
3775   cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 #include <stdlib.h>
3779 #include <stdarg.h>
3780 #include <string.h>
3781 #include <float.h>
3782 EOF
3783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3784 { (eval echo configure:3785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3786 if test -z "$ac_err"; then
3787   rm -rf conftest*
3788   ol_cv_header_stdc=yes
3789 else
3790   echo "$ac_err" >&5
3791   echo "configure: failed program was:" >&5
3792   cat conftest.$ac_ext >&5
3793   rm -rf conftest*
3794   ol_cv_header_stdc=no
3795 fi
3796 rm -f conftest*
3797
3798 if test $ol_cv_header_stdc = yes; then
3799   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 #include <string.h>
3804 EOF
3805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3806   egrep "memchr" >/dev/null 2>&1; then
3807   :
3808 else
3809   rm -rf conftest*
3810   ol_cv_header_stdc=no
3811 fi
3812 rm -f conftest*
3813
3814 fi
3815
3816 if test $ol_cv_header_stdc = yes; then
3817   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3818 cat > conftest.$ac_ext <<EOF
3819 #line 3820 "configure"
3820 #include "confdefs.h"
3821 #include <stdlib.h>
3822 EOF
3823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3824   egrep "free" >/dev/null 2>&1; then
3825   :
3826 else
3827   rm -rf conftest*
3828   ol_cv_header_stdc=no
3829 fi
3830 rm -f conftest*
3831
3832 fi
3833
3834 if test $ol_cv_header_stdc = yes; then
3835   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3836 if test "$cross_compiling" = yes; then
3837   :
3838 else
3839   cat > conftest.$ac_ext <<EOF
3840 #line 3841 "configure"
3841 #include "confdefs.h"
3842 #include <ctype.h>
3843 #ifndef HAVE_EBCDIC
3844 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3845 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3846 #else
3847 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3848                 || ('j' <= (c) && (c) <= 'r') \
3849                 || ('s' <= (c) && (c) <= 'z'))
3850 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3851 #endif
3852 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3853 int main () { int i; for (i = 0; i < 256; i++)
3854 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3855 exit (0); }
3856
3857 EOF
3858 if { (eval echo configure:3859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3859 then
3860   :
3861 else
3862   echo "configure: failed program was:" >&5
3863   cat conftest.$ac_ext >&5
3864   rm -fr conftest*
3865   ol_cv_header_stdc=no
3866 fi
3867 rm -fr conftest*
3868 fi
3869
3870 fi
3871 fi
3872
3873 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3874 if test $ol_cv_header_stdc = yes; then
3875   cat >> confdefs.h <<\EOF
3876 #define STDC_HEADERS 1
3877 EOF
3878
3879 fi
3880 ac_cv_header_stdc=disable
3881
3882
3883 if test $ol_cv_header_stdc != yes; then
3884         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3885 fi
3886
3887 ac_header_dirent=no
3888 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3889 do
3890 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3891 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3892 echo "configure:3893: checking for $ac_hdr that defines DIR" >&5
3893 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
3894   echo $ac_n "(cached) $ac_c" 1>&6
3895 else
3896   cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899 #include <sys/types.h>
3900 #include <$ac_hdr>
3901 int main() {
3902 DIR *dirp = 0;
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3906   rm -rf conftest*
3907   eval "ac_cv_header_dirent_$ac_safe=yes"
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   eval "ac_cv_header_dirent_$ac_safe=no"
3913 fi
3914 rm -f conftest*
3915 fi
3916 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3917   echo "$ac_t""yes" 1>&6
3918     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3919   cat >> confdefs.h <<EOF
3920 #define $ac_tr_hdr 1
3921 EOF
3922  ac_header_dirent=$ac_hdr; break
3923 else
3924   echo "$ac_t""no" 1>&6
3925 fi
3926 done
3927 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3928 if test $ac_header_dirent = dirent.h; then
3929 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3930 echo "configure:3931: checking for opendir in -ldir" >&5
3931 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
3932 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3933   echo $ac_n "(cached) $ac_c" 1>&6
3934 else
3935   ac_save_LIBS="$LIBS"
3936 LIBS="-ldir  $LIBS"
3937 cat > conftest.$ac_ext <<EOF
3938 #line 3939 "configure"
3939 #include "confdefs.h"
3940 /* Override any gcc2 internal prototype to avoid an error.  */
3941 /* We use char because int might match the return type of a gcc2
3942     builtin and then its argument prototype would still apply.  */
3943 char opendir();
3944
3945 int main() {
3946 opendir()
3947 ; return 0; }
3948 EOF
3949 if { (eval echo configure:3950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3950   rm -rf conftest*
3951   eval "ac_cv_lib_$ac_lib_var=yes"
3952 else
3953   echo "configure: failed program was:" >&5
3954   cat conftest.$ac_ext >&5
3955   rm -rf conftest*
3956   eval "ac_cv_lib_$ac_lib_var=no"
3957 fi
3958 rm -f conftest*
3959 LIBS="$ac_save_LIBS"
3960
3961 fi
3962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3963   echo "$ac_t""yes" 1>&6
3964   LIBS="$LIBS -ldir"
3965 else
3966   echo "$ac_t""no" 1>&6
3967 fi
3968
3969 else
3970 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3971 echo "configure:3972: checking for opendir in -lx" >&5
3972 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
3973 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3974   echo $ac_n "(cached) $ac_c" 1>&6
3975 else
3976   ac_save_LIBS="$LIBS"
3977 LIBS="-lx  $LIBS"
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 /* Override any gcc2 internal prototype to avoid an error.  */
3982 /* We use char because int might match the return type of a gcc2
3983     builtin and then its argument prototype would still apply.  */
3984 char opendir();
3985
3986 int main() {
3987 opendir()
3988 ; return 0; }
3989 EOF
3990 if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3991   rm -rf conftest*
3992   eval "ac_cv_lib_$ac_lib_var=yes"
3993 else
3994   echo "configure: failed program was:" >&5
3995   cat conftest.$ac_ext >&5
3996   rm -rf conftest*
3997   eval "ac_cv_lib_$ac_lib_var=no"
3998 fi
3999 rm -f conftest*
4000 LIBS="$ac_save_LIBS"
4001
4002 fi
4003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4004   echo "$ac_t""yes" 1>&6
4005   LIBS="$LIBS -lx"
4006 else
4007   echo "$ac_t""no" 1>&6
4008 fi
4009
4010 fi
4011
4012 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4013 echo "configure:4014: checking for sys/wait.h that is POSIX.1 compatible" >&5
4014 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4015   echo $ac_n "(cached) $ac_c" 1>&6
4016 else
4017   cat > conftest.$ac_ext <<EOF
4018 #line 4019 "configure"
4019 #include "confdefs.h"
4020 #include <sys/types.h>
4021 #include <sys/wait.h>
4022 #ifndef WEXITSTATUS
4023 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4024 #endif
4025 #ifndef WIFEXITED
4026 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4027 #endif
4028 int main() {
4029 int s;
4030 wait (&s);
4031 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4032 ; return 0; }
4033 EOF
4034 if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4035   rm -rf conftest*
4036   ac_cv_header_sys_wait_h=yes
4037 else
4038   echo "configure: failed program was:" >&5
4039   cat conftest.$ac_ext >&5
4040   rm -rf conftest*
4041   ac_cv_header_sys_wait_h=no
4042 fi
4043 rm -f conftest*
4044 fi
4045
4046 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4047 if test $ac_cv_header_sys_wait_h = yes; then
4048   cat >> confdefs.h <<\EOF
4049 #define HAVE_SYS_WAIT_H 1
4050 EOF
4051
4052 fi
4053
4054 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4055 echo "configure:4056: checking POSIX termios" >&5
4056 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4057   echo $ac_n "(cached) $ac_c" 1>&6
4058 else
4059   cat > conftest.$ac_ext <<EOF
4060 #line 4061 "configure"
4061 #include "confdefs.h"
4062 #include <sys/types.h>
4063 #include <unistd.h>
4064 #include <termios.h>
4065 int main() {
4066 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4067    tcgetattr(0, 0);
4068 ; return 0; }
4069 EOF
4070 if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4071   rm -rf conftest*
4072   am_cv_sys_posix_termios=yes
4073 else
4074   echo "configure: failed program was:" >&5
4075   cat conftest.$ac_ext >&5
4076   rm -rf conftest*
4077   am_cv_sys_posix_termios=no
4078 fi
4079 rm -f conftest*
4080 fi
4081
4082 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4083
4084
4085  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4086 echo "configure:4087: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4087 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4088   echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4091
4092   gwinsz_in_termios_h=no
4093   if test $am_cv_sys_posix_termios = yes; then
4094     cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 #include <sys/types.h>
4098 #     include <termios.h>
4099 #     ifdef TIOCGWINSZ
4100         yes
4101 #     endif
4102     
4103 EOF
4104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4105   egrep "yes" >/dev/null 2>&1; then
4106   rm -rf conftest*
4107   gwinsz_in_termios_h=yes
4108 fi
4109 rm -f conftest*
4110
4111   fi
4112
4113   if test $gwinsz_in_termios_h = no; then
4114     cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #include <sys/types.h>
4118 #     include <sys/ioctl.h>
4119 #     ifdef TIOCGWINSZ
4120         yes
4121 #     endif
4122     
4123 EOF
4124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4125   egrep "yes" >/dev/null 2>&1; then
4126   rm -rf conftest*
4127   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4128 fi
4129 rm -f conftest*
4130
4131   fi
4132   
4133 fi
4134
4135 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4136   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4137     cat >> confdefs.h <<\EOF
4138 #define GWINSZ_IN_SYS_IOCTL 1
4139 EOF
4140
4141   fi
4142
4143 if test $am_cv_sys_posix_termios = yes ; then
4144         cat >> confdefs.h <<\EOF
4145 #define HAVE_POSIX_TERMIOS 1
4146 EOF
4147
4148 fi
4149
4150 for ac_hdr in \
4151         arpa/inet.h             \
4152         arpa/nameser.h  \
4153         assert.h                \
4154         crypt.h                 \
4155         errno.h                 \
4156         fcntl.h                 \
4157         filio.h                 \
4158         getopt.h                \
4159         grp.h                   \
4160         libutil.h               \
4161         limits.h                \
4162         locale.h                \
4163         netinet/tcp.h   \
4164         malloc.h                \
4165         memory.h                \
4166         psap.h                  \
4167         pwd.h                   \
4168         resolv.h                \
4169         sgtty.h                 \
4170         shadow.h                \
4171         stdarg.h                \
4172         stddef.h                \
4173         string.h                \
4174         strings.h               \
4175         sysexits.h              \
4176         sys/file.h              \
4177         sys/filio.h             \
4178         sys/errno.h             \
4179         sys/ioctl.h             \
4180         sys/param.h             \
4181         sys/resource.h  \
4182         sys/select.h    \
4183         sys/socket.h    \
4184         sys/syslog.h    \
4185         sys/time.h              \
4186         sys/types.h             \
4187         syslog.h                \
4188         termios.h               \
4189         unistd.h                \
4190
4191 do
4192 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4193 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4194 echo "configure:4195: checking for $ac_hdr" >&5
4195 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4196   echo $ac_n "(cached) $ac_c" 1>&6
4197 else
4198   cat > conftest.$ac_ext <<EOF
4199 #line 4200 "configure"
4200 #include "confdefs.h"
4201 #include <$ac_hdr>
4202 EOF
4203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4204 { (eval echo configure:4205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4206 if test -z "$ac_err"; then
4207   rm -rf conftest*
4208   eval "ac_cv_header_$ac_safe=yes"
4209 else
4210   echo "$ac_err" >&5
4211   echo "configure: failed program was:" >&5
4212   cat conftest.$ac_ext >&5
4213   rm -rf conftest*
4214   eval "ac_cv_header_$ac_safe=no"
4215 fi
4216 rm -f conftest*
4217 fi
4218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4219   echo "$ac_t""yes" 1>&6
4220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4221   cat >> confdefs.h <<EOF
4222 #define $ac_tr_hdr 1
4223 EOF
4224  
4225 else
4226   echo "$ac_t""no" 1>&6
4227 fi
4228 done
4229
4230
4231
4232
4233 echo $ac_n "checking for socket""... $ac_c" 1>&6
4234 echo "configure:4235: checking for socket" >&5
4235 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   cat > conftest.$ac_ext <<EOF
4239 #line 4240 "configure"
4240 #include "confdefs.h"
4241 /* System header to define __stub macros and hopefully few prototypes,
4242     which can conflict with char socket(); below.  */
4243 #include <assert.h>
4244 /* Override any gcc2 internal prototype to avoid an error.  */
4245 /* We use char because int might match the return type of a gcc2
4246     builtin and then its argument prototype would still apply.  */
4247 char socket();
4248 char (*f)();
4249
4250 int main() {
4251
4252 /* The GNU C library defines this for functions which it implements
4253     to always fail with ENOSYS.  Some functions are actually named
4254     something starting with __ and the normal name is an alias.  */
4255 #if defined (__stub_socket) || defined (__stub___socket)
4256 choke me
4257 #else
4258 f = socket;
4259 #endif
4260
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4264   rm -rf conftest*
4265   eval "ac_cv_func_socket=yes"
4266 else
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   eval "ac_cv_func_socket=no"
4271 fi
4272 rm -f conftest*
4273 fi
4274
4275 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4276   echo "$ac_t""yes" 1>&6
4277   :
4278 else
4279   echo "$ac_t""no" 1>&6
4280         
4281         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4282 echo "configure:4283: checking for main in -lsocket" >&5
4283 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4285   echo $ac_n "(cached) $ac_c" 1>&6
4286 else
4287   ac_save_LIBS="$LIBS"
4288 LIBS="-lsocket  $LIBS"
4289 cat > conftest.$ac_ext <<EOF
4290 #line 4291 "configure"
4291 #include "confdefs.h"
4292
4293 int main() {
4294 main()
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4298   rm -rf conftest*
4299   eval "ac_cv_lib_$ac_lib_var=yes"
4300 else
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -rf conftest*
4304   eval "ac_cv_lib_$ac_lib_var=no"
4305 fi
4306 rm -f conftest*
4307 LIBS="$ac_save_LIBS"
4308
4309 fi
4310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4311   echo "$ac_t""yes" 1>&6
4312     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4313     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4314   cat >> confdefs.h <<EOF
4315 #define $ac_tr_lib 1
4316 EOF
4317
4318   LIBS="-lsocket $LIBS"
4319
4320 else
4321   echo "$ac_t""no" 1>&6
4322 fi
4323
4324         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4325 echo "configure:4326: checking for main in -lnet" >&5
4326 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   ac_save_LIBS="$LIBS"
4331 LIBS="-lnet  $LIBS"
4332 cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335
4336 int main() {
4337 main()
4338 ; return 0; }
4339 EOF
4340 if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4341   rm -rf conftest*
4342   eval "ac_cv_lib_$ac_lib_var=yes"
4343 else
4344   echo "configure: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   rm -rf conftest*
4347   eval "ac_cv_lib_$ac_lib_var=no"
4348 fi
4349 rm -f conftest*
4350 LIBS="$ac_save_LIBS"
4351
4352 fi
4353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4354   echo "$ac_t""yes" 1>&6
4355     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4356     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4357   cat >> confdefs.h <<EOF
4358 #define $ac_tr_lib 1
4359 EOF
4360
4361   LIBS="-lnet $LIBS"
4362
4363 else
4364   echo "$ac_t""no" 1>&6
4365 fi
4366
4367         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4368 echo "configure:4369: checking for socket in -lnet" >&5
4369 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   ac_save_LIBS="$LIBS"
4374 LIBS="-lnet  $LIBS"
4375 cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 /* Override any gcc2 internal prototype to avoid an error.  */
4379 /* We use char because int might match the return type of a gcc2
4380     builtin and then its argument prototype would still apply.  */
4381 char socket();
4382
4383 int main() {
4384 socket()
4385 ; return 0; }
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4388   rm -rf conftest*
4389   eval "ac_cv_lib_$ac_lib_var=yes"
4390 else
4391   echo "configure: failed program was:" >&5
4392   cat conftest.$ac_ext >&5
4393   rm -rf conftest*
4394   eval "ac_cv_lib_$ac_lib_var=no"
4395 fi
4396 rm -f conftest*
4397 LIBS="$ac_save_LIBS"
4398
4399 fi
4400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4401   echo "$ac_t""yes" 1>&6
4402     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4404   cat >> confdefs.h <<EOF
4405 #define $ac_tr_lib 1
4406 EOF
4407
4408   LIBS="-lnet $LIBS"
4409
4410 else
4411   echo "$ac_t""no" 1>&6
4412 fi
4413
4414         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4415 echo "configure:4416: checking for main in -lnsl_s" >&5
4416 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4417 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4418   echo $ac_n "(cached) $ac_c" 1>&6
4419 else
4420   ac_save_LIBS="$LIBS"
4421 LIBS="-lnsl_s  $LIBS"
4422 cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425
4426 int main() {
4427 main()
4428 ; return 0; }
4429 EOF
4430 if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4431   rm -rf conftest*
4432   eval "ac_cv_lib_$ac_lib_var=yes"
4433 else
4434   echo "configure: failed program was:" >&5
4435   cat conftest.$ac_ext >&5
4436   rm -rf conftest*
4437   eval "ac_cv_lib_$ac_lib_var=no"
4438 fi
4439 rm -f conftest*
4440 LIBS="$ac_save_LIBS"
4441
4442 fi
4443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4444   echo "$ac_t""yes" 1>&6
4445     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4446     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4447   cat >> confdefs.h <<EOF
4448 #define $ac_tr_lib 1
4449 EOF
4450
4451   LIBS="-lnsl_s $LIBS"
4452
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456
4457         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4458 echo "configure:4459: checking for main in -lnsl" >&5
4459 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4460 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   ac_save_LIBS="$LIBS"
4464 LIBS="-lnsl  $LIBS"
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468
4469 int main() {
4470 main()
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   eval "ac_cv_lib_$ac_lib_var=yes"
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   eval "ac_cv_lib_$ac_lib_var=no"
4481 fi
4482 rm -f conftest*
4483 LIBS="$ac_save_LIBS"
4484
4485 fi
4486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4487   echo "$ac_t""yes" 1>&6
4488     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4489     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4490   cat >> confdefs.h <<EOF
4491 #define $ac_tr_lib 1
4492 EOF
4493
4494   LIBS="-lnsl $LIBS"
4495
4496 else
4497   echo "$ac_t""no" 1>&6
4498 fi
4499
4500         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4501 echo "configure:4502: checking for socket in -linet" >&5
4502 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4503 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   ac_save_LIBS="$LIBS"
4507 LIBS="-linet  $LIBS"
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 /* Override any gcc2 internal prototype to avoid an error.  */
4512 /* We use char because int might match the return type of a gcc2
4513     builtin and then its argument prototype would still apply.  */
4514 char socket();
4515
4516 int main() {
4517 socket()
4518 ; return 0; }
4519 EOF
4520 if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4521   rm -rf conftest*
4522   eval "ac_cv_lib_$ac_lib_var=yes"
4523 else
4524   echo "configure: failed program was:" >&5
4525   cat conftest.$ac_ext >&5
4526   rm -rf conftest*
4527   eval "ac_cv_lib_$ac_lib_var=no"
4528 fi
4529 rm -f conftest*
4530 LIBS="$ac_save_LIBS"
4531
4532 fi
4533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4536     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4537   cat >> confdefs.h <<EOF
4538 #define $ac_tr_lib 1
4539 EOF
4540
4541   LIBS="-linet $LIBS"
4542
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546
4547         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4548 echo "configure:4549: checking for main in -lgen" >&5
4549 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4551   echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553   ac_save_LIBS="$LIBS"
4554 LIBS="-lgen  $LIBS"
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558
4559 int main() {
4560 main()
4561 ; return 0; }
4562 EOF
4563 if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4564   rm -rf conftest*
4565   eval "ac_cv_lib_$ac_lib_var=yes"
4566 else
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -rf conftest*
4570   eval "ac_cv_lib_$ac_lib_var=no"
4571 fi
4572 rm -f conftest*
4573 LIBS="$ac_save_LIBS"
4574
4575 fi
4576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4577   echo "$ac_t""yes" 1>&6
4578     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4579     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_lib 1
4582 EOF
4583
4584   LIBS="-lgen $LIBS"
4585
4586 else
4587   echo "$ac_t""no" 1>&6
4588 fi
4589
4590
4591 fi
4592
4593
4594 echo $ac_n "checking for select""... $ac_c" 1>&6
4595 echo "configure:4596: checking for select" >&5
4596 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 /* System header to define __stub macros and hopefully few prototypes,
4603     which can conflict with char select(); below.  */
4604 #include <assert.h>
4605 /* Override any gcc2 internal prototype to avoid an error.  */
4606 /* We use char because int might match the return type of a gcc2
4607     builtin and then its argument prototype would still apply.  */
4608 char select();
4609 char (*f)();
4610
4611 int main() {
4612
4613 /* The GNU C library defines this for functions which it implements
4614     to always fail with ENOSYS.  Some functions are actually named
4615     something starting with __ and the normal name is an alias.  */
4616 #if defined (__stub_select) || defined (__stub___select)
4617 choke me
4618 #else
4619 f = select;
4620 #endif
4621
4622 ; return 0; }
4623 EOF
4624 if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4625   rm -rf conftest*
4626   eval "ac_cv_func_select=yes"
4627 else
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   rm -rf conftest*
4631   eval "ac_cv_func_select=no"
4632 fi
4633 rm -f conftest*
4634 fi
4635
4636 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4637   echo "$ac_t""yes" 1>&6
4638   :
4639 else
4640   echo "$ac_t""no" 1>&6
4641 { echo "configure: error: select() required." 1>&2; exit 1; }
4642 fi
4643
4644
4645 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4646 echo "configure:4647: checking types of arguments for select()" >&5
4647  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4651   echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4657      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4658       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4659        cat > conftest.$ac_ext <<EOF
4660 #line 4661 "configure"
4661 #include "confdefs.h"
4662 #ifdef HAVE_SYS_TYPES_H
4663 #include <sys/types.h>
4664 #endif
4665 #ifdef HAVE_SYS_TIME_H
4666 #include <sys/time.h>
4667 #endif
4668 #ifdef HAVE_SYS_SELECT_H
4669 #include <sys/select.h>
4670 #endif
4671 #ifdef HAVE_SYS_SOCKET_H
4672 #include <sys/socket.h>
4673 #endif
4674 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
4675 int main() {
4676
4677 ; return 0; }
4678 EOF
4679 if { (eval echo configure:4680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4680   rm -rf conftest*
4681           ac_not_found=no ; break 3
4682 else
4683   echo "configure: failed program was:" >&5
4684   cat conftest.$ac_ext >&5
4685   rm -rf conftest*
4686   ac_not_found=yes
4687 fi
4688 rm -f conftest*
4689       done
4690      done
4691     done
4692    
4693 fi
4694   
4695 fi
4696  
4697 fi
4698  if test "$ac_not_found" = yes; then
4699   ac_cv_func_select_arg1=int 
4700   ac_cv_func_select_arg234='int *' 
4701   ac_cv_func_select_arg5='struct timeval *'
4702  fi
4703  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4704  cat >> confdefs.h <<EOF
4705 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4706 EOF
4707
4708  cat >> confdefs.h <<EOF
4709 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4710 EOF
4711
4712  cat >> confdefs.h <<EOF
4713 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4714 EOF
4715
4716
4717
4718
4719 for ac_hdr in regex.h 
4720 do
4721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4723 echo "configure:4724: checking for $ac_hdr" >&5
4724 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4725   echo $ac_n "(cached) $ac_c" 1>&6
4726 else
4727   cat > conftest.$ac_ext <<EOF
4728 #line 4729 "configure"
4729 #include "confdefs.h"
4730 #include <$ac_hdr>
4731 EOF
4732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4733 { (eval echo configure:4734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4735 if test -z "$ac_err"; then
4736   rm -rf conftest*
4737   eval "ac_cv_header_$ac_safe=yes"
4738 else
4739   echo "$ac_err" >&5
4740   echo "configure: failed program was:" >&5
4741   cat conftest.$ac_ext >&5
4742   rm -rf conftest*
4743   eval "ac_cv_header_$ac_safe=no"
4744 fi
4745 rm -f conftest*
4746 fi
4747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4748   echo "$ac_t""yes" 1>&6
4749     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4750   cat >> confdefs.h <<EOF
4751 #define $ac_tr_hdr 1
4752 EOF
4753  
4754 else
4755   echo "$ac_t""no" 1>&6
4756 fi
4757 done
4758
4759 if test "$ac_cv_header_regex_h" != yes ; then
4760         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4761 fi
4762 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4763 echo "configure:4764: checking for regfree" >&5
4764 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4765   echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767   cat > conftest.$ac_ext <<EOF
4768 #line 4769 "configure"
4769 #include "confdefs.h"
4770 /* System header to define __stub macros and hopefully few prototypes,
4771     which can conflict with char regfree(); below.  */
4772 #include <assert.h>
4773 /* Override any gcc2 internal prototype to avoid an error.  */
4774 /* We use char because int might match the return type of a gcc2
4775     builtin and then its argument prototype would still apply.  */
4776 char regfree();
4777 char (*f)();
4778
4779 int main() {
4780
4781 /* The GNU C library defines this for functions which it implements
4782     to always fail with ENOSYS.  Some functions are actually named
4783     something starting with __ and the normal name is an alias.  */
4784 #if defined (__stub_regfree) || defined (__stub___regfree)
4785 choke me
4786 #else
4787 f = regfree;
4788 #endif
4789
4790 ; return 0; }
4791 EOF
4792 if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4793   rm -rf conftest*
4794   eval "ac_cv_func_regfree=yes"
4795 else
4796   echo "configure: failed program was:" >&5
4797   cat conftest.$ac_ext >&5
4798   rm -rf conftest*
4799   eval "ac_cv_func_regfree=no"
4800 fi
4801 rm -f conftest*
4802 fi
4803
4804 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4805   echo "$ac_t""yes" 1>&6
4806   :
4807 else
4808   echo "$ac_t""no" 1>&6
4809 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4810 fi
4811
4812
4813
4814 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4815 echo "configure:4816: checking for compatible POSIX regex" >&5
4816 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   
4820         if test "$cross_compiling" = yes; then
4821   ol_cv_c_posix_regex=cross
4822 else
4823   cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826
4827 #include <sys/types.h>
4828 #include <regex.h>
4829 static char *pattern, *string;
4830 main()
4831 {
4832         int rc;
4833         regex_t re;
4834
4835         pattern = "^A";
4836
4837         if(regcomp(&re, pattern, 0)) {
4838                 return -1;
4839         }
4840         
4841         string = "ALL MATCH";
4842         
4843         rc = regexec(&re, string, 0, (void*)0, 0);
4844
4845         regfree(&re);
4846
4847         return rc;
4848 }
4849 EOF
4850 if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4851 then
4852   ol_cv_c_posix_regex=yes
4853 else
4854   echo "configure: failed program was:" >&5
4855   cat conftest.$ac_ext >&5
4856   rm -fr conftest*
4857   ol_cv_c_posix_regex=no
4858 fi
4859 rm -fr conftest*
4860 fi
4861
4862 fi
4863
4864 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4865
4866 if test "$ol_cv_c_posix_regex" = no ; then
4867         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4868 fi
4869
4870
4871 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4872 echo "configure:4873: checking for sigset in -lV3" >&5
4873 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4874 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   ac_save_LIBS="$LIBS"
4878 LIBS="-lV3  $LIBS"
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 /* Override any gcc2 internal prototype to avoid an error.  */
4883 /* We use char because int might match the return type of a gcc2
4884     builtin and then its argument prototype would still apply.  */
4885 char sigset();
4886
4887 int main() {
4888 sigset()
4889 ; return 0; }
4890 EOF
4891 if { (eval echo configure:4892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4892   rm -rf conftest*
4893   eval "ac_cv_lib_$ac_lib_var=yes"
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897   rm -rf conftest*
4898   eval "ac_cv_lib_$ac_lib_var=no"
4899 fi
4900 rm -f conftest*
4901 LIBS="$ac_save_LIBS"
4902
4903 fi
4904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4905   echo "$ac_t""yes" 1>&6
4906     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4907     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4908   cat >> confdefs.h <<EOF
4909 #define $ac_tr_lib 1
4910 EOF
4911
4912   LIBS="-lV3 $LIBS"
4913
4914 else
4915   echo "$ac_t""no" 1>&6
4916 fi
4917
4918
4919
4920 # find res_search
4921 if test $ol_enable_dns != no ; then
4922                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4923 echo "configure:4924: checking for res_search" >&5
4924 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
4925   echo $ac_n "(cached) $ac_c" 1>&6
4926 else
4927   cat > conftest.$ac_ext <<EOF
4928 #line 4929 "configure"
4929 #include "confdefs.h"
4930 /* System header to define __stub macros and hopefully few prototypes,
4931     which can conflict with char res_search(); below.  */
4932 #include <assert.h>
4933 /* Override any gcc2 internal prototype to avoid an error.  */
4934 /* We use char because int might match the return type of a gcc2
4935     builtin and then its argument prototype would still apply.  */
4936 char res_search();
4937 char (*f)();
4938
4939 int main() {
4940
4941 /* The GNU C library defines this for functions which it implements
4942     to always fail with ENOSYS.  Some functions are actually named
4943     something starting with __ and the normal name is an alias.  */
4944 #if defined (__stub_res_search) || defined (__stub___res_search)
4945 choke me
4946 #else
4947 f = res_search;
4948 #endif
4949
4950 ; return 0; }
4951 EOF
4952 if { (eval echo configure:4953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4953   rm -rf conftest*
4954   eval "ac_cv_func_res_search=yes"
4955 else
4956   echo "configure: failed program was:" >&5
4957   cat conftest.$ac_ext >&5
4958   rm -rf conftest*
4959   eval "ac_cv_func_res_search=no"
4960 fi
4961 rm -f conftest*
4962 fi
4963
4964 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4965   echo "$ac_t""yes" 1>&6
4966   :
4967 else
4968   echo "$ac_t""no" 1>&6
4969 fi
4970
4971         if test $ac_cv_func_res_search = no ; then 
4972                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4973 echo "configure:4974: checking for res_search in -lbind" >&5
4974 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
4975 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4976   echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978   ac_save_LIBS="$LIBS"
4979 LIBS="-lbind  $LIBS"
4980 cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983 /* Override any gcc2 internal prototype to avoid an error.  */
4984 /* We use char because int might match the return type of a gcc2
4985     builtin and then its argument prototype would still apply.  */
4986 char res_search();
4987
4988 int main() {
4989 res_search()
4990 ; return 0; }
4991 EOF
4992 if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4993   rm -rf conftest*
4994   eval "ac_cv_lib_$ac_lib_var=yes"
4995 else
4996   echo "configure: failed program was:" >&5
4997   cat conftest.$ac_ext >&5
4998   rm -rf conftest*
4999   eval "ac_cv_lib_$ac_lib_var=no"
5000 fi
5001 rm -f conftest*
5002 LIBS="$ac_save_LIBS"
5003
5004 fi
5005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5006   echo "$ac_t""yes" 1>&6
5007     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5008     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5009   cat >> confdefs.h <<EOF
5010 #define $ac_tr_lib 1
5011 EOF
5012
5013   LIBS="-lbind $LIBS"
5014
5015 else
5016   echo "$ac_t""no" 1>&6
5017 fi
5018
5019                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5020         fi
5021         if test $ac_cv_func_res_search = no ; then 
5022                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5023 echo "configure:5024: checking for res_search in -lresolv" >&5
5024 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5026   echo $ac_n "(cached) $ac_c" 1>&6
5027 else
5028   ac_save_LIBS="$LIBS"
5029 LIBS="-lresolv  $LIBS"
5030 cat > conftest.$ac_ext <<EOF
5031 #line 5032 "configure"
5032 #include "confdefs.h"
5033 /* Override any gcc2 internal prototype to avoid an error.  */
5034 /* We use char because int might match the return type of a gcc2
5035     builtin and then its argument prototype would still apply.  */
5036 char res_search();
5037
5038 int main() {
5039 res_search()
5040 ; return 0; }
5041 EOF
5042 if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5043   rm -rf conftest*
5044   eval "ac_cv_lib_$ac_lib_var=yes"
5045 else
5046   echo "configure: failed program was:" >&5
5047   cat conftest.$ac_ext >&5
5048   rm -rf conftest*
5049   eval "ac_cv_lib_$ac_lib_var=no"
5050 fi
5051 rm -f conftest*
5052 LIBS="$ac_save_LIBS"
5053
5054 fi
5055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5056   echo "$ac_t""yes" 1>&6
5057     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5058     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5059   cat >> confdefs.h <<EOF
5060 #define $ac_tr_lib 1
5061 EOF
5062
5063   LIBS="-lresolv $LIBS"
5064
5065 else
5066   echo "$ac_t""no" 1>&6
5067 fi
5068
5069                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5070         fi
5071
5072         if test "$ac_cv_func_res_search" = yes ; then
5073                 cat >> confdefs.h <<\EOF
5074 #define HAVE_RES_SEARCH 1
5075 EOF
5076
5077         elif test $ol_enable_dns = yes ; then
5078                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5079         else
5080                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5081         fi
5082 fi
5083
5084
5085 # ISODE tests
5086 ol_link_isode=no
5087 if test $ol_enable_ldapd != no ; then
5088         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5089
5090                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5091 echo "configure:5092: checking for main in -lxtpp" >&5
5092 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   ac_save_LIBS="$LIBS"
5097 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5098 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101
5102 int main() {
5103 main()
5104 ; return 0; }
5105 EOF
5106 if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=yes"
5109 else
5110   echo "configure: failed program was:" >&5
5111   cat conftest.$ac_ext >&5
5112   rm -rf conftest*
5113   eval "ac_cv_lib_$ac_lib_var=no"
5114 fi
5115 rm -f conftest*
5116 LIBS="$ac_save_LIBS"
5117
5118 fi
5119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5120   echo "$ac_t""yes" 1>&6
5121   
5122                 ol_link_isode=yes
5123                 cat >> confdefs.h <<\EOF
5124 #define HAVE_XTPP 1
5125 EOF
5126
5127                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5128                 
5129 else
5130   echo "$ac_t""no" 1>&6
5131 :
5132 fi
5133
5134         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5135 echo "configure:5136: checking for main in -ldsap" >&5
5136 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-ldsap -lisode $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145
5146 int main() {
5147 main()
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=yes"
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156   rm -rf conftest*
5157   eval "ac_cv_lib_$ac_lib_var=no"
5158 fi
5159 rm -f conftest*
5160 LIBS="$ac_save_LIBS"
5161
5162 fi
5163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5164   echo "$ac_t""yes" 1>&6
5165   
5166                 ol_link_isode=yes
5167                 cat >> confdefs.h <<\EOF
5168 #define HAVE_DSAP 1
5169 EOF
5170
5171                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5172                 
5173 else
5174   echo "$ac_t""no" 1>&6
5175 :
5176 fi
5177
5178         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5179 echo "configure:5180: checking for main in -lisode" >&5
5180 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5181 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5182   echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184   ac_save_LIBS="$LIBS"
5185 LIBS="-lisode  $LIBS"
5186 cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189
5190 int main() {
5191 main()
5192 ; return 0; }
5193 EOF
5194 if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=yes"
5197 else
5198   echo "configure: failed program was:" >&5
5199   cat conftest.$ac_ext >&5
5200   rm -rf conftest*
5201   eval "ac_cv_lib_$ac_lib_var=no"
5202 fi
5203 rm -f conftest*
5204 LIBS="$ac_save_LIBS"
5205
5206 fi
5207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5208   echo "$ac_t""yes" 1>&6
5209   
5210                 ol_link_isode=yes
5211                 cat >> confdefs.h <<\EOF
5212 #define HAVE_ISODE 1
5213 EOF
5214
5215                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5216                 
5217 else
5218   echo "$ac_t""no" 1>&6
5219 :
5220 fi
5221
5222 fi
5223
5224 if test $ol_link_isode != no; then
5225         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5226 echo "configure:5227: checking for main in -lpp" >&5
5227 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5228 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5229   echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231   ac_save_LIBS="$LIBS"
5232 LIBS="-lpp  $LIBS"
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236
5237 int main() {
5238 main()
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5242   rm -rf conftest*
5243   eval "ac_cv_lib_$ac_lib_var=yes"
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248   eval "ac_cv_lib_$ac_lib_var=no"
5249 fi
5250 rm -f conftest*
5251 LIBS="$ac_save_LIBS"
5252
5253 fi
5254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5255   echo "$ac_t""yes" 1>&6
5256   
5257                 cat >> confdefs.h <<\EOF
5258 #define HAVE_PP 1
5259 EOF
5260
5261                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5262                 
5263 else
5264   echo "$ac_t""no" 1>&6
5265 :
5266 fi
5267
5268
5269         # Extract the first word of "pepsy", so it can be a program name with args.
5270 set dummy pepsy; ac_word=$2
5271 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5272 echo "configure:5273: checking for $ac_word" >&5
5273 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5274   echo $ac_n "(cached) $ac_c" 1>&6
5275 else
5276   case "$PEPSY" in
5277   /*)
5278   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5279   ;;
5280   ?:/*)                  
5281   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5282   ;;
5283   *)
5284   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5285   ac_dummy="$PATH"
5286   for ac_dir in $ac_dummy; do 
5287     test -z "$ac_dir" && ac_dir=.
5288     if test -f $ac_dir/$ac_word; then
5289       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5290       break
5291     fi
5292   done
5293   IFS="$ac_save_ifs"
5294   ;;
5295 esac
5296 fi
5297 PEPSY="$ac_cv_path_PEPSY"
5298 if test -n "$PEPSY"; then
5299   echo "$ac_t""$PEPSY" 1>&6
5300 else
5301   echo "$ac_t""no" 1>&6
5302 fi
5303
5304 fi
5305
5306 ol_link_kerberos=no
5307
5308 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5309         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5310 do
5311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5313 echo "configure:5314: checking for $ac_hdr" >&5
5314 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5315   echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317   cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320 #include <$ac_hdr>
5321 EOF
5322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5323 { (eval echo configure:5324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5325 if test -z "$ac_err"; then
5326   rm -rf conftest*
5327   eval "ac_cv_header_$ac_safe=yes"
5328 else
5329   echo "$ac_err" >&5
5330   echo "configure: failed program was:" >&5
5331   cat conftest.$ac_ext >&5
5332   rm -rf conftest*
5333   eval "ac_cv_header_$ac_safe=no"
5334 fi
5335 rm -f conftest*
5336 fi
5337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5338   echo "$ac_t""yes" 1>&6
5339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5340   cat >> confdefs.h <<EOF
5341 #define $ac_tr_hdr 1
5342 EOF
5343  
5344 else
5345   echo "$ac_t""no" 1>&6
5346 fi
5347 done
5348
5349
5350         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5351                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5352 echo "configure:5353: checking for main in -lkrb4" >&5
5353 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5354 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5355   echo $ac_n "(cached) $ac_c" 1>&6
5356 else
5357   ac_save_LIBS="$LIBS"
5358 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5359 cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362
5363 int main() {
5364 main()
5365 ; return 0; }
5366 EOF
5367 if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5368   rm -rf conftest*
5369   eval "ac_cv_lib_$ac_lib_var=yes"
5370 else
5371   echo "configure: failed program was:" >&5
5372   cat conftest.$ac_ext >&5
5373   rm -rf conftest*
5374   eval "ac_cv_lib_$ac_lib_var=no"
5375 fi
5376 rm -f conftest*
5377 LIBS="$ac_save_LIBS"
5378
5379 fi
5380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5381   echo "$ac_t""yes" 1>&6
5382   have_k5=yes
5383 else
5384   echo "$ac_t""no" 1>&6
5385 have_k5=no
5386 fi
5387
5388
5389                 if test $have_k5 = yes ; then
5390                         ol_with_kerberos=found
5391                         ol_link_kerberos=yes
5392
5393                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5394
5395                         LIBS="$KRB_LIBS $LIBS"
5396
5397                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5398 echo "configure:5399: checking for des_debug in Kerberos libraries" >&5
5399 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5400   echo $ac_n "(cached) $ac_c" 1>&6
5401 else
5402   
5403                                                                 save_LIBS="$LIBS"
5404                                 LIBS="$KRB_LIBS $LIBS"
5405                                 cat > conftest.$ac_ext <<EOF
5406 #line 5407 "configure"
5407 #include "confdefs.h"
5408
5409 #include <kerberosIV/krb.h>
5410 #include <kerberosIV/des.h>
5411 extern int des_debug;
5412
5413 int main() {
5414
5415 des_debug = 1;
5416
5417 ; return 0; }
5418 EOF
5419 if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5420   rm -rf conftest*
5421   ol_cv_var_des_debug=yes
5422 else
5423   echo "configure: failed program was:" >&5
5424   cat conftest.$ac_ext >&5
5425   rm -rf conftest*
5426   ol_cv_var_des_debug=no
5427 fi
5428 rm -f conftest*
5429                                                                 LIBS="$save_LIBS"
5430                         
5431 fi
5432
5433 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5434
5435                         if test $ol_cv_var_des_debug = yes ; then
5436                                 cat >> confdefs.h <<\EOF
5437 #define HAVE_DES_DEBUG 1
5438 EOF
5439
5440                         fi
5441
5442                         LIBS="$save_LIBS"
5443                 fi
5444         fi
5445 fi
5446
5447 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5448         for ac_hdr in krb.h des.h
5449 do
5450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5452 echo "configure:5453: checking for $ac_hdr" >&5
5453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5454   echo $ac_n "(cached) $ac_c" 1>&6
5455 else
5456   cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459 #include <$ac_hdr>
5460 EOF
5461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5462 { (eval echo configure:5463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5464 if test -z "$ac_err"; then
5465   rm -rf conftest*
5466   eval "ac_cv_header_$ac_safe=yes"
5467 else
5468   echo "$ac_err" >&5
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -rf conftest*
5472   eval "ac_cv_header_$ac_safe=no"
5473 fi
5474 rm -f conftest*
5475 fi
5476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5479   cat >> confdefs.h <<EOF
5480 #define $ac_tr_hdr 1
5481 EOF
5482  
5483 else
5484   echo "$ac_t""no" 1>&6
5485 fi
5486 done
5487
5488
5489         if test $ac_cv_header_krb_h = yes ; then
5490                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5491 echo "configure:5492: checking for main in -lkrb" >&5
5492 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5494   echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496   ac_save_LIBS="$LIBS"
5497 LIBS="-lkrb -ldes $LIBS"
5498 cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501
5502 int main() {
5503 main()
5504 ; return 0; }
5505 EOF
5506 if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5507   rm -rf conftest*
5508   eval "ac_cv_lib_$ac_lib_var=yes"
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512   rm -rf conftest*
5513   eval "ac_cv_lib_$ac_lib_var=no"
5514 fi
5515 rm -f conftest*
5516 LIBS="$ac_save_LIBS"
5517
5518 fi
5519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5520   echo "$ac_t""yes" 1>&6
5521   have_k4=yes
5522 else
5523   echo "$ac_t""no" 1>&6
5524 have_k4=no
5525 fi
5526
5527
5528                 if test $have_k4 = yes ; then
5529                         ol_with_kerberos=found
5530                         ol_link_kerberos=yes
5531
5532                         KRB_LIBS="-lkrb -ldes"
5533                 fi
5534         fi
5535 fi
5536
5537 if test $ol_link_kerberos = yes ; then
5538         cat >> confdefs.h <<\EOF
5539 #define HAVE_KERBEROS 1
5540 EOF
5541
5542 fi
5543
5544 ol_link_tls=no
5545 if test $ol_with_tls != no ; then
5546         
5547         for ac_hdr in openssl/ssl.h ssl.h
5548 do
5549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5550 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5551 echo "configure:5552: checking for $ac_hdr" >&5
5552 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5553   echo $ac_n "(cached) $ac_c" 1>&6
5554 else
5555   cat > conftest.$ac_ext <<EOF
5556 #line 5557 "configure"
5557 #include "confdefs.h"
5558 #include <$ac_hdr>
5559 EOF
5560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5561 { (eval echo configure:5562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5563 if test -z "$ac_err"; then
5564   rm -rf conftest*
5565   eval "ac_cv_header_$ac_safe=yes"
5566 else
5567   echo "$ac_err" >&5
5568   echo "configure: failed program was:" >&5
5569   cat conftest.$ac_ext >&5
5570   rm -rf conftest*
5571   eval "ac_cv_header_$ac_safe=no"
5572 fi
5573 rm -f conftest*
5574 fi
5575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5576   echo "$ac_t""yes" 1>&6
5577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5578   cat >> confdefs.h <<EOF
5579 #define $ac_tr_hdr 1
5580 EOF
5581  
5582 else
5583   echo "$ac_t""no" 1>&6
5584 fi
5585 done
5586
5587         
5588         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5589                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5590 echo "configure:5591: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5591 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5592 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5593   echo $ac_n "(cached) $ac_c" 1>&6
5594 else
5595   ac_save_LIBS="$LIBS"
5596 LIBS="-lssl -lcrypto $LIBS"
5597 cat > conftest.$ac_ext <<EOF
5598 #line 5599 "configure"
5599 #include "confdefs.h"
5600 /* Override any gcc2 internal prototype to avoid an error.  */
5601 /* We use char because int might match the return type of a gcc2
5602     builtin and then its argument prototype would still apply.  */
5603 char SSLeay_add_ssl_algorithms();
5604
5605 int main() {
5606 SSLeay_add_ssl_algorithms()
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5610   rm -rf conftest*
5611   eval "ac_cv_lib_$ac_lib_var=yes"
5612 else
5613   echo "configure: failed program was:" >&5
5614   cat conftest.$ac_ext >&5
5615   rm -rf conftest*
5616   eval "ac_cv_lib_$ac_lib_var=no"
5617 fi
5618 rm -f conftest*
5619 LIBS="$ac_save_LIBS"
5620
5621 fi
5622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5623   echo "$ac_t""yes" 1>&6
5624   have_ssleay=yes
5625                         need_rsaref=no
5626 else
5627   echo "$ac_t""no" 1>&6
5628 have_ssleay=no
5629 fi
5630
5631                         
5632                 if test $have_ssleay = no ; then
5633                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5634 echo "configure:5635: checking for SSL_library_init in -lssl" >&5
5635 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5637   echo $ac_n "(cached) $ac_c" 1>&6
5638 else
5639   ac_save_LIBS="$LIBS"
5640 LIBS="-lssl -lcrypto $LIBS"
5641 cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 /* Override any gcc2 internal prototype to avoid an error.  */
5645 /* We use char because int might match the return type of a gcc2
5646     builtin and then its argument prototype would still apply.  */
5647 char SSL_library_init();
5648
5649 int main() {
5650 SSL_library_init()
5651 ; return 0; }
5652 EOF
5653 if { (eval echo configure:5654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5654   rm -rf conftest*
5655   eval "ac_cv_lib_$ac_lib_var=yes"
5656 else
5657   echo "configure: failed program was:" >&5
5658   cat conftest.$ac_ext >&5
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=no"
5661 fi
5662 rm -f conftest*
5663 LIBS="$ac_save_LIBS"
5664
5665 fi
5666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5667   echo "$ac_t""yes" 1>&6
5668   have_ssleay=yes
5669                                 need_rsaref=no
5670 else
5671   echo "$ac_t""no" 1>&6
5672 have_ssleay=no
5673 fi
5674
5675                 fi
5676
5677                 if test $have_ssleay = no ; then
5678                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5679 echo "configure:5680: checking for ssl3_accept in -lssl" >&5
5680 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5681 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5682   echo $ac_n "(cached) $ac_c" 1>&6
5683 else
5684   ac_save_LIBS="$LIBS"
5685 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5686 cat > conftest.$ac_ext <<EOF
5687 #line 5688 "configure"
5688 #include "confdefs.h"
5689 /* Override any gcc2 internal prototype to avoid an error.  */
5690 /* We use char because int might match the return type of a gcc2
5691     builtin and then its argument prototype would still apply.  */
5692 char ssl3_accept();
5693
5694 int main() {
5695 ssl3_accept()
5696 ; return 0; }
5697 EOF
5698 if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5699   rm -rf conftest*
5700   eval "ac_cv_lib_$ac_lib_var=yes"
5701 else
5702   echo "configure: failed program was:" >&5
5703   cat conftest.$ac_ext >&5
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=no"
5706 fi
5707 rm -f conftest*
5708 LIBS="$ac_save_LIBS"
5709
5710 fi
5711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5712   echo "$ac_t""yes" 1>&6
5713   have_ssleay=yes
5714                                 need_rsaref=yes
5715 else
5716   echo "$ac_t""no" 1>&6
5717 have_ssleay=no
5718 fi
5719
5720                 fi
5721
5722                 if test $have_ssleay = yes ; then
5723                         ol_with_tls=found
5724                         ol_link_tls=yes
5725
5726                         cat >> confdefs.h <<\EOF
5727 #define HAVE_SSLEAY 1
5728 EOF
5729
5730
5731                         if test $need_rsaref = yes; then
5732                                 cat >> confdefs.h <<\EOF
5733 #define HAVE_RSAREF 1
5734 EOF
5735
5736
5737                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5738                         else
5739                                 TLS_LIBS="-lssl -lcrypto"
5740                         fi
5741                 fi
5742         fi
5743 fi
5744
5745 if test $ol_link_tls = yes ; then
5746         cat >> confdefs.h <<\EOF
5747 #define HAVE_TLS 1
5748 EOF
5749
5750 fi      
5751
5752 for ac_func in \
5753         ctime_r                 \
5754         gethostbyname_r gethostbyaddr_r \
5755
5756 do
5757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5758 echo "configure:5759: checking for $ac_func" >&5
5759 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5760   echo $ac_n "(cached) $ac_c" 1>&6
5761 else
5762   cat > conftest.$ac_ext <<EOF
5763 #line 5764 "configure"
5764 #include "confdefs.h"
5765 /* System header to define __stub macros and hopefully few prototypes,
5766     which can conflict with char $ac_func(); below.  */
5767 #include <assert.h>
5768 /* Override any gcc2 internal prototype to avoid an error.  */
5769 /* We use char because int might match the return type of a gcc2
5770     builtin and then its argument prototype would still apply.  */
5771 char $ac_func();
5772 char (*f)();
5773
5774 int main() {
5775
5776 /* The GNU C library defines this for functions which it implements
5777     to always fail with ENOSYS.  Some functions are actually named
5778     something starting with __ and the normal name is an alias.  */
5779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5780 choke me
5781 #else
5782 f = $ac_func;
5783 #endif
5784
5785 ; return 0; }
5786 EOF
5787 if { (eval echo configure:5788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5788   rm -rf conftest*
5789   eval "ac_cv_func_$ac_func=yes"
5790 else
5791   echo "configure: failed program was:" >&5
5792   cat conftest.$ac_ext >&5
5793   rm -rf conftest*
5794   eval "ac_cv_func_$ac_func=no"
5795 fi
5796 rm -f conftest*
5797 fi
5798
5799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5800   echo "$ac_t""yes" 1>&6
5801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5802   cat >> confdefs.h <<EOF
5803 #define $ac_tr_func 1
5804 EOF
5805  
5806 else
5807   echo "$ac_t""no" 1>&6
5808 fi
5809 done
5810
5811
5812 if test "$ac_cv_func_ctime_r" = no ; then
5813         ol_cv_func_ctime_r_nargs=0
5814 else
5815         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5816 echo "configure:5817: checking number of arguments of ctime_r" >&5
5817 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5818   echo $ac_n "(cached) $ac_c" 1>&6
5819 else
5820   cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823 #include <time.h>
5824 int main() {
5825 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5826 ; return 0; }
5827 EOF
5828 if { (eval echo configure:5829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5829   rm -rf conftest*
5830   ol_cv_func_ctime_r_nargs=3
5831 else
5832   echo "configure: failed program was:" >&5
5833   cat conftest.$ac_ext >&5
5834   rm -rf conftest*
5835   cat > conftest.$ac_ext <<EOF
5836 #line 5837 "configure"
5837 #include "confdefs.h"
5838 #include <time.h>
5839 int main() {
5840 time_t ti; char *buffer; ctime_r(&ti,buffer);
5841 ; return 0; }
5842 EOF
5843 if { (eval echo configure:5844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5844   rm -rf conftest*
5845   ol_cv_func_ctime_r_nargs=2
5846 else
5847   echo "configure: failed program was:" >&5
5848   cat conftest.$ac_ext >&5
5849   rm -rf conftest*
5850   ol_cv_func_ctime_r_nargs=0
5851 fi
5852 rm -f conftest*
5853 fi
5854 rm -f conftest*
5855 fi
5856
5857 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5858   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5859     cat >> confdefs.h <<EOF
5860 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5861 EOF
5862
5863   fi
5864
5865 fi
5866
5867 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5868         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5869 echo "configure:5870: checking number of arguments of gethostbyname_r" >&5
5870 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5871   echo $ac_n "(cached) $ac_c" 1>&6
5872 else
5873   cat > conftest.$ac_ext <<EOF
5874 #line 5875 "configure"
5875 #include "confdefs.h"
5876 #include <sys/types.h>
5877 #include <sys/socket.h>
5878 #include <netinet/in.h>
5879 #include <netdb.h>
5880 #define BUFSIZE (sizeof(struct hostent)+10)
5881 int main() {
5882 struct hostent hent; char buffer[BUFSIZE];
5883                 int bufsize=BUFSIZE;int h_errno;
5884                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5885                         buffer, bufsize, &h_errno);
5886 ; return 0; }
5887 EOF
5888 if { (eval echo configure:5889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5889   rm -rf conftest*
5890   ol_cv_func_gethostbyname_r_nargs=5
5891 else
5892   echo "configure: failed program was:" >&5
5893   cat conftest.$ac_ext >&5
5894   rm -rf conftest*
5895   cat > conftest.$ac_ext <<EOF
5896 #line 5897 "configure"
5897 #include "confdefs.h"
5898 #include <sys/types.h>
5899 #include <sys/socket.h>
5900 #include <netinet/in.h>
5901 #include <netdb.h>
5902 #define BUFSIZE (sizeof(struct hostent)+10)
5903 int main() {
5904 struct hostent hent;struct hostent *rhent;
5905                         char buffer[BUFSIZE];
5906                         int bufsize=BUFSIZE;int h_errno;
5907                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5908                                 &rhent, &h_errno);
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5912   rm -rf conftest*
5913   ol_cv_func_gethostbyname_r_nargs=6
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   ol_cv_func_gethostbyname_r_nargs=0
5919 fi
5920 rm -f conftest*
5921 fi
5922 rm -f conftest*
5923 fi
5924
5925 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5926   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5927         cat >> confdefs.h <<EOF
5928 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5929 EOF
5930
5931   fi
5932
5933 else
5934         ol_cv_func_gethostbyname_r_nargs=0
5935 fi
5936  
5937 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5938         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5939 echo "configure:5940: checking number of arguments of gethostbyaddr_r" >&5
5940 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5941   echo $ac_n "(cached) $ac_c" 1>&6
5942 else
5943   cat > conftest.$ac_ext <<EOF
5944 #line 5945 "configure"
5945 #include "confdefs.h"
5946 #include <sys/types.h>
5947 #include <sys/socket.h>
5948 #include <netinet/in.h>
5949 #include <netdb.h>
5950 #define BUFSIZE (sizeof(struct hostent)+10)
5951 int main() {
5952 struct hostent hent; char buffer[BUFSIZE]; 
5953             struct in_addr add;
5954             size_t alen=sizeof(struct in_addr);
5955             int bufsize=BUFSIZE;int h_errno;
5956                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5957                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5958 ; return 0; }
5959 EOF
5960 if { (eval echo configure:5961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5961   rm -rf conftest*
5962   ol_cv_func_gethostbyaddr_r_nargs=7
5963 else
5964   echo "configure: failed program was:" >&5
5965   cat conftest.$ac_ext >&5
5966   rm -rf conftest*
5967   cat > conftest.$ac_ext <<EOF
5968 #line 5969 "configure"
5969 #include "confdefs.h"
5970 #include <sys/types.h>
5971 #include <sys/socket.h>
5972 #include <netinet/in.h>
5973 #include <netdb.h>
5974 #define BUFSIZE (sizeof(struct hostent)+10)
5975 int main() {
5976 struct hostent hent;
5977                         struct hostent *rhent; char buffer[BUFSIZE]; 
5978                         struct in_addr add;
5979                         size_t alen=sizeof(struct in_addr);
5980                         int bufsize=BUFSIZE;int h_errno;
5981                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5982                                 alen, AF_INET, &hent, buffer, bufsize, 
5983                                 &rhent, &h_errno);
5984 ; return 0; }
5985 EOF
5986 if { (eval echo configure:5987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5987   rm -rf conftest*
5988   ol_cv_func_gethostbyaddr_r_nargs=8
5989 else
5990   echo "configure: failed program was:" >&5
5991   cat conftest.$ac_ext >&5
5992   rm -rf conftest*
5993   ol_cv_func_gethostbyaddr_r_nargs=0
5994 fi
5995 rm -f conftest*
5996 fi
5997 rm -f conftest*
5998 fi
5999
6000 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6001   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6002     cat >> confdefs.h <<EOF
6003 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6004 EOF
6005
6006   fi
6007
6008 else
6009         ol_cv_func_gethostbyaddr_r_nargs=0
6010 fi
6011
6012 if test "$ac_cv_func_ctime_r" = yes \
6013         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6014         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6015         -a "$ac_cv_func_gethostbyname_r" = yes \
6016         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6017         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6018         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6019         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6020         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6021         ; then
6022  
6023         cat >> confdefs.h <<\EOF
6024 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6025 EOF
6026
6027 fi
6028
6029 ol_link_threads=no
6030 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6031         -o $ol_with_threads = posix ; then
6032
6033         for ac_hdr in pthread.h sched.h
6034 do
6035 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6036 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6037 echo "configure:6038: checking for $ac_hdr" >&5
6038 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6039   echo $ac_n "(cached) $ac_c" 1>&6
6040 else
6041   cat > conftest.$ac_ext <<EOF
6042 #line 6043 "configure"
6043 #include "confdefs.h"
6044 #include <$ac_hdr>
6045 EOF
6046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6047 { (eval echo configure:6048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6049 if test -z "$ac_err"; then
6050   rm -rf conftest*
6051   eval "ac_cv_header_$ac_safe=yes"
6052 else
6053   echo "$ac_err" >&5
6054   echo "configure: failed program was:" >&5
6055   cat conftest.$ac_ext >&5
6056   rm -rf conftest*
6057   eval "ac_cv_header_$ac_safe=no"
6058 fi
6059 rm -f conftest*
6060 fi
6061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6062   echo "$ac_t""yes" 1>&6
6063     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6064   cat >> confdefs.h <<EOF
6065 #define $ac_tr_hdr 1
6066 EOF
6067  
6068 else
6069   echo "$ac_t""no" 1>&6
6070 fi
6071 done
6072
6073
6074         if test $ac_cv_header_pthread_h = yes ; then
6075                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6076 echo "configure:6077: checking POSIX thread version" >&5
6077 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6078   echo $ac_n "(cached) $ac_c" 1>&6
6079 else
6080   
6081         cat > conftest.$ac_ext <<EOF
6082 #line 6083 "configure"
6083 #include "confdefs.h"
6084
6085 #               include <pthread.h>
6086                 /* this check could be improved */
6087 #               ifdef PTHREAD_ONCE_INIT
6088                         pthread_version_final
6089 #               endif
6090         
6091 EOF
6092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6093   egrep "pthread_version_final" >/dev/null 2>&1; then
6094   rm -rf conftest*
6095   ol_pthread_final=yes
6096 else
6097   rm -rf conftest*
6098   ol_pthread_final=no
6099 fi
6100 rm -f conftest*
6101
6102
6103         cat > conftest.$ac_ext <<EOF
6104 #line 6105 "configure"
6105 #include "confdefs.h"
6106
6107 #               include <pthread.h>
6108                 /* this check could be improved */
6109 #               ifdef pthread_once_init
6110                         pthread_version_draft4
6111 #               endif
6112         
6113 EOF
6114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6115   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6116   rm -rf conftest*
6117   ol_pthread_draft4=yes
6118 else
6119   rm -rf conftest*
6120   ol_pthread_draft4=no
6121 fi
6122 rm -f conftest*
6123
6124
6125         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6126                 ol_cv_pthread_version=final
6127         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6128                 ol_cv_pthread_version=draft4
6129         else
6130                 ol_cv_pthread_version=unknown
6131         fi
6132
6133 fi
6134
6135 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6136
6137
6138                 if test $ol_cv_pthread_version = final ; then
6139                         cat >> confdefs.h <<\EOF
6140 #define HAVE_PTHREADS_FINAL 1
6141 EOF
6142
6143                 elif test $ol_cv_pthread_version = draft4 ; then
6144                         cat >> confdefs.h <<\EOF
6145 #define HAVE_PTHREADS_D4 1
6146 EOF
6147
6148                 else
6149                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6150                 fi
6151
6152                 # consider threads found
6153                 ol_with_threads=found
6154
6155                 
6156         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6157 echo "configure:6158: checking for LinuxThreads pthread.h" >&5
6158 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6159   echo $ac_n "(cached) $ac_c" 1>&6
6160 else
6161   cat > conftest.$ac_ext <<EOF
6162 #line 6163 "configure"
6163 #include "confdefs.h"
6164 #include <pthread.h>
6165 EOF
6166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6167   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6168   rm -rf conftest*
6169   ol_cv_header_linux_threads=yes
6170 else
6171   rm -rf conftest*
6172   ol_cv_header_linux_threads=no
6173 fi
6174 rm -f conftest*
6175
6176                 
6177 fi
6178
6179 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6180         if test $ol_cv_header_linux_threads = yes; then
6181                 cat >> confdefs.h <<\EOF
6182 #define HAVE_LINUX_THREADS 1
6183 EOF
6184
6185         fi
6186
6187
6188                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6189                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6190 echo "configure:6191: checking for pthread_create in default libraries" >&5
6191 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6192   echo $ac_n "(cached) $ac_c" 1>&6
6193 else
6194   
6195                 if test "$cross_compiling" = yes; then
6196                         ol_cv_pthread_create=yes
6197 else
6198   cat > conftest.$ac_ext <<EOF
6199 #line 6200 "configure"
6200 #include "confdefs.h"
6201
6202 #include <pthread.h>
6203 #ifndef NULL
6204 #define NULL (void*)0
6205 #endif
6206
6207 static void *task(p)
6208         void *p;
6209 {
6210         return (void *) (p == NULL);
6211 }
6212
6213 int main(argc, argv)
6214         int argc;
6215         char **argv;
6216 {
6217         pthread_t t;
6218         int status;
6219
6220         /* make sure pthread_create() isn't just a stub */
6221 #if HAVE_PTHREADS_D4
6222         status = pthread_create(&t, pthread_attr_default, task, NULL);
6223 #else
6224         status = pthread_create(&t, NULL, task, NULL);
6225 #endif
6226
6227         if( status ) return status;
6228
6229         /* make sure pthread_detach() isn't just a stub */
6230 #if HAVE_PTHREADS_D4
6231         status = pthread_detach( &t );
6232 #else
6233         status = pthread_detach( t );
6234 #endif
6235
6236         return status;
6237 }
6238
6239 EOF
6240 if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6241 then
6242   ol_cv_pthread_create=yes
6243 else
6244   echo "configure: failed program was:" >&5
6245   cat conftest.$ac_ext >&5
6246   rm -fr conftest*
6247   ol_cv_pthread_create=no
6248 fi
6249 rm -fr conftest*
6250 fi
6251
6252 fi
6253
6254 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6255
6256                 if test $ol_cv_pthread_create != no ; then
6257                         ol_link_threads=posix
6258                         ol_link_pthreads=""
6259                 fi
6260                 
6261                 # Pthread try link: -mt (ol_cv_pthread_mt)
6262         if test "$ol_link_threads" = no ; then
6263                 # try -mt
6264                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6265 echo "configure:6266: checking for pthread link with -mt" >&5
6266 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6267   echo $ac_n "(cached) $ac_c" 1>&6
6268 else
6269   
6270                         # save the flags
6271                         ol_LIBS="$LIBS"
6272                         LIBS="-mt $LIBS"
6273
6274                         cat > conftest.$ac_ext <<EOF
6275 #line 6276 "configure"
6276 #include "confdefs.h"
6277
6278 #include <pthread.h>
6279 #ifndef NULL
6280 #define NULL (void*)0
6281 #endif
6282
6283 int main() {
6284
6285         pthread_t t;
6286
6287 #if HAVE_PTHREADS_D4
6288         pthread_create(&t, pthread_attr_default, NULL, NULL);
6289         pthread_detach( &t );
6290 #else
6291         pthread_create(&t, NULL, NULL, NULL);
6292         pthread_detach( t );
6293 #endif
6294 #ifdef HAVE_LINUX_THREADS
6295         pthread_kill_other_threads_np();
6296 #endif
6297
6298 ; return 0; }
6299 EOF
6300 if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6301   rm -rf conftest*
6302   ol_cv_pthread_mt=yes
6303 else
6304   echo "configure: failed program was:" >&5
6305   cat conftest.$ac_ext >&5
6306   rm -rf conftest*
6307   ol_cv_pthread_mt=no
6308 fi
6309 rm -f conftest*
6310
6311                 # restore the LIBS
6312                 LIBS="$ol_LIBS"
6313                 
6314 fi
6315
6316 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6317
6318                 if test $ol_cv_pthread_mt = yes ; then
6319                         ol_link_pthreads="-mt"
6320                         ol_link_threads=posix
6321                 fi
6322         fi
6323
6324                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6325         if test "$ol_link_threads" = no ; then
6326                 # try -kthread
6327                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6328 echo "configure:6329: checking for pthread link with -kthread" >&5
6329 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6330   echo $ac_n "(cached) $ac_c" 1>&6
6331 else
6332   
6333                         # save the flags
6334                         ol_LIBS="$LIBS"
6335                         LIBS="-kthread $LIBS"
6336
6337                         cat > conftest.$ac_ext <<EOF
6338 #line 6339 "configure"
6339 #include "confdefs.h"
6340
6341 #include <pthread.h>
6342 #ifndef NULL
6343 #define NULL (void*)0
6344 #endif
6345
6346 int main() {
6347
6348         pthread_t t;
6349
6350 #if HAVE_PTHREADS_D4
6351         pthread_create(&t, pthread_attr_default, NULL, NULL);
6352         pthread_detach( &t );
6353 #else
6354         pthread_create(&t, NULL, NULL, NULL);
6355         pthread_detach( t );
6356 #endif
6357 #ifdef HAVE_LINUX_THREADS
6358         pthread_kill_other_threads_np();
6359 #endif
6360
6361 ; return 0; }
6362 EOF
6363 if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6364   rm -rf conftest*
6365   ol_cv_pthread_kthread=yes
6366 else
6367   echo "configure: failed program was:" >&5
6368   cat conftest.$ac_ext >&5
6369   rm -rf conftest*
6370   ol_cv_pthread_kthread=no
6371 fi
6372 rm -f conftest*
6373
6374                 # restore the LIBS
6375                 LIBS="$ol_LIBS"
6376                 
6377 fi
6378
6379 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6380
6381                 if test $ol_cv_pthread_kthread = yes ; then
6382                         ol_link_pthreads="-kthread"
6383                         ol_link_threads=posix
6384                 fi
6385         fi
6386
6387                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6388         if test "$ol_link_threads" = no ; then
6389                 # try -pthread
6390                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6391 echo "configure:6392: checking for pthread link with -pthread" >&5
6392 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6393   echo $ac_n "(cached) $ac_c" 1>&6
6394 else
6395   
6396                         # save the flags
6397                         ol_LIBS="$LIBS"
6398                         LIBS="-pthread $LIBS"
6399
6400                         cat > conftest.$ac_ext <<EOF
6401 #line 6402 "configure"
6402 #include "confdefs.h"
6403
6404 #include <pthread.h>
6405 #ifndef NULL
6406 #define NULL (void*)0
6407 #endif
6408
6409 int main() {
6410
6411         pthread_t t;
6412
6413 #if HAVE_PTHREADS_D4
6414         pthread_create(&t, pthread_attr_default, NULL, NULL);
6415         pthread_detach( &t );
6416 #else
6417         pthread_create(&t, NULL, NULL, NULL);
6418         pthread_detach( t );
6419 #endif
6420 #ifdef HAVE_LINUX_THREADS
6421         pthread_kill_other_threads_np();
6422 #endif
6423
6424 ; return 0; }
6425 EOF
6426 if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6427   rm -rf conftest*
6428   ol_cv_pthread_pthread=yes
6429 else
6430   echo "configure: failed program was:" >&5
6431   cat conftest.$ac_ext >&5
6432   rm -rf conftest*
6433   ol_cv_pthread_pthread=no
6434 fi
6435 rm -f conftest*
6436
6437                 # restore the LIBS
6438                 LIBS="$ol_LIBS"
6439                 
6440 fi
6441
6442 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6443
6444                 if test $ol_cv_pthread_pthread = yes ; then
6445                         ol_link_pthreads="-pthread"
6446                         ol_link_threads=posix
6447                 fi
6448         fi
6449
6450                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6451         if test "$ol_link_threads" = no ; then
6452                 # try -pthreads
6453                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6454 echo "configure:6455: checking for pthread link with -pthreads" >&5
6455 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6456   echo $ac_n "(cached) $ac_c" 1>&6
6457 else
6458   
6459                         # save the flags
6460                         ol_LIBS="$LIBS"
6461                         LIBS="-pthreads $LIBS"
6462
6463                         cat > conftest.$ac_ext <<EOF
6464 #line 6465 "configure"
6465 #include "confdefs.h"
6466
6467 #include <pthread.h>
6468 #ifndef NULL
6469 #define NULL (void*)0
6470 #endif
6471
6472 int main() {
6473
6474         pthread_t t;
6475
6476 #if HAVE_PTHREADS_D4
6477         pthread_create(&t, pthread_attr_default, NULL, NULL);
6478         pthread_detach( &t );
6479 #else
6480         pthread_create(&t, NULL, NULL, NULL);
6481         pthread_detach( t );
6482 #endif
6483 #ifdef HAVE_LINUX_THREADS
6484         pthread_kill_other_threads_np();
6485 #endif
6486
6487 ; return 0; }
6488 EOF
6489 if { (eval echo configure:6490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6490   rm -rf conftest*
6491   ol_cv_pthread_pthreads=yes
6492 else
6493   echo "configure: failed program was:" >&5
6494   cat conftest.$ac_ext >&5
6495   rm -rf conftest*
6496   ol_cv_pthread_pthreads=no
6497 fi
6498 rm -f conftest*
6499
6500                 # restore the LIBS
6501                 LIBS="$ol_LIBS"
6502                 
6503 fi
6504
6505 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6506
6507                 if test $ol_cv_pthread_pthreads = yes ; then
6508                         ol_link_pthreads="-pthreads"
6509                         ol_link_threads=posix
6510                 fi
6511         fi
6512
6513                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6514         if test "$ol_link_threads" = no ; then
6515                 # try -mthreads
6516                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6517 echo "configure:6518: checking for pthread link with -mthreads" >&5
6518 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6519   echo $ac_n "(cached) $ac_c" 1>&6
6520 else
6521   
6522                         # save the flags
6523                         ol_LIBS="$LIBS"
6524                         LIBS="-mthreads $LIBS"
6525
6526                         cat > conftest.$ac_ext <<EOF
6527 #line 6528 "configure"
6528 #include "confdefs.h"
6529
6530 #include <pthread.h>
6531 #ifndef NULL
6532 #define NULL (void*)0
6533 #endif
6534
6535 int main() {
6536
6537         pthread_t t;
6538
6539 #if HAVE_PTHREADS_D4
6540         pthread_create(&t, pthread_attr_default, NULL, NULL);
6541         pthread_detach( &t );
6542 #else
6543         pthread_create(&t, NULL, NULL, NULL);
6544         pthread_detach( t );
6545 #endif
6546 #ifdef HAVE_LINUX_THREADS
6547         pthread_kill_other_threads_np();
6548 #endif
6549
6550 ; return 0; }
6551 EOF
6552 if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6553   rm -rf conftest*
6554   ol_cv_pthread_mthreads=yes
6555 else
6556   echo "configure: failed program was:" >&5
6557   cat conftest.$ac_ext >&5
6558   rm -rf conftest*
6559   ol_cv_pthread_mthreads=no
6560 fi
6561 rm -f conftest*
6562
6563                 # restore the LIBS
6564                 LIBS="$ol_LIBS"
6565                 
6566 fi
6567
6568 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6569
6570                 if test $ol_cv_pthread_mthreads = yes ; then
6571                         ol_link_pthreads="-mthreads"
6572                         ol_link_threads=posix
6573                 fi
6574         fi
6575
6576                 # Pthread try link: -thread (ol_cv_pthread_thread)
6577         if test "$ol_link_threads" = no ; then
6578                 # try -thread
6579                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6580 echo "configure:6581: checking for pthread link with -thread" >&5
6581 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6582   echo $ac_n "(cached) $ac_c" 1>&6
6583 else
6584   
6585                         # save the flags
6586                         ol_LIBS="$LIBS"
6587                         LIBS="-thread $LIBS"
6588
6589                         cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592
6593 #include <pthread.h>
6594 #ifndef NULL
6595 #define NULL (void*)0
6596 #endif
6597
6598 int main() {
6599
6600         pthread_t t;
6601
6602 #if HAVE_PTHREADS_D4
6603         pthread_create(&t, pthread_attr_default, NULL, NULL);
6604         pthread_detach( &t );
6605 #else
6606         pthread_create(&t, NULL, NULL, NULL);
6607         pthread_detach( t );
6608 #endif
6609 #ifdef HAVE_LINUX_THREADS
6610         pthread_kill_other_threads_np();
6611 #endif
6612
6613 ; return 0; }
6614 EOF
6615 if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6616   rm -rf conftest*
6617   ol_cv_pthread_thread=yes
6618 else
6619   echo "configure: failed program was:" >&5
6620   cat conftest.$ac_ext >&5
6621   rm -rf conftest*
6622   ol_cv_pthread_thread=no
6623 fi
6624 rm -f conftest*
6625
6626                 # restore the LIBS
6627                 LIBS="$ol_LIBS"
6628                 
6629 fi
6630
6631 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6632
6633                 if test $ol_cv_pthread_thread = yes ; then
6634                         ol_link_pthreads="-thread"
6635                         ol_link_threads=posix
6636                 fi
6637         fi
6638
6639
6640                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6641         if test "$ol_link_threads" = no ; then
6642                 # try -lpthread -lmach -lexc -lc_r
6643                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6644 echo "configure:6645: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6645 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6646   echo $ac_n "(cached) $ac_c" 1>&6
6647 else
6648   
6649                         # save the flags
6650                         ol_LIBS="$LIBS"
6651                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6652
6653                         cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656
6657 #include <pthread.h>
6658 #ifndef NULL
6659 #define NULL (void*)0
6660 #endif
6661
6662 int main() {
6663
6664         pthread_t t;
6665
6666 #if HAVE_PTHREADS_D4
6667         pthread_create(&t, pthread_attr_default, NULL, NULL);
6668         pthread_detach( &t );
6669 #else
6670         pthread_create(&t, NULL, NULL, NULL);
6671         pthread_detach( t );
6672 #endif
6673 #ifdef HAVE_LINUX_THREADS
6674         pthread_kill_other_threads_np();
6675 #endif
6676
6677 ; return 0; }
6678 EOF
6679 if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6680   rm -rf conftest*
6681   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6682 else
6683   echo "configure: failed program was:" >&5
6684   cat conftest.$ac_ext >&5
6685   rm -rf conftest*
6686   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6687 fi
6688 rm -f conftest*
6689
6690                 # restore the LIBS
6691                 LIBS="$ol_LIBS"
6692                 
6693 fi
6694
6695 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6696
6697                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6698                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6699                         ol_link_threads=posix
6700                 fi
6701         fi
6702
6703                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6704         if test "$ol_link_threads" = no ; then
6705                 # try -lpthread -lmach -lexc
6706                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6707 echo "configure:6708: checking for pthread link with -lpthread -lmach -lexc" >&5
6708 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6709   echo $ac_n "(cached) $ac_c" 1>&6
6710 else
6711   
6712                         # save the flags
6713                         ol_LIBS="$LIBS"
6714                         LIBS="-lpthread -lmach -lexc $LIBS"
6715
6716                         cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719
6720 #include <pthread.h>
6721 #ifndef NULL
6722 #define NULL (void*)0
6723 #endif
6724
6725 int main() {
6726
6727         pthread_t t;
6728
6729 #if HAVE_PTHREADS_D4
6730         pthread_create(&t, pthread_attr_default, NULL, NULL);
6731         pthread_detach( &t );
6732 #else
6733         pthread_create(&t, NULL, NULL, NULL);
6734         pthread_detach( t );
6735 #endif
6736 #ifdef HAVE_LINUX_THREADS
6737         pthread_kill_other_threads_np();
6738 #endif
6739
6740 ; return 0; }
6741 EOF
6742 if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6743   rm -rf conftest*
6744   ol_cv_pthread_lpthread_lmach_lexc=yes
6745 else
6746   echo "configure: failed program was:" >&5
6747   cat conftest.$ac_ext >&5
6748   rm -rf conftest*
6749   ol_cv_pthread_lpthread_lmach_lexc=no
6750 fi
6751 rm -f conftest*
6752
6753                 # restore the LIBS
6754                 LIBS="$ol_LIBS"
6755                 
6756 fi
6757
6758 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6759
6760                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6761                         ol_link_pthreads="-lpthread -lmach -lexc"
6762                         ol_link_threads=posix
6763                 fi
6764         fi
6765
6766
6767                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6768         if test "$ol_link_threads" = no ; then
6769                 # try -lpthread -Wl,-woff,85
6770                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6771 echo "configure:6772: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6772 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6773   echo $ac_n "(cached) $ac_c" 1>&6
6774 else
6775   
6776                         # save the flags
6777                         ol_LIBS="$LIBS"
6778                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6779
6780                         cat > conftest.$ac_ext <<EOF
6781 #line 6782 "configure"
6782 #include "confdefs.h"
6783
6784 #include <pthread.h>
6785 #ifndef NULL
6786 #define NULL (void*)0
6787 #endif
6788
6789 int main() {
6790
6791         pthread_t t;
6792
6793 #if HAVE_PTHREADS_D4
6794         pthread_create(&t, pthread_attr_default, NULL, NULL);
6795         pthread_detach( &t );
6796 #else
6797         pthread_create(&t, NULL, NULL, NULL);
6798         pthread_detach( t );
6799 #endif
6800 #ifdef HAVE_LINUX_THREADS
6801         pthread_kill_other_threads_np();
6802 #endif
6803
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6807   rm -rf conftest*
6808   ol_cv_pthread_lib_lpthread_woff=yes
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   ol_cv_pthread_lib_lpthread_woff=no
6814 fi
6815 rm -f conftest*
6816
6817                 # restore the LIBS
6818                 LIBS="$ol_LIBS"
6819                 
6820 fi
6821
6822 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6823
6824                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6825                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6826                         ol_link_threads=posix
6827                 fi
6828         fi
6829
6830
6831                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6832         if test "$ol_link_threads" = no ; then
6833                 # try -lpthread
6834                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6835 echo "configure:6836: checking for pthread link with -lpthread" >&5
6836 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6837   echo $ac_n "(cached) $ac_c" 1>&6
6838 else
6839   
6840                         # save the flags
6841                         ol_LIBS="$LIBS"
6842                         LIBS="-lpthread $LIBS"
6843
6844                         cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6847
6848 #include <pthread.h>
6849 #ifndef NULL
6850 #define NULL (void*)0
6851 #endif
6852
6853 int main() {
6854
6855         pthread_t t;
6856
6857 #if HAVE_PTHREADS_D4
6858         pthread_create(&t, pthread_attr_default, NULL, NULL);
6859         pthread_detach( &t );
6860 #else
6861         pthread_create(&t, NULL, NULL, NULL);
6862         pthread_detach( t );
6863 #endif
6864 #ifdef HAVE_LINUX_THREADS
6865         pthread_kill_other_threads_np();
6866 #endif
6867
6868 ; return 0; }
6869 EOF
6870 if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6871   rm -rf conftest*
6872   ol_cv_pthread_lpthread=yes
6873 else
6874   echo "configure: failed program was:" >&5
6875   cat conftest.$ac_ext >&5
6876   rm -rf conftest*
6877   ol_cv_pthread_lpthread=no
6878 fi
6879 rm -f conftest*
6880
6881                 # restore the LIBS
6882                 LIBS="$ol_LIBS"
6883                 
6884 fi
6885
6886 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6887
6888                 if test $ol_cv_pthread_lpthread = yes ; then
6889                         ol_link_pthreads="-lpthread"
6890                         ol_link_threads=posix
6891                 fi
6892         fi
6893
6894                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6895         if test "$ol_link_threads" = no ; then
6896                 # try -lc_r
6897                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6898 echo "configure:6899: checking for pthread link with -lc_r" >&5
6899 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6900   echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902   
6903                         # save the flags
6904                         ol_LIBS="$LIBS"
6905                         LIBS="-lc_r $LIBS"
6906
6907                         cat > conftest.$ac_ext <<EOF
6908 #line 6909 "configure"
6909 #include "confdefs.h"
6910
6911 #include <pthread.h>
6912 #ifndef NULL
6913 #define NULL (void*)0
6914 #endif
6915
6916 int main() {
6917
6918         pthread_t t;
6919
6920 #if HAVE_PTHREADS_D4
6921         pthread_create(&t, pthread_attr_default, NULL, NULL);
6922         pthread_detach( &t );
6923 #else
6924         pthread_create(&t, NULL, NULL, NULL);
6925         pthread_detach( t );
6926 #endif
6927 #ifdef HAVE_LINUX_THREADS
6928         pthread_kill_other_threads_np();
6929 #endif
6930
6931 ; return 0; }
6932 EOF
6933 if { (eval echo configure:6934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6934   rm -rf conftest*
6935   ol_cv_pthread_lc_r=yes
6936 else
6937   echo "configure: failed program was:" >&5
6938   cat conftest.$ac_ext >&5
6939   rm -rf conftest*
6940   ol_cv_pthread_lc_r=no
6941 fi
6942 rm -f conftest*
6943
6944                 # restore the LIBS
6945                 LIBS="$ol_LIBS"
6946                 
6947 fi
6948
6949 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6950
6951                 if test $ol_cv_pthread_lc_r = yes ; then
6952                         ol_link_pthreads="-lc_r"
6953                         ol_link_threads=posix
6954                 fi
6955         fi
6956
6957
6958                 # Pthread try link: -threads (ol_cv_pthread_threads)
6959         if test "$ol_link_threads" = no ; then
6960                 # try -threads
6961                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6962 echo "configure:6963: checking for pthread link with -threads" >&5
6963 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6964   echo $ac_n "(cached) $ac_c" 1>&6
6965 else
6966   
6967                         # save the flags
6968                         ol_LIBS="$LIBS"
6969                         LIBS="-threads $LIBS"
6970
6971                         cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974
6975 #include <pthread.h>
6976 #ifndef NULL
6977 #define NULL (void*)0
6978 #endif
6979
6980 int main() {
6981
6982         pthread_t t;
6983
6984 #if HAVE_PTHREADS_D4
6985         pthread_create(&t, pthread_attr_default, NULL, NULL);
6986         pthread_detach( &t );
6987 #else
6988         pthread_create(&t, NULL, NULL, NULL);
6989         pthread_detach( t );
6990 #endif
6991 #ifdef HAVE_LINUX_THREADS
6992         pthread_kill_other_threads_np();
6993 #endif
6994
6995 ; return 0; }
6996 EOF
6997 if { (eval echo configure:6998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6998   rm -rf conftest*
6999   ol_cv_pthread_threads=yes
7000 else
7001   echo "configure: failed program was:" >&5
7002   cat conftest.$ac_ext >&5
7003   rm -rf conftest*
7004   ol_cv_pthread_threads=no
7005 fi
7006 rm -f conftest*
7007
7008                 # restore the LIBS
7009                 LIBS="$ol_LIBS"
7010                 
7011 fi
7012
7013 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7014
7015                 if test $ol_cv_pthread_threads = yes ; then
7016                         ol_link_pthreads="-threads"
7017                         ol_link_threads=posix
7018                 fi
7019         fi
7020
7021
7022                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7023         if test "$ol_link_threads" = no ; then
7024                 # try -lpthreads -lmach -lexc -lc_r
7025                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7026 echo "configure:7027: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7027 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   
7031                         # save the flags
7032                         ol_LIBS="$LIBS"
7033                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7034
7035                         cat > conftest.$ac_ext <<EOF
7036 #line 7037 "configure"
7037 #include "confdefs.h"
7038
7039 #include <pthread.h>
7040 #ifndef NULL
7041 #define NULL (void*)0
7042 #endif
7043
7044 int main() {
7045
7046         pthread_t t;
7047
7048 #if HAVE_PTHREADS_D4
7049         pthread_create(&t, pthread_attr_default, NULL, NULL);
7050         pthread_detach( &t );
7051 #else
7052         pthread_create(&t, NULL, NULL, NULL);
7053         pthread_detach( t );
7054 #endif
7055 #ifdef HAVE_LINUX_THREADS
7056         pthread_kill_other_threads_np();
7057 #endif
7058
7059 ; return 0; }
7060 EOF
7061 if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7062   rm -rf conftest*
7063   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7064 else
7065   echo "configure: failed program was:" >&5
7066   cat conftest.$ac_ext >&5
7067   rm -rf conftest*
7068   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7069 fi
7070 rm -f conftest*
7071
7072                 # restore the LIBS
7073                 LIBS="$ol_LIBS"
7074                 
7075 fi
7076
7077 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7078
7079                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7080                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7081                         ol_link_threads=posix
7082                 fi
7083         fi
7084
7085                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7086         if test "$ol_link_threads" = no ; then
7087                 # try -lpthreads -lmach -lexc
7088                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7089 echo "configure:7090: checking for pthread link with -lpthreads -lmach -lexc" >&5
7090 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
7091   echo $ac_n "(cached) $ac_c" 1>&6
7092 else
7093   
7094                         # save the flags
7095                         ol_LIBS="$LIBS"
7096                         LIBS="-lpthreads -lmach -lexc $LIBS"
7097
7098                         cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101
7102 #include <pthread.h>
7103 #ifndef NULL
7104 #define NULL (void*)0
7105 #endif
7106
7107 int main() {
7108
7109         pthread_t t;
7110
7111 #if HAVE_PTHREADS_D4
7112         pthread_create(&t, pthread_attr_default, NULL, NULL);
7113         pthread_detach( &t );
7114 #else
7115         pthread_create(&t, NULL, NULL, NULL);
7116         pthread_detach( t );
7117 #endif
7118 #ifdef HAVE_LINUX_THREADS
7119         pthread_kill_other_threads_np();
7120 #endif
7121
7122 ; return 0; }
7123 EOF
7124 if { (eval echo configure:7125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7125   rm -rf conftest*
7126   ol_cv_pthread_lpthreads_lmach_lexc=yes
7127 else
7128   echo "configure: failed program was:" >&5
7129   cat conftest.$ac_ext >&5
7130   rm -rf conftest*
7131   ol_cv_pthread_lpthreads_lmach_lexc=no
7132 fi
7133 rm -f conftest*
7134
7135                 # restore the LIBS
7136                 LIBS="$ol_LIBS"
7137                 
7138 fi
7139
7140 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7141
7142                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7143                         ol_link_pthreads="-lpthreads -lmach -lexc"
7144                         ol_link_threads=posix
7145                 fi
7146         fi
7147
7148                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7149         if test "$ol_link_threads" = no ; then
7150                 # try -lpthreads -lexc
7151                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7152 echo "configure:7153: checking for pthread link with -lpthreads -lexc" >&5
7153 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
7154   echo $ac_n "(cached) $ac_c" 1>&6
7155 else
7156   
7157                         # save the flags
7158                         ol_LIBS="$LIBS"
7159                         LIBS="-lpthreads -lexc $LIBS"
7160
7161                         cat > conftest.$ac_ext <<EOF
7162 #line 7163 "configure"
7163 #include "confdefs.h"
7164
7165 #include <pthread.h>
7166 #ifndef NULL
7167 #define NULL (void*)0
7168 #endif
7169
7170 int main() {
7171
7172         pthread_t t;
7173
7174 #if HAVE_PTHREADS_D4
7175         pthread_create(&t, pthread_attr_default, NULL, NULL);
7176         pthread_detach( &t );
7177 #else
7178         pthread_create(&t, NULL, NULL, NULL);
7179         pthread_detach( t );
7180 #endif
7181 #ifdef HAVE_LINUX_THREADS
7182         pthread_kill_other_threads_np();
7183 #endif
7184
7185 ; return 0; }
7186 EOF
7187 if { (eval echo configure:7188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7188   rm -rf conftest*
7189   ol_cv_pthread_lpthreads_lexc=yes
7190 else
7191   echo "configure: failed program was:" >&5
7192   cat conftest.$ac_ext >&5
7193   rm -rf conftest*
7194   ol_cv_pthread_lpthreads_lexc=no
7195 fi
7196 rm -f conftest*
7197
7198                 # restore the LIBS
7199                 LIBS="$ol_LIBS"
7200                 
7201 fi
7202
7203 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7204
7205                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7206                         ol_link_pthreads="-lpthreads -lexc"
7207                         ol_link_threads=posix
7208                 fi
7209         fi
7210
7211
7212                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7213         if test "$ol_link_threads" = no ; then
7214                 # try -lpthreads
7215                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7216 echo "configure:7217: checking for pthread link with -lpthreads" >&5
7217 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
7218   echo $ac_n "(cached) $ac_c" 1>&6
7219 else
7220   
7221                         # save the flags
7222                         ol_LIBS="$LIBS"
7223                         LIBS="-lpthreads $LIBS"
7224
7225                         cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228
7229 #include <pthread.h>
7230 #ifndef NULL
7231 #define NULL (void*)0
7232 #endif
7233
7234 int main() {
7235
7236         pthread_t t;
7237
7238 #if HAVE_PTHREADS_D4
7239         pthread_create(&t, pthread_attr_default, NULL, NULL);
7240         pthread_detach( &t );
7241 #else
7242         pthread_create(&t, NULL, NULL, NULL);
7243         pthread_detach( t );
7244 #endif
7245 #ifdef HAVE_LINUX_THREADS
7246         pthread_kill_other_threads_np();
7247 #endif
7248
7249 ; return 0; }
7250 EOF
7251 if { (eval echo configure:7252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7252   rm -rf conftest*
7253   ol_cv_pthread_lib_lpthreads=yes
7254 else
7255   echo "configure: failed program was:" >&5
7256   cat conftest.$ac_ext >&5
7257   rm -rf conftest*
7258   ol_cv_pthread_lib_lpthreads=no
7259 fi
7260 rm -f conftest*
7261
7262                 # restore the LIBS
7263                 LIBS="$ol_LIBS"
7264                 
7265 fi
7266
7267 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7268
7269                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7270                         ol_link_pthreads="-lpthreads"
7271                         ol_link_threads=posix
7272                 fi
7273         fi
7274
7275
7276                 if test $ol_link_threads != no ; then
7277                         cat >> confdefs.h <<\EOF
7278 #define HAVE_PTHREADS 1
7279 EOF
7280
7281
7282                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7283
7284                                                 save_CPPFLAGS="$CPPFLAGS"
7285                         save_LIBS="$LIBS"
7286                         LIBS="$LTHREAD_LIBS $LIBS"
7287
7288                                                                                                 for ac_func in sched_yield pthread_yield
7289 do
7290 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7291 echo "configure:7292: checking for $ac_func" >&5
7292 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7293   echo $ac_n "(cached) $ac_c" 1>&6
7294 else
7295   cat > conftest.$ac_ext <<EOF
7296 #line 7297 "configure"
7297 #include "confdefs.h"
7298 /* System header to define __stub macros and hopefully few prototypes,
7299     which can conflict with char $ac_func(); below.  */
7300 #include <assert.h>
7301 /* Override any gcc2 internal prototype to avoid an error.  */
7302 /* We use char because int might match the return type of a gcc2
7303     builtin and then its argument prototype would still apply.  */
7304 char $ac_func();
7305 char (*f)();
7306
7307 int main() {
7308
7309 /* The GNU C library defines this for functions which it implements
7310     to always fail with ENOSYS.  Some functions are actually named
7311     something starting with __ and the normal name is an alias.  */
7312 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7313 choke me
7314 #else
7315 f = $ac_func;
7316 #endif
7317
7318 ; return 0; }
7319 EOF
7320 if { (eval echo configure:7321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7321   rm -rf conftest*
7322   eval "ac_cv_func_$ac_func=yes"
7323 else
7324   echo "configure: failed program was:" >&5
7325   cat conftest.$ac_ext >&5
7326   rm -rf conftest*
7327   eval "ac_cv_func_$ac_func=no"
7328 fi
7329 rm -f conftest*
7330 fi
7331
7332 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7333   echo "$ac_t""yes" 1>&6
7334     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7335   cat >> confdefs.h <<EOF
7336 #define $ac_tr_func 1
7337 EOF
7338  
7339 else
7340   echo "$ac_t""no" 1>&6
7341 fi
7342 done
7343
7344
7345                         if test $ac_cv_func_sched_yield = no -a \
7346                                 $ac_cv_func_pthread_yield = no ; then
7347                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7348 echo "configure:7349: checking for sched_yield in -lrt" >&5
7349 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
7350 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7351   echo $ac_n "(cached) $ac_c" 1>&6
7352 else
7353   ac_save_LIBS="$LIBS"
7354 LIBS="-lrt  $LIBS"
7355 cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 /* Override any gcc2 internal prototype to avoid an error.  */
7359 /* We use char because int might match the return type of a gcc2
7360     builtin and then its argument prototype would still apply.  */
7361 char sched_yield();
7362
7363 int main() {
7364 sched_yield()
7365 ; return 0; }
7366 EOF
7367 if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7368   rm -rf conftest*
7369   eval "ac_cv_lib_$ac_lib_var=yes"
7370 else
7371   echo "configure: failed program was:" >&5
7372   cat conftest.$ac_ext >&5
7373   rm -rf conftest*
7374   eval "ac_cv_lib_$ac_lib_var=no"
7375 fi
7376 rm -f conftest*
7377 LIBS="$ac_save_LIBS"
7378
7379 fi
7380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7381   echo "$ac_t""yes" 1>&6
7382   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7383                                         cat >> confdefs.h <<\EOF
7384 #define HAVE_SCHED_YIELD 1
7385 EOF
7386
7387                                         ac_cv_func_sched_yield=yes
7388 else
7389   echo "$ac_t""no" 1>&6
7390 ac_cv_func_sched_yield=no
7391 fi
7392
7393                         fi
7394                         if test $ac_cv_func_sched_yield = no -a \
7395                                 $ac_cv_func_pthread_yield = no ; then
7396                                                                                                 for ac_func in thr_yield
7397 do
7398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7399 echo "configure:7400: checking for $ac_func" >&5
7400 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7401   echo $ac_n "(cached) $ac_c" 1>&6
7402 else
7403   cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406 /* System header to define __stub macros and hopefully few prototypes,
7407     which can conflict with char $ac_func(); below.  */
7408 #include <assert.h>
7409 /* Override any gcc2 internal prototype to avoid an error.  */
7410 /* We use char because int might match the return type of a gcc2
7411     builtin and then its argument prototype would still apply.  */
7412 char $ac_func();
7413 char (*f)();
7414
7415 int main() {
7416
7417 /* The GNU C library defines this for functions which it implements
7418     to always fail with ENOSYS.  Some functions are actually named
7419     something starting with __ and the normal name is an alias.  */
7420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7421 choke me
7422 #else
7423 f = $ac_func;
7424 #endif
7425
7426 ; return 0; }
7427 EOF
7428 if { (eval echo configure:7429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7429   rm -rf conftest*
7430   eval "ac_cv_func_$ac_func=yes"
7431 else
7432   echo "configure: failed program was:" >&5
7433   cat conftest.$ac_ext >&5
7434   rm -rf conftest*
7435   eval "ac_cv_func_$ac_func=no"
7436 fi
7437 rm -f conftest*
7438 fi
7439
7440 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7441   echo "$ac_t""yes" 1>&6
7442     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7443   cat >> confdefs.h <<EOF
7444 #define $ac_tr_func 1
7445 EOF
7446  
7447 else
7448   echo "$ac_t""no" 1>&6
7449 fi
7450 done
7451
7452                         fi
7453                         if test $ac_cv_func_sched_yield = no -a \
7454                                 $ac_cv_func_pthread_yield = no -a \
7455                                 "$ac_cv_func_thr_yield" = no ; then
7456                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7457                         fi
7458
7459                                                 for ac_func in pthread_kill
7460 do
7461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7462 echo "configure:7463: checking for $ac_func" >&5
7463 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7464   echo $ac_n "(cached) $ac_c" 1>&6
7465 else
7466   cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 /* System header to define __stub macros and hopefully few prototypes,
7470     which can conflict with char $ac_func(); below.  */
7471 #include <assert.h>
7472 /* Override any gcc2 internal prototype to avoid an error.  */
7473 /* We use char because int might match the return type of a gcc2
7474     builtin and then its argument prototype would still apply.  */
7475 char $ac_func();
7476 char (*f)();
7477
7478 int main() {
7479
7480 /* The GNU C library defines this for functions which it implements
7481     to always fail with ENOSYS.  Some functions are actually named
7482     something starting with __ and the normal name is an alias.  */
7483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7484 choke me
7485 #else
7486 f = $ac_func;
7487 #endif
7488
7489 ; return 0; }
7490 EOF
7491 if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7492   rm -rf conftest*
7493   eval "ac_cv_func_$ac_func=yes"
7494 else
7495   echo "configure: failed program was:" >&5
7496   cat conftest.$ac_ext >&5
7497   rm -rf conftest*
7498   eval "ac_cv_func_$ac_func=no"
7499 fi
7500 rm -f conftest*
7501 fi
7502
7503 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7504   echo "$ac_t""yes" 1>&6
7505     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7506   cat >> confdefs.h <<EOF
7507 #define $ac_tr_func 1
7508 EOF
7509  
7510 else
7511   echo "$ac_t""no" 1>&6
7512 fi
7513 done
7514
7515
7516                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7517 echo "configure:7518: checking for pthread_detach with <pthread.h>" >&5
7518 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
7519   echo $ac_n "(cached) $ac_c" 1>&6
7520 else
7521   
7522                                                                 cat > conftest.$ac_ext <<EOF
7523 #line 7524 "configure"
7524 #include "confdefs.h"
7525
7526 #include <pthread.h>
7527 #ifndef NULL
7528 #define NULL (void*)0
7529 #endif
7530
7531 int main() {
7532 pthread_detach(NULL);
7533 ; return 0; }
7534 EOF
7535 if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7536   rm -rf conftest*
7537   ol_cv_func_pthread_detach=yes
7538 else
7539   echo "configure: failed program was:" >&5
7540   cat conftest.$ac_ext >&5
7541   rm -rf conftest*
7542   ol_cv_func_pthread_detach=no
7543 fi
7544 rm -f conftest*
7545                         
7546 fi
7547
7548 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7549
7550                         if test $ol_cv_func_pthread_detach = no ; then
7551                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7552                         fi
7553
7554                         cat >> confdefs.h <<\EOF
7555 #define HAVE_PTHREAD_DETACH 1
7556 EOF
7557
7558
7559                                                 for ac_func in \
7560                                 pthread_setconcurrency \
7561                                 pthread_getconcurrency \
7562                                 thr_setconcurrency \
7563                                 thr_getconcurrency \
7564                         
7565 do
7566 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7567 echo "configure:7568: checking for $ac_func" >&5
7568 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7569   echo $ac_n "(cached) $ac_c" 1>&6
7570 else
7571   cat > conftest.$ac_ext <<EOF
7572 #line 7573 "configure"
7573 #include "confdefs.h"
7574 /* System header to define __stub macros and hopefully few prototypes,
7575     which can conflict with char $ac_func(); below.  */
7576 #include <assert.h>
7577 /* Override any gcc2 internal prototype to avoid an error.  */
7578 /* We use char because int might match the return type of a gcc2
7579     builtin and then its argument prototype would still apply.  */
7580 char $ac_func();
7581 char (*f)();
7582
7583 int main() {
7584
7585 /* The GNU C library defines this for functions which it implements
7586     to always fail with ENOSYS.  Some functions are actually named
7587     something starting with __ and the normal name is an alias.  */
7588 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7589 choke me
7590 #else
7591 f = $ac_func;
7592 #endif
7593
7594 ; return 0; }
7595 EOF
7596 if { (eval echo configure:7597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7597   rm -rf conftest*
7598   eval "ac_cv_func_$ac_func=yes"
7599 else
7600   echo "configure: failed program was:" >&5
7601   cat conftest.$ac_ext >&5
7602   rm -rf conftest*
7603   eval "ac_cv_func_$ac_func=no"
7604 fi
7605 rm -f conftest*
7606 fi
7607
7608 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7609   echo "$ac_t""yes" 1>&6
7610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7611   cat >> confdefs.h <<EOF
7612 #define $ac_tr_func 1
7613 EOF
7614  
7615 else
7616   echo "$ac_t""no" 1>&6
7617 fi
7618 done
7619
7620
7621                         
7622         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7623 echo "configure:7624: checking for pthread_kill_other_threads_np" >&5
7624 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7625   echo $ac_n "(cached) $ac_c" 1>&6
7626 else
7627   cat > conftest.$ac_ext <<EOF
7628 #line 7629 "configure"
7629 #include "confdefs.h"
7630 /* System header to define __stub macros and hopefully few prototypes,
7631     which can conflict with char pthread_kill_other_threads_np(); below.  */
7632 #include <assert.h>
7633 /* Override any gcc2 internal prototype to avoid an error.  */
7634 /* We use char because int might match the return type of a gcc2
7635     builtin and then its argument prototype would still apply.  */
7636 char pthread_kill_other_threads_np();
7637 char (*f)();
7638
7639 int main() {
7640
7641 /* The GNU C library defines this for functions which it implements
7642     to always fail with ENOSYS.  Some functions are actually named
7643     something starting with __ and the normal name is an alias.  */
7644 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7645 choke me
7646 #else
7647 f = pthread_kill_other_threads_np;
7648 #endif
7649
7650 ; return 0; }
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7653   rm -rf conftest*
7654   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -rf conftest*
7659   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7660 fi
7661 rm -f conftest*
7662 fi
7663
7664 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7665   echo "$ac_t""yes" 1>&6
7666   :
7667 else
7668   echo "$ac_t""no" 1>&6
7669 fi
7670
7671         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7672 echo "configure:7673: checking for LinuxThreads implementation" >&5
7673 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7674   echo $ac_n "(cached) $ac_c" 1>&6
7675 else
7676   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7677 fi
7678
7679 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7680
7681                         
7682         
7683         
7684         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7685 echo "configure:7686: checking for LinuxThreads consistency" >&5
7686 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7687   echo $ac_n "(cached) $ac_c" 1>&6
7688 else
7689   
7690                 if test $ol_cv_header_linux_threads = yes -a \
7691                         $ol_cv_sys_linux_threads = yes; then
7692                         ol_cv_linux_threads=yes
7693                 elif test $ol_cv_header_linux_threads = no -a \
7694                         $ol_cv_sys_linux_threads = no; then
7695                         ol_cv_linux_threads=no
7696                 else
7697                         ol_cv_linux_threads=error
7698                 fi
7699         
7700 fi
7701
7702 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7703
7704
7705                         if test $ol_cv_linux_threads = error; then
7706                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7707                         fi
7708
7709                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7710 echo "configure:7711: checking if pthread_create() works" >&5
7711 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   
7715                         if test "$cross_compiling" = yes; then
7716                                 ol_cv_pthread_create_works=yes
7717 else
7718   cat > conftest.$ac_ext <<EOF
7719 #line 7720 "configure"
7720 #include "confdefs.h"
7721
7722 #include <pthread.h>
7723 #ifndef NULL
7724 #define NULL (void*)0
7725 #endif
7726
7727 static void *task(p)
7728         void *p;
7729 {
7730         return (void *) (p == NULL);
7731 }
7732
7733 int main(argc, argv)
7734         int argc;
7735         char **argv;
7736 {
7737         pthread_t t;
7738 #if HAVE_PTHREADS_D4
7739         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7740 #else
7741         exit(pthread_create(&t, NULL, task, NULL));
7742 #endif
7743 }
7744
7745 EOF
7746 if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7747 then
7748   ol_cv_pthread_create_works=yes
7749 else
7750   echo "configure: failed program was:" >&5
7751   cat conftest.$ac_ext >&5
7752   rm -fr conftest*
7753   ol_cv_pthread_create_works=no
7754 fi
7755 rm -fr conftest*
7756 fi
7757
7758 fi
7759
7760 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7761
7762                         if test $ol_cv_pthread_create_works = no ; then
7763                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7764                         fi
7765
7766                                                 if test $ol_with_yielding_select = auto ; then
7767                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7768 echo "configure:7769: checking if select yields when using pthreads" >&5
7769 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   
7773                                 if test "$cross_compiling" = yes; then
7774   ol_cv_pthread_select_yields=cross
7775 else
7776   cat > conftest.$ac_ext <<EOF
7777 #line 7778 "configure"
7778 #include "confdefs.h"
7779
7780 #include <sys/types.h>
7781 #include <sys/time.h>
7782 #include <unistd.h>
7783 #include <pthread.h>
7784 #ifndef NULL
7785 #define NULL (void*) 0
7786 #endif
7787
7788 static int fildes[2];
7789
7790 static void *task(p)
7791         void *p;
7792 {
7793         int i;
7794         struct timeval tv;
7795
7796         fd_set rfds;
7797
7798         tv.tv_sec=10;
7799         tv.tv_usec=0;
7800
7801         FD_ZERO(&rfds);
7802         FD_SET(fildes[0], &rfds);
7803
7804         /* we're not interested in any fds */
7805         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7806
7807         if(i < 0) {
7808                 perror("select");
7809                 exit(10);
7810         }
7811
7812         exit(0); /* if we exit here, the select blocked the whole process */
7813 }
7814
7815 int main(argc, argv)
7816         int argc;
7817         char **argv;
7818 {
7819         pthread_t t;
7820
7821         /* create a pipe to select */
7822         if(pipe(&fildes[0])) {
7823                 perror("select");
7824                 exit(1);
7825         }
7826
7827 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7828         (void) pthread_setconcurrency(2);
7829 #else
7830 #ifdef HAVE_THR_SETCONCURRENCY
7831         /* Set Solaris LWP concurrency to 2 */
7832         thr_setconcurrency(2);
7833 #endif
7834 #endif
7835
7836 #if HAVE_PTHREADS_D4
7837         pthread_create(&t, pthread_attr_default, task, NULL);
7838 #else
7839         pthread_create(&t, NULL, task, NULL);
7840 #endif
7841
7842 #if HAVE_SCHED_YIELD
7843         sched_yield();  /* make sure task runs first */
7844 #else
7845 #ifdef HAVE_PTHREAD_YIELD
7846         pthread_yield();        /* make sure task runs first */
7847 #endif
7848 #endif
7849
7850         exit(2);
7851 }
7852 EOF
7853 if { (eval echo configure:7854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7854 then
7855   ol_cv_pthread_select_yields=no
7856 else
7857   echo "configure: failed program was:" >&5
7858   cat conftest.$ac_ext >&5
7859   rm -fr conftest*
7860   ol_cv_pthread_select_yields=yes
7861 fi
7862 rm -fr conftest*
7863 fi
7864
7865 fi
7866
7867 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7868
7869                                 if test $ol_cv_pthread_select_yields = cross ; then
7870                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7871                                 fi
7872
7873                                 if test $ol_cv_pthread_select_yields = yes ; then
7874                                         ol_with_yielding_select=yes
7875                                 fi
7876                         fi
7877
7878                                                 CPPFLAGS="$save_CPPFLAGS"
7879                         LIBS="$save_LIBS"
7880                 else
7881                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7882                 fi
7883         fi
7884
7885         if test $ol_with_threads = posix ; then
7886                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7887         fi
7888 fi
7889
7890 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7891         -o $ol_with_threads = mach ; then
7892
7893                 for ac_hdr in mach/cthreads.h
7894 do
7895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7896 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7897 echo "configure:7898: checking for $ac_hdr" >&5
7898 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7899   echo $ac_n "(cached) $ac_c" 1>&6
7900 else
7901   cat > conftest.$ac_ext <<EOF
7902 #line 7903 "configure"
7903 #include "confdefs.h"
7904 #include <$ac_hdr>
7905 EOF
7906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7907 { (eval echo configure:7908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7909 if test -z "$ac_err"; then
7910   rm -rf conftest*
7911   eval "ac_cv_header_$ac_safe=yes"
7912 else
7913   echo "$ac_err" >&5
7914   echo "configure: failed program was:" >&5
7915   cat conftest.$ac_ext >&5
7916   rm -rf conftest*
7917   eval "ac_cv_header_$ac_safe=no"
7918 fi
7919 rm -f conftest*
7920 fi
7921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7922   echo "$ac_t""yes" 1>&6
7923     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7924   cat >> confdefs.h <<EOF
7925 #define $ac_tr_hdr 1
7926 EOF
7927  
7928 else
7929   echo "$ac_t""no" 1>&6
7930 fi
7931 done
7932
7933         if test $ac_cv_header_mach_cthreads_h = yes ; then
7934                 ol_with_threads=found
7935
7936                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7937 echo "configure:7938: checking for cthread_fork" >&5
7938 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* System header to define __stub macros and hopefully few prototypes,
7945     which can conflict with char cthread_fork(); below.  */
7946 #include <assert.h>
7947 /* Override any gcc2 internal prototype to avoid an error.  */
7948 /* We use char because int might match the return type of a gcc2
7949     builtin and then its argument prototype would still apply.  */
7950 char cthread_fork();
7951 char (*f)();
7952
7953 int main() {
7954
7955 /* The GNU C library defines this for functions which it implements
7956     to always fail with ENOSYS.  Some functions are actually named
7957     something starting with __ and the normal name is an alias.  */
7958 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7959 choke me
7960 #else
7961 f = cthread_fork;
7962 #endif
7963
7964 ; return 0; }
7965 EOF
7966 if { (eval echo configure:7967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7967   rm -rf conftest*
7968   eval "ac_cv_func_cthread_fork=yes"
7969 else
7970   echo "configure: failed program was:" >&5
7971   cat conftest.$ac_ext >&5
7972   rm -rf conftest*
7973   eval "ac_cv_func_cthread_fork=no"
7974 fi
7975 rm -f conftest*
7976 fi
7977
7978 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7979   echo "$ac_t""yes" 1>&6
7980   ol_link_threads=yes
7981 else
7982   echo "$ac_t""no" 1>&6
7983 fi
7984
7985
7986                 if test $ol_link_threads = no ; then
7987                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7988 echo "configure:7989: checking for cthread_fork with -all_load" >&5
7989 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   
7993                                                                 save_LIBS="$LIBS"
7994                                 LIBS="-all_load $LIBS"
7995                                 cat > conftest.$ac_ext <<EOF
7996 #line 7997 "configure"
7997 #include "confdefs.h"
7998 #include <mach/cthreads.h>
7999 int main() {
8000
8001                                         cthread_fork((void *)0, (void *)0);
8002                                         
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8006   rm -rf conftest*
8007   ol_cv_cthread_all_load=yes
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   ol_cv_cthread_all_load=no
8013 fi
8014 rm -f conftest*
8015                                                                 LIBS="$save_LIBS"
8016                         
8017 fi
8018
8019 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
8020
8021                         if test $ol_cv_cthread_all_load = yes ; then
8022                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
8023                                 ol_link_threads=mach
8024                         fi
8025                 fi
8026
8027                 if test $ol_link_threads != no ; then
8028                         : check for cthread specific functionality here
8029                         cat >> confdefs.h <<\EOF
8030 #define HAVE_MACH_CTHREADS 1
8031 EOF
8032
8033                 else
8034                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
8035                 fi
8036         fi
8037
8038         if test $ol_with_threads = mach ; then
8039                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
8040         fi
8041 fi
8042
8043 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8044         -o $ol_with_threads = lwp ; then
8045
8046                 for ac_hdr in thread.h synch.h
8047 do
8048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8050 echo "configure:8051: checking for $ac_hdr" >&5
8051 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8052   echo $ac_n "(cached) $ac_c" 1>&6
8053 else
8054   cat > conftest.$ac_ext <<EOF
8055 #line 8056 "configure"
8056 #include "confdefs.h"
8057 #include <$ac_hdr>
8058 EOF
8059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8060 { (eval echo configure:8061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8062 if test -z "$ac_err"; then
8063   rm -rf conftest*
8064   eval "ac_cv_header_$ac_safe=yes"
8065 else
8066   echo "$ac_err" >&5
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069   rm -rf conftest*
8070   eval "ac_cv_header_$ac_safe=no"
8071 fi
8072 rm -f conftest*
8073 fi
8074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8075   echo "$ac_t""yes" 1>&6
8076     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8077   cat >> confdefs.h <<EOF
8078 #define $ac_tr_hdr 1
8079 EOF
8080  
8081 else
8082   echo "$ac_t""no" 1>&6
8083 fi
8084 done
8085
8086         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8087                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8088 echo "configure:8089: checking for thr_create in -lthread" >&5
8089 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
8090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8091   echo $ac_n "(cached) $ac_c" 1>&6
8092 else
8093   ac_save_LIBS="$LIBS"
8094 LIBS="-lthread  $LIBS"
8095 cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 /* Override any gcc2 internal prototype to avoid an error.  */
8099 /* We use char because int might match the return type of a gcc2
8100     builtin and then its argument prototype would still apply.  */
8101 char thr_create();
8102
8103 int main() {
8104 thr_create()
8105 ; return 0; }
8106 EOF
8107 if { (eval echo configure:8108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8108   rm -rf conftest*
8109   eval "ac_cv_lib_$ac_lib_var=yes"
8110 else
8111   echo "configure: failed program was:" >&5
8112   cat conftest.$ac_ext >&5
8113   rm -rf conftest*
8114   eval "ac_cv_lib_$ac_lib_var=no"
8115 fi
8116 rm -f conftest*
8117 LIBS="$ac_save_LIBS"
8118
8119 fi
8120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8121   echo "$ac_t""yes" 1>&6
8122   have_thr=yes
8123 else
8124   echo "$ac_t""no" 1>&6
8125 have_thr=no
8126 fi
8127
8128
8129                 if test $have_thr = yes ; then
8130                         cat >> confdefs.h <<\EOF
8131 #define HAVE_THR 1
8132 EOF
8133
8134                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8135                         ol_link_threads=thr
8136
8137                         if test $ol_with_yielding_select = auto ; then
8138                                 ol_with_yielding_select=yes
8139                         fi
8140
8141                                                 for ac_func in \
8142                                 thr_setconcurrency \
8143                                 thr_getconcurrency \
8144                         
8145 do
8146 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8147 echo "configure:8148: checking for $ac_func" >&5
8148 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8149   echo $ac_n "(cached) $ac_c" 1>&6
8150 else
8151   cat > conftest.$ac_ext <<EOF
8152 #line 8153 "configure"
8153 #include "confdefs.h"
8154 /* System header to define __stub macros and hopefully few prototypes,
8155     which can conflict with char $ac_func(); below.  */
8156 #include <assert.h>
8157 /* Override any gcc2 internal prototype to avoid an error.  */
8158 /* We use char because int might match the return type of a gcc2
8159     builtin and then its argument prototype would still apply.  */
8160 char $ac_func();
8161 char (*f)();
8162
8163 int main() {
8164
8165 /* The GNU C library defines this for functions which it implements
8166     to always fail with ENOSYS.  Some functions are actually named
8167     something starting with __ and the normal name is an alias.  */
8168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8169 choke me
8170 #else
8171 f = $ac_func;
8172 #endif
8173
8174 ; return 0; }
8175 EOF
8176 if { (eval echo configure:8177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8177   rm -rf conftest*
8178   eval "ac_cv_func_$ac_func=yes"
8179 else
8180   echo "configure: failed program was:" >&5
8181   cat conftest.$ac_ext >&5
8182   rm -rf conftest*
8183   eval "ac_cv_func_$ac_func=no"
8184 fi
8185 rm -f conftest*
8186 fi
8187
8188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8189   echo "$ac_t""yes" 1>&6
8190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8191   cat >> confdefs.h <<EOF
8192 #define $ac_tr_func 1
8193 EOF
8194  
8195 else
8196   echo "$ac_t""no" 1>&6
8197 fi
8198 done
8199
8200                 fi
8201         fi
8202
8203                 for ac_hdr in lwp/lwp.h
8204 do
8205 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8206 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8207 echo "configure:8208: checking for $ac_hdr" >&5
8208 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8209   echo $ac_n "(cached) $ac_c" 1>&6
8210 else
8211   cat > conftest.$ac_ext <<EOF
8212 #line 8213 "configure"
8213 #include "confdefs.h"
8214 #include <$ac_hdr>
8215 EOF
8216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8217 { (eval echo configure:8218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8219 if test -z "$ac_err"; then
8220   rm -rf conftest*
8221   eval "ac_cv_header_$ac_safe=yes"
8222 else
8223   echo "$ac_err" >&5
8224   echo "configure: failed program was:" >&5
8225   cat conftest.$ac_ext >&5
8226   rm -rf conftest*
8227   eval "ac_cv_header_$ac_safe=no"
8228 fi
8229 rm -f conftest*
8230 fi
8231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8232   echo "$ac_t""yes" 1>&6
8233     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8234   cat >> confdefs.h <<EOF
8235 #define $ac_tr_hdr 1
8236 EOF
8237  
8238 else
8239   echo "$ac_t""no" 1>&6
8240 fi
8241 done
8242
8243         if test $ac_cv_header_lwp_lwp_h = yes ; then
8244                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8245 echo "configure:8246: checking for lwp_create in -llwp" >&5
8246 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
8247 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8248   echo $ac_n "(cached) $ac_c" 1>&6
8249 else
8250   ac_save_LIBS="$LIBS"
8251 LIBS="-llwp  $LIBS"
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255 /* Override any gcc2 internal prototype to avoid an error.  */
8256 /* We use char because int might match the return type of a gcc2
8257     builtin and then its argument prototype would still apply.  */
8258 char lwp_create();
8259
8260 int main() {
8261 lwp_create()
8262 ; return 0; }
8263 EOF
8264 if { (eval echo configure:8265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8265   rm -rf conftest*
8266   eval "ac_cv_lib_$ac_lib_var=yes"
8267 else
8268   echo "configure: failed program was:" >&5
8269   cat conftest.$ac_ext >&5
8270   rm -rf conftest*
8271   eval "ac_cv_lib_$ac_lib_var=no"
8272 fi
8273 rm -f conftest*
8274 LIBS="$ac_save_LIBS"
8275
8276 fi
8277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8278   echo "$ac_t""yes" 1>&6
8279   have_lwp=yes
8280 else
8281   echo "$ac_t""no" 1>&6
8282 have_lwp=no
8283 fi
8284
8285
8286                 if test $have_lwp = yes ; then
8287                         cat >> confdefs.h <<\EOF
8288 #define HAVE_LWP 1
8289 EOF
8290
8291                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8292                         ol_link_threads=lwp
8293
8294                         if test $ol_with_yielding_select = auto ; then
8295                                 ol_with_yielding_select=no
8296                         fi
8297                 fi
8298         fi
8299 fi
8300
8301 if test $ol_with_yielding_select = yes ; then
8302         cat >> confdefs.h <<\EOF
8303 #define HAVE_YIELDING_SELECT 1
8304 EOF
8305
8306 fi
8307
8308 if test $ol_with_threads = manual ; then
8309                 ol_link_threads=yes
8310
8311         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8312
8313         for ac_hdr in pthread.h sched.h
8314 do
8315 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8316 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8317 echo "configure:8318: checking for $ac_hdr" >&5
8318 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8319   echo $ac_n "(cached) $ac_c" 1>&6
8320 else
8321   cat > conftest.$ac_ext <<EOF
8322 #line 8323 "configure"
8323 #include "confdefs.h"
8324 #include <$ac_hdr>
8325 EOF
8326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8327 { (eval echo configure:8328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8329 if test -z "$ac_err"; then
8330   rm -rf conftest*
8331   eval "ac_cv_header_$ac_safe=yes"
8332 else
8333   echo "$ac_err" >&5
8334   echo "configure: failed program was:" >&5
8335   cat conftest.$ac_ext >&5
8336   rm -rf conftest*
8337   eval "ac_cv_header_$ac_safe=no"
8338 fi
8339 rm -f conftest*
8340 fi
8341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8342   echo "$ac_t""yes" 1>&6
8343     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8344   cat >> confdefs.h <<EOF
8345 #define $ac_tr_hdr 1
8346 EOF
8347  
8348 else
8349   echo "$ac_t""no" 1>&6
8350 fi
8351 done
8352
8353         for ac_func in sched_yield pthread_yield
8354 do
8355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8356 echo "configure:8357: checking for $ac_func" >&5
8357 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8358   echo $ac_n "(cached) $ac_c" 1>&6
8359 else
8360   cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 /* System header to define __stub macros and hopefully few prototypes,
8364     which can conflict with char $ac_func(); below.  */
8365 #include <assert.h>
8366 /* Override any gcc2 internal prototype to avoid an error.  */
8367 /* We use char because int might match the return type of a gcc2
8368     builtin and then its argument prototype would still apply.  */
8369 char $ac_func();
8370 char (*f)();
8371
8372 int main() {
8373
8374 /* The GNU C library defines this for functions which it implements
8375     to always fail with ENOSYS.  Some functions are actually named
8376     something starting with __ and the normal name is an alias.  */
8377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8378 choke me
8379 #else
8380 f = $ac_func;
8381 #endif
8382
8383 ; return 0; }
8384 EOF
8385 if { (eval echo configure:8386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8386   rm -rf conftest*
8387   eval "ac_cv_func_$ac_func=yes"
8388 else
8389   echo "configure: failed program was:" >&5
8390   cat conftest.$ac_ext >&5
8391   rm -rf conftest*
8392   eval "ac_cv_func_$ac_func=no"
8393 fi
8394 rm -f conftest*
8395 fi
8396
8397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8398   echo "$ac_t""yes" 1>&6
8399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8400   cat >> confdefs.h <<EOF
8401 #define $ac_tr_func 1
8402 EOF
8403  
8404 else
8405   echo "$ac_t""no" 1>&6
8406 fi
8407 done
8408
8409         
8410         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8411 echo "configure:8412: checking for LinuxThreads pthread.h" >&5
8412 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
8413   echo $ac_n "(cached) $ac_c" 1>&6
8414 else
8415   cat > conftest.$ac_ext <<EOF
8416 #line 8417 "configure"
8417 #include "confdefs.h"
8418 #include <pthread.h>
8419 EOF
8420 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8421   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8422   rm -rf conftest*
8423   ol_cv_header_linux_threads=yes
8424 else
8425   rm -rf conftest*
8426   ol_cv_header_linux_threads=no
8427 fi
8428 rm -f conftest*
8429
8430                 
8431 fi
8432
8433 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8434         if test $ol_cv_header_linux_threads = yes; then
8435                 cat >> confdefs.h <<\EOF
8436 #define HAVE_LINUX_THREADS 1
8437 EOF
8438
8439         fi
8440
8441
8442         for ac_hdr in mach/cthreads.h
8443 do
8444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8446 echo "configure:8447: checking for $ac_hdr" >&5
8447 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8448   echo $ac_n "(cached) $ac_c" 1>&6
8449 else
8450   cat > conftest.$ac_ext <<EOF
8451 #line 8452 "configure"
8452 #include "confdefs.h"
8453 #include <$ac_hdr>
8454 EOF
8455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8456 { (eval echo configure:8457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8458 if test -z "$ac_err"; then
8459   rm -rf conftest*
8460   eval "ac_cv_header_$ac_safe=yes"
8461 else
8462   echo "$ac_err" >&5
8463   echo "configure: failed program was:" >&5
8464   cat conftest.$ac_ext >&5
8465   rm -rf conftest*
8466   eval "ac_cv_header_$ac_safe=no"
8467 fi
8468 rm -f conftest*
8469 fi
8470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8471   echo "$ac_t""yes" 1>&6
8472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8473   cat >> confdefs.h <<EOF
8474 #define $ac_tr_hdr 1
8475 EOF
8476  
8477 else
8478   echo "$ac_t""no" 1>&6
8479 fi
8480 done
8481
8482         for ac_hdr in lwp/lwp.h
8483 do
8484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8486 echo "configure:8487: checking for $ac_hdr" >&5
8487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8488   echo $ac_n "(cached) $ac_c" 1>&6
8489 else
8490   cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493 #include <$ac_hdr>
8494 EOF
8495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8496 { (eval echo configure:8497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8498 if test -z "$ac_err"; then
8499   rm -rf conftest*
8500   eval "ac_cv_header_$ac_safe=yes"
8501 else
8502   echo "$ac_err" >&5
8503   echo "configure: failed program was:" >&5
8504   cat conftest.$ac_ext >&5
8505   rm -rf conftest*
8506   eval "ac_cv_header_$ac_safe=no"
8507 fi
8508 rm -f conftest*
8509 fi
8510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8511   echo "$ac_t""yes" 1>&6
8512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8513   cat >> confdefs.h <<EOF
8514 #define $ac_tr_hdr 1
8515 EOF
8516  
8517 else
8518   echo "$ac_t""no" 1>&6
8519 fi
8520 done
8521
8522         for ac_hdr in thread.h synch.h
8523 do
8524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8526 echo "configure:8527: checking for $ac_hdr" >&5
8527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8528   echo $ac_n "(cached) $ac_c" 1>&6
8529 else
8530   cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 #include <$ac_hdr>
8534 EOF
8535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8536 { (eval echo configure:8537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8538 if test -z "$ac_err"; then
8539   rm -rf conftest*
8540   eval "ac_cv_header_$ac_safe=yes"
8541 else
8542   echo "$ac_err" >&5
8543   echo "configure: failed program was:" >&5
8544   cat conftest.$ac_ext >&5
8545   rm -rf conftest*
8546   eval "ac_cv_header_$ac_safe=no"
8547 fi
8548 rm -f conftest*
8549 fi
8550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8551   echo "$ac_t""yes" 1>&6
8552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8553   cat >> confdefs.h <<EOF
8554 #define $ac_tr_hdr 1
8555 EOF
8556  
8557 else
8558   echo "$ac_t""no" 1>&6
8559 fi
8560 done
8561
8562 fi
8563
8564 if test $ol_link_threads != no ; then  
8565                         cat >> confdefs.h <<\EOF
8566 #define REENTRANT 1
8567 EOF
8568
8569         cat >> confdefs.h <<\EOF
8570 #define _REENTRANT 1
8571 EOF
8572
8573         cat >> confdefs.h <<\EOF
8574 #define THREAD_SAFE 1
8575 EOF
8576
8577         cat >> confdefs.h <<\EOF
8578 #define _THREAD_SAFE 1
8579 EOF
8580
8581         cat >> confdefs.h <<\EOF
8582 #define THREADSAFE 1
8583 EOF
8584
8585         cat >> confdefs.h <<\EOF
8586 #define _THREADSAFE 1
8587 EOF
8588
8589         cat >> confdefs.h <<\EOF
8590 #define _SGI_MP_SOURCE 1
8591 EOF
8592
8593
8594                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8595 echo "configure:8596: checking for thread specific errno" >&5
8596 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   
8600                 cat > conftest.$ac_ext <<EOF
8601 #line 8602 "configure"
8602 #include "confdefs.h"
8603 #include <errno.h>
8604 int main() {
8605 errno = 0;
8606 ; return 0; }
8607 EOF
8608 if { (eval echo configure:8609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8609   rm -rf conftest*
8610   ol_cv_errno_thread_specific=yes
8611 else
8612   echo "configure: failed program was:" >&5
8613   cat conftest.$ac_ext >&5
8614   rm -rf conftest*
8615   ol_cv_errno_thread_specific=no
8616 fi
8617 rm -f conftest*
8618         
8619 fi
8620
8621 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8622
8623                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8624 echo "configure:8625: checking for thread specific h_errno" >&5
8625 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   
8629                 cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 #include <netdb.h>
8633 int main() {
8634 h_errno = 0;
8635 ; return 0; }
8636 EOF
8637 if { (eval echo configure:8638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8638   rm -rf conftest*
8639   ol_cv_h_errno_thread_specific=yes
8640 else
8641   echo "configure: failed program was:" >&5
8642   cat conftest.$ac_ext >&5
8643   rm -rf conftest*
8644   ol_cv_h_errno_thread_specific=no
8645 fi
8646 rm -f conftest*
8647         
8648 fi
8649
8650 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8651
8652         if test $ol_cv_errno_thread_specific != yes \
8653                 -o $ol_cv_h_errno_thread_specific != yes ; then
8654                 LIBS="$LTHREAD_LIBS $LIBS"
8655                 LTHREAD_LIBS=""
8656         fi
8657
8658 fi  
8659
8660 if test $ol_link_threads = no ; then
8661         if test $ol_with_threads = yes ; then
8662                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8663         fi
8664
8665         if test $ol_with_threads = auto ; then
8666                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8667                 ol_with_threads=no
8668         fi
8669
8670         cat >> confdefs.h <<\EOF
8671 #define NO_THREADS 1
8672 EOF
8673
8674         LTHREAD_LIBS=""
8675 fi
8676
8677 if test $ol_link_threads != no ; then
8678         cat >> confdefs.h <<\EOF
8679 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8680 EOF
8681
8682 fi
8683
8684
8685 ol_link_ldbm=no 
8686 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8687         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8688 echo "configure:8689: checking for DB2 library" >&5
8689 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8690   echo $ac_n "(cached) $ac_c" 1>&6
8691 else
8692         ol_LIBS="$LIBS"
8693         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8694 echo "configure:8695: checking for db_open in -ldb" >&5
8695 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8697   echo $ac_n "(cached) $ac_c" 1>&6
8698 else
8699   ac_save_LIBS="$LIBS"
8700 LIBS="-ldb  $LIBS"
8701 cat > conftest.$ac_ext <<EOF
8702 #line 8703 "configure"
8703 #include "confdefs.h"
8704 /* Override any gcc2 internal prototype to avoid an error.  */
8705 /* We use char because int might match the return type of a gcc2
8706     builtin and then its argument prototype would still apply.  */
8707 char db_open();
8708
8709 int main() {
8710 db_open()
8711 ; return 0; }
8712 EOF
8713 if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8714   rm -rf conftest*
8715   eval "ac_cv_lib_$ac_lib_var=yes"
8716 else
8717   echo "configure: failed program was:" >&5
8718   cat conftest.$ac_ext >&5
8719   rm -rf conftest*
8720   eval "ac_cv_lib_$ac_lib_var=no"
8721 fi
8722 rm -f conftest*
8723 LIBS="$ac_save_LIBS"
8724
8725 fi
8726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8727   echo "$ac_t""yes" 1>&6
8728   ol_cv_lib_db2=-ldb
8729 else
8730   echo "$ac_t""no" 1>&6
8731 ol_cv_lib_db2=no
8732 fi
8733
8734         LIBS="$ol_LIBS"
8735
8736 fi
8737
8738 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8739
8740 for ac_hdr in db.h
8741 do
8742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8744 echo "configure:8745: checking for $ac_hdr" >&5
8745 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8746   echo $ac_n "(cached) $ac_c" 1>&6
8747 else
8748   cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 #include <$ac_hdr>
8752 EOF
8753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8754 { (eval echo configure:8755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8756 if test -z "$ac_err"; then
8757   rm -rf conftest*
8758   eval "ac_cv_header_$ac_safe=yes"
8759 else
8760   echo "$ac_err" >&5
8761   echo "configure: failed program was:" >&5
8762   cat conftest.$ac_ext >&5
8763   rm -rf conftest*
8764   eval "ac_cv_header_$ac_safe=no"
8765 fi
8766 rm -f conftest*
8767 fi
8768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8769   echo "$ac_t""yes" 1>&6
8770     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8771   cat >> confdefs.h <<EOF
8772 #define $ac_tr_hdr 1
8773 EOF
8774  
8775 else
8776   echo "$ac_t""no" 1>&6
8777 fi
8778 done
8779
8780 if test $ac_cv_header_db_h = yes ; then
8781         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8782 echo "configure:8783: checking if db.h is DB2" >&5
8783 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   
8787                 cat > conftest.$ac_ext <<EOF
8788 #line 8789 "configure"
8789 #include "confdefs.h"
8790
8791 #                       include <db.h>
8792                         /* this check could be improved */
8793 #                       ifdef DB_VERSION_MAJOR
8794 #                               if DB_VERSION_MAJOR == 2
8795                                         __db_version_2
8796 #                               endif
8797 #                       endif
8798                 
8799 EOF
8800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8801   egrep "__db_version_2" >/dev/null 2>&1; then
8802   rm -rf conftest*
8803   ol_cv_header_db2=yes
8804 else
8805   rm -rf conftest*
8806   ol_cv_header_db2=no
8807 fi
8808 rm -f conftest*
8809
8810 fi
8811
8812 echo "$ac_t""$ol_cv_header_db2" 1>&6
8813 else
8814         ol_cv_header_db2=no
8815 fi
8816
8817
8818  
8819  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8820 echo "configure:8821: checking for Berkeley DB2" >&5
8821 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8822   echo $ac_n "(cached) $ac_c" 1>&6
8823 else
8824   
8825         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8826                 ol_cv_berkeley_db2=no
8827         else
8828                 ol_cv_berkeley_db2=yes
8829         fi
8830
8831 fi
8832
8833 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8834  if test $ol_cv_berkeley_db2 = yes ; then
8835         cat >> confdefs.h <<\EOF
8836 #define HAVE_BERKELEY_DB2 1
8837 EOF
8838
8839  fi
8840
8841
8842         if test $ol_cv_berkeley_db2 = yes ; then
8843                 ol_link_ldbm=db2
8844                 ol_with_ldbm_api=db2
8845
8846                 if test $ol_with_ldbm_type = hash ; then
8847                         cat >> confdefs.h <<\EOF
8848 #define LDBM_USE_DBHASH 1
8849 EOF
8850
8851                 else
8852                         cat >> confdefs.h <<\EOF
8853 #define LDBM_USE_DBBTREE 1
8854 EOF
8855
8856                 fi
8857
8858                                                 if test $ol_cv_lib_db2 != yes ; then
8859                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8860                 fi
8861         fi
8862 fi
8863
8864 ol_link_bdb2=no
8865 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8866         ol_link_bdb2=yes
8867 fi
8868
8869 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8870         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8871 echo "configure:8872: checking for Berkeley DB library" >&5
8872 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8873   echo $ac_n "(cached) $ac_c" 1>&6
8874 else
8875   
8876         for ac_hdr in db1/db.h
8877 do
8878 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8879 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8880 echo "configure:8881: checking for $ac_hdr" >&5
8881 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8882   echo $ac_n "(cached) $ac_c" 1>&6
8883 else
8884   cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887 #include <$ac_hdr>
8888 EOF
8889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8890 { (eval echo configure:8891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8892 if test -z "$ac_err"; then
8893   rm -rf conftest*
8894   eval "ac_cv_header_$ac_safe=yes"
8895 else
8896   echo "$ac_err" >&5
8897   echo "configure: failed program was:" >&5
8898   cat conftest.$ac_ext >&5
8899   rm -rf conftest*
8900   eval "ac_cv_header_$ac_safe=no"
8901 fi
8902 rm -f conftest*
8903 fi
8904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8905   echo "$ac_t""yes" 1>&6
8906     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8907   cat >> confdefs.h <<EOF
8908 #define $ac_tr_hdr 1
8909 EOF
8910  
8911 else
8912   echo "$ac_t""no" 1>&6
8913 fi
8914 done
8915
8916         ol_LIBS="$LIBS"
8917         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8918 echo "configure:8919: checking for dbopen" >&5
8919 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8920   echo $ac_n "(cached) $ac_c" 1>&6
8921 else
8922   cat > conftest.$ac_ext <<EOF
8923 #line 8924 "configure"
8924 #include "confdefs.h"
8925 /* System header to define __stub macros and hopefully few prototypes,
8926     which can conflict with char dbopen(); below.  */
8927 #include <assert.h>
8928 /* Override any gcc2 internal prototype to avoid an error.  */
8929 /* We use char because int might match the return type of a gcc2
8930     builtin and then its argument prototype would still apply.  */
8931 char dbopen();
8932 char (*f)();
8933
8934 int main() {
8935
8936 /* The GNU C library defines this for functions which it implements
8937     to always fail with ENOSYS.  Some functions are actually named
8938     something starting with __ and the normal name is an alias.  */
8939 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8940 choke me
8941 #else
8942 f = dbopen;
8943 #endif
8944
8945 ; return 0; }
8946 EOF
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8948   rm -rf conftest*
8949   eval "ac_cv_func_dbopen=yes"
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_func_dbopen=no"
8955 fi
8956 rm -f conftest*
8957 fi
8958
8959 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8960   echo "$ac_t""yes" 1>&6
8961   ol_cv_lib_db=yes
8962 else
8963   echo "$ac_t""no" 1>&6
8964
8965                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8966 echo "configure:8967: checking for dbopen in -ldb1" >&5
8967 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
8968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8969   echo $ac_n "(cached) $ac_c" 1>&6
8970 else
8971   ac_save_LIBS="$LIBS"
8972 LIBS="-ldb1  $LIBS"
8973 cat > conftest.$ac_ext <<EOF
8974 #line 8975 "configure"
8975 #include "confdefs.h"
8976 /* Override any gcc2 internal prototype to avoid an error.  */
8977 /* We use char because int might match the return type of a gcc2
8978     builtin and then its argument prototype would still apply.  */
8979 char dbopen();
8980
8981 int main() {
8982 dbopen()
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8986   rm -rf conftest*
8987   eval "ac_cv_lib_$ac_lib_var=yes"
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   eval "ac_cv_lib_$ac_lib_var=no"
8993 fi
8994 rm -f conftest*
8995 LIBS="$ac_save_LIBS"
8996
8997 fi
8998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8999   echo "$ac_t""yes" 1>&6
9000   ol_cv_lib_db=-ldb1
9001 else
9002   echo "$ac_t""no" 1>&6
9003
9004                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
9005 echo "configure:9006: checking for dbopen in -ldb" >&5
9006 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
9007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9008   echo $ac_n "(cached) $ac_c" 1>&6
9009 else
9010   ac_save_LIBS="$LIBS"
9011 LIBS="-ldb  $LIBS"
9012 cat > conftest.$ac_ext <<EOF
9013 #line 9014 "configure"
9014 #include "confdefs.h"
9015 /* Override any gcc2 internal prototype to avoid an error.  */
9016 /* We use char because int might match the return type of a gcc2
9017     builtin and then its argument prototype would still apply.  */
9018 char dbopen();
9019
9020 int main() {
9021 dbopen()
9022 ; return 0; }
9023 EOF
9024 if { (eval echo configure:9025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=yes"
9027 else
9028   echo "configure: failed program was:" >&5
9029   cat conftest.$ac_ext >&5
9030   rm -rf conftest*
9031   eval "ac_cv_lib_$ac_lib_var=no"
9032 fi
9033 rm -f conftest*
9034 LIBS="$ac_save_LIBS"
9035
9036 fi
9037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9038   echo "$ac_t""yes" 1>&6
9039   ol_cv_lib_db=-ldb
9040 else
9041   echo "$ac_t""no" 1>&6
9042 ol_cv_lib_db=no
9043 fi
9044
9045                 
9046 fi
9047
9048         
9049 fi
9050
9051         LIBS="$ol_LIBS"
9052
9053 fi
9054
9055 echo "$ac_t""$ol_cv_lib_db" 1>&6
9056
9057
9058 for ac_hdr in db_185.h
9059 do
9060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9062 echo "configure:9063: checking for $ac_hdr" >&5
9063 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9064   echo $ac_n "(cached) $ac_c" 1>&6
9065 else
9066   cat > conftest.$ac_ext <<EOF
9067 #line 9068 "configure"
9068 #include "confdefs.h"
9069 #include <$ac_hdr>
9070 EOF
9071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9072 { (eval echo configure:9073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9074 if test -z "$ac_err"; then
9075   rm -rf conftest*
9076   eval "ac_cv_header_$ac_safe=yes"
9077 else
9078   echo "$ac_err" >&5
9079   echo "configure: failed program was:" >&5
9080   cat conftest.$ac_ext >&5
9081   rm -rf conftest*
9082   eval "ac_cv_header_$ac_safe=no"
9083 fi
9084 rm -f conftest*
9085 fi
9086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9087   echo "$ac_t""yes" 1>&6
9088     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9089   cat >> confdefs.h <<EOF
9090 #define $ac_tr_hdr 1
9091 EOF
9092  
9093 else
9094   echo "$ac_t""no" 1>&6
9095 fi
9096 done
9097
9098 if test "$ol_cv_header_db2" = yes ; then
9099         
9100         ol_cv_header_db=$ac_cv_header_db_185_h
9101 else
9102         ol_cv_header_db=$ac_cv_header_db_h
9103 fi
9104
9105
9106  
9107  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9108 echo "configure:9109: checking for Berkeley DB" >&5
9109 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
9110   echo $ac_n "(cached) $ac_c" 1>&6
9111 else
9112   
9113         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9114                 ol_cv_berkeley_db=no
9115         else
9116                 ol_cv_berkeley_db=yes
9117         fi
9118
9119 fi
9120
9121 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9122  if test $ol_cv_berkeley_db = yes ; then
9123         cat >> confdefs.h <<\EOF
9124 #define HAVE_BERKELEY_DB 1
9125 EOF
9126
9127  fi
9128
9129
9130         if test $ol_cv_berkeley_db = yes ; then
9131                 ol_link_ldbm=db
9132                 ol_with_ldbm_api=db
9133
9134                 if test $ol_with_ldbm_type = hash ; then
9135                         cat >> confdefs.h <<\EOF
9136 #define LDBM_USE_DBHASH 1
9137 EOF
9138
9139                 else
9140                         cat >> confdefs.h <<\EOF
9141 #define LDBM_USE_DBBTREE 1
9142 EOF
9143
9144                 fi
9145
9146                                                 if test $ol_cv_lib_db != yes ; then
9147                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9148                 fi
9149         fi
9150 fi
9151
9152 if test $ol_with_ldbm_api = manual ; then
9153                 ol_link_ldbm=yes
9154
9155         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9156
9157         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9158 do
9159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9161 echo "configure:9162: checking for $ac_hdr" >&5
9162 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9163   echo $ac_n "(cached) $ac_c" 1>&6
9164 else
9165   cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 #include <$ac_hdr>
9169 EOF
9170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9171 { (eval echo configure:9172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9173 if test -z "$ac_err"; then
9174   rm -rf conftest*
9175   eval "ac_cv_header_$ac_safe=yes"
9176 else
9177   echo "$ac_err" >&5
9178   echo "configure: failed program was:" >&5
9179   cat conftest.$ac_ext >&5
9180   rm -rf conftest*
9181   eval "ac_cv_header_$ac_safe=no"
9182 fi
9183 rm -f conftest*
9184 fi
9185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9186   echo "$ac_t""yes" 1>&6
9187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9188   cat >> confdefs.h <<EOF
9189 #define $ac_tr_hdr 1
9190 EOF
9191  
9192 else
9193   echo "$ac_t""no" 1>&6
9194 fi
9195 done
9196
9197 fi
9198
9199 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9200         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9201         ol_with_ldbm_api=none
9202 fi
9203
9204 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9205         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9206 echo "configure:9207: checking for MDBM library" >&5
9207 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
9208   echo $ac_n "(cached) $ac_c" 1>&6
9209 else
9210         ol_LIBS="$LIBS"
9211         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9212 echo "configure:9213: checking for mdbm_set_chain" >&5
9213 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   cat > conftest.$ac_ext <<EOF
9217 #line 9218 "configure"
9218 #include "confdefs.h"
9219 /* System header to define __stub macros and hopefully few prototypes,
9220     which can conflict with char mdbm_set_chain(); below.  */
9221 #include <assert.h>
9222 /* Override any gcc2 internal prototype to avoid an error.  */
9223 /* We use char because int might match the return type of a gcc2
9224     builtin and then its argument prototype would still apply.  */
9225 char mdbm_set_chain();
9226 char (*f)();
9227
9228 int main() {
9229
9230 /* The GNU C library defines this for functions which it implements
9231     to always fail with ENOSYS.  Some functions are actually named
9232     something starting with __ and the normal name is an alias.  */
9233 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9234 choke me
9235 #else
9236 f = mdbm_set_chain;
9237 #endif
9238
9239 ; return 0; }
9240 EOF
9241 if { (eval echo configure:9242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9242   rm -rf conftest*
9243   eval "ac_cv_func_mdbm_set_chain=yes"
9244 else
9245   echo "configure: failed program was:" >&5
9246   cat conftest.$ac_ext >&5
9247   rm -rf conftest*
9248   eval "ac_cv_func_mdbm_set_chain=no"
9249 fi
9250 rm -f conftest*
9251 fi
9252
9253 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9254   echo "$ac_t""yes" 1>&6
9255   ol_cv_lib_mdbm=yes
9256 else
9257   echo "$ac_t""no" 1>&6
9258
9259                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9260 echo "configure:9261: checking for mdbm_set_chain in -lmdbm" >&5
9261 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
9262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9263   echo $ac_n "(cached) $ac_c" 1>&6
9264 else
9265   ac_save_LIBS="$LIBS"
9266 LIBS="-lmdbm  $LIBS"
9267 cat > conftest.$ac_ext <<EOF
9268 #line 9269 "configure"
9269 #include "confdefs.h"
9270 /* Override any gcc2 internal prototype to avoid an error.  */
9271 /* We use char because int might match the return type of a gcc2
9272     builtin and then its argument prototype would still apply.  */
9273 char mdbm_set_chain();
9274
9275 int main() {
9276 mdbm_set_chain()
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9280   rm -rf conftest*
9281   eval "ac_cv_lib_$ac_lib_var=yes"
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_lib_$ac_lib_var=no"
9287 fi
9288 rm -f conftest*
9289 LIBS="$ac_save_LIBS"
9290
9291 fi
9292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9293   echo "$ac_t""yes" 1>&6
9294   ol_cv_lib_mdbm=-lmdbm
9295 else
9296   echo "$ac_t""no" 1>&6
9297 ol_cv_lib_mdbm=no
9298 fi
9299
9300         
9301 fi
9302
9303         LIBS="$ol_LIBS"
9304
9305 fi
9306
9307 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9308
9309
9310  for ac_hdr in mdbm.h
9311 do
9312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9314 echo "configure:9315: checking for $ac_hdr" >&5
9315 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9316   echo $ac_n "(cached) $ac_c" 1>&6
9317 else
9318   cat > conftest.$ac_ext <<EOF
9319 #line 9320 "configure"
9320 #include "confdefs.h"
9321 #include <$ac_hdr>
9322 EOF
9323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9324 { (eval echo configure:9325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9326 if test -z "$ac_err"; then
9327   rm -rf conftest*
9328   eval "ac_cv_header_$ac_safe=yes"
9329 else
9330   echo "$ac_err" >&5
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   eval "ac_cv_header_$ac_safe=no"
9335 fi
9336 rm -f conftest*
9337 fi
9338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9339   echo "$ac_t""yes" 1>&6
9340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9341   cat >> confdefs.h <<EOF
9342 #define $ac_tr_hdr 1
9343 EOF
9344  
9345 else
9346   echo "$ac_t""no" 1>&6
9347 fi
9348 done
9349
9350  echo $ac_n "checking for db""... $ac_c" 1>&6
9351 echo "configure:9352: checking for db" >&5
9352 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
9353   echo $ac_n "(cached) $ac_c" 1>&6
9354 else
9355   
9356         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9357                 ol_cv_mdbm=no
9358         else
9359                 ol_cv_mdbm=yes
9360         fi
9361
9362 fi
9363
9364 echo "$ac_t""$ol_cv_mdbm" 1>&6
9365  if test $ol_cv_mdbm = yes ; then
9366         cat >> confdefs.h <<\EOF
9367 #define HAVE_MDBM 1
9368 EOF
9369
9370  fi
9371
9372
9373         if test $ol_cv_mdbm = yes ; then
9374                 ol_link_ldbm=mdbm
9375                 ol_with_ldbm_api=mdbm
9376                 if test $ol_cv_lib_mdbm != yes ; then
9377                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9378                 fi
9379         fi
9380 fi
9381
9382 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9383         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9384 echo "configure:9385: checking for GDBM library" >&5
9385 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
9386   echo $ac_n "(cached) $ac_c" 1>&6
9387 else
9388         ol_LIBS="$LIBS"
9389         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9390 echo "configure:9391: checking for gdbm_open" >&5
9391 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
9392   echo $ac_n "(cached) $ac_c" 1>&6
9393 else
9394   cat > conftest.$ac_ext <<EOF
9395 #line 9396 "configure"
9396 #include "confdefs.h"
9397 /* System header to define __stub macros and hopefully few prototypes,
9398     which can conflict with char gdbm_open(); below.  */
9399 #include <assert.h>
9400 /* Override any gcc2 internal prototype to avoid an error.  */
9401 /* We use char because int might match the return type of a gcc2
9402     builtin and then its argument prototype would still apply.  */
9403 char gdbm_open();
9404 char (*f)();
9405
9406 int main() {
9407
9408 /* The GNU C library defines this for functions which it implements
9409     to always fail with ENOSYS.  Some functions are actually named
9410     something starting with __ and the normal name is an alias.  */
9411 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9412 choke me
9413 #else
9414 f = gdbm_open;
9415 #endif
9416
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9420   rm -rf conftest*
9421   eval "ac_cv_func_gdbm_open=yes"
9422 else
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   eval "ac_cv_func_gdbm_open=no"
9427 fi
9428 rm -f conftest*
9429 fi
9430
9431 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9432   echo "$ac_t""yes" 1>&6
9433   ol_cv_lib_gdbm=yes
9434 else
9435   echo "$ac_t""no" 1>&6
9436
9437                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9438 echo "configure:9439: checking for gdbm_open in -lgdbm" >&5
9439 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
9440 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9441   echo $ac_n "(cached) $ac_c" 1>&6
9442 else
9443   ac_save_LIBS="$LIBS"
9444 LIBS="-lgdbm  $LIBS"
9445 cat > conftest.$ac_ext <<EOF
9446 #line 9447 "configure"
9447 #include "confdefs.h"
9448 /* Override any gcc2 internal prototype to avoid an error.  */
9449 /* We use char because int might match the return type of a gcc2
9450     builtin and then its argument prototype would still apply.  */
9451 char gdbm_open();
9452
9453 int main() {
9454 gdbm_open()
9455 ; return 0; }
9456 EOF
9457 if { (eval echo configure:9458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9458   rm -rf conftest*
9459   eval "ac_cv_lib_$ac_lib_var=yes"
9460 else
9461   echo "configure: failed program was:" >&5
9462   cat conftest.$ac_ext >&5
9463   rm -rf conftest*
9464   eval "ac_cv_lib_$ac_lib_var=no"
9465 fi
9466 rm -f conftest*
9467 LIBS="$ac_save_LIBS"
9468
9469 fi
9470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9471   echo "$ac_t""yes" 1>&6
9472   ol_cv_lib_gdbm=-lgdbm
9473 else
9474   echo "$ac_t""no" 1>&6
9475 ol_cv_lib_gdbm=no
9476 fi
9477
9478         
9479 fi
9480
9481         LIBS="$ol_LIBS"
9482
9483 fi
9484
9485 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9486
9487
9488  for ac_hdr in gdbm.h
9489 do
9490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9492 echo "configure:9493: checking for $ac_hdr" >&5
9493 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9494   echo $ac_n "(cached) $ac_c" 1>&6
9495 else
9496   cat > conftest.$ac_ext <<EOF
9497 #line 9498 "configure"
9498 #include "confdefs.h"
9499 #include <$ac_hdr>
9500 EOF
9501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9502 { (eval echo configure:9503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9504 if test -z "$ac_err"; then
9505   rm -rf conftest*
9506   eval "ac_cv_header_$ac_safe=yes"
9507 else
9508   echo "$ac_err" >&5
9509   echo "configure: failed program was:" >&5
9510   cat conftest.$ac_ext >&5
9511   rm -rf conftest*
9512   eval "ac_cv_header_$ac_safe=no"
9513 fi
9514 rm -f conftest*
9515 fi
9516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9517   echo "$ac_t""yes" 1>&6
9518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9519   cat >> confdefs.h <<EOF
9520 #define $ac_tr_hdr 1
9521 EOF
9522  
9523 else
9524   echo "$ac_t""no" 1>&6
9525 fi
9526 done
9527
9528  echo $ac_n "checking for db""... $ac_c" 1>&6
9529 echo "configure:9530: checking for db" >&5
9530 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
9531   echo $ac_n "(cached) $ac_c" 1>&6
9532 else
9533   
9534         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9535                 ol_cv_gdbm=no
9536         else
9537                 ol_cv_gdbm=yes
9538         fi
9539
9540 fi
9541
9542 echo "$ac_t""$ol_cv_gdbm" 1>&6
9543  if test $ol_cv_gdbm = yes ; then
9544         cat >> confdefs.h <<\EOF
9545 #define HAVE_GDBM 1
9546 EOF
9547
9548  fi
9549
9550
9551         if test $ol_cv_gdbm = yes ; then
9552                 ol_link_ldbm=gdbm
9553                 ol_with_ldbm_api=gdbm
9554
9555                 if test $ol_cv_lib_gdbm != yes ; then
9556                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9557                 fi
9558         fi
9559 fi
9560
9561 if test $ol_with_ldbm_api = auto ; then
9562         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9563 elif test $ol_with_ldbm_api = ndbm ; then
9564         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9565 echo "configure:9566: checking for NDBM library" >&5
9566 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9567   echo $ac_n "(cached) $ac_c" 1>&6
9568 else
9569         ol_LIBS="$LIBS"
9570         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9571 echo "configure:9572: checking for dbm_open" >&5
9572 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9573   echo $ac_n "(cached) $ac_c" 1>&6
9574 else
9575   cat > conftest.$ac_ext <<EOF
9576 #line 9577 "configure"
9577 #include "confdefs.h"
9578 /* System header to define __stub macros and hopefully few prototypes,
9579     which can conflict with char dbm_open(); below.  */
9580 #include <assert.h>
9581 /* Override any gcc2 internal prototype to avoid an error.  */
9582 /* We use char because int might match the return type of a gcc2
9583     builtin and then its argument prototype would still apply.  */
9584 char dbm_open();
9585 char (*f)();
9586
9587 int main() {
9588
9589 /* The GNU C library defines this for functions which it implements
9590     to always fail with ENOSYS.  Some functions are actually named
9591     something starting with __ and the normal name is an alias.  */
9592 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9593 choke me
9594 #else
9595 f = dbm_open;
9596 #endif
9597
9598 ; return 0; }
9599 EOF
9600 if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9601   rm -rf conftest*
9602   eval "ac_cv_func_dbm_open=yes"
9603 else
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   eval "ac_cv_func_dbm_open=no"
9608 fi
9609 rm -f conftest*
9610 fi
9611
9612 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9613   echo "$ac_t""yes" 1>&6
9614   ol_cv_lib_ndbm=yes
9615 else
9616   echo "$ac_t""no" 1>&6
9617
9618                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9619 echo "configure:9620: checking for dbm_open in -lndbm" >&5
9620 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9622   echo $ac_n "(cached) $ac_c" 1>&6
9623 else
9624   ac_save_LIBS="$LIBS"
9625 LIBS="-lndbm  $LIBS"
9626 cat > conftest.$ac_ext <<EOF
9627 #line 9628 "configure"
9628 #include "confdefs.h"
9629 /* Override any gcc2 internal prototype to avoid an error.  */
9630 /* We use char because int might match the return type of a gcc2
9631     builtin and then its argument prototype would still apply.  */
9632 char dbm_open();
9633
9634 int main() {
9635 dbm_open()
9636 ; return 0; }
9637 EOF
9638 if { (eval echo configure:9639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9639   rm -rf conftest*
9640   eval "ac_cv_lib_$ac_lib_var=yes"
9641 else
9642   echo "configure: failed program was:" >&5
9643   cat conftest.$ac_ext >&5
9644   rm -rf conftest*
9645   eval "ac_cv_lib_$ac_lib_var=no"
9646 fi
9647 rm -f conftest*
9648 LIBS="$ac_save_LIBS"
9649
9650 fi
9651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9652   echo "$ac_t""yes" 1>&6
9653   ol_cv_lib_ndbm=-lndbm
9654 else
9655   echo "$ac_t""no" 1>&6
9656
9657                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9658 echo "configure:9659: checking for dbm_open in -ldbm" >&5
9659 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9661   echo $ac_n "(cached) $ac_c" 1>&6
9662 else
9663   ac_save_LIBS="$LIBS"
9664 LIBS="-ldbm  $LIBS"
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 /* Override any gcc2 internal prototype to avoid an error.  */
9669 /* We use char because int might match the return type of a gcc2
9670     builtin and then its argument prototype would still apply.  */
9671 char dbm_open();
9672
9673 int main() {
9674 dbm_open()
9675 ; return 0; }
9676 EOF
9677 if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9678   rm -rf conftest*
9679   eval "ac_cv_lib_$ac_lib_var=yes"
9680 else
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -rf conftest*
9684   eval "ac_cv_lib_$ac_lib_var=no"
9685 fi
9686 rm -f conftest*
9687 LIBS="$ac_save_LIBS"
9688
9689 fi
9690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9691   echo "$ac_t""yes" 1>&6
9692   ol_cv_lib_ndbm=-ldbm
9693 else
9694   echo "$ac_t""no" 1>&6
9695 ol_cv_lib_ndbm=no
9696 fi
9697                 
9698 fi
9699
9700         
9701 fi
9702
9703         LIBS="$ol_LIBS"
9704
9705 fi
9706
9707 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9708
9709
9710  for ac_hdr in ndbm.h
9711 do
9712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9714 echo "configure:9715: checking for $ac_hdr" >&5
9715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   cat > conftest.$ac_ext <<EOF
9719 #line 9720 "configure"
9720 #include "confdefs.h"
9721 #include <$ac_hdr>
9722 EOF
9723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9724 { (eval echo configure:9725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9726 if test -z "$ac_err"; then
9727   rm -rf conftest*
9728   eval "ac_cv_header_$ac_safe=yes"
9729 else
9730   echo "$ac_err" >&5
9731   echo "configure: failed program was:" >&5
9732   cat conftest.$ac_ext >&5
9733   rm -rf conftest*
9734   eval "ac_cv_header_$ac_safe=no"
9735 fi
9736 rm -f conftest*
9737 fi
9738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9739   echo "$ac_t""yes" 1>&6
9740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9741   cat >> confdefs.h <<EOF
9742 #define $ac_tr_hdr 1
9743 EOF
9744  
9745 else
9746   echo "$ac_t""no" 1>&6
9747 fi
9748 done
9749
9750  echo $ac_n "checking for db""... $ac_c" 1>&6
9751 echo "configure:9752: checking for db" >&5
9752 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9753   echo $ac_n "(cached) $ac_c" 1>&6
9754 else
9755   
9756         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9757                 ol_cv_ndbm=no
9758         else
9759                 ol_cv_ndbm=yes
9760         fi
9761
9762 fi
9763
9764 echo "$ac_t""$ol_cv_ndbm" 1>&6
9765  if test $ol_cv_ndbm = yes ; then
9766         cat >> confdefs.h <<\EOF
9767 #define HAVE_NDBM 1
9768 EOF
9769
9770  fi
9771
9772
9773         if test $ol_cv_ndbm = yes ; then
9774                 ol_link_ldbm=ndbm
9775                 ol_with_ldbm_api=ndbm
9776
9777                 if test $ol_cv_lib_ndbm != yes ; then
9778                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9779                 fi
9780         fi
9781 fi
9782
9783 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9784         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9785         if test $ol_enable_ldbm = yes ; then
9786                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9787         fi
9788
9789         echo "configure: warning: disabling LDBM" 1>&2
9790         ol_enable_ldbm=no
9791 fi
9792
9793 if test $ol_enable_wrappers != no ; then
9794         for ac_hdr in tcpd.h
9795 do
9796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9798 echo "configure:9799: checking for $ac_hdr" >&5
9799 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   cat > conftest.$ac_ext <<EOF
9803 #line 9804 "configure"
9804 #include "confdefs.h"
9805 #include <$ac_hdr>
9806 EOF
9807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9808 { (eval echo configure:9809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9810 if test -z "$ac_err"; then
9811   rm -rf conftest*
9812   eval "ac_cv_header_$ac_safe=yes"
9813 else
9814   echo "$ac_err" >&5
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817   rm -rf conftest*
9818   eval "ac_cv_header_$ac_safe=no"
9819 fi
9820 rm -f conftest*
9821 fi
9822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9823   echo "$ac_t""yes" 1>&6
9824     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9825   cat >> confdefs.h <<EOF
9826 #define $ac_tr_hdr 1
9827 EOF
9828  
9829 else
9830   echo "$ac_t""no" 1>&6
9831 fi
9832 done
9833
9834
9835         if test $ac_cv_header_tcpd_h != yes ; then
9836                 have_wrappers=no
9837         else
9838                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9839 echo "configure:9840: checking for main in -lwrap" >&5
9840 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9841 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9842   echo $ac_n "(cached) $ac_c" 1>&6
9843 else
9844   ac_save_LIBS="$LIBS"
9845 LIBS="-lwrap  $LIBS"
9846 cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9849
9850 int main() {
9851 main()
9852 ; return 0; }
9853 EOF
9854 if { (eval echo configure:9855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9855   rm -rf conftest*
9856   eval "ac_cv_lib_$ac_lib_var=yes"
9857 else
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   rm -rf conftest*
9861   eval "ac_cv_lib_$ac_lib_var=no"
9862 fi
9863 rm -f conftest*
9864 LIBS="$ac_save_LIBS"
9865
9866 fi
9867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9868   echo "$ac_t""yes" 1>&6
9869   have_wrappers=yes
9870 else
9871   echo "$ac_t""no" 1>&6
9872 have_wrappers=no
9873 fi
9874
9875         fi
9876
9877         if test $have_wrappers = yes ; then
9878                 cat >> confdefs.h <<\EOF
9879 #define HAVE_TCPD 1
9880 EOF
9881
9882                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9883
9884                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9885 echo "configure:9886: checking for main in -lnsl" >&5
9886 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9888   echo $ac_n "(cached) $ac_c" 1>&6
9889 else
9890   ac_save_LIBS="$LIBS"
9891 LIBS="-lnsl  $LIBS"
9892 cat > conftest.$ac_ext <<EOF
9893 #line 9894 "configure"
9894 #include "confdefs.h"
9895
9896 int main() {
9897 main()
9898 ; return 0; }
9899 EOF
9900 if { (eval echo configure:9901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9901   rm -rf conftest*
9902   eval "ac_cv_lib_$ac_lib_var=yes"
9903 else
9904   echo "configure: failed program was:" >&5
9905   cat conftest.$ac_ext >&5
9906   rm -rf conftest*
9907   eval "ac_cv_lib_$ac_lib_var=no"
9908 fi
9909 rm -f conftest*
9910 LIBS="$ac_save_LIBS"
9911
9912 fi
9913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9914   echo "$ac_t""yes" 1>&6
9915     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9916     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9917   cat >> confdefs.h <<EOF
9918 #define $ac_tr_lib 1
9919 EOF
9920
9921   LIBS="-lnsl $LIBS"
9922
9923 else
9924   echo "$ac_t""no" 1>&6
9925 fi
9926
9927         else
9928                 echo "configure: warning: could not find -lwrap" 1>&2
9929                 if test $ol_enable_wrappers = yes ; then
9930                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9931                 fi
9932
9933                 echo "configure: warning: disabling wrappers support" 1>&2
9934                 ol_enable_wrappers=no
9935         fi
9936 fi
9937
9938 if test $ol_enable_syslog != no ; then
9939         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9940 echo "configure:9941: checking for openlog" >&5
9941 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9942   echo $ac_n "(cached) $ac_c" 1>&6
9943 else
9944   cat > conftest.$ac_ext <<EOF
9945 #line 9946 "configure"
9946 #include "confdefs.h"
9947 /* System header to define __stub macros and hopefully few prototypes,
9948     which can conflict with char openlog(); below.  */
9949 #include <assert.h>
9950 /* Override any gcc2 internal prototype to avoid an error.  */
9951 /* We use char because int might match the return type of a gcc2
9952     builtin and then its argument prototype would still apply.  */
9953 char openlog();
9954 char (*f)();
9955
9956 int main() {
9957
9958 /* The GNU C library defines this for functions which it implements
9959     to always fail with ENOSYS.  Some functions are actually named
9960     something starting with __ and the normal name is an alias.  */
9961 #if defined (__stub_openlog) || defined (__stub___openlog)
9962 choke me
9963 #else
9964 f = openlog;
9965 #endif
9966
9967 ; return 0; }
9968 EOF
9969 if { (eval echo configure:9970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9970   rm -rf conftest*
9971   eval "ac_cv_func_openlog=yes"
9972 else
9973   echo "configure: failed program was:" >&5
9974   cat conftest.$ac_ext >&5
9975   rm -rf conftest*
9976   eval "ac_cv_func_openlog=no"
9977 fi
9978 rm -f conftest*
9979 fi
9980
9981 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9982   echo "$ac_t""yes" 1>&6
9983   :
9984 else
9985   echo "$ac_t""no" 1>&6
9986 fi
9987
9988         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9989                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9990         fi
9991         ol_enable_syslog=$ac_cv_func_openlog
9992 fi
9993
9994 if test $ol_enable_dmalloc != no ; then
9995         for ac_hdr in dmalloc.h
9996 do
9997 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9998 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9999 echo "configure:10000: checking for $ac_hdr" >&5
10000 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10001   echo $ac_n "(cached) $ac_c" 1>&6
10002 else
10003   cat > conftest.$ac_ext <<EOF
10004 #line 10005 "configure"
10005 #include "confdefs.h"
10006 #include <$ac_hdr>
10007 EOF
10008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10009 { (eval echo configure:10010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10011 if test -z "$ac_err"; then
10012   rm -rf conftest*
10013   eval "ac_cv_header_$ac_safe=yes"
10014 else
10015   echo "$ac_err" >&5
10016   echo "configure: failed program was:" >&5
10017   cat conftest.$ac_ext >&5
10018   rm -rf conftest*
10019   eval "ac_cv_header_$ac_safe=no"
10020 fi
10021 rm -f conftest*
10022 fi
10023 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10024   echo "$ac_t""yes" 1>&6
10025     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10026   cat >> confdefs.h <<EOF
10027 #define $ac_tr_hdr 1
10028 EOF
10029  
10030 else
10031   echo "$ac_t""no" 1>&6
10032 fi
10033 done
10034
10035         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
10036 echo "configure:10037: checking for dmalloc_shutdown in -ldmalloc" >&5
10037 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
10038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10039   echo $ac_n "(cached) $ac_c" 1>&6
10040 else
10041   ac_save_LIBS="$LIBS"
10042 LIBS="-ldmalloc  $LIBS"
10043 cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 /* Override any gcc2 internal prototype to avoid an error.  */
10047 /* We use char because int might match the return type of a gcc2
10048     builtin and then its argument prototype would still apply.  */
10049 char dmalloc_shutdown();
10050
10051 int main() {
10052 dmalloc_shutdown()
10053 ; return 0; }
10054 EOF
10055 if { (eval echo configure:10056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10056   rm -rf conftest*
10057   eval "ac_cv_lib_$ac_lib_var=yes"
10058 else
10059   echo "configure: failed program was:" >&5
10060   cat conftest.$ac_ext >&5
10061   rm -rf conftest*
10062   eval "ac_cv_lib_$ac_lib_var=no"
10063 fi
10064 rm -f conftest*
10065 LIBS="$ac_save_LIBS"
10066
10067 fi
10068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10069   echo "$ac_t""yes" 1>&6
10070     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10071     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10072   cat >> confdefs.h <<EOF
10073 #define $ac_tr_lib 1
10074 EOF
10075
10076   LIBS="-ldmalloc $LIBS"
10077
10078 else
10079   echo "$ac_t""no" 1>&6
10080 fi
10081
10082 fi
10083
10084 if test $ol_enable_tcl != no ; then
10085         for ac_hdr in tcl.h
10086 do
10087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10089 echo "configure:10090: checking for $ac_hdr" >&5
10090 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10091   echo $ac_n "(cached) $ac_c" 1>&6
10092 else
10093   cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096 #include <$ac_hdr>
10097 EOF
10098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10099 { (eval echo configure:10100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10101 if test -z "$ac_err"; then
10102   rm -rf conftest*
10103   eval "ac_cv_header_$ac_safe=yes"
10104 else
10105   echo "$ac_err" >&5
10106   echo "configure: failed program was:" >&5
10107   cat conftest.$ac_ext >&5
10108   rm -rf conftest*
10109   eval "ac_cv_header_$ac_safe=no"
10110 fi
10111 rm -f conftest*
10112 fi
10113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10114   echo "$ac_t""yes" 1>&6
10115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10116   cat >> confdefs.h <<EOF
10117 #define $ac_tr_hdr 1
10118 EOF
10119  
10120 else
10121   echo "$ac_t""no" 1>&6
10122 fi
10123 done
10124
10125
10126         if test $ac_cv_header_tcl_h != yes ; then
10127                 have_tcl=no
10128         else
10129                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10130 echo "configure:10131: checking for main in -ltcl" >&5
10131 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
10132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10133   echo $ac_n "(cached) $ac_c" 1>&6
10134 else
10135   ac_save_LIBS="$LIBS"
10136 LIBS="-ltcl  $LIBS"
10137 cat > conftest.$ac_ext <<EOF
10138 #line 10139 "configure"
10139 #include "confdefs.h"
10140
10141 int main() {
10142 main()
10143 ; return 0; }
10144 EOF
10145 if { (eval echo configure:10146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10146   rm -rf conftest*
10147   eval "ac_cv_lib_$ac_lib_var=yes"
10148 else
10149   echo "configure: failed program was:" >&5
10150   cat conftest.$ac_ext >&5
10151   rm -rf conftest*
10152   eval "ac_cv_lib_$ac_lib_var=no"
10153 fi
10154 rm -f conftest*
10155 LIBS="$ac_save_LIBS"
10156
10157 fi
10158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10159   echo "$ac_t""yes" 1>&6
10160   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10161 else
10162   echo "$ac_t""no" 1>&6
10163 have_tcl=no
10164 fi
10165
10166
10167                 if test $have_tcl != yes; then
10168                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10169 echo "configure:10170: checking for main in -ltcl7.6" >&5
10170 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
10171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10172   echo $ac_n "(cached) $ac_c" 1>&6
10173 else
10174   ac_save_LIBS="$LIBS"
10175 LIBS="-ltcl7.6  $LIBS"
10176 cat > conftest.$ac_ext <<EOF
10177 #line 10178 "configure"
10178 #include "confdefs.h"
10179
10180 int main() {
10181 main()
10182 ; return 0; }
10183 EOF
10184 if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10185   rm -rf conftest*
10186   eval "ac_cv_lib_$ac_lib_var=yes"
10187 else
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=no"
10192 fi
10193 rm -f conftest*
10194 LIBS="$ac_save_LIBS"
10195
10196 fi
10197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10198   echo "$ac_t""yes" 1>&6
10199   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10200 else
10201   echo "$ac_t""no" 1>&6
10202 have_tcl=no
10203 fi
10204
10205                 fi
10206
10207                 if test $have_tcl != yes; then
10208                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10209 echo "configure:10210: checking for main in -ltcl8.0" >&5
10210 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
10211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10212   echo $ac_n "(cached) $ac_c" 1>&6
10213 else
10214   ac_save_LIBS="$LIBS"
10215 LIBS="-ltcl8.0  $LIBS"
10216 cat > conftest.$ac_ext <<EOF
10217 #line 10218 "configure"
10218 #include "confdefs.h"
10219
10220 int main() {
10221 main()
10222 ; return 0; }
10223 EOF
10224 if { (eval echo configure:10225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10225   rm -rf conftest*
10226   eval "ac_cv_lib_$ac_lib_var=yes"
10227 else
10228   echo "configure: failed program was:" >&5
10229   cat conftest.$ac_ext >&5
10230   rm -rf conftest*
10231   eval "ac_cv_lib_$ac_lib_var=no"
10232 fi
10233 rm -f conftest*
10234 LIBS="$ac_save_LIBS"
10235
10236 fi
10237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10238   echo "$ac_t""yes" 1>&6
10239   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10240 else
10241   echo "$ac_t""no" 1>&6
10242 have_tcl=no
10243 fi
10244
10245                 fi
10246         fi
10247
10248         if test $have_tcl != yes ; then
10249                 echo "configure: warning: could not find -ltcl" 1>&2
10250                 if test $ol_enable_tcl = yes ; then
10251                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10252                 fi
10253
10254                 ol_enable_tcl=no
10255         fi
10256 fi
10257
10258 # ud needs termcap (should insert check here)
10259 ol_link_termcap=no
10260 for ac_hdr in termcap.h ncurses.h
10261 do
10262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10264 echo "configure:10265: checking for $ac_hdr" >&5
10265 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10266   echo $ac_n "(cached) $ac_c" 1>&6
10267 else
10268   cat > conftest.$ac_ext <<EOF
10269 #line 10270 "configure"
10270 #include "confdefs.h"
10271 #include <$ac_hdr>
10272 EOF
10273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10274 { (eval echo configure:10275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10276 if test -z "$ac_err"; then
10277   rm -rf conftest*
10278   eval "ac_cv_header_$ac_safe=yes"
10279 else
10280   echo "$ac_err" >&5
10281   echo "configure: failed program was:" >&5
10282   cat conftest.$ac_ext >&5
10283   rm -rf conftest*
10284   eval "ac_cv_header_$ac_safe=no"
10285 fi
10286 rm -f conftest*
10287 fi
10288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10289   echo "$ac_t""yes" 1>&6
10290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10291   cat >> confdefs.h <<EOF
10292 #define $ac_tr_hdr 1
10293 EOF
10294  
10295 else
10296   echo "$ac_t""no" 1>&6
10297 fi
10298 done
10299
10300
10301 if test $ol_link_termcap = no ; then
10302         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10303 echo "configure:10304: checking for tputs in -ltermcap" >&5
10304 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
10305 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10306   echo $ac_n "(cached) $ac_c" 1>&6
10307 else
10308   ac_save_LIBS="$LIBS"
10309 LIBS="-ltermcap  $LIBS"
10310 cat > conftest.$ac_ext <<EOF
10311 #line 10312 "configure"
10312 #include "confdefs.h"
10313 /* Override any gcc2 internal prototype to avoid an error.  */
10314 /* We use char because int might match the return type of a gcc2
10315     builtin and then its argument prototype would still apply.  */
10316 char tputs();
10317
10318 int main() {
10319 tputs()
10320 ; return 0; }
10321 EOF
10322 if { (eval echo configure:10323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10323   rm -rf conftest*
10324   eval "ac_cv_lib_$ac_lib_var=yes"
10325 else
10326   echo "configure: failed program was:" >&5
10327   cat conftest.$ac_ext >&5
10328   rm -rf conftest*
10329   eval "ac_cv_lib_$ac_lib_var=no"
10330 fi
10331 rm -f conftest*
10332 LIBS="$ac_save_LIBS"
10333
10334 fi
10335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10336   echo "$ac_t""yes" 1>&6
10337   have_termcap=yes
10338 else
10339   echo "$ac_t""no" 1>&6
10340 have_termcap=no
10341 fi
10342
10343         if test $have_termcap = yes ; then
10344                 cat >> confdefs.h <<\EOF
10345 #define HAVE_TERMCAP 1
10346 EOF
10347
10348                 ol_link_termcap=yes
10349                 TERMCAP_LIBS=-ltermcap
10350         fi
10351 fi
10352
10353 if test $ol_link_termcap = no ; then
10354         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10355 echo "configure:10356: checking for initscr in -lncurses" >&5
10356 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
10357 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10358   echo $ac_n "(cached) $ac_c" 1>&6
10359 else
10360   ac_save_LIBS="$LIBS"
10361 LIBS="-lncurses  $LIBS"
10362 cat > conftest.$ac_ext <<EOF
10363 #line 10364 "configure"
10364 #include "confdefs.h"
10365 /* Override any gcc2 internal prototype to avoid an error.  */
10366 /* We use char because int might match the return type of a gcc2
10367     builtin and then its argument prototype would still apply.  */
10368 char initscr();
10369
10370 int main() {
10371 initscr()
10372 ; return 0; }
10373 EOF
10374 if { (eval echo configure:10375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10375   rm -rf conftest*
10376   eval "ac_cv_lib_$ac_lib_var=yes"
10377 else
10378   echo "configure: failed program was:" >&5
10379   cat conftest.$ac_ext >&5
10380   rm -rf conftest*
10381   eval "ac_cv_lib_$ac_lib_var=no"
10382 fi
10383 rm -f conftest*
10384 LIBS="$ac_save_LIBS"
10385
10386 fi
10387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10388   echo "$ac_t""yes" 1>&6
10389   have_ncurses=yes
10390 else
10391   echo "$ac_t""no" 1>&6
10392 have_ncurses=no
10393 fi
10394
10395         if test $have_ncurses = yes ; then
10396                 cat >> confdefs.h <<\EOF
10397 #define HAVE_NCURSES 1
10398 EOF
10399
10400                 ol_link_termcap=yes
10401                 TERMCAP_LIBS=-lncurses
10402         fi
10403 fi
10404
10405 if test $ol_link_termcap = no ; then
10406         cat >> confdefs.h <<\EOF
10407 #define NO_TERMCAP 1
10408 EOF
10409
10410         TERMCAP_LIBS=
10411 fi
10412
10413 ol_link_sasl=no
10414 if test $ol_with_cyrus_sasl != no ; then
10415         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
10416 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
10417 echo "configure:10418: checking for sasl.h" >&5
10418 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10419   echo $ac_n "(cached) $ac_c" 1>&6
10420 else
10421   cat > conftest.$ac_ext <<EOF
10422 #line 10423 "configure"
10423 #include "confdefs.h"
10424 #include <sasl.h>
10425 EOF
10426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10427 { (eval echo configure:10428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10429 if test -z "$ac_err"; then
10430   rm -rf conftest*
10431   eval "ac_cv_header_$ac_safe=yes"
10432 else
10433   echo "$ac_err" >&5
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   eval "ac_cv_header_$ac_safe=no"
10438 fi
10439 rm -f conftest*
10440 fi
10441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10442   echo "$ac_t""yes" 1>&6
10443   :
10444 else
10445   echo "$ac_t""no" 1>&6
10446 fi
10447
10448
10449         if test $ac_cv_header_sasl_h = yes ; then
10450                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
10451 echo "configure:10452: checking for sasl_client_init in -lsasl" >&5
10452 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
10453 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10454   echo $ac_n "(cached) $ac_c" 1>&6
10455 else
10456   ac_save_LIBS="$LIBS"
10457 LIBS="-lsasl  $LIBS"
10458 cat > conftest.$ac_ext <<EOF
10459 #line 10460 "configure"
10460 #include "confdefs.h"
10461 /* Override any gcc2 internal prototype to avoid an error.  */
10462 /* We use char because int might match the return type of a gcc2
10463     builtin and then its argument prototype would still apply.  */
10464 char sasl_client_init();
10465
10466 int main() {
10467 sasl_client_init()
10468 ; return 0; }
10469 EOF
10470 if { (eval echo configure:10471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10471   rm -rf conftest*
10472   eval "ac_cv_lib_$ac_lib_var=yes"
10473 else
10474   echo "configure: failed program was:" >&5
10475   cat conftest.$ac_ext >&5
10476   rm -rf conftest*
10477   eval "ac_cv_lib_$ac_lib_var=no"
10478 fi
10479 rm -f conftest*
10480 LIBS="$ac_save_LIBS"
10481
10482 fi
10483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10484   echo "$ac_t""yes" 1>&6
10485   have_cyrus_sasl=yes
10486 else
10487   echo "$ac_t""no" 1>&6
10488 have_cyrus_sasl=no
10489 fi
10490
10491
10492                 if test $have_cyrus_sasl != no ; then
10493                         LUTIL_LIBS="$LUTIL_LIBS -lsasl"
10494                         cat >> confdefs.h <<\EOF
10495 #define HAVE_CYRUS_SASL 1
10496 EOF
10497
10498                         ol_link_sasl=yes
10499                 fi
10500         fi
10501
10502         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
10503                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
10504         fi
10505 fi
10506
10507 ol_link_fetch=no
10508 if test $ol_with_fetch != no ; then
10509         ol=$LIBS
10510 LIBS="-lfetch -lcom_err $LIBS"
10511 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10512 echo "configure:10513: checking fetch(3) library" >&5
10513 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
10514   echo $ac_n "(cached) $ac_c" 1>&6
10515 else
10516   
10517         cat > conftest.$ac_ext <<EOF
10518 #line 10519 "configure"
10519 #include "confdefs.h"
10520
10521 #include <sys/param.h>
10522 #include <stdio.h>
10523 #include <fetch.h>
10524 int main() {
10525 struct url *u = fetchParseURL("file:///"); 
10526 ; return 0; }
10527 EOF
10528 if { (eval echo configure:10529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10529   rm -rf conftest*
10530   ol_cv_lib_fetch=yes
10531 else
10532   echo "configure: failed program was:" >&5
10533   cat conftest.$ac_ext >&5
10534   rm -rf conftest*
10535   ol_cv_lib_fetch=no
10536 fi
10537 rm -f conftest*
10538 fi
10539
10540 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10541 LIBS=$ol_LIBS
10542 if test $ol_cv_lib_fetch != no ; then
10543         ol_link_fetch="-lfetch -lcom_err"
10544         cat >> confdefs.h <<\EOF
10545 #define HAVE_FETCH 1
10546 EOF
10547
10548 fi
10549
10550
10551         if test $ol_cv_lib_fetch != no ; then
10552                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10553                 ol_link_fetch=freebsd
10554
10555         elif test $ol_with_fetch != auto ; then
10556                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
10557         fi 
10558 fi
10559
10560 ol_link_readline=no
10561 if test $ol_with_readline != no ; then
10562         for ac_hdr in readline/readline.h readline/history.h
10563 do
10564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10566 echo "configure:10567: checking for $ac_hdr" >&5
10567 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10568   echo $ac_n "(cached) $ac_c" 1>&6
10569 else
10570   cat > conftest.$ac_ext <<EOF
10571 #line 10572 "configure"
10572 #include "confdefs.h"
10573 #include <$ac_hdr>
10574 EOF
10575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10576 { (eval echo configure:10577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10578 if test -z "$ac_err"; then
10579   rm -rf conftest*
10580   eval "ac_cv_header_$ac_safe=yes"
10581 else
10582   echo "$ac_err" >&5
10583   echo "configure: failed program was:" >&5
10584   cat conftest.$ac_ext >&5
10585   rm -rf conftest*
10586   eval "ac_cv_header_$ac_safe=no"
10587 fi
10588 rm -f conftest*
10589 fi
10590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10591   echo "$ac_t""yes" 1>&6
10592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10593   cat >> confdefs.h <<EOF
10594 #define $ac_tr_hdr 1
10595 EOF
10596  
10597 else
10598   echo "$ac_t""no" 1>&6
10599 fi
10600 done
10601
10602
10603         if test $ac_cv_header_readline_readline_h = yes ; then
10604                 save_LIBS="$LIBS"
10605                 LIBS="$TERMCAP_LIBS $LIBS"
10606                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10607 echo "configure:10608: checking for readline in -lreadline" >&5
10608 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
10609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10610   echo $ac_n "(cached) $ac_c" 1>&6
10611 else
10612   ac_save_LIBS="$LIBS"
10613 LIBS="-lreadline  $LIBS"
10614 cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617 /* Override any gcc2 internal prototype to avoid an error.  */
10618 /* We use char because int might match the return type of a gcc2
10619     builtin and then its argument prototype would still apply.  */
10620 char readline();
10621
10622 int main() {
10623 readline()
10624 ; return 0; }
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10627   rm -rf conftest*
10628   eval "ac_cv_lib_$ac_lib_var=yes"
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -rf conftest*
10633   eval "ac_cv_lib_$ac_lib_var=no"
10634 fi
10635 rm -f conftest*
10636 LIBS="$ac_save_LIBS"
10637
10638 fi
10639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641   have_readline=yes
10642 else
10643   echo "$ac_t""no" 1>&6
10644 have_readline=no
10645 fi
10646
10647                 LIBS="$save_LIBS"
10648                         
10649                 if test $have_readline = yes ; then
10650                         ol_with_readline=found
10651                         ol_link_readline=yes
10652
10653                         READLINE_LIBS="-lreadline"
10654                 fi
10655         fi
10656 fi
10657
10658 if test $ol_link_readline = yes ; then
10659         cat >> confdefs.h <<\EOF
10660 #define HAVE_READLINE 1
10661 EOF
10662
10663 fi
10664
10665
10666 # FreeBSD (and others) have crypt(3) in -lcrypt
10667 if test $ol_enable_crypt != no ; then
10668         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10669 echo "configure:10670: checking for crypt" >&5
10670 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
10671   echo $ac_n "(cached) $ac_c" 1>&6
10672 else
10673   cat > conftest.$ac_ext <<EOF
10674 #line 10675 "configure"
10675 #include "confdefs.h"
10676 /* System header to define __stub macros and hopefully few prototypes,
10677     which can conflict with char crypt(); below.  */
10678 #include <assert.h>
10679 /* Override any gcc2 internal prototype to avoid an error.  */
10680 /* We use char because int might match the return type of a gcc2
10681     builtin and then its argument prototype would still apply.  */
10682 char crypt();
10683 char (*f)();
10684
10685 int main() {
10686
10687 /* The GNU C library defines this for functions which it implements
10688     to always fail with ENOSYS.  Some functions are actually named
10689     something starting with __ and the normal name is an alias.  */
10690 #if defined (__stub_crypt) || defined (__stub___crypt)
10691 choke me
10692 #else
10693 f = crypt;
10694 #endif
10695
10696 ; return 0; }
10697 EOF
10698 if { (eval echo configure:10699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10699   rm -rf conftest*
10700   eval "ac_cv_func_crypt=yes"
10701 else
10702   echo "configure: failed program was:" >&5
10703   cat conftest.$ac_ext >&5
10704   rm -rf conftest*
10705   eval "ac_cv_func_crypt=no"
10706 fi
10707 rm -f conftest*
10708 fi
10709
10710 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10711   echo "$ac_t""yes" 1>&6
10712   have_crypt=yes
10713 else
10714   echo "$ac_t""no" 1>&6
10715
10716                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10717 echo "configure:10718: checking for crypt in -lcrypt" >&5
10718 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722   ac_save_LIBS="$LIBS"
10723 LIBS="-lcrypt  $LIBS"
10724 cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727 /* Override any gcc2 internal prototype to avoid an error.  */
10728 /* We use char because int might match the return type of a gcc2
10729     builtin and then its argument prototype would still apply.  */
10730 char crypt();
10731
10732 int main() {
10733 crypt()
10734 ; return 0; }
10735 EOF
10736 if { (eval echo configure:10737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10737   rm -rf conftest*
10738   eval "ac_cv_lib_$ac_lib_var=yes"
10739 else
10740   echo "configure: failed program was:" >&5
10741   cat conftest.$ac_ext >&5
10742   rm -rf conftest*
10743   eval "ac_cv_lib_$ac_lib_var=no"
10744 fi
10745 rm -f conftest*
10746 LIBS="$ac_save_LIBS"
10747
10748 fi
10749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10750   echo "$ac_t""yes" 1>&6
10751   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10752                         have_crypt=yes
10753 else
10754   echo "$ac_t""no" 1>&6
10755 have_crypt=no
10756 fi
10757
10758 fi
10759
10760
10761         if test $have_crypt = yes ; then
10762                 cat >> confdefs.h <<\EOF
10763 #define HAVE_CRYPT 1
10764 EOF
10765
10766         else
10767                 echo "configure: warning: could not find crypt" 1>&2
10768                 if test $ol_enable_crypt = yes ; then
10769                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10770                 fi
10771
10772                 echo "configure: warning: disabling crypt support" 1>&2
10773                 ol_enable_crypt=no
10774         fi
10775 fi
10776
10777 # FreeBSD (and others) have setproctitle(3) in -lutil
10778 if test $ol_enable_proctitle != no ; then
10779         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10780 echo "configure:10781: checking for setproctitle" >&5
10781 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10782   echo $ac_n "(cached) $ac_c" 1>&6
10783 else
10784   cat > conftest.$ac_ext <<EOF
10785 #line 10786 "configure"
10786 #include "confdefs.h"
10787 /* System header to define __stub macros and hopefully few prototypes,
10788     which can conflict with char setproctitle(); below.  */
10789 #include <assert.h>
10790 /* Override any gcc2 internal prototype to avoid an error.  */
10791 /* We use char because int might match the return type of a gcc2
10792     builtin and then its argument prototype would still apply.  */
10793 char setproctitle();
10794 char (*f)();
10795
10796 int main() {
10797
10798 /* The GNU C library defines this for functions which it implements
10799     to always fail with ENOSYS.  Some functions are actually named
10800     something starting with __ and the normal name is an alias.  */
10801 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10802 choke me
10803 #else
10804 f = setproctitle;
10805 #endif
10806
10807 ; return 0; }
10808 EOF
10809 if { (eval echo configure:10810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10810   rm -rf conftest*
10811   eval "ac_cv_func_setproctitle=yes"
10812 else
10813   echo "configure: failed program was:" >&5
10814   cat conftest.$ac_ext >&5
10815   rm -rf conftest*
10816   eval "ac_cv_func_setproctitle=no"
10817 fi
10818 rm -f conftest*
10819 fi
10820
10821 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10822   echo "$ac_t""yes" 1>&6
10823   have_setproctitle=yes
10824 else
10825   echo "$ac_t""no" 1>&6
10826
10827                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10828 echo "configure:10829: checking for setproctitle in -lutil" >&5
10829 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10831   echo $ac_n "(cached) $ac_c" 1>&6
10832 else
10833   ac_save_LIBS="$LIBS"
10834 LIBS="-lutil  $LIBS"
10835 cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838 /* Override any gcc2 internal prototype to avoid an error.  */
10839 /* We use char because int might match the return type of a gcc2
10840     builtin and then its argument prototype would still apply.  */
10841 char setproctitle();
10842
10843 int main() {
10844 setproctitle()
10845 ; return 0; }
10846 EOF
10847 if { (eval echo configure:10848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10848   rm -rf conftest*
10849   eval "ac_cv_lib_$ac_lib_var=yes"
10850 else
10851   echo "configure: failed program was:" >&5
10852   cat conftest.$ac_ext >&5
10853   rm -rf conftest*
10854   eval "ac_cv_lib_$ac_lib_var=no"
10855 fi
10856 rm -f conftest*
10857 LIBS="$ac_save_LIBS"
10858
10859 fi
10860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10861   echo "$ac_t""yes" 1>&6
10862   have_setproctitle=yes
10863                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10864 else
10865   echo "$ac_t""no" 1>&6
10866 have_setproctitle=no
10867                         LIBOBJS="$LIBOBJS setproctitle.o"
10868 fi
10869
10870 fi
10871
10872
10873         if test $have_setproctitle = yes ; then
10874                 cat >> confdefs.h <<\EOF
10875 #define HAVE_SETPROCTITLE 1
10876 EOF
10877
10878         fi
10879 fi
10880
10881 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10882 echo "configure:10883: checking for uid_t in sys/types.h" >&5
10883 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10884   echo $ac_n "(cached) $ac_c" 1>&6
10885 else
10886   cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889 #include <sys/types.h>
10890 EOF
10891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10892   egrep "uid_t" >/dev/null 2>&1; then
10893   rm -rf conftest*
10894   ac_cv_type_uid_t=yes
10895 else
10896   rm -rf conftest*
10897   ac_cv_type_uid_t=no
10898 fi
10899 rm -f conftest*
10900
10901 fi
10902
10903 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10904 if test $ac_cv_type_uid_t = no; then
10905   cat >> confdefs.h <<\EOF
10906 #define uid_t int
10907 EOF
10908
10909   cat >> confdefs.h <<\EOF
10910 #define gid_t int
10911 EOF
10912
10913 fi
10914
10915 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10916 echo "configure:10917: checking type of array argument to getgroups" >&5
10917 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   if test "$cross_compiling" = yes; then
10921   ac_cv_type_getgroups=cross
10922 else
10923   cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926
10927 /* Thanks to Mike Rendell for this test.  */
10928 #include <sys/types.h>
10929 #define NGID 256
10930 #undef MAX
10931 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10932 main()
10933 {
10934   gid_t gidset[NGID];
10935   int i, n;
10936   union { gid_t gval; long lval; }  val;
10937
10938   val.lval = -1;
10939   for (i = 0; i < NGID; i++)
10940     gidset[i] = val.gval;
10941   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10942                  gidset);
10943   /* Exit non-zero if getgroups seems to require an array of ints.  This
10944      happens when gid_t is short but getgroups modifies an array of ints.  */
10945   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10946 }
10947
10948 EOF
10949 if { (eval echo configure:10950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10950 then
10951     ac_cv_type_getgroups=gid_t
10952 else
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -fr conftest*
10956   ac_cv_type_getgroups=int
10957 fi
10958 rm -fr conftest*
10959 fi
10960
10961 if test $ac_cv_type_getgroups = cross; then
10962         cat > conftest.$ac_ext <<EOF
10963 #line 10964 "configure"
10964 #include "confdefs.h"
10965 #include <unistd.h>
10966 EOF
10967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10968   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10969   rm -rf conftest*
10970   ac_cv_type_getgroups=gid_t
10971 else
10972   rm -rf conftest*
10973   ac_cv_type_getgroups=int
10974 fi
10975 rm -f conftest*
10976
10977 fi
10978 fi
10979
10980 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10981 cat >> confdefs.h <<EOF
10982 #define GETGROUPS_T $ac_cv_type_getgroups
10983 EOF
10984
10985  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10986 echo "configure:10987: checking for ANSI C header files" >&5
10987 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include <stdlib.h>
10994 #include <stdarg.h>
10995 #include <string.h>
10996 #include <float.h>
10997 EOF
10998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10999 { (eval echo configure:11000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11001 if test -z "$ac_err"; then
11002   rm -rf conftest*
11003   ac_cv_header_stdc=yes
11004 else
11005   echo "$ac_err" >&5
11006   echo "configure: failed program was:" >&5
11007   cat conftest.$ac_ext >&5
11008   rm -rf conftest*
11009   ac_cv_header_stdc=no
11010 fi
11011 rm -f conftest*
11012
11013 if test $ac_cv_header_stdc = yes; then
11014   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11015 cat > conftest.$ac_ext <<EOF
11016 #line 11017 "configure"
11017 #include "confdefs.h"
11018 #include <string.h>
11019 EOF
11020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11021   egrep "memchr" >/dev/null 2>&1; then
11022   :
11023 else
11024   rm -rf conftest*
11025   ac_cv_header_stdc=no
11026 fi
11027 rm -f conftest*
11028
11029 fi
11030
11031 if test $ac_cv_header_stdc = yes; then
11032   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11033 cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036 #include <stdlib.h>
11037 EOF
11038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11039   egrep "free" >/dev/null 2>&1; then
11040   :
11041 else
11042   rm -rf conftest*
11043   ac_cv_header_stdc=no
11044 fi
11045 rm -f conftest*
11046
11047 fi
11048
11049 if test $ac_cv_header_stdc = yes; then
11050   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11051 if test "$cross_compiling" = yes; then
11052   :
11053 else
11054   cat > conftest.$ac_ext <<EOF
11055 #line 11056 "configure"
11056 #include "confdefs.h"
11057 #include <ctype.h>
11058 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11059 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11060 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11061 int main () { int i; for (i = 0; i < 256; i++)
11062 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
11063 exit (0); }
11064
11065 EOF
11066 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11067 then
11068   :
11069 else
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -fr conftest*
11073   ac_cv_header_stdc=no
11074 fi
11075 rm -fr conftest*
11076 fi
11077
11078 fi
11079 fi
11080
11081 echo "$ac_t""$ac_cv_header_stdc" 1>&6
11082 if test $ac_cv_header_stdc = yes; then
11083   cat >> confdefs.h <<\EOF
11084 #define STDC_HEADERS 1
11085 EOF
11086
11087 fi
11088
11089 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
11090 echo "configure:11091: checking for mode_t" >&5
11091 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
11092   echo $ac_n "(cached) $ac_c" 1>&6
11093 else
11094   cat > conftest.$ac_ext <<EOF
11095 #line 11096 "configure"
11096 #include "confdefs.h"
11097 #include <sys/types.h>
11098 #if STDC_HEADERS
11099 #include <stdlib.h>
11100 #include <stddef.h>
11101 #endif
11102 EOF
11103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11104   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11105   rm -rf conftest*
11106   eval "ac_cv_type_mode_t=yes"
11107 else
11108   rm -rf conftest*
11109   eval "ac_cv_type_mode_t=no"
11110 fi
11111 rm -f conftest*
11112
11113 fi
11114 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
11115   echo "$ac_t""yes" 1>&6
11116 else
11117   echo "$ac_t""no" 1>&6
11118   cat >> confdefs.h <<EOF
11119 #define mode_t int
11120 EOF
11121
11122 fi
11123
11124 echo $ac_n "checking for off_t""... $ac_c" 1>&6
11125 echo "configure:11126: checking for off_t" >&5
11126 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
11127   echo $ac_n "(cached) $ac_c" 1>&6
11128 else
11129   cat > conftest.$ac_ext <<EOF
11130 #line 11131 "configure"
11131 #include "confdefs.h"
11132 #include <sys/types.h>
11133 #if STDC_HEADERS
11134 #include <stdlib.h>
11135 #include <stddef.h>
11136 #endif
11137 EOF
11138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11139   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11140   rm -rf conftest*
11141   eval "ac_cv_type_off_t=yes"
11142 else
11143   rm -rf conftest*
11144   eval "ac_cv_type_off_t=no"
11145 fi
11146 rm -f conftest*
11147
11148 fi
11149 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151 else
11152   echo "$ac_t""no" 1>&6
11153   cat >> confdefs.h <<EOF
11154 #define off_t long
11155 EOF
11156
11157 fi
11158
11159 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11160 echo "configure:11161: checking for pid_t" >&5
11161 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
11162   echo $ac_n "(cached) $ac_c" 1>&6
11163 else
11164   cat > conftest.$ac_ext <<EOF
11165 #line 11166 "configure"
11166 #include "confdefs.h"
11167 #include <sys/types.h>
11168 #if STDC_HEADERS
11169 #include <stdlib.h>
11170 #include <stddef.h>
11171 #endif
11172 EOF
11173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11174   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11175   rm -rf conftest*
11176   eval "ac_cv_type_pid_t=yes"
11177 else
11178   rm -rf conftest*
11179   eval "ac_cv_type_pid_t=no"
11180 fi
11181 rm -f conftest*
11182
11183 fi
11184 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
11185   echo "$ac_t""yes" 1>&6
11186 else
11187   echo "$ac_t""no" 1>&6
11188   cat >> confdefs.h <<EOF
11189 #define pid_t int
11190 EOF
11191
11192 fi
11193
11194 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11195 echo "configure:11196: checking for ptrdiff_t" >&5
11196 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11197   echo $ac_n "(cached) $ac_c" 1>&6
11198 else
11199   cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202 #include <stddef.h>
11203 int main() {
11204 ptrdiff_t p
11205 ; return 0; }
11206 EOF
11207 if { (eval echo configure:11208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11208   rm -rf conftest*
11209   am_cv_type_ptrdiff_t=yes
11210 else
11211   echo "configure: failed program was:" >&5
11212   cat conftest.$ac_ext >&5
11213   rm -rf conftest*
11214   am_cv_type_ptrdiff_t=no
11215 fi
11216 rm -f conftest*
11217 fi
11218
11219 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11220    if test $am_cv_type_ptrdiff_t = yes; then
11221      cat >> confdefs.h <<\EOF
11222 #define HAVE_PTRDIFF_T 1
11223 EOF
11224
11225    fi
11226
11227 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11228 echo "configure:11229: checking return type of signal handlers" >&5
11229 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11230   echo $ac_n "(cached) $ac_c" 1>&6
11231 else
11232   cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 #include <sys/types.h>
11236 #include <signal.h>
11237 #ifdef signal
11238 #undef signal
11239 #endif
11240 #ifdef __cplusplus
11241 extern "C" void (*signal (int, void (*)(int)))(int);
11242 #else
11243 void (*signal ()) ();
11244 #endif
11245
11246 int main() {
11247 int i;
11248 ; return 0; }
11249 EOF
11250 if { (eval echo configure:11251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11251   rm -rf conftest*
11252   ac_cv_type_signal=void
11253 else
11254   echo "configure: failed program was:" >&5
11255   cat conftest.$ac_ext >&5
11256   rm -rf conftest*
11257   ac_cv_type_signal=int
11258 fi
11259 rm -f conftest*
11260 fi
11261
11262 echo "$ac_t""$ac_cv_type_signal" 1>&6
11263 cat >> confdefs.h <<EOF
11264 #define RETSIGTYPE $ac_cv_type_signal
11265 EOF
11266
11267
11268 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11269 echo "configure:11270: checking for sig_atomic_t" >&5
11270 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11271   echo $ac_n "(cached) $ac_c" 1>&6
11272 else
11273   cat > conftest.$ac_ext <<EOF
11274 #line 11275 "configure"
11275 #include "confdefs.h"
11276 #include <signal.h>
11277 int main() {
11278 sig_atomic_t atomic;
11279 ; return 0; }
11280 EOF
11281 if { (eval echo configure:11282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11282   rm -rf conftest*
11283   ol_cv_type_sig_atomic_t=yes
11284 else
11285   echo "configure: failed program was:" >&5
11286   cat conftest.$ac_ext >&5
11287   rm -rf conftest*
11288   ol_cv_type_sig_atomic_t=no
11289 fi
11290 rm -f conftest*
11291 fi
11292
11293 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11294   if test $ol_cv_type_sig_atomic_t = no; then
11295     cat >> confdefs.h <<\EOF
11296 #define sig_atomic_t int
11297 EOF
11298
11299   fi
11300  
11301 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11302 echo "configure:11303: checking for size_t" >&5
11303 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11304   echo $ac_n "(cached) $ac_c" 1>&6
11305 else
11306   cat > conftest.$ac_ext <<EOF
11307 #line 11308 "configure"
11308 #include "confdefs.h"
11309 #include <sys/types.h>
11310 #if STDC_HEADERS
11311 #include <stdlib.h>
11312 #include <stddef.h>
11313 #endif
11314 EOF
11315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11316   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11317   rm -rf conftest*
11318   eval "ac_cv_type_size_t=yes"
11319 else
11320   rm -rf conftest*
11321   eval "ac_cv_type_size_t=no"
11322 fi
11323 rm -f conftest*
11324
11325 fi
11326 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11327   echo "$ac_t""yes" 1>&6
11328 else
11329   echo "$ac_t""no" 1>&6
11330   cat >> confdefs.h <<EOF
11331 #define size_t unsigned
11332 EOF
11333
11334 fi
11335
11336 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11337 echo "configure:11338: checking for socklen_t" >&5
11338 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344
11345 #ifdef HAVE_SYS_TYPES_H
11346 #include <sys/types.h>
11347 #endif
11348 #ifdef HAVE_SYS_SOCKET_H
11349 #include <sys/socket.h>
11350 #endif
11351
11352 int main() {
11353 socklen_t len;
11354 ; return 0; }
11355 EOF
11356 if { (eval echo configure:11357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11357   rm -rf conftest*
11358   ol_cv_type_socklen_t=yes
11359 else
11360   echo "configure: failed program was:" >&5
11361   cat conftest.$ac_ext >&5
11362   rm -rf conftest*
11363   ol_cv_type_socklen_t=no
11364 fi
11365 rm -f conftest*
11366 fi
11367
11368 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11369   if test $ol_cv_type_socklen_t = no; then
11370     cat >> confdefs.h <<\EOF
11371 #define socklen_t int
11372 EOF
11373
11374   fi
11375  
11376 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11377 echo "configure:11378: checking for member st_blksize in aggregate type struct stat" >&5
11378 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11379   echo $ac_n "(cached) $ac_c" 1>&6
11380 else
11381   cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 #include <sys/types.h>
11385 #include <sys/stat.h>
11386 int main() {
11387 struct stat foo; foo.st_blksize;
11388 ; return 0; }
11389 EOF
11390 if { (eval echo configure:11391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11391   rm -rf conftest*
11392   ac_cv_c_struct_member_st_blksize=yes
11393 else
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -rf conftest*
11397   ac_cv_c_struct_member_st_blksize=no
11398 fi
11399 rm -f conftest*
11400 fi
11401
11402 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11403 st_blksize="$ac_cv_c_struct_member_st_blksize"
11404 if test $ac_cv_c_struct_member_st_blksize = yes; then
11405   cat >> confdefs.h <<\EOF
11406 #define HAVE_ST_BLKSIZE 1
11407 EOF
11408
11409 fi
11410
11411 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11412 echo "configure:11413: checking whether time.h and sys/time.h may both be included" >&5
11413 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11414   echo $ac_n "(cached) $ac_c" 1>&6
11415 else
11416   cat > conftest.$ac_ext <<EOF
11417 #line 11418 "configure"
11418 #include "confdefs.h"
11419 #include <sys/types.h>
11420 #include <sys/time.h>
11421 #include <time.h>
11422 int main() {
11423 struct tm *tp;
11424 ; return 0; }
11425 EOF
11426 if { (eval echo configure:11427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11427   rm -rf conftest*
11428   ac_cv_header_time=yes
11429 else
11430   echo "configure: failed program was:" >&5
11431   cat conftest.$ac_ext >&5
11432   rm -rf conftest*
11433   ac_cv_header_time=no
11434 fi
11435 rm -f conftest*
11436 fi
11437
11438 echo "$ac_t""$ac_cv_header_time" 1>&6
11439 if test $ac_cv_header_time = yes; then
11440   cat >> confdefs.h <<\EOF
11441 #define TIME_WITH_SYS_TIME 1
11442 EOF
11443
11444 fi
11445
11446 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11447 echo "configure:11448: checking whether struct tm is in sys/time.h or time.h" >&5
11448 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11449   echo $ac_n "(cached) $ac_c" 1>&6
11450 else
11451   cat > conftest.$ac_ext <<EOF
11452 #line 11453 "configure"
11453 #include "confdefs.h"
11454 #include <sys/types.h>
11455 #include <time.h>
11456 int main() {
11457 struct tm *tp; tp->tm_sec;
11458 ; return 0; }
11459 EOF
11460 if { (eval echo configure:11461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11461   rm -rf conftest*
11462   ac_cv_struct_tm=time.h
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   ac_cv_struct_tm=sys/time.h
11468 fi
11469 rm -f conftest*
11470 fi
11471
11472 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11473 if test $ac_cv_struct_tm = sys/time.h; then
11474   cat >> confdefs.h <<\EOF
11475 #define TM_IN_SYS_TIME 1
11476 EOF
11477
11478 fi
11479
11480 # test for pw_gecos in struct passwd
11481 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11482 echo "configure:11483: checking struct passwd for pw_gecos" >&5
11483 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11484   echo $ac_n "(cached) $ac_c" 1>&6
11485 else
11486   
11487         cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <pwd.h>
11491 int main() {
11492
11493         struct passwd pwd;
11494         pwd.pw_gecos = pwd.pw_name;
11495
11496 ; return 0; }
11497 EOF
11498 if { (eval echo configure:11499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11499   rm -rf conftest*
11500   ol_cv_struct_passwd_pw_gecos=yes
11501 else
11502   echo "configure: failed program was:" >&5
11503   cat conftest.$ac_ext >&5
11504   rm -rf conftest*
11505   ol_cv_struct_passwd_pw_gecos=no
11506 fi
11507 rm -f conftest*
11508 fi
11509
11510 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11511 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11512         cat >> confdefs.h <<\EOF
11513 #define HAVE_PW_GECOS 1
11514 EOF
11515
11516 fi
11517
11518 # test for pw_passwd in struct passwd
11519 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11520 echo "configure:11521: checking struct passwd for pw_passwd" >&5
11521 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11522   echo $ac_n "(cached) $ac_c" 1>&6
11523 else
11524   
11525         cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 #include <pwd.h>
11529 int main() {
11530
11531         struct passwd pwd;
11532         pwd.pw_passwd = pwd.pw_name;
11533
11534 ; return 0; }
11535 EOF
11536 if { (eval echo configure:11537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11537   rm -rf conftest*
11538   ol_cv_struct_passwd_pw_passwd=yes
11539 else
11540   echo "configure: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   rm -rf conftest*
11543   ol_cv_struct_passwd_pw_passwd=no
11544 fi
11545 rm -f conftest*
11546 fi
11547
11548 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11549 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11550         cat >> confdefs.h <<\EOF
11551 #define HAVE_PW_PASSWD 1
11552 EOF
11553
11554 fi
11555
11556
11557 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11558 echo "configure:11559: checking if toupper() requires islower()" >&5
11559 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11560   echo $ac_n "(cached) $ac_c" 1>&6
11561 else
11562   
11563         if test "$cross_compiling" = yes; then
11564   ol_cv_c_upper_lower=safe
11565 else
11566   cat > conftest.$ac_ext <<EOF
11567 #line 11568 "configure"
11568 #include "confdefs.h"
11569
11570 #include <ctype.h>
11571 main()
11572 {
11573         if ('C' == toupper('C'))
11574                 exit(0);
11575         else
11576                 exit(1);
11577 }
11578 EOF
11579 if { (eval echo configure:11580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11580 then
11581   ol_cv_c_upper_lower=no
11582 else
11583   echo "configure: failed program was:" >&5
11584   cat conftest.$ac_ext >&5
11585   rm -fr conftest*
11586   ol_cv_c_upper_lower=yes
11587 fi
11588 rm -fr conftest*
11589 fi
11590
11591 fi
11592
11593 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11594 if test $ol_cv_c_upper_lower != no ; then
11595         cat >> confdefs.h <<\EOF
11596 #define C_UPPER_LOWER 1
11597 EOF
11598
11599 fi
11600
11601 echo $ac_n "checking for working const""... $ac_c" 1>&6
11602 echo "configure:11603: checking for working const" >&5
11603 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11604   echo $ac_n "(cached) $ac_c" 1>&6
11605 else
11606   cat > conftest.$ac_ext <<EOF
11607 #line 11608 "configure"
11608 #include "confdefs.h"
11609
11610 int main() {
11611
11612 /* Ultrix mips cc rejects this.  */
11613 typedef int charset[2]; const charset x;
11614 /* SunOS 4.1.1 cc rejects this.  */
11615 char const *const *ccp;
11616 char **p;
11617 /* NEC SVR4.0.2 mips cc rejects this.  */
11618 struct point {int x, y;};
11619 static struct point const zero = {0,0};
11620 /* AIX XL C 1.02.0.0 rejects this.
11621    It does not let you subtract one const X* pointer from another in an arm
11622    of an if-expression whose if-part is not a constant expression */
11623 const char *g = "string";
11624 ccp = &g + (g ? g-g : 0);
11625 /* HPUX 7.0 cc rejects these. */
11626 ++ccp;
11627 p = (char**) ccp;
11628 ccp = (char const *const *) p;
11629 { /* SCO 3.2v4 cc rejects this.  */
11630   char *t;
11631   char const *s = 0 ? (char *) 0 : (char const *) 0;
11632
11633   *t++ = 0;
11634 }
11635 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11636   int x[] = {25, 17};
11637   const int *foo = &x[0];
11638   ++foo;
11639 }
11640 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11641   typedef const int *iptr;
11642   iptr p = 0;
11643   ++p;
11644 }
11645 { /* AIX XL C 1.02.0.0 rejects this saying
11646      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11647   struct s { int j; const int *ap[3]; };
11648   struct s *b; b->j = 5;
11649 }
11650 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11651   const int foo = 10;
11652 }
11653
11654 ; return 0; }
11655 EOF
11656 if { (eval echo configure:11657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11657   rm -rf conftest*
11658   ac_cv_c_const=yes
11659 else
11660   echo "configure: failed program was:" >&5
11661   cat conftest.$ac_ext >&5
11662   rm -rf conftest*
11663   ac_cv_c_const=no
11664 fi
11665 rm -f conftest*
11666 fi
11667
11668 echo "$ac_t""$ac_cv_c_const" 1>&6
11669 if test $ac_cv_c_const = no; then
11670   cat >> confdefs.h <<\EOF
11671 #define const 
11672 EOF
11673
11674 fi
11675
11676 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11677 echo "configure:11678: checking if compiler understands volatile" >&5
11678 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11679   echo $ac_n "(cached) $ac_c" 1>&6
11680 else
11681   cat > conftest.$ac_ext <<EOF
11682 #line 11683 "configure"
11683 #include "confdefs.h"
11684 int x, y, z;
11685 int main() {
11686 volatile int a; int * volatile b = x ? &y : &z;
11687       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11688       *b = 0;
11689 ; return 0; }
11690 EOF
11691 if { (eval echo configure:11692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11692   rm -rf conftest*
11693   ol_cv_c_volatile=yes
11694 else
11695   echo "configure: failed program was:" >&5
11696   cat conftest.$ac_ext >&5
11697   rm -rf conftest*
11698   ol_cv_c_volatile=no
11699 fi
11700 rm -f conftest*
11701 fi
11702
11703 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11704   if test $ol_cv_c_volatile = yes; then
11705     : 
11706   else
11707     cat >> confdefs.h <<\EOF
11708 #define volatile 
11709 EOF
11710
11711   fi
11712  
11713
11714 if test $cross_compiling = yes ; then
11715         cat >> confdefs.h <<\EOF
11716 #define CROSS_COMPILING 1
11717 EOF
11718
11719
11720         cat >> confdefs.h <<\EOF
11721 #define LBER_INT_T long
11722 EOF
11723
11724         cat >> confdefs.h <<\EOF
11725 #define LBER_TAG_T long
11726 EOF
11727
11728         cat >> confdefs.h <<\EOF
11729 #define LBER_SOCKET_T int
11730 EOF
11731
11732
11733 else
11734         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11735 echo "configure:11736: checking whether byte ordering is bigendian" >&5
11736 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11737   echo $ac_n "(cached) $ac_c" 1>&6
11738 else
11739   ac_cv_c_bigendian=unknown
11740 # See if sys/param.h defines the BYTE_ORDER macro.
11741 cat > conftest.$ac_ext <<EOF
11742 #line 11743 "configure"
11743 #include "confdefs.h"
11744 #include <sys/types.h>
11745 #include <sys/param.h>
11746 int main() {
11747
11748 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11749  bogus endian macros
11750 #endif
11751 ; return 0; }
11752 EOF
11753 if { (eval echo configure:11754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11754   rm -rf conftest*
11755   # It does; now see whether it defined to BIG_ENDIAN or not.
11756 cat > conftest.$ac_ext <<EOF
11757 #line 11758 "configure"
11758 #include "confdefs.h"
11759 #include <sys/types.h>
11760 #include <sys/param.h>
11761 int main() {
11762
11763 #if BYTE_ORDER != BIG_ENDIAN
11764  not big endian
11765 #endif
11766 ; return 0; }
11767 EOF
11768 if { (eval echo configure:11769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11769   rm -rf conftest*
11770   ac_cv_c_bigendian=yes
11771 else
11772   echo "configure: failed program was:" >&5
11773   cat conftest.$ac_ext >&5
11774   rm -rf conftest*
11775   ac_cv_c_bigendian=no
11776 fi
11777 rm -f conftest*
11778 else
11779   echo "configure: failed program was:" >&5
11780   cat conftest.$ac_ext >&5
11781 fi
11782 rm -f conftest*
11783 if test $ac_cv_c_bigendian = unknown; then
11784 if test "$cross_compiling" = yes; then
11785     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11786 else
11787   cat > conftest.$ac_ext <<EOF
11788 #line 11789 "configure"
11789 #include "confdefs.h"
11790 main () {
11791   /* Are we little or big endian?  From Harbison&Steele.  */
11792   union
11793   {
11794     long l;
11795     char c[sizeof (long)];
11796   } u;
11797   u.l = 1;
11798   exit (u.c[sizeof (long) - 1] == 1);
11799 }
11800 EOF
11801 if { (eval echo configure:11802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11802 then
11803   ac_cv_c_bigendian=no
11804 else
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -fr conftest*
11808   ac_cv_c_bigendian=yes
11809 fi
11810 rm -fr conftest*
11811 fi
11812
11813 fi
11814 fi
11815
11816 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11817 if test $ac_cv_c_bigendian = yes; then
11818   cat >> confdefs.h <<\EOF
11819 #define WORDS_BIGENDIAN 1
11820 EOF
11821
11822 fi
11823
11824         echo $ac_n "checking size of short""... $ac_c" 1>&6
11825 echo "configure:11826: checking size of short" >&5
11826 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11827   echo $ac_n "(cached) $ac_c" 1>&6
11828 else
11829   if test "$cross_compiling" = yes; then
11830     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11831 else
11832   cat > conftest.$ac_ext <<EOF
11833 #line 11834 "configure"
11834 #include "confdefs.h"
11835 #include <stdio.h>
11836 main()
11837 {
11838   FILE *f=fopen("conftestval", "w");
11839   if (!f) exit(1);
11840   fprintf(f, "%d\n", sizeof(short));
11841   exit(0);
11842 }
11843 EOF
11844 if { (eval echo configure:11845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11845 then
11846   ac_cv_sizeof_short=`cat conftestval`
11847 else
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -fr conftest*
11851   ac_cv_sizeof_short=0
11852 fi
11853 rm -fr conftest*
11854 fi
11855
11856 fi
11857 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11858 cat >> confdefs.h <<EOF
11859 #define SIZEOF_SHORT $ac_cv_sizeof_short
11860 EOF
11861
11862  
11863         echo $ac_n "checking size of int""... $ac_c" 1>&6
11864 echo "configure:11865: checking size of int" >&5
11865 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11866   echo $ac_n "(cached) $ac_c" 1>&6
11867 else
11868   if test "$cross_compiling" = yes; then
11869     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11870 else
11871   cat > conftest.$ac_ext <<EOF
11872 #line 11873 "configure"
11873 #include "confdefs.h"
11874 #include <stdio.h>
11875 main()
11876 {
11877   FILE *f=fopen("conftestval", "w");
11878   if (!f) exit(1);
11879   fprintf(f, "%d\n", sizeof(int));
11880   exit(0);
11881 }
11882 EOF
11883 if { (eval echo configure:11884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11884 then
11885   ac_cv_sizeof_int=`cat conftestval`
11886 else
11887   echo "configure: failed program was:" >&5
11888   cat conftest.$ac_ext >&5
11889   rm -fr conftest*
11890   ac_cv_sizeof_int=0
11891 fi
11892 rm -fr conftest*
11893 fi
11894
11895 fi
11896 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11897 cat >> confdefs.h <<EOF
11898 #define SIZEOF_INT $ac_cv_sizeof_int
11899 EOF
11900
11901  
11902         echo $ac_n "checking size of long""... $ac_c" 1>&6
11903 echo "configure:11904: checking size of long" >&5
11904 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11905   echo $ac_n "(cached) $ac_c" 1>&6
11906 else
11907   if test "$cross_compiling" = yes; then
11908     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11909 else
11910   cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 #include <stdio.h>
11914 main()
11915 {
11916   FILE *f=fopen("conftestval", "w");
11917   if (!f) exit(1);
11918   fprintf(f, "%d\n", sizeof(long));
11919   exit(0);
11920 }
11921 EOF
11922 if { (eval echo configure:11923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11923 then
11924   ac_cv_sizeof_long=`cat conftestval`
11925 else
11926   echo "configure: failed program was:" >&5
11927   cat conftest.$ac_ext >&5
11928   rm -fr conftest*
11929   ac_cv_sizeof_long=0
11930 fi
11931 rm -fr conftest*
11932 fi
11933
11934 fi
11935 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11936 cat >> confdefs.h <<EOF
11937 #define SIZEOF_LONG $ac_cv_sizeof_long
11938 EOF
11939
11940
11941
11942         if test "$ac_cv_sizeof_int" -lt 4 ; then
11943                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11944
11945                 cat >> confdefs.h <<\EOF
11946 #define LBER_INT_T long
11947 EOF
11948
11949                 cat >> confdefs.h <<\EOF
11950 #define LBER_TAG_T long
11951 EOF
11952
11953                 cat >> confdefs.h <<\EOF
11954 #define LBER_SOCKET_T int
11955 EOF
11956
11957         else
11958                 cat >> confdefs.h <<\EOF
11959 #define LBER_INT_T int
11960 EOF
11961
11962                 cat >> confdefs.h <<\EOF
11963 #define LBER_TAG_T long
11964 EOF
11965
11966                 cat >> confdefs.h <<\EOF
11967 #define LBER_SOCKET_T int
11968 EOF
11969
11970         fi
11971 fi
11972
11973 cat >> confdefs.h <<\EOF
11974 #define LBER_LEN_T long
11975 EOF
11976
11977
11978 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11979 echo "configure:11980: checking for 8-bit clean memcmp" >&5
11980 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
11981   echo $ac_n "(cached) $ac_c" 1>&6
11982 else
11983   if test "$cross_compiling" = yes; then
11984   ac_cv_func_memcmp_clean=no
11985 else
11986   cat > conftest.$ac_ext <<EOF
11987 #line 11988 "configure"
11988 #include "confdefs.h"
11989
11990 main()
11991 {
11992   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11993   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11994 }
11995
11996 EOF
11997 if { (eval echo configure:11998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11998 then
11999   ac_cv_func_memcmp_clean=yes
12000 else
12001   echo "configure: failed program was:" >&5
12002   cat conftest.$ac_ext >&5
12003   rm -fr conftest*
12004   ac_cv_func_memcmp_clean=no
12005 fi
12006 rm -fr conftest*
12007 fi
12008
12009 fi
12010
12011 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
12012 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
12013
12014 echo $ac_n "checking for strftime""... $ac_c" 1>&6
12015 echo "configure:12016: checking for strftime" >&5
12016 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
12017   echo $ac_n "(cached) $ac_c" 1>&6
12018 else
12019   cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 /* System header to define __stub macros and hopefully few prototypes,
12023     which can conflict with char strftime(); below.  */
12024 #include <assert.h>
12025 /* Override any gcc2 internal prototype to avoid an error.  */
12026 /* We use char because int might match the return type of a gcc2
12027     builtin and then its argument prototype would still apply.  */
12028 char strftime();
12029 char (*f)();
12030
12031 int main() {
12032
12033 /* The GNU C library defines this for functions which it implements
12034     to always fail with ENOSYS.  Some functions are actually named
12035     something starting with __ and the normal name is an alias.  */
12036 #if defined (__stub_strftime) || defined (__stub___strftime)
12037 choke me
12038 #else
12039 f = strftime;
12040 #endif
12041
12042 ; return 0; }
12043 EOF
12044 if { (eval echo configure:12045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12045   rm -rf conftest*
12046   eval "ac_cv_func_strftime=yes"
12047 else
12048   echo "configure: failed program was:" >&5
12049   cat conftest.$ac_ext >&5
12050   rm -rf conftest*
12051   eval "ac_cv_func_strftime=no"
12052 fi
12053 rm -f conftest*
12054 fi
12055
12056 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
12057   echo "$ac_t""yes" 1>&6
12058   cat >> confdefs.h <<\EOF
12059 #define HAVE_STRFTIME 1
12060 EOF
12061
12062 else
12063   echo "$ac_t""no" 1>&6
12064 # strftime is in -lintl on SCO UNIX.
12065 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
12066 echo "configure:12067: checking for strftime in -lintl" >&5
12067 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
12068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12069   echo $ac_n "(cached) $ac_c" 1>&6
12070 else
12071   ac_save_LIBS="$LIBS"
12072 LIBS="-lintl  $LIBS"
12073 cat > conftest.$ac_ext <<EOF
12074 #line 12075 "configure"
12075 #include "confdefs.h"
12076 /* Override any gcc2 internal prototype to avoid an error.  */
12077 /* We use char because int might match the return type of a gcc2
12078     builtin and then its argument prototype would still apply.  */
12079 char strftime();
12080
12081 int main() {
12082 strftime()
12083 ; return 0; }
12084 EOF
12085 if { (eval echo configure:12086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12086   rm -rf conftest*
12087   eval "ac_cv_lib_$ac_lib_var=yes"
12088 else
12089   echo "configure: failed program was:" >&5
12090   cat conftest.$ac_ext >&5
12091   rm -rf conftest*
12092   eval "ac_cv_lib_$ac_lib_var=no"
12093 fi
12094 rm -f conftest*
12095 LIBS="$ac_save_LIBS"
12096
12097 fi
12098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12099   echo "$ac_t""yes" 1>&6
12100   cat >> confdefs.h <<\EOF
12101 #define HAVE_STRFTIME 1
12102 EOF
12103
12104 LIBS="-lintl $LIBS"
12105 else
12106   echo "$ac_t""no" 1>&6
12107 fi
12108
12109 fi
12110
12111
12112 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
12113 echo "configure:12114: checking for inet_aton()" >&5
12114 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
12115   echo $ac_n "(cached) $ac_c" 1>&6
12116 else
12117   cat > conftest.$ac_ext <<EOF
12118 #line 12119 "configure"
12119 #include "confdefs.h"
12120
12121 #ifdef HAVE_SYS_TYPES_H
12122 #       include <sys/types.h>
12123 #endif
12124 #ifdef HAVE_SYS_SOCKET_H
12125 #       include <sys/socket.h>
12126 #       ifdef HAVE_SYS_SELECT_H
12127 #               include <sys/select.h>
12128 #       endif
12129 #       include <netinet/in.h>
12130 #       ifdef HAVE_ARPA_INET_H
12131 #               include <arpa/inet.h>
12132 #       endif
12133 #endif
12134
12135 int main() {
12136 struct in_addr in;
12137 int rc = inet_aton( "255.255.255.255", &in );
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12141   rm -rf conftest*
12142   ol_cv_func_inet_aton=yes
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   ol_cv_func_inet_aton=no
12148 fi
12149 rm -f conftest*
12150 fi
12151
12152 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
12153   if test $ol_cv_func_inet_aton != no; then
12154     cat >> confdefs.h <<\EOF
12155 #define HAVE_INET_ATON 1
12156 EOF
12157
12158   fi
12159  
12160
12161 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
12162 echo "configure:12163: checking for vprintf" >&5
12163 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
12164   echo $ac_n "(cached) $ac_c" 1>&6
12165 else
12166   cat > conftest.$ac_ext <<EOF
12167 #line 12168 "configure"
12168 #include "confdefs.h"
12169 /* System header to define __stub macros and hopefully few prototypes,
12170     which can conflict with char vprintf(); below.  */
12171 #include <assert.h>
12172 /* Override any gcc2 internal prototype to avoid an error.  */
12173 /* We use char because int might match the return type of a gcc2
12174     builtin and then its argument prototype would still apply.  */
12175 char vprintf();
12176 char (*f)();
12177
12178 int main() {
12179
12180 /* The GNU C library defines this for functions which it implements
12181     to always fail with ENOSYS.  Some functions are actually named
12182     something starting with __ and the normal name is an alias.  */
12183 #if defined (__stub_vprintf) || defined (__stub___vprintf)
12184 choke me
12185 #else
12186 f = vprintf;
12187 #endif
12188
12189 ; return 0; }
12190 EOF
12191 if { (eval echo configure:12192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12192   rm -rf conftest*
12193   eval "ac_cv_func_vprintf=yes"
12194 else
12195   echo "configure: failed program was:" >&5
12196   cat conftest.$ac_ext >&5
12197   rm -rf conftest*
12198   eval "ac_cv_func_vprintf=no"
12199 fi
12200 rm -f conftest*
12201 fi
12202
12203 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12204   echo "$ac_t""yes" 1>&6
12205   cat >> confdefs.h <<\EOF
12206 #define HAVE_VPRINTF 1
12207 EOF
12208
12209 else
12210   echo "$ac_t""no" 1>&6
12211 fi
12212
12213 if test "$ac_cv_func_vprintf" != yes; then
12214 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12215 echo "configure:12216: checking for _doprnt" >&5
12216 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
12217   echo $ac_n "(cached) $ac_c" 1>&6
12218 else
12219   cat > conftest.$ac_ext <<EOF
12220 #line 12221 "configure"
12221 #include "confdefs.h"
12222 /* System header to define __stub macros and hopefully few prototypes,
12223     which can conflict with char _doprnt(); below.  */
12224 #include <assert.h>
12225 /* Override any gcc2 internal prototype to avoid an error.  */
12226 /* We use char because int might match the return type of a gcc2
12227     builtin and then its argument prototype would still apply.  */
12228 char _doprnt();
12229 char (*f)();
12230
12231 int main() {
12232
12233 /* The GNU C library defines this for functions which it implements
12234     to always fail with ENOSYS.  Some functions are actually named
12235     something starting with __ and the normal name is an alias.  */
12236 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12237 choke me
12238 #else
12239 f = _doprnt;
12240 #endif
12241
12242 ; return 0; }
12243 EOF
12244 if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12245   rm -rf conftest*
12246   eval "ac_cv_func__doprnt=yes"
12247 else
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -rf conftest*
12251   eval "ac_cv_func__doprnt=no"
12252 fi
12253 rm -f conftest*
12254 fi
12255
12256 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12257   echo "$ac_t""yes" 1>&6
12258   cat >> confdefs.h <<\EOF
12259 #define HAVE_DOPRNT 1
12260 EOF
12261
12262 else
12263   echo "$ac_t""no" 1>&6
12264 fi
12265
12266 fi
12267
12268
12269 if test $ac_cv_func_vprintf = yes ; then
12270                 for ac_func in vsnprintf vsprintf
12271 do
12272 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12273 echo "configure:12274: checking for $ac_func" >&5
12274 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12275   echo $ac_n "(cached) $ac_c" 1>&6
12276 else
12277   cat > conftest.$ac_ext <<EOF
12278 #line 12279 "configure"
12279 #include "confdefs.h"
12280 /* System header to define __stub macros and hopefully few prototypes,
12281     which can conflict with char $ac_func(); below.  */
12282 #include <assert.h>
12283 /* Override any gcc2 internal prototype to avoid an error.  */
12284 /* We use char because int might match the return type of a gcc2
12285     builtin and then its argument prototype would still apply.  */
12286 char $ac_func();
12287 char (*f)();
12288
12289 int main() {
12290
12291 /* The GNU C library defines this for functions which it implements
12292     to always fail with ENOSYS.  Some functions are actually named
12293     something starting with __ and the normal name is an alias.  */
12294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12295 choke me
12296 #else
12297 f = $ac_func;
12298 #endif
12299
12300 ; return 0; }
12301 EOF
12302 if { (eval echo configure:12303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12303   rm -rf conftest*
12304   eval "ac_cv_func_$ac_func=yes"
12305 else
12306   echo "configure: failed program was:" >&5
12307   cat conftest.$ac_ext >&5
12308   rm -rf conftest*
12309   eval "ac_cv_func_$ac_func=no"
12310 fi
12311 rm -f conftest*
12312 fi
12313
12314 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12315   echo "$ac_t""yes" 1>&6
12316     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12317   cat >> confdefs.h <<EOF
12318 #define $ac_tr_func 1
12319 EOF
12320  
12321 else
12322   echo "$ac_t""no" 1>&6
12323 fi
12324 done
12325
12326 fi
12327
12328 for ac_func in \
12329         bcopy                   \
12330         closesocket             \
12331         endgrent                \
12332         endpwent                \
12333         flock                   \
12334         getdtablesize   \
12335         getgrgid                \
12336         gethostname             \
12337         getpass                 \
12338         getpwuid                \
12339         getpwnam                \
12340         getspnam                \
12341         gettimeofday    \
12342         initgroups              \
12343         lockf                   \
12344         memcpy                  \
12345         memmove                 \
12346         mkstemp                 \
12347         read                    \
12348         recv                    \
12349         recvfrom                \
12350         setpwfile               \
12351         setgid                  \
12352         setegid                 \
12353         setsid                  \
12354         setuid                  \
12355         seteuid                 \
12356         signal                  \
12357         sigset                  \
12358         snprintf                \
12359         strdup                  \
12360         strerror                \
12361         strpbrk                 \
12362         strrchr                 \
12363         strsep                  \
12364         strstr                  \
12365         strtol                  \
12366         strtoul                 \
12367         strspn                  \
12368         sysconf                 \
12369         waitpid                 \
12370         wait4                   \
12371         write                   \
12372         send                    \
12373         sendto                  \
12374
12375 do
12376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12377 echo "configure:12378: checking for $ac_func" >&5
12378 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12379   echo $ac_n "(cached) $ac_c" 1>&6
12380 else
12381   cat > conftest.$ac_ext <<EOF
12382 #line 12383 "configure"
12383 #include "confdefs.h"
12384 /* System header to define __stub macros and hopefully few prototypes,
12385     which can conflict with char $ac_func(); below.  */
12386 #include <assert.h>
12387 /* Override any gcc2 internal prototype to avoid an error.  */
12388 /* We use char because int might match the return type of a gcc2
12389     builtin and then its argument prototype would still apply.  */
12390 char $ac_func();
12391 char (*f)();
12392
12393 int main() {
12394
12395 /* The GNU C library defines this for functions which it implements
12396     to always fail with ENOSYS.  Some functions are actually named
12397     something starting with __ and the normal name is an alias.  */
12398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12399 choke me
12400 #else
12401 f = $ac_func;
12402 #endif
12403
12404 ; return 0; }
12405 EOF
12406 if { (eval echo configure:12407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12407   rm -rf conftest*
12408   eval "ac_cv_func_$ac_func=yes"
12409 else
12410   echo "configure: failed program was:" >&5
12411   cat conftest.$ac_ext >&5
12412   rm -rf conftest*
12413   eval "ac_cv_func_$ac_func=no"
12414 fi
12415 rm -f conftest*
12416 fi
12417
12418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12419   echo "$ac_t""yes" 1>&6
12420     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12421   cat >> confdefs.h <<EOF
12422 #define $ac_tr_func 1
12423 EOF
12424  
12425 else
12426   echo "$ac_t""no" 1>&6
12427 fi
12428 done
12429
12430
12431 for ac_func in getopt tempnam
12432 do
12433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12434 echo "configure:12435: checking for $ac_func" >&5
12435 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12436   echo $ac_n "(cached) $ac_c" 1>&6
12437 else
12438   cat > conftest.$ac_ext <<EOF
12439 #line 12440 "configure"
12440 #include "confdefs.h"
12441 /* System header to define __stub macros and hopefully few prototypes,
12442     which can conflict with char $ac_func(); below.  */
12443 #include <assert.h>
12444 /* Override any gcc2 internal prototype to avoid an error.  */
12445 /* We use char because int might match the return type of a gcc2
12446     builtin and then its argument prototype would still apply.  */
12447 char $ac_func();
12448 char (*f)();
12449
12450 int main() {
12451
12452 /* The GNU C library defines this for functions which it implements
12453     to always fail with ENOSYS.  Some functions are actually named
12454     something starting with __ and the normal name is an alias.  */
12455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12456 choke me
12457 #else
12458 f = $ac_func;
12459 #endif
12460
12461 ; return 0; }
12462 EOF
12463 if { (eval echo configure:12464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12464   rm -rf conftest*
12465   eval "ac_cv_func_$ac_func=yes"
12466 else
12467   echo "configure: failed program was:" >&5
12468   cat conftest.$ac_ext >&5
12469   rm -rf conftest*
12470   eval "ac_cv_func_$ac_func=no"
12471 fi
12472 rm -f conftest*
12473 fi
12474
12475 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12476   echo "$ac_t""yes" 1>&6
12477     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12478   cat >> confdefs.h <<EOF
12479 #define $ac_tr_func 1
12480 EOF
12481  
12482 else
12483   echo "$ac_t""no" 1>&6
12484 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12485 fi
12486 done
12487
12488
12489
12490 # Check Configuration
12491 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12492 echo "configure:12493: checking declaration of sys_errlist" >&5
12493 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12494   echo $ac_n "(cached) $ac_c" 1>&6
12495 else
12496   
12497         cat > conftest.$ac_ext <<EOF
12498 #line 12499 "configure"
12499 #include "confdefs.h"
12500
12501 #include <stdio.h>
12502 #include <sys/types.h>
12503 #include <errno.h> 
12504 int main() {
12505 char *c = (char *) *sys_errlist
12506 ; return 0; }
12507 EOF
12508 if { (eval echo configure:12509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12509   rm -rf conftest*
12510   ol_cv_dcl_sys_errlist=yes
12511         ol_cv_have_sys_errlist=yes
12512 else
12513   echo "configure: failed program was:" >&5
12514   cat conftest.$ac_ext >&5
12515   rm -rf conftest*
12516   ol_cv_dcl_sys_errlist=no
12517 fi
12518 rm -f conftest*
12519 fi
12520
12521 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12522 #
12523 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12524 if test $ol_cv_dcl_sys_errlist = no ; then
12525         cat >> confdefs.h <<\EOF
12526 #define DECL_SYS_ERRLIST 1
12527 EOF
12528
12529
12530         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12531 echo "configure:12532: checking existence of sys_errlist" >&5
12532 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12533   echo $ac_n "(cached) $ac_c" 1>&6
12534 else
12535   
12536                 cat > conftest.$ac_ext <<EOF
12537 #line 12538 "configure"
12538 #include "confdefs.h"
12539 #include <errno.h>
12540 int main() {
12541 char *c = (char *) *sys_errlist
12542 ; return 0; }
12543 EOF
12544 if { (eval echo configure:12545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12545   rm -rf conftest*
12546   ol_cv_have_sys_errlist=yes
12547 else
12548   echo "configure: failed program was:" >&5
12549   cat conftest.$ac_ext >&5
12550   rm -rf conftest*
12551   ol_cv_have_sys_errlist=no
12552 fi
12553 rm -f conftest*
12554 fi
12555
12556 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12557 fi
12558 if test $ol_cv_have_sys_errlist = yes ; then
12559         cat >> confdefs.h <<\EOF
12560 #define HAVE_SYS_ERRLIST 1
12561 EOF
12562
12563 fi
12564
12565
12566
12567 if test "$ol_enable_debug" != no ; then
12568         cat >> confdefs.h <<\EOF
12569 #define LDAP_DEBUG 1
12570 EOF
12571
12572 fi
12573 if test "$ol_enable_syslog" = yes ; then
12574         cat >> confdefs.h <<\EOF
12575 #define LDAP_SYSLOG 1
12576 EOF
12577
12578 fi
12579 if test "$ol_enable_libui" = yes ; then
12580         cat >> confdefs.h <<\EOF
12581 #define LDAP_LIBUI 1
12582 EOF
12583
12584 fi
12585 if test "$ol_enable_cache" = no ; then
12586         cat >> confdefs.h <<\EOF
12587 #define LDAP_NOCACHE 1
12588 EOF
12589
12590 fi
12591 if test "$ol_enable_dns" != no ; then
12592         cat >> confdefs.h <<\EOF
12593 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12594 EOF
12595
12596 fi
12597 if test "$ol_enable_proctitle" != no ; then
12598         cat >> confdefs.h <<\EOF
12599 #define LDAP_PROCTITLE 1
12600 EOF
12601
12602 fi
12603 if test "$ol_enable_referrals" != no ; then
12604         cat >> confdefs.h <<\EOF
12605 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12606 EOF
12607
12608 fi
12609 if test "$ol_enable_cldap" != no ; then
12610         cat >> confdefs.h <<\EOF
12611 #define LDAP_CONNECTIONLESS 1
12612 EOF
12613
12614 fi
12615
12616 if test "$ol_enable_crypt" != no ; then
12617         cat >> confdefs.h <<\EOF
12618 #define SLAPD_CRYPT 1
12619 EOF
12620
12621 fi
12622 if test "$ol_enable_cleartext" != no ; then
12623         cat >> confdefs.h <<\EOF
12624 #define SLAPD_CLEARTEXT 1
12625 EOF
12626
12627 fi
12628 if test "$ol_enable_phonetic" != no ; then
12629         cat >> confdefs.h <<\EOF
12630 #define SLAPD_PHONETIC 1
12631 EOF
12632
12633 fi
12634 if test "$ol_enable_rlookups" != no ; then
12635         cat >> confdefs.h <<\EOF
12636 #define SLAPD_RLOOKUPS 1
12637 EOF
12638
12639 fi
12640
12641 if test "$ol_link_modules" != no ; then
12642         cat >> confdefs.h <<\EOF
12643 #define SLAPD_MODULES 1
12644 EOF
12645
12646         BUILD_SLAPD=yes
12647 fi
12648
12649 if test "$ol_link_bdb2" != no ; then
12650         cat >> confdefs.h <<\EOF
12651 #define SLAPD_BDB2 1
12652 EOF
12653
12654         BUILD_SLAPD=yes
12655         BUILD_BDB2=yes
12656         if test "$ol_with_bdb2_module" != static ; then
12657                 cat >> confdefs.h <<\EOF
12658 #define SLAPD_BDB2_DYNAMIC 1
12659 EOF
12660
12661                 BUILD_BDB2_DYNAMIC=yes
12662         fi
12663 fi
12664
12665 if test "$ol_enable_ldap" != no ; then
12666         cat >> confdefs.h <<\EOF
12667 #define SLAPD_LDAP 1
12668 EOF
12669
12670         BUILD_SLAPD=yes
12671         BUILD_LDAP=yes
12672         if test "$ol_with_ldap_module" != static ; then
12673                 cat >> confdefs.h <<\EOF
12674 #define SLAPD_LDAP_DYNAMIC 1
12675 EOF
12676
12677                 BUILD_LDAP_DYNAMIC=yes
12678         fi
12679 fi
12680
12681 if test "$ol_link_ldbm" != no ; then
12682         cat >> confdefs.h <<\EOF
12683 #define SLAPD_LDBM 1
12684 EOF
12685
12686         BUILD_SLAPD=yes
12687         BUILD_LDBM=yes
12688         if test "$ol_with_ldbm_module" != static ; then
12689                 cat >> confdefs.h <<\EOF
12690 #define SLAPD_LDBM_DYNAMIC 1
12691 EOF
12692
12693                 BUILD_LDBM_DYNAMIC=yes
12694         fi
12695 fi
12696
12697 if test "$ol_enable_passwd" != no ; then
12698         cat >> confdefs.h <<\EOF
12699 #define SLAPD_PASSWD 1
12700 EOF
12701
12702         BUILD_SLAPD=yes
12703         BUILD_PASSWD=yes
12704         if test "$ol_with_passwd_module" != static ; then
12705                 cat >> confdefs.h <<\EOF
12706 #define SLAPD_PASSWD_DYNAMIC 1
12707 EOF
12708
12709                 BUILD_PASSWD_DYNAMIC=yes
12710         fi
12711 fi
12712
12713 if test "$ol_link_perl" != no ; then
12714         cat >> confdefs.h <<\EOF
12715 #define SLAPD_PERL 1
12716 EOF
12717
12718         BUILD_SLAPD=yes
12719         BUILD_PERL=yes
12720         if test "$ol_with_perl_module" != static ; then
12721                 cat >> confdefs.h <<\EOF
12722 #define SLAPD_PERL_DYNAMIC 1
12723 EOF
12724
12725                 BUILD_PERL_DYNAMIC=yes
12726         fi
12727 fi
12728
12729 if test "$ol_enable_shell" != no ; then
12730         cat >> confdefs.h <<\EOF
12731 #define SLAPD_SHELL 1
12732 EOF
12733
12734         BUILD_SLAPD=yes
12735         BUILD_SHELL=yes
12736         if test "$ol_with_shell_module" != static ; then
12737                 cat >> confdefs.h <<\EOF
12738 #define SLAPD_SHELL_DYNAMIC 1
12739 EOF
12740
12741                 BUILD_SHELL_DYNAMIC=yes
12742         fi
12743 fi
12744
12745 if test "$ol_enable_tcl" != no ; then
12746         cat >> confdefs.h <<\EOF
12747 #define SLAPD_TCL 1
12748 EOF
12749
12750         BUILD_SLAPD=yes
12751         BUILD_TCL=yes
12752         if test "$ol_with_tcl_module" != static; then
12753                 cat >> confdefs.h <<\EOF
12754 #define SLAPD_TCL_DYNAMIC 1
12755 EOF
12756
12757                 BUILD_TCL_DYNAMIC=yes
12758         fi
12759 fi
12760
12761 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12762         $BUILD_SLAPD = yes ; then
12763         BUILD_SLURPD=yes
12764 fi
12765
12766 if test "$ol_link_isode" != no ; then
12767         BUILD_LDAPD=yes
12768 fi
12769
12770
12771
12772
12773   
12774   
12775   
12776   
12777   
12778   
12779   
12780   
12781   
12782   
12783   
12784   
12785   
12786   
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810 trap '' 1 2 15
12811
12812 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12813
12814 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12815 # Let make expand exec_prefix.
12816 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12817
12818 # Any assignment to VPATH causes Sun make to only execute
12819 # the first set of double-colon rules, so remove it if not needed.
12820 # If there is a colon in the path, we need to keep it.
12821 if test "x$srcdir" = x.; then
12822   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12823 fi
12824
12825 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12826
12827 DEFS=-DHAVE_CONFIG_H
12828
12829 # Without the "./", some shells look in PATH for config.status.
12830 : ${CONFIG_STATUS=./config.status}
12831
12832 echo creating $CONFIG_STATUS
12833 rm -f $CONFIG_STATUS
12834 cat > $CONFIG_STATUS <<EOF
12835 #! /bin/sh
12836 # Generated automatically by configure.
12837 # Run this file to recreate the current configuration.
12838 # This directory was configured as follows,
12839 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12840 #
12841 # $0 $ac_configure_args
12842 #
12843 # Compiler output produced by configure, useful for debugging
12844 # configure, is in ./config.log if it exists.
12845
12846 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12847 for ac_option
12848 do
12849   case "\$ac_option" in
12850   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12851     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12852     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12853   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12854     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
12855     exit 0 ;;
12856   -help | --help | --hel | --he | --h)
12857     echo "\$ac_cs_usage"; exit 0 ;;
12858   *) echo "\$ac_cs_usage"; exit 1 ;;
12859   esac
12860 done
12861
12862 ac_given_srcdir=$srcdir
12863 ac_given_INSTALL="$INSTALL"
12864
12865 trap 'rm -fr `echo "\
12866 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12867 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12868 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12869 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12870 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12871 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12872 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12873 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12874 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12875 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12876 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12877 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12878 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12879 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12880 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12881 include/Makefile:build/top.mk:include/Makefile.in \
12882 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12883 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12884 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12885 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12886 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12887 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12888 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12889 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12890 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12891 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12892 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12893 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12894 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12895 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12896 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12897 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12898 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12899 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12900 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12901 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12902 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12903 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12904 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12905 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12906 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12907 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12908  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12909 EOF
12910 cat >> $CONFIG_STATUS <<EOF
12911
12912 # Protect against being on the right side of a sed subst in config.status.
12913 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12914  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12915 $ac_vpsub
12916 $extrasub
12917 s%@SHELL@%$SHELL%g
12918 s%@CFLAGS@%$CFLAGS%g
12919 s%@CPPFLAGS@%$CPPFLAGS%g
12920 s%@CXXFLAGS@%$CXXFLAGS%g
12921 s%@FFLAGS@%$FFLAGS%g
12922 s%@DEFS@%$DEFS%g
12923 s%@LDFLAGS@%$LDFLAGS%g
12924 s%@LIBS@%$LIBS%g
12925 s%@exec_prefix@%$exec_prefix%g
12926 s%@prefix@%$prefix%g
12927 s%@program_transform_name@%$program_transform_name%g
12928 s%@bindir@%$bindir%g
12929 s%@sbindir@%$sbindir%g
12930 s%@libexecdir@%$libexecdir%g
12931 s%@datadir@%$datadir%g
12932 s%@sysconfdir@%$sysconfdir%g
12933 s%@sharedstatedir@%$sharedstatedir%g
12934 s%@localstatedir@%$localstatedir%g
12935 s%@libdir@%$libdir%g
12936 s%@includedir@%$includedir%g
12937 s%@oldincludedir@%$oldincludedir%g
12938 s%@infodir@%$infodir%g
12939 s%@mandir@%$mandir%g
12940 s%@host@%$host%g
12941 s%@host_alias@%$host_alias%g
12942 s%@host_cpu@%$host_cpu%g
12943 s%@host_vendor@%$host_vendor%g
12944 s%@host_os@%$host_os%g
12945 s%@target@%$target%g
12946 s%@target_alias@%$target_alias%g
12947 s%@target_cpu@%$target_cpu%g
12948 s%@target_vendor@%$target_vendor%g
12949 s%@target_os@%$target_os%g
12950 s%@build@%$build%g
12951 s%@build_alias@%$build_alias%g
12952 s%@build_cpu@%$build_cpu%g
12953 s%@build_vendor@%$build_vendor%g
12954 s%@build_os@%$build_os%g
12955 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12956 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12957 s%@INSTALL_DATA@%$INSTALL_DATA%g
12958 s%@PACKAGE@%$PACKAGE%g
12959 s%@VERSION@%$VERSION%g
12960 s%@ACLOCAL@%$ACLOCAL%g
12961 s%@AUTOCONF@%$AUTOCONF%g
12962 s%@AUTOMAKE@%$AUTOMAKE%g
12963 s%@AUTOHEADER@%$AUTOHEADER%g
12964 s%@MAKEINFO@%$MAKEINFO%g
12965 s%@install_sh@%$install_sh%g
12966 s%@AMTAR@%$AMTAR%g
12967 s%@AWK@%$AWK%g
12968 s%@AMTARFLAGS@%$AMTARFLAGS%g
12969 s%@SET_MAKE@%$SET_MAKE%g
12970 s%@top_builddir@%$top_builddir%g
12971 s%@ldap_subdir@%$ldap_subdir%g
12972 s%@CC@%$CC%g
12973 s%@RANLIB@%$RANLIB%g
12974 s%@LD@%$LD%g
12975 s%@NM@%$NM%g
12976 s%@LN_S@%$LN_S%g
12977 s%@LIBTOOL@%$LIBTOOL%g
12978 s%@LN_H@%$LN_H%g
12979 s%@SENDMAIL@%$SENDMAIL%g
12980 s%@EDITOR@%$EDITOR%g
12981 s%@FINGER@%$FINGER%g
12982 s%@PERLBIN@%$PERLBIN%g
12983 s%@CPP@%$CPP%g
12984 s%@EXEEXT@%$EXEEXT%g
12985 s%@OBJEXT@%$OBJEXT%g
12986 s%@OL_MKDEP@%$OL_MKDEP%g
12987 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12988 s%@GLIBCONFIG@%$GLIBCONFIG%g
12989 s%@PEPSY@%$PEPSY%g
12990 s%@LIBOBJS@%$LIBOBJS%g
12991 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12992 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12993 s%@BUILD_BDB2@%$BUILD_BDB2%g
12994 s%@BUILD_LDAP@%$BUILD_LDAP%g
12995 s%@BUILD_LDBM@%$BUILD_LDBM%g
12996 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12997 s%@BUILD_PERL@%$BUILD_PERL%g
12998 s%@BUILD_SHELL@%$BUILD_SHELL%g
12999 s%@BUILD_TCL@%$BUILD_TCL%g
13000 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
13001 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
13002 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
13003 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
13004 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
13005 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
13006 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
13007 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
13008 s%@LDAP_LIBS@%$LDAP_LIBS%g
13009 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
13010 s%@LDIF_LIBS@%$LDIF_LIBS%g
13011 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
13012 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
13013 s%@LDBM_LIBS@%$LDBM_LIBS%g
13014 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
13015 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
13016 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
13017 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
13018 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
13019 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
13020 s%@KRB_LIBS@%$KRB_LIBS%g
13021 s%@READLINE_LIBS@%$READLINE_LIBS%g
13022 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
13023 s%@TLS_LIBS@%$TLS_LIBS%g
13024
13025 CEOF
13026 EOF
13027
13028 cat >> $CONFIG_STATUS <<\EOF
13029
13030 # Split the substitutions into bite-sized pieces for seds with
13031 # small command number limits, like on Digital OSF/1 and HP-UX.
13032 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13033 ac_file=1 # Number of current file.
13034 ac_beg=1 # First line for current file.
13035 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13036 ac_more_lines=:
13037 ac_sed_cmds=""
13038 while $ac_more_lines; do
13039   if test $ac_beg -gt 1; then
13040     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13041   else
13042     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13043   fi
13044   if test ! -s conftest.s$ac_file; then
13045     ac_more_lines=false
13046     rm -f conftest.s$ac_file
13047   else
13048     if test -z "$ac_sed_cmds"; then
13049       ac_sed_cmds="sed -f conftest.s$ac_file"
13050     else
13051       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13052     fi
13053     ac_file=`expr $ac_file + 1`
13054     ac_beg=$ac_end
13055     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13056   fi
13057 done
13058 if test -z "$ac_sed_cmds"; then
13059   ac_sed_cmds=cat
13060 fi
13061 EOF
13062
13063 cat >> $CONFIG_STATUS <<EOF
13064
13065 CONFIG_FILES=\${CONFIG_FILES-"\
13066 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13067 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13068 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13069 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13070 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13071 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13072 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13073 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13074 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13075 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13076 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13077 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13078 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13079 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13080 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13081 include/Makefile:build/top.mk:include/Makefile.in \
13082 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13083 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13084 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13085 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13086 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13087 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13088 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13089 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13090 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13091 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13092 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13093 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
13094 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
13095 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
13096 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
13097 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
13098 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
13099 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
13100 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13101 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13102 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13103 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13104 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13105 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13106 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13107 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13108 "}
13109 EOF
13110 cat >> $CONFIG_STATUS <<\EOF
13111 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13112   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13113   case "$ac_file" in
13114   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13115        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13116   *) ac_file_in="${ac_file}.in" ;;
13117   esac
13118
13119   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13120
13121   # Remove last slash and all that follows it.  Not all systems have dirname.
13122   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13123   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13124     # The file is in a subdirectory.
13125     test ! -d "$ac_dir" && mkdir "$ac_dir"
13126     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13127     # A "../" for each directory in $ac_dir_suffix.
13128     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13129   else
13130     ac_dir_suffix= ac_dots=
13131   fi
13132
13133   case "$ac_given_srcdir" in
13134   .)  srcdir=.
13135       if test -z "$ac_dots"; then top_srcdir=.
13136       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13137   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13138   *) # Relative path.
13139     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13140     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13141   esac
13142
13143   case "$ac_given_INSTALL" in
13144   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13145   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13146   esac
13147
13148   echo creating "$ac_file"
13149   rm -f "$ac_file"
13150   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13151   case "$ac_file" in
13152   *Makefile*) ac_comsub="1i\\
13153 # $configure_input" ;;
13154   *) ac_comsub= ;;
13155   esac
13156
13157   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13158   sed -e "$ac_comsub
13159 s%@configure_input@%$configure_input%g
13160 s%@srcdir@%$srcdir%g
13161 s%@top_srcdir@%$top_srcdir%g
13162 s%@INSTALL@%$INSTALL%g
13163 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13164 fi; done
13165 rm -f conftest.s*
13166
13167 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13168 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13169 #
13170 # ac_d sets the value in "#define NAME VALUE" lines.
13171 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13172 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13173 ac_dC='\3'
13174 ac_dD='%g'
13175 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13176 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13177 ac_uB='\([      ]\)%\1#\2define\3'
13178 ac_uC=' '
13179 ac_uD='\4%g'
13180 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13181 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13182 ac_eB='$%\1#\2define\3'
13183 ac_eC=' '
13184 ac_eD='%g'
13185
13186 if test "${CONFIG_HEADERS+set}" != set; then
13187 EOF
13188 cat >> $CONFIG_STATUS <<EOF
13189   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
13190 EOF
13191 cat >> $CONFIG_STATUS <<\EOF
13192 fi
13193 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13194   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13195   case "$ac_file" in
13196   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13197        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13198   *) ac_file_in="${ac_file}.in" ;;
13199   esac
13200
13201   echo creating $ac_file
13202
13203   rm -f conftest.frag conftest.in conftest.out
13204   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13205   cat $ac_file_inputs > conftest.in
13206
13207 EOF
13208
13209 # Transform confdefs.h into a sed script conftest.vals that substitutes
13210 # the proper values into config.h.in to produce config.h.  And first:
13211 # Protect against being on the right side of a sed subst in config.status.
13212 # Protect against being in an unquoted here document in config.status.
13213 rm -f conftest.vals
13214 cat > conftest.hdr <<\EOF
13215 s/[\\&%]/\\&/g
13216 s%[\\$`]%\\&%g
13217 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13218 s%ac_d%ac_u%gp
13219 s%ac_u%ac_e%gp
13220 EOF
13221 sed -n -f conftest.hdr confdefs.h > conftest.vals
13222 rm -f conftest.hdr
13223
13224 # This sed command replaces #undef with comments.  This is necessary, for
13225 # example, in the case of _POSIX_SOURCE, which is predefined and required
13226 # on some systems where configure will not decide to define it.
13227 cat >> conftest.vals <<\EOF
13228 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13229 EOF
13230
13231 # Break up conftest.vals because some shells have a limit on
13232 # the size of here documents, and old seds have small limits too.
13233
13234 rm -f conftest.tail
13235 while :
13236 do
13237   ac_lines=`grep -c . conftest.vals`
13238   # grep -c gives empty output for an empty file on some AIX systems.
13239   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13240   # Write a limited-size here document to conftest.frag.
13241   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13242   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13243   echo 'CEOF
13244   sed -f conftest.frag conftest.in > conftest.out
13245   rm -f conftest.in
13246   mv conftest.out conftest.in
13247 ' >> $CONFIG_STATUS
13248   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13249   rm -f conftest.vals
13250   mv conftest.tail conftest.vals
13251 done
13252 rm -f conftest.vals
13253
13254 cat >> $CONFIG_STATUS <<\EOF
13255   rm -f conftest.frag conftest.h
13256   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13257   cat conftest.in >> conftest.h
13258   rm -f conftest.in
13259   if cmp -s $ac_file conftest.h 2>/dev/null; then
13260     echo "$ac_file is unchanged"
13261     rm -f conftest.h
13262   else
13263     # Remove last slash and all that follows it.  Not all systems have dirname.
13264       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13265       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13266       # The file is in a subdirectory.
13267       test ! -d "$ac_dir" && mkdir "$ac_dir"
13268     fi
13269     rm -f $ac_file
13270     mv conftest.h $ac_file
13271   fi
13272 fi; done
13273
13274 EOF
13275 cat >> $CONFIG_STATUS <<EOF
13276
13277 EOF
13278 cat >> $CONFIG_STATUS <<\EOF
13279
13280 date > stamp-h
13281 echo Please \"make depend\" to build dependencies
13282
13283 exit 0
13284 EOF
13285 chmod +x $CONFIG_STATUS
13286 rm -fr confdefs* $ac_clean_files
13287 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13288