]> git.sur5r.net Git - openldap/blob - configure
Cast ber_read() arg to char*
[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-kerberos       with Kerberos support (auto)"
37 ac_help="$ac_help
38   --with-readline  with readline support (auto)"
39 ac_help="$ac_help
40   --with-threads        use threads (auto)"
41 ac_help="$ac_help
42   --with-tls  with TLS/SSL support (auto)"
43 ac_help="$ac_help
44   --with-yielding-select        with implicitly yielding select (auto)"
45 ac_help="$ac_help
46 LDAPD Options:"
47 ac_help="$ac_help
48   --enable-ldapd        enable building ldapd (no)"
49 ac_help="$ac_help
50 SLAPD Options:"
51 ac_help="$ac_help
52   --enable-slapd        enable building slapd (yes)"
53 ac_help="$ac_help
54     --enable-cleartext  enable cleartext passwords (yes)"
55 ac_help="$ac_help
56     --enable-crypt      enable crypt(3) passwords (auto)"
57 ac_help="$ac_help
58     --enable-modules    enable dynamic module support (no)"
59 ac_help="$ac_help
60     --enable-phonetic   enable phonetic/soundex (no)"
61 ac_help="$ac_help
62     --enable-rlookups   enable reverse lookups (auto)"
63 ac_help="$ac_help
64     --enable-wrappers   enable tcp wrapper support (no)"
65 ac_help="$ac_help
66     --enable-bdb2       enable bdb2 backend (no)"
67 ac_help="$ac_help
68       --with-bdb2-module        module type (static)"
69 ac_help="$ac_help
70     --enable-ldap       enable ldap backend (no)"
71 ac_help="$ac_help
72       --with-ldap-module        module type (static)"
73 ac_help="$ac_help
74     --enable-ldbm       enable ldbm backend (yes)"
75 ac_help="$ac_help
76       --with-ldbm-module        module type (static)"
77 ac_help="$ac_help
78       --with-ldbm-api   use LDBM API (auto)"
79 ac_help="$ac_help
80       --with-ldbm-type  use LDBM type (auto)"
81 ac_help="$ac_help
82     --enable-passwd     enable passwd backend (no)"
83 ac_help="$ac_help
84       --with-passwd-module      module type (static)"
85 ac_help="$ac_help
86     --enable-perl       enable perl backend (no)"
87 ac_help="$ac_help
88       --with-perl-module        module type (static)"
89 ac_help="$ac_help
90     --enable-shell      enable shell backend (no)"
91 ac_help="$ac_help
92       --with-shell-module       module type (static)"
93 ac_help="$ac_help
94     --enable-tcl        enable tcl backend (no)"
95 ac_help="$ac_help
96       --with-tcl-module module type (static)"
97 ac_help="$ac_help
98 SLURPD Options:"
99 ac_help="$ac_help
100   --enable-slurpd       enable building slurpd (auto)"
101 ac_help="$ac_help
102 Library Generation & Linking Options"
103 ac_help="$ac_help
104   --enable-static[=PKGS]  build static libraries [default=yes]"
105 ac_help="$ac_help
106   --enable-shared[=PKGS]  build shared libraries [default=yes]"
107 ac_help="$ac_help
108   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
109 ac_help="$ac_help
110   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
111 ac_help="$ac_help
112   --disable-libtool-lock  avoid locking (might break parallel builds)"
113
114 # Initialize some variables set by options.
115 # The variables have the same names as the options, with
116 # dashes changed to underlines.
117 build=NONE
118 cache_file=./config.cache
119 exec_prefix=NONE
120 host=NONE
121 no_create=
122 nonopt=NONE
123 no_recursion=
124 prefix=NONE
125 program_prefix=NONE
126 program_suffix=NONE
127 program_transform_name=s,x,x,
128 silent=
129 site=
130 srcdir=
131 target=NONE
132 verbose=
133 x_includes=NONE
134 x_libraries=NONE
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Initialize some other variables.
149 subdirs=
150 MFLAGS= MAKEFLAGS=
151 SHELL=${CONFIG_SHELL-/bin/sh}
152 # Maximum number of lines to put in a shell here document.
153 ac_max_here_lines=12
154
155 ac_prev=
156 for ac_option
157 do
158
159   # If the previous option needs an argument, assign it.
160   if test -n "$ac_prev"; then
161     eval "$ac_prev=\$ac_option"
162     ac_prev=
163     continue
164   fi
165
166   case "$ac_option" in
167   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
168   *) ac_optarg= ;;
169   esac
170
171   # Accept the important Cygnus configure options, so we can diagnose typos.
172
173   case "$ac_option" in
174
175   -bindir | --bindir | --bindi | --bind | --bin | --bi)
176     ac_prev=bindir ;;
177   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
178     bindir="$ac_optarg" ;;
179
180   -build | --build | --buil | --bui | --bu)
181     ac_prev=build ;;
182   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
183     build="$ac_optarg" ;;
184
185   -cache-file | --cache-file | --cache-fil | --cache-fi \
186   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
187     ac_prev=cache_file ;;
188   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
189   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
190     cache_file="$ac_optarg" ;;
191
192   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193     ac_prev=datadir ;;
194   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195   | --da=*)
196     datadir="$ac_optarg" ;;
197
198   -disable-* | --disable-*)
199     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
200     # Reject names that are not valid shell variable names.
201     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
202       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
203     fi
204     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
205     eval "enable_${ac_feature}=no" ;;
206
207   -enable-* | --enable-*)
208     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
209     # Reject names that are not valid shell variable names.
210     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
211       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
212     fi
213     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
214     case "$ac_option" in
215       *=*) ;;
216       *) ac_optarg=yes ;;
217     esac
218     eval "enable_${ac_feature}='$ac_optarg'" ;;
219
220   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
221   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
222   | --exec | --exe | --ex)
223     ac_prev=exec_prefix ;;
224   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
225   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
226   | --exec=* | --exe=* | --ex=*)
227     exec_prefix="$ac_optarg" ;;
228
229   -gas | --gas | --ga | --g)
230     # Obsolete; use --with-gas.
231     with_gas=yes ;;
232
233   -help | --help | --hel | --he)
234     # Omit some internal or obsolete options to make the list less imposing.
235     # This message is too long to be a string in the A/UX 3.1 sh.
236     cat << EOF
237 Usage: configure [options] [host]
238 Options: [defaults in brackets after descriptions]
239 Configuration:
240   --cache-file=FILE       cache test results in FILE
241   --help                  print this message
242   --no-create             do not create output files
243   --quiet, --silent       do not print \`checking...' messages
244   --version               print the version of autoconf that created configure
245 Directory and file names:
246   --prefix=PREFIX         install architecture-independent files in PREFIX
247                           [$ac_default_prefix]
248   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
249                           [same as prefix]
250   --bindir=DIR            user executables in DIR [EPREFIX/bin]
251   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
252   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
253   --datadir=DIR           read-only architecture-independent data in DIR
254                           [PREFIX/share]
255   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
256   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
257                           [PREFIX/com]
258   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
259   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
260   --includedir=DIR        C header files in DIR [PREFIX/include]
261   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
262   --infodir=DIR           info documentation in DIR [PREFIX/info]
263   --mandir=DIR            man documentation in DIR [PREFIX/man]
264   --srcdir=DIR            find the sources in DIR [configure dir or ..]
265   --program-prefix=PREFIX prepend PREFIX to installed program names
266   --program-suffix=SUFFIX append SUFFIX to installed program names
267   --program-transform-name=PROGRAM
268                           run sed PROGRAM on installed program names
269 EOF
270     cat << EOF
271 Host type:
272   --build=BUILD           configure for building on BUILD [BUILD=HOST]
273   --host=HOST             configure for HOST [guessed]
274   --target=TARGET         configure for TARGET [TARGET=HOST]
275 Features and packages:
276   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
277   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
278   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
279   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
280   --x-includes=DIR        X include files are in DIR
281   --x-libraries=DIR       X library files are in DIR
282 EOF
283     if test -n "$ac_help"; then
284       echo "--enable and --with options recognized:$ac_help"
285     fi
286     exit 0 ;;
287
288   -host | --host | --hos | --ho)
289     ac_prev=host ;;
290   -host=* | --host=* | --hos=* | --ho=*)
291     host="$ac_optarg" ;;
292
293   -includedir | --includedir | --includedi | --included | --include \
294   | --includ | --inclu | --incl | --inc)
295     ac_prev=includedir ;;
296   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
297   | --includ=* | --inclu=* | --incl=* | --inc=*)
298     includedir="$ac_optarg" ;;
299
300   -infodir | --infodir | --infodi | --infod | --info | --inf)
301     ac_prev=infodir ;;
302   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
303     infodir="$ac_optarg" ;;
304
305   -libdir | --libdir | --libdi | --libd)
306     ac_prev=libdir ;;
307   -libdir=* | --libdir=* | --libdi=* | --libd=*)
308     libdir="$ac_optarg" ;;
309
310   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
311   | --libexe | --libex | --libe)
312     ac_prev=libexecdir ;;
313   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
314   | --libexe=* | --libex=* | --libe=*)
315     libexecdir="$ac_optarg" ;;
316
317   -localstatedir | --localstatedir | --localstatedi | --localstated \
318   | --localstate | --localstat | --localsta | --localst \
319   | --locals | --local | --loca | --loc | --lo)
320     ac_prev=localstatedir ;;
321   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
322   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
323   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
324     localstatedir="$ac_optarg" ;;
325
326   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
327     ac_prev=mandir ;;
328   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
329     mandir="$ac_optarg" ;;
330
331   -nfp | --nfp | --nf)
332     # Obsolete; use --without-fp.
333     with_fp=no ;;
334
335   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
336   | --no-cr | --no-c)
337     no_create=yes ;;
338
339   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
340   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
341     no_recursion=yes ;;
342
343   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
344   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
345   | --oldin | --oldi | --old | --ol | --o)
346     ac_prev=oldincludedir ;;
347   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
348   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
349   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
350     oldincludedir="$ac_optarg" ;;
351
352   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
353     ac_prev=prefix ;;
354   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
355     prefix="$ac_optarg" ;;
356
357   -program-prefix | --program-prefix | --program-prefi | --program-pref \
358   | --program-pre | --program-pr | --program-p)
359     ac_prev=program_prefix ;;
360   -program-prefix=* | --program-prefix=* | --program-prefi=* \
361   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
362     program_prefix="$ac_optarg" ;;
363
364   -program-suffix | --program-suffix | --program-suffi | --program-suff \
365   | --program-suf | --program-su | --program-s)
366     ac_prev=program_suffix ;;
367   -program-suffix=* | --program-suffix=* | --program-suffi=* \
368   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
369     program_suffix="$ac_optarg" ;;
370
371   -program-transform-name | --program-transform-name \
372   | --program-transform-nam | --program-transform-na \
373   | --program-transform-n | --program-transform- \
374   | --program-transform | --program-transfor \
375   | --program-transfo | --program-transf \
376   | --program-trans | --program-tran \
377   | --progr-tra | --program-tr | --program-t)
378     ac_prev=program_transform_name ;;
379   -program-transform-name=* | --program-transform-name=* \
380   | --program-transform-nam=* | --program-transform-na=* \
381   | --program-transform-n=* | --program-transform-=* \
382   | --program-transform=* | --program-transfor=* \
383   | --program-transfo=* | --program-transf=* \
384   | --program-trans=* | --program-tran=* \
385   | --progr-tra=* | --program-tr=* | --program-t=*)
386     program_transform_name="$ac_optarg" ;;
387
388   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
389   | -silent | --silent | --silen | --sile | --sil)
390     silent=yes ;;
391
392   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
393     ac_prev=sbindir ;;
394   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
395   | --sbi=* | --sb=*)
396     sbindir="$ac_optarg" ;;
397
398   -sharedstatedir | --sharedstatedir | --sharedstatedi \
399   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
400   | --sharedst | --shareds | --shared | --share | --shar \
401   | --sha | --sh)
402     ac_prev=sharedstatedir ;;
403   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
404   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
405   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
406   | --sha=* | --sh=*)
407     sharedstatedir="$ac_optarg" ;;
408
409   -site | --site | --sit)
410     ac_prev=site ;;
411   -site=* | --site=* | --sit=*)
412     site="$ac_optarg" ;;
413
414   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
415     ac_prev=srcdir ;;
416   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
417     srcdir="$ac_optarg" ;;
418
419   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
420   | --syscon | --sysco | --sysc | --sys | --sy)
421     ac_prev=sysconfdir ;;
422   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
423   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
424     sysconfdir="$ac_optarg" ;;
425
426   -target | --target | --targe | --targ | --tar | --ta | --t)
427     ac_prev=target ;;
428   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
429     target="$ac_optarg" ;;
430
431   -v | -verbose | --verbose | --verbos | --verbo | --verb)
432     verbose=yes ;;
433
434   -version | --version | --versio | --versi | --vers)
435     echo "configure generated by autoconf version 2.13.1"
436     exit 0 ;;
437
438   -with-* | --with-*)
439     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
440     # Reject names that are not valid shell variable names.
441     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
442       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
443     fi
444     ac_package=`echo $ac_package| sed 's/-/_/g'`
445     case "$ac_option" in
446       *=*) ;;
447       *) ac_optarg=yes ;;
448     esac
449     eval "with_${ac_package}='$ac_optarg'" ;;
450
451   -without-* | --without-*)
452     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
453     # Reject names that are not valid shell variable names.
454     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
455       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
456     fi
457     ac_package=`echo $ac_package| sed 's/-/_/g'`
458     eval "with_${ac_package}=no" ;;
459
460   --x)
461     # Obsolete; use --with-x.
462     with_x=yes ;;
463
464   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
465   | --x-incl | --x-inc | --x-in | --x-i)
466     ac_prev=x_includes ;;
467   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
468   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
469     x_includes="$ac_optarg" ;;
470
471   -x-libraries | --x-libraries | --x-librarie | --x-librari \
472   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
473     ac_prev=x_libraries ;;
474   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
475   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
476     x_libraries="$ac_optarg" ;;
477
478   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
479     ;;
480
481   *)
482     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
483       echo "configure: warning: $ac_option: invalid host type" 1>&2
484     fi
485     if test "x$nonopt" != xNONE; then
486       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
487     fi
488     nonopt="$ac_option"
489     ;;
490
491   esac
492 done
493
494 if test -n "$ac_prev"; then
495   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
496 fi
497
498 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
499
500 # File descriptor usage:
501 # 0 standard input
502 # 1 file creation
503 # 2 errors and warnings
504 # 3 some systems may open it to /dev/tty
505 # 4 used on the Kubota Titan
506 # 6 checking for... messages and results
507 # 5 compiler messages saved in config.log
508 if test "$silent" = yes; then
509   exec 6>/dev/null
510 else
511   exec 6>&1
512 fi
513 exec 5>./config.log
514
515 echo "\
516 This file contains any messages produced by compilers while
517 running configure, to aid debugging if configure makes a mistake.
518 " 1>&5
519
520 # Strip out --no-create and --no-recursion so they do not pile up.
521 # Also quote any args containing shell metacharacters.
522 ac_configure_args=
523 for ac_arg
524 do
525   case "$ac_arg" in
526   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
527   | --no-cr | --no-c) ;;
528   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
529   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
530   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
531   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
532   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
533   esac
534 done
535
536 # NLS nuisances.
537 # Only set these to C if already set.  These must not be set unconditionally
538 # because not all systems understand e.g. LANG=C (notably SCO).
539 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
540 # Non-C LC_CTYPE values break the ctype check.
541 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
542 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
543 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
544 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
545
546 # confdefs.h avoids OS command line length limits that DEFS can exceed.
547 rm -rf conftest* confdefs.h
548 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
549 echo > confdefs.h
550
551 # A filename unique to this package, relative to the directory that
552 # configure is in, which we can look for to find out if srcdir is correct.
553 ac_unique_file=build/version
554
555 # Find the source files, if location was not specified.
556 if test -z "$srcdir"; then
557   ac_srcdir_defaulted=yes
558   # Try the directory containing this script, then its parent.
559   ac_prog=$0
560   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
561   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
562   srcdir=$ac_confdir
563   if test ! -r $srcdir/$ac_unique_file; then
564     srcdir=..
565   fi
566 else
567   ac_srcdir_defaulted=no
568 fi
569 if test ! -r $srcdir/$ac_unique_file; then
570   if test "$ac_srcdir_defaulted" = yes; then
571     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
572   else
573     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
574   fi
575 fi
576 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
577
578 # Prefer explicitly selected file to automatically selected ones.
579 if test -z "$CONFIG_SITE"; then
580   if test "x$prefix" != xNONE; then
581     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
582   else
583     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
584   fi
585 fi
586 for ac_site_file in $CONFIG_SITE; do
587   if test -r "$ac_site_file"; then
588     echo "loading site script $ac_site_file"
589     . "$ac_site_file"
590   fi
591 done
592
593
594 ac_ext=c
595 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
596 ac_cpp='$CPP $CPPFLAGS'
597 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
598 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
599 cross_compiling=$ac_cv_prog_cc_cross
600
601 ac_exeext=
602 ac_objext=o
603 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
604   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
605   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
606     ac_n= ac_c='
607 ' ac_t='        '
608   else
609     ac_n=-n ac_c= ac_t=
610   fi
611 else
612   ac_n= ac_c='\c' ac_t=
613 fi
614
615 ac_aux_dir=
616 for ac_dir in build $srcdir/build; do
617   if test -f $ac_dir/install-sh; then
618     ac_aux_dir=$ac_dir
619     ac_install_sh="$ac_aux_dir/install-sh -c"
620     break
621   elif 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   fi
626 done
627 if test -z "$ac_aux_dir"; then
628   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
629 fi
630 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
631 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
632 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
633
634 OL_VERSION=`cat $ac_aux_dir/version`
635 if test -z "$OL_VERSION"; then
636         { echo "configure: error: could not determine version" 1>&2; exit 1; }
637 fi
638
639
640 echo $ac_n "checking host system type""... $ac_c" 1>&6
641 echo "configure:642: checking host system type" >&5
642 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
643
644 # Make sure we can run config.sub.
645   if $ac_config_sub sun4 >/dev/null 2>&1; then :
646     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
647   fi
648
649   ac_cv_host_alias=$host
650   case "$ac_cv_host_alias" in
651   NONE)
652     case $nonopt in
653     NONE)
654       if ac_cv_host_alias=`$ac_config_guess`; then :
655       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
656       fi ;;
657     *) ac_cv_host_alias=$nonopt ;;
658     esac ;;
659   esac
660
661   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
662   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
663   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
664   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
665 else
666   echo $ac_n "(cached) $ac_c" 1>&6
667 fi
668
669 echo "$ac_t""$ac_cv_host" 1>&6
670
671 host=$ac_cv_host
672 host_alias=$ac_cv_host_alias
673 host_cpu=$ac_cv_host_cpu
674 host_vendor=$ac_cv_host_vendor
675 host_os=$ac_cv_host_os
676
677
678
679
680
681 echo $ac_n "checking target system type""... $ac_c" 1>&6
682 echo "configure:683: checking target system type" >&5
683 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
684
685 # Make sure we can run config.sub.
686   if $ac_config_sub sun4 >/dev/null 2>&1; then :
687     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
688   fi
689
690   ac_cv_target_alias=$target
691   case "$ac_cv_target_alias" in
692   NONE)
693     case $nonopt in
694     NONE)
695       ac_cv_target_alias=$host_alias ;;
696
697     *) ac_cv_target_alias=$nonopt ;;
698     esac ;;
699   esac
700
701   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
702   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
703   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
704   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
705 else
706   echo $ac_n "(cached) $ac_c" 1>&6
707 fi
708
709 echo "$ac_t""$ac_cv_target" 1>&6
710
711 target=$ac_cv_target
712 target_alias=$ac_cv_target_alias
713 target_cpu=$ac_cv_target_cpu
714 target_vendor=$ac_cv_target_vendor
715 target_os=$ac_cv_target_os
716
717
718
719
720
721 echo $ac_n "checking build system type""... $ac_c" 1>&6
722 echo "configure:723: checking build system type" >&5
723 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
724
725 # Make sure we can run config.sub.
726   if $ac_config_sub sun4 >/dev/null 2>&1; then :
727     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
728   fi
729
730   ac_cv_build_alias=$build
731   case "$ac_cv_build_alias" in
732   NONE)
733     case $nonopt in
734     NONE)
735       ac_cv_build_alias=$host_alias ;;
736
737     *) ac_cv_build_alias=$nonopt ;;
738     esac ;;
739   esac
740
741   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
742   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
743   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
744   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
745 else
746   echo $ac_n "(cached) $ac_c" 1>&6
747 fi
748
749 echo "$ac_t""$ac_cv_build" 1>&6
750
751 build=$ac_cv_build
752 build_alias=$ac_cv_build_alias
753 build_cpu=$ac_cv_build_cpu
754 build_vendor=$ac_cv_build_vendor
755 build_os=$ac_cv_build_os
756
757
758
759
760
761 # Do some error checking and defaulting for the host and target type.
762 # The inputs are:
763 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
764 #
765 # The rules are:
766 # 1. You are not allowed to specify --host, --target, and nonopt at the
767 #    same time.
768 # 2. Host defaults to nonopt.
769 # 3. If nonopt is not specified, then host defaults to the current host,
770 #    as determined by config.guess.
771 # 4. Target and build default to nonopt.
772 # 5. If nonopt is not specified, then target and build default to host.
773
774 # The aliases save the names the user supplied, while $host etc.
775 # will get canonicalized.
776 case $host---$target---$nonopt in
777 NONE---*---* | *---NONE---* | *---*---NONE) ;;
778 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
779 esac
780
781 test "$host_alias" != "$target_alias" &&
782   test "$program_prefix$program_suffix$program_transform_name" = \
783     NONENONEs,x,x, &&
784   program_prefix=${target_alias}-
785
786
787 # Find a good install program.  We prefer a C program (faster),
788 # so one script is as good as another.  But avoid the broken or
789 # incompatible versions:
790 # SysV /etc/install, /usr/sbin/install
791 # SunOS /usr/etc/install
792 # IRIX /sbin/install
793 # AIX /bin/install
794 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
795 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
796 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
797 # ./install, which can be erroneously created by make from ./install.sh.
798 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
799 echo "configure:800: checking for a BSD compatible install" >&5
800 if test -z "$INSTALL"; then
801 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
802   echo $ac_n "(cached) $ac_c" 1>&6
803 else
804     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
805   for ac_dir in $PATH; do
806     # Account for people who put trailing slashes in PATH elements.
807     case "$ac_dir/" in
808     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
809     *)
810       # OSF1 and SCO ODT 3.0 have their own names for install.
811       # Don't use installbsd from OSF since it installs stuff as root
812       # by default.
813       for ac_prog in ginstall scoinst install; do
814         if test -f $ac_dir/$ac_prog; then
815           if test $ac_prog = install &&
816             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
817             # AIX install.  It has an incompatible calling convention.
818             :
819           elif test $ac_prog = install &&
820             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
821             # program-specific install script used by HP pwplus--don't use.
822             :
823           else
824             ac_cv_path_install="$ac_dir/$ac_prog -c"
825             break 2
826           fi
827         fi
828       done
829       ;;
830     esac
831   done
832   IFS="$ac_save_IFS"
833
834 fi
835   if test "${ac_cv_path_install+set}" = set; then
836     INSTALL="$ac_cv_path_install"
837   else
838     # As a last resort, use the slow shell script.  We don't cache a
839     # path for INSTALL within a source directory, because that will
840     # break other packages using the cache if that directory is
841     # removed, or if the path is relative.
842     INSTALL="$ac_install_sh"
843   fi
844 fi
845 echo "$ac_t""$INSTALL" 1>&6
846
847 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
848 # It thinks the first close brace ends the variable substitution.
849 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
850
851 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
852
853 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
854
855 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
856 echo "configure:857: checking whether build environment is sane" >&5
857 # Just in case
858 sleep 1
859 echo timestamp > conftestfile
860 # Do `set' in a subshell so we don't clobber the current shell's
861 # arguments.  Must try -L first in case configure is actually a
862 # symlink; some systems play weird games with the mod time of symlinks
863 # (eg FreeBSD returns the mod time of the symlink's containing
864 # directory).
865 if (
866    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
867    if test "$*" = "X"; then
868       # -L didn't work.
869       set X `ls -t $srcdir/configure conftestfile`
870    fi
871    if test "$*" != "X $srcdir/configure conftestfile" \
872       && test "$*" != "X conftestfile $srcdir/configure"; then
873
874       # If neither matched, then we have a broken ls.  This can happen
875       # if, for instance, CONFIG_SHELL is bash and it inherits a
876       # broken ls alias from the environment.  This has actually
877       # happened.  Such a system could not be considered "sane".
878       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
879 alias in your environment" 1>&2; exit 1; }
880    fi
881
882    test "$2" = conftestfile
883    )
884 then
885    # Ok.
886    :
887 else
888    { echo "configure: error: newly created file is older than distributed files!
889 Check your system clock" 1>&2; exit 1; }
890 fi
891 rm -f conftest*
892 echo "$ac_t""yes" 1>&6
893 if test "$program_transform_name" = s,x,x,; then
894   program_transform_name=
895 else
896   # Double any \ or $.  echo might interpret backslashes.
897   cat <<\EOF_SED > conftestsed
898 s,\\,\\\\,g; s,\$,$$,g
899 EOF_SED
900   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
901   rm -f conftestsed
902 fi
903 test "$program_prefix" != NONE &&
904   program_transform_name="s,^,${program_prefix},;$program_transform_name"
905 # Use a double $ so make ignores it.
906 test "$program_suffix" != NONE &&
907   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
908
909 # sed with no file args requires a program.
910 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
911
912 for ac_prog in mawk gawk nawk awk
913 do
914 # Extract the first word of "$ac_prog", so it can be a program name with args.
915 set dummy $ac_prog; ac_word=$2
916 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
917 echo "configure:918: checking for $ac_word" >&5
918 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
919   echo $ac_n "(cached) $ac_c" 1>&6
920 else
921   if test -n "$AWK"; then
922   ac_cv_prog_AWK="$AWK" # Let the user override the test.
923 else
924   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
925   ac_dummy="$PATH"
926   for ac_dir in $ac_dummy; do
927     test -z "$ac_dir" && ac_dir=.
928     if test -f $ac_dir/$ac_word; then
929       ac_cv_prog_AWK="$ac_prog"
930       break
931     fi
932   done
933   IFS="$ac_save_ifs"
934 fi
935 fi
936 AWK="$ac_cv_prog_AWK"
937 if test -n "$AWK"; then
938   echo "$ac_t""$AWK" 1>&6
939 else
940   echo "$ac_t""no" 1>&6
941 fi
942
943 test -n "$AWK" && break
944 done
945
946 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
947 echo "configure:948: checking whether ${MAKE-make} sets \${MAKE}" >&5
948 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
949 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
950   echo $ac_n "(cached) $ac_c" 1>&6
951 else
952   cat > conftestmake <<\EOF
953 all:
954         @echo 'ac_maketemp="${MAKE}"'
955 EOF
956 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
957 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
958 if test -n "$ac_maketemp"; then
959   eval ac_cv_prog_make_${ac_make}_set=yes
960 else
961   eval ac_cv_prog_make_${ac_make}_set=no
962 fi
963 rm -f conftestmake
964 fi
965 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
966   echo "$ac_t""yes" 1>&6
967   SET_MAKE=
968 else
969   echo "$ac_t""no" 1>&6
970   SET_MAKE="MAKE=${MAKE-make}"
971 fi
972
973
974
975 PACKAGE=OpenLDAP
976
977 VERSION=$OL_VERSION
978
979 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
980   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
981 fi
982
983
984
985 missing_dir=`cd $ac_aux_dir && pwd`
986 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
987 echo "configure:988: checking for working aclocal" >&5
988 # Run test in a subshell; some versions of sh will print an error if
989 # an executable is not found, even if stderr is redirected.
990 # Redirect stdin to placate older versions of autoconf.  Sigh.
991 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
992    ACLOCAL=aclocal
993    echo "$ac_t""found" 1>&6
994 else
995    ACLOCAL="$missing_dir/missing aclocal"
996    echo "$ac_t""missing" 1>&6
997 fi
998
999 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1000 echo "configure:1001: checking for working autoconf" >&5
1001 # Run test in a subshell; some versions of sh will print an error if
1002 # an executable is not found, even if stderr is redirected.
1003 # Redirect stdin to placate older versions of autoconf.  Sigh.
1004 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1005    AUTOCONF=autoconf
1006    echo "$ac_t""found" 1>&6
1007 else
1008    AUTOCONF="$missing_dir/missing autoconf"
1009    echo "$ac_t""missing" 1>&6
1010 fi
1011
1012 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1013 echo "configure:1014: checking for working automake" >&5
1014 # Run test in a subshell; some versions of sh will print an error if
1015 # an executable is not found, even if stderr is redirected.
1016 # Redirect stdin to placate older versions of autoconf.  Sigh.
1017 if (automake --version) < /dev/null > /dev/null 2>&1; then
1018    AUTOMAKE=automake
1019    echo "$ac_t""found" 1>&6
1020 else
1021    AUTOMAKE="$missing_dir/missing automake"
1022    echo "$ac_t""missing" 1>&6
1023 fi
1024
1025 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1026 echo "configure:1027: checking for working autoheader" >&5
1027 # Run test in a subshell; some versions of sh will print an error if
1028 # an executable is not found, even if stderr is redirected.
1029 # Redirect stdin to placate older versions of autoconf.  Sigh.
1030 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1031    AUTOHEADER=autoheader
1032    echo "$ac_t""found" 1>&6
1033 else
1034    AUTOHEADER="$missing_dir/missing autoheader"
1035    echo "$ac_t""missing" 1>&6
1036 fi
1037
1038 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1039 echo "configure:1040: checking for working makeinfo" >&5
1040 # Run test in a subshell; some versions of sh will print an error if
1041 # an executable is not found, even if stderr is redirected.
1042 # Redirect stdin to placate older versions of autoconf.  Sigh.
1043 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1044    MAKEINFO=makeinfo
1045    echo "$ac_t""found" 1>&6
1046 else
1047    MAKEINFO="$missing_dir/missing makeinfo"
1048    echo "$ac_t""missing" 1>&6
1049 fi
1050
1051 install_sh="$missing_dir/install-sh"
1052 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1053
1054 for ac_prog in gnutar gtar tar
1055 do
1056 # Extract the first word of "$ac_prog", so it can be a program name with args.
1057 set dummy $ac_prog; ac_word=$2
1058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1059 echo "configure:1060: checking for $ac_word" >&5
1060 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1061   echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063   if test -n "$AMTAR"; then
1064   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1065 else
1066   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1067   ac_dummy="$PATH"
1068   for ac_dir in $ac_dummy; do
1069     test -z "$ac_dir" && ac_dir=.
1070     if test -f $ac_dir/$ac_word; then
1071       ac_cv_prog_AMTAR="$ac_prog"
1072       break
1073     fi
1074   done
1075   IFS="$ac_save_ifs"
1076 fi
1077 fi
1078 AMTAR="$ac_cv_prog_AMTAR"
1079 if test -n "$AMTAR"; then
1080   echo "$ac_t""$AMTAR" 1>&6
1081 else
1082   echo "$ac_t""no" 1>&6
1083 fi
1084
1085 test -n "$AMTAR" && break
1086 done
1087
1088
1089 AMTARFLAGS=
1090 if test -n "$AMTAR"; then
1091   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1092         AMTARFLAGS=o
1093   fi
1094 fi
1095
1096
1097
1098 cat >> confdefs.h <<EOF
1099 #define OPENLDAP_PACKAGE "$PACKAGE"
1100 EOF
1101
1102 cat >> confdefs.h <<EOF
1103 #define OPENLDAP_VERSION "$VERSION"
1104 EOF
1105
1106
1107
1108
1109 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1110 echo "configure:1111: checking configure arguments" >&5
1111
1112
1113 top_builddir=`pwd`
1114
1115 ldap_subdir="openldap"
1116
1117 # Check whether --with-subdir or --without-subdir was given.
1118 if test "${with_subdir+set}" = set; then
1119   withval="$with_subdir"
1120   
1121         if test "$withval" = "no"; then
1122                 ldap_subdir=""
1123         elif test "$withval" != "yes"; then
1124                 ldap_subdir="$withval"
1125         fi
1126
1127 fi
1128
1129
1130 # OpenLDAP --enable-debug
1131         # Check whether --enable-debug or --disable-debug was given.
1132 if test "${enable_debug+set}" = set; then
1133   enableval="$enable_debug"
1134   
1135         ol_arg=invalid
1136         for ol_val in auto yes no ; do
1137                 if test "$enableval" = "$ol_val" ; then
1138                         ol_arg="$ol_val"
1139                 fi
1140         done
1141         if test "$ol_arg" = "invalid" ; then
1142                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1143         fi
1144         ol_enable_debug="$ol_arg"
1145
1146 else
1147         ol_enable_debug="yes"
1148 fi
1149 # end --enable-debug
1150 # OpenLDAP --enable-syslog
1151         # Check whether --enable-syslog or --disable-syslog was given.
1152 if test "${enable_syslog+set}" = set; then
1153   enableval="$enable_syslog"
1154   
1155         ol_arg=invalid
1156         for ol_val in auto yes no ; do
1157                 if test "$enableval" = "$ol_val" ; then
1158                         ol_arg="$ol_val"
1159                 fi
1160         done
1161         if test "$ol_arg" = "invalid" ; then
1162                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1163         fi
1164         ol_enable_syslog="$ol_arg"
1165
1166 else
1167         ol_enable_syslog="auto"
1168 fi
1169 # end --enable-syslog
1170 # OpenLDAP --enable-proctitle
1171         # Check whether --enable-proctitle or --disable-proctitle was given.
1172 if test "${enable_proctitle+set}" = set; then
1173   enableval="$enable_proctitle"
1174   
1175         ol_arg=invalid
1176         for ol_val in auto yes no ; do
1177                 if test "$enableval" = "$ol_val" ; then
1178                         ol_arg="$ol_val"
1179                 fi
1180         done
1181         if test "$ol_arg" = "invalid" ; then
1182                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1183         fi
1184         ol_enable_proctitle="$ol_arg"
1185
1186 else
1187         ol_enable_proctitle="yes"
1188 fi
1189 # end --enable-proctitle
1190 # OpenLDAP --enable-cache
1191         # Check whether --enable-cache or --disable-cache was given.
1192 if test "${enable_cache+set}" = set; then
1193   enableval="$enable_cache"
1194   
1195         ol_arg=invalid
1196         for ol_val in auto yes no ; do
1197                 if test "$enableval" = "$ol_val" ; then
1198                         ol_arg="$ol_val"
1199                 fi
1200         done
1201         if test "$ol_arg" = "invalid" ; then
1202                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1203         fi
1204         ol_enable_cache="$ol_arg"
1205
1206 else
1207         ol_enable_cache="yes"
1208 fi
1209 # end --enable-cache
1210 # OpenLDAP --enable-dns
1211         # Check whether --enable-dns or --disable-dns was given.
1212 if test "${enable_dns+set}" = set; then
1213   enableval="$enable_dns"
1214   
1215         ol_arg=invalid
1216         for ol_val in auto yes no ; do
1217                 if test "$enableval" = "$ol_val" ; then
1218                         ol_arg="$ol_val"
1219                 fi
1220         done
1221         if test "$ol_arg" = "invalid" ; then
1222                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1223         fi
1224         ol_enable_dns="$ol_arg"
1225
1226 else
1227         ol_enable_dns="no"
1228 fi
1229 # end --enable-dns
1230 # OpenLDAP --enable-referrals
1231         # Check whether --enable-referrals or --disable-referrals was given.
1232 if test "${enable_referrals+set}" = set; then
1233   enableval="$enable_referrals"
1234   
1235         ol_arg=invalid
1236         for ol_val in auto yes no ; do
1237                 if test "$enableval" = "$ol_val" ; then
1238                         ol_arg="$ol_val"
1239                 fi
1240         done
1241         if test "$ol_arg" = "invalid" ; then
1242                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1243         fi
1244         ol_enable_referrals="$ol_arg"
1245
1246 else
1247         ol_enable_referrals="yes"
1248 fi
1249 # end --enable-referrals
1250 # OpenLDAP --enable-cldap
1251         # Check whether --enable-cldap or --disable-cldap was given.
1252 if test "${enable_cldap+set}" = set; then
1253   enableval="$enable_cldap"
1254   
1255         ol_arg=invalid
1256         for ol_val in auto yes no ; do
1257                 if test "$enableval" = "$ol_val" ; then
1258                         ol_arg="$ol_val"
1259                 fi
1260         done
1261         if test "$ol_arg" = "invalid" ; then
1262                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1263         fi
1264         ol_enable_cldap="$ol_arg"
1265
1266 else
1267         ol_enable_cldap="no"
1268 fi
1269 # end --enable-cldap
1270 # OpenLDAP --enable-x_compile
1271         # Check whether --enable-x_compile or --disable-x_compile was given.
1272 if test "${enable_x_compile+set}" = set; then
1273   enableval="$enable_x_compile"
1274   
1275         ol_arg=invalid
1276         for ol_val in yes no ; do
1277                 if test "$enableval" = "$ol_val" ; then
1278                         ol_arg="$ol_val"
1279                 fi
1280         done
1281         if test "$ol_arg" = "invalid" ; then
1282                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1283         fi
1284         ol_enable_x_compile="$ol_arg"
1285
1286 else
1287         ol_enable_x_compile="no"
1288 fi
1289 # end --enable-x_compile
1290
1291 # OpenLDAP --enable-dmalloc
1292         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1293 if test "${enable_dmalloc+set}" = set; then
1294   enableval="$enable_dmalloc"
1295   
1296         ol_arg=invalid
1297         for ol_val in auto yes no ; do
1298                 if test "$enableval" = "$ol_val" ; then
1299                         ol_arg="$ol_val"
1300                 fi
1301         done
1302         if test "$ol_arg" = "invalid" ; then
1303                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1304         fi
1305         ol_enable_dmalloc="$ol_arg"
1306
1307 else
1308         ol_enable_dmalloc="no"
1309 fi
1310 # end --enable-dmalloc
1311
1312 # OpenLDAP --with-kerberos
1313         # Check whether --with-kerberos or --without-kerberos was given.
1314 if test "${with_kerberos+set}" = set; then
1315   withval="$with_kerberos"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto k5 k4 afs yes no ; do
1319                 if test "$withval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1325         fi
1326         ol_with_kerberos="$ol_arg"
1327
1328 else
1329         ol_with_kerberos="auto"
1330 fi
1331 # end --with-kerberos
1332
1333 # OpenLDAP --with-readline
1334         # Check whether --with-readline or --without-readline was given.
1335 if test "${with_readline+set}" = set; then
1336   withval="$with_readline"
1337   
1338         ol_arg=invalid
1339         for ol_val in auto yes no  ; do
1340                 if test "$withval" = "$ol_val" ; then
1341                         ol_arg="$ol_val"
1342                 fi
1343         done
1344         if test "$ol_arg" = "invalid" ; then
1345                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1346         fi
1347         ol_with_readline="$ol_arg"
1348
1349 else
1350         ol_with_readline="auto"
1351 fi
1352 # end --with-readline
1353
1354 # OpenLDAP --with-threads
1355         # Check whether --with-threads or --without-threads was given.
1356 if test "${with_threads+set}" = set; then
1357   withval="$with_threads"
1358   
1359         ol_arg=invalid
1360         for ol_val in auto posix mach lwp yes no manual  ; do
1361                 if test "$withval" = "$ol_val" ; then
1362                         ol_arg="$ol_val"
1363                 fi
1364         done
1365         if test "$ol_arg" = "invalid" ; then
1366                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1367         fi
1368         ol_with_threads="$ol_arg"
1369
1370 else
1371         ol_with_threads="auto"
1372 fi
1373 # end --with-threads
1374
1375 # OpenLDAP --with-tls
1376         # Check whether --with-tls or --without-tls was given.
1377 if test "${with_tls+set}" = set; then
1378   withval="$with_tls"
1379   
1380         ol_arg=invalid
1381         for ol_val in auto ssleay openssl yes no  ; do
1382                 if test "$withval" = "$ol_val" ; then
1383                         ol_arg="$ol_val"
1384                 fi
1385         done
1386         if test "$ol_arg" = "invalid" ; then
1387                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1388         fi
1389         ol_with_tls="$ol_arg"
1390
1391 else
1392         ol_with_tls="auto"
1393 fi
1394 # end --with-tls
1395
1396 # OpenLDAP --with-yielding_select
1397         # Check whether --with-yielding_select or --without-yielding_select was given.
1398 if test "${with_yielding_select+set}" = set; then
1399   withval="$with_yielding_select"
1400   
1401         ol_arg=invalid
1402         for ol_val in auto yes no manual  ; do
1403                 if test "$withval" = "$ol_val" ; then
1404                         ol_arg="$ol_val"
1405                 fi
1406         done
1407         if test "$ol_arg" = "invalid" ; then
1408                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1409         fi
1410         ol_with_yielding_select="$ol_arg"
1411
1412 else
1413         ol_with_yielding_select="auto"
1414 fi
1415 # end --with-yielding_select
1416
1417
1418
1419 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1420 if test "${with_xxldapdoptions+set}" = set; then
1421   withval="$with_xxldapdoptions"
1422   :
1423 fi
1424
1425 # OpenLDAP --enable-ldapd
1426         # Check whether --enable-ldapd or --disable-ldapd was given.
1427 if test "${enable_ldapd+set}" = set; then
1428   enableval="$enable_ldapd"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto yes no ; do
1432                 if test "$enableval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1438         fi
1439         ol_enable_ldapd="$ol_arg"
1440
1441 else
1442         ol_enable_ldapd="no"
1443 fi
1444 # end --enable-ldapd
1445
1446 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1447 if test "${with_xxslapdoptions+set}" = set; then
1448   withval="$with_xxslapdoptions"
1449   :
1450 fi
1451
1452 # OpenLDAP --enable-slapd
1453         # Check whether --enable-slapd or --disable-slapd was given.
1454 if test "${enable_slapd+set}" = set; then
1455   enableval="$enable_slapd"
1456   
1457         ol_arg=invalid
1458         for ol_val in auto yes no ; do
1459                 if test "$enableval" = "$ol_val" ; then
1460                         ol_arg="$ol_val"
1461                 fi
1462         done
1463         if test "$ol_arg" = "invalid" ; then
1464                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1465         fi
1466         ol_enable_slapd="$ol_arg"
1467
1468 else
1469         ol_enable_slapd="yes"
1470 fi
1471 # end --enable-slapd
1472 # OpenLDAP --enable-cleartext
1473         # Check whether --enable-cleartext or --disable-cleartext was given.
1474 if test "${enable_cleartext+set}" = set; then
1475   enableval="$enable_cleartext"
1476   
1477         ol_arg=invalid
1478         for ol_val in auto yes no ; do
1479                 if test "$enableval" = "$ol_val" ; then
1480                         ol_arg="$ol_val"
1481                 fi
1482         done
1483         if test "$ol_arg" = "invalid" ; then
1484                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1485         fi
1486         ol_enable_cleartext="$ol_arg"
1487
1488 else
1489         ol_enable_cleartext="yes"
1490 fi
1491 # end --enable-cleartext
1492 # OpenLDAP --enable-crypt
1493         # Check whether --enable-crypt or --disable-crypt was given.
1494 if test "${enable_crypt+set}" = set; then
1495   enableval="$enable_crypt"
1496   
1497         ol_arg=invalid
1498         for ol_val in auto yes no ; do
1499                 if test "$enableval" = "$ol_val" ; then
1500                         ol_arg="$ol_val"
1501                 fi
1502         done
1503         if test "$ol_arg" = "invalid" ; then
1504                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1505         fi
1506         ol_enable_crypt="$ol_arg"
1507
1508 else
1509         ol_enable_crypt="auto"
1510 fi
1511 # end --enable-crypt
1512 # OpenLDAP --enable-modules
1513         # Check whether --enable-modules or --disable-modules was given.
1514 if test "${enable_modules+set}" = set; then
1515   enableval="$enable_modules"
1516   
1517         ol_arg=invalid
1518         for ol_val in auto yes no ; do
1519                 if test "$enableval" = "$ol_val" ; then
1520                         ol_arg="$ol_val"
1521                 fi
1522         done
1523         if test "$ol_arg" = "invalid" ; then
1524                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1525         fi
1526         ol_enable_modules="$ol_arg"
1527
1528 else
1529         ol_enable_modules="no"
1530 fi
1531 # end --enable-modules
1532 # OpenLDAP --enable-phonetic
1533         # Check whether --enable-phonetic or --disable-phonetic was given.
1534 if test "${enable_phonetic+set}" = set; then
1535   enableval="$enable_phonetic"
1536   
1537         ol_arg=invalid
1538         for ol_val in auto yes no ; do
1539                 if test "$enableval" = "$ol_val" ; then
1540                         ol_arg="$ol_val"
1541                 fi
1542         done
1543         if test "$ol_arg" = "invalid" ; then
1544                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1545         fi
1546         ol_enable_phonetic="$ol_arg"
1547
1548 else
1549         ol_enable_phonetic="no"
1550 fi
1551 # end --enable-phonetic
1552 # OpenLDAP --enable-rlookups
1553         # Check whether --enable-rlookups or --disable-rlookups was given.
1554 if test "${enable_rlookups+set}" = set; then
1555   enableval="$enable_rlookups"
1556   
1557         ol_arg=invalid
1558         for ol_val in auto yes no ; do
1559                 if test "$enableval" = "$ol_val" ; then
1560                         ol_arg="$ol_val"
1561                 fi
1562         done
1563         if test "$ol_arg" = "invalid" ; then
1564                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1565         fi
1566         ol_enable_rlookups="$ol_arg"
1567
1568 else
1569         ol_enable_rlookups="auto"
1570 fi
1571 # end --enable-rlookups
1572 # OpenLDAP --enable-wrappers
1573         # Check whether --enable-wrappers or --disable-wrappers was given.
1574 if test "${enable_wrappers+set}" = set; then
1575   enableval="$enable_wrappers"
1576   
1577         ol_arg=invalid
1578         for ol_val in auto yes no ; do
1579                 if test "$enableval" = "$ol_val" ; then
1580                         ol_arg="$ol_val"
1581                 fi
1582         done
1583         if test "$ol_arg" = "invalid" ; then
1584                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1585         fi
1586         ol_enable_wrappers="$ol_arg"
1587
1588 else
1589         ol_enable_wrappers="no"
1590 fi
1591 # end --enable-wrappers
1592
1593 # OpenLDAP --enable-bdb2
1594         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1595 if test "${enable_bdb2+set}" = set; then
1596   enableval="$enable_bdb2"
1597   
1598         ol_arg=invalid
1599         for ol_val in auto yes no ; do
1600                 if test "$enableval" = "$ol_val" ; then
1601                         ol_arg="$ol_val"
1602                 fi
1603         done
1604         if test "$ol_arg" = "invalid" ; then
1605                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1606         fi
1607         ol_enable_bdb2="$ol_arg"
1608
1609 else
1610         ol_enable_bdb2="no"
1611 fi
1612 # end --enable-bdb2
1613 # OpenLDAP --with-bdb2_module
1614         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1615 if test "${with_bdb2_module+set}" = set; then
1616   withval="$with_bdb2_module"
1617   
1618         ol_arg=invalid
1619         for ol_val in static dynamic ; do
1620                 if test "$withval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1626         fi
1627         ol_with_bdb2_module="$ol_arg"
1628
1629 else
1630         ol_with_bdb2_module="static"
1631 fi
1632 # end --with-bdb2_module
1633
1634 # OpenLDAP --enable-ldap
1635         # Check whether --enable-ldap or --disable-ldap was given.
1636 if test "${enable_ldap+set}" = set; then
1637   enableval="$enable_ldap"
1638   
1639         ol_arg=invalid
1640         for ol_val in auto yes no ; do
1641                 if test "$enableval" = "$ol_val" ; then
1642                         ol_arg="$ol_val"
1643                 fi
1644         done
1645         if test "$ol_arg" = "invalid" ; then
1646                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1647         fi
1648         ol_enable_ldap="$ol_arg"
1649
1650 else
1651         ol_enable_ldap="no"
1652 fi
1653 # end --enable-ldap
1654 # OpenLDAP --with-ldap_module
1655         # Check whether --with-ldap_module or --without-ldap_module was given.
1656 if test "${with_ldap_module+set}" = set; then
1657   withval="$with_ldap_module"
1658   
1659         ol_arg=invalid
1660         for ol_val in static dynamic ; do
1661                 if test "$withval" = "$ol_val" ; then
1662                         ol_arg="$ol_val"
1663                 fi
1664         done
1665         if test "$ol_arg" = "invalid" ; then
1666                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1667         fi
1668         ol_with_ldap_module="$ol_arg"
1669
1670 else
1671         ol_with_ldap_module="static"
1672 fi
1673 # end --with-ldap_module
1674
1675 # OpenLDAP --enable-ldbm
1676         # Check whether --enable-ldbm or --disable-ldbm was given.
1677 if test "${enable_ldbm+set}" = set; then
1678   enableval="$enable_ldbm"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1688         fi
1689         ol_enable_ldbm="$ol_arg"
1690
1691 else
1692         ol_enable_ldbm="yes"
1693 fi
1694 # end --enable-ldbm
1695 # OpenLDAP --with-ldbm_module
1696         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1697 if test "${with_ldbm_module+set}" = set; then
1698   withval="$with_ldbm_module"
1699   
1700         ol_arg=invalid
1701         for ol_val in static dynamic ; do
1702                 if test "$withval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1708         fi
1709         ol_with_ldbm_module="$ol_arg"
1710
1711 else
1712         ol_with_ldbm_module="static"
1713 fi
1714 # end --with-ldbm_module
1715
1716 # OpenLDAP --with-ldbm_api
1717         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1718 if test "${with_ldbm_api+set}" = set; then
1719   withval="$with_ldbm_api"
1720   
1721         ol_arg=invalid
1722         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1723                 if test "$withval" = "$ol_val" ; then
1724                         ol_arg="$ol_val"
1725                 fi
1726         done
1727         if test "$ol_arg" = "invalid" ; then
1728                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1729         fi
1730         ol_with_ldbm_api="$ol_arg"
1731
1732 else
1733         ol_with_ldbm_api="auto"
1734 fi
1735 # end --with-ldbm_api
1736
1737 # OpenLDAP --with-ldbm_type
1738         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1739 if test "${with_ldbm_type+set}" = set; then
1740   withval="$with_ldbm_type"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto btree hash ; do
1744                 if test "$withval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1750         fi
1751         ol_with_ldbm_type="$ol_arg"
1752
1753 else
1754         ol_with_ldbm_type="auto"
1755 fi
1756 # end --with-ldbm_type
1757
1758
1759 # OpenLDAP --enable-passwd
1760         # Check whether --enable-passwd or --disable-passwd was given.
1761 if test "${enable_passwd+set}" = set; then
1762   enableval="$enable_passwd"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1772         fi
1773         ol_enable_passwd="$ol_arg"
1774
1775 else
1776         ol_enable_passwd="no"
1777 fi
1778 # end --enable-passwd
1779 # OpenLDAP --with-passwd_module
1780         # Check whether --with-passwd_module or --without-passwd_module was given.
1781 if test "${with_passwd_module+set}" = set; then
1782   withval="$with_passwd_module"
1783   
1784         ol_arg=invalid
1785         for ol_val in static dynamic ; do
1786                 if test "$withval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1792         fi
1793         ol_with_passwd_module="$ol_arg"
1794
1795 else
1796         ol_with_passwd_module="static"
1797 fi
1798 # end --with-passwd_module
1799
1800 # OpenLDAP --enable-perl
1801         # Check whether --enable-perl or --disable-perl was given.
1802 if test "${enable_perl+set}" = set; then
1803   enableval="$enable_perl"
1804   
1805         ol_arg=invalid
1806         for ol_val in auto yes no ; do
1807                 if test "$enableval" = "$ol_val" ; then
1808                         ol_arg="$ol_val"
1809                 fi
1810         done
1811         if test "$ol_arg" = "invalid" ; then
1812                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1813         fi
1814         ol_enable_perl="$ol_arg"
1815
1816 else
1817         ol_enable_perl="no"
1818 fi
1819 # end --enable-perl
1820 # OpenLDAP --with-perl_module
1821         # Check whether --with-perl_module or --without-perl_module was given.
1822 if test "${with_perl_module+set}" = set; then
1823   withval="$with_perl_module"
1824   
1825         ol_arg=invalid
1826         for ol_val in static dynamic ; do
1827                 if test "$withval" = "$ol_val" ; then
1828                         ol_arg="$ol_val"
1829                 fi
1830         done
1831         if test "$ol_arg" = "invalid" ; then
1832                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1833         fi
1834         ol_with_perl_module="$ol_arg"
1835
1836 else
1837         ol_with_perl_module="static"
1838 fi
1839 # end --with-perl_module
1840
1841 # OpenLDAP --enable-shell
1842         # Check whether --enable-shell or --disable-shell was given.
1843 if test "${enable_shell+set}" = set; then
1844   enableval="$enable_shell"
1845   
1846         ol_arg=invalid
1847         for ol_val in auto yes no ; do
1848                 if test "$enableval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1854         fi
1855         ol_enable_shell="$ol_arg"
1856
1857 else
1858         ol_enable_shell="no"
1859 fi
1860 # end --enable-shell
1861 # OpenLDAP --with-shell_module
1862         # Check whether --with-shell_module or --without-shell_module was given.
1863 if test "${with_shell_module+set}" = set; then
1864   withval="$with_shell_module"
1865   
1866         ol_arg=invalid
1867         for ol_val in static dynamic ; do
1868                 if test "$withval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1874         fi
1875         ol_with_shell_module="$ol_arg"
1876
1877 else
1878         ol_with_shell_module="static"
1879 fi
1880 # end --with-shell_module
1881
1882 # OpenLDAP --enable-tcl
1883         # Check whether --enable-tcl or --disable-tcl was given.
1884 if test "${enable_tcl+set}" = set; then
1885   enableval="$enable_tcl"
1886   
1887         ol_arg=invalid
1888         for ol_val in auto yes no ; do
1889                 if test "$enableval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1895         fi
1896         ol_enable_tcl="$ol_arg"
1897
1898 else
1899         ol_enable_tcl="no"
1900 fi
1901 # end --enable-tcl
1902 # OpenLDAP --with-tcl_module
1903         # Check whether --with-tcl_module or --without-tcl_module was given.
1904 if test "${with_tcl_module+set}" = set; then
1905   withval="$with_tcl_module"
1906   
1907         ol_arg=invalid
1908         for ol_val in static dynamic ; do
1909                 if test "$withval" = "$ol_val" ; then
1910                         ol_arg="$ol_val"
1911                 fi
1912         done
1913         if test "$ol_arg" = "invalid" ; then
1914                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1915         fi
1916         ol_with_tcl_module="$ol_arg"
1917
1918 else
1919         ol_with_tcl_module="static"
1920 fi
1921 # end --with-tcl_module
1922
1923
1924 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1925 if test "${with_xxslurpdoptions+set}" = set; then
1926   withval="$with_xxslurpdoptions"
1927   :
1928 fi
1929
1930 # OpenLDAP --enable-slurpd
1931         # Check whether --enable-slurpd or --disable-slurpd was given.
1932 if test "${enable_slurpd+set}" = set; then
1933   enableval="$enable_slurpd"
1934   
1935         ol_arg=invalid
1936         for ol_val in auto yes no ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1943         fi
1944         ol_enable_slurpd="$ol_arg"
1945
1946 else
1947         ol_enable_slurpd="auto"
1948 fi
1949 # end --enable-slurpd
1950
1951 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1952 if test "${with_xxliboptions+set}" = set; then
1953   withval="$with_xxliboptions"
1954   :
1955 fi
1956
1957 # Check whether --enable-static or --disable-static was given.
1958 if test "${enable_static+set}" = set; then
1959   enableval="$enable_static"
1960   p=${PACKAGE-default}
1961 case "$enableval" in
1962 yes) enable_static=yes ;;
1963 no) enable_static=no ;;
1964 *)
1965   enable_static=no
1966   # Look at the argument we got.  We use all the common list separators.
1967   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1968   for pkg in $enableval; do
1969     if test "X$pkg" = "X$p"; then
1970       enable_static=yes
1971     fi
1972   done
1973   IFS="$ac_save_ifs"
1974   ;;
1975 esac
1976 else
1977   enable_static=yes
1978 fi
1979
1980 # Check whether --enable-shared or --disable-shared was given.
1981 if test "${enable_shared+set}" = set; then
1982   enableval="$enable_shared"
1983   p=${PACKAGE-default}
1984 case "$enableval" in
1985 yes) enable_shared=yes ;;
1986 no) enable_shared=no ;;
1987 *)
1988   enable_shared=no
1989   # Look at the argument we got.  We use all the common list separators.
1990   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1991   for pkg in $enableval; do
1992     if test "X$pkg" = "X$p"; then
1993       enable_shared=yes
1994     fi
1995   done
1996   IFS="$ac_save_ifs"
1997   ;;
1998 esac
1999 else
2000   enable_shared=yes
2001 fi
2002
2003
2004 # validate options
2005 if test $ol_enable_dns = yes ; then
2006         if test $ol_enable_referrals = no ; then
2007                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2008         fi
2009         if test $ol_enable_referrals = auto ; then
2010                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2011                 ol_enable_referrals=yes
2012         fi
2013 fi
2014
2015 if test $ol_enable_slapd = no ; then
2016                 if test $ol_enable_bdb2 = yes ; then
2017                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2018         fi
2019         if test $ol_enable_ldap = yes ; then
2020                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2021         fi
2022         if test $ol_enable_ldbm = yes ; then
2023                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2024         fi
2025         if test $ol_enable_passwd = yes ; then
2026                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2027         fi
2028         if test $ol_enable_perl = yes ; then
2029                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2030         fi
2031         if test $ol_enable_shell = yes ; then
2032                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2033         fi
2034         if test $ol_enable_tcl = yes ; then
2035                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2036         fi
2037         if test $ol_enable_modules = yes ; then
2038                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2039         fi
2040         if test $ol_enable_wrappers = yes ; then
2041                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2042         fi
2043         if test $ol_enable_phonetic = yes ; then
2044                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2045         fi
2046         if test $ol_enable_rlookups = yes ; then
2047                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2048         fi
2049         if test $ol_with_ldbm_api != auto ; then
2050                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2051         fi
2052         if test $ol_with_ldbm_type != auto ; then
2053                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2054         fi
2055         if test $ol_with_bdb2_module != static ; then
2056                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2057         fi
2058         if test $ol_with_ldap_module != static ; then
2059                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2060         fi
2061         if test $ol_with_ldbm_module != static ; then
2062                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2063         fi
2064         if test $ol_with_passwd_module != static ; then
2065                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2066         fi
2067         if test $ol_with_perl_module != static ; then
2068                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2069         fi
2070         if test $ol_with_shell_module != static ; then
2071                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2072         fi
2073         if test $ol_with_tcl_module != static ; then
2074                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2075         fi
2076         if test $ol_enable_slurpd = yes ; then
2077                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2078         fi
2079
2080         # force settings to no
2081         ol_enable_bdb2=no
2082         ol_enable_ldap=no
2083         ol_enable_ldbm=no
2084         ol_enable_passwd=no
2085         ol_enable_perl=no
2086         ol_enable_shell=no
2087         ol_enable_tcl=no
2088
2089         ol_enable_modules=no
2090         ol_enable_phonetic=no
2091         ol_enable_rlookups=no
2092         ol_enable_wrappers=no
2093
2094         ol_with_ldbm_api=no
2095         ol_with_ldbm_type=no
2096
2097         ol_with_bdb2_module=static
2098         ol_with_ldap_module=static
2099         ol_with_ldbm_module=static
2100         ol_with_passwd_module=static
2101         ol_with_perl_module=static
2102         ol_with_shell_module=static
2103         ol_with_tcl_module=static
2104
2105         ol_enable_slurpd=no
2106
2107 elif test $ol_enable_ldbm = no ; then
2108         
2109         if test $ol_with_ldbm_api != auto ; then
2110                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2111         fi
2112
2113         if test $ol_with_ldbm_type != auto ; then
2114                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2115         fi
2116
2117         if test $ol_with_ldbm_module != static ; then
2118                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2119         fi
2120
2121         if test $ol_enable_bdb2 = yes ; then
2122                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2123         fi
2124
2125         if test $ol_enable_modules != yes -a \
2126                 $ol_enable_ldap = no -a \
2127                 $ol_enable_passwd = no -a \
2128                 $ol_enable_perl = no -a \
2129                 $ol_enable_shell = no -a \
2130                 $ol_enable_tcl = no ; then
2131                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2132         fi
2133
2134         ol_with_ldbm_api=no
2135         ol_with_ldbm_type=no
2136         ol_with_ldbm_module=static
2137
2138 elif test $ol_enable_bdb2 = yes ; then
2139         
2140         if test $ol_with_ldbm_api != auto -a \
2141                 $ol_with_ldbm_api != db2 ; then
2142                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2143         fi
2144
2145         ol_with_ldbm_api=db2
2146
2147 else
2148         
2149         if test $ol_enable_bdb2 != no ; then
2150                 if test $ol_with_ldbm_api != auto -a \
2151                         $ol_with_ldbm_api != db2 ; then
2152                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2153                         ol_enable_bdb2=no
2154                 fi
2155         fi
2156
2157         if test $ol_with_ldbm_api = gdbm -a \
2158                 $ol_with_ldbm_type = btree ; then
2159                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2160         fi
2161         if test $ol_with_ldbm_api = mdbm -a \
2162                 $ol_with_ldbm_type = btree ; then
2163                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2164         fi
2165         if test $ol_with_ldbm_api = ndbm -a \
2166                 $ol_with_ldbm_type = btree ; then
2167                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2168         fi
2169 fi
2170
2171 if test $ol_enable_slurpd = yes ; then
2172                 if test $ol_with_threads = no ; then
2173                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2174         fi
2175 fi
2176
2177 echo "$ac_t""done" 1>&6
2178
2179 ## Initialize vars
2180 LDAP_LIBS=
2181 LDIF_LIBS=
2182 LDBM_LIBS=
2183 LTHREAD_LIBS=
2184 LUTIL_LIBS=
2185
2186 LDAPD_LIBS=
2187 SLAPD_LIBS=
2188 SLURPD_LIBS=
2189
2190 BUILD_LDAPD=no
2191 BUILD_SLAPD=no
2192 BUILD_SLURPD=no
2193
2194 BUILD_BDB2=no
2195 BUILD_LDAP=no
2196 BUILD_LDBM=no
2197 BUILD_PASSWD=no
2198 BUILD_PERL=no
2199 BUILD_SHELL=no
2200 BUILD_TCL=no
2201 BUILD_THREAD=no
2202
2203 BUILD_BDB2_DYNAMIC=no
2204 BUILD_LDAP_DYNAMIC=no
2205 BUILD_LDBM_DYNAMIC=no
2206 BUILD_PASSWD_DYNAMIC=no
2207 BUILD_PERL_DYNAMIC=no
2208 BUILD_SHELL_DYNAMIC=no
2209 BUILD_TCL_DYNAMIC=no
2210
2211 SLAPD_MODULES_LDFLAGS=
2212 SLAPD_MODULES_CPPFLAGS=
2213
2214 SLAPD_PERL_LDFLAGS=
2215 SLAPD_PERL_CPPFLAGS=
2216
2217 KRB_LIBS=
2218 READLINE_LIBS=
2219 TERMCAP_LIBS=
2220 TLS_LIBS=
2221
2222
2223
2224 cat >> confdefs.h <<\EOF
2225 #define HAVE_MKVERSION 1
2226 EOF
2227
2228
2229
2230
2231
2232 ol_aix_threads=no
2233 case "$target" in
2234 *-*-aix*)       if test -z "$CC" ; then
2235                 case "$ol_with_threads" in
2236                 auto | yes |  posix) ol_aix_threads=yes ;;
2237                 esac
2238         fi
2239 ;;
2240 esac
2241
2242 if test $ol_aix_threads = yes ; then
2243         if test -z "${CC}" ; then
2244                 for ac_prog in cc_r xlc_r cc
2245 do
2246 # Extract the first word of "$ac_prog", so it can be a program name with args.
2247 set dummy $ac_prog; ac_word=$2
2248 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2249 echo "configure:2250: checking for $ac_word" >&5
2250 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2251   echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253   if test -n "$CC"; then
2254   ac_cv_prog_CC="$CC" # Let the user override the test.
2255 else
2256   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2257   ac_dummy="$PATH"
2258   for ac_dir in $ac_dummy; do
2259     test -z "$ac_dir" && ac_dir=.
2260     if test -f $ac_dir/$ac_word; then
2261       ac_cv_prog_CC="$ac_prog"
2262       break
2263     fi
2264   done
2265   IFS="$ac_save_ifs"
2266 fi
2267 fi
2268 CC="$ac_cv_prog_CC"
2269 if test -n "$CC"; then
2270   echo "$ac_t""$CC" 1>&6
2271 else
2272   echo "$ac_t""no" 1>&6
2273 fi
2274
2275 test -n "$CC" && break
2276 done
2277
2278
2279                 if test "$CC" = cc ; then
2280                                                 if test $ol_with_threads != auto ; then
2281                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2282                         else
2283                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2284                         fi
2285                         ol_with_threads=no
2286                 fi
2287         fi
2288
2289         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2290                 ol_with_threads=posix
2291                 ol_cv_pthread_create=yes
2292         fi
2293 fi
2294
2295 if test -z "${CC}"; then
2296         for ac_prog in cc
2297 do
2298 # Extract the first word of "$ac_prog", so it can be a program name with args.
2299 set dummy $ac_prog; ac_word=$2
2300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2301 echo "configure:2302: checking for $ac_word" >&5
2302 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2303   echo $ac_n "(cached) $ac_c" 1>&6
2304 else
2305   if test -n "$CC"; then
2306   ac_cv_prog_CC="$CC" # Let the user override the test.
2307 else
2308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2309   ac_dummy="$PATH"
2310   for ac_dir in $ac_dummy; do
2311     test -z "$ac_dir" && ac_dir=.
2312     if test -f $ac_dir/$ac_word; then
2313       ac_cv_prog_CC="$ac_prog"
2314       break
2315     fi
2316   done
2317   IFS="$ac_save_ifs"
2318 fi
2319 fi
2320 CC="$ac_cv_prog_CC"
2321 if test -n "$CC"; then
2322   echo "$ac_t""$CC" 1>&6
2323 else
2324   echo "$ac_t""no" 1>&6
2325 fi
2326
2327 test -n "$CC" && break
2328 done
2329
2330 fi
2331
2332
2333 # Check whether --enable-fast-install or --disable-fast-install was given.
2334 if test "${enable_fast_install+set}" = set; then
2335   enableval="$enable_fast_install"
2336   p=${PACKAGE-default}
2337 case "$enableval" in
2338 yes) enable_fast_install=yes ;;
2339 no) enable_fast_install=no ;;
2340 *)
2341   enable_fast_install=no
2342   # Look at the argument we got.  We use all the common list separators.
2343   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2344   for pkg in $enableval; do
2345     if test "X$pkg" = "X$p"; then
2346       enable_fast_install=yes
2347     fi
2348   done
2349   IFS="$ac_save_ifs"
2350   ;;
2351 esac
2352 else
2353   enable_fast_install=yes
2354 fi
2355
2356 # Extract the first word of "ranlib", so it can be a program name with args.
2357 set dummy ranlib; ac_word=$2
2358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2359 echo "configure:2360: checking for $ac_word" >&5
2360 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2361   echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363   if test -n "$RANLIB"; then
2364   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2365 else
2366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2367   ac_dummy="$PATH"
2368   for ac_dir in $ac_dummy; do
2369     test -z "$ac_dir" && ac_dir=.
2370     if test -f $ac_dir/$ac_word; then
2371       ac_cv_prog_RANLIB="ranlib"
2372       break
2373     fi
2374   done
2375   IFS="$ac_save_ifs"
2376   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2377 fi
2378 fi
2379 RANLIB="$ac_cv_prog_RANLIB"
2380 if test -n "$RANLIB"; then
2381   echo "$ac_t""$RANLIB" 1>&6
2382 else
2383   echo "$ac_t""no" 1>&6
2384 fi
2385
2386 # Extract the first word of "gcc", so it can be a program name with args.
2387 set dummy gcc; ac_word=$2
2388 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2389 echo "configure:2390: checking for $ac_word" >&5
2390 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2391   echo $ac_n "(cached) $ac_c" 1>&6
2392 else
2393   if test -n "$CC"; then
2394   ac_cv_prog_CC="$CC" # Let the user override the test.
2395 else
2396   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2397   ac_dummy="$PATH"
2398   for ac_dir in $ac_dummy; do
2399     test -z "$ac_dir" && ac_dir=.
2400     if test -f $ac_dir/$ac_word; then
2401       ac_cv_prog_CC="gcc"
2402       break
2403     fi
2404   done
2405   IFS="$ac_save_ifs"
2406 fi
2407 fi
2408 CC="$ac_cv_prog_CC"
2409 if test -n "$CC"; then
2410   echo "$ac_t""$CC" 1>&6
2411 else
2412   echo "$ac_t""no" 1>&6
2413 fi
2414
2415 if test -z "$CC"; then
2416   # Extract the first word of "cc", so it can be a program name with args.
2417 set dummy cc; ac_word=$2
2418 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2419 echo "configure:2420: checking for $ac_word" >&5
2420 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2421   echo $ac_n "(cached) $ac_c" 1>&6
2422 else
2423   if test -n "$CC"; then
2424   ac_cv_prog_CC="$CC" # Let the user override the test.
2425 else
2426   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2427   ac_prog_rejected=no
2428   ac_dummy="$PATH"
2429   for ac_dir in $ac_dummy; do
2430     test -z "$ac_dir" && ac_dir=.
2431     if test -f $ac_dir/$ac_word; then
2432       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2433         ac_prog_rejected=yes
2434         continue
2435       fi
2436       ac_cv_prog_CC="cc"
2437       break
2438     fi
2439   done
2440   IFS="$ac_save_ifs"
2441 if test $ac_prog_rejected = yes; then
2442   # We found a bogon in the path, so make sure we never use it.
2443   set dummy $ac_cv_prog_CC
2444   shift
2445   if test $# -gt 0; then
2446     # We chose a different compiler from the bogus one.
2447     # However, it has the same basename, so the bogon will be chosen
2448     # first if we set CC to just the basename; use the full file name.
2449     shift
2450     set dummy "$ac_dir/$ac_word" "$@"
2451     shift
2452     ac_cv_prog_CC="$@"
2453   fi
2454 fi
2455 fi
2456 fi
2457 CC="$ac_cv_prog_CC"
2458 if test -n "$CC"; then
2459   echo "$ac_t""$CC" 1>&6
2460 else
2461   echo "$ac_t""no" 1>&6
2462 fi
2463
2464   if test -z "$CC"; then
2465     case "`uname -s`" in
2466     *win32* | *WIN32* | *CYGWIN*)
2467       # Extract the first word of "cl", so it can be a program name with args.
2468 set dummy cl; ac_word=$2
2469 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2470 echo "configure:2471: checking for $ac_word" >&5
2471 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2472   echo $ac_n "(cached) $ac_c" 1>&6
2473 else
2474   if test -n "$CC"; then
2475   ac_cv_prog_CC="$CC" # Let the user override the test.
2476 else
2477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2478   ac_dummy="$PATH"
2479   for ac_dir in $ac_dummy; do
2480     test -z "$ac_dir" && ac_dir=.
2481     if test -f $ac_dir/$ac_word; then
2482       ac_cv_prog_CC="cl"
2483       break
2484     fi
2485   done
2486   IFS="$ac_save_ifs"
2487 fi
2488 fi
2489 CC="$ac_cv_prog_CC"
2490 if test -n "$CC"; then
2491   echo "$ac_t""$CC" 1>&6
2492 else
2493   echo "$ac_t""no" 1>&6
2494 fi
2495  ;;
2496     esac
2497   fi
2498   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2499 fi
2500
2501 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2502 echo "configure:2503: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2503
2504 ac_ext=c
2505 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2506 ac_cpp='$CPP $CPPFLAGS'
2507 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2508 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2509 cross_compiling=$ac_cv_prog_cc_cross
2510
2511 cat > conftest.$ac_ext << EOF
2512
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515
2516 main(){return(0);}
2517 EOF
2518 if { (eval echo configure:2519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2519   ac_cv_prog_cc_works=yes
2520   # If we can't run a trivial program, we are probably using a cross compiler.
2521   if (./conftest; exit) 2>/dev/null; then
2522     ac_cv_prog_cc_cross=no
2523   else
2524     ac_cv_prog_cc_cross=yes
2525   fi
2526 else
2527   echo "configure: failed program was:" >&5
2528   cat conftest.$ac_ext >&5
2529   ac_cv_prog_cc_works=no
2530 fi
2531 rm -fr conftest*
2532 ac_ext=c
2533 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2534 ac_cpp='$CPP $CPPFLAGS'
2535 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2536 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2537 cross_compiling=$ac_cv_prog_cc_cross
2538
2539 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2540 if test $ac_cv_prog_cc_works = no; then
2541   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2542 fi
2543 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2544 echo "configure:2545: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2545 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2546 cross_compiling=$ac_cv_prog_cc_cross
2547
2548 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2549 echo "configure:2550: checking whether we are using GNU C" >&5
2550 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2551   echo $ac_n "(cached) $ac_c" 1>&6
2552 else
2553   cat > conftest.c <<EOF
2554 #ifdef __GNUC__
2555   yes;
2556 #endif
2557 EOF
2558 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2559   ac_cv_prog_gcc=yes
2560 else
2561   ac_cv_prog_gcc=no
2562 fi
2563 fi
2564
2565 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2566
2567 if test $ac_cv_prog_gcc = yes; then
2568   GCC=yes
2569 else
2570   GCC=
2571 fi
2572
2573 ac_test_CFLAGS="${CFLAGS+set}"
2574 ac_save_CFLAGS="$CFLAGS"
2575 CFLAGS=
2576 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2577 echo "configure:2578: checking whether ${CC-cc} accepts -g" >&5
2578 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2579   echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581   echo 'void f(){}' > conftest.c
2582 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2583   ac_cv_prog_cc_g=yes
2584 else
2585   ac_cv_prog_cc_g=no
2586 fi
2587 rm -f conftest*
2588
2589 fi
2590
2591 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2592 if test "$ac_test_CFLAGS" = set; then
2593   CFLAGS="$ac_save_CFLAGS"
2594 elif test $ac_cv_prog_cc_g = yes; then
2595   if test "$GCC" = yes; then
2596     CFLAGS="-g -O2"
2597   else
2598     CFLAGS="-g"
2599   fi
2600 else
2601   if test "$GCC" = yes; then
2602     CFLAGS="-O2"
2603   else
2604     CFLAGS=
2605   fi
2606 fi
2607
2608 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2609 if test "${with_gnu_ld+set}" = set; then
2610   withval="$with_gnu_ld"
2611   test "$withval" = no || with_gnu_ld=yes
2612 else
2613   with_gnu_ld=no
2614 fi
2615
2616 ac_prog=ld
2617 if test "$ac_cv_prog_gcc" = yes; then
2618   # Check if gcc -print-prog-name=ld gives a path.
2619   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2620 echo "configure:2621: checking for ld used by GCC" >&5
2621   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2622   case "$ac_prog" in
2623     # Accept absolute paths.
2624     [\\/]* | [A-Za-z]:[\\/]*)
2625       re_direlt='/[^/][^/]*/\.\./'
2626       # Canonicalize the path of ld
2627       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2628       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2629         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2630       done
2631       test -z "$LD" && LD="$ac_prog"
2632       ;;
2633   "")
2634     # If it fails, then pretend we aren't using GCC.
2635     ac_prog=ld
2636     ;;
2637   *)
2638     # If it is relative, then search for the first ld in PATH.
2639     with_gnu_ld=unknown
2640     ;;
2641   esac
2642 elif test "$with_gnu_ld" = yes; then
2643   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2644 echo "configure:2645: checking for GNU ld" >&5
2645 else
2646   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2647 echo "configure:2648: checking for non-GNU ld" >&5
2648 fi
2649 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2650   echo $ac_n "(cached) $ac_c" 1>&6
2651 else
2652   if test -z "$LD"; then
2653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2654   for ac_dir in $PATH; do
2655     test -z "$ac_dir" && ac_dir=.
2656     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2657       ac_cv_path_LD="$ac_dir/$ac_prog"
2658       # Check to see if the program is GNU ld.  I'd rather use --version,
2659       # but apparently some GNU ld's only accept -v.
2660       # Break only if it was the GNU/non-GNU ld that we prefer.
2661       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2662         test "$with_gnu_ld" != no && break
2663       else
2664         test "$with_gnu_ld" != yes && break
2665       fi
2666     fi
2667   done
2668   IFS="$ac_save_ifs"
2669 else
2670   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2671 fi
2672 fi
2673
2674 LD="$ac_cv_path_LD"
2675 if test -n "$LD"; then
2676   echo "$ac_t""$LD" 1>&6
2677 else
2678   echo "$ac_t""no" 1>&6
2679 fi
2680 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2681
2682 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2683 echo "configure:2684: checking if the linker ($LD) is GNU ld" >&5
2684 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2685   echo $ac_n "(cached) $ac_c" 1>&6
2686 else
2687   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2688 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2689   ac_cv_prog_gnu_ld=yes
2690 else
2691   ac_cv_prog_gnu_ld=no
2692 fi
2693 fi
2694
2695 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2696
2697
2698 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2699 echo "configure:2700: checking for BSD-compatible nm" >&5
2700 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2701   echo $ac_n "(cached) $ac_c" 1>&6
2702 else
2703   if test -n "$NM"; then
2704   # Let the user override the test.
2705   ac_cv_path_NM="$NM"
2706 else
2707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2708   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2709     test -z "$ac_dir" && ac_dir=.
2710     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2711       # Check to see if the nm accepts a BSD-compat flag.
2712       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2713       #   nm: unknown option "B" ignored
2714       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2715         ac_cv_path_NM="$ac_dir/nm -B"
2716         break
2717       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2718         ac_cv_path_NM="$ac_dir/nm -p"
2719         break
2720       else
2721         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2722         continue # so that we can try to find one that supports BSD flags
2723       fi
2724     fi
2725   done
2726   IFS="$ac_save_ifs"
2727   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2728 fi
2729 fi
2730
2731 NM="$ac_cv_path_NM"
2732 echo "$ac_t""$NM" 1>&6
2733
2734
2735 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2736 echo "configure:2737: checking whether ln -s works" >&5
2737 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2738   echo $ac_n "(cached) $ac_c" 1>&6
2739 else
2740   rm -f conftestdata
2741 if ln -s X conftestdata 2>/dev/null
2742 then
2743   rm -f conftestdata
2744   ac_cv_prog_LN_S="ln -s"
2745 else
2746   ac_cv_prog_LN_S=ln
2747 fi
2748 fi
2749 LN_S="$ac_cv_prog_LN_S"
2750 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2751   echo "$ac_t""yes" 1>&6
2752 else
2753   echo "$ac_t""no" 1>&6
2754 fi
2755
2756
2757 # Check for any special flags to pass to ltconfig.
2758 libtool_flags="--cache-file=$cache_file"
2759 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2760 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2761 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2762 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2763 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2764
2765
2766 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2767 if test "${enable_libtool_lock+set}" = set; then
2768   enableval="$enable_libtool_lock"
2769   :
2770 fi
2771
2772 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2773 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2774
2775 # Some flags need to be propagated to the compiler or linker for good
2776 # libtool support.
2777 case "$host" in
2778 *-*-irix6*)
2779   # Find out which ABI we are using.
2780   echo '#line 2781 "configure"' > conftest.$ac_ext
2781   if { (eval echo configure:2782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2782     case "`/usr/bin/file conftest.o`" in
2783     *32-bit*)
2784       LD="${LD-ld} -32"
2785       ;;
2786     *N32*)
2787       LD="${LD-ld} -n32"
2788       ;;
2789     *64-bit*)
2790       LD="${LD-ld} -64"
2791       ;;
2792     esac
2793   fi
2794   rm -rf conftest*
2795   ;;
2796
2797 *-*-sco3.2v5*)
2798   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2799   SAVE_CFLAGS="$CFLAGS"
2800   CFLAGS="$CFLAGS -belf"
2801   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2802 echo "configure:2803: checking whether the C compiler needs -belf" >&5
2803 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2804   echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806   cat > conftest.$ac_ext <<EOF
2807 #line 2808 "configure"
2808 #include "confdefs.h"
2809
2810 int main() {
2811
2812 ; return 0; }
2813 EOF
2814 if { (eval echo configure:2815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2815   rm -rf conftest*
2816   lt_cv_cc_needs_belf=yes
2817 else
2818   echo "configure: failed program was:" >&5
2819   cat conftest.$ac_ext >&5
2820   rm -rf conftest*
2821   lt_cv_cc_needs_belf=no
2822 fi
2823 rm -f conftest*
2824 fi
2825
2826 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2827   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2828     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2829     CFLAGS="$SAVE_CFLAGS"
2830   fi
2831   ;;
2832
2833
2834 esac
2835
2836
2837 # Save cache, so that ltconfig can load it
2838
2839
2840 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2841 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2842 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2843 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2844 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2845 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2846 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2847 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2848
2849 # Reload cache, that may have been modified by ltconfig
2850
2851
2852 # This can be used to rebuild libtool when needed
2853 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2854
2855 # Always use our own libtool.
2856 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2857
2858 # Redirect the config.log output again, so that the ltconfig log is not
2859 # clobbered by the next message.
2860 exec 5>>./config.log
2861
2862
2863 for ac_prog in mawk gawk nawk awk
2864 do
2865 # Extract the first word of "$ac_prog", so it can be a program name with args.
2866 set dummy $ac_prog; ac_word=$2
2867 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2868 echo "configure:2869: checking for $ac_word" >&5
2869 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2870   echo $ac_n "(cached) $ac_c" 1>&6
2871 else
2872   if test -n "$AWK"; then
2873   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2874 else
2875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2876   ac_dummy="$PATH"
2877   for ac_dir in $ac_dummy; do
2878     test -z "$ac_dir" && ac_dir=.
2879     if test -f $ac_dir/$ac_word; then
2880       ac_cv_prog_AWK="$ac_prog"
2881       break
2882     fi
2883   done
2884   IFS="$ac_save_ifs"
2885 fi
2886 fi
2887 AWK="$ac_cv_prog_AWK"
2888 if test -n "$AWK"; then
2889   echo "$ac_t""$AWK" 1>&6
2890 else
2891   echo "$ac_t""no" 1>&6
2892 fi
2893
2894 test -n "$AWK" && break
2895 done
2896
2897 # test for ln hardlink support
2898 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2899 echo "configure:2900: checking whether ln works" >&5
2900 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2901   echo $ac_n "(cached) $ac_c" 1>&6
2902 else
2903   rm -f conftest.src conftest.dst
2904 echo "conftest" > conftest.src
2905 if ln conftest.src conftest.dst 2>/dev/null
2906 then
2907   ol_cv_prog_LN_H="ln"
2908 else
2909   ol_cv_prog_LN_H="cp"
2910 fi
2911 rm -f conftest.src conftest.dst
2912
2913 fi
2914 LN_H="$ol_cv_prog_LN_H"
2915 if test "$ol_cv_prog_LN_H" = "ln"; then
2916         echo "$ac_t""yes" 1>&6
2917 else
2918         echo "$ac_t""no" 1>&6
2919 fi
2920
2921 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2922 echo "configure:2923: checking whether ln -s works" >&5
2923 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926   rm -f conftestdata
2927 if ln -s X conftestdata 2>/dev/null
2928 then
2929   rm -f conftestdata
2930   ac_cv_prog_LN_S="ln -s"
2931 else
2932   ac_cv_prog_LN_S=ln
2933 fi
2934 fi
2935 LN_S="$ac_cv_prog_LN_S"
2936 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2937   echo "$ac_t""yes" 1>&6
2938 else
2939   echo "$ac_t""no" 1>&6
2940 fi
2941
2942
2943 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2944         LN_S="$LN_H"
2945 fi
2946
2947 # Extract the first word of "sendmail", so it can be a program name with args.
2948 set dummy sendmail; ac_word=$2
2949 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2950 echo "configure:2951: checking for $ac_word" >&5
2951 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
2952   echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954   case "$SENDMAIL" in
2955   /*)
2956   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2957   ;;
2958   ?:/*)                  
2959   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2960   ;;
2961   *)
2962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2963   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2964   for ac_dir in $ac_dummy; do 
2965     test -z "$ac_dir" && ac_dir=.
2966     if test -f $ac_dir/$ac_word; then
2967       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2968       break
2969     fi
2970   done
2971   IFS="$ac_save_ifs"
2972   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2973   ;;
2974 esac
2975 fi
2976 SENDMAIL="$ac_cv_path_SENDMAIL"
2977 if test -n "$SENDMAIL"; then
2978   echo "$ac_t""$SENDMAIL" 1>&6
2979 else
2980   echo "$ac_t""no" 1>&6
2981 fi
2982
2983 # Extract the first word of "vi", so it can be a program name with args.
2984 set dummy vi; ac_word=$2
2985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2986 echo "configure:2987: checking for $ac_word" >&5
2987 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   case "$EDITOR" in
2991   /*)
2992   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2993   ;;
2994   ?:/*)                  
2995   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2996   ;;
2997   *)
2998   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2999   ac_dummy="$PATH:/usr/ucb"
3000   for ac_dir in $ac_dummy; do 
3001     test -z "$ac_dir" && ac_dir=.
3002     if test -f $ac_dir/$ac_word; then
3003       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3004       break
3005     fi
3006   done
3007   IFS="$ac_save_ifs"
3008   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3009   ;;
3010 esac
3011 fi
3012 EDITOR="$ac_cv_path_EDITOR"
3013 if test -n "$EDITOR"; then
3014   echo "$ac_t""$EDITOR" 1>&6
3015 else
3016   echo "$ac_t""no" 1>&6
3017 fi
3018
3019 # Extract the first word of "finger", so it can be a program name with args.
3020 set dummy finger; ac_word=$2
3021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_word" >&5
3023 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   case "$FINGER" in
3027   /*)
3028   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3029   ;;
3030   ?:/*)                  
3031   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3032   ;;
3033   *)
3034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3035   ac_dummy="$PATH:/usr/ucb"
3036   for ac_dir in $ac_dummy; do 
3037     test -z "$ac_dir" && ac_dir=.
3038     if test -f $ac_dir/$ac_word; then
3039       ac_cv_path_FINGER="$ac_dir/$ac_word"
3040       break
3041     fi
3042   done
3043   IFS="$ac_save_ifs"
3044   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3045   ;;
3046 esac
3047 fi
3048 FINGER="$ac_cv_path_FINGER"
3049 if test -n "$FINGER"; then
3050   echo "$ac_t""$FINGER" 1>&6
3051 else
3052   echo "$ac_t""no" 1>&6
3053 fi
3054
3055
3056 ol_link_perl=no
3057 if test $ol_enable_perl != no ; then
3058         # Extract the first word of "perl", so it can be a program name with args.
3059 set dummy perl; ac_word=$2
3060 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3061 echo "configure:3062: checking for $ac_word" >&5
3062 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   case "$PERLBIN" in
3066   /*)
3067   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3068   ;;
3069   ?:/*)                  
3070   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3071   ;;
3072   *)
3073   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3074   ac_dummy="$PATH"
3075   for ac_dir in $ac_dummy; do 
3076     test -z "$ac_dir" && ac_dir=.
3077     if test -f $ac_dir/$ac_word; then
3078       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3079       break
3080     fi
3081   done
3082   IFS="$ac_save_ifs"
3083   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3084   ;;
3085 esac
3086 fi
3087 PERLBIN="$ac_cv_path_PERLBIN"
3088 if test -n "$PERLBIN"; then
3089   echo "$ac_t""$PERLBIN" 1>&6
3090 else
3091   echo "$ac_t""no" 1>&6
3092 fi
3093
3094
3095         if test "no$PERLBIN" = "no" ; then
3096                 if test $ol_enable_perl = yes ; then
3097                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3098                 fi
3099
3100         else
3101                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3102                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3103
3104                                 ol_link_perl=yes
3105         fi
3106 fi
3107
3108 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3109 echo "configure:3110: checking how to run the C preprocessor" >&5
3110 # On Suns, sometimes $CPP names a directory.
3111 if test -n "$CPP" && test -d "$CPP"; then
3112   CPP=
3113 fi
3114 if test -z "$CPP"; then
3115 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118     # This must be in double quotes, not single quotes, because CPP may get
3119   # substituted into the Makefile and "${CC-cc}" will confuse make.
3120   CPP="${CC-cc} -E"
3121   # On the NeXT, cc -E runs the code through the compiler's parser,
3122   # not just through cpp.
3123   cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3126 #include <assert.h>
3127 Syntax Error
3128 EOF
3129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3130 { (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3132 if test -z "$ac_err"; then
3133   :
3134 else
3135   echo "$ac_err" >&5
3136   echo "configure: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138   rm -rf conftest*
3139   CPP="${CC-cc} -E -traditional-cpp"
3140   cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143 #include <assert.h>
3144 Syntax Error
3145 EOF
3146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3147 { (eval echo configure:3148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3149 if test -z "$ac_err"; then
3150   :
3151 else
3152   echo "$ac_err" >&5
3153   echo "configure: failed program was:" >&5
3154   cat conftest.$ac_ext >&5
3155   rm -rf conftest*
3156   CPP="${CC-cc} -nologo -E"
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 #include <assert.h>
3161 Syntax Error
3162 EOF
3163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3164 { (eval echo configure:3165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3166 if test -z "$ac_err"; then
3167   :
3168 else
3169   echo "$ac_err" >&5
3170   echo "configure: failed program was:" >&5
3171   cat conftest.$ac_ext >&5
3172   rm -rf conftest*
3173   CPP=/lib/cpp
3174 fi
3175 rm -f conftest*
3176 fi
3177 rm -f conftest*
3178 fi
3179 rm -f conftest*
3180   ac_cv_prog_CPP="$CPP"
3181 fi
3182   CPP="$ac_cv_prog_CPP"
3183 else
3184   ac_cv_prog_CPP="$CPP"
3185 fi
3186 echo "$ac_t""$CPP" 1>&6
3187
3188
3189 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3190         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3191
3192 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3193         echo "configure: warning: programs compiled here do run here..." 1>&2
3194         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3195
3196 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3197         echo "configure: warning: programs compiled here do not run here..." 1>&2
3198         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3199 fi
3200
3201 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3202 echo "configure:3203: checking for AIX" >&5
3203 cat > conftest.$ac_ext <<EOF
3204 #line 3205 "configure"
3205 #include "confdefs.h"
3206 #ifdef _AIX
3207   yes
3208 #endif
3209
3210 EOF
3211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3212   egrep "yes" >/dev/null 2>&1; then
3213   rm -rf conftest*
3214   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3215 #define _ALL_SOURCE 1
3216 EOF
3217
3218 else
3219   rm -rf conftest*
3220   echo "$ac_t""no" 1>&6
3221 fi
3222 rm -f conftest*
3223
3224
3225 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3226 echo "configure:3227: checking for POSIXized ISC" >&5
3227 if test -d /etc/conf/kconfig.d &&
3228   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3229 then
3230   echo "$ac_t""yes" 1>&6
3231   ISC=yes # If later tests want to check for ISC.
3232   cat >> confdefs.h <<\EOF
3233 #define _POSIX_SOURCE 1
3234 EOF
3235
3236   if test "$GCC" = yes; then
3237     CC="$CC -posix"
3238   else
3239     CC="$CC -Xp"
3240   fi
3241 else
3242   echo "$ac_t""no" 1>&6
3243   ISC=
3244 fi
3245
3246 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3247 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3248 echo "configure:3249: checking for minix/config.h" >&5
3249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   cat > conftest.$ac_ext <<EOF
3253 #line 3254 "configure"
3254 #include "confdefs.h"
3255 #include <minix/config.h>
3256 EOF
3257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3258 { (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3260 if test -z "$ac_err"; then
3261   rm -rf conftest*
3262   eval "ac_cv_header_$ac_safe=yes"
3263 else
3264   echo "$ac_err" >&5
3265   echo "configure: failed program was:" >&5
3266   cat conftest.$ac_ext >&5
3267   rm -rf conftest*
3268   eval "ac_cv_header_$ac_safe=no"
3269 fi
3270 rm -f conftest*
3271 fi
3272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3273   echo "$ac_t""yes" 1>&6
3274   MINIX=yes
3275 else
3276   echo "$ac_t""no" 1>&6
3277 MINIX=
3278 fi
3279
3280 if test "$MINIX" = yes; then
3281   cat >> confdefs.h <<\EOF
3282 #define _POSIX_SOURCE 1
3283 EOF
3284
3285   cat >> confdefs.h <<\EOF
3286 #define _POSIX_1_SOURCE 2
3287 EOF
3288
3289   cat >> confdefs.h <<\EOF
3290 #define _MINIX 1
3291 EOF
3292
3293 fi
3294
3295
3296 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3297 echo "configure:3298: checking for Cygwin environment" >&5
3298 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3299   echo $ac_n "(cached) $ac_c" 1>&6
3300 else
3301   cat > conftest.$ac_ext <<EOF
3302 #line 3303 "configure"
3303 #include "confdefs.h"
3304
3305 int main() {
3306
3307 #ifndef __CYGWIN__
3308 #define __CYGWIN__ __CYGWIN32__
3309 #endif
3310 return __CYGWIN__;
3311 ; return 0; }
3312 EOF
3313 if { (eval echo configure:3314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3314   rm -rf conftest*
3315   ac_cv_cygwin=yes
3316 else
3317   echo "configure: failed program was:" >&5
3318   cat conftest.$ac_ext >&5
3319   rm -rf conftest*
3320   ac_cv_cygwin=no
3321 fi
3322 rm -f conftest*
3323 fi
3324
3325 echo "$ac_t""$ac_cv_cygwin" 1>&6
3326 CYGWIN=
3327 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3328 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3329 echo "configure:3330: checking for mingw32 environment" >&5
3330 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336
3337 int main() {
3338 return __MINGW32__;
3339 ; return 0; }
3340 EOF
3341 if { (eval echo configure:3342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3342   rm -rf conftest*
3343   ac_cv_mingw32=yes
3344 else
3345   echo "configure: failed program was:" >&5
3346   cat conftest.$ac_ext >&5
3347   rm -rf conftest*
3348   ac_cv_mingw32=no
3349 fi
3350 rm -f conftest*
3351 fi
3352
3353 echo "$ac_t""$ac_cv_mingw32" 1>&6
3354 MINGW32=
3355 test "$ac_cv_mingw32" = yes && MINGW32=yes
3356 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3357 echo "configure:3358: checking for EMX OS/2 environment" >&5
3358 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364
3365 int main() {
3366 return __EMX__;
3367 ; return 0; }
3368 EOF
3369 if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3370   rm -rf conftest*
3371   ac_cv_emxos2=yes
3372 else
3373   echo "configure: failed program was:" >&5
3374   cat conftest.$ac_ext >&5
3375   rm -rf conftest*
3376   ac_cv_emxos2=no
3377 fi
3378 rm -f conftest*
3379 fi
3380
3381 echo "$ac_t""$ac_cv_emxos2" 1>&6
3382 EMXOS2=
3383 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3384
3385
3386
3387 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3388 echo "configure:3389: checking for executable suffix" >&5
3389 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3390   echo $ac_n "(cached) $ac_c" 1>&6
3391 else
3392   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3393   ac_cv_exeext=.exe
3394 else
3395   rm -f conftest*
3396   echo 'int main () { return 0; }' > conftest.$ac_ext
3397   ac_cv_exeext=
3398   if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3399     for file in conftest.*; do
3400       case $file in
3401       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3402       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3403       esac
3404     done
3405   else
3406     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3407   fi
3408   rm -f conftest*
3409   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3410 fi
3411 fi
3412
3413 EXEEXT=""
3414 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3415 echo "$ac_t""${ac_cv_exeext}" 1>&6
3416 ac_exeext=$EXEEXT
3417
3418 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3419 echo "configure:3420: checking for object suffix" >&5
3420 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3421   echo $ac_n "(cached) $ac_c" 1>&6
3422 else
3423   rm -f conftest*
3424 echo 'int i = 1;' > conftest.$ac_ext
3425 if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3426   for ac_file in conftest.*; do
3427     case $ac_file in
3428     *.c) ;;
3429     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3430     esac
3431   done
3432 else
3433   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3434 fi
3435 rm -f conftest*
3436 fi
3437
3438 echo "$ac_t""$ac_cv_objext" 1>&6
3439 OBJEXT=$ac_cv_objext
3440 ac_objext=$ac_cv_objext
3441
3442
3443 cat >> confdefs.h <<EOF
3444 #define EXEEXT "${EXEEXT}"
3445 EOF
3446
3447
3448 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3449 echo "configure:3450: checking for be_app in -lbe" >&5
3450 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3451 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3452   echo $ac_n "(cached) $ac_c" 1>&6
3453 else
3454   ac_save_LIBS="$LIBS"
3455 LIBS="-lbe -lroot -lnet $LIBS"
3456 cat > conftest.$ac_ext <<EOF
3457 #line 3458 "configure"
3458 #include "confdefs.h"
3459 /* Override any gcc2 internal prototype to avoid an error.  */
3460 /* We use char because int might match the return type of a gcc2
3461     builtin and then its argument prototype would still apply.  */
3462 char be_app();
3463
3464 int main() {
3465 be_app()
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3469   rm -rf conftest*
3470   eval "ac_cv_lib_$ac_lib_var=yes"
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   eval "ac_cv_lib_$ac_lib_var=no"
3476 fi
3477 rm -f conftest*
3478 LIBS="$ac_save_LIBS"
3479
3480 fi
3481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3482   echo "$ac_t""yes" 1>&6
3483   LIBS="$LIBS -lbe -lroot -lnet"
3484 else
3485   echo "$ac_t""no" 1>&6
3486 :
3487 fi
3488
3489
3490
3491
3492
3493 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3494 echo "configure:3495: checking for ${CC-cc} option to accept ANSI C" >&5
3495 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3496   echo $ac_n "(cached) $ac_c" 1>&6
3497 else
3498   am_cv_prog_cc_stdc=no
3499 ac_save_CC="$CC"
3500 # Don't try gcc -ansi; that turns off useful extensions and
3501 # breaks some systems' header files.
3502 # AIX                   -qlanglvl=ansi
3503 # Ultrix and OSF/1      -std1
3504 # HP-UX 10.20 and later -Ae
3505 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3506 # SVR4                  -Xc -D__EXTENSIONS__
3507 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3508 do
3509   CC="$ac_save_CC $ac_arg"
3510   cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3513 #include <stdarg.h>
3514 #include <stdio.h>
3515 #include <sys/types.h>
3516 #include <sys/stat.h>
3517 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3518 struct buf { int x; };
3519 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3520 static char *e (p, i)
3521      char **p;
3522      int i;
3523 {
3524   return p[i];
3525 }
3526 static char *f (char * (*g) (char **, int), char **p, ...)
3527 {
3528   char *s;
3529   va_list v;
3530   va_start (v,p);
3531   s = g (p, va_arg (v,int));
3532   va_end (v);
3533   return s;
3534 }
3535 int test (int i, double x);
3536 struct s1 {int (*f) (int a);};
3537 struct s2 {int (*f) (double a);};
3538 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3539 int argc;
3540 char **argv;
3541
3542 int main() {
3543
3544 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3545
3546 ; return 0; }
3547 EOF
3548 if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3549   rm -rf conftest*
3550   am_cv_prog_cc_stdc="$ac_arg"; break
3551 else
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554 fi
3555 rm -f conftest*
3556 done
3557 CC="$ac_save_CC"
3558
3559 fi
3560
3561 if test -z "$am_cv_prog_cc_stdc"; then
3562   echo "$ac_t""none needed" 1>&6
3563 else
3564   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3565 fi
3566 case "x$am_cv_prog_cc_stdc" in
3567   x|xno) ;;
3568   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3569 esac
3570
3571 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3572         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3573 fi
3574
3575 # test for make depend flag
3576 OL_MKDEP=
3577 OL_MKDEP_FLAGS=
3578 if test -z "${MKDEP}"; then
3579         OL_MKDEP="${CC-cc}"
3580         if test -z "${MKDEP_FLAGS}"; then
3581                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3582 echo "configure:3583: checking for ${OL_MKDEP} depend flag" >&5
3583 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   
3587                         ol_cv_mkdep=no
3588                         for flag in "-M" "-xM"; do
3589                                 cat > conftest.c <<EOF
3590  noCode;
3591 EOF
3592                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3593                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3594                                 then
3595                                         if test ! -f conftest."${ac_object}" ; then
3596                                                 ol_cv_mkdep=$flag
3597                                                 OL_MKDEP_FLAGS="$flag"
3598                                                 break
3599                                         fi
3600                                 fi
3601                         done
3602                         rm -f conftest*
3603                 
3604 fi
3605
3606 echo "$ac_t""$ol_cv_mkdep" 1>&6
3607         else
3608                 cc_cv_mkdep=yes
3609                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3610         fi
3611 else
3612         cc_cv_mkdep=yes
3613         OL_MKDEP="${MKDEP}"
3614         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3615 fi
3616
3617
3618
3619 if test "${ol_cv_mkdep}" = no ; then
3620         # this will soon become an error
3621         echo "configure: warning: do not know how to generate dependencies" 1>&2
3622 fi
3623
3624 ol_link_modules=no
3625 if test $ol_enable_modules != no ; then
3626         # Extract the first word of "glib-config", so it can be a program name with args.
3627 set dummy glib-config; ac_word=$2
3628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3629 echo "configure:3630: checking for $ac_word" >&5
3630 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   case "$GLIBCONFIG" in
3634   /*)
3635   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
3636   ;;
3637   ?:/*)                  
3638   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
3639   ;;
3640   *)
3641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3642   ac_dummy="$PATH"
3643   for ac_dir in $ac_dummy; do 
3644     test -z "$ac_dir" && ac_dir=.
3645     if test -f $ac_dir/$ac_word; then
3646       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
3647       break
3648     fi
3649   done
3650   IFS="$ac_save_ifs"
3651   ;;
3652 esac
3653 fi
3654 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
3655 if test -n "$GLIBCONFIG"; then
3656   echo "$ac_t""$GLIBCONFIG" 1>&6
3657 else
3658   echo "$ac_t""no" 1>&6
3659 fi
3660
3661
3662         if test "no$GLIBCONFIG" = "no" ; then
3663                 if test $ol_enable_modules = yes ; then
3664                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
3665                 fi
3666
3667         else
3668                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
3669                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
3670                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
3671
3672                                 ol_link_modules=yes
3673         fi
3674 else
3675         ol_with_bdb2_module=static
3676         ol_with_ldap_module=static
3677         ol_with_ldbm_module=static
3678         ol_with_passwd_module=static
3679         ol_with_perl_module=static
3680         ol_with_shell_module=static
3681         ol_with_tcl_module=static
3682 fi
3683
3684 # test for EBCDIC
3685 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3686 echo "configure:3687: checking for EBCDIC" >&5
3687 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   
3691         cat > conftest.$ac_ext <<EOF
3692 #line 3693 "configure"
3693 #include "confdefs.h"
3694
3695 #if !('M' == 0xd4)
3696 #include <__ASCII__/generate_error.h>
3697 #endif
3698
3699 EOF
3700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3701 { (eval echo configure:3702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3703 if test -z "$ac_err"; then
3704   rm -rf conftest*
3705   ol_cv_cpp_ebcdic=yes
3706 else
3707   echo "$ac_err" >&5
3708   echo "configure: failed program was:" >&5
3709   cat conftest.$ac_ext >&5
3710   rm -rf conftest*
3711   ol_cv_cpp_ebcdic=no
3712 fi
3713 rm -f conftest*
3714 fi
3715
3716 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3717 if test $ol_cv_cpp_ebcdic = yes ; then
3718         cat >> confdefs.h <<\EOF
3719 #define HAVE_EBCDIC 1
3720 EOF
3721
3722 fi
3723
3724 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3725 echo "configure:3726: checking for ANSI C header files" >&5
3726 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3727   echo $ac_n "(cached) $ac_c" 1>&6
3728 else
3729   cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 #include <stdlib.h>
3733 #include <stdarg.h>
3734 #include <string.h>
3735 #include <float.h>
3736 EOF
3737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3738 { (eval echo configure:3739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3740 if test -z "$ac_err"; then
3741   rm -rf conftest*
3742   ol_cv_header_stdc=yes
3743 else
3744   echo "$ac_err" >&5
3745   echo "configure: failed program was:" >&5
3746   cat conftest.$ac_ext >&5
3747   rm -rf conftest*
3748   ol_cv_header_stdc=no
3749 fi
3750 rm -f conftest*
3751
3752 if test $ol_cv_header_stdc = yes; then
3753   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3754 cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757 #include <string.h>
3758 EOF
3759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3760   egrep "memchr" >/dev/null 2>&1; then
3761   :
3762 else
3763   rm -rf conftest*
3764   ol_cv_header_stdc=no
3765 fi
3766 rm -f conftest*
3767
3768 fi
3769
3770 if test $ol_cv_header_stdc = yes; then
3771   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3772 cat > conftest.$ac_ext <<EOF
3773 #line 3774 "configure"
3774 #include "confdefs.h"
3775 #include <stdlib.h>
3776 EOF
3777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3778   egrep "free" >/dev/null 2>&1; then
3779   :
3780 else
3781   rm -rf conftest*
3782   ol_cv_header_stdc=no
3783 fi
3784 rm -f conftest*
3785
3786 fi
3787
3788 if test $ol_cv_header_stdc = yes; then
3789   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3790 if test "$cross_compiling" = yes; then
3791   :
3792 else
3793   cat > conftest.$ac_ext <<EOF
3794 #line 3795 "configure"
3795 #include "confdefs.h"
3796 #include <ctype.h>
3797 #ifndef HAVE_EBCDIC
3798 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3799 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3800 #else
3801 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3802                 || ('j' <= (c) && (c) <= 'r') \
3803                 || ('s' <= (c) && (c) <= 'z'))
3804 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3805 #endif
3806 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3807 int main () { int i; for (i = 0; i < 256; i++)
3808 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3809 exit (0); }
3810
3811 EOF
3812 if { (eval echo configure:3813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3813 then
3814   :
3815 else
3816   echo "configure: failed program was:" >&5
3817   cat conftest.$ac_ext >&5
3818   rm -fr conftest*
3819   ol_cv_header_stdc=no
3820 fi
3821 rm -fr conftest*
3822 fi
3823
3824 fi
3825 fi
3826
3827 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3828 if test $ol_cv_header_stdc = yes; then
3829   cat >> confdefs.h <<\EOF
3830 #define STDC_HEADERS 1
3831 EOF
3832
3833 fi
3834 ac_cv_header_stdc=disable
3835
3836
3837 if test $ol_cv_header_stdc != yes; then
3838         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3839 fi
3840
3841 ac_header_dirent=no
3842 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3843 do
3844 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3845 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3846 echo "configure:3847: checking for $ac_hdr that defines DIR" >&5
3847 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
3848   echo $ac_n "(cached) $ac_c" 1>&6
3849 else
3850   cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 #include <sys/types.h>
3854 #include <$ac_hdr>
3855 int main() {
3856 DIR *dirp = 0;
3857 ; return 0; }
3858 EOF
3859 if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3860   rm -rf conftest*
3861   eval "ac_cv_header_dirent_$ac_safe=yes"
3862 else
3863   echo "configure: failed program was:" >&5
3864   cat conftest.$ac_ext >&5
3865   rm -rf conftest*
3866   eval "ac_cv_header_dirent_$ac_safe=no"
3867 fi
3868 rm -f conftest*
3869 fi
3870 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3871   echo "$ac_t""yes" 1>&6
3872     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3873   cat >> confdefs.h <<EOF
3874 #define $ac_tr_hdr 1
3875 EOF
3876  ac_header_dirent=$ac_hdr; break
3877 else
3878   echo "$ac_t""no" 1>&6
3879 fi
3880 done
3881 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3882 if test $ac_header_dirent = dirent.h; then
3883 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3884 echo "configure:3885: checking for opendir in -ldir" >&5
3885 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
3886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3887   echo $ac_n "(cached) $ac_c" 1>&6
3888 else
3889   ac_save_LIBS="$LIBS"
3890 LIBS="-ldir  $LIBS"
3891 cat > conftest.$ac_ext <<EOF
3892 #line 3893 "configure"
3893 #include "confdefs.h"
3894 /* Override any gcc2 internal prototype to avoid an error.  */
3895 /* We use char because int might match the return type of a gcc2
3896     builtin and then its argument prototype would still apply.  */
3897 char opendir();
3898
3899 int main() {
3900 opendir()
3901 ; return 0; }
3902 EOF
3903 if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3904   rm -rf conftest*
3905   eval "ac_cv_lib_$ac_lib_var=yes"
3906 else
3907   echo "configure: failed program was:" >&5
3908   cat conftest.$ac_ext >&5
3909   rm -rf conftest*
3910   eval "ac_cv_lib_$ac_lib_var=no"
3911 fi
3912 rm -f conftest*
3913 LIBS="$ac_save_LIBS"
3914
3915 fi
3916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3917   echo "$ac_t""yes" 1>&6
3918   LIBS="$LIBS -ldir"
3919 else
3920   echo "$ac_t""no" 1>&6
3921 fi
3922
3923 else
3924 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3925 echo "configure:3926: checking for opendir in -lx" >&5
3926 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
3927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3928   echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930   ac_save_LIBS="$LIBS"
3931 LIBS="-lx  $LIBS"
3932 cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3935 /* Override any gcc2 internal prototype to avoid an error.  */
3936 /* We use char because int might match the return type of a gcc2
3937     builtin and then its argument prototype would still apply.  */
3938 char opendir();
3939
3940 int main() {
3941 opendir()
3942 ; return 0; }
3943 EOF
3944 if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3945   rm -rf conftest*
3946   eval "ac_cv_lib_$ac_lib_var=yes"
3947 else
3948   echo "configure: failed program was:" >&5
3949   cat conftest.$ac_ext >&5
3950   rm -rf conftest*
3951   eval "ac_cv_lib_$ac_lib_var=no"
3952 fi
3953 rm -f conftest*
3954 LIBS="$ac_save_LIBS"
3955
3956 fi
3957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3958   echo "$ac_t""yes" 1>&6
3959   LIBS="$LIBS -lx"
3960 else
3961   echo "$ac_t""no" 1>&6
3962 fi
3963
3964 fi
3965
3966 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3967 echo "configure:3968: checking for sys/wait.h that is POSIX.1 compatible" >&5
3968 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
3969   echo $ac_n "(cached) $ac_c" 1>&6
3970 else
3971   cat > conftest.$ac_ext <<EOF
3972 #line 3973 "configure"
3973 #include "confdefs.h"
3974 #include <sys/types.h>
3975 #include <sys/wait.h>
3976 #ifndef WEXITSTATUS
3977 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3978 #endif
3979 #ifndef WIFEXITED
3980 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3981 #endif
3982 int main() {
3983 int s;
3984 wait (&s);
3985 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3986 ; return 0; }
3987 EOF
3988 if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3989   rm -rf conftest*
3990   ac_cv_header_sys_wait_h=yes
3991 else
3992   echo "configure: failed program was:" >&5
3993   cat conftest.$ac_ext >&5
3994   rm -rf conftest*
3995   ac_cv_header_sys_wait_h=no
3996 fi
3997 rm -f conftest*
3998 fi
3999
4000 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4001 if test $ac_cv_header_sys_wait_h = yes; then
4002   cat >> confdefs.h <<\EOF
4003 #define HAVE_SYS_WAIT_H 1
4004 EOF
4005
4006 fi
4007
4008 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4009 echo "configure:4010: checking POSIX termios" >&5
4010 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4011   echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013   cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 #include <sys/types.h>
4017 #include <unistd.h>
4018 #include <termios.h>
4019 int main() {
4020 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4021    tcgetattr(0, 0);
4022 ; return 0; }
4023 EOF
4024 if { (eval echo configure:4025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4025   rm -rf conftest*
4026   am_cv_sys_posix_termios=yes
4027 else
4028   echo "configure: failed program was:" >&5
4029   cat conftest.$ac_ext >&5
4030   rm -rf conftest*
4031   am_cv_sys_posix_termios=no
4032 fi
4033 rm -f conftest*
4034 fi
4035
4036 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4037
4038
4039  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4040 echo "configure:4041: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4041 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4042   echo $ac_n "(cached) $ac_c" 1>&6
4043 else
4044   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4045
4046   gwinsz_in_termios_h=no
4047   if test $am_cv_sys_posix_termios = yes; then
4048     cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051 #include <sys/types.h>
4052 #     include <termios.h>
4053 #     ifdef TIOCGWINSZ
4054         yes
4055 #     endif
4056     
4057 EOF
4058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4059   egrep "yes" >/dev/null 2>&1; then
4060   rm -rf conftest*
4061   gwinsz_in_termios_h=yes
4062 fi
4063 rm -f conftest*
4064
4065   fi
4066
4067   if test $gwinsz_in_termios_h = no; then
4068     cat > conftest.$ac_ext <<EOF
4069 #line 4070 "configure"
4070 #include "confdefs.h"
4071 #include <sys/types.h>
4072 #     include <sys/ioctl.h>
4073 #     ifdef TIOCGWINSZ
4074         yes
4075 #     endif
4076     
4077 EOF
4078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4079   egrep "yes" >/dev/null 2>&1; then
4080   rm -rf conftest*
4081   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4082 fi
4083 rm -f conftest*
4084
4085   fi
4086   
4087 fi
4088
4089 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4090   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4091     cat >> confdefs.h <<\EOF
4092 #define GWINSZ_IN_SYS_IOCTL 1
4093 EOF
4094
4095   fi
4096
4097 if test $am_cv_sys_posix_termios = yes ; then
4098         cat >> confdefs.h <<\EOF
4099 #define HAVE_POSIX_TERMIOS 1
4100 EOF
4101
4102 fi
4103
4104 for ac_hdr in \
4105         arpa/inet.h             \
4106         arpa/nameser.h  \
4107         assert.h                \
4108         crypt.h                 \
4109         errno.h                 \
4110         fcntl.h                 \
4111         filio.h                 \
4112         getopt.h                \
4113         grp.h                   \
4114         libutil.h               \
4115         limits.h                \
4116         locale.h                \
4117         netinet/tcp.h   \
4118         malloc.h                \
4119         memory.h                \
4120         psap.h                  \
4121         pwd.h                   \
4122         resolv.h                \
4123         sgtty.h                 \
4124         shadow.h                \
4125         stdarg.h                \
4126         stddef.h                \
4127         string.h                \
4128         strings.h               \
4129         sysexits.h              \
4130         sys/file.h              \
4131         sys/filio.h             \
4132         sys/errno.h             \
4133         sys/ioctl.h             \
4134         sys/param.h             \
4135         sys/resource.h  \
4136         sys/select.h    \
4137         sys/socket.h    \
4138         sys/syslog.h    \
4139         sys/time.h              \
4140         sys/types.h             \
4141         syslog.h                \
4142         termios.h               \
4143         unistd.h                \
4144
4145 do
4146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4148 echo "configure:4149: checking for $ac_hdr" >&5
4149 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4150   echo $ac_n "(cached) $ac_c" 1>&6
4151 else
4152   cat > conftest.$ac_ext <<EOF
4153 #line 4154 "configure"
4154 #include "confdefs.h"
4155 #include <$ac_hdr>
4156 EOF
4157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4158 { (eval echo configure:4159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4160 if test -z "$ac_err"; then
4161   rm -rf conftest*
4162   eval "ac_cv_header_$ac_safe=yes"
4163 else
4164   echo "$ac_err" >&5
4165   echo "configure: failed program was:" >&5
4166   cat conftest.$ac_ext >&5
4167   rm -rf conftest*
4168   eval "ac_cv_header_$ac_safe=no"
4169 fi
4170 rm -f conftest*
4171 fi
4172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4173   echo "$ac_t""yes" 1>&6
4174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4175   cat >> confdefs.h <<EOF
4176 #define $ac_tr_hdr 1
4177 EOF
4178  
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182 done
4183
4184
4185
4186
4187 echo $ac_n "checking for socket""... $ac_c" 1>&6
4188 echo "configure:4189: checking for socket" >&5
4189 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 /* System header to define __stub macros and hopefully few prototypes,
4196     which can conflict with char socket(); below.  */
4197 #include <assert.h>
4198 /* Override any gcc2 internal prototype to avoid an error.  */
4199 /* We use char because int might match the return type of a gcc2
4200     builtin and then its argument prototype would still apply.  */
4201 char socket();
4202 char (*f)();
4203
4204 int main() {
4205
4206 /* The GNU C library defines this for functions which it implements
4207     to always fail with ENOSYS.  Some functions are actually named
4208     something starting with __ and the normal name is an alias.  */
4209 #if defined (__stub_socket) || defined (__stub___socket)
4210 choke me
4211 #else
4212 f = socket;
4213 #endif
4214
4215 ; return 0; }
4216 EOF
4217 if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4218   rm -rf conftest*
4219   eval "ac_cv_func_socket=yes"
4220 else
4221   echo "configure: failed program was:" >&5
4222   cat conftest.$ac_ext >&5
4223   rm -rf conftest*
4224   eval "ac_cv_func_socket=no"
4225 fi
4226 rm -f conftest*
4227 fi
4228
4229 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4230   echo "$ac_t""yes" 1>&6
4231   :
4232 else
4233   echo "$ac_t""no" 1>&6
4234         
4235         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4236 echo "configure:4237: checking for main in -lsocket" >&5
4237 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4238 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4239   echo $ac_n "(cached) $ac_c" 1>&6
4240 else
4241   ac_save_LIBS="$LIBS"
4242 LIBS="-lsocket  $LIBS"
4243 cat > conftest.$ac_ext <<EOF
4244 #line 4245 "configure"
4245 #include "confdefs.h"
4246
4247 int main() {
4248 main()
4249 ; return 0; }
4250 EOF
4251 if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4252   rm -rf conftest*
4253   eval "ac_cv_lib_$ac_lib_var=yes"
4254 else
4255   echo "configure: failed program was:" >&5
4256   cat conftest.$ac_ext >&5
4257   rm -rf conftest*
4258   eval "ac_cv_lib_$ac_lib_var=no"
4259 fi
4260 rm -f conftest*
4261 LIBS="$ac_save_LIBS"
4262
4263 fi
4264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4265   echo "$ac_t""yes" 1>&6
4266     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4267     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4268   cat >> confdefs.h <<EOF
4269 #define $ac_tr_lib 1
4270 EOF
4271
4272   LIBS="-lsocket $LIBS"
4273
4274 else
4275   echo "$ac_t""no" 1>&6
4276 fi
4277
4278         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4279 echo "configure:4280: checking for main in -lnet" >&5
4280 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4281 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   ac_save_LIBS="$LIBS"
4285 LIBS="-lnet  $LIBS"
4286 cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289
4290 int main() {
4291 main()
4292 ; return 0; }
4293 EOF
4294 if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4295   rm -rf conftest*
4296   eval "ac_cv_lib_$ac_lib_var=yes"
4297 else
4298   echo "configure: failed program was:" >&5
4299   cat conftest.$ac_ext >&5
4300   rm -rf conftest*
4301   eval "ac_cv_lib_$ac_lib_var=no"
4302 fi
4303 rm -f conftest*
4304 LIBS="$ac_save_LIBS"
4305
4306 fi
4307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4308   echo "$ac_t""yes" 1>&6
4309     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4310     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4311   cat >> confdefs.h <<EOF
4312 #define $ac_tr_lib 1
4313 EOF
4314
4315   LIBS="-lnet $LIBS"
4316
4317 else
4318   echo "$ac_t""no" 1>&6
4319 fi
4320
4321         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4322 echo "configure:4323: checking for socket in -lnet" >&5
4323 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4324 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   ac_save_LIBS="$LIBS"
4328 LIBS="-lnet  $LIBS"
4329 cat > conftest.$ac_ext <<EOF
4330 #line 4331 "configure"
4331 #include "confdefs.h"
4332 /* Override any gcc2 internal prototype to avoid an error.  */
4333 /* We use char because int might match the return type of a gcc2
4334     builtin and then its argument prototype would still apply.  */
4335 char socket();
4336
4337 int main() {
4338 socket()
4339 ; return 0; }
4340 EOF
4341 if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4342   rm -rf conftest*
4343   eval "ac_cv_lib_$ac_lib_var=yes"
4344 else
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -rf conftest*
4348   eval "ac_cv_lib_$ac_lib_var=no"
4349 fi
4350 rm -f conftest*
4351 LIBS="$ac_save_LIBS"
4352
4353 fi
4354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4355   echo "$ac_t""yes" 1>&6
4356     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4357     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4358   cat >> confdefs.h <<EOF
4359 #define $ac_tr_lib 1
4360 EOF
4361
4362   LIBS="-lnet $LIBS"
4363
4364 else
4365   echo "$ac_t""no" 1>&6
4366 fi
4367
4368         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4369 echo "configure:4370: checking for main in -lnsl_s" >&5
4370 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4372   echo $ac_n "(cached) $ac_c" 1>&6
4373 else
4374   ac_save_LIBS="$LIBS"
4375 LIBS="-lnsl_s  $LIBS"
4376 cat > conftest.$ac_ext <<EOF
4377 #line 4378 "configure"
4378 #include "confdefs.h"
4379
4380 int main() {
4381 main()
4382 ; return 0; }
4383 EOF
4384 if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4385   rm -rf conftest*
4386   eval "ac_cv_lib_$ac_lib_var=yes"
4387 else
4388   echo "configure: failed program was:" >&5
4389   cat conftest.$ac_ext >&5
4390   rm -rf conftest*
4391   eval "ac_cv_lib_$ac_lib_var=no"
4392 fi
4393 rm -f conftest*
4394 LIBS="$ac_save_LIBS"
4395
4396 fi
4397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4398   echo "$ac_t""yes" 1>&6
4399     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4401   cat >> confdefs.h <<EOF
4402 #define $ac_tr_lib 1
4403 EOF
4404
4405   LIBS="-lnsl_s $LIBS"
4406
4407 else
4408   echo "$ac_t""no" 1>&6
4409 fi
4410
4411         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4412 echo "configure:4413: checking for main in -lnsl" >&5
4413 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4415   echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417   ac_save_LIBS="$LIBS"
4418 LIBS="-lnsl  $LIBS"
4419 cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422
4423 int main() {
4424 main()
4425 ; return 0; }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4428   rm -rf conftest*
4429   eval "ac_cv_lib_$ac_lib_var=yes"
4430 else
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -rf conftest*
4434   eval "ac_cv_lib_$ac_lib_var=no"
4435 fi
4436 rm -f conftest*
4437 LIBS="$ac_save_LIBS"
4438
4439 fi
4440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4441   echo "$ac_t""yes" 1>&6
4442     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4443     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4444   cat >> confdefs.h <<EOF
4445 #define $ac_tr_lib 1
4446 EOF
4447
4448   LIBS="-lnsl $LIBS"
4449
4450 else
4451   echo "$ac_t""no" 1>&6
4452 fi
4453
4454         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4455 echo "configure:4456: checking for socket in -linet" >&5
4456 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4457 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4458   echo $ac_n "(cached) $ac_c" 1>&6
4459 else
4460   ac_save_LIBS="$LIBS"
4461 LIBS="-linet  $LIBS"
4462 cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465 /* Override any gcc2 internal prototype to avoid an error.  */
4466 /* We use char because int might match the return type of a gcc2
4467     builtin and then its argument prototype would still apply.  */
4468 char socket();
4469
4470 int main() {
4471 socket()
4472 ; return 0; }
4473 EOF
4474 if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4475   rm -rf conftest*
4476   eval "ac_cv_lib_$ac_lib_var=yes"
4477 else
4478   echo "configure: failed program was:" >&5
4479   cat conftest.$ac_ext >&5
4480   rm -rf conftest*
4481   eval "ac_cv_lib_$ac_lib_var=no"
4482 fi
4483 rm -f conftest*
4484 LIBS="$ac_save_LIBS"
4485
4486 fi
4487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4488   echo "$ac_t""yes" 1>&6
4489     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4490     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4491   cat >> confdefs.h <<EOF
4492 #define $ac_tr_lib 1
4493 EOF
4494
4495   LIBS="-linet $LIBS"
4496
4497 else
4498   echo "$ac_t""no" 1>&6
4499 fi
4500
4501         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4502 echo "configure:4503: checking for main in -lgen" >&5
4503 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4505   echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507   ac_save_LIBS="$LIBS"
4508 LIBS="-lgen  $LIBS"
4509 cat > conftest.$ac_ext <<EOF
4510 #line 4511 "configure"
4511 #include "confdefs.h"
4512
4513 int main() {
4514 main()
4515 ; return 0; }
4516 EOF
4517 if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4518   rm -rf conftest*
4519   eval "ac_cv_lib_$ac_lib_var=yes"
4520 else
4521   echo "configure: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   rm -rf conftest*
4524   eval "ac_cv_lib_$ac_lib_var=no"
4525 fi
4526 rm -f conftest*
4527 LIBS="$ac_save_LIBS"
4528
4529 fi
4530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4531   echo "$ac_t""yes" 1>&6
4532     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4533     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4534   cat >> confdefs.h <<EOF
4535 #define $ac_tr_lib 1
4536 EOF
4537
4538   LIBS="-lgen $LIBS"
4539
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543
4544
4545 fi
4546
4547
4548 echo $ac_n "checking for select""... $ac_c" 1>&6
4549 echo "configure:4550: checking for select" >&5
4550 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4551   echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553   cat > conftest.$ac_ext <<EOF
4554 #line 4555 "configure"
4555 #include "confdefs.h"
4556 /* System header to define __stub macros and hopefully few prototypes,
4557     which can conflict with char select(); below.  */
4558 #include <assert.h>
4559 /* Override any gcc2 internal prototype to avoid an error.  */
4560 /* We use char because int might match the return type of a gcc2
4561     builtin and then its argument prototype would still apply.  */
4562 char select();
4563 char (*f)();
4564
4565 int main() {
4566
4567 /* The GNU C library defines this for functions which it implements
4568     to always fail with ENOSYS.  Some functions are actually named
4569     something starting with __ and the normal name is an alias.  */
4570 #if defined (__stub_select) || defined (__stub___select)
4571 choke me
4572 #else
4573 f = select;
4574 #endif
4575
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   eval "ac_cv_func_select=yes"
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -rf conftest*
4585   eval "ac_cv_func_select=no"
4586 fi
4587 rm -f conftest*
4588 fi
4589
4590 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4591   echo "$ac_t""yes" 1>&6
4592   :
4593 else
4594   echo "$ac_t""no" 1>&6
4595 { echo "configure: error: select() required." 1>&2; exit 1; }
4596 fi
4597
4598
4599 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4600 echo "configure:4601: checking types of arguments for select()" >&5
4601  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4602   echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4608   echo $ac_n "(cached) $ac_c" 1>&6
4609 else
4610      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4611      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4612       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4613        cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616 #ifdef HAVE_SYS_TYPES_H
4617 #include <sys/types.h>
4618 #endif
4619 #ifdef HAVE_SYS_TIME_H
4620 #include <sys/time.h>
4621 #endif
4622 #ifdef HAVE_SYS_SELECT_H
4623 #include <sys/select.h>
4624 #endif
4625 #ifdef HAVE_SYS_SOCKET_H
4626 #include <sys/socket.h>
4627 #endif
4628 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);
4629 int main() {
4630
4631 ; return 0; }
4632 EOF
4633 if { (eval echo configure:4634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4634   rm -rf conftest*
4635           ac_not_found=no ; break 3
4636 else
4637   echo "configure: failed program was:" >&5
4638   cat conftest.$ac_ext >&5
4639   rm -rf conftest*
4640   ac_not_found=yes
4641 fi
4642 rm -f conftest*
4643       done
4644      done
4645     done
4646    
4647 fi
4648   
4649 fi
4650  
4651 fi
4652  if test "$ac_not_found" = yes; then
4653   ac_cv_func_select_arg1=int 
4654   ac_cv_func_select_arg234='int *' 
4655   ac_cv_func_select_arg5='struct timeval *'
4656  fi
4657  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4658  cat >> confdefs.h <<EOF
4659 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4660 EOF
4661
4662  cat >> confdefs.h <<EOF
4663 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4664 EOF
4665
4666  cat >> confdefs.h <<EOF
4667 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4668 EOF
4669
4670
4671
4672
4673 for ac_hdr in regex.h 
4674 do
4675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4677 echo "configure:4678: checking for $ac_hdr" >&5
4678 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4679   echo $ac_n "(cached) $ac_c" 1>&6
4680 else
4681   cat > conftest.$ac_ext <<EOF
4682 #line 4683 "configure"
4683 #include "confdefs.h"
4684 #include <$ac_hdr>
4685 EOF
4686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4687 { (eval echo configure:4688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4689 if test -z "$ac_err"; then
4690   rm -rf conftest*
4691   eval "ac_cv_header_$ac_safe=yes"
4692 else
4693   echo "$ac_err" >&5
4694   echo "configure: failed program was:" >&5
4695   cat conftest.$ac_ext >&5
4696   rm -rf conftest*
4697   eval "ac_cv_header_$ac_safe=no"
4698 fi
4699 rm -f conftest*
4700 fi
4701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4702   echo "$ac_t""yes" 1>&6
4703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4704   cat >> confdefs.h <<EOF
4705 #define $ac_tr_hdr 1
4706 EOF
4707  
4708 else
4709   echo "$ac_t""no" 1>&6
4710 fi
4711 done
4712
4713 if test "$ac_cv_header_regex_h" != yes ; then
4714         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4715 fi
4716 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4717 echo "configure:4718: checking for regfree" >&5
4718 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   cat > conftest.$ac_ext <<EOF
4722 #line 4723 "configure"
4723 #include "confdefs.h"
4724 /* System header to define __stub macros and hopefully few prototypes,
4725     which can conflict with char regfree(); below.  */
4726 #include <assert.h>
4727 /* Override any gcc2 internal prototype to avoid an error.  */
4728 /* We use char because int might match the return type of a gcc2
4729     builtin and then its argument prototype would still apply.  */
4730 char regfree();
4731 char (*f)();
4732
4733 int main() {
4734
4735 /* The GNU C library defines this for functions which it implements
4736     to always fail with ENOSYS.  Some functions are actually named
4737     something starting with __ and the normal name is an alias.  */
4738 #if defined (__stub_regfree) || defined (__stub___regfree)
4739 choke me
4740 #else
4741 f = regfree;
4742 #endif
4743
4744 ; return 0; }
4745 EOF
4746 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4747   rm -rf conftest*
4748   eval "ac_cv_func_regfree=yes"
4749 else
4750   echo "configure: failed program was:" >&5
4751   cat conftest.$ac_ext >&5
4752   rm -rf conftest*
4753   eval "ac_cv_func_regfree=no"
4754 fi
4755 rm -f conftest*
4756 fi
4757
4758 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4759   echo "$ac_t""yes" 1>&6
4760   :
4761 else
4762   echo "$ac_t""no" 1>&6
4763 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4764 fi
4765
4766
4767
4768 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4769 echo "configure:4770: checking for compatible POSIX regex" >&5
4770 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4771   echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773   
4774         if test "$cross_compiling" = yes; then
4775   ol_cv_c_posix_regex=cross
4776 else
4777   cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780
4781 #include <sys/types.h>
4782 #include <regex.h>
4783 static char *pattern, *string;
4784 main()
4785 {
4786         int rc;
4787         regex_t re;
4788
4789         pattern = "^A";
4790
4791         if(regcomp(&re, pattern, 0)) {
4792                 return -1;
4793         }
4794         
4795         string = "ALL MATCH";
4796         
4797         rc = regexec(&re, string, 0, (void*)0, 0);
4798
4799         regfree(&re);
4800
4801         return rc;
4802 }
4803 EOF
4804 if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4805 then
4806   ol_cv_c_posix_regex=yes
4807 else
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -fr conftest*
4811   ol_cv_c_posix_regex=no
4812 fi
4813 rm -fr conftest*
4814 fi
4815
4816 fi
4817
4818 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4819
4820 if test "$ol_cv_c_posix_regex" = no ; then
4821         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4822 fi
4823
4824
4825 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4826 echo "configure:4827: checking for sigset in -lV3" >&5
4827 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4829   echo $ac_n "(cached) $ac_c" 1>&6
4830 else
4831   ac_save_LIBS="$LIBS"
4832 LIBS="-lV3  $LIBS"
4833 cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 /* Override any gcc2 internal prototype to avoid an error.  */
4837 /* We use char because int might match the return type of a gcc2
4838     builtin and then its argument prototype would still apply.  */
4839 char sigset();
4840
4841 int main() {
4842 sigset()
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=yes"
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   eval "ac_cv_lib_$ac_lib_var=no"
4853 fi
4854 rm -f conftest*
4855 LIBS="$ac_save_LIBS"
4856
4857 fi
4858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4859   echo "$ac_t""yes" 1>&6
4860     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4861     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4862   cat >> confdefs.h <<EOF
4863 #define $ac_tr_lib 1
4864 EOF
4865
4866   LIBS="-lV3 $LIBS"
4867
4868 else
4869   echo "$ac_t""no" 1>&6
4870 fi
4871
4872
4873
4874 # find res_search
4875 if test $ol_enable_dns != no ; then
4876                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4877 echo "configure:4878: checking for res_search" >&5
4878 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4884 /* System header to define __stub macros and hopefully few prototypes,
4885     which can conflict with char res_search(); below.  */
4886 #include <assert.h>
4887 /* Override any gcc2 internal prototype to avoid an error.  */
4888 /* We use char because int might match the return type of a gcc2
4889     builtin and then its argument prototype would still apply.  */
4890 char res_search();
4891 char (*f)();
4892
4893 int main() {
4894
4895 /* The GNU C library defines this for functions which it implements
4896     to always fail with ENOSYS.  Some functions are actually named
4897     something starting with __ and the normal name is an alias.  */
4898 #if defined (__stub_res_search) || defined (__stub___res_search)
4899 choke me
4900 #else
4901 f = res_search;
4902 #endif
4903
4904 ; return 0; }
4905 EOF
4906 if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4907   rm -rf conftest*
4908   eval "ac_cv_func_res_search=yes"
4909 else
4910   echo "configure: failed program was:" >&5
4911   cat conftest.$ac_ext >&5
4912   rm -rf conftest*
4913   eval "ac_cv_func_res_search=no"
4914 fi
4915 rm -f conftest*
4916 fi
4917
4918 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4919   echo "$ac_t""yes" 1>&6
4920   :
4921 else
4922   echo "$ac_t""no" 1>&6
4923 fi
4924
4925         if test $ac_cv_func_res_search = no ; then 
4926                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4927 echo "configure:4928: checking for res_search in -lbind" >&5
4928 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
4929 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4930   echo $ac_n "(cached) $ac_c" 1>&6
4931 else
4932   ac_save_LIBS="$LIBS"
4933 LIBS="-lbind  $LIBS"
4934 cat > conftest.$ac_ext <<EOF
4935 #line 4936 "configure"
4936 #include "confdefs.h"
4937 /* Override any gcc2 internal prototype to avoid an error.  */
4938 /* We use char because int might match the return type of a gcc2
4939     builtin and then its argument prototype would still apply.  */
4940 char res_search();
4941
4942 int main() {
4943 res_search()
4944 ; return 0; }
4945 EOF
4946 if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=yes"
4949 else
4950   echo "configure: failed program was:" >&5
4951   cat conftest.$ac_ext >&5
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=no"
4954 fi
4955 rm -f conftest*
4956 LIBS="$ac_save_LIBS"
4957
4958 fi
4959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4960   echo "$ac_t""yes" 1>&6
4961     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4962     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4963   cat >> confdefs.h <<EOF
4964 #define $ac_tr_lib 1
4965 EOF
4966
4967   LIBS="-lbind $LIBS"
4968
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972
4973                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
4974         fi
4975         if test $ac_cv_func_res_search = no ; then 
4976                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
4977 echo "configure:4978: checking for res_search in -lresolv" >&5
4978 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
4979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4980   echo $ac_n "(cached) $ac_c" 1>&6
4981 else
4982   ac_save_LIBS="$LIBS"
4983 LIBS="-lresolv  $LIBS"
4984 cat > conftest.$ac_ext <<EOF
4985 #line 4986 "configure"
4986 #include "confdefs.h"
4987 /* Override any gcc2 internal prototype to avoid an error.  */
4988 /* We use char because int might match the return type of a gcc2
4989     builtin and then its argument prototype would still apply.  */
4990 char res_search();
4991
4992 int main() {
4993 res_search()
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=yes"
4999 else
5000   echo "configure: failed program was:" >&5
5001   cat conftest.$ac_ext >&5
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=no"
5004 fi
5005 rm -f conftest*
5006 LIBS="$ac_save_LIBS"
5007
5008 fi
5009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5010   echo "$ac_t""yes" 1>&6
5011     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5013   cat >> confdefs.h <<EOF
5014 #define $ac_tr_lib 1
5015 EOF
5016
5017   LIBS="-lresolv $LIBS"
5018
5019 else
5020   echo "$ac_t""no" 1>&6
5021 fi
5022
5023                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5024         fi
5025
5026         if test "$ac_cv_func_res_search" = yes ; then
5027                 cat >> confdefs.h <<\EOF
5028 #define HAVE_RES_SEARCH 1
5029 EOF
5030
5031         elif test $ol_enable_dns = yes ; then
5032                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5033         else
5034                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5035         fi
5036 fi
5037
5038
5039 # ISODE tests
5040 ol_link_isode=no
5041 if test $ol_enable_ldapd != no ; then
5042         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5043
5044                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5045 echo "configure:5046: checking for main in -lxtpp" >&5
5046 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   ac_save_LIBS="$LIBS"
5051 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5052 cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055
5056 int main() {
5057 main()
5058 ; return 0; }
5059 EOF
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=yes"
5063 else
5064   echo "configure: failed program was:" >&5
5065   cat conftest.$ac_ext >&5
5066   rm -rf conftest*
5067   eval "ac_cv_lib_$ac_lib_var=no"
5068 fi
5069 rm -f conftest*
5070 LIBS="$ac_save_LIBS"
5071
5072 fi
5073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5074   echo "$ac_t""yes" 1>&6
5075   
5076                 ol_link_isode=yes
5077                 cat >> confdefs.h <<\EOF
5078 #define HAVE_XTPP 1
5079 EOF
5080
5081                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5082                 
5083 else
5084   echo "$ac_t""no" 1>&6
5085 :
5086 fi
5087
5088         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5089 echo "configure:5090: checking for main in -ldsap" >&5
5090 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094   ac_save_LIBS="$LIBS"
5095 LIBS="-ldsap -lisode $LIBS"
5096 cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099
5100 int main() {
5101 main()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119   
5120                 ol_link_isode=yes
5121                 cat >> confdefs.h <<\EOF
5122 #define HAVE_DSAP 1
5123 EOF
5124
5125                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5126                 
5127 else
5128   echo "$ac_t""no" 1>&6
5129 :
5130 fi
5131
5132         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5133 echo "configure:5134: checking for main in -lisode" >&5
5134 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5135 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5136   echo $ac_n "(cached) $ac_c" 1>&6
5137 else
5138   ac_save_LIBS="$LIBS"
5139 LIBS="-lisode  $LIBS"
5140 cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143
5144 int main() {
5145 main()
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   eval "ac_cv_lib_$ac_lib_var=yes"
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154   rm -rf conftest*
5155   eval "ac_cv_lib_$ac_lib_var=no"
5156 fi
5157 rm -f conftest*
5158 LIBS="$ac_save_LIBS"
5159
5160 fi
5161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5162   echo "$ac_t""yes" 1>&6
5163   
5164                 ol_link_isode=yes
5165                 cat >> confdefs.h <<\EOF
5166 #define HAVE_ISODE 1
5167 EOF
5168
5169                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5170                 
5171 else
5172   echo "$ac_t""no" 1>&6
5173 :
5174 fi
5175
5176 fi
5177
5178 if test $ol_link_isode != no; then
5179         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5180 echo "configure:5181: checking for main in -lpp" >&5
5181 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5182 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5183   echo $ac_n "(cached) $ac_c" 1>&6
5184 else
5185   ac_save_LIBS="$LIBS"
5186 LIBS="-lpp  $LIBS"
5187 cat > conftest.$ac_ext <<EOF
5188 #line 5189 "configure"
5189 #include "confdefs.h"
5190
5191 int main() {
5192 main()
5193 ; return 0; }
5194 EOF
5195 if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5196   rm -rf conftest*
5197   eval "ac_cv_lib_$ac_lib_var=yes"
5198 else
5199   echo "configure: failed program was:" >&5
5200   cat conftest.$ac_ext >&5
5201   rm -rf conftest*
5202   eval "ac_cv_lib_$ac_lib_var=no"
5203 fi
5204 rm -f conftest*
5205 LIBS="$ac_save_LIBS"
5206
5207 fi
5208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5209   echo "$ac_t""yes" 1>&6
5210   
5211                 cat >> confdefs.h <<\EOF
5212 #define HAVE_PP 1
5213 EOF
5214
5215                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5216                 
5217 else
5218   echo "$ac_t""no" 1>&6
5219 :
5220 fi
5221
5222
5223         # Extract the first word of "pepsy", so it can be a program name with args.
5224 set dummy pepsy; ac_word=$2
5225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5226 echo "configure:5227: checking for $ac_word" >&5
5227 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5228   echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230   case "$PEPSY" in
5231   /*)
5232   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5233   ;;
5234   ?:/*)                  
5235   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5236   ;;
5237   *)
5238   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5239   ac_dummy="$PATH"
5240   for ac_dir in $ac_dummy; do 
5241     test -z "$ac_dir" && ac_dir=.
5242     if test -f $ac_dir/$ac_word; then
5243       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5244       break
5245     fi
5246   done
5247   IFS="$ac_save_ifs"
5248   ;;
5249 esac
5250 fi
5251 PEPSY="$ac_cv_path_PEPSY"
5252 if test -n "$PEPSY"; then
5253   echo "$ac_t""$PEPSY" 1>&6
5254 else
5255   echo "$ac_t""no" 1>&6
5256 fi
5257
5258 fi
5259
5260 ol_link_kerberos=no
5261
5262 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5263         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5264 do
5265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5267 echo "configure:5268: checking for $ac_hdr" >&5
5268 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5269   echo $ac_n "(cached) $ac_c" 1>&6
5270 else
5271   cat > conftest.$ac_ext <<EOF
5272 #line 5273 "configure"
5273 #include "confdefs.h"
5274 #include <$ac_hdr>
5275 EOF
5276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5277 { (eval echo configure:5278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5279 if test -z "$ac_err"; then
5280   rm -rf conftest*
5281   eval "ac_cv_header_$ac_safe=yes"
5282 else
5283   echo "$ac_err" >&5
5284   echo "configure: failed program was:" >&5
5285   cat conftest.$ac_ext >&5
5286   rm -rf conftest*
5287   eval "ac_cv_header_$ac_safe=no"
5288 fi
5289 rm -f conftest*
5290 fi
5291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5292   echo "$ac_t""yes" 1>&6
5293     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5294   cat >> confdefs.h <<EOF
5295 #define $ac_tr_hdr 1
5296 EOF
5297  
5298 else
5299   echo "$ac_t""no" 1>&6
5300 fi
5301 done
5302
5303
5304         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5305                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5306 echo "configure:5307: checking for main in -lkrb4" >&5
5307 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5309   echo $ac_n "(cached) $ac_c" 1>&6
5310 else
5311   ac_save_LIBS="$LIBS"
5312 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5313 cat > conftest.$ac_ext <<EOF
5314 #line 5315 "configure"
5315 #include "confdefs.h"
5316
5317 int main() {
5318 main()
5319 ; return 0; }
5320 EOF
5321 if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5322   rm -rf conftest*
5323   eval "ac_cv_lib_$ac_lib_var=yes"
5324 else
5325   echo "configure: failed program was:" >&5
5326   cat conftest.$ac_ext >&5
5327   rm -rf conftest*
5328   eval "ac_cv_lib_$ac_lib_var=no"
5329 fi
5330 rm -f conftest*
5331 LIBS="$ac_save_LIBS"
5332
5333 fi
5334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5335   echo "$ac_t""yes" 1>&6
5336   have_k5=yes
5337 else
5338   echo "$ac_t""no" 1>&6
5339 have_k5=no
5340 fi
5341
5342
5343                 if test $have_k5 = yes ; then
5344                         ol_with_kerberos=found
5345                         ol_link_kerberos=yes
5346
5347                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5348
5349                         LIBS="$KRB_LIBS $LIBS"
5350
5351                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5352 echo "configure:5353: checking for des_debug in Kerberos libraries" >&5
5353 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5354   echo $ac_n "(cached) $ac_c" 1>&6
5355 else
5356   
5357                                                                 save_LIBS="$LIBS"
5358                                 LIBS="$KRB_LIBS $LIBS"
5359                                 cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362
5363 #include <kerberosIV/krb.h>
5364 #include <kerberosIV/des.h>
5365 extern int des_debug;
5366
5367 int main() {
5368
5369 des_debug = 1;
5370
5371 ; return 0; }
5372 EOF
5373 if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5374   rm -rf conftest*
5375   ol_cv_var_des_debug=yes
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379   rm -rf conftest*
5380   ol_cv_var_des_debug=no
5381 fi
5382 rm -f conftest*
5383                                                                 LIBS="$save_LIBS"
5384                         
5385 fi
5386
5387 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5388
5389                         if test $ol_cv_var_des_debug = yes ; then
5390                                 cat >> confdefs.h <<\EOF
5391 #define HAVE_DES_DEBUG 1
5392 EOF
5393
5394                         fi
5395
5396                         LIBS="$save_LIBS"
5397                 fi
5398         fi
5399 fi
5400
5401 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5402         for ac_hdr in krb.h des.h
5403 do
5404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5406 echo "configure:5407: checking for $ac_hdr" >&5
5407 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5408   echo $ac_n "(cached) $ac_c" 1>&6
5409 else
5410   cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5413 #include <$ac_hdr>
5414 EOF
5415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5416 { (eval echo configure:5417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5418 if test -z "$ac_err"; then
5419   rm -rf conftest*
5420   eval "ac_cv_header_$ac_safe=yes"
5421 else
5422   echo "$ac_err" >&5
5423   echo "configure: failed program was:" >&5
5424   cat conftest.$ac_ext >&5
5425   rm -rf conftest*
5426   eval "ac_cv_header_$ac_safe=no"
5427 fi
5428 rm -f conftest*
5429 fi
5430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5431   echo "$ac_t""yes" 1>&6
5432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5433   cat >> confdefs.h <<EOF
5434 #define $ac_tr_hdr 1
5435 EOF
5436  
5437 else
5438   echo "$ac_t""no" 1>&6
5439 fi
5440 done
5441
5442
5443         if test $ac_cv_header_krb_h = yes ; then
5444                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5445 echo "configure:5446: checking for main in -lkrb" >&5
5446 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5447 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5448   echo $ac_n "(cached) $ac_c" 1>&6
5449 else
5450   ac_save_LIBS="$LIBS"
5451 LIBS="-lkrb -ldes $LIBS"
5452 cat > conftest.$ac_ext <<EOF
5453 #line 5454 "configure"
5454 #include "confdefs.h"
5455
5456 int main() {
5457 main()
5458 ; return 0; }
5459 EOF
5460 if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5461   rm -rf conftest*
5462   eval "ac_cv_lib_$ac_lib_var=yes"
5463 else
5464   echo "configure: failed program was:" >&5
5465   cat conftest.$ac_ext >&5
5466   rm -rf conftest*
5467   eval "ac_cv_lib_$ac_lib_var=no"
5468 fi
5469 rm -f conftest*
5470 LIBS="$ac_save_LIBS"
5471
5472 fi
5473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5474   echo "$ac_t""yes" 1>&6
5475   have_k4=yes
5476 else
5477   echo "$ac_t""no" 1>&6
5478 have_k4=no
5479 fi
5480
5481
5482                 if test $have_k4 = yes ; then
5483                         ol_with_kerberos=found
5484                         ol_link_kerberos=yes
5485
5486                         KRB_LIBS="-lkrb -ldes"
5487                 fi
5488         fi
5489 fi
5490
5491 if test $ol_link_kerberos = yes ; then
5492         cat >> confdefs.h <<\EOF
5493 #define HAVE_KERBEROS 1
5494 EOF
5495
5496 fi
5497
5498 ol_link_tls=no
5499 if test $ol_with_tls != no ; then
5500         
5501         for ac_hdr in openssl/ssl.h ssl.h
5502 do
5503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5504 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5505 echo "configure:5506: checking for $ac_hdr" >&5
5506 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5507   echo $ac_n "(cached) $ac_c" 1>&6
5508 else
5509   cat > conftest.$ac_ext <<EOF
5510 #line 5511 "configure"
5511 #include "confdefs.h"
5512 #include <$ac_hdr>
5513 EOF
5514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5515 { (eval echo configure:5516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5517 if test -z "$ac_err"; then
5518   rm -rf conftest*
5519   eval "ac_cv_header_$ac_safe=yes"
5520 else
5521   echo "$ac_err" >&5
5522   echo "configure: failed program was:" >&5
5523   cat conftest.$ac_ext >&5
5524   rm -rf conftest*
5525   eval "ac_cv_header_$ac_safe=no"
5526 fi
5527 rm -f conftest*
5528 fi
5529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5530   echo "$ac_t""yes" 1>&6
5531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5532   cat >> confdefs.h <<EOF
5533 #define $ac_tr_hdr 1
5534 EOF
5535  
5536 else
5537   echo "$ac_t""no" 1>&6
5538 fi
5539 done
5540
5541         
5542         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5543                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5544 echo "configure:5545: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5545 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5547   echo $ac_n "(cached) $ac_c" 1>&6
5548 else
5549   ac_save_LIBS="$LIBS"
5550 LIBS="-lssl -lcrypto $LIBS"
5551 cat > conftest.$ac_ext <<EOF
5552 #line 5553 "configure"
5553 #include "confdefs.h"
5554 /* Override any gcc2 internal prototype to avoid an error.  */
5555 /* We use char because int might match the return type of a gcc2
5556     builtin and then its argument prototype would still apply.  */
5557 char SSLeay_add_ssl_algorithms();
5558
5559 int main() {
5560 SSLeay_add_ssl_algorithms()
5561 ; return 0; }
5562 EOF
5563 if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5564   rm -rf conftest*
5565   eval "ac_cv_lib_$ac_lib_var=yes"
5566 else
5567   echo "configure: failed program was:" >&5
5568   cat conftest.$ac_ext >&5
5569   rm -rf conftest*
5570   eval "ac_cv_lib_$ac_lib_var=no"
5571 fi
5572 rm -f conftest*
5573 LIBS="$ac_save_LIBS"
5574
5575 fi
5576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5577   echo "$ac_t""yes" 1>&6
5578   have_ssleay=yes
5579                         need_rsaref=no
5580 else
5581   echo "$ac_t""no" 1>&6
5582 have_ssleay=no
5583 fi
5584
5585                         
5586                 if test $have_ssleay = no ; then
5587                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5588 echo "configure:5589: checking for SSL_library_init in -lssl" >&5
5589 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5591   echo $ac_n "(cached) $ac_c" 1>&6
5592 else
5593   ac_save_LIBS="$LIBS"
5594 LIBS="-lssl -lcrypto $LIBS"
5595 cat > conftest.$ac_ext <<EOF
5596 #line 5597 "configure"
5597 #include "confdefs.h"
5598 /* Override any gcc2 internal prototype to avoid an error.  */
5599 /* We use char because int might match the return type of a gcc2
5600     builtin and then its argument prototype would still apply.  */
5601 char SSL_library_init();
5602
5603 int main() {
5604 SSL_library_init()
5605 ; return 0; }
5606 EOF
5607 if { (eval echo configure:5608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5608   rm -rf conftest*
5609   eval "ac_cv_lib_$ac_lib_var=yes"
5610 else
5611   echo "configure: failed program was:" >&5
5612   cat conftest.$ac_ext >&5
5613   rm -rf conftest*
5614   eval "ac_cv_lib_$ac_lib_var=no"
5615 fi
5616 rm -f conftest*
5617 LIBS="$ac_save_LIBS"
5618
5619 fi
5620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5621   echo "$ac_t""yes" 1>&6
5622   have_ssleay=yes
5623                                 need_rsaref=no
5624 else
5625   echo "$ac_t""no" 1>&6
5626 have_ssleay=no
5627 fi
5628
5629                 fi
5630
5631                 if test $have_ssleay = no ; then
5632                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5633 echo "configure:5634: checking for ssl3_accept in -lssl" >&5
5634 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5636   echo $ac_n "(cached) $ac_c" 1>&6
5637 else
5638   ac_save_LIBS="$LIBS"
5639 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5640 cat > conftest.$ac_ext <<EOF
5641 #line 5642 "configure"
5642 #include "confdefs.h"
5643 /* Override any gcc2 internal prototype to avoid an error.  */
5644 /* We use char because int might match the return type of a gcc2
5645     builtin and then its argument prototype would still apply.  */
5646 char ssl3_accept();
5647
5648 int main() {
5649 ssl3_accept()
5650 ; return 0; }
5651 EOF
5652 if { (eval echo configure:5653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5653   rm -rf conftest*
5654   eval "ac_cv_lib_$ac_lib_var=yes"
5655 else
5656   echo "configure: failed program was:" >&5
5657   cat conftest.$ac_ext >&5
5658   rm -rf conftest*
5659   eval "ac_cv_lib_$ac_lib_var=no"
5660 fi
5661 rm -f conftest*
5662 LIBS="$ac_save_LIBS"
5663
5664 fi
5665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5666   echo "$ac_t""yes" 1>&6
5667   have_ssleay=yes
5668                                 need_rsaref=yes
5669 else
5670   echo "$ac_t""no" 1>&6
5671 have_ssleay=no
5672 fi
5673
5674                 fi
5675
5676                 if test $have_ssleay = yes ; then
5677                         ol_with_tls=found
5678                         ol_link_tls=yes
5679
5680                         cat >> confdefs.h <<\EOF
5681 #define HAVE_SSLEAY 1
5682 EOF
5683
5684
5685                         if test $need_rsaref = yes; then
5686                                 cat >> confdefs.h <<\EOF
5687 #define HAVE_RSAREF 1
5688 EOF
5689
5690
5691                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5692                         else
5693                                 TLS_LIBS="-lssl -lcrypto"
5694                         fi
5695                 fi
5696         fi
5697 fi
5698
5699 if test $ol_link_tls = yes ; then
5700         cat >> confdefs.h <<\EOF
5701 #define HAVE_TLS 1
5702 EOF
5703
5704 fi      
5705
5706 for ac_func in \
5707         ctime_r                 \
5708         gethostbyname_r gethostbyaddr_r \
5709
5710 do
5711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5712 echo "configure:5713: checking for $ac_func" >&5
5713 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5714   echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716   cat > conftest.$ac_ext <<EOF
5717 #line 5718 "configure"
5718 #include "confdefs.h"
5719 /* System header to define __stub macros and hopefully few prototypes,
5720     which can conflict with char $ac_func(); below.  */
5721 #include <assert.h>
5722 /* Override any gcc2 internal prototype to avoid an error.  */
5723 /* We use char because int might match the return type of a gcc2
5724     builtin and then its argument prototype would still apply.  */
5725 char $ac_func();
5726 char (*f)();
5727
5728 int main() {
5729
5730 /* The GNU C library defines this for functions which it implements
5731     to always fail with ENOSYS.  Some functions are actually named
5732     something starting with __ and the normal name is an alias.  */
5733 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5734 choke me
5735 #else
5736 f = $ac_func;
5737 #endif
5738
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   eval "ac_cv_func_$ac_func=yes"
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   eval "ac_cv_func_$ac_func=no"
5749 fi
5750 rm -f conftest*
5751 fi
5752
5753 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5754   echo "$ac_t""yes" 1>&6
5755     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5756   cat >> confdefs.h <<EOF
5757 #define $ac_tr_func 1
5758 EOF
5759  
5760 else
5761   echo "$ac_t""no" 1>&6
5762 fi
5763 done
5764
5765
5766 if test "$ac_cv_func_ctime_r" = no ; then
5767         ol_cv_func_ctime_r_nargs=0
5768 else
5769         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5770 echo "configure:5771: checking number of arguments of ctime_r" >&5
5771 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5772   echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774   cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777 #include <time.h>
5778 int main() {
5779 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5780 ; return 0; }
5781 EOF
5782 if { (eval echo configure:5783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5783   rm -rf conftest*
5784   ol_cv_func_ctime_r_nargs=3
5785 else
5786   echo "configure: failed program was:" >&5
5787   cat conftest.$ac_ext >&5
5788   rm -rf conftest*
5789   cat > conftest.$ac_ext <<EOF
5790 #line 5791 "configure"
5791 #include "confdefs.h"
5792 #include <time.h>
5793 int main() {
5794 time_t ti; char *buffer; ctime_r(&ti,buffer);
5795 ; return 0; }
5796 EOF
5797 if { (eval echo configure:5798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5798   rm -rf conftest*
5799   ol_cv_func_ctime_r_nargs=2
5800 else
5801   echo "configure: failed program was:" >&5
5802   cat conftest.$ac_ext >&5
5803   rm -rf conftest*
5804   ol_cv_func_ctime_r_nargs=0
5805 fi
5806 rm -f conftest*
5807 fi
5808 rm -f conftest*
5809 fi
5810
5811 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5812   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5813     cat >> confdefs.h <<EOF
5814 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5815 EOF
5816
5817   fi
5818
5819 fi
5820
5821 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5822         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5823 echo "configure:5824: checking number of arguments of gethostbyname_r" >&5
5824 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5825   echo $ac_n "(cached) $ac_c" 1>&6
5826 else
5827   cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 #include <sys/types.h>
5831 #include <sys/socket.h>
5832 #include <netinet/in.h>
5833 #include <netdb.h>
5834 #define BUFSIZE (sizeof(struct hostent)+10)
5835 int main() {
5836 struct hostent hent; char buffer[BUFSIZE];
5837                 int bufsize=BUFSIZE;int h_errno;
5838                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5839                         buffer, bufsize, &h_errno);
5840 ; return 0; }
5841 EOF
5842 if { (eval echo configure:5843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5843   rm -rf conftest*
5844   ol_cv_func_gethostbyname_r_nargs=5
5845 else
5846   echo "configure: failed program was:" >&5
5847   cat conftest.$ac_ext >&5
5848   rm -rf conftest*
5849   cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5852 #include <sys/types.h>
5853 #include <sys/socket.h>
5854 #include <netinet/in.h>
5855 #include <netdb.h>
5856 #define BUFSIZE (sizeof(struct hostent)+10)
5857 int main() {
5858 struct hostent hent;struct hostent *rhent;
5859                         char buffer[BUFSIZE];
5860                         int bufsize=BUFSIZE;int h_errno;
5861                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5862                                 &rhent, &h_errno);
5863 ; return 0; }
5864 EOF
5865 if { (eval echo configure:5866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5866   rm -rf conftest*
5867   ol_cv_func_gethostbyname_r_nargs=6
5868 else
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   ol_cv_func_gethostbyname_r_nargs=0
5873 fi
5874 rm -f conftest*
5875 fi
5876 rm -f conftest*
5877 fi
5878
5879 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5880   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5881         cat >> confdefs.h <<EOF
5882 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5883 EOF
5884
5885   fi
5886
5887 else
5888         ol_cv_func_gethostbyname_r_nargs=0
5889 fi
5890  
5891 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5892         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5893 echo "configure:5894: checking number of arguments of gethostbyaddr_r" >&5
5894 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5895   echo $ac_n "(cached) $ac_c" 1>&6
5896 else
5897   cat > conftest.$ac_ext <<EOF
5898 #line 5899 "configure"
5899 #include "confdefs.h"
5900 #include <sys/types.h>
5901 #include <sys/socket.h>
5902 #include <netinet/in.h>
5903 #include <netdb.h>
5904 #define BUFSIZE (sizeof(struct hostent)+10)
5905 int main() {
5906 struct hostent hent; char buffer[BUFSIZE]; 
5907             struct in_addr add;
5908             size_t alen=sizeof(struct in_addr);
5909             int bufsize=BUFSIZE;int h_errno;
5910                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5911                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5912 ; return 0; }
5913 EOF
5914 if { (eval echo configure:5915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5915   rm -rf conftest*
5916   ol_cv_func_gethostbyaddr_r_nargs=7
5917 else
5918   echo "configure: failed program was:" >&5
5919   cat conftest.$ac_ext >&5
5920   rm -rf conftest*
5921   cat > conftest.$ac_ext <<EOF
5922 #line 5923 "configure"
5923 #include "confdefs.h"
5924 #include <sys/types.h>
5925 #include <sys/socket.h>
5926 #include <netinet/in.h>
5927 #include <netdb.h>
5928 #define BUFSIZE (sizeof(struct hostent)+10)
5929 int main() {
5930 struct hostent hent;
5931                         struct hostent *rhent; char buffer[BUFSIZE]; 
5932                         struct in_addr add;
5933                         size_t alen=sizeof(struct in_addr);
5934                         int bufsize=BUFSIZE;int h_errno;
5935                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5936                                 alen, AF_INET, &hent, buffer, bufsize, 
5937                                 &rhent, &h_errno);
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5941   rm -rf conftest*
5942   ol_cv_func_gethostbyaddr_r_nargs=8
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   ol_cv_func_gethostbyaddr_r_nargs=0
5948 fi
5949 rm -f conftest*
5950 fi
5951 rm -f conftest*
5952 fi
5953
5954 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5955   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5956     cat >> confdefs.h <<EOF
5957 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5958 EOF
5959
5960   fi
5961
5962 else
5963         ol_cv_func_gethostbyaddr_r_nargs=0
5964 fi
5965
5966 if test "$ac_cv_func_ctime_r" = yes \
5967         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5968         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5969         -a "$ac_cv_func_gethostbyname_r" = yes \
5970         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5971         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5972         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5973         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5974         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5975         ; then
5976  
5977         cat >> confdefs.h <<\EOF
5978 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5979 EOF
5980
5981 fi
5982
5983 ol_link_threads=no
5984 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5985         -o $ol_with_threads = posix ; then
5986
5987         for ac_hdr in pthread.h sched.h
5988 do
5989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5991 echo "configure:5992: checking for $ac_hdr" >&5
5992 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5993   echo $ac_n "(cached) $ac_c" 1>&6
5994 else
5995   cat > conftest.$ac_ext <<EOF
5996 #line 5997 "configure"
5997 #include "confdefs.h"
5998 #include <$ac_hdr>
5999 EOF
6000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6001 { (eval echo configure:6002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6003 if test -z "$ac_err"; then
6004   rm -rf conftest*
6005   eval "ac_cv_header_$ac_safe=yes"
6006 else
6007   echo "$ac_err" >&5
6008   echo "configure: failed program was:" >&5
6009   cat conftest.$ac_ext >&5
6010   rm -rf conftest*
6011   eval "ac_cv_header_$ac_safe=no"
6012 fi
6013 rm -f conftest*
6014 fi
6015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6016   echo "$ac_t""yes" 1>&6
6017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6018   cat >> confdefs.h <<EOF
6019 #define $ac_tr_hdr 1
6020 EOF
6021  
6022 else
6023   echo "$ac_t""no" 1>&6
6024 fi
6025 done
6026
6027
6028         if test $ac_cv_header_pthread_h = yes ; then
6029                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6030 echo "configure:6031: checking POSIX thread version" >&5
6031 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6032   echo $ac_n "(cached) $ac_c" 1>&6
6033 else
6034   
6035         cat > conftest.$ac_ext <<EOF
6036 #line 6037 "configure"
6037 #include "confdefs.h"
6038
6039 #               include <pthread.h>
6040                 /* this check could be improved */
6041 #               ifdef PTHREAD_ONCE_INIT
6042                         pthread_version_final
6043 #               endif
6044         
6045 EOF
6046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6047   egrep "pthread_version_final" >/dev/null 2>&1; then
6048   rm -rf conftest*
6049   ol_pthread_final=yes
6050 else
6051   rm -rf conftest*
6052   ol_pthread_final=no
6053 fi
6054 rm -f conftest*
6055
6056
6057         cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060
6061 #               include <pthread.h>
6062                 /* this check could be improved */
6063 #               ifdef pthread_once_init
6064                         pthread_version_draft4
6065 #               endif
6066         
6067 EOF
6068 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6069   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6070   rm -rf conftest*
6071   ol_pthread_draft4=yes
6072 else
6073   rm -rf conftest*
6074   ol_pthread_draft4=no
6075 fi
6076 rm -f conftest*
6077
6078
6079         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6080                 ol_cv_pthread_version=final
6081         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6082                 ol_cv_pthread_version=draft4
6083         else
6084                 ol_cv_pthread_version=unknown
6085         fi
6086
6087 fi
6088
6089 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6090
6091
6092                 if test $ol_cv_pthread_version = final ; then
6093                         cat >> confdefs.h <<\EOF
6094 #define HAVE_PTHREADS_FINAL 1
6095 EOF
6096
6097                 elif test $ol_cv_pthread_version = draft4 ; then
6098                         cat >> confdefs.h <<\EOF
6099 #define HAVE_PTHREADS_D4 1
6100 EOF
6101
6102                 else
6103                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6104                 fi
6105
6106                 # consider threads found
6107                 ol_with_threads=found
6108
6109                 
6110         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6111 echo "configure:6112: checking for LinuxThreads pthread.h" >&5
6112 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6113   echo $ac_n "(cached) $ac_c" 1>&6
6114 else
6115   cat > conftest.$ac_ext <<EOF
6116 #line 6117 "configure"
6117 #include "confdefs.h"
6118 #include <pthread.h>
6119 EOF
6120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6121   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6122   rm -rf conftest*
6123   ol_cv_header_linux_threads=yes
6124 else
6125   rm -rf conftest*
6126   ol_cv_header_linux_threads=no
6127 fi
6128 rm -f conftest*
6129
6130                 
6131 fi
6132
6133 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6134         if test $ol_cv_header_linux_threads = yes; then
6135                 cat >> confdefs.h <<\EOF
6136 #define HAVE_LINUX_THREADS 1
6137 EOF
6138
6139         fi
6140
6141
6142                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6143                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6144 echo "configure:6145: checking for pthread_create in default libraries" >&5
6145 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6146   echo $ac_n "(cached) $ac_c" 1>&6
6147 else
6148   
6149                 if test "$cross_compiling" = yes; then
6150                         ol_cv_pthread_create=yes
6151 else
6152   cat > conftest.$ac_ext <<EOF
6153 #line 6154 "configure"
6154 #include "confdefs.h"
6155
6156 #include <pthread.h>
6157 #ifndef NULL
6158 #define NULL (void*)0
6159 #endif
6160
6161 static void *task(p)
6162         void *p;
6163 {
6164         return (void *) (p == NULL);
6165 }
6166
6167 int main(argc, argv)
6168         int argc;
6169         char **argv;
6170 {
6171         pthread_t t;
6172         int status;
6173
6174         /* make sure pthread_create() isn't just a stub */
6175 #if HAVE_PTHREADS_D4
6176         status = pthread_create(&t, pthread_attr_default, task, NULL);
6177 #else
6178         status = pthread_create(&t, NULL, task, NULL);
6179 #endif
6180
6181         if( status ) return status;
6182
6183         /* make sure pthread_detach() isn't just a stub */
6184 #if HAVE_PTHREADS_D4
6185         status = pthread_detach( &t );
6186 #else
6187         status = pthread_detach( t );
6188 #endif
6189
6190         return status;
6191 }
6192
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6195 then
6196   ol_cv_pthread_create=yes
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -fr conftest*
6201   ol_cv_pthread_create=no
6202 fi
6203 rm -fr conftest*
6204 fi
6205
6206 fi
6207
6208 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6209
6210                 if test $ol_cv_pthread_create != no ; then
6211                         ol_link_threads=posix
6212                         ol_link_pthreads=""
6213                 fi
6214                 
6215                 # Pthread try link: -mt (ol_cv_pthread_mt)
6216         if test "$ol_link_threads" = no ; then
6217                 # try -mt
6218                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6219 echo "configure:6220: checking for pthread link with -mt" >&5
6220 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6221   echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223   
6224                         # save the flags
6225                         ol_LIBS="$LIBS"
6226                         LIBS="-mt $LIBS"
6227
6228                         cat > conftest.$ac_ext <<EOF
6229 #line 6230 "configure"
6230 #include "confdefs.h"
6231
6232 #include <pthread.h>
6233 #ifndef NULL
6234 #define NULL (void*)0
6235 #endif
6236
6237 int main() {
6238
6239         pthread_t t;
6240
6241 #if HAVE_PTHREADS_D4
6242         pthread_create(&t, pthread_attr_default, NULL, NULL);
6243         pthread_detach( &t );
6244 #else
6245         pthread_create(&t, NULL, NULL, NULL);
6246         pthread_detach( t );
6247 #endif
6248 #ifdef HAVE_LINUX_THREADS
6249         pthread_kill_other_threads_np();
6250 #endif
6251
6252 ; return 0; }
6253 EOF
6254 if { (eval echo configure:6255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6255   rm -rf conftest*
6256   ol_cv_pthread_mt=yes
6257 else
6258   echo "configure: failed program was:" >&5
6259   cat conftest.$ac_ext >&5
6260   rm -rf conftest*
6261   ol_cv_pthread_mt=no
6262 fi
6263 rm -f conftest*
6264
6265                 # restore the LIBS
6266                 LIBS="$ol_LIBS"
6267                 
6268 fi
6269
6270 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6271
6272                 if test $ol_cv_pthread_mt = yes ; then
6273                         ol_link_pthreads="-mt"
6274                         ol_link_threads=posix
6275                 fi
6276         fi
6277
6278                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6279         if test "$ol_link_threads" = no ; then
6280                 # try -kthread
6281                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6282 echo "configure:6283: checking for pthread link with -kthread" >&5
6283 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6284   echo $ac_n "(cached) $ac_c" 1>&6
6285 else
6286   
6287                         # save the flags
6288                         ol_LIBS="$LIBS"
6289                         LIBS="-kthread $LIBS"
6290
6291                         cat > conftest.$ac_ext <<EOF
6292 #line 6293 "configure"
6293 #include "confdefs.h"
6294
6295 #include <pthread.h>
6296 #ifndef NULL
6297 #define NULL (void*)0
6298 #endif
6299
6300 int main() {
6301
6302         pthread_t t;
6303
6304 #if HAVE_PTHREADS_D4
6305         pthread_create(&t, pthread_attr_default, NULL, NULL);
6306         pthread_detach( &t );
6307 #else
6308         pthread_create(&t, NULL, NULL, NULL);
6309         pthread_detach( t );
6310 #endif
6311 #ifdef HAVE_LINUX_THREADS
6312         pthread_kill_other_threads_np();
6313 #endif
6314
6315 ; return 0; }
6316 EOF
6317 if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6318   rm -rf conftest*
6319   ol_cv_pthread_kthread=yes
6320 else
6321   echo "configure: failed program was:" >&5
6322   cat conftest.$ac_ext >&5
6323   rm -rf conftest*
6324   ol_cv_pthread_kthread=no
6325 fi
6326 rm -f conftest*
6327
6328                 # restore the LIBS
6329                 LIBS="$ol_LIBS"
6330                 
6331 fi
6332
6333 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6334
6335                 if test $ol_cv_pthread_kthread = yes ; then
6336                         ol_link_pthreads="-kthread"
6337                         ol_link_threads=posix
6338                 fi
6339         fi
6340
6341                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6342         if test "$ol_link_threads" = no ; then
6343                 # try -pthread
6344                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6345 echo "configure:6346: checking for pthread link with -pthread" >&5
6346 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6347   echo $ac_n "(cached) $ac_c" 1>&6
6348 else
6349   
6350                         # save the flags
6351                         ol_LIBS="$LIBS"
6352                         LIBS="-pthread $LIBS"
6353
6354                         cat > conftest.$ac_ext <<EOF
6355 #line 6356 "configure"
6356 #include "confdefs.h"
6357
6358 #include <pthread.h>
6359 #ifndef NULL
6360 #define NULL (void*)0
6361 #endif
6362
6363 int main() {
6364
6365         pthread_t t;
6366
6367 #if HAVE_PTHREADS_D4
6368         pthread_create(&t, pthread_attr_default, NULL, NULL);
6369         pthread_detach( &t );
6370 #else
6371         pthread_create(&t, NULL, NULL, NULL);
6372         pthread_detach( t );
6373 #endif
6374 #ifdef HAVE_LINUX_THREADS
6375         pthread_kill_other_threads_np();
6376 #endif
6377
6378 ; return 0; }
6379 EOF
6380 if { (eval echo configure:6381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6381   rm -rf conftest*
6382   ol_cv_pthread_pthread=yes
6383 else
6384   echo "configure: failed program was:" >&5
6385   cat conftest.$ac_ext >&5
6386   rm -rf conftest*
6387   ol_cv_pthread_pthread=no
6388 fi
6389 rm -f conftest*
6390
6391                 # restore the LIBS
6392                 LIBS="$ol_LIBS"
6393                 
6394 fi
6395
6396 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6397
6398                 if test $ol_cv_pthread_pthread = yes ; then
6399                         ol_link_pthreads="-pthread"
6400                         ol_link_threads=posix
6401                 fi
6402         fi
6403
6404                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6405         if test "$ol_link_threads" = no ; then
6406                 # try -pthreads
6407                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6408 echo "configure:6409: checking for pthread link with -pthreads" >&5
6409 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6410   echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412   
6413                         # save the flags
6414                         ol_LIBS="$LIBS"
6415                         LIBS="-pthreads $LIBS"
6416
6417                         cat > conftest.$ac_ext <<EOF
6418 #line 6419 "configure"
6419 #include "confdefs.h"
6420
6421 #include <pthread.h>
6422 #ifndef NULL
6423 #define NULL (void*)0
6424 #endif
6425
6426 int main() {
6427
6428         pthread_t t;
6429
6430 #if HAVE_PTHREADS_D4
6431         pthread_create(&t, pthread_attr_default, NULL, NULL);
6432         pthread_detach( &t );
6433 #else
6434         pthread_create(&t, NULL, NULL, NULL);
6435         pthread_detach( t );
6436 #endif
6437 #ifdef HAVE_LINUX_THREADS
6438         pthread_kill_other_threads_np();
6439 #endif
6440
6441 ; return 0; }
6442 EOF
6443 if { (eval echo configure:6444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6444   rm -rf conftest*
6445   ol_cv_pthread_pthreads=yes
6446 else
6447   echo "configure: failed program was:" >&5
6448   cat conftest.$ac_ext >&5
6449   rm -rf conftest*
6450   ol_cv_pthread_pthreads=no
6451 fi
6452 rm -f conftest*
6453
6454                 # restore the LIBS
6455                 LIBS="$ol_LIBS"
6456                 
6457 fi
6458
6459 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6460
6461                 if test $ol_cv_pthread_pthreads = yes ; then
6462                         ol_link_pthreads="-pthreads"
6463                         ol_link_threads=posix
6464                 fi
6465         fi
6466
6467                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6468         if test "$ol_link_threads" = no ; then
6469                 # try -mthreads
6470                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6471 echo "configure:6472: checking for pthread link with -mthreads" >&5
6472 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6473   echo $ac_n "(cached) $ac_c" 1>&6
6474 else
6475   
6476                         # save the flags
6477                         ol_LIBS="$LIBS"
6478                         LIBS="-mthreads $LIBS"
6479
6480                         cat > conftest.$ac_ext <<EOF
6481 #line 6482 "configure"
6482 #include "confdefs.h"
6483
6484 #include <pthread.h>
6485 #ifndef NULL
6486 #define NULL (void*)0
6487 #endif
6488
6489 int main() {
6490
6491         pthread_t t;
6492
6493 #if HAVE_PTHREADS_D4
6494         pthread_create(&t, pthread_attr_default, NULL, NULL);
6495         pthread_detach( &t );
6496 #else
6497         pthread_create(&t, NULL, NULL, NULL);
6498         pthread_detach( t );
6499 #endif
6500 #ifdef HAVE_LINUX_THREADS
6501         pthread_kill_other_threads_np();
6502 #endif
6503
6504 ; return 0; }
6505 EOF
6506 if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6507   rm -rf conftest*
6508   ol_cv_pthread_mthreads=yes
6509 else
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   ol_cv_pthread_mthreads=no
6514 fi
6515 rm -f conftest*
6516
6517                 # restore the LIBS
6518                 LIBS="$ol_LIBS"
6519                 
6520 fi
6521
6522 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6523
6524                 if test $ol_cv_pthread_mthreads = yes ; then
6525                         ol_link_pthreads="-mthreads"
6526                         ol_link_threads=posix
6527                 fi
6528         fi
6529
6530                 # Pthread try link: -thread (ol_cv_pthread_thread)
6531         if test "$ol_link_threads" = no ; then
6532                 # try -thread
6533                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6534 echo "configure:6535: checking for pthread link with -thread" >&5
6535 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6536   echo $ac_n "(cached) $ac_c" 1>&6
6537 else
6538   
6539                         # save the flags
6540                         ol_LIBS="$LIBS"
6541                         LIBS="-thread $LIBS"
6542
6543                         cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546
6547 #include <pthread.h>
6548 #ifndef NULL
6549 #define NULL (void*)0
6550 #endif
6551
6552 int main() {
6553
6554         pthread_t t;
6555
6556 #if HAVE_PTHREADS_D4
6557         pthread_create(&t, pthread_attr_default, NULL, NULL);
6558         pthread_detach( &t );
6559 #else
6560         pthread_create(&t, NULL, NULL, NULL);
6561         pthread_detach( t );
6562 #endif
6563 #ifdef HAVE_LINUX_THREADS
6564         pthread_kill_other_threads_np();
6565 #endif
6566
6567 ; return 0; }
6568 EOF
6569 if { (eval echo configure:6570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6570   rm -rf conftest*
6571   ol_cv_pthread_thread=yes
6572 else
6573   echo "configure: failed program was:" >&5
6574   cat conftest.$ac_ext >&5
6575   rm -rf conftest*
6576   ol_cv_pthread_thread=no
6577 fi
6578 rm -f conftest*
6579
6580                 # restore the LIBS
6581                 LIBS="$ol_LIBS"
6582                 
6583 fi
6584
6585 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6586
6587                 if test $ol_cv_pthread_thread = yes ; then
6588                         ol_link_pthreads="-thread"
6589                         ol_link_threads=posix
6590                 fi
6591         fi
6592
6593
6594                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6595         if test "$ol_link_threads" = no ; then
6596                 # try -lpthread -lmach -lexc -lc_r
6597                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6598 echo "configure:6599: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6599 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6600   echo $ac_n "(cached) $ac_c" 1>&6
6601 else
6602   
6603                         # save the flags
6604                         ol_LIBS="$LIBS"
6605                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6606
6607                         cat > conftest.$ac_ext <<EOF
6608 #line 6609 "configure"
6609 #include "confdefs.h"
6610
6611 #include <pthread.h>
6612 #ifndef NULL
6613 #define NULL (void*)0
6614 #endif
6615
6616 int main() {
6617
6618         pthread_t t;
6619
6620 #if HAVE_PTHREADS_D4
6621         pthread_create(&t, pthread_attr_default, NULL, NULL);
6622         pthread_detach( &t );
6623 #else
6624         pthread_create(&t, NULL, NULL, NULL);
6625         pthread_detach( t );
6626 #endif
6627 #ifdef HAVE_LINUX_THREADS
6628         pthread_kill_other_threads_np();
6629 #endif
6630
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6641 fi
6642 rm -f conftest*
6643
6644                 # restore the LIBS
6645                 LIBS="$ol_LIBS"
6646                 
6647 fi
6648
6649 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6650
6651                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6652                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6653                         ol_link_threads=posix
6654                 fi
6655         fi
6656
6657                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6658         if test "$ol_link_threads" = no ; then
6659                 # try -lpthread -lmach -lexc
6660                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6661 echo "configure:6662: checking for pthread link with -lpthread -lmach -lexc" >&5
6662 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   
6666                         # save the flags
6667                         ol_LIBS="$LIBS"
6668                         LIBS="-lpthread -lmach -lexc $LIBS"
6669
6670                         cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673
6674 #include <pthread.h>
6675 #ifndef NULL
6676 #define NULL (void*)0
6677 #endif
6678
6679 int main() {
6680
6681         pthread_t t;
6682
6683 #if HAVE_PTHREADS_D4
6684         pthread_create(&t, pthread_attr_default, NULL, NULL);
6685         pthread_detach( &t );
6686 #else
6687         pthread_create(&t, NULL, NULL, NULL);
6688         pthread_detach( t );
6689 #endif
6690 #ifdef HAVE_LINUX_THREADS
6691         pthread_kill_other_threads_np();
6692 #endif
6693
6694 ; return 0; }
6695 EOF
6696 if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6697   rm -rf conftest*
6698   ol_cv_pthread_lpthread_lmach_lexc=yes
6699 else
6700   echo "configure: failed program was:" >&5
6701   cat conftest.$ac_ext >&5
6702   rm -rf conftest*
6703   ol_cv_pthread_lpthread_lmach_lexc=no
6704 fi
6705 rm -f conftest*
6706
6707                 # restore the LIBS
6708                 LIBS="$ol_LIBS"
6709                 
6710 fi
6711
6712 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6713
6714                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6715                         ol_link_pthreads="-lpthread -lmach -lexc"
6716                         ol_link_threads=posix
6717                 fi
6718         fi
6719
6720
6721                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6722         if test "$ol_link_threads" = no ; then
6723                 # try -lpthread -Wl,-woff,85
6724                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6725 echo "configure:6726: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6726 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6727   echo $ac_n "(cached) $ac_c" 1>&6
6728 else
6729   
6730                         # save the flags
6731                         ol_LIBS="$LIBS"
6732                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6733
6734                         cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737
6738 #include <pthread.h>
6739 #ifndef NULL
6740 #define NULL (void*)0
6741 #endif
6742
6743 int main() {
6744
6745         pthread_t t;
6746
6747 #if HAVE_PTHREADS_D4
6748         pthread_create(&t, pthread_attr_default, NULL, NULL);
6749         pthread_detach( &t );
6750 #else
6751         pthread_create(&t, NULL, NULL, NULL);
6752         pthread_detach( t );
6753 #endif
6754 #ifdef HAVE_LINUX_THREADS
6755         pthread_kill_other_threads_np();
6756 #endif
6757
6758 ; return 0; }
6759 EOF
6760 if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6761   rm -rf conftest*
6762   ol_cv_pthread_lib_lpthread_woff=yes
6763 else
6764   echo "configure: failed program was:" >&5
6765   cat conftest.$ac_ext >&5
6766   rm -rf conftest*
6767   ol_cv_pthread_lib_lpthread_woff=no
6768 fi
6769 rm -f conftest*
6770
6771                 # restore the LIBS
6772                 LIBS="$ol_LIBS"
6773                 
6774 fi
6775
6776 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6777
6778                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6779                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6780                         ol_link_threads=posix
6781                 fi
6782         fi
6783
6784
6785                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6786         if test "$ol_link_threads" = no ; then
6787                 # try -lpthread
6788                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6789 echo "configure:6790: checking for pthread link with -lpthread" >&5
6790 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6791   echo $ac_n "(cached) $ac_c" 1>&6
6792 else
6793   
6794                         # save the flags
6795                         ol_LIBS="$LIBS"
6796                         LIBS="-lpthread $LIBS"
6797
6798                         cat > conftest.$ac_ext <<EOF
6799 #line 6800 "configure"
6800 #include "confdefs.h"
6801
6802 #include <pthread.h>
6803 #ifndef NULL
6804 #define NULL (void*)0
6805 #endif
6806
6807 int main() {
6808
6809         pthread_t t;
6810
6811 #if HAVE_PTHREADS_D4
6812         pthread_create(&t, pthread_attr_default, NULL, NULL);
6813         pthread_detach( &t );
6814 #else
6815         pthread_create(&t, NULL, NULL, NULL);
6816         pthread_detach( t );
6817 #endif
6818 #ifdef HAVE_LINUX_THREADS
6819         pthread_kill_other_threads_np();
6820 #endif
6821
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6825   rm -rf conftest*
6826   ol_cv_pthread_lpthread=yes
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   ol_cv_pthread_lpthread=no
6832 fi
6833 rm -f conftest*
6834
6835                 # restore the LIBS
6836                 LIBS="$ol_LIBS"
6837                 
6838 fi
6839
6840 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6841
6842                 if test $ol_cv_pthread_lpthread = yes ; then
6843                         ol_link_pthreads="-lpthread"
6844                         ol_link_threads=posix
6845                 fi
6846         fi
6847
6848                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6849         if test "$ol_link_threads" = no ; then
6850                 # try -lc_r
6851                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6852 echo "configure:6853: checking for pthread link with -lc_r" >&5
6853 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   
6857                         # save the flags
6858                         ol_LIBS="$LIBS"
6859                         LIBS="-lc_r $LIBS"
6860
6861                         cat > conftest.$ac_ext <<EOF
6862 #line 6863 "configure"
6863 #include "confdefs.h"
6864
6865 #include <pthread.h>
6866 #ifndef NULL
6867 #define NULL (void*)0
6868 #endif
6869
6870 int main() {
6871
6872         pthread_t t;
6873
6874 #if HAVE_PTHREADS_D4
6875         pthread_create(&t, pthread_attr_default, NULL, NULL);
6876         pthread_detach( &t );
6877 #else
6878         pthread_create(&t, NULL, NULL, NULL);
6879         pthread_detach( t );
6880 #endif
6881 #ifdef HAVE_LINUX_THREADS
6882         pthread_kill_other_threads_np();
6883 #endif
6884
6885 ; return 0; }
6886 EOF
6887 if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6888   rm -rf conftest*
6889   ol_cv_pthread_lc_r=yes
6890 else
6891   echo "configure: failed program was:" >&5
6892   cat conftest.$ac_ext >&5
6893   rm -rf conftest*
6894   ol_cv_pthread_lc_r=no
6895 fi
6896 rm -f conftest*
6897
6898                 # restore the LIBS
6899                 LIBS="$ol_LIBS"
6900                 
6901 fi
6902
6903 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6904
6905                 if test $ol_cv_pthread_lc_r = yes ; then
6906                         ol_link_pthreads="-lc_r"
6907                         ol_link_threads=posix
6908                 fi
6909         fi
6910
6911
6912                 # Pthread try link: -threads (ol_cv_pthread_threads)
6913         if test "$ol_link_threads" = no ; then
6914                 # try -threads
6915                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6916 echo "configure:6917: checking for pthread link with -threads" >&5
6917 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6918   echo $ac_n "(cached) $ac_c" 1>&6
6919 else
6920   
6921                         # save the flags
6922                         ol_LIBS="$LIBS"
6923                         LIBS="-threads $LIBS"
6924
6925                         cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928
6929 #include <pthread.h>
6930 #ifndef NULL
6931 #define NULL (void*)0
6932 #endif
6933
6934 int main() {
6935
6936         pthread_t t;
6937
6938 #if HAVE_PTHREADS_D4
6939         pthread_create(&t, pthread_attr_default, NULL, NULL);
6940         pthread_detach( &t );
6941 #else
6942         pthread_create(&t, NULL, NULL, NULL);
6943         pthread_detach( t );
6944 #endif
6945 #ifdef HAVE_LINUX_THREADS
6946         pthread_kill_other_threads_np();
6947 #endif
6948
6949 ; return 0; }
6950 EOF
6951 if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6952   rm -rf conftest*
6953   ol_cv_pthread_threads=yes
6954 else
6955   echo "configure: failed program was:" >&5
6956   cat conftest.$ac_ext >&5
6957   rm -rf conftest*
6958   ol_cv_pthread_threads=no
6959 fi
6960 rm -f conftest*
6961
6962                 # restore the LIBS
6963                 LIBS="$ol_LIBS"
6964                 
6965 fi
6966
6967 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6968
6969                 if test $ol_cv_pthread_threads = yes ; then
6970                         ol_link_pthreads="-threads"
6971                         ol_link_threads=posix
6972                 fi
6973         fi
6974
6975
6976                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6977         if test "$ol_link_threads" = no ; then
6978                 # try -lpthreads -lmach -lexc -lc_r
6979                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6980 echo "configure:6981: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6981 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
6982   echo $ac_n "(cached) $ac_c" 1>&6
6983 else
6984   
6985                         # save the flags
6986                         ol_LIBS="$LIBS"
6987                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6988
6989                         cat > conftest.$ac_ext <<EOF
6990 #line 6991 "configure"
6991 #include "confdefs.h"
6992
6993 #include <pthread.h>
6994 #ifndef NULL
6995 #define NULL (void*)0
6996 #endif
6997
6998 int main() {
6999
7000         pthread_t t;
7001
7002 #if HAVE_PTHREADS_D4
7003         pthread_create(&t, pthread_attr_default, NULL, NULL);
7004         pthread_detach( &t );
7005 #else
7006         pthread_create(&t, NULL, NULL, NULL);
7007         pthread_detach( t );
7008 #endif
7009 #ifdef HAVE_LINUX_THREADS
7010         pthread_kill_other_threads_np();
7011 #endif
7012
7013 ; return 0; }
7014 EOF
7015 if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7016   rm -rf conftest*
7017   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7018 else
7019   echo "configure: failed program was:" >&5
7020   cat conftest.$ac_ext >&5
7021   rm -rf conftest*
7022   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7023 fi
7024 rm -f conftest*
7025
7026                 # restore the LIBS
7027                 LIBS="$ol_LIBS"
7028                 
7029 fi
7030
7031 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7032
7033                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7034                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7035                         ol_link_threads=posix
7036                 fi
7037         fi
7038
7039                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7040         if test "$ol_link_threads" = no ; then
7041                 # try -lpthreads -lmach -lexc
7042                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7043 echo "configure:7044: checking for pthread link with -lpthreads -lmach -lexc" >&5
7044 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
7045   echo $ac_n "(cached) $ac_c" 1>&6
7046 else
7047   
7048                         # save the flags
7049                         ol_LIBS="$LIBS"
7050                         LIBS="-lpthreads -lmach -lexc $LIBS"
7051
7052                         cat > conftest.$ac_ext <<EOF
7053 #line 7054 "configure"
7054 #include "confdefs.h"
7055
7056 #include <pthread.h>
7057 #ifndef NULL
7058 #define NULL (void*)0
7059 #endif
7060
7061 int main() {
7062
7063         pthread_t t;
7064
7065 #if HAVE_PTHREADS_D4
7066         pthread_create(&t, pthread_attr_default, NULL, NULL);
7067         pthread_detach( &t );
7068 #else
7069         pthread_create(&t, NULL, NULL, NULL);
7070         pthread_detach( t );
7071 #endif
7072 #ifdef HAVE_LINUX_THREADS
7073         pthread_kill_other_threads_np();
7074 #endif
7075
7076 ; return 0; }
7077 EOF
7078 if { (eval echo configure:7079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7079   rm -rf conftest*
7080   ol_cv_pthread_lpthreads_lmach_lexc=yes
7081 else
7082   echo "configure: failed program was:" >&5
7083   cat conftest.$ac_ext >&5
7084   rm -rf conftest*
7085   ol_cv_pthread_lpthreads_lmach_lexc=no
7086 fi
7087 rm -f conftest*
7088
7089                 # restore the LIBS
7090                 LIBS="$ol_LIBS"
7091                 
7092 fi
7093
7094 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7095
7096                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7097                         ol_link_pthreads="-lpthreads -lmach -lexc"
7098                         ol_link_threads=posix
7099                 fi
7100         fi
7101
7102                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7103         if test "$ol_link_threads" = no ; then
7104                 # try -lpthreads -lexc
7105                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7106 echo "configure:7107: checking for pthread link with -lpthreads -lexc" >&5
7107 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
7108   echo $ac_n "(cached) $ac_c" 1>&6
7109 else
7110   
7111                         # save the flags
7112                         ol_LIBS="$LIBS"
7113                         LIBS="-lpthreads -lexc $LIBS"
7114
7115                         cat > conftest.$ac_ext <<EOF
7116 #line 7117 "configure"
7117 #include "confdefs.h"
7118
7119 #include <pthread.h>
7120 #ifndef NULL
7121 #define NULL (void*)0
7122 #endif
7123
7124 int main() {
7125
7126         pthread_t t;
7127
7128 #if HAVE_PTHREADS_D4
7129         pthread_create(&t, pthread_attr_default, NULL, NULL);
7130         pthread_detach( &t );
7131 #else
7132         pthread_create(&t, NULL, NULL, NULL);
7133         pthread_detach( t );
7134 #endif
7135 #ifdef HAVE_LINUX_THREADS
7136         pthread_kill_other_threads_np();
7137 #endif
7138
7139 ; return 0; }
7140 EOF
7141 if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7142   rm -rf conftest*
7143   ol_cv_pthread_lpthreads_lexc=yes
7144 else
7145   echo "configure: failed program was:" >&5
7146   cat conftest.$ac_ext >&5
7147   rm -rf conftest*
7148   ol_cv_pthread_lpthreads_lexc=no
7149 fi
7150 rm -f conftest*
7151
7152                 # restore the LIBS
7153                 LIBS="$ol_LIBS"
7154                 
7155 fi
7156
7157 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7158
7159                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7160                         ol_link_pthreads="-lpthreads -lexc"
7161                         ol_link_threads=posix
7162                 fi
7163         fi
7164
7165
7166                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7167         if test "$ol_link_threads" = no ; then
7168                 # try -lpthreads
7169                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7170 echo "configure:7171: checking for pthread link with -lpthreads" >&5
7171 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
7172   echo $ac_n "(cached) $ac_c" 1>&6
7173 else
7174   
7175                         # save the flags
7176                         ol_LIBS="$LIBS"
7177                         LIBS="-lpthreads $LIBS"
7178
7179                         cat > conftest.$ac_ext <<EOF
7180 #line 7181 "configure"
7181 #include "confdefs.h"
7182
7183 #include <pthread.h>
7184 #ifndef NULL
7185 #define NULL (void*)0
7186 #endif
7187
7188 int main() {
7189
7190         pthread_t t;
7191
7192 #if HAVE_PTHREADS_D4
7193         pthread_create(&t, pthread_attr_default, NULL, NULL);
7194         pthread_detach( &t );
7195 #else
7196         pthread_create(&t, NULL, NULL, NULL);
7197         pthread_detach( t );
7198 #endif
7199 #ifdef HAVE_LINUX_THREADS
7200         pthread_kill_other_threads_np();
7201 #endif
7202
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   ol_cv_pthread_lib_lpthreads=yes
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   ol_cv_pthread_lib_lpthreads=no
7213 fi
7214 rm -f conftest*
7215
7216                 # restore the LIBS
7217                 LIBS="$ol_LIBS"
7218                 
7219 fi
7220
7221 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7222
7223                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7224                         ol_link_pthreads="-lpthreads"
7225                         ol_link_threads=posix
7226                 fi
7227         fi
7228
7229
7230                 if test $ol_link_threads != no ; then
7231                         cat >> confdefs.h <<\EOF
7232 #define HAVE_PTHREADS 1
7233 EOF
7234
7235
7236                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7237
7238                                                 save_CPPFLAGS="$CPPFLAGS"
7239                         save_LIBS="$LIBS"
7240                         LIBS="$LTHREAD_LIBS $LIBS"
7241
7242                                                                                                 for ac_func in sched_yield pthread_yield
7243 do
7244 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7245 echo "configure:7246: checking for $ac_func" >&5
7246 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7247   echo $ac_n "(cached) $ac_c" 1>&6
7248 else
7249   cat > conftest.$ac_ext <<EOF
7250 #line 7251 "configure"
7251 #include "confdefs.h"
7252 /* System header to define __stub macros and hopefully few prototypes,
7253     which can conflict with char $ac_func(); below.  */
7254 #include <assert.h>
7255 /* Override any gcc2 internal prototype to avoid an error.  */
7256 /* We use char because int might match the return type of a gcc2
7257     builtin and then its argument prototype would still apply.  */
7258 char $ac_func();
7259 char (*f)();
7260
7261 int main() {
7262
7263 /* The GNU C library defines this for functions which it implements
7264     to always fail with ENOSYS.  Some functions are actually named
7265     something starting with __ and the normal name is an alias.  */
7266 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7267 choke me
7268 #else
7269 f = $ac_func;
7270 #endif
7271
7272 ; return 0; }
7273 EOF
7274 if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7275   rm -rf conftest*
7276   eval "ac_cv_func_$ac_func=yes"
7277 else
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -rf conftest*
7281   eval "ac_cv_func_$ac_func=no"
7282 fi
7283 rm -f conftest*
7284 fi
7285
7286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7287   echo "$ac_t""yes" 1>&6
7288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7289   cat >> confdefs.h <<EOF
7290 #define $ac_tr_func 1
7291 EOF
7292  
7293 else
7294   echo "$ac_t""no" 1>&6
7295 fi
7296 done
7297
7298
7299                         if test $ac_cv_func_sched_yield = no -a \
7300                                 $ac_cv_func_pthread_yield = no ; then
7301                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7302 echo "configure:7303: checking for sched_yield in -lrt" >&5
7303 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
7304 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7305   echo $ac_n "(cached) $ac_c" 1>&6
7306 else
7307   ac_save_LIBS="$LIBS"
7308 LIBS="-lrt  $LIBS"
7309 cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 /* Override any gcc2 internal prototype to avoid an error.  */
7313 /* We use char because int might match the return type of a gcc2
7314     builtin and then its argument prototype would still apply.  */
7315 char sched_yield();
7316
7317 int main() {
7318 sched_yield()
7319 ; return 0; }
7320 EOF
7321 if { (eval echo configure:7322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7322   rm -rf conftest*
7323   eval "ac_cv_lib_$ac_lib_var=yes"
7324 else
7325   echo "configure: failed program was:" >&5
7326   cat conftest.$ac_ext >&5
7327   rm -rf conftest*
7328   eval "ac_cv_lib_$ac_lib_var=no"
7329 fi
7330 rm -f conftest*
7331 LIBS="$ac_save_LIBS"
7332
7333 fi
7334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7335   echo "$ac_t""yes" 1>&6
7336   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7337                                         cat >> confdefs.h <<\EOF
7338 #define HAVE_SCHED_YIELD 1
7339 EOF
7340
7341                                         ac_cv_func_sched_yield=yes
7342 else
7343   echo "$ac_t""no" 1>&6
7344 ac_cv_func_sched_yield=no
7345 fi
7346
7347                         fi
7348                         if test $ac_cv_func_sched_yield = no -a \
7349                                 $ac_cv_func_pthread_yield = no ; then
7350                                                                                                 for ac_func in thr_yield
7351 do
7352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7353 echo "configure:7354: checking for $ac_func" >&5
7354 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7355   echo $ac_n "(cached) $ac_c" 1>&6
7356 else
7357   cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 /* System header to define __stub macros and hopefully few prototypes,
7361     which can conflict with char $ac_func(); below.  */
7362 #include <assert.h>
7363 /* Override any gcc2 internal prototype to avoid an error.  */
7364 /* We use char because int might match the return type of a gcc2
7365     builtin and then its argument prototype would still apply.  */
7366 char $ac_func();
7367 char (*f)();
7368
7369 int main() {
7370
7371 /* The GNU C library defines this for functions which it implements
7372     to always fail with ENOSYS.  Some functions are actually named
7373     something starting with __ and the normal name is an alias.  */
7374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7375 choke me
7376 #else
7377 f = $ac_func;
7378 #endif
7379
7380 ; return 0; }
7381 EOF
7382 if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7383   rm -rf conftest*
7384   eval "ac_cv_func_$ac_func=yes"
7385 else
7386   echo "configure: failed program was:" >&5
7387   cat conftest.$ac_ext >&5
7388   rm -rf conftest*
7389   eval "ac_cv_func_$ac_func=no"
7390 fi
7391 rm -f conftest*
7392 fi
7393
7394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7395   echo "$ac_t""yes" 1>&6
7396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7397   cat >> confdefs.h <<EOF
7398 #define $ac_tr_func 1
7399 EOF
7400  
7401 else
7402   echo "$ac_t""no" 1>&6
7403 fi
7404 done
7405
7406                         fi
7407                         if test $ac_cv_func_sched_yield = no -a \
7408                                 $ac_cv_func_pthread_yield = no -a \
7409                                 "$ac_cv_func_thr_yield" = no ; then
7410                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7411                         fi
7412
7413                                                 for ac_func in pthread_kill
7414 do
7415 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7416 echo "configure:7417: checking for $ac_func" >&5
7417 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7418   echo $ac_n "(cached) $ac_c" 1>&6
7419 else
7420   cat > conftest.$ac_ext <<EOF
7421 #line 7422 "configure"
7422 #include "confdefs.h"
7423 /* System header to define __stub macros and hopefully few prototypes,
7424     which can conflict with char $ac_func(); below.  */
7425 #include <assert.h>
7426 /* Override any gcc2 internal prototype to avoid an error.  */
7427 /* We use char because int might match the return type of a gcc2
7428     builtin and then its argument prototype would still apply.  */
7429 char $ac_func();
7430 char (*f)();
7431
7432 int main() {
7433
7434 /* The GNU C library defines this for functions which it implements
7435     to always fail with ENOSYS.  Some functions are actually named
7436     something starting with __ and the normal name is an alias.  */
7437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7438 choke me
7439 #else
7440 f = $ac_func;
7441 #endif
7442
7443 ; return 0; }
7444 EOF
7445 if { (eval echo configure:7446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7446   rm -rf conftest*
7447   eval "ac_cv_func_$ac_func=yes"
7448 else
7449   echo "configure: failed program was:" >&5
7450   cat conftest.$ac_ext >&5
7451   rm -rf conftest*
7452   eval "ac_cv_func_$ac_func=no"
7453 fi
7454 rm -f conftest*
7455 fi
7456
7457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7458   echo "$ac_t""yes" 1>&6
7459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7460   cat >> confdefs.h <<EOF
7461 #define $ac_tr_func 1
7462 EOF
7463  
7464 else
7465   echo "$ac_t""no" 1>&6
7466 fi
7467 done
7468
7469
7470                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7471 echo "configure:7472: checking for pthread_detach with <pthread.h>" >&5
7472 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
7473   echo $ac_n "(cached) $ac_c" 1>&6
7474 else
7475   
7476                                                                 cat > conftest.$ac_ext <<EOF
7477 #line 7478 "configure"
7478 #include "confdefs.h"
7479
7480 #include <pthread.h>
7481 #ifndef NULL
7482 #define NULL (void*)0
7483 #endif
7484
7485 int main() {
7486 pthread_detach(NULL);
7487 ; return 0; }
7488 EOF
7489 if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7490   rm -rf conftest*
7491   ol_cv_func_pthread_detach=yes
7492 else
7493   echo "configure: failed program was:" >&5
7494   cat conftest.$ac_ext >&5
7495   rm -rf conftest*
7496   ol_cv_func_pthread_detach=no
7497 fi
7498 rm -f conftest*
7499                         
7500 fi
7501
7502 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7503
7504                         if test $ol_cv_func_pthread_detach = no ; then
7505                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7506                         fi
7507
7508                         cat >> confdefs.h <<\EOF
7509 #define HAVE_PTHREAD_DETACH 1
7510 EOF
7511
7512
7513                                                 for ac_func in \
7514                                 pthread_setconcurrency \
7515                                 pthread_getconcurrency \
7516                                 thr_setconcurrency \
7517                                 thr_getconcurrency \
7518                         
7519 do
7520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7521 echo "configure:7522: checking for $ac_func" >&5
7522 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7523   echo $ac_n "(cached) $ac_c" 1>&6
7524 else
7525   cat > conftest.$ac_ext <<EOF
7526 #line 7527 "configure"
7527 #include "confdefs.h"
7528 /* System header to define __stub macros and hopefully few prototypes,
7529     which can conflict with char $ac_func(); below.  */
7530 #include <assert.h>
7531 /* Override any gcc2 internal prototype to avoid an error.  */
7532 /* We use char because int might match the return type of a gcc2
7533     builtin and then its argument prototype would still apply.  */
7534 char $ac_func();
7535 char (*f)();
7536
7537 int main() {
7538
7539 /* The GNU C library defines this for functions which it implements
7540     to always fail with ENOSYS.  Some functions are actually named
7541     something starting with __ and the normal name is an alias.  */
7542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7543 choke me
7544 #else
7545 f = $ac_func;
7546 #endif
7547
7548 ; return 0; }
7549 EOF
7550 if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7551   rm -rf conftest*
7552   eval "ac_cv_func_$ac_func=yes"
7553 else
7554   echo "configure: failed program was:" >&5
7555   cat conftest.$ac_ext >&5
7556   rm -rf conftest*
7557   eval "ac_cv_func_$ac_func=no"
7558 fi
7559 rm -f conftest*
7560 fi
7561
7562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7563   echo "$ac_t""yes" 1>&6
7564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7565   cat >> confdefs.h <<EOF
7566 #define $ac_tr_func 1
7567 EOF
7568  
7569 else
7570   echo "$ac_t""no" 1>&6
7571 fi
7572 done
7573
7574
7575                         
7576         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7577 echo "configure:7578: checking for pthread_kill_other_threads_np" >&5
7578 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7579   echo $ac_n "(cached) $ac_c" 1>&6
7580 else
7581   cat > conftest.$ac_ext <<EOF
7582 #line 7583 "configure"
7583 #include "confdefs.h"
7584 /* System header to define __stub macros and hopefully few prototypes,
7585     which can conflict with char pthread_kill_other_threads_np(); below.  */
7586 #include <assert.h>
7587 /* Override any gcc2 internal prototype to avoid an error.  */
7588 /* We use char because int might match the return type of a gcc2
7589     builtin and then its argument prototype would still apply.  */
7590 char pthread_kill_other_threads_np();
7591 char (*f)();
7592
7593 int main() {
7594
7595 /* The GNU C library defines this for functions which it implements
7596     to always fail with ENOSYS.  Some functions are actually named
7597     something starting with __ and the normal name is an alias.  */
7598 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7599 choke me
7600 #else
7601 f = pthread_kill_other_threads_np;
7602 #endif
7603
7604 ; return 0; }
7605 EOF
7606 if { (eval echo configure:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7607   rm -rf conftest*
7608   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7609 else
7610   echo "configure: failed program was:" >&5
7611   cat conftest.$ac_ext >&5
7612   rm -rf conftest*
7613   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7614 fi
7615 rm -f conftest*
7616 fi
7617
7618 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7619   echo "$ac_t""yes" 1>&6
7620   :
7621 else
7622   echo "$ac_t""no" 1>&6
7623 fi
7624
7625         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7626 echo "configure:7627: checking for LinuxThreads implementation" >&5
7627 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7628   echo $ac_n "(cached) $ac_c" 1>&6
7629 else
7630   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7631 fi
7632
7633 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7634
7635                         
7636         
7637         
7638         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7639 echo "configure:7640: checking for LinuxThreads consistency" >&5
7640 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7641   echo $ac_n "(cached) $ac_c" 1>&6
7642 else
7643   
7644                 if test $ol_cv_header_linux_threads = yes -a \
7645                         $ol_cv_sys_linux_threads = yes; then
7646                         ol_cv_linux_threads=yes
7647                 elif test $ol_cv_header_linux_threads = no -a \
7648                         $ol_cv_sys_linux_threads = no; then
7649                         ol_cv_linux_threads=no
7650                 else
7651                         ol_cv_linux_threads=error
7652                 fi
7653         
7654 fi
7655
7656 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7657
7658
7659                         if test $ol_cv_linux_threads = error; then
7660                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7661                         fi
7662
7663                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7664 echo "configure:7665: checking if pthread_create() works" >&5
7665 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7666   echo $ac_n "(cached) $ac_c" 1>&6
7667 else
7668   
7669                         if test "$cross_compiling" = yes; then
7670                                 ol_cv_pthread_create_works=yes
7671 else
7672   cat > conftest.$ac_ext <<EOF
7673 #line 7674 "configure"
7674 #include "confdefs.h"
7675
7676 #include <pthread.h>
7677 #ifndef NULL
7678 #define NULL (void*)0
7679 #endif
7680
7681 static void *task(p)
7682         void *p;
7683 {
7684         return (void *) (p == NULL);
7685 }
7686
7687 int main(argc, argv)
7688         int argc;
7689         char **argv;
7690 {
7691         pthread_t t;
7692 #if HAVE_PTHREADS_D4
7693         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7694 #else
7695         exit(pthread_create(&t, NULL, task, NULL));
7696 #endif
7697 }
7698
7699 EOF
7700 if { (eval echo configure:7701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7701 then
7702   ol_cv_pthread_create_works=yes
7703 else
7704   echo "configure: failed program was:" >&5
7705   cat conftest.$ac_ext >&5
7706   rm -fr conftest*
7707   ol_cv_pthread_create_works=no
7708 fi
7709 rm -fr conftest*
7710 fi
7711
7712 fi
7713
7714 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7715
7716                         if test $ol_cv_pthread_create_works = no ; then
7717                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7718                         fi
7719
7720                                                 if test $ol_with_yielding_select = auto ; then
7721                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7722 echo "configure:7723: checking if select yields when using pthreads" >&5
7723 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7724   echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726   
7727                                 if test "$cross_compiling" = yes; then
7728   ol_cv_pthread_select_yields=cross
7729 else
7730   cat > conftest.$ac_ext <<EOF
7731 #line 7732 "configure"
7732 #include "confdefs.h"
7733
7734 #include <sys/types.h>
7735 #include <sys/time.h>
7736 #include <unistd.h>
7737 #include <pthread.h>
7738 #ifndef NULL
7739 #define NULL (void*) 0
7740 #endif
7741
7742 static int fildes[2];
7743
7744 static void *task(p)
7745         void *p;
7746 {
7747         int i;
7748         struct timeval tv;
7749
7750         fd_set rfds;
7751
7752         tv.tv_sec=10;
7753         tv.tv_usec=0;
7754
7755         FD_ZERO(&rfds);
7756         FD_SET(fildes[0], &rfds);
7757
7758         /* we're not interested in any fds */
7759         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7760
7761         if(i < 0) {
7762                 perror("select");
7763                 exit(10);
7764         }
7765
7766         exit(0); /* if we exit here, the select blocked the whole process */
7767 }
7768
7769 int main(argc, argv)
7770         int argc;
7771         char **argv;
7772 {
7773         pthread_t t;
7774
7775         /* create a pipe to select */
7776         if(pipe(&fildes[0])) {
7777                 perror("select");
7778                 exit(1);
7779         }
7780
7781 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7782         (void) pthread_setconcurrency(2);
7783 #else
7784 #ifdef HAVE_THR_SETCONCURRENCY
7785         /* Set Solaris LWP concurrency to 2 */
7786         thr_setconcurrency(2);
7787 #endif
7788 #endif
7789
7790 #if HAVE_PTHREADS_D4
7791         pthread_create(&t, pthread_attr_default, task, NULL);
7792 #else
7793         pthread_create(&t, NULL, task, NULL);
7794 #endif
7795
7796 #if HAVE_SCHED_YIELD
7797         sched_yield();  /* make sure task runs first */
7798 #else
7799 #ifdef HAVE_PTHREAD_YIELD
7800         pthread_yield();        /* make sure task runs first */
7801 #endif
7802 #endif
7803
7804         exit(2);
7805 }
7806 EOF
7807 if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7808 then
7809   ol_cv_pthread_select_yields=no
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813   rm -fr conftest*
7814   ol_cv_pthread_select_yields=yes
7815 fi
7816 rm -fr conftest*
7817 fi
7818
7819 fi
7820
7821 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7822
7823                                 if test $ol_cv_pthread_select_yields = cross ; then
7824                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7825                                 fi
7826
7827                                 if test $ol_cv_pthread_select_yields = yes ; then
7828                                         ol_with_yielding_select=yes
7829                                 fi
7830                         fi
7831
7832                                                 CPPFLAGS="$save_CPPFLAGS"
7833                         LIBS="$save_LIBS"
7834                 else
7835                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7836                 fi
7837         fi
7838
7839         if test $ol_with_threads = posix ; then
7840                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7841         fi
7842 fi
7843
7844 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7845         -o $ol_with_threads = mach ; then
7846
7847                 for ac_hdr in mach/cthreads.h
7848 do
7849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7851 echo "configure:7852: checking for $ac_hdr" >&5
7852 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 #include <$ac_hdr>
7859 EOF
7860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7861 { (eval echo configure:7862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7863 if test -z "$ac_err"; then
7864   rm -rf conftest*
7865   eval "ac_cv_header_$ac_safe=yes"
7866 else
7867   echo "$ac_err" >&5
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   eval "ac_cv_header_$ac_safe=no"
7872 fi
7873 rm -f conftest*
7874 fi
7875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7876   echo "$ac_t""yes" 1>&6
7877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7878   cat >> confdefs.h <<EOF
7879 #define $ac_tr_hdr 1
7880 EOF
7881  
7882 else
7883   echo "$ac_t""no" 1>&6
7884 fi
7885 done
7886
7887         if test $ac_cv_header_mach_cthreads_h = yes ; then
7888                 ol_with_threads=found
7889
7890                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7891 echo "configure:7892: checking for cthread_fork" >&5
7892 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7893   echo $ac_n "(cached) $ac_c" 1>&6
7894 else
7895   cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 /* System header to define __stub macros and hopefully few prototypes,
7899     which can conflict with char cthread_fork(); below.  */
7900 #include <assert.h>
7901 /* Override any gcc2 internal prototype to avoid an error.  */
7902 /* We use char because int might match the return type of a gcc2
7903     builtin and then its argument prototype would still apply.  */
7904 char cthread_fork();
7905 char (*f)();
7906
7907 int main() {
7908
7909 /* The GNU C library defines this for functions which it implements
7910     to always fail with ENOSYS.  Some functions are actually named
7911     something starting with __ and the normal name is an alias.  */
7912 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7913 choke me
7914 #else
7915 f = cthread_fork;
7916 #endif
7917
7918 ; return 0; }
7919 EOF
7920 if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7921   rm -rf conftest*
7922   eval "ac_cv_func_cthread_fork=yes"
7923 else
7924   echo "configure: failed program was:" >&5
7925   cat conftest.$ac_ext >&5
7926   rm -rf conftest*
7927   eval "ac_cv_func_cthread_fork=no"
7928 fi
7929 rm -f conftest*
7930 fi
7931
7932 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7933   echo "$ac_t""yes" 1>&6
7934   ol_link_threads=yes
7935 else
7936   echo "$ac_t""no" 1>&6
7937 fi
7938
7939
7940                 if test $ol_link_threads = no ; then
7941                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7942 echo "configure:7943: checking for cthread_fork with -all_load" >&5
7943 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
7944   echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7946   
7947                                                                 save_LIBS="$LIBS"
7948                                 LIBS="-all_load $LIBS"
7949                                 cat > conftest.$ac_ext <<EOF
7950 #line 7951 "configure"
7951 #include "confdefs.h"
7952 #include <mach/cthreads.h>
7953 int main() {
7954
7955                                         cthread_fork((void *)0, (void *)0);
7956                                         
7957 ; return 0; }
7958 EOF
7959 if { (eval echo configure:7960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7960   rm -rf conftest*
7961   ol_cv_cthread_all_load=yes
7962 else
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -rf conftest*
7966   ol_cv_cthread_all_load=no
7967 fi
7968 rm -f conftest*
7969                                                                 LIBS="$save_LIBS"
7970                         
7971 fi
7972
7973 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7974
7975                         if test $ol_cv_cthread_all_load = yes ; then
7976                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7977                                 ol_link_threads=mach
7978                         fi
7979                 fi
7980
7981                 if test $ol_link_threads != no ; then
7982                         : check for cthread specific functionality here
7983                         cat >> confdefs.h <<\EOF
7984 #define HAVE_MACH_CTHREADS 1
7985 EOF
7986
7987                 else
7988                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7989                 fi
7990         fi
7991
7992         if test $ol_with_threads = mach ; then
7993                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7994         fi
7995 fi
7996
7997 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7998         -o $ol_with_threads = lwp ; then
7999
8000                 for ac_hdr in thread.h synch.h
8001 do
8002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8003 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8004 echo "configure:8005: checking for $ac_hdr" >&5
8005 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8006   echo $ac_n "(cached) $ac_c" 1>&6
8007 else
8008   cat > conftest.$ac_ext <<EOF
8009 #line 8010 "configure"
8010 #include "confdefs.h"
8011 #include <$ac_hdr>
8012 EOF
8013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8014 { (eval echo configure:8015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8016 if test -z "$ac_err"; then
8017   rm -rf conftest*
8018   eval "ac_cv_header_$ac_safe=yes"
8019 else
8020   echo "$ac_err" >&5
8021   echo "configure: failed program was:" >&5
8022   cat conftest.$ac_ext >&5
8023   rm -rf conftest*
8024   eval "ac_cv_header_$ac_safe=no"
8025 fi
8026 rm -f conftest*
8027 fi
8028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8029   echo "$ac_t""yes" 1>&6
8030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8031   cat >> confdefs.h <<EOF
8032 #define $ac_tr_hdr 1
8033 EOF
8034  
8035 else
8036   echo "$ac_t""no" 1>&6
8037 fi
8038 done
8039
8040         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8041                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8042 echo "configure:8043: checking for thr_create in -lthread" >&5
8043 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
8044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8045   echo $ac_n "(cached) $ac_c" 1>&6
8046 else
8047   ac_save_LIBS="$LIBS"
8048 LIBS="-lthread  $LIBS"
8049 cat > conftest.$ac_ext <<EOF
8050 #line 8051 "configure"
8051 #include "confdefs.h"
8052 /* Override any gcc2 internal prototype to avoid an error.  */
8053 /* We use char because int might match the return type of a gcc2
8054     builtin and then its argument prototype would still apply.  */
8055 char thr_create();
8056
8057 int main() {
8058 thr_create()
8059 ; return 0; }
8060 EOF
8061 if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8062   rm -rf conftest*
8063   eval "ac_cv_lib_$ac_lib_var=yes"
8064 else
8065   echo "configure: failed program was:" >&5
8066   cat conftest.$ac_ext >&5
8067   rm -rf conftest*
8068   eval "ac_cv_lib_$ac_lib_var=no"
8069 fi
8070 rm -f conftest*
8071 LIBS="$ac_save_LIBS"
8072
8073 fi
8074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8075   echo "$ac_t""yes" 1>&6
8076   have_thr=yes
8077 else
8078   echo "$ac_t""no" 1>&6
8079 have_thr=no
8080 fi
8081
8082
8083                 if test $have_thr = yes ; then
8084                         cat >> confdefs.h <<\EOF
8085 #define HAVE_THR 1
8086 EOF
8087
8088                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8089                         ol_link_threads=thr
8090
8091                         if test $ol_with_yielding_select = auto ; then
8092                                 ol_with_yielding_select=yes
8093                         fi
8094
8095                                                 for ac_func in \
8096                                 thr_setconcurrency \
8097                                 thr_getconcurrency \
8098                         
8099 do
8100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8101 echo "configure:8102: checking for $ac_func" >&5
8102 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8103   echo $ac_n "(cached) $ac_c" 1>&6
8104 else
8105   cat > conftest.$ac_ext <<EOF
8106 #line 8107 "configure"
8107 #include "confdefs.h"
8108 /* System header to define __stub macros and hopefully few prototypes,
8109     which can conflict with char $ac_func(); below.  */
8110 #include <assert.h>
8111 /* Override any gcc2 internal prototype to avoid an error.  */
8112 /* We use char because int might match the return type of a gcc2
8113     builtin and then its argument prototype would still apply.  */
8114 char $ac_func();
8115 char (*f)();
8116
8117 int main() {
8118
8119 /* The GNU C library defines this for functions which it implements
8120     to always fail with ENOSYS.  Some functions are actually named
8121     something starting with __ and the normal name is an alias.  */
8122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8123 choke me
8124 #else
8125 f = $ac_func;
8126 #endif
8127
8128 ; return 0; }
8129 EOF
8130 if { (eval echo configure:8131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8131   rm -rf conftest*
8132   eval "ac_cv_func_$ac_func=yes"
8133 else
8134   echo "configure: failed program was:" >&5
8135   cat conftest.$ac_ext >&5
8136   rm -rf conftest*
8137   eval "ac_cv_func_$ac_func=no"
8138 fi
8139 rm -f conftest*
8140 fi
8141
8142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8143   echo "$ac_t""yes" 1>&6
8144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8145   cat >> confdefs.h <<EOF
8146 #define $ac_tr_func 1
8147 EOF
8148  
8149 else
8150   echo "$ac_t""no" 1>&6
8151 fi
8152 done
8153
8154                 fi
8155         fi
8156
8157                 for ac_hdr in lwp/lwp.h
8158 do
8159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8161 echo "configure:8162: checking for $ac_hdr" >&5
8162 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8163   echo $ac_n "(cached) $ac_c" 1>&6
8164 else
8165   cat > conftest.$ac_ext <<EOF
8166 #line 8167 "configure"
8167 #include "confdefs.h"
8168 #include <$ac_hdr>
8169 EOF
8170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8171 { (eval echo configure:8172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8173 if test -z "$ac_err"; then
8174   rm -rf conftest*
8175   eval "ac_cv_header_$ac_safe=yes"
8176 else
8177   echo "$ac_err" >&5
8178   echo "configure: failed program was:" >&5
8179   cat conftest.$ac_ext >&5
8180   rm -rf conftest*
8181   eval "ac_cv_header_$ac_safe=no"
8182 fi
8183 rm -f conftest*
8184 fi
8185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8186   echo "$ac_t""yes" 1>&6
8187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8188   cat >> confdefs.h <<EOF
8189 #define $ac_tr_hdr 1
8190 EOF
8191  
8192 else
8193   echo "$ac_t""no" 1>&6
8194 fi
8195 done
8196
8197         if test $ac_cv_header_lwp_lwp_h = yes ; then
8198                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8199 echo "configure:8200: checking for lwp_create in -llwp" >&5
8200 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
8201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8202   echo $ac_n "(cached) $ac_c" 1>&6
8203 else
8204   ac_save_LIBS="$LIBS"
8205 LIBS="-llwp  $LIBS"
8206 cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 /* Override any gcc2 internal prototype to avoid an error.  */
8210 /* We use char because int might match the return type of a gcc2
8211     builtin and then its argument prototype would still apply.  */
8212 char lwp_create();
8213
8214 int main() {
8215 lwp_create()
8216 ; return 0; }
8217 EOF
8218 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8219   rm -rf conftest*
8220   eval "ac_cv_lib_$ac_lib_var=yes"
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -rf conftest*
8225   eval "ac_cv_lib_$ac_lib_var=no"
8226 fi
8227 rm -f conftest*
8228 LIBS="$ac_save_LIBS"
8229
8230 fi
8231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8232   echo "$ac_t""yes" 1>&6
8233   have_lwp=yes
8234 else
8235   echo "$ac_t""no" 1>&6
8236 have_lwp=no
8237 fi
8238
8239
8240                 if test $have_lwp = yes ; then
8241                         cat >> confdefs.h <<\EOF
8242 #define HAVE_LWP 1
8243 EOF
8244
8245                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8246                         ol_link_threads=lwp
8247
8248                         if test $ol_with_yielding_select = auto ; then
8249                                 ol_with_yielding_select=no
8250                         fi
8251                 fi
8252         fi
8253 fi
8254
8255 if test $ol_with_yielding_select = yes ; then
8256         cat >> confdefs.h <<\EOF
8257 #define HAVE_YIELDING_SELECT 1
8258 EOF
8259
8260 fi
8261
8262 if test $ol_with_threads = manual ; then
8263                 ol_link_threads=yes
8264
8265         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8266
8267         for ac_hdr in pthread.h sched.h
8268 do
8269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8271 echo "configure:8272: checking for $ac_hdr" >&5
8272 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   cat > conftest.$ac_ext <<EOF
8276 #line 8277 "configure"
8277 #include "confdefs.h"
8278 #include <$ac_hdr>
8279 EOF
8280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8281 { (eval echo configure:8282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8283 if test -z "$ac_err"; then
8284   rm -rf conftest*
8285   eval "ac_cv_header_$ac_safe=yes"
8286 else
8287   echo "$ac_err" >&5
8288   echo "configure: failed program was:" >&5
8289   cat conftest.$ac_ext >&5
8290   rm -rf conftest*
8291   eval "ac_cv_header_$ac_safe=no"
8292 fi
8293 rm -f conftest*
8294 fi
8295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8296   echo "$ac_t""yes" 1>&6
8297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8298   cat >> confdefs.h <<EOF
8299 #define $ac_tr_hdr 1
8300 EOF
8301  
8302 else
8303   echo "$ac_t""no" 1>&6
8304 fi
8305 done
8306
8307         for ac_func in sched_yield pthread_yield
8308 do
8309 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8310 echo "configure:8311: checking for $ac_func" >&5
8311 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8312   echo $ac_n "(cached) $ac_c" 1>&6
8313 else
8314   cat > conftest.$ac_ext <<EOF
8315 #line 8316 "configure"
8316 #include "confdefs.h"
8317 /* System header to define __stub macros and hopefully few prototypes,
8318     which can conflict with char $ac_func(); below.  */
8319 #include <assert.h>
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char $ac_func();
8324 char (*f)();
8325
8326 int main() {
8327
8328 /* The GNU C library defines this for functions which it implements
8329     to always fail with ENOSYS.  Some functions are actually named
8330     something starting with __ and the normal name is an alias.  */
8331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8332 choke me
8333 #else
8334 f = $ac_func;
8335 #endif
8336
8337 ; return 0; }
8338 EOF
8339 if { (eval echo configure:8340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8340   rm -rf conftest*
8341   eval "ac_cv_func_$ac_func=yes"
8342 else
8343   echo "configure: failed program was:" >&5
8344   cat conftest.$ac_ext >&5
8345   rm -rf conftest*
8346   eval "ac_cv_func_$ac_func=no"
8347 fi
8348 rm -f conftest*
8349 fi
8350
8351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8352   echo "$ac_t""yes" 1>&6
8353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8354   cat >> confdefs.h <<EOF
8355 #define $ac_tr_func 1
8356 EOF
8357  
8358 else
8359   echo "$ac_t""no" 1>&6
8360 fi
8361 done
8362
8363         
8364         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8365 echo "configure:8366: checking for LinuxThreads pthread.h" >&5
8366 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
8367   echo $ac_n "(cached) $ac_c" 1>&6
8368 else
8369   cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 #include <pthread.h>
8373 EOF
8374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8375   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8376   rm -rf conftest*
8377   ol_cv_header_linux_threads=yes
8378 else
8379   rm -rf conftest*
8380   ol_cv_header_linux_threads=no
8381 fi
8382 rm -f conftest*
8383
8384                 
8385 fi
8386
8387 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8388         if test $ol_cv_header_linux_threads = yes; then
8389                 cat >> confdefs.h <<\EOF
8390 #define HAVE_LINUX_THREADS 1
8391 EOF
8392
8393         fi
8394
8395
8396         for ac_hdr in mach/cthreads.h
8397 do
8398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8400 echo "configure:8401: checking for $ac_hdr" >&5
8401 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8402   echo $ac_n "(cached) $ac_c" 1>&6
8403 else
8404   cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 #include <$ac_hdr>
8408 EOF
8409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8410 { (eval echo configure:8411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8412 if test -z "$ac_err"; then
8413   rm -rf conftest*
8414   eval "ac_cv_header_$ac_safe=yes"
8415 else
8416   echo "$ac_err" >&5
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   eval "ac_cv_header_$ac_safe=no"
8421 fi
8422 rm -f conftest*
8423 fi
8424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8425   echo "$ac_t""yes" 1>&6
8426     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8427   cat >> confdefs.h <<EOF
8428 #define $ac_tr_hdr 1
8429 EOF
8430  
8431 else
8432   echo "$ac_t""no" 1>&6
8433 fi
8434 done
8435
8436         for ac_hdr in lwp/lwp.h
8437 do
8438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8440 echo "configure:8441: checking for $ac_hdr" >&5
8441 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8442   echo $ac_n "(cached) $ac_c" 1>&6
8443 else
8444   cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 #include <$ac_hdr>
8448 EOF
8449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8450 { (eval echo configure:8451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8452 if test -z "$ac_err"; then
8453   rm -rf conftest*
8454   eval "ac_cv_header_$ac_safe=yes"
8455 else
8456   echo "$ac_err" >&5
8457   echo "configure: failed program was:" >&5
8458   cat conftest.$ac_ext >&5
8459   rm -rf conftest*
8460   eval "ac_cv_header_$ac_safe=no"
8461 fi
8462 rm -f conftest*
8463 fi
8464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8465   echo "$ac_t""yes" 1>&6
8466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8467   cat >> confdefs.h <<EOF
8468 #define $ac_tr_hdr 1
8469 EOF
8470  
8471 else
8472   echo "$ac_t""no" 1>&6
8473 fi
8474 done
8475
8476         for ac_hdr in thread.h synch.h
8477 do
8478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8479 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8480 echo "configure:8481: checking for $ac_hdr" >&5
8481 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8482   echo $ac_n "(cached) $ac_c" 1>&6
8483 else
8484   cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487 #include <$ac_hdr>
8488 EOF
8489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8490 { (eval echo configure:8491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8492 if test -z "$ac_err"; then
8493   rm -rf conftest*
8494   eval "ac_cv_header_$ac_safe=yes"
8495 else
8496   echo "$ac_err" >&5
8497   echo "configure: failed program was:" >&5
8498   cat conftest.$ac_ext >&5
8499   rm -rf conftest*
8500   eval "ac_cv_header_$ac_safe=no"
8501 fi
8502 rm -f conftest*
8503 fi
8504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8505   echo "$ac_t""yes" 1>&6
8506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8507   cat >> confdefs.h <<EOF
8508 #define $ac_tr_hdr 1
8509 EOF
8510  
8511 else
8512   echo "$ac_t""no" 1>&6
8513 fi
8514 done
8515
8516 fi
8517
8518 if test $ol_link_threads != no ; then  
8519                         cat >> confdefs.h <<\EOF
8520 #define REENTRANT 1
8521 EOF
8522
8523         cat >> confdefs.h <<\EOF
8524 #define _REENTRANT 1
8525 EOF
8526
8527         cat >> confdefs.h <<\EOF
8528 #define THREAD_SAFE 1
8529 EOF
8530
8531         cat >> confdefs.h <<\EOF
8532 #define _THREAD_SAFE 1
8533 EOF
8534
8535         cat >> confdefs.h <<\EOF
8536 #define THREADSAFE 1
8537 EOF
8538
8539         cat >> confdefs.h <<\EOF
8540 #define _THREADSAFE 1
8541 EOF
8542
8543         cat >> confdefs.h <<\EOF
8544 #define _SGI_MP_SOURCE 1
8545 EOF
8546
8547
8548                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8549 echo "configure:8550: checking for thread specific errno" >&5
8550 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8551   echo $ac_n "(cached) $ac_c" 1>&6
8552 else
8553   
8554                 cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 #include <errno.h>
8558 int main() {
8559 errno = 0;
8560 ; return 0; }
8561 EOF
8562 if { (eval echo configure:8563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8563   rm -rf conftest*
8564   ol_cv_errno_thread_specific=yes
8565 else
8566   echo "configure: failed program was:" >&5
8567   cat conftest.$ac_ext >&5
8568   rm -rf conftest*
8569   ol_cv_errno_thread_specific=no
8570 fi
8571 rm -f conftest*
8572         
8573 fi
8574
8575 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8576
8577                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8578 echo "configure:8579: checking for thread specific h_errno" >&5
8579 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8580   echo $ac_n "(cached) $ac_c" 1>&6
8581 else
8582   
8583                 cat > conftest.$ac_ext <<EOF
8584 #line 8585 "configure"
8585 #include "confdefs.h"
8586 #include <netdb.h>
8587 int main() {
8588 h_errno = 0;
8589 ; return 0; }
8590 EOF
8591 if { (eval echo configure:8592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8592   rm -rf conftest*
8593   ol_cv_h_errno_thread_specific=yes
8594 else
8595   echo "configure: failed program was:" >&5
8596   cat conftest.$ac_ext >&5
8597   rm -rf conftest*
8598   ol_cv_h_errno_thread_specific=no
8599 fi
8600 rm -f conftest*
8601         
8602 fi
8603
8604 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8605
8606         if test $ol_cv_errno_thread_specific != yes \
8607                 -o $ol_cv_h_errno_thread_specific != yes ; then
8608                 LIBS="$LTHREAD_LIBS $LIBS"
8609                 LTHREAD_LIBS=""
8610         fi
8611
8612 fi  
8613
8614 if test $ol_link_threads = no ; then
8615         if test $ol_with_threads = yes ; then
8616                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8617         fi
8618
8619         if test $ol_with_threads = auto ; then
8620                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8621                 ol_with_threads=no
8622         fi
8623
8624         cat >> confdefs.h <<\EOF
8625 #define NO_THREADS 1
8626 EOF
8627
8628         LTHREAD_LIBS=""
8629 fi
8630
8631 if test $ol_link_threads != no ; then
8632         cat >> confdefs.h <<\EOF
8633 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8634 EOF
8635
8636 fi
8637
8638
8639 ol_link_ldbm=no 
8640 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8641         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8642 echo "configure:8643: checking for DB2 library" >&5
8643 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8644   echo $ac_n "(cached) $ac_c" 1>&6
8645 else
8646         ol_LIBS="$LIBS"
8647         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8648 echo "configure:8649: checking for db_open in -ldb" >&5
8649 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8650 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8651   echo $ac_n "(cached) $ac_c" 1>&6
8652 else
8653   ac_save_LIBS="$LIBS"
8654 LIBS="-ldb  $LIBS"
8655 cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658 /* Override any gcc2 internal prototype to avoid an error.  */
8659 /* We use char because int might match the return type of a gcc2
8660     builtin and then its argument prototype would still apply.  */
8661 char db_open();
8662
8663 int main() {
8664 db_open()
8665 ; return 0; }
8666 EOF
8667 if { (eval echo configure:8668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8668   rm -rf conftest*
8669   eval "ac_cv_lib_$ac_lib_var=yes"
8670 else
8671   echo "configure: failed program was:" >&5
8672   cat conftest.$ac_ext >&5
8673   rm -rf conftest*
8674   eval "ac_cv_lib_$ac_lib_var=no"
8675 fi
8676 rm -f conftest*
8677 LIBS="$ac_save_LIBS"
8678
8679 fi
8680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8681   echo "$ac_t""yes" 1>&6
8682   ol_cv_lib_db2=-ldb
8683 else
8684   echo "$ac_t""no" 1>&6
8685 ol_cv_lib_db2=no
8686 fi
8687
8688         LIBS="$ol_LIBS"
8689
8690 fi
8691
8692 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8693
8694 for ac_hdr in db.h
8695 do
8696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8698 echo "configure:8699: checking for $ac_hdr" >&5
8699 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8700   echo $ac_n "(cached) $ac_c" 1>&6
8701 else
8702   cat > conftest.$ac_ext <<EOF
8703 #line 8704 "configure"
8704 #include "confdefs.h"
8705 #include <$ac_hdr>
8706 EOF
8707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8708 { (eval echo configure:8709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8710 if test -z "$ac_err"; then
8711   rm -rf conftest*
8712   eval "ac_cv_header_$ac_safe=yes"
8713 else
8714   echo "$ac_err" >&5
8715   echo "configure: failed program was:" >&5
8716   cat conftest.$ac_ext >&5
8717   rm -rf conftest*
8718   eval "ac_cv_header_$ac_safe=no"
8719 fi
8720 rm -f conftest*
8721 fi
8722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8723   echo "$ac_t""yes" 1>&6
8724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8725   cat >> confdefs.h <<EOF
8726 #define $ac_tr_hdr 1
8727 EOF
8728  
8729 else
8730   echo "$ac_t""no" 1>&6
8731 fi
8732 done
8733
8734 if test $ac_cv_header_db_h = yes ; then
8735         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8736 echo "configure:8737: checking if db.h is DB2" >&5
8737 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   
8741                 cat > conftest.$ac_ext <<EOF
8742 #line 8743 "configure"
8743 #include "confdefs.h"
8744
8745 #                       include <db.h>
8746                         /* this check could be improved */
8747 #                       ifdef DB_VERSION_MAJOR
8748 #                               if DB_VERSION_MAJOR == 2
8749                                         __db_version_2
8750 #                               endif
8751 #                       endif
8752                 
8753 EOF
8754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8755   egrep "__db_version_2" >/dev/null 2>&1; then
8756   rm -rf conftest*
8757   ol_cv_header_db2=yes
8758 else
8759   rm -rf conftest*
8760   ol_cv_header_db2=no
8761 fi
8762 rm -f conftest*
8763
8764 fi
8765
8766 echo "$ac_t""$ol_cv_header_db2" 1>&6
8767 else
8768         ol_cv_header_db2=no
8769 fi
8770
8771
8772  
8773  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8774 echo "configure:8775: checking for Berkeley DB2" >&5
8775 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8776   echo $ac_n "(cached) $ac_c" 1>&6
8777 else
8778   
8779         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8780                 ol_cv_berkeley_db2=no
8781         else
8782                 ol_cv_berkeley_db2=yes
8783         fi
8784
8785 fi
8786
8787 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8788  if test $ol_cv_berkeley_db2 = yes ; then
8789         cat >> confdefs.h <<\EOF
8790 #define HAVE_BERKELEY_DB2 1
8791 EOF
8792
8793  fi
8794
8795
8796         if test $ol_cv_berkeley_db2 = yes ; then
8797                 ol_link_ldbm=db2
8798                 ol_with_ldbm_api=db2
8799
8800                 if test $ol_with_ldbm_type = hash ; then
8801                         cat >> confdefs.h <<\EOF
8802 #define LDBM_USE_DBHASH 1
8803 EOF
8804
8805                 else
8806                         cat >> confdefs.h <<\EOF
8807 #define LDBM_USE_DBBTREE 1
8808 EOF
8809
8810                 fi
8811
8812                                                 if test $ol_cv_lib_db2 != yes ; then
8813                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8814                 fi
8815         fi
8816 fi
8817
8818 ol_link_bdb2=no
8819 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8820         ol_link_bdb2=yes
8821 fi
8822
8823 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8824         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8825 echo "configure:8826: checking for Berkeley DB library" >&5
8826 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8827   echo $ac_n "(cached) $ac_c" 1>&6
8828 else
8829   
8830         for ac_hdr in db1/db.h
8831 do
8832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8833 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8834 echo "configure:8835: checking for $ac_hdr" >&5
8835 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8836   echo $ac_n "(cached) $ac_c" 1>&6
8837 else
8838   cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 #include <$ac_hdr>
8842 EOF
8843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8844 { (eval echo configure:8845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8846 if test -z "$ac_err"; then
8847   rm -rf conftest*
8848   eval "ac_cv_header_$ac_safe=yes"
8849 else
8850   echo "$ac_err" >&5
8851   echo "configure: failed program was:" >&5
8852   cat conftest.$ac_ext >&5
8853   rm -rf conftest*
8854   eval "ac_cv_header_$ac_safe=no"
8855 fi
8856 rm -f conftest*
8857 fi
8858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8859   echo "$ac_t""yes" 1>&6
8860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8861   cat >> confdefs.h <<EOF
8862 #define $ac_tr_hdr 1
8863 EOF
8864  
8865 else
8866   echo "$ac_t""no" 1>&6
8867 fi
8868 done
8869
8870         ol_LIBS="$LIBS"
8871         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8872 echo "configure:8873: checking for dbopen" >&5
8873 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8874   echo $ac_n "(cached) $ac_c" 1>&6
8875 else
8876   cat > conftest.$ac_ext <<EOF
8877 #line 8878 "configure"
8878 #include "confdefs.h"
8879 /* System header to define __stub macros and hopefully few prototypes,
8880     which can conflict with char dbopen(); below.  */
8881 #include <assert.h>
8882 /* Override any gcc2 internal prototype to avoid an error.  */
8883 /* We use char because int might match the return type of a gcc2
8884     builtin and then its argument prototype would still apply.  */
8885 char dbopen();
8886 char (*f)();
8887
8888 int main() {
8889
8890 /* The GNU C library defines this for functions which it implements
8891     to always fail with ENOSYS.  Some functions are actually named
8892     something starting with __ and the normal name is an alias.  */
8893 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8894 choke me
8895 #else
8896 f = dbopen;
8897 #endif
8898
8899 ; return 0; }
8900 EOF
8901 if { (eval echo configure:8902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8902   rm -rf conftest*
8903   eval "ac_cv_func_dbopen=yes"
8904 else
8905   echo "configure: failed program was:" >&5
8906   cat conftest.$ac_ext >&5
8907   rm -rf conftest*
8908   eval "ac_cv_func_dbopen=no"
8909 fi
8910 rm -f conftest*
8911 fi
8912
8913 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8914   echo "$ac_t""yes" 1>&6
8915   ol_cv_lib_db=yes
8916 else
8917   echo "$ac_t""no" 1>&6
8918
8919                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8920 echo "configure:8921: checking for dbopen in -ldb1" >&5
8921 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
8922 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8923   echo $ac_n "(cached) $ac_c" 1>&6
8924 else
8925   ac_save_LIBS="$LIBS"
8926 LIBS="-ldb1  $LIBS"
8927 cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 /* Override any gcc2 internal prototype to avoid an error.  */
8931 /* We use char because int might match the return type of a gcc2
8932     builtin and then its argument prototype would still apply.  */
8933 char dbopen();
8934
8935 int main() {
8936 dbopen()
8937 ; return 0; }
8938 EOF
8939 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8940   rm -rf conftest*
8941   eval "ac_cv_lib_$ac_lib_var=yes"
8942 else
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -rf conftest*
8946   eval "ac_cv_lib_$ac_lib_var=no"
8947 fi
8948 rm -f conftest*
8949 LIBS="$ac_save_LIBS"
8950
8951 fi
8952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8953   echo "$ac_t""yes" 1>&6
8954   ol_cv_lib_db=-ldb1
8955 else
8956   echo "$ac_t""no" 1>&6
8957
8958                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8959 echo "configure:8960: checking for dbopen in -ldb" >&5
8960 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
8961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8962   echo $ac_n "(cached) $ac_c" 1>&6
8963 else
8964   ac_save_LIBS="$LIBS"
8965 LIBS="-ldb  $LIBS"
8966 cat > conftest.$ac_ext <<EOF
8967 #line 8968 "configure"
8968 #include "confdefs.h"
8969 /* Override any gcc2 internal prototype to avoid an error.  */
8970 /* We use char because int might match the return type of a gcc2
8971     builtin and then its argument prototype would still apply.  */
8972 char dbopen();
8973
8974 int main() {
8975 dbopen()
8976 ; return 0; }
8977 EOF
8978 if { (eval echo configure:8979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8979   rm -rf conftest*
8980   eval "ac_cv_lib_$ac_lib_var=yes"
8981 else
8982   echo "configure: failed program was:" >&5
8983   cat conftest.$ac_ext >&5
8984   rm -rf conftest*
8985   eval "ac_cv_lib_$ac_lib_var=no"
8986 fi
8987 rm -f conftest*
8988 LIBS="$ac_save_LIBS"
8989
8990 fi
8991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8992   echo "$ac_t""yes" 1>&6
8993   ol_cv_lib_db=-ldb
8994 else
8995   echo "$ac_t""no" 1>&6
8996 ol_cv_lib_db=no
8997 fi
8998
8999                 
9000 fi
9001
9002         
9003 fi
9004
9005         LIBS="$ol_LIBS"
9006
9007 fi
9008
9009 echo "$ac_t""$ol_cv_lib_db" 1>&6
9010
9011
9012 for ac_hdr in db_185.h
9013 do
9014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9016 echo "configure:9017: checking for $ac_hdr" >&5
9017 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9018   echo $ac_n "(cached) $ac_c" 1>&6
9019 else
9020   cat > conftest.$ac_ext <<EOF
9021 #line 9022 "configure"
9022 #include "confdefs.h"
9023 #include <$ac_hdr>
9024 EOF
9025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9026 { (eval echo configure:9027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9028 if test -z "$ac_err"; then
9029   rm -rf conftest*
9030   eval "ac_cv_header_$ac_safe=yes"
9031 else
9032   echo "$ac_err" >&5
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   eval "ac_cv_header_$ac_safe=no"
9037 fi
9038 rm -f conftest*
9039 fi
9040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9043   cat >> confdefs.h <<EOF
9044 #define $ac_tr_hdr 1
9045 EOF
9046  
9047 else
9048   echo "$ac_t""no" 1>&6
9049 fi
9050 done
9051
9052 if test "$ol_cv_header_db2" = yes ; then
9053         
9054         ol_cv_header_db=$ac_cv_header_db_185_h
9055 else
9056         ol_cv_header_db=$ac_cv_header_db_h
9057 fi
9058
9059
9060  
9061  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9062 echo "configure:9063: checking for Berkeley DB" >&5
9063 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
9064   echo $ac_n "(cached) $ac_c" 1>&6
9065 else
9066   
9067         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9068                 ol_cv_berkeley_db=no
9069         else
9070                 ol_cv_berkeley_db=yes
9071         fi
9072
9073 fi
9074
9075 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9076  if test $ol_cv_berkeley_db = yes ; then
9077         cat >> confdefs.h <<\EOF
9078 #define HAVE_BERKELEY_DB 1
9079 EOF
9080
9081  fi
9082
9083
9084         if test $ol_cv_berkeley_db = yes ; then
9085                 ol_link_ldbm=db
9086                 ol_with_ldbm_api=db
9087
9088                 if test $ol_with_ldbm_type = hash ; then
9089                         cat >> confdefs.h <<\EOF
9090 #define LDBM_USE_DBHASH 1
9091 EOF
9092
9093                 else
9094                         cat >> confdefs.h <<\EOF
9095 #define LDBM_USE_DBBTREE 1
9096 EOF
9097
9098                 fi
9099
9100                                                 if test $ol_cv_lib_db != yes ; then
9101                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9102                 fi
9103         fi
9104 fi
9105
9106 if test $ol_with_ldbm_api = manual ; then
9107                 ol_link_ldbm=yes
9108
9109         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9110
9111         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9112 do
9113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9115 echo "configure:9116: checking for $ac_hdr" >&5
9116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9117   echo $ac_n "(cached) $ac_c" 1>&6
9118 else
9119   cat > conftest.$ac_ext <<EOF
9120 #line 9121 "configure"
9121 #include "confdefs.h"
9122 #include <$ac_hdr>
9123 EOF
9124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9125 { (eval echo configure:9126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9127 if test -z "$ac_err"; then
9128   rm -rf conftest*
9129   eval "ac_cv_header_$ac_safe=yes"
9130 else
9131   echo "$ac_err" >&5
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -rf conftest*
9135   eval "ac_cv_header_$ac_safe=no"
9136 fi
9137 rm -f conftest*
9138 fi
9139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9140   echo "$ac_t""yes" 1>&6
9141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9142   cat >> confdefs.h <<EOF
9143 #define $ac_tr_hdr 1
9144 EOF
9145  
9146 else
9147   echo "$ac_t""no" 1>&6
9148 fi
9149 done
9150
9151 fi
9152
9153 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9154         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9155         ol_with_ldbm_api=none
9156 fi
9157
9158 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9159         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9160 echo "configure:9161: checking for MDBM library" >&5
9161 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164         ol_LIBS="$LIBS"
9165         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9166 echo "configure:9167: checking for mdbm_set_chain" >&5
9167 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
9168   echo $ac_n "(cached) $ac_c" 1>&6
9169 else
9170   cat > conftest.$ac_ext <<EOF
9171 #line 9172 "configure"
9172 #include "confdefs.h"
9173 /* System header to define __stub macros and hopefully few prototypes,
9174     which can conflict with char mdbm_set_chain(); below.  */
9175 #include <assert.h>
9176 /* Override any gcc2 internal prototype to avoid an error.  */
9177 /* We use char because int might match the return type of a gcc2
9178     builtin and then its argument prototype would still apply.  */
9179 char mdbm_set_chain();
9180 char (*f)();
9181
9182 int main() {
9183
9184 /* The GNU C library defines this for functions which it implements
9185     to always fail with ENOSYS.  Some functions are actually named
9186     something starting with __ and the normal name is an alias.  */
9187 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9188 choke me
9189 #else
9190 f = mdbm_set_chain;
9191 #endif
9192
9193 ; return 0; }
9194 EOF
9195 if { (eval echo configure:9196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9196   rm -rf conftest*
9197   eval "ac_cv_func_mdbm_set_chain=yes"
9198 else
9199   echo "configure: failed program was:" >&5
9200   cat conftest.$ac_ext >&5
9201   rm -rf conftest*
9202   eval "ac_cv_func_mdbm_set_chain=no"
9203 fi
9204 rm -f conftest*
9205 fi
9206
9207 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9208   echo "$ac_t""yes" 1>&6
9209   ol_cv_lib_mdbm=yes
9210 else
9211   echo "$ac_t""no" 1>&6
9212
9213                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9214 echo "configure:9215: checking for mdbm_set_chain in -lmdbm" >&5
9215 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
9216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9217   echo $ac_n "(cached) $ac_c" 1>&6
9218 else
9219   ac_save_LIBS="$LIBS"
9220 LIBS="-lmdbm  $LIBS"
9221 cat > conftest.$ac_ext <<EOF
9222 #line 9223 "configure"
9223 #include "confdefs.h"
9224 /* Override any gcc2 internal prototype to avoid an error.  */
9225 /* We use char because int might match the return type of a gcc2
9226     builtin and then its argument prototype would still apply.  */
9227 char mdbm_set_chain();
9228
9229 int main() {
9230 mdbm_set_chain()
9231 ; return 0; }
9232 EOF
9233 if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9234   rm -rf conftest*
9235   eval "ac_cv_lib_$ac_lib_var=yes"
9236 else
9237   echo "configure: failed program was:" >&5
9238   cat conftest.$ac_ext >&5
9239   rm -rf conftest*
9240   eval "ac_cv_lib_$ac_lib_var=no"
9241 fi
9242 rm -f conftest*
9243 LIBS="$ac_save_LIBS"
9244
9245 fi
9246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9247   echo "$ac_t""yes" 1>&6
9248   ol_cv_lib_mdbm=-lmdbm
9249 else
9250   echo "$ac_t""no" 1>&6
9251 ol_cv_lib_mdbm=no
9252 fi
9253
9254         
9255 fi
9256
9257         LIBS="$ol_LIBS"
9258
9259 fi
9260
9261 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9262
9263
9264  for ac_hdr in mdbm.h
9265 do
9266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9268 echo "configure:9269: checking for $ac_hdr" >&5
9269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9270   echo $ac_n "(cached) $ac_c" 1>&6
9271 else
9272   cat > conftest.$ac_ext <<EOF
9273 #line 9274 "configure"
9274 #include "confdefs.h"
9275 #include <$ac_hdr>
9276 EOF
9277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9278 { (eval echo configure:9279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9280 if test -z "$ac_err"; then
9281   rm -rf conftest*
9282   eval "ac_cv_header_$ac_safe=yes"
9283 else
9284   echo "$ac_err" >&5
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -rf conftest*
9288   eval "ac_cv_header_$ac_safe=no"
9289 fi
9290 rm -f conftest*
9291 fi
9292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9293   echo "$ac_t""yes" 1>&6
9294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9295   cat >> confdefs.h <<EOF
9296 #define $ac_tr_hdr 1
9297 EOF
9298  
9299 else
9300   echo "$ac_t""no" 1>&6
9301 fi
9302 done
9303
9304  echo $ac_n "checking for db""... $ac_c" 1>&6
9305 echo "configure:9306: checking for db" >&5
9306 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
9307   echo $ac_n "(cached) $ac_c" 1>&6
9308 else
9309   
9310         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9311                 ol_cv_mdbm=no
9312         else
9313                 ol_cv_mdbm=yes
9314         fi
9315
9316 fi
9317
9318 echo "$ac_t""$ol_cv_mdbm" 1>&6
9319  if test $ol_cv_mdbm = yes ; then
9320         cat >> confdefs.h <<\EOF
9321 #define HAVE_MDBM 1
9322 EOF
9323
9324  fi
9325
9326
9327         if test $ol_cv_mdbm = yes ; then
9328                 ol_link_ldbm=mdbm
9329                 ol_with_ldbm_api=mdbm
9330                 if test $ol_cv_lib_mdbm != yes ; then
9331                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9332                 fi
9333         fi
9334 fi
9335
9336 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9337         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9338 echo "configure:9339: checking for GDBM library" >&5
9339 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
9340   echo $ac_n "(cached) $ac_c" 1>&6
9341 else
9342         ol_LIBS="$LIBS"
9343         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9344 echo "configure:9345: checking for gdbm_open" >&5
9345 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
9346   echo $ac_n "(cached) $ac_c" 1>&6
9347 else
9348   cat > conftest.$ac_ext <<EOF
9349 #line 9350 "configure"
9350 #include "confdefs.h"
9351 /* System header to define __stub macros and hopefully few prototypes,
9352     which can conflict with char gdbm_open(); below.  */
9353 #include <assert.h>
9354 /* Override any gcc2 internal prototype to avoid an error.  */
9355 /* We use char because int might match the return type of a gcc2
9356     builtin and then its argument prototype would still apply.  */
9357 char gdbm_open();
9358 char (*f)();
9359
9360 int main() {
9361
9362 /* The GNU C library defines this for functions which it implements
9363     to always fail with ENOSYS.  Some functions are actually named
9364     something starting with __ and the normal name is an alias.  */
9365 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9366 choke me
9367 #else
9368 f = gdbm_open;
9369 #endif
9370
9371 ; return 0; }
9372 EOF
9373 if { (eval echo configure:9374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9374   rm -rf conftest*
9375   eval "ac_cv_func_gdbm_open=yes"
9376 else
9377   echo "configure: failed program was:" >&5
9378   cat conftest.$ac_ext >&5
9379   rm -rf conftest*
9380   eval "ac_cv_func_gdbm_open=no"
9381 fi
9382 rm -f conftest*
9383 fi
9384
9385 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9386   echo "$ac_t""yes" 1>&6
9387   ol_cv_lib_gdbm=yes
9388 else
9389   echo "$ac_t""no" 1>&6
9390
9391                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9392 echo "configure:9393: checking for gdbm_open in -lgdbm" >&5
9393 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
9394 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9395   echo $ac_n "(cached) $ac_c" 1>&6
9396 else
9397   ac_save_LIBS="$LIBS"
9398 LIBS="-lgdbm  $LIBS"
9399 cat > conftest.$ac_ext <<EOF
9400 #line 9401 "configure"
9401 #include "confdefs.h"
9402 /* Override any gcc2 internal prototype to avoid an error.  */
9403 /* We use char because int might match the return type of a gcc2
9404     builtin and then its argument prototype would still apply.  */
9405 char gdbm_open();
9406
9407 int main() {
9408 gdbm_open()
9409 ; return 0; }
9410 EOF
9411 if { (eval echo configure:9412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9412   rm -rf conftest*
9413   eval "ac_cv_lib_$ac_lib_var=yes"
9414 else
9415   echo "configure: failed program was:" >&5
9416   cat conftest.$ac_ext >&5
9417   rm -rf conftest*
9418   eval "ac_cv_lib_$ac_lib_var=no"
9419 fi
9420 rm -f conftest*
9421 LIBS="$ac_save_LIBS"
9422
9423 fi
9424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9425   echo "$ac_t""yes" 1>&6
9426   ol_cv_lib_gdbm=-lgdbm
9427 else
9428   echo "$ac_t""no" 1>&6
9429 ol_cv_lib_gdbm=no
9430 fi
9431
9432         
9433 fi
9434
9435         LIBS="$ol_LIBS"
9436
9437 fi
9438
9439 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9440
9441
9442  for ac_hdr in gdbm.h
9443 do
9444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9446 echo "configure:9447: checking for $ac_hdr" >&5
9447 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9448   echo $ac_n "(cached) $ac_c" 1>&6
9449 else
9450   cat > conftest.$ac_ext <<EOF
9451 #line 9452 "configure"
9452 #include "confdefs.h"
9453 #include <$ac_hdr>
9454 EOF
9455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9456 { (eval echo configure:9457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9458 if test -z "$ac_err"; then
9459   rm -rf conftest*
9460   eval "ac_cv_header_$ac_safe=yes"
9461 else
9462   echo "$ac_err" >&5
9463   echo "configure: failed program was:" >&5
9464   cat conftest.$ac_ext >&5
9465   rm -rf conftest*
9466   eval "ac_cv_header_$ac_safe=no"
9467 fi
9468 rm -f conftest*
9469 fi
9470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9471   echo "$ac_t""yes" 1>&6
9472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9473   cat >> confdefs.h <<EOF
9474 #define $ac_tr_hdr 1
9475 EOF
9476  
9477 else
9478   echo "$ac_t""no" 1>&6
9479 fi
9480 done
9481
9482  echo $ac_n "checking for db""... $ac_c" 1>&6
9483 echo "configure:9484: checking for db" >&5
9484 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
9485   echo $ac_n "(cached) $ac_c" 1>&6
9486 else
9487   
9488         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9489                 ol_cv_gdbm=no
9490         else
9491                 ol_cv_gdbm=yes
9492         fi
9493
9494 fi
9495
9496 echo "$ac_t""$ol_cv_gdbm" 1>&6
9497  if test $ol_cv_gdbm = yes ; then
9498         cat >> confdefs.h <<\EOF
9499 #define HAVE_GDBM 1
9500 EOF
9501
9502  fi
9503
9504
9505         if test $ol_cv_gdbm = yes ; then
9506                 ol_link_ldbm=gdbm
9507                 ol_with_ldbm_api=gdbm
9508
9509                 if test $ol_cv_lib_gdbm != yes ; then
9510                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9511                 fi
9512         fi
9513 fi
9514
9515 if test $ol_with_ldbm_api = auto ; then
9516         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9517 elif test $ol_with_ldbm_api = ndbm ; then
9518         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9519 echo "configure:9520: checking for NDBM library" >&5
9520 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9521   echo $ac_n "(cached) $ac_c" 1>&6
9522 else
9523         ol_LIBS="$LIBS"
9524         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9525 echo "configure:9526: checking for dbm_open" >&5
9526 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529   cat > conftest.$ac_ext <<EOF
9530 #line 9531 "configure"
9531 #include "confdefs.h"
9532 /* System header to define __stub macros and hopefully few prototypes,
9533     which can conflict with char dbm_open(); below.  */
9534 #include <assert.h>
9535 /* Override any gcc2 internal prototype to avoid an error.  */
9536 /* We use char because int might match the return type of a gcc2
9537     builtin and then its argument prototype would still apply.  */
9538 char dbm_open();
9539 char (*f)();
9540
9541 int main() {
9542
9543 /* The GNU C library defines this for functions which it implements
9544     to always fail with ENOSYS.  Some functions are actually named
9545     something starting with __ and the normal name is an alias.  */
9546 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9547 choke me
9548 #else
9549 f = dbm_open;
9550 #endif
9551
9552 ; return 0; }
9553 EOF
9554 if { (eval echo configure:9555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9555   rm -rf conftest*
9556   eval "ac_cv_func_dbm_open=yes"
9557 else
9558   echo "configure: failed program was:" >&5
9559   cat conftest.$ac_ext >&5
9560   rm -rf conftest*
9561   eval "ac_cv_func_dbm_open=no"
9562 fi
9563 rm -f conftest*
9564 fi
9565
9566 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9567   echo "$ac_t""yes" 1>&6
9568   ol_cv_lib_ndbm=yes
9569 else
9570   echo "$ac_t""no" 1>&6
9571
9572                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9573 echo "configure:9574: checking for dbm_open in -lndbm" >&5
9574 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9575 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9576   echo $ac_n "(cached) $ac_c" 1>&6
9577 else
9578   ac_save_LIBS="$LIBS"
9579 LIBS="-lndbm  $LIBS"
9580 cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 /* Override any gcc2 internal prototype to avoid an error.  */
9584 /* We use char because int might match the return type of a gcc2
9585     builtin and then its argument prototype would still apply.  */
9586 char dbm_open();
9587
9588 int main() {
9589 dbm_open()
9590 ; return 0; }
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9593   rm -rf conftest*
9594   eval "ac_cv_lib_$ac_lib_var=yes"
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   eval "ac_cv_lib_$ac_lib_var=no"
9600 fi
9601 rm -f conftest*
9602 LIBS="$ac_save_LIBS"
9603
9604 fi
9605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9606   echo "$ac_t""yes" 1>&6
9607   ol_cv_lib_ndbm=-lndbm
9608 else
9609   echo "$ac_t""no" 1>&6
9610
9611                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9612 echo "configure:9613: checking for dbm_open in -ldbm" >&5
9613 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9614 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   ac_save_LIBS="$LIBS"
9618 LIBS="-ldbm  $LIBS"
9619 cat > conftest.$ac_ext <<EOF
9620 #line 9621 "configure"
9621 #include "confdefs.h"
9622 /* Override any gcc2 internal prototype to avoid an error.  */
9623 /* We use char because int might match the return type of a gcc2
9624     builtin and then its argument prototype would still apply.  */
9625 char dbm_open();
9626
9627 int main() {
9628 dbm_open()
9629 ; return 0; }
9630 EOF
9631 if { (eval echo configure:9632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9632   rm -rf conftest*
9633   eval "ac_cv_lib_$ac_lib_var=yes"
9634 else
9635   echo "configure: failed program was:" >&5
9636   cat conftest.$ac_ext >&5
9637   rm -rf conftest*
9638   eval "ac_cv_lib_$ac_lib_var=no"
9639 fi
9640 rm -f conftest*
9641 LIBS="$ac_save_LIBS"
9642
9643 fi
9644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9645   echo "$ac_t""yes" 1>&6
9646   ol_cv_lib_ndbm=-ldbm
9647 else
9648   echo "$ac_t""no" 1>&6
9649 ol_cv_lib_ndbm=no
9650 fi
9651                 
9652 fi
9653
9654         
9655 fi
9656
9657         LIBS="$ol_LIBS"
9658
9659 fi
9660
9661 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9662
9663
9664  for ac_hdr in ndbm.h
9665 do
9666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9668 echo "configure:9669: checking for $ac_hdr" >&5
9669 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9670   echo $ac_n "(cached) $ac_c" 1>&6
9671 else
9672   cat > conftest.$ac_ext <<EOF
9673 #line 9674 "configure"
9674 #include "confdefs.h"
9675 #include <$ac_hdr>
9676 EOF
9677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9678 { (eval echo configure:9679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9680 if test -z "$ac_err"; then
9681   rm -rf conftest*
9682   eval "ac_cv_header_$ac_safe=yes"
9683 else
9684   echo "$ac_err" >&5
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   rm -rf conftest*
9688   eval "ac_cv_header_$ac_safe=no"
9689 fi
9690 rm -f conftest*
9691 fi
9692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9693   echo "$ac_t""yes" 1>&6
9694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9695   cat >> confdefs.h <<EOF
9696 #define $ac_tr_hdr 1
9697 EOF
9698  
9699 else
9700   echo "$ac_t""no" 1>&6
9701 fi
9702 done
9703
9704  echo $ac_n "checking for db""... $ac_c" 1>&6
9705 echo "configure:9706: checking for db" >&5
9706 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9707   echo $ac_n "(cached) $ac_c" 1>&6
9708 else
9709   
9710         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9711                 ol_cv_ndbm=no
9712         else
9713                 ol_cv_ndbm=yes
9714         fi
9715
9716 fi
9717
9718 echo "$ac_t""$ol_cv_ndbm" 1>&6
9719  if test $ol_cv_ndbm = yes ; then
9720         cat >> confdefs.h <<\EOF
9721 #define HAVE_NDBM 1
9722 EOF
9723
9724  fi
9725
9726
9727         if test $ol_cv_ndbm = yes ; then
9728                 ol_link_ldbm=ndbm
9729                 ol_with_ldbm_api=ndbm
9730
9731                 if test $ol_cv_lib_ndbm != yes ; then
9732                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9733                 fi
9734         fi
9735 fi
9736
9737 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9738         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9739         if test $ol_enable_ldbm = yes ; then
9740                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9741         fi
9742
9743         echo "configure: warning: disabling LDBM" 1>&2
9744         ol_enable_ldbm=no
9745 fi
9746
9747 if test $ol_enable_wrappers != no ; then
9748         for ac_hdr in tcpd.h
9749 do
9750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9752 echo "configure:9753: checking for $ac_hdr" >&5
9753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9754   echo $ac_n "(cached) $ac_c" 1>&6
9755 else
9756   cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759 #include <$ac_hdr>
9760 EOF
9761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9762 { (eval echo configure:9763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9764 if test -z "$ac_err"; then
9765   rm -rf conftest*
9766   eval "ac_cv_header_$ac_safe=yes"
9767 else
9768   echo "$ac_err" >&5
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   eval "ac_cv_header_$ac_safe=no"
9773 fi
9774 rm -f conftest*
9775 fi
9776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9777   echo "$ac_t""yes" 1>&6
9778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9779   cat >> confdefs.h <<EOF
9780 #define $ac_tr_hdr 1
9781 EOF
9782  
9783 else
9784   echo "$ac_t""no" 1>&6
9785 fi
9786 done
9787
9788
9789         if test $ac_cv_header_tcpd_h != yes ; then
9790                 have_wrappers=no
9791         else
9792                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9793 echo "configure:9794: checking for main in -lwrap" >&5
9794 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9796   echo $ac_n "(cached) $ac_c" 1>&6
9797 else
9798   ac_save_LIBS="$LIBS"
9799 LIBS="-lwrap  $LIBS"
9800 cat > conftest.$ac_ext <<EOF
9801 #line 9802 "configure"
9802 #include "confdefs.h"
9803
9804 int main() {
9805 main()
9806 ; return 0; }
9807 EOF
9808 if { (eval echo configure:9809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9809   rm -rf conftest*
9810   eval "ac_cv_lib_$ac_lib_var=yes"
9811 else
9812   echo "configure: failed program was:" >&5
9813   cat conftest.$ac_ext >&5
9814   rm -rf conftest*
9815   eval "ac_cv_lib_$ac_lib_var=no"
9816 fi
9817 rm -f conftest*
9818 LIBS="$ac_save_LIBS"
9819
9820 fi
9821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9822   echo "$ac_t""yes" 1>&6
9823   have_wrappers=yes
9824 else
9825   echo "$ac_t""no" 1>&6
9826 have_wrappers=no
9827 fi
9828
9829         fi
9830
9831         if test $have_wrappers = yes ; then
9832                 cat >> confdefs.h <<\EOF
9833 #define HAVE_TCPD 1
9834 EOF
9835
9836                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9837
9838                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9839 echo "configure:9840: checking for main in -lnsl" >&5
9840 ac_lib_var=`echo nsl'_'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="-lnsl  $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     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9870     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9871   cat >> confdefs.h <<EOF
9872 #define $ac_tr_lib 1
9873 EOF
9874
9875   LIBS="-lnsl $LIBS"
9876
9877 else
9878   echo "$ac_t""no" 1>&6
9879 fi
9880
9881         else
9882                 echo "configure: warning: could not find -lwrap" 1>&2
9883                 if test $ol_enable_wrappers = yes ; then
9884                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9885                 fi
9886
9887                 echo "configure: warning: disabling wrappers support" 1>&2
9888                 ol_enable_wrappers=no
9889         fi
9890 fi
9891
9892 if test $ol_enable_syslog != no ; then
9893         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9894 echo "configure:9895: checking for openlog" >&5
9895 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9896   echo $ac_n "(cached) $ac_c" 1>&6
9897 else
9898   cat > conftest.$ac_ext <<EOF
9899 #line 9900 "configure"
9900 #include "confdefs.h"
9901 /* System header to define __stub macros and hopefully few prototypes,
9902     which can conflict with char openlog(); below.  */
9903 #include <assert.h>
9904 /* Override any gcc2 internal prototype to avoid an error.  */
9905 /* We use char because int might match the return type of a gcc2
9906     builtin and then its argument prototype would still apply.  */
9907 char openlog();
9908 char (*f)();
9909
9910 int main() {
9911
9912 /* The GNU C library defines this for functions which it implements
9913     to always fail with ENOSYS.  Some functions are actually named
9914     something starting with __ and the normal name is an alias.  */
9915 #if defined (__stub_openlog) || defined (__stub___openlog)
9916 choke me
9917 #else
9918 f = openlog;
9919 #endif
9920
9921 ; return 0; }
9922 EOF
9923 if { (eval echo configure:9924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9924   rm -rf conftest*
9925   eval "ac_cv_func_openlog=yes"
9926 else
9927   echo "configure: failed program was:" >&5
9928   cat conftest.$ac_ext >&5
9929   rm -rf conftest*
9930   eval "ac_cv_func_openlog=no"
9931 fi
9932 rm -f conftest*
9933 fi
9934
9935 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9936   echo "$ac_t""yes" 1>&6
9937   :
9938 else
9939   echo "$ac_t""no" 1>&6
9940 fi
9941
9942         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9943                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9944         fi
9945         ol_enable_syslog=$ac_cv_func_openlog
9946 fi
9947
9948 if test $ol_enable_dmalloc != no ; then
9949         for ac_hdr in dmalloc.h
9950 do
9951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9953 echo "configure:9954: checking for $ac_hdr" >&5
9954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9955   echo $ac_n "(cached) $ac_c" 1>&6
9956 else
9957   cat > conftest.$ac_ext <<EOF
9958 #line 9959 "configure"
9959 #include "confdefs.h"
9960 #include <$ac_hdr>
9961 EOF
9962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9963 { (eval echo configure:9964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9965 if test -z "$ac_err"; then
9966   rm -rf conftest*
9967   eval "ac_cv_header_$ac_safe=yes"
9968 else
9969   echo "$ac_err" >&5
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972   rm -rf conftest*
9973   eval "ac_cv_header_$ac_safe=no"
9974 fi
9975 rm -f conftest*
9976 fi
9977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9978   echo "$ac_t""yes" 1>&6
9979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9980   cat >> confdefs.h <<EOF
9981 #define $ac_tr_hdr 1
9982 EOF
9983  
9984 else
9985   echo "$ac_t""no" 1>&6
9986 fi
9987 done
9988
9989         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9990 echo "configure:9991: checking for dmalloc_shutdown in -ldmalloc" >&5
9991 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
9992 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9993   echo $ac_n "(cached) $ac_c" 1>&6
9994 else
9995   ac_save_LIBS="$LIBS"
9996 LIBS="-ldmalloc  $LIBS"
9997 cat > conftest.$ac_ext <<EOF
9998 #line 9999 "configure"
9999 #include "confdefs.h"
10000 /* Override any gcc2 internal prototype to avoid an error.  */
10001 /* We use char because int might match the return type of a gcc2
10002     builtin and then its argument prototype would still apply.  */
10003 char dmalloc_shutdown();
10004
10005 int main() {
10006 dmalloc_shutdown()
10007 ; return 0; }
10008 EOF
10009 if { (eval echo configure:10010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10010   rm -rf conftest*
10011   eval "ac_cv_lib_$ac_lib_var=yes"
10012 else
10013   echo "configure: failed program was:" >&5
10014   cat conftest.$ac_ext >&5
10015   rm -rf conftest*
10016   eval "ac_cv_lib_$ac_lib_var=no"
10017 fi
10018 rm -f conftest*
10019 LIBS="$ac_save_LIBS"
10020
10021 fi
10022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10023   echo "$ac_t""yes" 1>&6
10024     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10025     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10026   cat >> confdefs.h <<EOF
10027 #define $ac_tr_lib 1
10028 EOF
10029
10030   LIBS="-ldmalloc $LIBS"
10031
10032 else
10033   echo "$ac_t""no" 1>&6
10034 fi
10035
10036 fi
10037
10038 if test $ol_enable_tcl != no ; then
10039         for ac_hdr in tcl.h
10040 do
10041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10043 echo "configure:10044: checking for $ac_hdr" >&5
10044 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10045   echo $ac_n "(cached) $ac_c" 1>&6
10046 else
10047   cat > conftest.$ac_ext <<EOF
10048 #line 10049 "configure"
10049 #include "confdefs.h"
10050 #include <$ac_hdr>
10051 EOF
10052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10053 { (eval echo configure:10054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10055 if test -z "$ac_err"; then
10056   rm -rf conftest*
10057   eval "ac_cv_header_$ac_safe=yes"
10058 else
10059   echo "$ac_err" >&5
10060   echo "configure: failed program was:" >&5
10061   cat conftest.$ac_ext >&5
10062   rm -rf conftest*
10063   eval "ac_cv_header_$ac_safe=no"
10064 fi
10065 rm -f conftest*
10066 fi
10067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10068   echo "$ac_t""yes" 1>&6
10069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10070   cat >> confdefs.h <<EOF
10071 #define $ac_tr_hdr 1
10072 EOF
10073  
10074 else
10075   echo "$ac_t""no" 1>&6
10076 fi
10077 done
10078
10079
10080         if test $ac_cv_header_tcl_h != yes ; then
10081                 have_tcl=no
10082         else
10083                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10084 echo "configure:10085: checking for main in -ltcl" >&5
10085 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
10086 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10087   echo $ac_n "(cached) $ac_c" 1>&6
10088 else
10089   ac_save_LIBS="$LIBS"
10090 LIBS="-ltcl  $LIBS"
10091 cat > conftest.$ac_ext <<EOF
10092 #line 10093 "configure"
10093 #include "confdefs.h"
10094
10095 int main() {
10096 main()
10097 ; return 0; }
10098 EOF
10099 if { (eval echo configure:10100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10100   rm -rf conftest*
10101   eval "ac_cv_lib_$ac_lib_var=yes"
10102 else
10103   echo "configure: failed program was:" >&5
10104   cat conftest.$ac_ext >&5
10105   rm -rf conftest*
10106   eval "ac_cv_lib_$ac_lib_var=no"
10107 fi
10108 rm -f conftest*
10109 LIBS="$ac_save_LIBS"
10110
10111 fi
10112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10113   echo "$ac_t""yes" 1>&6
10114   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10115 else
10116   echo "$ac_t""no" 1>&6
10117 have_tcl=no
10118 fi
10119
10120
10121                 if test $have_tcl != yes; then
10122                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10123 echo "configure:10124: checking for main in -ltcl7.6" >&5
10124 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
10125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10126   echo $ac_n "(cached) $ac_c" 1>&6
10127 else
10128   ac_save_LIBS="$LIBS"
10129 LIBS="-ltcl7.6  $LIBS"
10130 cat > conftest.$ac_ext <<EOF
10131 #line 10132 "configure"
10132 #include "confdefs.h"
10133
10134 int main() {
10135 main()
10136 ; return 0; }
10137 EOF
10138 if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10139   rm -rf conftest*
10140   eval "ac_cv_lib_$ac_lib_var=yes"
10141 else
10142   echo "configure: failed program was:" >&5
10143   cat conftest.$ac_ext >&5
10144   rm -rf conftest*
10145   eval "ac_cv_lib_$ac_lib_var=no"
10146 fi
10147 rm -f conftest*
10148 LIBS="$ac_save_LIBS"
10149
10150 fi
10151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10152   echo "$ac_t""yes" 1>&6
10153   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10154 else
10155   echo "$ac_t""no" 1>&6
10156 have_tcl=no
10157 fi
10158
10159                 fi
10160
10161                 if test $have_tcl != yes; then
10162                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10163 echo "configure:10164: checking for main in -ltcl8.0" >&5
10164 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
10165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   ac_save_LIBS="$LIBS"
10169 LIBS="-ltcl8.0  $LIBS"
10170 cat > conftest.$ac_ext <<EOF
10171 #line 10172 "configure"
10172 #include "confdefs.h"
10173
10174 int main() {
10175 main()
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10179   rm -rf conftest*
10180   eval "ac_cv_lib_$ac_lib_var=yes"
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_lib_$ac_lib_var=no"
10186 fi
10187 rm -f conftest*
10188 LIBS="$ac_save_LIBS"
10189
10190 fi
10191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10192   echo "$ac_t""yes" 1>&6
10193   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10194 else
10195   echo "$ac_t""no" 1>&6
10196 have_tcl=no
10197 fi
10198
10199                 fi
10200         fi
10201
10202         if test $have_tcl != yes ; then
10203                 echo "configure: warning: could not find -ltcl" 1>&2
10204                 if test $ol_enable_tcl = yes ; then
10205                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10206                 fi
10207
10208                 ol_enable_tcl=no
10209         fi
10210 fi
10211
10212 # ud needs termcap (should insert check here)
10213 ol_link_termcap=no
10214 for ac_hdr in termcap.h ncurses.h
10215 do
10216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10218 echo "configure:10219: checking for $ac_hdr" >&5
10219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10220   echo $ac_n "(cached) $ac_c" 1>&6
10221 else
10222   cat > conftest.$ac_ext <<EOF
10223 #line 10224 "configure"
10224 #include "confdefs.h"
10225 #include <$ac_hdr>
10226 EOF
10227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10228 { (eval echo configure:10229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10230 if test -z "$ac_err"; then
10231   rm -rf conftest*
10232   eval "ac_cv_header_$ac_safe=yes"
10233 else
10234   echo "$ac_err" >&5
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   eval "ac_cv_header_$ac_safe=no"
10239 fi
10240 rm -f conftest*
10241 fi
10242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10243   echo "$ac_t""yes" 1>&6
10244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10245   cat >> confdefs.h <<EOF
10246 #define $ac_tr_hdr 1
10247 EOF
10248  
10249 else
10250   echo "$ac_t""no" 1>&6
10251 fi
10252 done
10253
10254
10255 if test $ol_link_termcap = no ; then
10256         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10257 echo "configure:10258: checking for tputs in -ltermcap" >&5
10258 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
10259 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10260   echo $ac_n "(cached) $ac_c" 1>&6
10261 else
10262   ac_save_LIBS="$LIBS"
10263 LIBS="-ltermcap  $LIBS"
10264 cat > conftest.$ac_ext <<EOF
10265 #line 10266 "configure"
10266 #include "confdefs.h"
10267 /* Override any gcc2 internal prototype to avoid an error.  */
10268 /* We use char because int might match the return type of a gcc2
10269     builtin and then its argument prototype would still apply.  */
10270 char tputs();
10271
10272 int main() {
10273 tputs()
10274 ; return 0; }
10275 EOF
10276 if { (eval echo configure:10277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10277   rm -rf conftest*
10278   eval "ac_cv_lib_$ac_lib_var=yes"
10279 else
10280   echo "configure: failed program was:" >&5
10281   cat conftest.$ac_ext >&5
10282   rm -rf conftest*
10283   eval "ac_cv_lib_$ac_lib_var=no"
10284 fi
10285 rm -f conftest*
10286 LIBS="$ac_save_LIBS"
10287
10288 fi
10289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10290   echo "$ac_t""yes" 1>&6
10291   have_termcap=yes
10292 else
10293   echo "$ac_t""no" 1>&6
10294 have_termcap=no
10295 fi
10296
10297         if test $have_termcap = yes ; then
10298                 cat >> confdefs.h <<\EOF
10299 #define HAVE_TERMCAP 1
10300 EOF
10301
10302                 ol_link_termcap=yes
10303                 TERMCAP_LIBS=-ltermcap
10304         fi
10305 fi
10306
10307 if test $ol_link_termcap = no ; then
10308         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10309 echo "configure:10310: checking for initscr in -lncurses" >&5
10310 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
10311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10312   echo $ac_n "(cached) $ac_c" 1>&6
10313 else
10314   ac_save_LIBS="$LIBS"
10315 LIBS="-lncurses  $LIBS"
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319 /* Override any gcc2 internal prototype to avoid an error.  */
10320 /* We use char because int might match the return type of a gcc2
10321     builtin and then its argument prototype would still apply.  */
10322 char initscr();
10323
10324 int main() {
10325 initscr()
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10329   rm -rf conftest*
10330   eval "ac_cv_lib_$ac_lib_var=yes"
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -rf conftest*
10335   eval "ac_cv_lib_$ac_lib_var=no"
10336 fi
10337 rm -f conftest*
10338 LIBS="$ac_save_LIBS"
10339
10340 fi
10341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10342   echo "$ac_t""yes" 1>&6
10343   have_ncurses=yes
10344 else
10345   echo "$ac_t""no" 1>&6
10346 have_ncurses=no
10347 fi
10348
10349         if test $have_ncurses = yes ; then
10350                 cat >> confdefs.h <<\EOF
10351 #define HAVE_NCURSES 1
10352 EOF
10353
10354                 ol_link_termcap=yes
10355                 TERMCAP_LIBS=-lncurses
10356         fi
10357 fi
10358
10359 if test $ol_link_termcap = no ; then
10360         cat >> confdefs.h <<\EOF
10361 #define NO_TERMCAP 1
10362 EOF
10363
10364         TERMCAP_LIBS=
10365 fi
10366
10367 ol_link_readline=no
10368 if test $ol_with_readline != no ; then
10369         for ac_hdr in readline/readline.h readline/history.h
10370 do
10371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10373 echo "configure:10374: checking for $ac_hdr" >&5
10374 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10375   echo $ac_n "(cached) $ac_c" 1>&6
10376 else
10377   cat > conftest.$ac_ext <<EOF
10378 #line 10379 "configure"
10379 #include "confdefs.h"
10380 #include <$ac_hdr>
10381 EOF
10382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10383 { (eval echo configure:10384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10385 if test -z "$ac_err"; then
10386   rm -rf conftest*
10387   eval "ac_cv_header_$ac_safe=yes"
10388 else
10389   echo "$ac_err" >&5
10390   echo "configure: failed program was:" >&5
10391   cat conftest.$ac_ext >&5
10392   rm -rf conftest*
10393   eval "ac_cv_header_$ac_safe=no"
10394 fi
10395 rm -f conftest*
10396 fi
10397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10398   echo "$ac_t""yes" 1>&6
10399     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10400   cat >> confdefs.h <<EOF
10401 #define $ac_tr_hdr 1
10402 EOF
10403  
10404 else
10405   echo "$ac_t""no" 1>&6
10406 fi
10407 done
10408
10409
10410         if test $ac_cv_header_readline_readline_h = yes ; then
10411                 save_LIBS="$LIBS"
10412                 LIBS="$TERMCAP_LIBS $LIBS"
10413                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10414 echo "configure:10415: checking for readline in -lreadline" >&5
10415 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
10416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10417   echo $ac_n "(cached) $ac_c" 1>&6
10418 else
10419   ac_save_LIBS="$LIBS"
10420 LIBS="-lreadline  $LIBS"
10421 cat > conftest.$ac_ext <<EOF
10422 #line 10423 "configure"
10423 #include "confdefs.h"
10424 /* Override any gcc2 internal prototype to avoid an error.  */
10425 /* We use char because int might match the return type of a gcc2
10426     builtin and then its argument prototype would still apply.  */
10427 char readline();
10428
10429 int main() {
10430 readline()
10431 ; return 0; }
10432 EOF
10433 if { (eval echo configure:10434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10434   rm -rf conftest*
10435   eval "ac_cv_lib_$ac_lib_var=yes"
10436 else
10437   echo "configure: failed program was:" >&5
10438   cat conftest.$ac_ext >&5
10439   rm -rf conftest*
10440   eval "ac_cv_lib_$ac_lib_var=no"
10441 fi
10442 rm -f conftest*
10443 LIBS="$ac_save_LIBS"
10444
10445 fi
10446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10447   echo "$ac_t""yes" 1>&6
10448   have_readline=yes
10449 else
10450   echo "$ac_t""no" 1>&6
10451 have_readline=no
10452 fi
10453
10454                 LIBS="$save_LIBS"
10455                         
10456                 if test $have_readline = yes ; then
10457                         ol_with_readline=found
10458                         ol_link_readline=yes
10459
10460                         READLINE_LIBS="-lreadline"
10461                 fi
10462         fi
10463 fi
10464
10465 if test $ol_link_readline = yes ; then
10466         cat >> confdefs.h <<\EOF
10467 #define HAVE_READLINE 1
10468 EOF
10469
10470 fi
10471
10472
10473 # FreeBSD (and others) have crypt(3) in -lcrypt
10474 if test $ol_enable_crypt != no ; then
10475         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10476 echo "configure:10477: checking for crypt" >&5
10477 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
10478   echo $ac_n "(cached) $ac_c" 1>&6
10479 else
10480   cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 /* System header to define __stub macros and hopefully few prototypes,
10484     which can conflict with char crypt(); below.  */
10485 #include <assert.h>
10486 /* Override any gcc2 internal prototype to avoid an error.  */
10487 /* We use char because int might match the return type of a gcc2
10488     builtin and then its argument prototype would still apply.  */
10489 char crypt();
10490 char (*f)();
10491
10492 int main() {
10493
10494 /* The GNU C library defines this for functions which it implements
10495     to always fail with ENOSYS.  Some functions are actually named
10496     something starting with __ and the normal name is an alias.  */
10497 #if defined (__stub_crypt) || defined (__stub___crypt)
10498 choke me
10499 #else
10500 f = crypt;
10501 #endif
10502
10503 ; return 0; }
10504 EOF
10505 if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10506   rm -rf conftest*
10507   eval "ac_cv_func_crypt=yes"
10508 else
10509   echo "configure: failed program was:" >&5
10510   cat conftest.$ac_ext >&5
10511   rm -rf conftest*
10512   eval "ac_cv_func_crypt=no"
10513 fi
10514 rm -f conftest*
10515 fi
10516
10517 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10518   echo "$ac_t""yes" 1>&6
10519   have_crypt=yes
10520 else
10521   echo "$ac_t""no" 1>&6
10522
10523                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10524 echo "configure:10525: checking for crypt in -lcrypt" >&5
10525 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10526 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10527   echo $ac_n "(cached) $ac_c" 1>&6
10528 else
10529   ac_save_LIBS="$LIBS"
10530 LIBS="-lcrypt  $LIBS"
10531 cat > conftest.$ac_ext <<EOF
10532 #line 10533 "configure"
10533 #include "confdefs.h"
10534 /* Override any gcc2 internal prototype to avoid an error.  */
10535 /* We use char because int might match the return type of a gcc2
10536     builtin and then its argument prototype would still apply.  */
10537 char crypt();
10538
10539 int main() {
10540 crypt()
10541 ; return 0; }
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10544   rm -rf conftest*
10545   eval "ac_cv_lib_$ac_lib_var=yes"
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -rf conftest*
10550   eval "ac_cv_lib_$ac_lib_var=no"
10551 fi
10552 rm -f conftest*
10553 LIBS="$ac_save_LIBS"
10554
10555 fi
10556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10557   echo "$ac_t""yes" 1>&6
10558   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10559                         have_crypt=yes
10560 else
10561   echo "$ac_t""no" 1>&6
10562 have_crypt=no
10563 fi
10564
10565 fi
10566
10567
10568         if test $have_crypt = yes ; then
10569                 cat >> confdefs.h <<\EOF
10570 #define HAVE_CRYPT 1
10571 EOF
10572
10573         else
10574                 echo "configure: warning: could not find crypt" 1>&2
10575                 if test $ol_enable_crypt = yes ; then
10576                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10577                 fi
10578
10579                 echo "configure: warning: disabling crypt support" 1>&2
10580                 ol_enable_crypt=no
10581         fi
10582 fi
10583
10584 # FreeBSD (and others) have setproctitle(3) in -lutil
10585 if test $ol_enable_proctitle != no ; then
10586         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10587 echo "configure:10588: checking for setproctitle" >&5
10588 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   cat > conftest.$ac_ext <<EOF
10592 #line 10593 "configure"
10593 #include "confdefs.h"
10594 /* System header to define __stub macros and hopefully few prototypes,
10595     which can conflict with char setproctitle(); below.  */
10596 #include <assert.h>
10597 /* Override any gcc2 internal prototype to avoid an error.  */
10598 /* We use char because int might match the return type of a gcc2
10599     builtin and then its argument prototype would still apply.  */
10600 char setproctitle();
10601 char (*f)();
10602
10603 int main() {
10604
10605 /* The GNU C library defines this for functions which it implements
10606     to always fail with ENOSYS.  Some functions are actually named
10607     something starting with __ and the normal name is an alias.  */
10608 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10609 choke me
10610 #else
10611 f = setproctitle;
10612 #endif
10613
10614 ; return 0; }
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10617   rm -rf conftest*
10618   eval "ac_cv_func_setproctitle=yes"
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   eval "ac_cv_func_setproctitle=no"
10624 fi
10625 rm -f conftest*
10626 fi
10627
10628 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10629   echo "$ac_t""yes" 1>&6
10630   have_setproctitle=yes
10631 else
10632   echo "$ac_t""no" 1>&6
10633
10634                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10635 echo "configure:10636: checking for setproctitle in -lutil" >&5
10636 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10637 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10638   echo $ac_n "(cached) $ac_c" 1>&6
10639 else
10640   ac_save_LIBS="$LIBS"
10641 LIBS="-lutil  $LIBS"
10642 cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645 /* Override any gcc2 internal prototype to avoid an error.  */
10646 /* We use char because int might match the return type of a gcc2
10647     builtin and then its argument prototype would still apply.  */
10648 char setproctitle();
10649
10650 int main() {
10651 setproctitle()
10652 ; return 0; }
10653 EOF
10654 if { (eval echo configure:10655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10655   rm -rf conftest*
10656   eval "ac_cv_lib_$ac_lib_var=yes"
10657 else
10658   echo "configure: failed program was:" >&5
10659   cat conftest.$ac_ext >&5
10660   rm -rf conftest*
10661   eval "ac_cv_lib_$ac_lib_var=no"
10662 fi
10663 rm -f conftest*
10664 LIBS="$ac_save_LIBS"
10665
10666 fi
10667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10668   echo "$ac_t""yes" 1>&6
10669   have_setproctitle=yes
10670                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10671 else
10672   echo "$ac_t""no" 1>&6
10673 have_setproctitle=no
10674                         LIBOBJS="$LIBOBJS setproctitle.o"
10675 fi
10676
10677 fi
10678
10679
10680         if test $have_setproctitle = yes ; then
10681                 cat >> confdefs.h <<\EOF
10682 #define HAVE_SETPROCTITLE 1
10683 EOF
10684
10685         fi
10686 fi
10687
10688 ol=$LIBS
10689 LIBS="-lfetch -lcom_err $LIBS"
10690 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10691 echo "configure:10692: checking fetch(3) library" >&5
10692 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
10693   echo $ac_n "(cached) $ac_c" 1>&6
10694 else
10695   
10696         cat > conftest.$ac_ext <<EOF
10697 #line 10698 "configure"
10698 #include "confdefs.h"
10699
10700 #include <sys/param.h>
10701 #include <stdio.h>
10702 #include <fetch.h>
10703 int main() {
10704 struct url *u = fetchParseURL("file:///"); 
10705 ; return 0; }
10706 EOF
10707 if { (eval echo configure:10708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10708   rm -rf conftest*
10709   ol_cv_lib_fetch=yes
10710 else
10711   echo "configure: failed program was:" >&5
10712   cat conftest.$ac_ext >&5
10713   rm -rf conftest*
10714   ol_cv_lib_fetch=no
10715 fi
10716 rm -f conftest*
10717 fi
10718
10719 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10720 LIBS=$ol_LIBS
10721 if test $ol_cv_lib_fetch != no ; then
10722         ol_link_fetch="-lfetch -lcom_err"
10723         cat >> confdefs.h <<\EOF
10724 #define HAVE_FETCH 1
10725 EOF
10726
10727 fi
10728
10729
10730 if test $ol_cv_lib_fetch != no ; then
10731         LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10732 fi 
10733
10734 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10735 echo "configure:10736: checking for uid_t in sys/types.h" >&5
10736 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10737   echo $ac_n "(cached) $ac_c" 1>&6
10738 else
10739   cat > conftest.$ac_ext <<EOF
10740 #line 10741 "configure"
10741 #include "confdefs.h"
10742 #include <sys/types.h>
10743 EOF
10744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10745   egrep "uid_t" >/dev/null 2>&1; then
10746   rm -rf conftest*
10747   ac_cv_type_uid_t=yes
10748 else
10749   rm -rf conftest*
10750   ac_cv_type_uid_t=no
10751 fi
10752 rm -f conftest*
10753
10754 fi
10755
10756 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10757 if test $ac_cv_type_uid_t = no; then
10758   cat >> confdefs.h <<\EOF
10759 #define uid_t int
10760 EOF
10761
10762   cat >> confdefs.h <<\EOF
10763 #define gid_t int
10764 EOF
10765
10766 fi
10767
10768 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10769 echo "configure:10770: checking type of array argument to getgroups" >&5
10770 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10771   echo $ac_n "(cached) $ac_c" 1>&6
10772 else
10773   if test "$cross_compiling" = yes; then
10774   ac_cv_type_getgroups=cross
10775 else
10776   cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779
10780 /* Thanks to Mike Rendell for this test.  */
10781 #include <sys/types.h>
10782 #define NGID 256
10783 #undef MAX
10784 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10785 main()
10786 {
10787   gid_t gidset[NGID];
10788   int i, n;
10789   union { gid_t gval; long lval; }  val;
10790
10791   val.lval = -1;
10792   for (i = 0; i < NGID; i++)
10793     gidset[i] = val.gval;
10794   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10795                  gidset);
10796   /* Exit non-zero if getgroups seems to require an array of ints.  This
10797      happens when gid_t is short but getgroups modifies an array of ints.  */
10798   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10799 }
10800
10801 EOF
10802 if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10803 then
10804     ac_cv_type_getgroups=gid_t
10805 else
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -fr conftest*
10809   ac_cv_type_getgroups=int
10810 fi
10811 rm -fr conftest*
10812 fi
10813
10814 if test $ac_cv_type_getgroups = cross; then
10815         cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 #include <unistd.h>
10819 EOF
10820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10821   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10822   rm -rf conftest*
10823   ac_cv_type_getgroups=gid_t
10824 else
10825   rm -rf conftest*
10826   ac_cv_type_getgroups=int
10827 fi
10828 rm -f conftest*
10829
10830 fi
10831 fi
10832
10833 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10834 cat >> confdefs.h <<EOF
10835 #define GETGROUPS_T $ac_cv_type_getgroups
10836 EOF
10837
10838  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10839 echo "configure:10840: checking for ANSI C header files" >&5
10840 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
10841   echo $ac_n "(cached) $ac_c" 1>&6
10842 else
10843   cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846 #include <stdlib.h>
10847 #include <stdarg.h>
10848 #include <string.h>
10849 #include <float.h>
10850 EOF
10851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10852 { (eval echo configure:10853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10854 if test -z "$ac_err"; then
10855   rm -rf conftest*
10856   ac_cv_header_stdc=yes
10857 else
10858   echo "$ac_err" >&5
10859   echo "configure: failed program was:" >&5
10860   cat conftest.$ac_ext >&5
10861   rm -rf conftest*
10862   ac_cv_header_stdc=no
10863 fi
10864 rm -f conftest*
10865
10866 if test $ac_cv_header_stdc = yes; then
10867   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10868 cat > conftest.$ac_ext <<EOF
10869 #line 10870 "configure"
10870 #include "confdefs.h"
10871 #include <string.h>
10872 EOF
10873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10874   egrep "memchr" >/dev/null 2>&1; then
10875   :
10876 else
10877   rm -rf conftest*
10878   ac_cv_header_stdc=no
10879 fi
10880 rm -f conftest*
10881
10882 fi
10883
10884 if test $ac_cv_header_stdc = yes; then
10885   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10886 cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889 #include <stdlib.h>
10890 EOF
10891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10892   egrep "free" >/dev/null 2>&1; then
10893   :
10894 else
10895   rm -rf conftest*
10896   ac_cv_header_stdc=no
10897 fi
10898 rm -f conftest*
10899
10900 fi
10901
10902 if test $ac_cv_header_stdc = yes; then
10903   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10904 if test "$cross_compiling" = yes; then
10905   :
10906 else
10907   cat > conftest.$ac_ext <<EOF
10908 #line 10909 "configure"
10909 #include "confdefs.h"
10910 #include <ctype.h>
10911 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10912 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10913 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10914 int main () { int i; for (i = 0; i < 256; i++)
10915 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10916 exit (0); }
10917
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10920 then
10921   :
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -fr conftest*
10926   ac_cv_header_stdc=no
10927 fi
10928 rm -fr conftest*
10929 fi
10930
10931 fi
10932 fi
10933
10934 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10935 if test $ac_cv_header_stdc = yes; then
10936   cat >> confdefs.h <<\EOF
10937 #define STDC_HEADERS 1
10938 EOF
10939
10940 fi
10941
10942 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10943 echo "configure:10944: checking for mode_t" >&5
10944 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
10945   echo $ac_n "(cached) $ac_c" 1>&6
10946 else
10947   cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 #include <sys/types.h>
10951 #if STDC_HEADERS
10952 #include <stdlib.h>
10953 #include <stddef.h>
10954 #endif
10955 EOF
10956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10957   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10958   rm -rf conftest*
10959   eval "ac_cv_type_mode_t=yes"
10960 else
10961   rm -rf conftest*
10962   eval "ac_cv_type_mode_t=no"
10963 fi
10964 rm -f conftest*
10965
10966 fi
10967 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
10968   echo "$ac_t""yes" 1>&6
10969 else
10970   echo "$ac_t""no" 1>&6
10971   cat >> confdefs.h <<EOF
10972 #define mode_t int
10973 EOF
10974
10975 fi
10976
10977 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10978 echo "configure:10979: checking for off_t" >&5
10979 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
10980   echo $ac_n "(cached) $ac_c" 1>&6
10981 else
10982   cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985 #include <sys/types.h>
10986 #if STDC_HEADERS
10987 #include <stdlib.h>
10988 #include <stddef.h>
10989 #endif
10990 EOF
10991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10992   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10993   rm -rf conftest*
10994   eval "ac_cv_type_off_t=yes"
10995 else
10996   rm -rf conftest*
10997   eval "ac_cv_type_off_t=no"
10998 fi
10999 rm -f conftest*
11000
11001 fi
11002 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
11003   echo "$ac_t""yes" 1>&6
11004 else
11005   echo "$ac_t""no" 1>&6
11006   cat >> confdefs.h <<EOF
11007 #define off_t long
11008 EOF
11009
11010 fi
11011
11012 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11013 echo "configure:11014: checking for pid_t" >&5
11014 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
11015   echo $ac_n "(cached) $ac_c" 1>&6
11016 else
11017   cat > conftest.$ac_ext <<EOF
11018 #line 11019 "configure"
11019 #include "confdefs.h"
11020 #include <sys/types.h>
11021 #if STDC_HEADERS
11022 #include <stdlib.h>
11023 #include <stddef.h>
11024 #endif
11025 EOF
11026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11027   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11028   rm -rf conftest*
11029   eval "ac_cv_type_pid_t=yes"
11030 else
11031   rm -rf conftest*
11032   eval "ac_cv_type_pid_t=no"
11033 fi
11034 rm -f conftest*
11035
11036 fi
11037 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
11038   echo "$ac_t""yes" 1>&6
11039 else
11040   echo "$ac_t""no" 1>&6
11041   cat >> confdefs.h <<EOF
11042 #define pid_t int
11043 EOF
11044
11045 fi
11046
11047 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11048 echo "configure:11049: checking for ptrdiff_t" >&5
11049 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11050   echo $ac_n "(cached) $ac_c" 1>&6
11051 else
11052   cat > conftest.$ac_ext <<EOF
11053 #line 11054 "configure"
11054 #include "confdefs.h"
11055 #include <stddef.h>
11056 int main() {
11057 ptrdiff_t p
11058 ; return 0; }
11059 EOF
11060 if { (eval echo configure:11061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11061   rm -rf conftest*
11062   am_cv_type_ptrdiff_t=yes
11063 else
11064   echo "configure: failed program was:" >&5
11065   cat conftest.$ac_ext >&5
11066   rm -rf conftest*
11067   am_cv_type_ptrdiff_t=no
11068 fi
11069 rm -f conftest*
11070 fi
11071
11072 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11073    if test $am_cv_type_ptrdiff_t = yes; then
11074      cat >> confdefs.h <<\EOF
11075 #define HAVE_PTRDIFF_T 1
11076 EOF
11077
11078    fi
11079
11080 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11081 echo "configure:11082: checking return type of signal handlers" >&5
11082 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11083   echo $ac_n "(cached) $ac_c" 1>&6
11084 else
11085   cat > conftest.$ac_ext <<EOF
11086 #line 11087 "configure"
11087 #include "confdefs.h"
11088 #include <sys/types.h>
11089 #include <signal.h>
11090 #ifdef signal
11091 #undef signal
11092 #endif
11093 #ifdef __cplusplus
11094 extern "C" void (*signal (int, void (*)(int)))(int);
11095 #else
11096 void (*signal ()) ();
11097 #endif
11098
11099 int main() {
11100 int i;
11101 ; return 0; }
11102 EOF
11103 if { (eval echo configure:11104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11104   rm -rf conftest*
11105   ac_cv_type_signal=void
11106 else
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -rf conftest*
11110   ac_cv_type_signal=int
11111 fi
11112 rm -f conftest*
11113 fi
11114
11115 echo "$ac_t""$ac_cv_type_signal" 1>&6
11116 cat >> confdefs.h <<EOF
11117 #define RETSIGTYPE $ac_cv_type_signal
11118 EOF
11119
11120
11121 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11122 echo "configure:11123: checking for sig_atomic_t" >&5
11123 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11124   echo $ac_n "(cached) $ac_c" 1>&6
11125 else
11126   cat > conftest.$ac_ext <<EOF
11127 #line 11128 "configure"
11128 #include "confdefs.h"
11129 #include <signal.h>
11130 int main() {
11131 sig_atomic_t atomic;
11132 ; return 0; }
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11135   rm -rf conftest*
11136   ol_cv_type_sig_atomic_t=yes
11137 else
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   ol_cv_type_sig_atomic_t=no
11142 fi
11143 rm -f conftest*
11144 fi
11145
11146 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11147   if test $ol_cv_type_sig_atomic_t = no; then
11148     cat >> confdefs.h <<\EOF
11149 #define sig_atomic_t int
11150 EOF
11151
11152   fi
11153  
11154 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11155 echo "configure:11156: checking for size_t" >&5
11156 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11157   echo $ac_n "(cached) $ac_c" 1>&6
11158 else
11159   cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 #include <sys/types.h>
11163 #if STDC_HEADERS
11164 #include <stdlib.h>
11165 #include <stddef.h>
11166 #endif
11167 EOF
11168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11169   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11170   rm -rf conftest*
11171   eval "ac_cv_type_size_t=yes"
11172 else
11173   rm -rf conftest*
11174   eval "ac_cv_type_size_t=no"
11175 fi
11176 rm -f conftest*
11177
11178 fi
11179 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11180   echo "$ac_t""yes" 1>&6
11181 else
11182   echo "$ac_t""no" 1>&6
11183   cat >> confdefs.h <<EOF
11184 #define size_t unsigned
11185 EOF
11186
11187 fi
11188
11189 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11190 echo "configure:11191: checking for socklen_t" >&5
11191 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11192   echo $ac_n "(cached) $ac_c" 1>&6
11193 else
11194   cat > conftest.$ac_ext <<EOF
11195 #line 11196 "configure"
11196 #include "confdefs.h"
11197
11198 #ifdef HAVE_SYS_TYPES_H
11199 #include <sys/types.h>
11200 #endif
11201 #ifdef HAVE_SYS_SOCKET_H
11202 #include <sys/socket.h>
11203 #endif
11204
11205 int main() {
11206 socklen_t len;
11207 ; return 0; }
11208 EOF
11209 if { (eval echo configure:11210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11210   rm -rf conftest*
11211   ol_cv_type_socklen_t=yes
11212 else
11213   echo "configure: failed program was:" >&5
11214   cat conftest.$ac_ext >&5
11215   rm -rf conftest*
11216   ol_cv_type_socklen_t=no
11217 fi
11218 rm -f conftest*
11219 fi
11220
11221 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11222   if test $ol_cv_type_socklen_t = no; then
11223     cat >> confdefs.h <<\EOF
11224 #define socklen_t int
11225 EOF
11226
11227   fi
11228  
11229 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11230 echo "configure:11231: checking for member st_blksize in aggregate type struct stat" >&5
11231 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11232   echo $ac_n "(cached) $ac_c" 1>&6
11233 else
11234   cat > conftest.$ac_ext <<EOF
11235 #line 11236 "configure"
11236 #include "confdefs.h"
11237 #include <sys/types.h>
11238 #include <sys/stat.h>
11239 int main() {
11240 struct stat foo; foo.st_blksize;
11241 ; return 0; }
11242 EOF
11243 if { (eval echo configure:11244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11244   rm -rf conftest*
11245   ac_cv_c_struct_member_st_blksize=yes
11246 else
11247   echo "configure: failed program was:" >&5
11248   cat conftest.$ac_ext >&5
11249   rm -rf conftest*
11250   ac_cv_c_struct_member_st_blksize=no
11251 fi
11252 rm -f conftest*
11253 fi
11254
11255 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11256 st_blksize="$ac_cv_c_struct_member_st_blksize"
11257 if test $ac_cv_c_struct_member_st_blksize = yes; then
11258   cat >> confdefs.h <<\EOF
11259 #define HAVE_ST_BLKSIZE 1
11260 EOF
11261
11262 fi
11263
11264 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11265 echo "configure:11266: checking whether time.h and sys/time.h may both be included" >&5
11266 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11267   echo $ac_n "(cached) $ac_c" 1>&6
11268 else
11269   cat > conftest.$ac_ext <<EOF
11270 #line 11271 "configure"
11271 #include "confdefs.h"
11272 #include <sys/types.h>
11273 #include <sys/time.h>
11274 #include <time.h>
11275 int main() {
11276 struct tm *tp;
11277 ; return 0; }
11278 EOF
11279 if { (eval echo configure:11280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11280   rm -rf conftest*
11281   ac_cv_header_time=yes
11282 else
11283   echo "configure: failed program was:" >&5
11284   cat conftest.$ac_ext >&5
11285   rm -rf conftest*
11286   ac_cv_header_time=no
11287 fi
11288 rm -f conftest*
11289 fi
11290
11291 echo "$ac_t""$ac_cv_header_time" 1>&6
11292 if test $ac_cv_header_time = yes; then
11293   cat >> confdefs.h <<\EOF
11294 #define TIME_WITH_SYS_TIME 1
11295 EOF
11296
11297 fi
11298
11299 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11300 echo "configure:11301: checking whether struct tm is in sys/time.h or time.h" >&5
11301 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11302   echo $ac_n "(cached) $ac_c" 1>&6
11303 else
11304   cat > conftest.$ac_ext <<EOF
11305 #line 11306 "configure"
11306 #include "confdefs.h"
11307 #include <sys/types.h>
11308 #include <time.h>
11309 int main() {
11310 struct tm *tp; tp->tm_sec;
11311 ; return 0; }
11312 EOF
11313 if { (eval echo configure:11314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11314   rm -rf conftest*
11315   ac_cv_struct_tm=time.h
11316 else
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -rf conftest*
11320   ac_cv_struct_tm=sys/time.h
11321 fi
11322 rm -f conftest*
11323 fi
11324
11325 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11326 if test $ac_cv_struct_tm = sys/time.h; then
11327   cat >> confdefs.h <<\EOF
11328 #define TM_IN_SYS_TIME 1
11329 EOF
11330
11331 fi
11332
11333 # test for pw_gecos in struct passwd
11334 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11335 echo "configure:11336: checking struct passwd for pw_gecos" >&5
11336 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11337   echo $ac_n "(cached) $ac_c" 1>&6
11338 else
11339   
11340         cat > conftest.$ac_ext <<EOF
11341 #line 11342 "configure"
11342 #include "confdefs.h"
11343 #include <pwd.h>
11344 int main() {
11345
11346         struct passwd pwd;
11347         pwd.pw_gecos = pwd.pw_name;
11348
11349 ; return 0; }
11350 EOF
11351 if { (eval echo configure:11352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11352   rm -rf conftest*
11353   ol_cv_struct_passwd_pw_gecos=yes
11354 else
11355   echo "configure: failed program was:" >&5
11356   cat conftest.$ac_ext >&5
11357   rm -rf conftest*
11358   ol_cv_struct_passwd_pw_gecos=no
11359 fi
11360 rm -f conftest*
11361 fi
11362
11363 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11364 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11365         cat >> confdefs.h <<\EOF
11366 #define HAVE_PW_GECOS 1
11367 EOF
11368
11369 fi
11370
11371 # test for pw_passwd in struct passwd
11372 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11373 echo "configure:11374: checking struct passwd for pw_passwd" >&5
11374 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11375   echo $ac_n "(cached) $ac_c" 1>&6
11376 else
11377   
11378         cat > conftest.$ac_ext <<EOF
11379 #line 11380 "configure"
11380 #include "confdefs.h"
11381 #include <pwd.h>
11382 int main() {
11383
11384         struct passwd pwd;
11385         pwd.pw_passwd = pwd.pw_name;
11386
11387 ; return 0; }
11388 EOF
11389 if { (eval echo configure:11390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11390   rm -rf conftest*
11391   ol_cv_struct_passwd_pw_passwd=yes
11392 else
11393   echo "configure: failed program was:" >&5
11394   cat conftest.$ac_ext >&5
11395   rm -rf conftest*
11396   ol_cv_struct_passwd_pw_passwd=no
11397 fi
11398 rm -f conftest*
11399 fi
11400
11401 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11402 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11403         cat >> confdefs.h <<\EOF
11404 #define HAVE_PW_PASSWD 1
11405 EOF
11406
11407 fi
11408
11409
11410 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11411 echo "configure:11412: checking if toupper() requires islower()" >&5
11412 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11413   echo $ac_n "(cached) $ac_c" 1>&6
11414 else
11415   
11416         if test "$cross_compiling" = yes; then
11417   ol_cv_c_upper_lower=safe
11418 else
11419   cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422
11423 #include <ctype.h>
11424 main()
11425 {
11426         if ('C' == toupper('C'))
11427                 exit(0);
11428         else
11429                 exit(1);
11430 }
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11433 then
11434   ol_cv_c_upper_lower=no
11435 else
11436   echo "configure: failed program was:" >&5
11437   cat conftest.$ac_ext >&5
11438   rm -fr conftest*
11439   ol_cv_c_upper_lower=yes
11440 fi
11441 rm -fr conftest*
11442 fi
11443
11444 fi
11445
11446 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11447 if test $ol_cv_c_upper_lower != no ; then
11448         cat >> confdefs.h <<\EOF
11449 #define C_UPPER_LOWER 1
11450 EOF
11451
11452 fi
11453
11454 echo $ac_n "checking for working const""... $ac_c" 1>&6
11455 echo "configure:11456: checking for working const" >&5
11456 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11457   echo $ac_n "(cached) $ac_c" 1>&6
11458 else
11459   cat > conftest.$ac_ext <<EOF
11460 #line 11461 "configure"
11461 #include "confdefs.h"
11462
11463 int main() {
11464
11465 /* Ultrix mips cc rejects this.  */
11466 typedef int charset[2]; const charset x;
11467 /* SunOS 4.1.1 cc rejects this.  */
11468 char const *const *ccp;
11469 char **p;
11470 /* NEC SVR4.0.2 mips cc rejects this.  */
11471 struct point {int x, y;};
11472 static struct point const zero = {0,0};
11473 /* AIX XL C 1.02.0.0 rejects this.
11474    It does not let you subtract one const X* pointer from another in an arm
11475    of an if-expression whose if-part is not a constant expression */
11476 const char *g = "string";
11477 ccp = &g + (g ? g-g : 0);
11478 /* HPUX 7.0 cc rejects these. */
11479 ++ccp;
11480 p = (char**) ccp;
11481 ccp = (char const *const *) p;
11482 { /* SCO 3.2v4 cc rejects this.  */
11483   char *t;
11484   char const *s = 0 ? (char *) 0 : (char const *) 0;
11485
11486   *t++ = 0;
11487 }
11488 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11489   int x[] = {25, 17};
11490   const int *foo = &x[0];
11491   ++foo;
11492 }
11493 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11494   typedef const int *iptr;
11495   iptr p = 0;
11496   ++p;
11497 }
11498 { /* AIX XL C 1.02.0.0 rejects this saying
11499      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11500   struct s { int j; const int *ap[3]; };
11501   struct s *b; b->j = 5;
11502 }
11503 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11504   const int foo = 10;
11505 }
11506
11507 ; return 0; }
11508 EOF
11509 if { (eval echo configure:11510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11510   rm -rf conftest*
11511   ac_cv_c_const=yes
11512 else
11513   echo "configure: failed program was:" >&5
11514   cat conftest.$ac_ext >&5
11515   rm -rf conftest*
11516   ac_cv_c_const=no
11517 fi
11518 rm -f conftest*
11519 fi
11520
11521 echo "$ac_t""$ac_cv_c_const" 1>&6
11522 if test $ac_cv_c_const = no; then
11523   cat >> confdefs.h <<\EOF
11524 #define const 
11525 EOF
11526
11527 fi
11528
11529 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11530 echo "configure:11531: checking if compiler understands volatile" >&5
11531 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11532   echo $ac_n "(cached) $ac_c" 1>&6
11533 else
11534   cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11537 int x, y, z;
11538 int main() {
11539 volatile int a; int * volatile b = x ? &y : &z;
11540       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11541       *b = 0;
11542 ; return 0; }
11543 EOF
11544 if { (eval echo configure:11545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11545   rm -rf conftest*
11546   ol_cv_c_volatile=yes
11547 else
11548   echo "configure: failed program was:" >&5
11549   cat conftest.$ac_ext >&5
11550   rm -rf conftest*
11551   ol_cv_c_volatile=no
11552 fi
11553 rm -f conftest*
11554 fi
11555
11556 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11557   if test $ol_cv_c_volatile = yes; then
11558     : 
11559   else
11560     cat >> confdefs.h <<\EOF
11561 #define volatile 
11562 EOF
11563
11564   fi
11565  
11566
11567 if test $cross_compiling = yes ; then
11568         cat >> confdefs.h <<\EOF
11569 #define CROSS_COMPILING 1
11570 EOF
11571
11572
11573         cat >> confdefs.h <<\EOF
11574 #define LBER_INT_T long
11575 EOF
11576
11577         cat >> confdefs.h <<\EOF
11578 #define LBER_TAG_T long
11579 EOF
11580
11581         cat >> confdefs.h <<\EOF
11582 #define LBER_SOCKET_T int
11583 EOF
11584
11585
11586 else
11587         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11588 echo "configure:11589: checking whether byte ordering is bigendian" >&5
11589 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   ac_cv_c_bigendian=unknown
11593 # See if sys/param.h defines the BYTE_ORDER macro.
11594 cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 #include <sys/types.h>
11598 #include <sys/param.h>
11599 int main() {
11600
11601 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11602  bogus endian macros
11603 #endif
11604 ; return 0; }
11605 EOF
11606 if { (eval echo configure:11607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11607   rm -rf conftest*
11608   # It does; now see whether it defined to BIG_ENDIAN or not.
11609 cat > conftest.$ac_ext <<EOF
11610 #line 11611 "configure"
11611 #include "confdefs.h"
11612 #include <sys/types.h>
11613 #include <sys/param.h>
11614 int main() {
11615
11616 #if BYTE_ORDER != BIG_ENDIAN
11617  not big endian
11618 #endif
11619 ; return 0; }
11620 EOF
11621 if { (eval echo configure:11622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11622   rm -rf conftest*
11623   ac_cv_c_bigendian=yes
11624 else
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   ac_cv_c_bigendian=no
11629 fi
11630 rm -f conftest*
11631 else
11632   echo "configure: failed program was:" >&5
11633   cat conftest.$ac_ext >&5
11634 fi
11635 rm -f conftest*
11636 if test $ac_cv_c_bigendian = unknown; then
11637 if test "$cross_compiling" = yes; then
11638     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11639 else
11640   cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643 main () {
11644   /* Are we little or big endian?  From Harbison&Steele.  */
11645   union
11646   {
11647     long l;
11648     char c[sizeof (long)];
11649   } u;
11650   u.l = 1;
11651   exit (u.c[sizeof (long) - 1] == 1);
11652 }
11653 EOF
11654 if { (eval echo configure:11655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11655 then
11656   ac_cv_c_bigendian=no
11657 else
11658   echo "configure: failed program was:" >&5
11659   cat conftest.$ac_ext >&5
11660   rm -fr conftest*
11661   ac_cv_c_bigendian=yes
11662 fi
11663 rm -fr conftest*
11664 fi
11665
11666 fi
11667 fi
11668
11669 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11670 if test $ac_cv_c_bigendian = yes; then
11671   cat >> confdefs.h <<\EOF
11672 #define WORDS_BIGENDIAN 1
11673 EOF
11674
11675 fi
11676
11677         echo $ac_n "checking size of short""... $ac_c" 1>&6
11678 echo "configure:11679: checking size of short" >&5
11679 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11680   echo $ac_n "(cached) $ac_c" 1>&6
11681 else
11682   if test "$cross_compiling" = yes; then
11683     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11684 else
11685   cat > conftest.$ac_ext <<EOF
11686 #line 11687 "configure"
11687 #include "confdefs.h"
11688 #include <stdio.h>
11689 main()
11690 {
11691   FILE *f=fopen("conftestval", "w");
11692   if (!f) exit(1);
11693   fprintf(f, "%d\n", sizeof(short));
11694   exit(0);
11695 }
11696 EOF
11697 if { (eval echo configure:11698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11698 then
11699   ac_cv_sizeof_short=`cat conftestval`
11700 else
11701   echo "configure: failed program was:" >&5
11702   cat conftest.$ac_ext >&5
11703   rm -fr conftest*
11704   ac_cv_sizeof_short=0
11705 fi
11706 rm -fr conftest*
11707 fi
11708
11709 fi
11710 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11711 cat >> confdefs.h <<EOF
11712 #define SIZEOF_SHORT $ac_cv_sizeof_short
11713 EOF
11714
11715  
11716         echo $ac_n "checking size of int""... $ac_c" 1>&6
11717 echo "configure:11718: checking size of int" >&5
11718 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11719   echo $ac_n "(cached) $ac_c" 1>&6
11720 else
11721   if test "$cross_compiling" = yes; then
11722     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11723 else
11724   cat > conftest.$ac_ext <<EOF
11725 #line 11726 "configure"
11726 #include "confdefs.h"
11727 #include <stdio.h>
11728 main()
11729 {
11730   FILE *f=fopen("conftestval", "w");
11731   if (!f) exit(1);
11732   fprintf(f, "%d\n", sizeof(int));
11733   exit(0);
11734 }
11735 EOF
11736 if { (eval echo configure:11737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11737 then
11738   ac_cv_sizeof_int=`cat conftestval`
11739 else
11740   echo "configure: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   rm -fr conftest*
11743   ac_cv_sizeof_int=0
11744 fi
11745 rm -fr conftest*
11746 fi
11747
11748 fi
11749 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11750 cat >> confdefs.h <<EOF
11751 #define SIZEOF_INT $ac_cv_sizeof_int
11752 EOF
11753
11754  
11755         echo $ac_n "checking size of long""... $ac_c" 1>&6
11756 echo "configure:11757: checking size of long" >&5
11757 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11758   echo $ac_n "(cached) $ac_c" 1>&6
11759 else
11760   if test "$cross_compiling" = yes; then
11761     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11762 else
11763   cat > conftest.$ac_ext <<EOF
11764 #line 11765 "configure"
11765 #include "confdefs.h"
11766 #include <stdio.h>
11767 main()
11768 {
11769   FILE *f=fopen("conftestval", "w");
11770   if (!f) exit(1);
11771   fprintf(f, "%d\n", sizeof(long));
11772   exit(0);
11773 }
11774 EOF
11775 if { (eval echo configure:11776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11776 then
11777   ac_cv_sizeof_long=`cat conftestval`
11778 else
11779   echo "configure: failed program was:" >&5
11780   cat conftest.$ac_ext >&5
11781   rm -fr conftest*
11782   ac_cv_sizeof_long=0
11783 fi
11784 rm -fr conftest*
11785 fi
11786
11787 fi
11788 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11789 cat >> confdefs.h <<EOF
11790 #define SIZEOF_LONG $ac_cv_sizeof_long
11791 EOF
11792
11793
11794
11795         if test "$ac_cv_sizeof_int" -lt 4 ; then
11796                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11797
11798                 cat >> confdefs.h <<\EOF
11799 #define LBER_INT_T long
11800 EOF
11801
11802                 cat >> confdefs.h <<\EOF
11803 #define LBER_TAG_T long
11804 EOF
11805
11806                 cat >> confdefs.h <<\EOF
11807 #define LBER_SOCKET_T int
11808 EOF
11809
11810         else
11811                 cat >> confdefs.h <<\EOF
11812 #define LBER_INT_T int
11813 EOF
11814
11815                 cat >> confdefs.h <<\EOF
11816 #define LBER_TAG_T long
11817 EOF
11818
11819                 cat >> confdefs.h <<\EOF
11820 #define LBER_SOCKET_T int
11821 EOF
11822
11823         fi
11824 fi
11825
11826 cat >> confdefs.h <<\EOF
11827 #define LBER_LEN_T long
11828 EOF
11829
11830
11831 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11832 echo "configure:11833: checking for 8-bit clean memcmp" >&5
11833 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
11834   echo $ac_n "(cached) $ac_c" 1>&6
11835 else
11836   if test "$cross_compiling" = yes; then
11837   ac_cv_func_memcmp_clean=no
11838 else
11839   cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842
11843 main()
11844 {
11845   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11846   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11847 }
11848
11849 EOF
11850 if { (eval echo configure:11851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11851 then
11852   ac_cv_func_memcmp_clean=yes
11853 else
11854   echo "configure: failed program was:" >&5
11855   cat conftest.$ac_ext >&5
11856   rm -fr conftest*
11857   ac_cv_func_memcmp_clean=no
11858 fi
11859 rm -fr conftest*
11860 fi
11861
11862 fi
11863
11864 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11865 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11866
11867 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11868 echo "configure:11869: checking for strftime" >&5
11869 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
11870   echo $ac_n "(cached) $ac_c" 1>&6
11871 else
11872   cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875 /* System header to define __stub macros and hopefully few prototypes,
11876     which can conflict with char strftime(); below.  */
11877 #include <assert.h>
11878 /* Override any gcc2 internal prototype to avoid an error.  */
11879 /* We use char because int might match the return type of a gcc2
11880     builtin and then its argument prototype would still apply.  */
11881 char strftime();
11882 char (*f)();
11883
11884 int main() {
11885
11886 /* The GNU C library defines this for functions which it implements
11887     to always fail with ENOSYS.  Some functions are actually named
11888     something starting with __ and the normal name is an alias.  */
11889 #if defined (__stub_strftime) || defined (__stub___strftime)
11890 choke me
11891 #else
11892 f = strftime;
11893 #endif
11894
11895 ; return 0; }
11896 EOF
11897 if { (eval echo configure:11898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11898   rm -rf conftest*
11899   eval "ac_cv_func_strftime=yes"
11900 else
11901   echo "configure: failed program was:" >&5
11902   cat conftest.$ac_ext >&5
11903   rm -rf conftest*
11904   eval "ac_cv_func_strftime=no"
11905 fi
11906 rm -f conftest*
11907 fi
11908
11909 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11910   echo "$ac_t""yes" 1>&6
11911   cat >> confdefs.h <<\EOF
11912 #define HAVE_STRFTIME 1
11913 EOF
11914
11915 else
11916   echo "$ac_t""no" 1>&6
11917 # strftime is in -lintl on SCO UNIX.
11918 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11919 echo "configure:11920: checking for strftime in -lintl" >&5
11920 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
11921 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11922   echo $ac_n "(cached) $ac_c" 1>&6
11923 else
11924   ac_save_LIBS="$LIBS"
11925 LIBS="-lintl  $LIBS"
11926 cat > conftest.$ac_ext <<EOF
11927 #line 11928 "configure"
11928 #include "confdefs.h"
11929 /* Override any gcc2 internal prototype to avoid an error.  */
11930 /* We use char because int might match the return type of a gcc2
11931     builtin and then its argument prototype would still apply.  */
11932 char strftime();
11933
11934 int main() {
11935 strftime()
11936 ; return 0; }
11937 EOF
11938 if { (eval echo configure:11939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11939   rm -rf conftest*
11940   eval "ac_cv_lib_$ac_lib_var=yes"
11941 else
11942   echo "configure: failed program was:" >&5
11943   cat conftest.$ac_ext >&5
11944   rm -rf conftest*
11945   eval "ac_cv_lib_$ac_lib_var=no"
11946 fi
11947 rm -f conftest*
11948 LIBS="$ac_save_LIBS"
11949
11950 fi
11951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11952   echo "$ac_t""yes" 1>&6
11953   cat >> confdefs.h <<\EOF
11954 #define HAVE_STRFTIME 1
11955 EOF
11956
11957 LIBS="-lintl $LIBS"
11958 else
11959   echo "$ac_t""no" 1>&6
11960 fi
11961
11962 fi
11963
11964
11965 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11966 echo "configure:11967: checking for vprintf" >&5
11967 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
11968   echo $ac_n "(cached) $ac_c" 1>&6
11969 else
11970   cat > conftest.$ac_ext <<EOF
11971 #line 11972 "configure"
11972 #include "confdefs.h"
11973 /* System header to define __stub macros and hopefully few prototypes,
11974     which can conflict with char vprintf(); below.  */
11975 #include <assert.h>
11976 /* Override any gcc2 internal prototype to avoid an error.  */
11977 /* We use char because int might match the return type of a gcc2
11978     builtin and then its argument prototype would still apply.  */
11979 char vprintf();
11980 char (*f)();
11981
11982 int main() {
11983
11984 /* The GNU C library defines this for functions which it implements
11985     to always fail with ENOSYS.  Some functions are actually named
11986     something starting with __ and the normal name is an alias.  */
11987 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11988 choke me
11989 #else
11990 f = vprintf;
11991 #endif
11992
11993 ; return 0; }
11994 EOF
11995 if { (eval echo configure:11996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11996   rm -rf conftest*
11997   eval "ac_cv_func_vprintf=yes"
11998 else
11999   echo "configure: failed program was:" >&5
12000   cat conftest.$ac_ext >&5
12001   rm -rf conftest*
12002   eval "ac_cv_func_vprintf=no"
12003 fi
12004 rm -f conftest*
12005 fi
12006
12007 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12008   echo "$ac_t""yes" 1>&6
12009   cat >> confdefs.h <<\EOF
12010 #define HAVE_VPRINTF 1
12011 EOF
12012
12013 else
12014   echo "$ac_t""no" 1>&6
12015 fi
12016
12017 if test "$ac_cv_func_vprintf" != yes; then
12018 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12019 echo "configure:12020: checking for _doprnt" >&5
12020 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
12021   echo $ac_n "(cached) $ac_c" 1>&6
12022 else
12023   cat > conftest.$ac_ext <<EOF
12024 #line 12025 "configure"
12025 #include "confdefs.h"
12026 /* System header to define __stub macros and hopefully few prototypes,
12027     which can conflict with char _doprnt(); below.  */
12028 #include <assert.h>
12029 /* Override any gcc2 internal prototype to avoid an error.  */
12030 /* We use char because int might match the return type of a gcc2
12031     builtin and then its argument prototype would still apply.  */
12032 char _doprnt();
12033 char (*f)();
12034
12035 int main() {
12036
12037 /* The GNU C library defines this for functions which it implements
12038     to always fail with ENOSYS.  Some functions are actually named
12039     something starting with __ and the normal name is an alias.  */
12040 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12041 choke me
12042 #else
12043 f = _doprnt;
12044 #endif
12045
12046 ; return 0; }
12047 EOF
12048 if { (eval echo configure:12049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12049   rm -rf conftest*
12050   eval "ac_cv_func__doprnt=yes"
12051 else
12052   echo "configure: failed program was:" >&5
12053   cat conftest.$ac_ext >&5
12054   rm -rf conftest*
12055   eval "ac_cv_func__doprnt=no"
12056 fi
12057 rm -f conftest*
12058 fi
12059
12060 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12061   echo "$ac_t""yes" 1>&6
12062   cat >> confdefs.h <<\EOF
12063 #define HAVE_DOPRNT 1
12064 EOF
12065
12066 else
12067   echo "$ac_t""no" 1>&6
12068 fi
12069
12070 fi
12071
12072
12073 if test $ac_cv_func_vprintf = yes ; then
12074                 for ac_func in vsnprintf vsprintf
12075 do
12076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12077 echo "configure:12078: checking for $ac_func" >&5
12078 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12079   echo $ac_n "(cached) $ac_c" 1>&6
12080 else
12081   cat > conftest.$ac_ext <<EOF
12082 #line 12083 "configure"
12083 #include "confdefs.h"
12084 /* System header to define __stub macros and hopefully few prototypes,
12085     which can conflict with char $ac_func(); below.  */
12086 #include <assert.h>
12087 /* Override any gcc2 internal prototype to avoid an error.  */
12088 /* We use char because int might match the return type of a gcc2
12089     builtin and then its argument prototype would still apply.  */
12090 char $ac_func();
12091 char (*f)();
12092
12093 int main() {
12094
12095 /* The GNU C library defines this for functions which it implements
12096     to always fail with ENOSYS.  Some functions are actually named
12097     something starting with __ and the normal name is an alias.  */
12098 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12099 choke me
12100 #else
12101 f = $ac_func;
12102 #endif
12103
12104 ; return 0; }
12105 EOF
12106 if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12107   rm -rf conftest*
12108   eval "ac_cv_func_$ac_func=yes"
12109 else
12110   echo "configure: failed program was:" >&5
12111   cat conftest.$ac_ext >&5
12112   rm -rf conftest*
12113   eval "ac_cv_func_$ac_func=no"
12114 fi
12115 rm -f conftest*
12116 fi
12117
12118 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12119   echo "$ac_t""yes" 1>&6
12120     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12121   cat >> confdefs.h <<EOF
12122 #define $ac_tr_func 1
12123 EOF
12124  
12125 else
12126   echo "$ac_t""no" 1>&6
12127 fi
12128 done
12129
12130 fi
12131
12132 for ac_func in \
12133         bcopy                   \
12134         closesocket             \
12135         endgrent                \
12136         endpwent                \
12137         flock                   \
12138         getdtablesize   \
12139         getgrgid                \
12140         gethostname             \
12141         getpass                 \
12142         getpwuid                \
12143         getpwnam                \
12144         getspnam                \
12145         gettimeofday    \
12146         initgroups              \
12147         lockf                   \
12148         memcpy                  \
12149         memmove                 \
12150         mkstemp                 \
12151         read                    \
12152         recv                    \
12153         recvfrom                \
12154         setpwfile               \
12155         setgid                  \
12156         setegid                 \
12157         setsid                  \
12158         setuid                  \
12159         seteuid                 \
12160         signal                  \
12161         sigset                  \
12162         snprintf                \
12163         strdup                  \
12164         strerror                \
12165         strpbrk                 \
12166         strrchr                 \
12167         strsep                  \
12168         strstr                  \
12169         strtol                  \
12170         strtoul                 \
12171         strspn                  \
12172         sysconf                 \
12173         waitpid                 \
12174         wait4                   \
12175         write                   \
12176         send                    \
12177         sendto                  \
12178
12179 do
12180 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12181 echo "configure:12182: checking for $ac_func" >&5
12182 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12183   echo $ac_n "(cached) $ac_c" 1>&6
12184 else
12185   cat > conftest.$ac_ext <<EOF
12186 #line 12187 "configure"
12187 #include "confdefs.h"
12188 /* System header to define __stub macros and hopefully few prototypes,
12189     which can conflict with char $ac_func(); below.  */
12190 #include <assert.h>
12191 /* Override any gcc2 internal prototype to avoid an error.  */
12192 /* We use char because int might match the return type of a gcc2
12193     builtin and then its argument prototype would still apply.  */
12194 char $ac_func();
12195 char (*f)();
12196
12197 int main() {
12198
12199 /* The GNU C library defines this for functions which it implements
12200     to always fail with ENOSYS.  Some functions are actually named
12201     something starting with __ and the normal name is an alias.  */
12202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12203 choke me
12204 #else
12205 f = $ac_func;
12206 #endif
12207
12208 ; return 0; }
12209 EOF
12210 if { (eval echo configure:12211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12211   rm -rf conftest*
12212   eval "ac_cv_func_$ac_func=yes"
12213 else
12214   echo "configure: failed program was:" >&5
12215   cat conftest.$ac_ext >&5
12216   rm -rf conftest*
12217   eval "ac_cv_func_$ac_func=no"
12218 fi
12219 rm -f conftest*
12220 fi
12221
12222 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12223   echo "$ac_t""yes" 1>&6
12224     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12225   cat >> confdefs.h <<EOF
12226 #define $ac_tr_func 1
12227 EOF
12228  
12229 else
12230   echo "$ac_t""no" 1>&6
12231 fi
12232 done
12233
12234
12235 for ac_func in getopt tempnam
12236 do
12237 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12238 echo "configure:12239: checking for $ac_func" >&5
12239 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12240   echo $ac_n "(cached) $ac_c" 1>&6
12241 else
12242   cat > conftest.$ac_ext <<EOF
12243 #line 12244 "configure"
12244 #include "confdefs.h"
12245 /* System header to define __stub macros and hopefully few prototypes,
12246     which can conflict with char $ac_func(); below.  */
12247 #include <assert.h>
12248 /* Override any gcc2 internal prototype to avoid an error.  */
12249 /* We use char because int might match the return type of a gcc2
12250     builtin and then its argument prototype would still apply.  */
12251 char $ac_func();
12252 char (*f)();
12253
12254 int main() {
12255
12256 /* The GNU C library defines this for functions which it implements
12257     to always fail with ENOSYS.  Some functions are actually named
12258     something starting with __ and the normal name is an alias.  */
12259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12260 choke me
12261 #else
12262 f = $ac_func;
12263 #endif
12264
12265 ; return 0; }
12266 EOF
12267 if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12268   rm -rf conftest*
12269   eval "ac_cv_func_$ac_func=yes"
12270 else
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -rf conftest*
12274   eval "ac_cv_func_$ac_func=no"
12275 fi
12276 rm -f conftest*
12277 fi
12278
12279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12280   echo "$ac_t""yes" 1>&6
12281     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12282   cat >> confdefs.h <<EOF
12283 #define $ac_tr_func 1
12284 EOF
12285  
12286 else
12287   echo "$ac_t""no" 1>&6
12288 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12289 fi
12290 done
12291
12292
12293
12294 # Check Configuration
12295 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12296 echo "configure:12297: checking declaration of sys_errlist" >&5
12297 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12298   echo $ac_n "(cached) $ac_c" 1>&6
12299 else
12300   
12301         cat > conftest.$ac_ext <<EOF
12302 #line 12303 "configure"
12303 #include "confdefs.h"
12304
12305 #include <stdio.h>
12306 #include <sys/types.h>
12307 #include <errno.h> 
12308 int main() {
12309 char *c = (char *) *sys_errlist
12310 ; return 0; }
12311 EOF
12312 if { (eval echo configure:12313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12313   rm -rf conftest*
12314   ol_cv_dcl_sys_errlist=yes
12315         ol_cv_have_sys_errlist=yes
12316 else
12317   echo "configure: failed program was:" >&5
12318   cat conftest.$ac_ext >&5
12319   rm -rf conftest*
12320   ol_cv_dcl_sys_errlist=no
12321 fi
12322 rm -f conftest*
12323 fi
12324
12325 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12326 #
12327 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12328 if test $ol_cv_dcl_sys_errlist = no ; then
12329         cat >> confdefs.h <<\EOF
12330 #define DECL_SYS_ERRLIST 1
12331 EOF
12332
12333
12334         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12335 echo "configure:12336: checking existence of sys_errlist" >&5
12336 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12337   echo $ac_n "(cached) $ac_c" 1>&6
12338 else
12339   
12340                 cat > conftest.$ac_ext <<EOF
12341 #line 12342 "configure"
12342 #include "confdefs.h"
12343 #include <errno.h>
12344 int main() {
12345 char *c = (char *) *sys_errlist
12346 ; return 0; }
12347 EOF
12348 if { (eval echo configure:12349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12349   rm -rf conftest*
12350   ol_cv_have_sys_errlist=yes
12351 else
12352   echo "configure: failed program was:" >&5
12353   cat conftest.$ac_ext >&5
12354   rm -rf conftest*
12355   ol_cv_have_sys_errlist=no
12356 fi
12357 rm -f conftest*
12358 fi
12359
12360 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12361 fi
12362 if test $ol_cv_have_sys_errlist = yes ; then
12363         cat >> confdefs.h <<\EOF
12364 #define HAVE_SYS_ERRLIST 1
12365 EOF
12366
12367 fi
12368
12369
12370
12371 if test "$ol_enable_debug" != no ; then
12372         cat >> confdefs.h <<\EOF
12373 #define LDAP_DEBUG 1
12374 EOF
12375
12376 fi
12377 if test "$ol_enable_syslog" = yes ; then
12378         cat >> confdefs.h <<\EOF
12379 #define LDAP_SYSLOG 1
12380 EOF
12381
12382 fi
12383 if test "$ol_enable_libui" = yes ; then
12384         cat >> confdefs.h <<\EOF
12385 #define LDAP_LIBUI 1
12386 EOF
12387
12388 fi
12389 if test "$ol_enable_cache" = no ; then
12390         cat >> confdefs.h <<\EOF
12391 #define LDAP_NOCACHE 1
12392 EOF
12393
12394 fi
12395 if test "$ol_enable_dns" != no ; then
12396         cat >> confdefs.h <<\EOF
12397 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12398 EOF
12399
12400 fi
12401 if test "$ol_enable_proctitle" != no ; then
12402         cat >> confdefs.h <<\EOF
12403 #define LDAP_PROCTITLE 1
12404 EOF
12405
12406 fi
12407 if test "$ol_enable_referrals" != no ; then
12408         cat >> confdefs.h <<\EOF
12409 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12410 EOF
12411
12412 fi
12413 if test "$ol_enable_cldap" != no ; then
12414         cat >> confdefs.h <<\EOF
12415 #define LDAP_CONNECTIONLESS 1
12416 EOF
12417
12418 fi
12419
12420 if test "$ol_enable_crypt" != no ; then
12421         cat >> confdefs.h <<\EOF
12422 #define SLAPD_CRYPT 1
12423 EOF
12424
12425 fi
12426 if test "$ol_enable_cleartext" != no ; then
12427         cat >> confdefs.h <<\EOF
12428 #define SLAPD_CLEARTEXT 1
12429 EOF
12430
12431 fi
12432 if test "$ol_enable_phonetic" != no ; then
12433         cat >> confdefs.h <<\EOF
12434 #define SLAPD_PHONETIC 1
12435 EOF
12436
12437 fi
12438 if test "$ol_enable_rlookups" != no ; then
12439         cat >> confdefs.h <<\EOF
12440 #define SLAPD_RLOOKUPS 1
12441 EOF
12442
12443 fi
12444
12445 if test "$ol_link_modules" != no ; then
12446         cat >> confdefs.h <<\EOF
12447 #define SLAPD_MODULES 1
12448 EOF
12449
12450         BUILD_SLAPD=yes
12451 fi
12452
12453 if test "$ol_link_bdb2" != no ; then
12454         cat >> confdefs.h <<\EOF
12455 #define SLAPD_BDB2 1
12456 EOF
12457
12458         BUILD_SLAPD=yes
12459         BUILD_BDB2=yes
12460         if test "$ol_with_bdb2_module" != static ; then
12461                 cat >> confdefs.h <<\EOF
12462 #define SLAPD_BDB2_DYNAMIC 1
12463 EOF
12464
12465                 BUILD_BDB2_DYNAMIC=yes
12466         fi
12467 fi
12468
12469 if test "$ol_enable_ldap" != no ; then
12470         cat >> confdefs.h <<\EOF
12471 #define SLAPD_LDAP 1
12472 EOF
12473
12474         BUILD_SLAPD=yes
12475         BUILD_LDAP=yes
12476         if test "$ol_with_ldap_module" != static ; then
12477                 cat >> confdefs.h <<\EOF
12478 #define SLAPD_LDAP_DYNAMIC 1
12479 EOF
12480
12481                 BUILD_LDAP_DYNAMIC=yes
12482         fi
12483 fi
12484
12485 if test "$ol_link_ldbm" != no ; then
12486         cat >> confdefs.h <<\EOF
12487 #define SLAPD_LDBM 1
12488 EOF
12489
12490         BUILD_SLAPD=yes
12491         BUILD_LDBM=yes
12492         if test "$ol_with_ldbm_module" != static ; then
12493                 cat >> confdefs.h <<\EOF
12494 #define SLAPD_LDBM_DYNAMIC 1
12495 EOF
12496
12497                 BUILD_LDBM_DYNAMIC=yes
12498         fi
12499 fi
12500
12501 if test "$ol_enable_passwd" != no ; then
12502         cat >> confdefs.h <<\EOF
12503 #define SLAPD_PASSWD 1
12504 EOF
12505
12506         BUILD_SLAPD=yes
12507         BUILD_PASSWD=yes
12508         if test "$ol_with_passwd_module" != static ; then
12509                 cat >> confdefs.h <<\EOF
12510 #define SLAPD_PASSWD_DYNAMIC 1
12511 EOF
12512
12513                 BUILD_PASSWD_DYNAMIC=yes
12514         fi
12515 fi
12516
12517 if test "$ol_link_perl" != no ; then
12518         cat >> confdefs.h <<\EOF
12519 #define SLAPD_PERL 1
12520 EOF
12521
12522         BUILD_SLAPD=yes
12523         BUILD_PERL=yes
12524         if test "$ol_with_perl_module" != static ; then
12525                 cat >> confdefs.h <<\EOF
12526 #define SLAPD_PERL_DYNAMIC 1
12527 EOF
12528
12529                 BUILD_PERL_DYNAMIC=yes
12530         fi
12531 fi
12532
12533 if test "$ol_enable_shell" != no ; then
12534         cat >> confdefs.h <<\EOF
12535 #define SLAPD_SHELL 1
12536 EOF
12537
12538         BUILD_SLAPD=yes
12539         BUILD_SHELL=yes
12540         if test "$ol_with_shell_module" != static ; then
12541                 cat >> confdefs.h <<\EOF
12542 #define SLAPD_SHELL_DYNAMIC 1
12543 EOF
12544
12545                 BUILD_SHELL_DYNAMIC=yes
12546         fi
12547 fi
12548
12549 if test "$ol_enable_tcl" != no ; then
12550         cat >> confdefs.h <<\EOF
12551 #define SLAPD_TCL 1
12552 EOF
12553
12554         BUILD_SLAPD=yes
12555         BUILD_TCL=yes
12556         if test "$ol_with_tcl_module" != static; then
12557                 cat >> confdefs.h <<\EOF
12558 #define SLAPD_TCL_DYNAMIC 1
12559 EOF
12560
12561                 BUILD_TCL_DYNAMIC=yes
12562         fi
12563 fi
12564
12565 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12566         $BUILD_SLAPD = yes ; then
12567         BUILD_SLURPD=yes
12568 fi
12569
12570 if test "$ol_link_isode" != no ; then
12571         BUILD_LDAPD=yes
12572 fi
12573
12574
12575
12576
12577   
12578   
12579   
12580   
12581   
12582   
12583   
12584   
12585   
12586   
12587   
12588   
12589   
12590   
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614 trap '' 1 2 15
12615
12616 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12617
12618 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12619 # Let make expand exec_prefix.
12620 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12621
12622 # Any assignment to VPATH causes Sun make to only execute
12623 # the first set of double-colon rules, so remove it if not needed.
12624 # If there is a colon in the path, we need to keep it.
12625 if test "x$srcdir" = x.; then
12626   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12627 fi
12628
12629 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12630
12631 DEFS=-DHAVE_CONFIG_H
12632
12633 # Without the "./", some shells look in PATH for config.status.
12634 : ${CONFIG_STATUS=./config.status}
12635
12636 echo creating $CONFIG_STATUS
12637 rm -f $CONFIG_STATUS
12638 cat > $CONFIG_STATUS <<EOF
12639 #! /bin/sh
12640 # Generated automatically by configure.
12641 # Run this file to recreate the current configuration.
12642 # This directory was configured as follows,
12643 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12644 #
12645 # $0 $ac_configure_args
12646 #
12647 # Compiler output produced by configure, useful for debugging
12648 # configure, is in ./config.log if it exists.
12649
12650 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12651 for ac_option
12652 do
12653   case "\$ac_option" in
12654   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12655     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12656     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12657   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12658     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
12659     exit 0 ;;
12660   -help | --help | --hel | --he | --h)
12661     echo "\$ac_cs_usage"; exit 0 ;;
12662   *) echo "\$ac_cs_usage"; exit 1 ;;
12663   esac
12664 done
12665
12666 ac_given_srcdir=$srcdir
12667 ac_given_INSTALL="$INSTALL"
12668
12669 trap 'rm -fr `echo "\
12670 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12671 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12672 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12673 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12674 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12675 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12676 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12677 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12678 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12679 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12680 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12681 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12682 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12683 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12684 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12685 include/Makefile:build/top.mk:include/Makefile.in \
12686 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12687 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12688 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12689 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12690 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12691 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12692 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12693 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12694 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12695 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12696 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12697 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12698 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12699 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12700 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12701 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12702 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12703 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12704 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12705 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12706 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12707 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12708 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12709 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12710 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12711 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12712  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12713 EOF
12714 cat >> $CONFIG_STATUS <<EOF
12715
12716 # Protect against being on the right side of a sed subst in config.status.
12717 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12718  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12719 $ac_vpsub
12720 $extrasub
12721 s%@SHELL@%$SHELL%g
12722 s%@CFLAGS@%$CFLAGS%g
12723 s%@CPPFLAGS@%$CPPFLAGS%g
12724 s%@CXXFLAGS@%$CXXFLAGS%g
12725 s%@FFLAGS@%$FFLAGS%g
12726 s%@DEFS@%$DEFS%g
12727 s%@LDFLAGS@%$LDFLAGS%g
12728 s%@LIBS@%$LIBS%g
12729 s%@exec_prefix@%$exec_prefix%g
12730 s%@prefix@%$prefix%g
12731 s%@program_transform_name@%$program_transform_name%g
12732 s%@bindir@%$bindir%g
12733 s%@sbindir@%$sbindir%g
12734 s%@libexecdir@%$libexecdir%g
12735 s%@datadir@%$datadir%g
12736 s%@sysconfdir@%$sysconfdir%g
12737 s%@sharedstatedir@%$sharedstatedir%g
12738 s%@localstatedir@%$localstatedir%g
12739 s%@libdir@%$libdir%g
12740 s%@includedir@%$includedir%g
12741 s%@oldincludedir@%$oldincludedir%g
12742 s%@infodir@%$infodir%g
12743 s%@mandir@%$mandir%g
12744 s%@host@%$host%g
12745 s%@host_alias@%$host_alias%g
12746 s%@host_cpu@%$host_cpu%g
12747 s%@host_vendor@%$host_vendor%g
12748 s%@host_os@%$host_os%g
12749 s%@target@%$target%g
12750 s%@target_alias@%$target_alias%g
12751 s%@target_cpu@%$target_cpu%g
12752 s%@target_vendor@%$target_vendor%g
12753 s%@target_os@%$target_os%g
12754 s%@build@%$build%g
12755 s%@build_alias@%$build_alias%g
12756 s%@build_cpu@%$build_cpu%g
12757 s%@build_vendor@%$build_vendor%g
12758 s%@build_os@%$build_os%g
12759 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12760 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12761 s%@INSTALL_DATA@%$INSTALL_DATA%g
12762 s%@PACKAGE@%$PACKAGE%g
12763 s%@VERSION@%$VERSION%g
12764 s%@ACLOCAL@%$ACLOCAL%g
12765 s%@AUTOCONF@%$AUTOCONF%g
12766 s%@AUTOMAKE@%$AUTOMAKE%g
12767 s%@AUTOHEADER@%$AUTOHEADER%g
12768 s%@MAKEINFO@%$MAKEINFO%g
12769 s%@install_sh@%$install_sh%g
12770 s%@AMTAR@%$AMTAR%g
12771 s%@AWK@%$AWK%g
12772 s%@AMTARFLAGS@%$AMTARFLAGS%g
12773 s%@SET_MAKE@%$SET_MAKE%g
12774 s%@top_builddir@%$top_builddir%g
12775 s%@ldap_subdir@%$ldap_subdir%g
12776 s%@CC@%$CC%g
12777 s%@RANLIB@%$RANLIB%g
12778 s%@LD@%$LD%g
12779 s%@NM@%$NM%g
12780 s%@LN_S@%$LN_S%g
12781 s%@LIBTOOL@%$LIBTOOL%g
12782 s%@LN_H@%$LN_H%g
12783 s%@SENDMAIL@%$SENDMAIL%g
12784 s%@EDITOR@%$EDITOR%g
12785 s%@FINGER@%$FINGER%g
12786 s%@PERLBIN@%$PERLBIN%g
12787 s%@CPP@%$CPP%g
12788 s%@EXEEXT@%$EXEEXT%g
12789 s%@OBJEXT@%$OBJEXT%g
12790 s%@OL_MKDEP@%$OL_MKDEP%g
12791 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12792 s%@GLIBCONFIG@%$GLIBCONFIG%g
12793 s%@PEPSY@%$PEPSY%g
12794 s%@LIBOBJS@%$LIBOBJS%g
12795 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12796 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12797 s%@BUILD_BDB2@%$BUILD_BDB2%g
12798 s%@BUILD_LDAP@%$BUILD_LDAP%g
12799 s%@BUILD_LDBM@%$BUILD_LDBM%g
12800 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12801 s%@BUILD_PERL@%$BUILD_PERL%g
12802 s%@BUILD_SHELL@%$BUILD_SHELL%g
12803 s%@BUILD_TCL@%$BUILD_TCL%g
12804 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12805 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12806 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12807 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12808 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12809 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12810 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12811 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12812 s%@LDAP_LIBS@%$LDAP_LIBS%g
12813 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
12814 s%@LDIF_LIBS@%$LDIF_LIBS%g
12815 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12816 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12817 s%@LDBM_LIBS@%$LDBM_LIBS%g
12818 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12819 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12820 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12821 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12822 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12823 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12824 s%@KRB_LIBS@%$KRB_LIBS%g
12825 s%@READLINE_LIBS@%$READLINE_LIBS%g
12826 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12827 s%@TLS_LIBS@%$TLS_LIBS%g
12828
12829 CEOF
12830 EOF
12831
12832 cat >> $CONFIG_STATUS <<\EOF
12833
12834 # Split the substitutions into bite-sized pieces for seds with
12835 # small command number limits, like on Digital OSF/1 and HP-UX.
12836 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12837 ac_file=1 # Number of current file.
12838 ac_beg=1 # First line for current file.
12839 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12840 ac_more_lines=:
12841 ac_sed_cmds=""
12842 while $ac_more_lines; do
12843   if test $ac_beg -gt 1; then
12844     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12845   else
12846     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12847   fi
12848   if test ! -s conftest.s$ac_file; then
12849     ac_more_lines=false
12850     rm -f conftest.s$ac_file
12851   else
12852     if test -z "$ac_sed_cmds"; then
12853       ac_sed_cmds="sed -f conftest.s$ac_file"
12854     else
12855       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12856     fi
12857     ac_file=`expr $ac_file + 1`
12858     ac_beg=$ac_end
12859     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12860   fi
12861 done
12862 if test -z "$ac_sed_cmds"; then
12863   ac_sed_cmds=cat
12864 fi
12865 EOF
12866
12867 cat >> $CONFIG_STATUS <<EOF
12868
12869 CONFIG_FILES=\${CONFIG_FILES-"\
12870 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12871 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12872 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12873 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12874 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12875 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12876 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12877 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12878 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12879 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12880 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12881 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12882 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12883 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12884 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12885 include/Makefile:build/top.mk:include/Makefile.in \
12886 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12887 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12888 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12889 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12890 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12891 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12892 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12893 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12894 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12895 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12896 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12897 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12898 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12899 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12900 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12901 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12902 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12903 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12904 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12905 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12906 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12907 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12908 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12909 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12910 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12911 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12912 "}
12913 EOF
12914 cat >> $CONFIG_STATUS <<\EOF
12915 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12916   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12917   case "$ac_file" in
12918   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12919        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12920   *) ac_file_in="${ac_file}.in" ;;
12921   esac
12922
12923   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12924
12925   # Remove last slash and all that follows it.  Not all systems have dirname.
12926   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12927   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12928     # The file is in a subdirectory.
12929     test ! -d "$ac_dir" && mkdir "$ac_dir"
12930     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12931     # A "../" for each directory in $ac_dir_suffix.
12932     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12933   else
12934     ac_dir_suffix= ac_dots=
12935   fi
12936
12937   case "$ac_given_srcdir" in
12938   .)  srcdir=.
12939       if test -z "$ac_dots"; then top_srcdir=.
12940       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12941   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12942   *) # Relative path.
12943     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12944     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12945   esac
12946
12947   case "$ac_given_INSTALL" in
12948   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12949   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12950   esac
12951
12952   echo creating "$ac_file"
12953   rm -f "$ac_file"
12954   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12955   case "$ac_file" in
12956   *Makefile*) ac_comsub="1i\\
12957 # $configure_input" ;;
12958   *) ac_comsub= ;;
12959   esac
12960
12961   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12962   sed -e "$ac_comsub
12963 s%@configure_input@%$configure_input%g
12964 s%@srcdir@%$srcdir%g
12965 s%@top_srcdir@%$top_srcdir%g
12966 s%@INSTALL@%$INSTALL%g
12967 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12968 fi; done
12969 rm -f conftest.s*
12970
12971 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12972 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12973 #
12974 # ac_d sets the value in "#define NAME VALUE" lines.
12975 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12976 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12977 ac_dC='\3'
12978 ac_dD='%g'
12979 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12980 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12981 ac_uB='\([      ]\)%\1#\2define\3'
12982 ac_uC=' '
12983 ac_uD='\4%g'
12984 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12985 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12986 ac_eB='$%\1#\2define\3'
12987 ac_eC=' '
12988 ac_eD='%g'
12989
12990 if test "${CONFIG_HEADERS+set}" != set; then
12991 EOF
12992 cat >> $CONFIG_STATUS <<EOF
12993   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12994 EOF
12995 cat >> $CONFIG_STATUS <<\EOF
12996 fi
12997 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12998   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12999   case "$ac_file" in
13000   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13001        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13002   *) ac_file_in="${ac_file}.in" ;;
13003   esac
13004
13005   echo creating $ac_file
13006
13007   rm -f conftest.frag conftest.in conftest.out
13008   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13009   cat $ac_file_inputs > conftest.in
13010
13011 EOF
13012
13013 # Transform confdefs.h into a sed script conftest.vals that substitutes
13014 # the proper values into config.h.in to produce config.h.  And first:
13015 # Protect against being on the right side of a sed subst in config.status.
13016 # Protect against being in an unquoted here document in config.status.
13017 rm -f conftest.vals
13018 cat > conftest.hdr <<\EOF
13019 s/[\\&%]/\\&/g
13020 s%[\\$`]%\\&%g
13021 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13022 s%ac_d%ac_u%gp
13023 s%ac_u%ac_e%gp
13024 EOF
13025 sed -n -f conftest.hdr confdefs.h > conftest.vals
13026 rm -f conftest.hdr
13027
13028 # This sed command replaces #undef with comments.  This is necessary, for
13029 # example, in the case of _POSIX_SOURCE, which is predefined and required
13030 # on some systems where configure will not decide to define it.
13031 cat >> conftest.vals <<\EOF
13032 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13033 EOF
13034
13035 # Break up conftest.vals because some shells have a limit on
13036 # the size of here documents, and old seds have small limits too.
13037
13038 rm -f conftest.tail
13039 while :
13040 do
13041   ac_lines=`grep -c . conftest.vals`
13042   # grep -c gives empty output for an empty file on some AIX systems.
13043   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13044   # Write a limited-size here document to conftest.frag.
13045   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13046   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13047   echo 'CEOF
13048   sed -f conftest.frag conftest.in > conftest.out
13049   rm -f conftest.in
13050   mv conftest.out conftest.in
13051 ' >> $CONFIG_STATUS
13052   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13053   rm -f conftest.vals
13054   mv conftest.tail conftest.vals
13055 done
13056 rm -f conftest.vals
13057
13058 cat >> $CONFIG_STATUS <<\EOF
13059   rm -f conftest.frag conftest.h
13060   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13061   cat conftest.in >> conftest.h
13062   rm -f conftest.in
13063   if cmp -s $ac_file conftest.h 2>/dev/null; then
13064     echo "$ac_file is unchanged"
13065     rm -f conftest.h
13066   else
13067     # Remove last slash and all that follows it.  Not all systems have dirname.
13068       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13069       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13070       # The file is in a subdirectory.
13071       test ! -d "$ac_dir" && mkdir "$ac_dir"
13072     fi
13073     rm -f $ac_file
13074     mv conftest.h $ac_file
13075   fi
13076 fi; done
13077
13078 EOF
13079 cat >> $CONFIG_STATUS <<EOF
13080
13081 EOF
13082 cat >> $CONFIG_STATUS <<\EOF
13083
13084 date > stamp-h
13085 echo Please \"make depend\" to build dependencies
13086
13087 exit 0
13088 EOF
13089 chmod +x $CONFIG_STATUS
13090 rm -fr confdefs* $ac_clean_files
13091 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13092