]> git.sur5r.net Git - openldap/blob - configure
Use a cursor to step through ID_BLOCKS.
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 LDAPD Options:"
51 ac_help="$ac_help
52   --enable-ldapd        enable building ldapd (no)"
53 ac_help="$ac_help
54 SLAPD Options:"
55 ac_help="$ac_help
56   --enable-slapd        enable building slapd (yes)"
57 ac_help="$ac_help
58     --enable-cleartext  enable cleartext passwords (yes)"
59 ac_help="$ac_help
60     --enable-crypt      enable crypt(3) passwords (auto)"
61 ac_help="$ac_help
62     --enable-modules    enable dynamic module support (no)"
63 ac_help="$ac_help
64     --enable-multimaster        enable multimaster replication (no)"
65 ac_help="$ac_help
66     --enable-phonetic   enable phonetic/soundex (no)"
67 ac_help="$ac_help
68     --enable-quipu      build quipu migration tools (no)"
69 ac_help="$ac_help
70     --enable-rlookups   enable reverse lookups (auto)"
71 ac_help="$ac_help
72     --enable-wrappers   enable tcp wrapper support (no)"
73 ac_help="$ac_help
74     --enable-bdb2       enable bdb2 backend (no)"
75 ac_help="$ac_help
76       --with-bdb2-module        module type (static)"
77 ac_help="$ac_help
78     --enable-ldap       enable ldap backend (no)"
79 ac_help="$ac_help
80       --with-ldap-module        module type (static)"
81 ac_help="$ac_help
82     --enable-ldbm       enable ldbm backend (yes)"
83 ac_help="$ac_help
84       --with-ldbm-module        module type (static)"
85 ac_help="$ac_help
86       --with-ldbm-api   use LDBM API (auto)"
87 ac_help="$ac_help
88       --with-ldbm-type  use LDBM type (auto)"
89 ac_help="$ac_help
90     --enable-passwd     enable passwd backend (no)"
91 ac_help="$ac_help
92       --with-passwd-module      module type (static)"
93 ac_help="$ac_help
94     --enable-perl       enable perl backend (no)"
95 ac_help="$ac_help
96       --with-perl-module        module type (static)"
97 ac_help="$ac_help
98     --enable-shell      enable shell backend (no)"
99 ac_help="$ac_help
100       --with-shell-module       module type (static)"
101 ac_help="$ac_help
102     --enable-tcl        enable tcl backend (no)"
103 ac_help="$ac_help
104       --with-tcl-module module type (static)"
105 ac_help="$ac_help
106 SLURPD Options:"
107 ac_help="$ac_help
108   --enable-slurpd       enable building slurpd (auto)"
109 ac_help="$ac_help
110 Library Generation & Linking Options"
111 ac_help="$ac_help
112   --enable-static[=PKGS]  build static libraries [default=yes]"
113 ac_help="$ac_help
114   --enable-shared[=PKGS]  build shared libraries [default=yes]"
115 ac_help="$ac_help
116   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
117 ac_help="$ac_help
118   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
119 ac_help="$ac_help
120   --disable-libtool-lock  avoid locking (might break parallel builds)"
121
122 # Initialize some variables set by options.
123 # The variables have the same names as the options, with
124 # dashes changed to underlines.
125 build=NONE
126 cache_file=./config.cache
127 exec_prefix=NONE
128 host=NONE
129 no_create=
130 nonopt=NONE
131 no_recursion=
132 prefix=NONE
133 program_prefix=NONE
134 program_suffix=NONE
135 program_transform_name=s,x,x,
136 silent=
137 site=
138 srcdir=
139 target=NONE
140 verbose=
141 x_includes=NONE
142 x_libraries=NONE
143 bindir='${exec_prefix}/bin'
144 sbindir='${exec_prefix}/sbin'
145 libexecdir='${exec_prefix}/libexec'
146 datadir='${prefix}/share'
147 sysconfdir='${prefix}/etc'
148 sharedstatedir='${prefix}/com'
149 localstatedir='${prefix}/var'
150 libdir='${exec_prefix}/lib'
151 includedir='${prefix}/include'
152 oldincludedir='/usr/include'
153 infodir='${prefix}/info'
154 mandir='${prefix}/man'
155
156 # Initialize some other variables.
157 subdirs=
158 MFLAGS= MAKEFLAGS=
159 SHELL=${CONFIG_SHELL-/bin/sh}
160 # Maximum number of lines to put in a shell here document.
161 ac_max_here_lines=12
162
163 ac_prev=
164 for ac_option
165 do
166
167   # If the previous option needs an argument, assign it.
168   if test -n "$ac_prev"; then
169     eval "$ac_prev=\$ac_option"
170     ac_prev=
171     continue
172   fi
173
174   case "$ac_option" in
175   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
176   *) ac_optarg= ;;
177   esac
178
179   # Accept the important Cygnus configure options, so we can diagnose typos.
180
181   case "$ac_option" in
182
183   -bindir | --bindir | --bindi | --bind | --bin | --bi)
184     ac_prev=bindir ;;
185   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
186     bindir="$ac_optarg" ;;
187
188   -build | --build | --buil | --bui | --bu)
189     ac_prev=build ;;
190   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
191     build="$ac_optarg" ;;
192
193   -cache-file | --cache-file | --cache-fil | --cache-fi \
194   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
195     ac_prev=cache_file ;;
196   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
197   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
198     cache_file="$ac_optarg" ;;
199
200   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
201     ac_prev=datadir ;;
202   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
203   | --da=*)
204     datadir="$ac_optarg" ;;
205
206   -disable-* | --disable-*)
207     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
208     # Reject names that are not valid shell variable names.
209     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
210       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
211     fi
212     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213     eval "enable_${ac_feature}=no" ;;
214
215   -enable-* | --enable-*)
216     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
217     # Reject names that are not valid shell variable names.
218     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
219       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220     fi
221     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222     case "$ac_option" in
223       *=*) ;;
224       *) ac_optarg=yes ;;
225     esac
226     eval "enable_${ac_feature}='$ac_optarg'" ;;
227
228   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
229   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
230   | --exec | --exe | --ex)
231     ac_prev=exec_prefix ;;
232   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
233   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
234   | --exec=* | --exe=* | --ex=*)
235     exec_prefix="$ac_optarg" ;;
236
237   -gas | --gas | --ga | --g)
238     # Obsolete; use --with-gas.
239     with_gas=yes ;;
240
241   -help | --help | --hel | --he)
242     # Omit some internal or obsolete options to make the list less imposing.
243     # This message is too long to be a string in the A/UX 3.1 sh.
244     cat << EOF
245 Usage: configure [options] [host]
246 Options: [defaults in brackets after descriptions]
247 Configuration:
248   --cache-file=FILE       cache test results in FILE
249   --help                  print this message
250   --no-create             do not create output files
251   --quiet, --silent       do not print \`checking...' messages
252   --version               print the version of autoconf that created configure
253 Directory and file names:
254   --prefix=PREFIX         install architecture-independent files in PREFIX
255                           [$ac_default_prefix]
256   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
257                           [same as prefix]
258   --bindir=DIR            user executables in DIR [EPREFIX/bin]
259   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
260   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
261   --datadir=DIR           read-only architecture-independent data in DIR
262                           [PREFIX/share]
263   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
264   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
265                           [PREFIX/com]
266   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
267   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
268   --includedir=DIR        C header files in DIR [PREFIX/include]
269   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
270   --infodir=DIR           info documentation in DIR [PREFIX/info]
271   --mandir=DIR            man documentation in DIR [PREFIX/man]
272   --srcdir=DIR            find the sources in DIR [configure dir or ..]
273   --program-prefix=PREFIX prepend PREFIX to installed program names
274   --program-suffix=SUFFIX append SUFFIX to installed program names
275   --program-transform-name=PROGRAM
276                           run sed PROGRAM on installed program names
277 EOF
278     cat << EOF
279 Host type:
280   --build=BUILD           configure for building on BUILD [BUILD=HOST]
281   --host=HOST             configure for HOST [guessed]
282   --target=TARGET         configure for TARGET [TARGET=HOST]
283 Features and packages:
284   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
285   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
286   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
287   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
288   --x-includes=DIR        X include files are in DIR
289   --x-libraries=DIR       X library files are in DIR
290 EOF
291     if test -n "$ac_help"; then
292       echo "--enable and --with options recognized:$ac_help"
293     fi
294     exit 0 ;;
295
296   -host | --host | --hos | --ho)
297     ac_prev=host ;;
298   -host=* | --host=* | --hos=* | --ho=*)
299     host="$ac_optarg" ;;
300
301   -includedir | --includedir | --includedi | --included | --include \
302   | --includ | --inclu | --incl | --inc)
303     ac_prev=includedir ;;
304   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
305   | --includ=* | --inclu=* | --incl=* | --inc=*)
306     includedir="$ac_optarg" ;;
307
308   -infodir | --infodir | --infodi | --infod | --info | --inf)
309     ac_prev=infodir ;;
310   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
311     infodir="$ac_optarg" ;;
312
313   -libdir | --libdir | --libdi | --libd)
314     ac_prev=libdir ;;
315   -libdir=* | --libdir=* | --libdi=* | --libd=*)
316     libdir="$ac_optarg" ;;
317
318   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
319   | --libexe | --libex | --libe)
320     ac_prev=libexecdir ;;
321   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
322   | --libexe=* | --libex=* | --libe=*)
323     libexecdir="$ac_optarg" ;;
324
325   -localstatedir | --localstatedir | --localstatedi | --localstated \
326   | --localstate | --localstat | --localsta | --localst \
327   | --locals | --local | --loca | --loc | --lo)
328     ac_prev=localstatedir ;;
329   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
330   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
331   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
332     localstatedir="$ac_optarg" ;;
333
334   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335     ac_prev=mandir ;;
336   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337     mandir="$ac_optarg" ;;
338
339   -nfp | --nfp | --nf)
340     # Obsolete; use --without-fp.
341     with_fp=no ;;
342
343   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344   | --no-cr | --no-c)
345     no_create=yes ;;
346
347   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
348   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
349     no_recursion=yes ;;
350
351   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
352   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
353   | --oldin | --oldi | --old | --ol | --o)
354     ac_prev=oldincludedir ;;
355   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
356   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
357   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
358     oldincludedir="$ac_optarg" ;;
359
360   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361     ac_prev=prefix ;;
362   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
363     prefix="$ac_optarg" ;;
364
365   -program-prefix | --program-prefix | --program-prefi | --program-pref \
366   | --program-pre | --program-pr | --program-p)
367     ac_prev=program_prefix ;;
368   -program-prefix=* | --program-prefix=* | --program-prefi=* \
369   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
370     program_prefix="$ac_optarg" ;;
371
372   -program-suffix | --program-suffix | --program-suffi | --program-suff \
373   | --program-suf | --program-su | --program-s)
374     ac_prev=program_suffix ;;
375   -program-suffix=* | --program-suffix=* | --program-suffi=* \
376   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
377     program_suffix="$ac_optarg" ;;
378
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     ac_prev=program_transform_name ;;
387   -program-transform-name=* | --program-transform-name=* \
388   | --program-transform-nam=* | --program-transform-na=* \
389   | --program-transform-n=* | --program-transform-=* \
390   | --program-transform=* | --program-transfor=* \
391   | --program-transfo=* | --program-transf=* \
392   | --program-trans=* | --program-tran=* \
393   | --progr-tra=* | --program-tr=* | --program-t=*)
394     program_transform_name="$ac_optarg" ;;
395
396   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
397   | -silent | --silent | --silen | --sile | --sil)
398     silent=yes ;;
399
400   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401     ac_prev=sbindir ;;
402   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403   | --sbi=* | --sb=*)
404     sbindir="$ac_optarg" ;;
405
406   -sharedstatedir | --sharedstatedir | --sharedstatedi \
407   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
408   | --sharedst | --shareds | --shared | --share | --shar \
409   | --sha | --sh)
410     ac_prev=sharedstatedir ;;
411   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
412   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
413   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414   | --sha=* | --sh=*)
415     sharedstatedir="$ac_optarg" ;;
416
417   -site | --site | --sit)
418     ac_prev=site ;;
419   -site=* | --site=* | --sit=*)
420     site="$ac_optarg" ;;
421
422   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423     ac_prev=srcdir ;;
424   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
425     srcdir="$ac_optarg" ;;
426
427   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
428   | --syscon | --sysco | --sysc | --sys | --sy)
429     ac_prev=sysconfdir ;;
430   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
431   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
432     sysconfdir="$ac_optarg" ;;
433
434   -target | --target | --targe | --targ | --tar | --ta | --t)
435     ac_prev=target ;;
436   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
437     target="$ac_optarg" ;;
438
439   -v | -verbose | --verbose | --verbos | --verbo | --verb)
440     verbose=yes ;;
441
442   -version | --version | --versio | --versi | --vers)
443     echo "configure generated by autoconf version 2.13"
444     exit 0 ;;
445
446   -with-* | --with-*)
447     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
448     # Reject names that are not valid shell variable names.
449     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
450       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
451     fi
452     ac_package=`echo $ac_package| sed 's/-/_/g'`
453     case "$ac_option" in
454       *=*) ;;
455       *) ac_optarg=yes ;;
456     esac
457     eval "with_${ac_package}='$ac_optarg'" ;;
458
459   -without-* | --without-*)
460     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
461     # Reject names that are not valid shell variable names.
462     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
463       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464     fi
465     ac_package=`echo $ac_package| sed 's/-/_/g'`
466     eval "with_${ac_package}=no" ;;
467
468   --x)
469     # Obsolete; use --with-x.
470     with_x=yes ;;
471
472   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
473   | --x-incl | --x-inc | --x-in | --x-i)
474     ac_prev=x_includes ;;
475   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
476   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
477     x_includes="$ac_optarg" ;;
478
479   -x-libraries | --x-libraries | --x-librarie | --x-librari \
480   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
481     ac_prev=x_libraries ;;
482   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
483   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
484     x_libraries="$ac_optarg" ;;
485
486   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
487     ;;
488
489   *)
490     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
491       echo "configure: warning: $ac_option: invalid host type" 1>&2
492     fi
493     if test "x$nonopt" != xNONE; then
494       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
495     fi
496     nonopt="$ac_option"
497     ;;
498
499   esac
500 done
501
502 if test -n "$ac_prev"; then
503   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
504 fi
505
506 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
507
508 # File descriptor usage:
509 # 0 standard input
510 # 1 file creation
511 # 2 errors and warnings
512 # 3 some systems may open it to /dev/tty
513 # 4 used on the Kubota Titan
514 # 6 checking for... messages and results
515 # 5 compiler messages saved in config.log
516 if test "$silent" = yes; then
517   exec 6>/dev/null
518 else
519   exec 6>&1
520 fi
521 exec 5>./config.log
522
523 echo "\
524 This file contains any messages produced by compilers while
525 running configure, to aid debugging if configure makes a mistake.
526 " 1>&5
527
528 # Strip out --no-create and --no-recursion so they do not pile up.
529 # Also quote any args containing shell metacharacters.
530 ac_configure_args=
531 for ac_arg
532 do
533   case "$ac_arg" in
534   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
535   | --no-cr | --no-c) ;;
536   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
537   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
538   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
539   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
540   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
541   esac
542 done
543
544 # NLS nuisances.
545 # Only set these to C if already set.  These must not be set unconditionally
546 # because not all systems understand e.g. LANG=C (notably SCO).
547 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
548 # Non-C LC_CTYPE values break the ctype check.
549 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
550 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
551 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
552 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
553
554 # confdefs.h avoids OS command line length limits that DEFS can exceed.
555 rm -rf conftest* confdefs.h
556 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
557 echo > confdefs.h
558
559 # A filename unique to this package, relative to the directory that
560 # configure is in, which we can look for to find out if srcdir is correct.
561 ac_unique_file=build/version
562
563 # Find the source files, if location was not specified.
564 if test -z "$srcdir"; then
565   ac_srcdir_defaulted=yes
566   # Try the directory containing this script, then its parent.
567   ac_prog=$0
568   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
569   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
570   srcdir=$ac_confdir
571   if test ! -r $srcdir/$ac_unique_file; then
572     srcdir=..
573   fi
574 else
575   ac_srcdir_defaulted=no
576 fi
577 if test ! -r $srcdir/$ac_unique_file; then
578   if test "$ac_srcdir_defaulted" = yes; then
579     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
580   else
581     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
582   fi
583 fi
584 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
585
586 # Prefer explicitly selected file to automatically selected ones.
587 if test -z "$CONFIG_SITE"; then
588   if test "x$prefix" != xNONE; then
589     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
590   else
591     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
592   fi
593 fi
594 for ac_site_file in $CONFIG_SITE; do
595   if test -r "$ac_site_file"; then
596     echo "loading site script $ac_site_file"
597     . "$ac_site_file"
598   fi
599 done
600
601
602 ac_ext=c
603 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
604 ac_cpp='$CPP $CPPFLAGS'
605 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
606 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
607 cross_compiling=$ac_cv_prog_cc_cross
608
609 ac_exeext=
610 ac_objext=o
611 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
612   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
613   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
614     ac_n= ac_c='
615 ' ac_t='        '
616   else
617     ac_n=-n ac_c= ac_t=
618   fi
619 else
620   ac_n= ac_c='\c' ac_t=
621 fi
622
623 ac_aux_dir=
624 for ac_dir in build $srcdir/build; do
625   if test -f $ac_dir/install-sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install-sh -c"
628     break
629   elif test -f $ac_dir/install.sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install.sh -c"
632     break
633   fi
634 done
635 if test -z "$ac_aux_dir"; then
636   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
637 fi
638 ac_config_guess=$ac_aux_dir/config.guess
639 ac_config_sub=$ac_aux_dir/config.sub
640 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
641
642 OL_VERSION=`cat $ac_aux_dir/version`
643 if test -z "$OL_VERSION"; then
644         { echo "configure: error: could not determine version" 1>&2; exit 1; }
645 fi
646
647
648 # Do some error checking and defaulting for the host and target type.
649 # The inputs are:
650 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
651 #
652 # The rules are:
653 # 1. You are not allowed to specify --host, --target, and nonopt at the
654 #    same time.
655 # 2. Host defaults to nonopt.
656 # 3. If nonopt is not specified, then host defaults to the current host,
657 #    as determined by config.guess.
658 # 4. Target and build default to nonopt.
659 # 5. If nonopt is not specified, then target and build default to host.
660
661 # The aliases save the names the user supplied, while $host etc.
662 # will get canonicalized.
663 case $host---$target---$nonopt in
664 NONE---*---* | *---NONE---* | *---*---NONE) ;;
665 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
666 esac
667
668
669 # Make sure we can run config.sub.
670 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
671 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
672 fi
673
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:676: checking host system type" >&5
676
677 host_alias=$host
678 case "$host_alias" in
679 NONE)
680   case $nonopt in
681   NONE)
682     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
683     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684     fi ;;
685   *) host_alias=$nonopt ;;
686   esac ;;
687 esac
688
689 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
690 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 echo "$ac_t""$host" 1>&6
694
695 echo $ac_n "checking target system type""... $ac_c" 1>&6
696 echo "configure:697: checking target system type" >&5
697
698 target_alias=$target
699 case "$target_alias" in
700 NONE)
701   case $nonopt in
702   NONE) target_alias=$host_alias ;;
703   *) target_alias=$nonopt ;;
704   esac ;;
705 esac
706
707 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
708 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 echo "$ac_t""$target" 1>&6
712
713 echo $ac_n "checking build system type""... $ac_c" 1>&6
714 echo "configure:715: checking build system type" >&5
715
716 build_alias=$build
717 case "$build_alias" in
718 NONE)
719   case $nonopt in
720   NONE) build_alias=$host_alias ;;
721   *) build_alias=$nonopt ;;
722   esac ;;
723 esac
724
725 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
726 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
727 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
728 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
729 echo "$ac_t""$build" 1>&6
730
731 test "$host_alias" != "$target_alias" &&
732   test "$program_prefix$program_suffix$program_transform_name" = \
733     NONENONEs,x,x, &&
734   program_prefix=${target_alias}-
735
736
737 # Find a good install program.  We prefer a C program (faster),
738 # so one script is as good as another.  But avoid the broken or
739 # incompatible versions:
740 # SysV /etc/install, /usr/sbin/install
741 # SunOS /usr/etc/install
742 # IRIX /sbin/install
743 # AIX /bin/install
744 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
745 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
746 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
747 # ./install, which can be erroneously created by make from ./install.sh.
748 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
749 echo "configure:750: checking for a BSD compatible install" >&5
750 if test -z "$INSTALL"; then
751 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
752   echo $ac_n "(cached) $ac_c" 1>&6
753 else
754     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
755   for ac_dir in $PATH; do
756     # Account for people who put trailing slashes in PATH elements.
757     case "$ac_dir/" in
758     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
759     *)
760       # OSF1 and SCO ODT 3.0 have their own names for install.
761       # Don't use installbsd from OSF since it installs stuff as root
762       # by default.
763       for ac_prog in ginstall scoinst install; do
764         if test -f $ac_dir/$ac_prog; then
765           if test $ac_prog = install &&
766             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
767             # AIX install.  It has an incompatible calling convention.
768             :
769           else
770             ac_cv_path_install="$ac_dir/$ac_prog -c"
771             break 2
772           fi
773         fi
774       done
775       ;;
776     esac
777   done
778   IFS="$ac_save_IFS"
779
780 fi
781   if test "${ac_cv_path_install+set}" = set; then
782     INSTALL="$ac_cv_path_install"
783   else
784     # As a last resort, use the slow shell script.  We don't cache a
785     # path for INSTALL within a source directory, because that will
786     # break other packages using the cache if that directory is
787     # removed, or if the path is relative.
788     INSTALL="$ac_install_sh"
789   fi
790 fi
791 echo "$ac_t""$INSTALL" 1>&6
792
793 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
794 # It thinks the first close brace ends the variable substitution.
795 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
796
797 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
798
799 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
800
801 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
802 echo "configure:803: checking whether build environment is sane" >&5
803 # Just in case
804 sleep 1
805 echo timestamp > conftestfile
806 # Do `set' in a subshell so we don't clobber the current shell's
807 # arguments.  Must try -L first in case configure is actually a
808 # symlink; some systems play weird games with the mod time of symlinks
809 # (eg FreeBSD returns the mod time of the symlink's containing
810 # directory).
811 if (
812    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
813    if test "$*" = "X"; then
814       # -L didn't work.
815       set X `ls -t $srcdir/configure conftestfile`
816    fi
817    if test "$*" != "X $srcdir/configure conftestfile" \
818       && test "$*" != "X conftestfile $srcdir/configure"; then
819
820       # If neither matched, then we have a broken ls.  This can happen
821       # if, for instance, CONFIG_SHELL is bash and it inherits a
822       # broken ls alias from the environment.  This has actually
823       # happened.  Such a system could not be considered "sane".
824       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
825 alias in your environment" 1>&2; exit 1; }
826    fi
827
828    test "$2" = conftestfile
829    )
830 then
831    # Ok.
832    :
833 else
834    { echo "configure: error: newly created file is older than distributed files!
835 Check your system clock" 1>&2; exit 1; }
836 fi
837 rm -f conftest*
838 echo "$ac_t""yes" 1>&6
839 if test "$program_transform_name" = s,x,x,; then
840   program_transform_name=
841 else
842   # Double any \ or $.  echo might interpret backslashes.
843   cat <<\EOF_SED > conftestsed
844 s,\\,\\\\,g; s,\$,$$,g
845 EOF_SED
846   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
847   rm -f conftestsed
848 fi
849 test "$program_prefix" != NONE &&
850   program_transform_name="s,^,${program_prefix},; $program_transform_name"
851 # Use a double $ so make ignores it.
852 test "$program_suffix" != NONE &&
853   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
854
855 # sed with no file args requires a program.
856 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
857
858 for ac_prog in mawk gawk nawk awk
859 do
860 # Extract the first word of "$ac_prog", so it can be a program name with args.
861 set dummy $ac_prog; ac_word=$2
862 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
863 echo "configure:864: checking for $ac_word" >&5
864 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
865   echo $ac_n "(cached) $ac_c" 1>&6
866 else
867   if test -n "$AWK"; then
868   ac_cv_prog_AWK="$AWK" # Let the user override the test.
869 else
870   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
871   ac_dummy="$PATH"
872   for ac_dir in $ac_dummy; do
873     test -z "$ac_dir" && ac_dir=.
874     if test -f $ac_dir/$ac_word; then
875       ac_cv_prog_AWK="$ac_prog"
876       break
877     fi
878   done
879   IFS="$ac_save_ifs"
880 fi
881 fi
882 AWK="$ac_cv_prog_AWK"
883 if test -n "$AWK"; then
884   echo "$ac_t""$AWK" 1>&6
885 else
886   echo "$ac_t""no" 1>&6
887 fi
888
889 test -n "$AWK" && break
890 done
891
892 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
893 echo "configure:894: checking whether ${MAKE-make} sets \${MAKE}" >&5
894 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
895 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
896   echo $ac_n "(cached) $ac_c" 1>&6
897 else
898   cat > conftestmake <<\EOF
899 all:
900         @echo 'ac_maketemp="${MAKE}"'
901 EOF
902 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
903 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
904 if test -n "$ac_maketemp"; then
905   eval ac_cv_prog_make_${ac_make}_set=yes
906 else
907   eval ac_cv_prog_make_${ac_make}_set=no
908 fi
909 rm -f conftestmake
910 fi
911 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
912   echo "$ac_t""yes" 1>&6
913   SET_MAKE=
914 else
915   echo "$ac_t""no" 1>&6
916   SET_MAKE="MAKE=${MAKE-make}"
917 fi
918
919
920
921 PACKAGE=OpenLDAP
922
923 VERSION=$OL_VERSION
924
925 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
926   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
927 fi
928
929
930
931 missing_dir=`cd $ac_aux_dir && pwd`
932 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
933 echo "configure:934: checking for working aclocal" >&5
934 # Run test in a subshell; some versions of sh will print an error if
935 # an executable is not found, even if stderr is redirected.
936 # Redirect stdin to placate older versions of autoconf.  Sigh.
937 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
938    ACLOCAL=aclocal
939    echo "$ac_t""found" 1>&6
940 else
941    ACLOCAL="$missing_dir/missing aclocal"
942    echo "$ac_t""missing" 1>&6
943 fi
944
945 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
946 echo "configure:947: checking for working autoconf" >&5
947 # Run test in a subshell; some versions of sh will print an error if
948 # an executable is not found, even if stderr is redirected.
949 # Redirect stdin to placate older versions of autoconf.  Sigh.
950 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
951    AUTOCONF=autoconf
952    echo "$ac_t""found" 1>&6
953 else
954    AUTOCONF="$missing_dir/missing autoconf"
955    echo "$ac_t""missing" 1>&6
956 fi
957
958 echo $ac_n "checking for working automake""... $ac_c" 1>&6
959 echo "configure:960: checking for working automake" >&5
960 # Run test in a subshell; some versions of sh will print an error if
961 # an executable is not found, even if stderr is redirected.
962 # Redirect stdin to placate older versions of autoconf.  Sigh.
963 if (automake --version) < /dev/null > /dev/null 2>&1; then
964    AUTOMAKE=automake
965    echo "$ac_t""found" 1>&6
966 else
967    AUTOMAKE="$missing_dir/missing automake"
968    echo "$ac_t""missing" 1>&6
969 fi
970
971 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
972 echo "configure:973: checking for working autoheader" >&5
973 # Run test in a subshell; some versions of sh will print an error if
974 # an executable is not found, even if stderr is redirected.
975 # Redirect stdin to placate older versions of autoconf.  Sigh.
976 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
977    AUTOHEADER=autoheader
978    echo "$ac_t""found" 1>&6
979 else
980    AUTOHEADER="$missing_dir/missing autoheader"
981    echo "$ac_t""missing" 1>&6
982 fi
983
984 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
985 echo "configure:986: checking for working makeinfo" >&5
986 # Run test in a subshell; some versions of sh will print an error if
987 # an executable is not found, even if stderr is redirected.
988 # Redirect stdin to placate older versions of autoconf.  Sigh.
989 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
990    MAKEINFO=makeinfo
991    echo "$ac_t""found" 1>&6
992 else
993    MAKEINFO="$missing_dir/missing makeinfo"
994    echo "$ac_t""missing" 1>&6
995 fi
996
997 install_sh="$missing_dir/install-sh"
998 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
999
1000 for ac_prog in gnutar gtar tar
1001 do
1002 # Extract the first word of "$ac_prog", so it can be a program name with args.
1003 set dummy $ac_prog; ac_word=$2
1004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1005 echo "configure:1006: checking for $ac_word" >&5
1006 if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
1007   echo $ac_n "(cached) $ac_c" 1>&6
1008 else
1009   if test -n "$AMTAR"; then
1010   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1011 else
1012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1013   ac_dummy="$PATH"
1014   for ac_dir in $ac_dummy; do
1015     test -z "$ac_dir" && ac_dir=.
1016     if test -f $ac_dir/$ac_word; then
1017       ac_cv_prog_AMTAR="$ac_prog"
1018       break
1019     fi
1020   done
1021   IFS="$ac_save_ifs"
1022 fi
1023 fi
1024 AMTAR="$ac_cv_prog_AMTAR"
1025 if test -n "$AMTAR"; then
1026   echo "$ac_t""$AMTAR" 1>&6
1027 else
1028   echo "$ac_t""no" 1>&6
1029 fi
1030
1031 test -n "$AMTAR" && break
1032 done
1033
1034
1035 AMTARFLAGS=
1036 if test -n "$AMTAR"; then
1037   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1038         AMTARFLAGS=o
1039   fi
1040 fi
1041
1042
1043
1044 cat >> confdefs.h <<EOF
1045 #define OPENLDAP_PACKAGE "$PACKAGE"
1046 EOF
1047
1048 cat >> confdefs.h <<EOF
1049 #define OPENLDAP_VERSION "$VERSION"
1050 EOF
1051
1052
1053
1054
1055 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1056 echo "configure:1057: checking configure arguments" >&5
1057
1058
1059 top_builddir=`pwd`
1060
1061 ldap_subdir="openldap"
1062
1063 # Check whether --with-subdir or --without-subdir was given.
1064 if test "${with_subdir+set}" = set; then
1065   withval="$with_subdir"
1066   
1067         if test "$withval" = "no"; then
1068                 ldap_subdir=""
1069         elif test "$withval" != "yes"; then
1070                 ldap_subdir="$withval"
1071         fi
1072
1073 fi
1074
1075
1076 # OpenLDAP --enable-debug
1077         # Check whether --enable-debug or --disable-debug was given.
1078 if test "${enable_debug+set}" = set; then
1079   enableval="$enable_debug"
1080   
1081         ol_arg=invalid
1082         for ol_val in auto yes no ; do
1083                 if test "$enableval" = "$ol_val" ; then
1084                         ol_arg="$ol_val"
1085                 fi
1086         done
1087         if test "$ol_arg" = "invalid" ; then
1088                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1089         fi
1090         ol_enable_debug="$ol_arg"
1091
1092 else
1093         ol_enable_debug="yes"
1094 fi
1095 # end --enable-debug
1096 # OpenLDAP --enable-syslog
1097         # Check whether --enable-syslog or --disable-syslog was given.
1098 if test "${enable_syslog+set}" = set; then
1099   enableval="$enable_syslog"
1100   
1101         ol_arg=invalid
1102         for ol_val in auto yes no ; do
1103                 if test "$enableval" = "$ol_val" ; then
1104                         ol_arg="$ol_val"
1105                 fi
1106         done
1107         if test "$ol_arg" = "invalid" ; then
1108                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1109         fi
1110         ol_enable_syslog="$ol_arg"
1111
1112 else
1113         ol_enable_syslog="auto"
1114 fi
1115 # end --enable-syslog
1116 # OpenLDAP --enable-proctitle
1117         # Check whether --enable-proctitle or --disable-proctitle was given.
1118 if test "${enable_proctitle+set}" = set; then
1119   enableval="$enable_proctitle"
1120   
1121         ol_arg=invalid
1122         for ol_val in auto yes no ; do
1123                 if test "$enableval" = "$ol_val" ; then
1124                         ol_arg="$ol_val"
1125                 fi
1126         done
1127         if test "$ol_arg" = "invalid" ; then
1128                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1129         fi
1130         ol_enable_proctitle="$ol_arg"
1131
1132 else
1133         ol_enable_proctitle="yes"
1134 fi
1135 # end --enable-proctitle
1136 # OpenLDAP --enable-cache
1137         # Check whether --enable-cache or --disable-cache was given.
1138 if test "${enable_cache+set}" = set; then
1139   enableval="$enable_cache"
1140   
1141         ol_arg=invalid
1142         for ol_val in auto yes no ; do
1143                 if test "$enableval" = "$ol_val" ; then
1144                         ol_arg="$ol_val"
1145                 fi
1146         done
1147         if test "$ol_arg" = "invalid" ; then
1148                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1149         fi
1150         ol_enable_cache="$ol_arg"
1151
1152 else
1153         ol_enable_cache="yes"
1154 fi
1155 # end --enable-cache
1156 # OpenLDAP --enable-dns
1157         # Check whether --enable-dns or --disable-dns was given.
1158 if test "${enable_dns+set}" = set; then
1159   enableval="$enable_dns"
1160   
1161         ol_arg=invalid
1162         for ol_val in auto yes no ; do
1163                 if test "$enableval" = "$ol_val" ; then
1164                         ol_arg="$ol_val"
1165                 fi
1166         done
1167         if test "$ol_arg" = "invalid" ; then
1168                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1169         fi
1170         ol_enable_dns="$ol_arg"
1171
1172 else
1173         ol_enable_dns="no"
1174 fi
1175 # end --enable-dns
1176 # OpenLDAP --enable-referrals
1177         # Check whether --enable-referrals or --disable-referrals was given.
1178 if test "${enable_referrals+set}" = set; then
1179   enableval="$enable_referrals"
1180   
1181         ol_arg=invalid
1182         for ol_val in auto yes no ; do
1183                 if test "$enableval" = "$ol_val" ; then
1184                         ol_arg="$ol_val"
1185                 fi
1186         done
1187         if test "$ol_arg" = "invalid" ; then
1188                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1189         fi
1190         ol_enable_referrals="$ol_arg"
1191
1192 else
1193         ol_enable_referrals="yes"
1194 fi
1195 # end --enable-referrals
1196 # OpenLDAP --enable-cldap
1197         # Check whether --enable-cldap or --disable-cldap was given.
1198 if test "${enable_cldap+set}" = set; then
1199   enableval="$enable_cldap"
1200   
1201         ol_arg=invalid
1202         for ol_val in auto yes no ; do
1203                 if test "$enableval" = "$ol_val" ; then
1204                         ol_arg="$ol_val"
1205                 fi
1206         done
1207         if test "$ol_arg" = "invalid" ; then
1208                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1209         fi
1210         ol_enable_cldap="$ol_arg"
1211
1212 else
1213         ol_enable_cldap="no"
1214 fi
1215 # end --enable-cldap
1216 # OpenLDAP --enable-x_compile
1217         # Check whether --enable-x_compile or --disable-x_compile was given.
1218 if test "${enable_x_compile+set}" = set; then
1219   enableval="$enable_x_compile"
1220   
1221         ol_arg=invalid
1222         for ol_val in yes no ; do
1223                 if test "$enableval" = "$ol_val" ; then
1224                         ol_arg="$ol_val"
1225                 fi
1226         done
1227         if test "$ol_arg" = "invalid" ; then
1228                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1229         fi
1230         ol_enable_x_compile="$ol_arg"
1231
1232 else
1233         ol_enable_x_compile="no"
1234 fi
1235 # end --enable-x_compile
1236
1237 # OpenLDAP --enable-dmalloc
1238         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1239 if test "${enable_dmalloc+set}" = set; then
1240   enableval="$enable_dmalloc"
1241   
1242         ol_arg=invalid
1243         for ol_val in auto yes no ; do
1244                 if test "$enableval" = "$ol_val" ; then
1245                         ol_arg="$ol_val"
1246                 fi
1247         done
1248         if test "$ol_arg" = "invalid" ; then
1249                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1250         fi
1251         ol_enable_dmalloc="$ol_arg"
1252
1253 else
1254         ol_enable_dmalloc="no"
1255 fi
1256 # end --enable-dmalloc
1257
1258 # OpenLDAP --with-cyrus_sasl
1259         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1260 if test "${with_cyrus_sasl+set}" = set; then
1261   withval="$with_cyrus_sasl"
1262   
1263         ol_arg=invalid
1264         for ol_val in auto yes no  ; do
1265                 if test "$withval" = "$ol_val" ; then
1266                         ol_arg="$ol_val"
1267                 fi
1268         done
1269         if test "$ol_arg" = "invalid" ; then
1270                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1271         fi
1272         ol_with_cyrus_sasl="$ol_arg"
1273
1274 else
1275         ol_with_cyrus_sasl="auto"
1276 fi
1277 # end --with-cyrus_sasl
1278
1279 # OpenLDAP --with-fetch
1280         # Check whether --with-fetch or --without-fetch was given.
1281 if test "${with_fetch+set}" = set; then
1282   withval="$with_fetch"
1283   
1284         ol_arg=invalid
1285         for ol_val in auto yes no  ; do
1286                 if test "$withval" = "$ol_val" ; then
1287                         ol_arg="$ol_val"
1288                 fi
1289         done
1290         if test "$ol_arg" = "invalid" ; then
1291                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1292         fi
1293         ol_with_fetch="$ol_arg"
1294
1295 else
1296         ol_with_fetch="auto"
1297 fi
1298 # end --with-fetch
1299
1300 # OpenLDAP --with-kerberos
1301         # Check whether --with-kerberos or --without-kerberos was given.
1302 if test "${with_kerberos+set}" = set; then
1303   withval="$with_kerberos"
1304   
1305         ol_arg=invalid
1306         for ol_val in auto k5 k4 afs yes no ; do
1307                 if test "$withval" = "$ol_val" ; then
1308                         ol_arg="$ol_val"
1309                 fi
1310         done
1311         if test "$ol_arg" = "invalid" ; then
1312                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1313         fi
1314         ol_with_kerberos="$ol_arg"
1315
1316 else
1317         ol_with_kerberos="auto"
1318 fi
1319 # end --with-kerberos
1320
1321 # OpenLDAP --with-readline
1322         # Check whether --with-readline or --without-readline was given.
1323 if test "${with_readline+set}" = set; then
1324   withval="$with_readline"
1325   
1326         ol_arg=invalid
1327         for ol_val in auto yes no  ; do
1328                 if test "$withval" = "$ol_val" ; then
1329                         ol_arg="$ol_val"
1330                 fi
1331         done
1332         if test "$ol_arg" = "invalid" ; then
1333                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1334         fi
1335         ol_with_readline="$ol_arg"
1336
1337 else
1338         ol_with_readline="auto"
1339 fi
1340 # end --with-readline
1341
1342 # OpenLDAP --with-threads
1343         # Check whether --with-threads or --without-threads was given.
1344 if test "${with_threads+set}" = set; then
1345   withval="$with_threads"
1346   
1347         ol_arg=invalid
1348         for ol_val in auto posix mach lwp yes no manual  ; do
1349                 if test "$withval" = "$ol_val" ; then
1350                         ol_arg="$ol_val"
1351                 fi
1352         done
1353         if test "$ol_arg" = "invalid" ; then
1354                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1355         fi
1356         ol_with_threads="$ol_arg"
1357
1358 else
1359         ol_with_threads="auto"
1360 fi
1361 # end --with-threads
1362
1363 # OpenLDAP --with-tls
1364         # Check whether --with-tls or --without-tls was given.
1365 if test "${with_tls+set}" = set; then
1366   withval="$with_tls"
1367   
1368         ol_arg=invalid
1369         for ol_val in auto ssleay openssl yes no  ; do
1370                 if test "$withval" = "$ol_val" ; then
1371                         ol_arg="$ol_val"
1372                 fi
1373         done
1374         if test "$ol_arg" = "invalid" ; then
1375                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1376         fi
1377         ol_with_tls="$ol_arg"
1378
1379 else
1380         ol_with_tls="auto"
1381 fi
1382 # end --with-tls
1383
1384 # OpenLDAP --with-yielding_select
1385         # Check whether --with-yielding_select or --without-yielding_select was given.
1386 if test "${with_yielding_select+set}" = set; then
1387   withval="$with_yielding_select"
1388   
1389         ol_arg=invalid
1390         for ol_val in auto yes no manual  ; do
1391                 if test "$withval" = "$ol_val" ; then
1392                         ol_arg="$ol_val"
1393                 fi
1394         done
1395         if test "$ol_arg" = "invalid" ; then
1396                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1397         fi
1398         ol_with_yielding_select="$ol_arg"
1399
1400 else
1401         ol_with_yielding_select="auto"
1402 fi
1403 # end --with-yielding_select
1404
1405
1406
1407 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1408 if test "${with_xxldapdoptions+set}" = set; then
1409   withval="$with_xxldapdoptions"
1410   :
1411 fi
1412
1413 # OpenLDAP --enable-ldapd
1414         # Check whether --enable-ldapd or --disable-ldapd was given.
1415 if test "${enable_ldapd+set}" = set; then
1416   enableval="$enable_ldapd"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1426         fi
1427         ol_enable_ldapd="$ol_arg"
1428
1429 else
1430         ol_enable_ldapd="no"
1431 fi
1432 # end --enable-ldapd
1433
1434 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1435 if test "${with_xxslapdoptions+set}" = set; then
1436   withval="$with_xxslapdoptions"
1437   :
1438 fi
1439
1440 # OpenLDAP --enable-slapd
1441         # Check whether --enable-slapd or --disable-slapd was given.
1442 if test "${enable_slapd+set}" = set; then
1443   enableval="$enable_slapd"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto yes no ; do
1447                 if test "$enableval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1453         fi
1454         ol_enable_slapd="$ol_arg"
1455
1456 else
1457         ol_enable_slapd="yes"
1458 fi
1459 # end --enable-slapd
1460 # OpenLDAP --enable-cleartext
1461         # Check whether --enable-cleartext or --disable-cleartext was given.
1462 if test "${enable_cleartext+set}" = set; then
1463   enableval="$enable_cleartext"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto yes no ; do
1467                 if test "$enableval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1473         fi
1474         ol_enable_cleartext="$ol_arg"
1475
1476 else
1477         ol_enable_cleartext="yes"
1478 fi
1479 # end --enable-cleartext
1480 # OpenLDAP --enable-crypt
1481         # Check whether --enable-crypt or --disable-crypt was given.
1482 if test "${enable_crypt+set}" = set; then
1483   enableval="$enable_crypt"
1484   
1485         ol_arg=invalid
1486         for ol_val in auto yes no ; do
1487                 if test "$enableval" = "$ol_val" ; then
1488                         ol_arg="$ol_val"
1489                 fi
1490         done
1491         if test "$ol_arg" = "invalid" ; then
1492                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1493         fi
1494         ol_enable_crypt="$ol_arg"
1495
1496 else
1497         ol_enable_crypt="auto"
1498 fi
1499 # end --enable-crypt
1500 # OpenLDAP --enable-modules
1501         # Check whether --enable-modules or --disable-modules was given.
1502 if test "${enable_modules+set}" = set; then
1503   enableval="$enable_modules"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1513         fi
1514         ol_enable_modules="$ol_arg"
1515
1516 else
1517         ol_enable_modules="no"
1518 fi
1519 # end --enable-modules
1520 # OpenLDAP --enable-multimaster
1521         # Check whether --enable-multimaster or --disable-multimaster was given.
1522 if test "${enable_multimaster+set}" = set; then
1523   enableval="$enable_multimaster"
1524   
1525         ol_arg=invalid
1526         for ol_val in auto yes no ; do
1527                 if test "$enableval" = "$ol_val" ; then
1528                         ol_arg="$ol_val"
1529                 fi
1530         done
1531         if test "$ol_arg" = "invalid" ; then
1532                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1533         fi
1534         ol_enable_multimaster="$ol_arg"
1535
1536 else
1537         ol_enable_multimaster="no"
1538 fi
1539 # end --enable-multimaster
1540 # OpenLDAP --enable-phonetic
1541         # Check whether --enable-phonetic or --disable-phonetic was given.
1542 if test "${enable_phonetic+set}" = set; then
1543   enableval="$enable_phonetic"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no ; do
1547                 if test "$enableval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1553         fi
1554         ol_enable_phonetic="$ol_arg"
1555
1556 else
1557         ol_enable_phonetic="no"
1558 fi
1559 # end --enable-phonetic
1560 # OpenLDAP --enable-quipu
1561         # Check whether --enable-quipu or --disable-quipu was given.
1562 if test "${enable_quipu+set}" = set; then
1563   enableval="$enable_quipu"
1564   
1565         ol_arg=invalid
1566         for ol_val in auto yes no ; do
1567                 if test "$enableval" = "$ol_val" ; then
1568                         ol_arg="$ol_val"
1569                 fi
1570         done
1571         if test "$ol_arg" = "invalid" ; then
1572                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1573         fi
1574         ol_enable_quipu="$ol_arg"
1575
1576 else
1577         ol_enable_quipu="no"
1578 fi
1579 # end --enable-quipu
1580 # OpenLDAP --enable-rlookups
1581         # Check whether --enable-rlookups or --disable-rlookups was given.
1582 if test "${enable_rlookups+set}" = set; then
1583   enableval="$enable_rlookups"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto yes no ; do
1587                 if test "$enableval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1593         fi
1594         ol_enable_rlookups="$ol_arg"
1595
1596 else
1597         ol_enable_rlookups="auto"
1598 fi
1599 # end --enable-rlookups
1600 # OpenLDAP --enable-wrappers
1601         # Check whether --enable-wrappers or --disable-wrappers was given.
1602 if test "${enable_wrappers+set}" = set; then
1603   enableval="$enable_wrappers"
1604   
1605         ol_arg=invalid
1606         for ol_val in auto yes no ; do
1607                 if test "$enableval" = "$ol_val" ; then
1608                         ol_arg="$ol_val"
1609                 fi
1610         done
1611         if test "$ol_arg" = "invalid" ; then
1612                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1613         fi
1614         ol_enable_wrappers="$ol_arg"
1615
1616 else
1617         ol_enable_wrappers="no"
1618 fi
1619 # end --enable-wrappers
1620
1621 # OpenLDAP --enable-bdb2
1622         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1623 if test "${enable_bdb2+set}" = set; then
1624   enableval="$enable_bdb2"
1625   
1626         ol_arg=invalid
1627         for ol_val in auto yes no ; do
1628                 if test "$enableval" = "$ol_val" ; then
1629                         ol_arg="$ol_val"
1630                 fi
1631         done
1632         if test "$ol_arg" = "invalid" ; then
1633                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1634         fi
1635         ol_enable_bdb2="$ol_arg"
1636
1637 else
1638         ol_enable_bdb2="no"
1639 fi
1640 # end --enable-bdb2
1641 # OpenLDAP --with-bdb2_module
1642         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1643 if test "${with_bdb2_module+set}" = set; then
1644   withval="$with_bdb2_module"
1645   
1646         ol_arg=invalid
1647         for ol_val in static dynamic ; do
1648                 if test "$withval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1654         fi
1655         ol_with_bdb2_module="$ol_arg"
1656
1657 else
1658         ol_with_bdb2_module="static"
1659 fi
1660 # end --with-bdb2_module
1661
1662 # OpenLDAP --enable-ldap
1663         # Check whether --enable-ldap or --disable-ldap was given.
1664 if test "${enable_ldap+set}" = set; then
1665   enableval="$enable_ldap"
1666   
1667         ol_arg=invalid
1668         for ol_val in auto yes no ; do
1669                 if test "$enableval" = "$ol_val" ; then
1670                         ol_arg="$ol_val"
1671                 fi
1672         done
1673         if test "$ol_arg" = "invalid" ; then
1674                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1675         fi
1676         ol_enable_ldap="$ol_arg"
1677
1678 else
1679         ol_enable_ldap="no"
1680 fi
1681 # end --enable-ldap
1682 # OpenLDAP --with-ldap_module
1683         # Check whether --with-ldap_module or --without-ldap_module was given.
1684 if test "${with_ldap_module+set}" = set; then
1685   withval="$with_ldap_module"
1686   
1687         ol_arg=invalid
1688         for ol_val in static dynamic ; do
1689                 if test "$withval" = "$ol_val" ; then
1690                         ol_arg="$ol_val"
1691                 fi
1692         done
1693         if test "$ol_arg" = "invalid" ; then
1694                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1695         fi
1696         ol_with_ldap_module="$ol_arg"
1697
1698 else
1699         ol_with_ldap_module="static"
1700 fi
1701 # end --with-ldap_module
1702
1703 # OpenLDAP --enable-ldbm
1704         # Check whether --enable-ldbm or --disable-ldbm was given.
1705 if test "${enable_ldbm+set}" = set; then
1706   enableval="$enable_ldbm"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1716         fi
1717         ol_enable_ldbm="$ol_arg"
1718
1719 else
1720         ol_enable_ldbm="yes"
1721 fi
1722 # end --enable-ldbm
1723 # OpenLDAP --with-ldbm_module
1724         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1725 if test "${with_ldbm_module+set}" = set; then
1726   withval="$with_ldbm_module"
1727   
1728         ol_arg=invalid
1729         for ol_val in static dynamic ; do
1730                 if test "$withval" = "$ol_val" ; then
1731                         ol_arg="$ol_val"
1732                 fi
1733         done
1734         if test "$ol_arg" = "invalid" ; then
1735                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1736         fi
1737         ol_with_ldbm_module="$ol_arg"
1738
1739 else
1740         ol_with_ldbm_module="static"
1741 fi
1742 # end --with-ldbm_module
1743
1744 # OpenLDAP --with-ldbm_api
1745         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1746 if test "${with_ldbm_api+set}" = set; then
1747   withval="$with_ldbm_api"
1748   
1749         ol_arg=invalid
1750         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1751                 if test "$withval" = "$ol_val" ; then
1752                         ol_arg="$ol_val"
1753                 fi
1754         done
1755         if test "$ol_arg" = "invalid" ; then
1756                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1757         fi
1758         ol_with_ldbm_api="$ol_arg"
1759
1760 else
1761         ol_with_ldbm_api="auto"
1762 fi
1763 # end --with-ldbm_api
1764
1765 # OpenLDAP --with-ldbm_type
1766         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1767 if test "${with_ldbm_type+set}" = set; then
1768   withval="$with_ldbm_type"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto btree hash ; do
1772                 if test "$withval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1778         fi
1779         ol_with_ldbm_type="$ol_arg"
1780
1781 else
1782         ol_with_ldbm_type="auto"
1783 fi
1784 # end --with-ldbm_type
1785
1786
1787 # OpenLDAP --enable-passwd
1788         # Check whether --enable-passwd or --disable-passwd was given.
1789 if test "${enable_passwd+set}" = set; then
1790   enableval="$enable_passwd"
1791   
1792         ol_arg=invalid
1793         for ol_val in auto yes no ; do
1794                 if test "$enableval" = "$ol_val" ; then
1795                         ol_arg="$ol_val"
1796                 fi
1797         done
1798         if test "$ol_arg" = "invalid" ; then
1799                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1800         fi
1801         ol_enable_passwd="$ol_arg"
1802
1803 else
1804         ol_enable_passwd="no"
1805 fi
1806 # end --enable-passwd
1807 # OpenLDAP --with-passwd_module
1808         # Check whether --with-passwd_module or --without-passwd_module was given.
1809 if test "${with_passwd_module+set}" = set; then
1810   withval="$with_passwd_module"
1811   
1812         ol_arg=invalid
1813         for ol_val in static dynamic ; do
1814                 if test "$withval" = "$ol_val" ; then
1815                         ol_arg="$ol_val"
1816                 fi
1817         done
1818         if test "$ol_arg" = "invalid" ; then
1819                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1820         fi
1821         ol_with_passwd_module="$ol_arg"
1822
1823 else
1824         ol_with_passwd_module="static"
1825 fi
1826 # end --with-passwd_module
1827
1828 # OpenLDAP --enable-perl
1829         # Check whether --enable-perl or --disable-perl was given.
1830 if test "${enable_perl+set}" = set; then
1831   enableval="$enable_perl"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1841         fi
1842         ol_enable_perl="$ol_arg"
1843
1844 else
1845         ol_enable_perl="no"
1846 fi
1847 # end --enable-perl
1848 # OpenLDAP --with-perl_module
1849         # Check whether --with-perl_module or --without-perl_module was given.
1850 if test "${with_perl_module+set}" = set; then
1851   withval="$with_perl_module"
1852   
1853         ol_arg=invalid
1854         for ol_val in static dynamic ; do
1855                 if test "$withval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1861         fi
1862         ol_with_perl_module="$ol_arg"
1863
1864 else
1865         ol_with_perl_module="static"
1866 fi
1867 # end --with-perl_module
1868
1869 # OpenLDAP --enable-shell
1870         # Check whether --enable-shell or --disable-shell was given.
1871 if test "${enable_shell+set}" = set; then
1872   enableval="$enable_shell"
1873   
1874         ol_arg=invalid
1875         for ol_val in auto yes no ; do
1876                 if test "$enableval" = "$ol_val" ; then
1877                         ol_arg="$ol_val"
1878                 fi
1879         done
1880         if test "$ol_arg" = "invalid" ; then
1881                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1882         fi
1883         ol_enable_shell="$ol_arg"
1884
1885 else
1886         ol_enable_shell="no"
1887 fi
1888 # end --enable-shell
1889 # OpenLDAP --with-shell_module
1890         # Check whether --with-shell_module or --without-shell_module was given.
1891 if test "${with_shell_module+set}" = set; then
1892   withval="$with_shell_module"
1893   
1894         ol_arg=invalid
1895         for ol_val in static dynamic ; do
1896                 if test "$withval" = "$ol_val" ; then
1897                         ol_arg="$ol_val"
1898                 fi
1899         done
1900         if test "$ol_arg" = "invalid" ; then
1901                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1902         fi
1903         ol_with_shell_module="$ol_arg"
1904
1905 else
1906         ol_with_shell_module="static"
1907 fi
1908 # end --with-shell_module
1909
1910 # OpenLDAP --enable-tcl
1911         # Check whether --enable-tcl or --disable-tcl was given.
1912 if test "${enable_tcl+set}" = set; then
1913   enableval="$enable_tcl"
1914   
1915         ol_arg=invalid
1916         for ol_val in auto yes no ; do
1917                 if test "$enableval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1923         fi
1924         ol_enable_tcl="$ol_arg"
1925
1926 else
1927         ol_enable_tcl="no"
1928 fi
1929 # end --enable-tcl
1930 # OpenLDAP --with-tcl_module
1931         # Check whether --with-tcl_module or --without-tcl_module was given.
1932 if test "${with_tcl_module+set}" = set; then
1933   withval="$with_tcl_module"
1934   
1935         ol_arg=invalid
1936         for ol_val in static dynamic ; do
1937                 if test "$withval" = "$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 $withval for --with-tcl_module" 1>&2; exit 1; }
1943         fi
1944         ol_with_tcl_module="$ol_arg"
1945
1946 else
1947         ol_with_tcl_module="static"
1948 fi
1949 # end --with-tcl_module
1950
1951
1952 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1953 if test "${with_xxslurpdoptions+set}" = set; then
1954   withval="$with_xxslurpdoptions"
1955   :
1956 fi
1957
1958 # OpenLDAP --enable-slurpd
1959         # Check whether --enable-slurpd or --disable-slurpd was given.
1960 if test "${enable_slurpd+set}" = set; then
1961   enableval="$enable_slurpd"
1962   
1963         ol_arg=invalid
1964         for ol_val in auto yes no ; do
1965                 if test "$enableval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1971         fi
1972         ol_enable_slurpd="$ol_arg"
1973
1974 else
1975         ol_enable_slurpd="auto"
1976 fi
1977 # end --enable-slurpd
1978
1979 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1980 if test "${with_xxliboptions+set}" = set; then
1981   withval="$with_xxliboptions"
1982   :
1983 fi
1984
1985 # Check whether --enable-static or --disable-static was given.
1986 if test "${enable_static+set}" = set; then
1987   enableval="$enable_static"
1988   p=${PACKAGE-default}
1989 case "$enableval" in
1990 yes) enable_static=yes ;;
1991 no) enable_static=no ;;
1992 *)
1993   enable_static=no
1994   # Look at the argument we got.  We use all the common list separators.
1995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1996   for pkg in $enableval; do
1997     if test "X$pkg" = "X$p"; then
1998       enable_static=yes
1999     fi
2000   done
2001   IFS="$ac_save_ifs"
2002   ;;
2003 esac
2004 else
2005   enable_static=yes
2006 fi
2007
2008 # Check whether --enable-shared or --disable-shared was given.
2009 if test "${enable_shared+set}" = set; then
2010   enableval="$enable_shared"
2011   p=${PACKAGE-default}
2012 case "$enableval" in
2013 yes) enable_shared=yes ;;
2014 no) enable_shared=no ;;
2015 *)
2016   enable_shared=no
2017   # Look at the argument we got.  We use all the common list separators.
2018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2019   for pkg in $enableval; do
2020     if test "X$pkg" = "X$p"; then
2021       enable_shared=yes
2022     fi
2023   done
2024   IFS="$ac_save_ifs"
2025   ;;
2026 esac
2027 else
2028   enable_shared=yes
2029 fi
2030
2031
2032 # validate options
2033 if test $ol_enable_dns = yes ; then
2034         if test $ol_enable_referrals = no ; then
2035                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2036         fi
2037         if test $ol_enable_referrals = auto ; then
2038                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2039                 ol_enable_referrals=yes
2040         fi
2041 fi
2042
2043 if test $ol_enable_slapd = no ; then
2044                 if test $ol_enable_bdb2 = yes ; then
2045                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2046         fi
2047         if test $ol_enable_ldap = yes ; then
2048                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2049         fi
2050         if test $ol_enable_ldbm = yes ; then
2051                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2052         fi
2053         if test $ol_enable_passwd = yes ; then
2054                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2055         fi
2056         if test $ol_enable_perl = yes ; then
2057                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2058         fi
2059         if test $ol_enable_shell = yes ; then
2060                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2061         fi
2062         if test $ol_enable_tcl = yes ; then
2063                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2064         fi
2065         if test $ol_enable_modules = yes ; then
2066                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2067         fi
2068         if test $ol_enable_multimaster = yes ; then
2069                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2070         fi
2071         if test $ol_enable_wrappers = yes ; then
2072                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2073         fi
2074         if test $ol_enable_phonetic = yes ; then
2075                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2076         fi
2077         if test $ol_enable_quipu = yes ; then
2078                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2079         fi
2080         if test $ol_enable_rlookups = yes ; then
2081                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2082         fi
2083         if test $ol_with_ldbm_api != auto ; then
2084                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2085         fi
2086         if test $ol_with_ldbm_type != auto ; then
2087                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2088         fi
2089         if test $ol_with_bdb2_module != static ; then
2090                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2091         fi
2092         if test $ol_with_ldap_module != static ; then
2093                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2094         fi
2095         if test $ol_with_ldbm_module != static ; then
2096                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2097         fi
2098         if test $ol_with_passwd_module != static ; then
2099                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2100         fi
2101         if test $ol_with_perl_module != static ; then
2102                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2103         fi
2104         if test $ol_with_shell_module != static ; then
2105                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2106         fi
2107         if test $ol_with_tcl_module != static ; then
2108                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2109         fi
2110         if test $ol_enable_slurpd = yes ; then
2111                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2112         fi
2113
2114         # force settings to no
2115         ol_enable_bdb2=no
2116         ol_enable_ldap=no
2117         ol_enable_ldbm=no
2118         ol_enable_passwd=no
2119         ol_enable_perl=no
2120         ol_enable_shell=no
2121         ol_enable_tcl=no
2122
2123         ol_enable_modules=no
2124         ol_enable_multimaster=no
2125         ol_enable_phonetic=no
2126         ol_enable_quipu=no
2127         ol_enable_rlookups=no
2128         ol_enable_wrappers=no
2129
2130         ol_with_ldbm_api=no
2131         ol_with_ldbm_type=no
2132
2133         ol_with_bdb2_module=static
2134         ol_with_ldap_module=static
2135         ol_with_ldbm_module=static
2136         ol_with_passwd_module=static
2137         ol_with_perl_module=static
2138         ol_with_shell_module=static
2139         ol_with_tcl_module=static
2140
2141         ol_enable_slurpd=no
2142
2143 elif test $ol_enable_ldbm = no ; then
2144         
2145         if test $ol_with_ldbm_api != auto ; then
2146                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2147         fi
2148
2149         if test $ol_with_ldbm_type != auto ; then
2150                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2151         fi
2152
2153         if test $ol_with_ldbm_module != static ; then
2154                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2155         fi
2156
2157         if test $ol_enable_bdb2 = yes ; then
2158                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2159         fi
2160
2161         if test $ol_enable_modules != yes -a \
2162                 $ol_enable_ldap = no -a \
2163                 $ol_enable_passwd = no -a \
2164                 $ol_enable_perl = no -a \
2165                 $ol_enable_shell = no -a \
2166                 $ol_enable_tcl = no ; then
2167                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2168         fi
2169
2170         ol_with_ldbm_api=no
2171         ol_with_ldbm_type=no
2172         ol_with_ldbm_module=static
2173
2174 elif test $ol_enable_bdb2 = yes ; then
2175         
2176         if test $ol_with_ldbm_api != auto -a \
2177                 $ol_with_ldbm_api != db2 ; then
2178                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2179         fi
2180
2181         ol_with_ldbm_api=db2
2182
2183 else
2184         
2185         if test $ol_enable_bdb2 != no ; then
2186                 if test $ol_with_ldbm_api != auto -a \
2187                         $ol_with_ldbm_api != db2 ; then
2188                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2189                         ol_enable_bdb2=no
2190                 fi
2191         fi
2192
2193         if test $ol_with_ldbm_api = gdbm -a \
2194                 $ol_with_ldbm_type = btree ; then
2195                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2196         fi
2197         if test $ol_with_ldbm_api = mdbm -a \
2198                 $ol_with_ldbm_type = btree ; then
2199                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2200         fi
2201         if test $ol_with_ldbm_api = ndbm -a \
2202                 $ol_with_ldbm_type = btree ; then
2203                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2204         fi
2205 fi
2206
2207 if test $ol_enable_slurpd = yes ; then
2208                 if test $ol_with_threads = no ; then
2209                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2210         fi
2211 fi
2212
2213 echo "$ac_t""done" 1>&6
2214
2215 ## Initialize vars
2216 LDAP_LIBS=
2217 LDIF_LIBS=
2218 LDBM_LIBS=
2219 LTHREAD_LIBS=
2220 LUTIL_LIBS=
2221
2222 LDAPD_LIBS=
2223 SLAPD_LIBS=
2224 SLURPD_LIBS=
2225
2226 BUILD_LDAPD=no
2227 BUILD_SLAPD=no
2228 BUILD_SLURPD=no
2229
2230 BUILD_BDB2=no
2231 BUILD_LDAP=no
2232 BUILD_LDBM=no
2233 BUILD_PASSWD=no
2234 BUILD_PERL=no
2235 BUILD_QUIPU=no
2236 BUILD_SHELL=no
2237 BUILD_TCL=no
2238 BUILD_THREAD=no
2239
2240 BUILD_BDB2_DYNAMIC=static
2241 BUILD_LDAP_DYNAMIC=static
2242 BUILD_LDBM_DYNAMIC=static
2243 BUILD_PASSWD_DYNAMIC=static
2244 BUILD_PERL_DYNAMIC=static
2245 BUILD_SHELL_DYNAMIC=static
2246 BUILD_TCL_DYNAMIC=static
2247
2248 SLAPD_MODULES_LDFLAGS=
2249 SLAPD_MODULES_CPPFLAGS=
2250 SLAPD_MODULES_LIST=
2251
2252 SLAPD_PERL_LDFLAGS=
2253 SLAPD_PERL_CPPFLAGS=
2254
2255 KRB_LIBS=
2256 READLINE_LIBS=
2257 SASL_LIBS=
2258 TERMCAP_LIBS=
2259 TLS_LIBS=
2260 MODULES_LIBS=
2261
2262
2263
2264 cat >> confdefs.h <<\EOF
2265 #define HAVE_MKVERSION 1
2266 EOF
2267
2268
2269
2270
2271
2272 ol_aix_threads=no
2273 case "$target" in
2274 *-*-aix*)       if test -z "$CC" ; then
2275                 case "$ol_with_threads" in
2276                 auto | yes |  posix) ol_aix_threads=yes ;;
2277                 esac
2278         fi
2279 ;;
2280 esac
2281
2282 if test $ol_aix_threads = yes ; then
2283         if test -z "${CC}" ; then
2284                 for ac_prog in cc_r xlc_r cc
2285 do
2286 # Extract the first word of "$ac_prog", so it can be a program name with args.
2287 set dummy $ac_prog; ac_word=$2
2288 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2289 echo "configure:2290: checking for $ac_word" >&5
2290 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2291   echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293   if test -n "$CC"; then
2294   ac_cv_prog_CC="$CC" # Let the user override the test.
2295 else
2296   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2297   ac_dummy="$PATH"
2298   for ac_dir in $ac_dummy; do
2299     test -z "$ac_dir" && ac_dir=.
2300     if test -f $ac_dir/$ac_word; then
2301       ac_cv_prog_CC="$ac_prog"
2302       break
2303     fi
2304   done
2305   IFS="$ac_save_ifs"
2306 fi
2307 fi
2308 CC="$ac_cv_prog_CC"
2309 if test -n "$CC"; then
2310   echo "$ac_t""$CC" 1>&6
2311 else
2312   echo "$ac_t""no" 1>&6
2313 fi
2314
2315 test -n "$CC" && break
2316 done
2317
2318
2319                 if test "$CC" = cc ; then
2320                                                 if test $ol_with_threads != auto ; then
2321                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2322                         else
2323                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2324                         fi
2325                         ol_with_threads=no
2326                 fi
2327         fi
2328
2329         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2330                 ol_with_threads=posix
2331                 ol_cv_pthread_create=yes
2332         fi
2333 fi
2334
2335 if test -z "${CC}"; then
2336         for ac_prog in cc
2337 do
2338 # Extract the first word of "$ac_prog", so it can be a program name with args.
2339 set dummy $ac_prog; ac_word=$2
2340 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2341 echo "configure:2342: checking for $ac_word" >&5
2342 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2343   echo $ac_n "(cached) $ac_c" 1>&6
2344 else
2345   if test -n "$CC"; then
2346   ac_cv_prog_CC="$CC" # Let the user override the test.
2347 else
2348   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2349   ac_dummy="$PATH"
2350   for ac_dir in $ac_dummy; do
2351     test -z "$ac_dir" && ac_dir=.
2352     if test -f $ac_dir/$ac_word; then
2353       ac_cv_prog_CC="$ac_prog"
2354       break
2355     fi
2356   done
2357   IFS="$ac_save_ifs"
2358 fi
2359 fi
2360 CC="$ac_cv_prog_CC"
2361 if test -n "$CC"; then
2362   echo "$ac_t""$CC" 1>&6
2363 else
2364   echo "$ac_t""no" 1>&6
2365 fi
2366
2367 test -n "$CC" && break
2368 done
2369
2370 fi
2371
2372
2373
2374 # Check whether --enable-fast-install or --disable-fast-install was given.
2375 if test "${enable_fast_install+set}" = set; then
2376   enableval="$enable_fast_install"
2377   p=${PACKAGE-default}
2378 case "$enableval" in
2379 yes) enable_fast_install=yes ;;
2380 no) enable_fast_install=no ;;
2381 *)
2382   enable_fast_install=no
2383   # Look at the argument we got.  We use all the common list separators.
2384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2385   for pkg in $enableval; do
2386     if test "X$pkg" = "X$p"; then
2387       enable_fast_install=yes
2388     fi
2389   done
2390   IFS="$ac_save_ifs"
2391   ;;
2392 esac
2393 else
2394   enable_fast_install=yes
2395 fi
2396
2397 # Extract the first word of "ranlib", so it can be a program name with args.
2398 set dummy ranlib; ac_word=$2
2399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2400 echo "configure:2401: checking for $ac_word" >&5
2401 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2402   echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404   if test -n "$RANLIB"; then
2405   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2406 else
2407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2408   ac_dummy="$PATH"
2409   for ac_dir in $ac_dummy; do
2410     test -z "$ac_dir" && ac_dir=.
2411     if test -f $ac_dir/$ac_word; then
2412       ac_cv_prog_RANLIB="ranlib"
2413       break
2414     fi
2415   done
2416   IFS="$ac_save_ifs"
2417   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2418 fi
2419 fi
2420 RANLIB="$ac_cv_prog_RANLIB"
2421 if test -n "$RANLIB"; then
2422   echo "$ac_t""$RANLIB" 1>&6
2423 else
2424   echo "$ac_t""no" 1>&6
2425 fi
2426
2427 # Extract the first word of "gcc", so it can be a program name with args.
2428 set dummy gcc; ac_word=$2
2429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2430 echo "configure:2431: checking for $ac_word" >&5
2431 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2432   echo $ac_n "(cached) $ac_c" 1>&6
2433 else
2434   if test -n "$CC"; then
2435   ac_cv_prog_CC="$CC" # Let the user override the test.
2436 else
2437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2438   ac_dummy="$PATH"
2439   for ac_dir in $ac_dummy; do
2440     test -z "$ac_dir" && ac_dir=.
2441     if test -f $ac_dir/$ac_word; then
2442       ac_cv_prog_CC="gcc"
2443       break
2444     fi
2445   done
2446   IFS="$ac_save_ifs"
2447 fi
2448 fi
2449 CC="$ac_cv_prog_CC"
2450 if test -n "$CC"; then
2451   echo "$ac_t""$CC" 1>&6
2452 else
2453   echo "$ac_t""no" 1>&6
2454 fi
2455
2456 if test -z "$CC"; then
2457   # Extract the first word of "cc", so it can be a program name with args.
2458 set dummy cc; ac_word=$2
2459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2460 echo "configure:2461: checking for $ac_word" >&5
2461 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2462   echo $ac_n "(cached) $ac_c" 1>&6
2463 else
2464   if test -n "$CC"; then
2465   ac_cv_prog_CC="$CC" # Let the user override the test.
2466 else
2467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2468   ac_prog_rejected=no
2469   ac_dummy="$PATH"
2470   for ac_dir in $ac_dummy; do
2471     test -z "$ac_dir" && ac_dir=.
2472     if test -f $ac_dir/$ac_word; then
2473       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2474         ac_prog_rejected=yes
2475         continue
2476       fi
2477       ac_cv_prog_CC="cc"
2478       break
2479     fi
2480   done
2481   IFS="$ac_save_ifs"
2482 if test $ac_prog_rejected = yes; then
2483   # We found a bogon in the path, so make sure we never use it.
2484   set dummy $ac_cv_prog_CC
2485   shift
2486   if test $# -gt 0; then
2487     # We chose a different compiler from the bogus one.
2488     # However, it has the same basename, so the bogon will be chosen
2489     # first if we set CC to just the basename; use the full file name.
2490     shift
2491     set dummy "$ac_dir/$ac_word" "$@"
2492     shift
2493     ac_cv_prog_CC="$@"
2494   fi
2495 fi
2496 fi
2497 fi
2498 CC="$ac_cv_prog_CC"
2499 if test -n "$CC"; then
2500   echo "$ac_t""$CC" 1>&6
2501 else
2502   echo "$ac_t""no" 1>&6
2503 fi
2504
2505   if test -z "$CC"; then
2506     case "`uname -s`" in
2507     *win32* | *WIN32*)
2508       # Extract the first word of "cl", so it can be a program name with args.
2509 set dummy cl; ac_word=$2
2510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2511 echo "configure:2512: checking for $ac_word" >&5
2512 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2513   echo $ac_n "(cached) $ac_c" 1>&6
2514 else
2515   if test -n "$CC"; then
2516   ac_cv_prog_CC="$CC" # Let the user override the test.
2517 else
2518   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2519   ac_dummy="$PATH"
2520   for ac_dir in $ac_dummy; do
2521     test -z "$ac_dir" && ac_dir=.
2522     if test -f $ac_dir/$ac_word; then
2523       ac_cv_prog_CC="cl"
2524       break
2525     fi
2526   done
2527   IFS="$ac_save_ifs"
2528 fi
2529 fi
2530 CC="$ac_cv_prog_CC"
2531 if test -n "$CC"; then
2532   echo "$ac_t""$CC" 1>&6
2533 else
2534   echo "$ac_t""no" 1>&6
2535 fi
2536  ;;
2537     esac
2538   fi
2539   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2540 fi
2541
2542 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2543 echo "configure:2544: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2544
2545 ac_ext=c
2546 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2547 ac_cpp='$CPP $CPPFLAGS'
2548 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2549 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2550 cross_compiling=$ac_cv_prog_cc_cross
2551
2552 cat > conftest.$ac_ext << EOF
2553
2554 #line 2555 "configure"
2555 #include "confdefs.h"
2556
2557 main(){return(0);}
2558 EOF
2559 if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2560   ac_cv_prog_cc_works=yes
2561   # If we can't run a trivial program, we are probably using a cross compiler.
2562   if (./conftest; exit) 2>/dev/null; then
2563     ac_cv_prog_cc_cross=no
2564   else
2565     ac_cv_prog_cc_cross=yes
2566   fi
2567 else
2568   echo "configure: failed program was:" >&5
2569   cat conftest.$ac_ext >&5
2570   ac_cv_prog_cc_works=no
2571 fi
2572 rm -fr conftest*
2573 ac_ext=c
2574 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2575 ac_cpp='$CPP $CPPFLAGS'
2576 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2577 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2578 cross_compiling=$ac_cv_prog_cc_cross
2579
2580 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2581 if test $ac_cv_prog_cc_works = no; then
2582   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2583 fi
2584 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2585 echo "configure:2586: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2586 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2587 cross_compiling=$ac_cv_prog_cc_cross
2588
2589 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2590 echo "configure:2591: checking whether we are using GNU C" >&5
2591 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2592   echo $ac_n "(cached) $ac_c" 1>&6
2593 else
2594   cat > conftest.c <<EOF
2595 #ifdef __GNUC__
2596   yes;
2597 #endif
2598 EOF
2599 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2600   ac_cv_prog_gcc=yes
2601 else
2602   ac_cv_prog_gcc=no
2603 fi
2604 fi
2605
2606 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2607
2608 if test $ac_cv_prog_gcc = yes; then
2609   GCC=yes
2610 else
2611   GCC=
2612 fi
2613
2614 ac_test_CFLAGS="${CFLAGS+set}"
2615 ac_save_CFLAGS="$CFLAGS"
2616 CFLAGS=
2617 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2618 echo "configure:2619: checking whether ${CC-cc} accepts -g" >&5
2619 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2620   echo $ac_n "(cached) $ac_c" 1>&6
2621 else
2622   echo 'void f(){}' > conftest.c
2623 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2624   ac_cv_prog_cc_g=yes
2625 else
2626   ac_cv_prog_cc_g=no
2627 fi
2628 rm -f conftest*
2629
2630 fi
2631
2632 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2633 if test "$ac_test_CFLAGS" = set; then
2634   CFLAGS="$ac_save_CFLAGS"
2635 elif test $ac_cv_prog_cc_g = yes; then
2636   if test "$GCC" = yes; then
2637     CFLAGS="-g -O2"
2638   else
2639     CFLAGS="-g"
2640   fi
2641 else
2642   if test "$GCC" = yes; then
2643     CFLAGS="-O2"
2644   else
2645     CFLAGS=
2646   fi
2647 fi
2648
2649 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2650 if test "${with_gnu_ld+set}" = set; then
2651   withval="$with_gnu_ld"
2652   test "$withval" = no || with_gnu_ld=yes
2653 else
2654   with_gnu_ld=no
2655 fi
2656
2657 ac_prog=ld
2658 if test "$ac_cv_prog_gcc" = yes; then
2659   # Check if gcc -print-prog-name=ld gives a path.
2660   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2661 echo "configure:2662: checking for ld used by GCC" >&5
2662   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2663   case "$ac_prog" in
2664     # Accept absolute paths.
2665     [\\/]* | [A-Za-z]:[\\/]*)
2666       re_direlt='/[^/][^/]*/\.\./'
2667       # Canonicalize the path of ld
2668       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2669       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2670         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2671       done
2672       test -z "$LD" && LD="$ac_prog"
2673       ;;
2674   "")
2675     # If it fails, then pretend we aren't using GCC.
2676     ac_prog=ld
2677     ;;
2678   *)
2679     # If it is relative, then search for the first ld in PATH.
2680     with_gnu_ld=unknown
2681     ;;
2682   esac
2683 elif test "$with_gnu_ld" = yes; then
2684   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2685 echo "configure:2686: checking for GNU ld" >&5
2686 else
2687   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2688 echo "configure:2689: checking for non-GNU ld" >&5
2689 fi
2690 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2691   echo $ac_n "(cached) $ac_c" 1>&6
2692 else
2693   if test -z "$LD"; then
2694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2695   for ac_dir in $PATH; do
2696     test -z "$ac_dir" && ac_dir=.
2697     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2698       ac_cv_path_LD="$ac_dir/$ac_prog"
2699       # Check to see if the program is GNU ld.  I'd rather use --version,
2700       # but apparently some GNU ld's only accept -v.
2701       # Break only if it was the GNU/non-GNU ld that we prefer.
2702       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2703         test "$with_gnu_ld" != no && break
2704       else
2705         test "$with_gnu_ld" != yes && break
2706       fi
2707     fi
2708   done
2709   IFS="$ac_save_ifs"
2710 else
2711   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2712 fi
2713 fi
2714
2715 LD="$ac_cv_path_LD"
2716 if test -n "$LD"; then
2717   echo "$ac_t""$LD" 1>&6
2718 else
2719   echo "$ac_t""no" 1>&6
2720 fi
2721 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2722
2723 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2724 echo "configure:2725: checking if the linker ($LD) is GNU ld" >&5
2725 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2729 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2730   ac_cv_prog_gnu_ld=yes
2731 else
2732   ac_cv_prog_gnu_ld=no
2733 fi
2734 fi
2735
2736 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2737
2738
2739 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2740 echo "configure:2741: checking for BSD-compatible nm" >&5
2741 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   if test -n "$NM"; then
2745   # Let the user override the test.
2746   ac_cv_path_NM="$NM"
2747 else
2748   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2749   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2750     test -z "$ac_dir" && ac_dir=.
2751     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2752       # Check to see if the nm accepts a BSD-compat flag.
2753       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2754       #   nm: unknown option "B" ignored
2755       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2756         ac_cv_path_NM="$ac_dir/nm -B"
2757         break
2758       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2759         ac_cv_path_NM="$ac_dir/nm -p"
2760         break
2761       else
2762         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2763         continue # so that we can try to find one that supports BSD flags
2764       fi
2765     fi
2766   done
2767   IFS="$ac_save_ifs"
2768   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2769 fi
2770 fi
2771
2772 NM="$ac_cv_path_NM"
2773 echo "$ac_t""$NM" 1>&6
2774
2775
2776 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2777 echo "configure:2778: checking whether ln -s works" >&5
2778 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2779   echo $ac_n "(cached) $ac_c" 1>&6
2780 else
2781   rm -f conftestdata
2782 if ln -s X conftestdata 2>/dev/null
2783 then
2784   rm -f conftestdata
2785   ac_cv_prog_LN_S="ln -s"
2786 else
2787   ac_cv_prog_LN_S=ln
2788 fi
2789 fi
2790 LN_S="$ac_cv_prog_LN_S"
2791 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2792   echo "$ac_t""yes" 1>&6
2793 else
2794   echo "$ac_t""no" 1>&6
2795 fi
2796
2797
2798 # Check for any special flags to pass to ltconfig.
2799 libtool_flags="--cache-file=$cache_file"
2800 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2801 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2802 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2803 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2804 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2805 libtool_flags="$libtool_flags --enable-dlopen"
2806
2807 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2808 if test "${enable_libtool_lock+set}" = set; then
2809   enableval="$enable_libtool_lock"
2810   :
2811 fi
2812
2813 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2814 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2815
2816 # Some flags need to be propagated to the compiler or linker for good
2817 # libtool support.
2818 case "$host" in
2819 *-*-irix6*)
2820   # Find out which ABI we are using.
2821   echo '#line 2822 "configure"' > conftest.$ac_ext
2822   if { (eval echo configure:2823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2823     case "`/usr/bin/file conftest.o`" in
2824     *32-bit*)
2825       LD="${LD-ld} -32"
2826       ;;
2827     *N32*)
2828       LD="${LD-ld} -n32"
2829       ;;
2830     *64-bit*)
2831       LD="${LD-ld} -64"
2832       ;;
2833     esac
2834   fi
2835   rm -rf conftest*
2836   ;;
2837
2838 *-*-sco3.2v5*)
2839   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2840   SAVE_CFLAGS="$CFLAGS"
2841   CFLAGS="$CFLAGS -belf"
2842   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2843 echo "configure:2844: checking whether the C compiler needs -belf" >&5
2844 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847   cat > conftest.$ac_ext <<EOF
2848 #line 2849 "configure"
2849 #include "confdefs.h"
2850
2851 int main() {
2852
2853 ; return 0; }
2854 EOF
2855 if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2856   rm -rf conftest*
2857   lt_cv_cc_needs_belf=yes
2858 else
2859   echo "configure: failed program was:" >&5
2860   cat conftest.$ac_ext >&5
2861   rm -rf conftest*
2862   lt_cv_cc_needs_belf=no
2863 fi
2864 rm -f conftest*
2865 fi
2866
2867 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2868   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2869     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2870     CFLAGS="$SAVE_CFLAGS"
2871   fi
2872   ;;
2873
2874
2875 esac
2876
2877
2878 # Save cache, so that ltconfig can load it
2879
2880
2881 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2882 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2883 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2884 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2885 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2886 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2887 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2888 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2889
2890 # Reload cache, that may have been modified by ltconfig
2891
2892
2893 # This can be used to rebuild libtool when needed
2894 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2895
2896 # Always use our own libtool.
2897 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2898
2899 # Redirect the config.log output again, so that the ltconfig log is not
2900 # clobbered by the next message.
2901 exec 5>>./config.log
2902
2903
2904 for ac_prog in mawk gawk nawk awk
2905 do
2906 # Extract the first word of "$ac_prog", so it can be a program name with args.
2907 set dummy $ac_prog; ac_word=$2
2908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2909 echo "configure:2910: checking for $ac_word" >&5
2910 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913   if test -n "$AWK"; then
2914   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2915 else
2916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2917   ac_dummy="$PATH"
2918   for ac_dir in $ac_dummy; do
2919     test -z "$ac_dir" && ac_dir=.
2920     if test -f $ac_dir/$ac_word; then
2921       ac_cv_prog_AWK="$ac_prog"
2922       break
2923     fi
2924   done
2925   IFS="$ac_save_ifs"
2926 fi
2927 fi
2928 AWK="$ac_cv_prog_AWK"
2929 if test -n "$AWK"; then
2930   echo "$ac_t""$AWK" 1>&6
2931 else
2932   echo "$ac_t""no" 1>&6
2933 fi
2934
2935 test -n "$AWK" && break
2936 done
2937
2938 # test for ln hardlink support
2939 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2940 echo "configure:2941: checking whether ln works" >&5
2941 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   rm -f conftest.src conftest.dst
2945 echo "conftest" > conftest.src
2946 if ln conftest.src conftest.dst 2>/dev/null
2947 then
2948   ol_cv_prog_LN_H="ln"
2949 else
2950   ol_cv_prog_LN_H="cp"
2951 fi
2952 rm -f conftest.src conftest.dst
2953
2954 fi
2955 LN_H="$ol_cv_prog_LN_H"
2956 if test "$ol_cv_prog_LN_H" = "ln"; then
2957         echo "$ac_t""yes" 1>&6
2958 else
2959         echo "$ac_t""no" 1>&6
2960 fi
2961
2962 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2963 echo "configure:2964: checking whether ln -s works" >&5
2964 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967   rm -f conftestdata
2968 if ln -s X conftestdata 2>/dev/null
2969 then
2970   rm -f conftestdata
2971   ac_cv_prog_LN_S="ln -s"
2972 else
2973   ac_cv_prog_LN_S=ln
2974 fi
2975 fi
2976 LN_S="$ac_cv_prog_LN_S"
2977 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2978   echo "$ac_t""yes" 1>&6
2979 else
2980   echo "$ac_t""no" 1>&6
2981 fi
2982
2983
2984 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2985         LN_S="$LN_H"
2986 fi
2987
2988 # Extract the first word of "sendmail", so it can be a program name with args.
2989 set dummy sendmail; ac_word=$2
2990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2991 echo "configure:2992: checking for $ac_word" >&5
2992 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2993   echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995   case "$SENDMAIL" in
2996   /*)
2997   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2998   ;;
2999   ?:/*)                  
3000   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3001   ;;
3002   *)
3003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3004   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3005   for ac_dir in $ac_dummy; do 
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/$ac_word; then
3008       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3009       break
3010     fi
3011   done
3012   IFS="$ac_save_ifs"
3013   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3014   ;;
3015 esac
3016 fi
3017 SENDMAIL="$ac_cv_path_SENDMAIL"
3018 if test -n "$SENDMAIL"; then
3019   echo "$ac_t""$SENDMAIL" 1>&6
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024 # Extract the first word of "vi", so it can be a program name with args.
3025 set dummy vi; ac_word=$2
3026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3027 echo "configure:3028: checking for $ac_word" >&5
3028 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   case "$EDITOR" in
3032   /*)
3033   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3034   ;;
3035   ?:/*)                  
3036   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3037   ;;
3038   *)
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH:/usr/ucb"
3041   for ac_dir in $ac_dummy; do 
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3050   ;;
3051 esac
3052 fi
3053 EDITOR="$ac_cv_path_EDITOR"
3054 if test -n "$EDITOR"; then
3055   echo "$ac_t""$EDITOR" 1>&6
3056 else
3057   echo "$ac_t""no" 1>&6
3058 fi
3059
3060 # Extract the first word of "finger", so it can be a program name with args.
3061 set dummy finger; ac_word=$2
3062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3063 echo "configure:3064: checking for $ac_word" >&5
3064 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
3065   echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067   case "$FINGER" in
3068   /*)
3069   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3070   ;;
3071   ?:/*)                  
3072   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3073   ;;
3074   *)
3075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3076   ac_dummy="$PATH:/usr/ucb"
3077   for ac_dir in $ac_dummy; do 
3078     test -z "$ac_dir" && ac_dir=.
3079     if test -f $ac_dir/$ac_word; then
3080       ac_cv_path_FINGER="$ac_dir/$ac_word"
3081       break
3082     fi
3083   done
3084   IFS="$ac_save_ifs"
3085   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3086   ;;
3087 esac
3088 fi
3089 FINGER="$ac_cv_path_FINGER"
3090 if test -n "$FINGER"; then
3091   echo "$ac_t""$FINGER" 1>&6
3092 else
3093   echo "$ac_t""no" 1>&6
3094 fi
3095
3096
3097 ol_link_perl=no
3098 if test $ol_enable_perl != no ; then
3099         # Extract the first word of "perl", so it can be a program name with args.
3100 set dummy perl; ac_word=$2
3101 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3102 echo "configure:3103: checking for $ac_word" >&5
3103 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
3104   echo $ac_n "(cached) $ac_c" 1>&6
3105 else
3106   case "$PERLBIN" in
3107   /*)
3108   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3109   ;;
3110   ?:/*)                  
3111   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3112   ;;
3113   *)
3114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3115   ac_dummy="$PATH"
3116   for ac_dir in $ac_dummy; do 
3117     test -z "$ac_dir" && ac_dir=.
3118     if test -f $ac_dir/$ac_word; then
3119       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3120       break
3121     fi
3122   done
3123   IFS="$ac_save_ifs"
3124   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3125   ;;
3126 esac
3127 fi
3128 PERLBIN="$ac_cv_path_PERLBIN"
3129 if test -n "$PERLBIN"; then
3130   echo "$ac_t""$PERLBIN" 1>&6
3131 else
3132   echo "$ac_t""no" 1>&6
3133 fi
3134
3135
3136         if test "no$PERLBIN" = "no" ; then
3137                 if test $ol_enable_perl = yes ; then
3138                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3139                 fi
3140
3141         else
3142                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3143                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3144
3145                                 ol_link_perl=yes
3146         fi
3147 fi
3148
3149 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3150 echo "configure:3151: checking how to run the C preprocessor" >&5
3151 # On Suns, sometimes $CPP names a directory.
3152 if test -n "$CPP" && test -d "$CPP"; then
3153   CPP=
3154 fi
3155 if test -z "$CPP"; then
3156 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159     # This must be in double quotes, not single quotes, because CPP may get
3160   # substituted into the Makefile and "${CC-cc}" will confuse make.
3161   CPP="${CC-cc} -E"
3162   # On the NeXT, cc -E runs the code through the compiler's parser,
3163   # not just through cpp.
3164   cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167 #include <assert.h>
3168 Syntax Error
3169 EOF
3170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3171 { (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3173 if test -z "$ac_err"; then
3174   :
3175 else
3176   echo "$ac_err" >&5
3177   echo "configure: failed program was:" >&5
3178   cat conftest.$ac_ext >&5
3179   rm -rf conftest*
3180   CPP="${CC-cc} -E -traditional-cpp"
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184 #include <assert.h>
3185 Syntax Error
3186 EOF
3187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3188 { (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3190 if test -z "$ac_err"; then
3191   :
3192 else
3193   echo "$ac_err" >&5
3194   echo "configure: failed program was:" >&5
3195   cat conftest.$ac_ext >&5
3196   rm -rf conftest*
3197   CPP="${CC-cc} -nologo -E"
3198   cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201 #include <assert.h>
3202 Syntax Error
3203 EOF
3204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3205 { (eval echo configure:3206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3207 if test -z "$ac_err"; then
3208   :
3209 else
3210   echo "$ac_err" >&5
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -rf conftest*
3214   CPP=/lib/cpp
3215 fi
3216 rm -f conftest*
3217 fi
3218 rm -f conftest*
3219 fi
3220 rm -f conftest*
3221   ac_cv_prog_CPP="$CPP"
3222 fi
3223   CPP="$ac_cv_prog_CPP"
3224 else
3225   ac_cv_prog_CPP="$CPP"
3226 fi
3227 echo "$ac_t""$CPP" 1>&6
3228
3229
3230 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3231         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3232
3233 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3234         echo "configure: warning: programs compiled here do run here..." 1>&2
3235         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3236
3237 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3238         echo "configure: warning: programs compiled here do not run here..." 1>&2
3239         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3240 fi
3241
3242 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3243 echo "configure:3244: checking for AIX" >&5
3244 cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 #ifdef _AIX
3248   yes
3249 #endif
3250
3251 EOF
3252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3253   egrep "yes" >/dev/null 2>&1; then
3254   rm -rf conftest*
3255   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3256 #define _ALL_SOURCE 1
3257 EOF
3258
3259 else
3260   rm -rf conftest*
3261   echo "$ac_t""no" 1>&6
3262 fi
3263 rm -f conftest*
3264
3265
3266 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3267 echo "configure:3268: checking for POSIXized ISC" >&5
3268 if test -d /etc/conf/kconfig.d &&
3269   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3270 then
3271   echo "$ac_t""yes" 1>&6
3272   ISC=yes # If later tests want to check for ISC.
3273   cat >> confdefs.h <<\EOF
3274 #define _POSIX_SOURCE 1
3275 EOF
3276
3277   if test "$GCC" = yes; then
3278     CC="$CC -posix"
3279   else
3280     CC="$CC -Xp"
3281   fi
3282 else
3283   echo "$ac_t""no" 1>&6
3284   ISC=
3285 fi
3286
3287 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3288 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3289 echo "configure:3290: checking for minix/config.h" >&5
3290 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 #include <minix/config.h>
3297 EOF
3298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3299 { (eval echo configure:3300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3301 if test -z "$ac_err"; then
3302   rm -rf conftest*
3303   eval "ac_cv_header_$ac_safe=yes"
3304 else
3305   echo "$ac_err" >&5
3306   echo "configure: failed program was:" >&5
3307   cat conftest.$ac_ext >&5
3308   rm -rf conftest*
3309   eval "ac_cv_header_$ac_safe=no"
3310 fi
3311 rm -f conftest*
3312 fi
3313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3314   echo "$ac_t""yes" 1>&6
3315   MINIX=yes
3316 else
3317   echo "$ac_t""no" 1>&6
3318 MINIX=
3319 fi
3320
3321 if test "$MINIX" = yes; then
3322   cat >> confdefs.h <<\EOF
3323 #define _POSIX_SOURCE 1
3324 EOF
3325
3326   cat >> confdefs.h <<\EOF
3327 #define _POSIX_1_SOURCE 2
3328 EOF
3329
3330   cat >> confdefs.h <<\EOF
3331 #define _MINIX 1
3332 EOF
3333
3334 fi
3335
3336
3337 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3338 echo "configure:3339: checking for Cygwin environment" >&5
3339 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3340   echo $ac_n "(cached) $ac_c" 1>&6
3341 else
3342   cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345
3346 int main() {
3347
3348 #ifndef __CYGWIN__
3349 #define __CYGWIN__ __CYGWIN32__
3350 #endif
3351 return __CYGWIN__;
3352 ; return 0; }
3353 EOF
3354 if { (eval echo configure:3355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3355   rm -rf conftest*
3356   ac_cv_cygwin=yes
3357 else
3358   echo "configure: failed program was:" >&5
3359   cat conftest.$ac_ext >&5
3360   rm -rf conftest*
3361   ac_cv_cygwin=no
3362 fi
3363 rm -f conftest*
3364 rm -f conftest*
3365 fi
3366
3367 echo "$ac_t""$ac_cv_cygwin" 1>&6
3368 CYGWIN=
3369 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3370 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3371 echo "configure:3372: checking for mingw32 environment" >&5
3372 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3373   echo $ac_n "(cached) $ac_c" 1>&6
3374 else
3375   cat > conftest.$ac_ext <<EOF
3376 #line 3377 "configure"
3377 #include "confdefs.h"
3378
3379 int main() {
3380 return __MINGW32__;
3381 ; return 0; }
3382 EOF
3383 if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3384   rm -rf conftest*
3385   ac_cv_mingw32=yes
3386 else
3387   echo "configure: failed program was:" >&5
3388   cat conftest.$ac_ext >&5
3389   rm -rf conftest*
3390   ac_cv_mingw32=no
3391 fi
3392 rm -f conftest*
3393 rm -f conftest*
3394 fi
3395
3396 echo "$ac_t""$ac_cv_mingw32" 1>&6
3397 MINGW32=
3398 test "$ac_cv_mingw32" = yes && MINGW32=yes
3399
3400
3401 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3402 echo "configure:3403: checking for executable suffix" >&5
3403 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3407   ac_cv_exeext=.exe
3408 else
3409   rm -f conftest*
3410   echo 'int main () { return 0; }' > conftest.$ac_ext
3411   ac_cv_exeext=
3412   if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3413     for file in conftest.*; do
3414       case $file in
3415       *.c | *.o | *.obj) ;;
3416       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3417       esac
3418     done
3419   else
3420     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3421   fi
3422   rm -f conftest*
3423   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3424 fi
3425 fi
3426
3427 EXEEXT=""
3428 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3429 echo "$ac_t""${ac_cv_exeext}" 1>&6
3430 ac_exeext=$EXEEXT
3431
3432 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3433 echo "configure:3434: checking for object suffix" >&5
3434 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   rm -f conftest*
3438 echo 'int i = 1;' > conftest.$ac_ext
3439 if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3440   for ac_file in conftest.*; do
3441     case $ac_file in
3442     *.c) ;;
3443     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3444     esac
3445   done
3446 else
3447   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3448 fi
3449 rm -f conftest*
3450 fi
3451
3452 echo "$ac_t""$ac_cv_objext" 1>&6
3453 OBJEXT=$ac_cv_objext
3454 ac_objext=$ac_cv_objext
3455
3456
3457 cat >> confdefs.h <<EOF
3458 #define EXEEXT "${EXEEXT}"
3459 EOF
3460
3461
3462 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3463 echo "configure:3464: checking for be_app in -lbe" >&5
3464 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3466   echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468   ac_save_LIBS="$LIBS"
3469 LIBS="-lbe -lroot -lnet $LIBS"
3470 cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 /* Override any gcc2 internal prototype to avoid an error.  */
3474 /* We use char because int might match the return type of a gcc2
3475     builtin and then its argument prototype would still apply.  */
3476 char be_app();
3477
3478 int main() {
3479 be_app()
3480 ; return 0; }
3481 EOF
3482 if { (eval echo configure:3483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3483   rm -rf conftest*
3484   eval "ac_cv_lib_$ac_lib_var=yes"
3485 else
3486   echo "configure: failed program was:" >&5
3487   cat conftest.$ac_ext >&5
3488   rm -rf conftest*
3489   eval "ac_cv_lib_$ac_lib_var=no"
3490 fi
3491 rm -f conftest*
3492 LIBS="$ac_save_LIBS"
3493
3494 fi
3495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3496   echo "$ac_t""yes" 1>&6
3497   LIBS="$LIBS -lbe -lroot -lnet"
3498 else
3499   echo "$ac_t""no" 1>&6
3500 :
3501 fi
3502
3503
3504
3505
3506
3507 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3508 echo "configure:3509: checking for ${CC-cc} option to accept ANSI C" >&5
3509 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3510   echo $ac_n "(cached) $ac_c" 1>&6
3511 else
3512   am_cv_prog_cc_stdc=no
3513 ac_save_CC="$CC"
3514 # Don't try gcc -ansi; that turns off useful extensions and
3515 # breaks some systems' header files.
3516 # AIX                   -qlanglvl=ansi
3517 # Ultrix and OSF/1      -std1
3518 # HP-UX 10.20 and later -Ae
3519 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3520 # SVR4                  -Xc -D__EXTENSIONS__
3521 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3522 do
3523   CC="$ac_save_CC $ac_arg"
3524   cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527 #include <stdarg.h>
3528 #include <stdio.h>
3529 #include <sys/types.h>
3530 #include <sys/stat.h>
3531 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3532 struct buf { int x; };
3533 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3534 static char *e (p, i)
3535      char **p;
3536      int i;
3537 {
3538   return p[i];
3539 }
3540 static char *f (char * (*g) (char **, int), char **p, ...)
3541 {
3542   char *s;
3543   va_list v;
3544   va_start (v,p);
3545   s = g (p, va_arg (v,int));
3546   va_end (v);
3547   return s;
3548 }
3549 int test (int i, double x);
3550 struct s1 {int (*f) (int a);};
3551 struct s2 {int (*f) (double a);};
3552 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3553 int argc;
3554 char **argv;
3555
3556 int main() {
3557
3558 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3559
3560 ; return 0; }
3561 EOF
3562 if { (eval echo configure:3563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3563   rm -rf conftest*
3564   am_cv_prog_cc_stdc="$ac_arg"; break
3565 else
3566   echo "configure: failed program was:" >&5
3567   cat conftest.$ac_ext >&5
3568 fi
3569 rm -f conftest*
3570 done
3571 CC="$ac_save_CC"
3572
3573 fi
3574
3575 if test -z "$am_cv_prog_cc_stdc"; then
3576   echo "$ac_t""none needed" 1>&6
3577 else
3578   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3579 fi
3580 case "x$am_cv_prog_cc_stdc" in
3581   x|xno) ;;
3582   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3583 esac
3584
3585 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3586         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3587 fi
3588
3589 # test for make depend flag
3590 OL_MKDEP=
3591 OL_MKDEP_FLAGS=
3592 if test -z "${MKDEP}"; then
3593         OL_MKDEP="${CC-cc}"
3594         if test -z "${MKDEP_FLAGS}"; then
3595                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ${OL_MKDEP} depend flag" >&5
3597 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3598   echo $ac_n "(cached) $ac_c" 1>&6
3599 else
3600   
3601                         ol_cv_mkdep=no
3602                         for flag in "-M" "-xM"; do
3603                                 cat > conftest.c <<EOF
3604  noCode;
3605 EOF
3606                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3607                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3608                                 then
3609                                         if test ! -f conftest."${ac_object}" ; then
3610                                                 ol_cv_mkdep=$flag
3611                                                 OL_MKDEP_FLAGS="$flag"
3612                                                 break
3613                                         fi
3614                                 fi
3615                         done
3616                         rm -f conftest*
3617                 
3618 fi
3619
3620 echo "$ac_t""$ol_cv_mkdep" 1>&6
3621         else
3622                 cc_cv_mkdep=yes
3623                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3624         fi
3625 else
3626         cc_cv_mkdep=yes
3627         OL_MKDEP="${MKDEP}"
3628         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3629 fi
3630
3631
3632
3633 if test "${ol_cv_mkdep}" = no ; then
3634         # this will soon become an error
3635         echo "configure: warning: do not know how to generate dependencies" 1>&2
3636 fi
3637
3638 # test for EBCDIC
3639 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3640 echo "configure:3641: checking for EBCDIC" >&5
3641 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
3642   echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644   
3645         cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648
3649 #if !('M' == 0xd4)
3650 #include <__ASCII__/generate_error.h>
3651 #endif
3652
3653 EOF
3654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3655 { (eval echo configure:3656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3657 if test -z "$ac_err"; then
3658   rm -rf conftest*
3659   ol_cv_cpp_ebcdic=yes
3660 else
3661   echo "$ac_err" >&5
3662   echo "configure: failed program was:" >&5
3663   cat conftest.$ac_ext >&5
3664   rm -rf conftest*
3665   ol_cv_cpp_ebcdic=no
3666 fi
3667 rm -f conftest*
3668 fi
3669
3670 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3671 if test $ol_cv_cpp_ebcdic = yes ; then
3672         cat >> confdefs.h <<\EOF
3673 #define HAVE_EBCDIC 1
3674 EOF
3675
3676 fi
3677
3678 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3679 echo "configure:3680: checking for ANSI C header files" >&5
3680 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
3681   echo $ac_n "(cached) $ac_c" 1>&6
3682 else
3683   cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 #include <stdlib.h>
3687 #include <stdarg.h>
3688 #include <string.h>
3689 #include <float.h>
3690 EOF
3691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3692 { (eval echo configure:3693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3694 if test -z "$ac_err"; then
3695   rm -rf conftest*
3696   ol_cv_header_stdc=yes
3697 else
3698   echo "$ac_err" >&5
3699   echo "configure: failed program was:" >&5
3700   cat conftest.$ac_ext >&5
3701   rm -rf conftest*
3702   ol_cv_header_stdc=no
3703 fi
3704 rm -f conftest*
3705
3706 if test $ol_cv_header_stdc = yes; then
3707   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <string.h>
3712 EOF
3713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3714   egrep "memchr" >/dev/null 2>&1; then
3715   :
3716 else
3717   rm -rf conftest*
3718   ol_cv_header_stdc=no
3719 fi
3720 rm -f conftest*
3721
3722 fi
3723
3724 if test $ol_cv_header_stdc = yes; then
3725   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3726 cat > conftest.$ac_ext <<EOF
3727 #line 3728 "configure"
3728 #include "confdefs.h"
3729 #include <stdlib.h>
3730 EOF
3731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3732   egrep "free" >/dev/null 2>&1; then
3733   :
3734 else
3735   rm -rf conftest*
3736   ol_cv_header_stdc=no
3737 fi
3738 rm -f conftest*
3739
3740 fi
3741
3742 if test $ol_cv_header_stdc = yes; then
3743   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3744 if test "$cross_compiling" = yes; then
3745   :
3746 else
3747   cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750 #include <ctype.h>
3751 #ifndef HAVE_EBCDIC
3752 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3753 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3754 #else
3755 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3756                 || ('j' <= (c) && (c) <= 'r') \
3757                 || ('s' <= (c) && (c) <= 'z'))
3758 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3759 #endif
3760 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3761 int main () { int i; for (i = 0; i < 256; i++)
3762 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3763 exit (0); }
3764
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3767 then
3768   :
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -fr conftest*
3773   ol_cv_header_stdc=no
3774 fi
3775 rm -fr conftest*
3776 fi
3777
3778 fi
3779 fi
3780
3781 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3782 if test $ol_cv_header_stdc = yes; then
3783   cat >> confdefs.h <<\EOF
3784 #define STDC_HEADERS 1
3785 EOF
3786
3787 fi
3788 ac_cv_header_stdc=disable
3789
3790
3791 if test $ol_cv_header_stdc != yes; then
3792         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3793 fi
3794
3795 ac_header_dirent=no
3796 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3797 do
3798 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3799 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3800 echo "configure:3801: checking for $ac_hdr that defines DIR" >&5
3801 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3802   echo $ac_n "(cached) $ac_c" 1>&6
3803 else
3804   cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 #include <sys/types.h>
3808 #include <$ac_hdr>
3809 int main() {
3810 DIR *dirp = 0;
3811 ; return 0; }
3812 EOF
3813 if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3814   rm -rf conftest*
3815   eval "ac_cv_header_dirent_$ac_safe=yes"
3816 else
3817   echo "configure: failed program was:" >&5
3818   cat conftest.$ac_ext >&5
3819   rm -rf conftest*
3820   eval "ac_cv_header_dirent_$ac_safe=no"
3821 fi
3822 rm -f conftest*
3823 fi
3824 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3825   echo "$ac_t""yes" 1>&6
3826     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3827   cat >> confdefs.h <<EOF
3828 #define $ac_tr_hdr 1
3829 EOF
3830  ac_header_dirent=$ac_hdr; break
3831 else
3832   echo "$ac_t""no" 1>&6
3833 fi
3834 done
3835 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3836 if test $ac_header_dirent = dirent.h; then
3837 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3838 echo "configure:3839: checking for opendir in -ldir" >&5
3839 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3841   echo $ac_n "(cached) $ac_c" 1>&6
3842 else
3843   ac_save_LIBS="$LIBS"
3844 LIBS="-ldir  $LIBS"
3845 cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848 /* Override any gcc2 internal prototype to avoid an error.  */
3849 /* We use char because int might match the return type of a gcc2
3850     builtin and then its argument prototype would still apply.  */
3851 char opendir();
3852
3853 int main() {
3854 opendir()
3855 ; return 0; }
3856 EOF
3857 if { (eval echo configure:3858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3858   rm -rf conftest*
3859   eval "ac_cv_lib_$ac_lib_var=yes"
3860 else
3861   echo "configure: failed program was:" >&5
3862   cat conftest.$ac_ext >&5
3863   rm -rf conftest*
3864   eval "ac_cv_lib_$ac_lib_var=no"
3865 fi
3866 rm -f conftest*
3867 LIBS="$ac_save_LIBS"
3868
3869 fi
3870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3871   echo "$ac_t""yes" 1>&6
3872   LIBS="$LIBS -ldir"
3873 else
3874   echo "$ac_t""no" 1>&6
3875 fi
3876
3877 else
3878 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3879 echo "configure:3880: checking for opendir in -lx" >&5
3880 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3881 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3882   echo $ac_n "(cached) $ac_c" 1>&6
3883 else
3884   ac_save_LIBS="$LIBS"
3885 LIBS="-lx  $LIBS"
3886 cat > conftest.$ac_ext <<EOF
3887 #line 3888 "configure"
3888 #include "confdefs.h"
3889 /* Override any gcc2 internal prototype to avoid an error.  */
3890 /* We use char because int might match the return type of a gcc2
3891     builtin and then its argument prototype would still apply.  */
3892 char opendir();
3893
3894 int main() {
3895 opendir()
3896 ; return 0; }
3897 EOF
3898 if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3899   rm -rf conftest*
3900   eval "ac_cv_lib_$ac_lib_var=yes"
3901 else
3902   echo "configure: failed program was:" >&5
3903   cat conftest.$ac_ext >&5
3904   rm -rf conftest*
3905   eval "ac_cv_lib_$ac_lib_var=no"
3906 fi
3907 rm -f conftest*
3908 LIBS="$ac_save_LIBS"
3909
3910 fi
3911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3912   echo "$ac_t""yes" 1>&6
3913   LIBS="$LIBS -lx"
3914 else
3915   echo "$ac_t""no" 1>&6
3916 fi
3917
3918 fi
3919
3920 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3921 echo "configure:3922: checking for sys/wait.h that is POSIX.1 compatible" >&5
3922 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928 #include <sys/types.h>
3929 #include <sys/wait.h>
3930 #ifndef WEXITSTATUS
3931 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3932 #endif
3933 #ifndef WIFEXITED
3934 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3935 #endif
3936 int main() {
3937 int s;
3938 wait (&s);
3939 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3940 ; return 0; }
3941 EOF
3942 if { (eval echo configure:3943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3943   rm -rf conftest*
3944   ac_cv_header_sys_wait_h=yes
3945 else
3946   echo "configure: failed program was:" >&5
3947   cat conftest.$ac_ext >&5
3948   rm -rf conftest*
3949   ac_cv_header_sys_wait_h=no
3950 fi
3951 rm -f conftest*
3952 fi
3953
3954 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3955 if test $ac_cv_header_sys_wait_h = yes; then
3956   cat >> confdefs.h <<\EOF
3957 #define HAVE_SYS_WAIT_H 1
3958 EOF
3959
3960 fi
3961
3962 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
3963 echo "configure:3964: checking POSIX termios" >&5
3964 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
3965   echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967   cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 #include <sys/types.h>
3971 #include <unistd.h>
3972 #include <termios.h>
3973 int main() {
3974 /* SunOS 4.0.3 has termios.h but not the library calls.  */
3975    tcgetattr(0, 0);
3976 ; return 0; }
3977 EOF
3978 if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3979   rm -rf conftest*
3980   am_cv_sys_posix_termios=yes
3981 else
3982   echo "configure: failed program was:" >&5
3983   cat conftest.$ac_ext >&5
3984   rm -rf conftest*
3985   am_cv_sys_posix_termios=no
3986 fi
3987 rm -f conftest*
3988 fi
3989
3990 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
3991
3992
3993  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
3994 echo "configure:3995: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
3995 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
3999
4000   gwinsz_in_termios_h=no
4001   if test $am_cv_sys_posix_termios = yes; then
4002     cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 #include <sys/types.h>
4006 #     include <termios.h>
4007 #     ifdef TIOCGWINSZ
4008         yes
4009 #     endif
4010     
4011 EOF
4012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4013   egrep "yes" >/dev/null 2>&1; then
4014   rm -rf conftest*
4015   gwinsz_in_termios_h=yes
4016 fi
4017 rm -f conftest*
4018
4019   fi
4020
4021   if test $gwinsz_in_termios_h = no; then
4022     cat > conftest.$ac_ext <<EOF
4023 #line 4024 "configure"
4024 #include "confdefs.h"
4025 #include <sys/types.h>
4026 #     include <sys/ioctl.h>
4027 #     ifdef TIOCGWINSZ
4028         yes
4029 #     endif
4030     
4031 EOF
4032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4033   egrep "yes" >/dev/null 2>&1; then
4034   rm -rf conftest*
4035   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4036 fi
4037 rm -f conftest*
4038
4039   fi
4040   
4041 fi
4042
4043 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4044   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4045     cat >> confdefs.h <<\EOF
4046 #define GWINSZ_IN_SYS_IOCTL 1
4047 EOF
4048
4049   fi
4050
4051 if test $am_cv_sys_posix_termios = yes ; then
4052         cat >> confdefs.h <<\EOF
4053 #define HAVE_POSIX_TERMIOS 1
4054 EOF
4055
4056 fi
4057
4058 for ac_hdr in \
4059         arpa/inet.h             \
4060         arpa/nameser.h  \
4061         assert.h                \
4062         crypt.h                 \
4063         errno.h                 \
4064         fcntl.h                 \
4065         filio.h                 \
4066         getopt.h                \
4067         grp.h                   \
4068         libutil.h               \
4069         limits.h                \
4070         locale.h                \
4071         netinet/tcp.h   \
4072         malloc.h                \
4073         memory.h                \
4074         psap.h                  \
4075         pwd.h                   \
4076         resolv.h                \
4077         sgtty.h                 \
4078         shadow.h                \
4079         stdarg.h                \
4080         stddef.h                \
4081         string.h                \
4082         strings.h               \
4083         sysexits.h              \
4084         sys/file.h              \
4085         sys/filio.h             \
4086         sys/errno.h             \
4087         sys/ioctl.h             \
4088         sys/param.h             \
4089         sys/resource.h  \
4090         sys/select.h    \
4091         sys/socket.h    \
4092         sys/syslog.h    \
4093         sys/time.h              \
4094         sys/types.h             \
4095         syslog.h                \
4096         termios.h               \
4097         unistd.h                \
4098
4099 do
4100 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4101 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4102 echo "configure:4103: checking for $ac_hdr" >&5
4103 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4104   echo $ac_n "(cached) $ac_c" 1>&6
4105 else
4106   cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109 #include <$ac_hdr>
4110 EOF
4111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4112 { (eval echo configure:4113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4114 if test -z "$ac_err"; then
4115   rm -rf conftest*
4116   eval "ac_cv_header_$ac_safe=yes"
4117 else
4118   echo "$ac_err" >&5
4119   echo "configure: failed program was:" >&5
4120   cat conftest.$ac_ext >&5
4121   rm -rf conftest*
4122   eval "ac_cv_header_$ac_safe=no"
4123 fi
4124 rm -f conftest*
4125 fi
4126 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4127   echo "$ac_t""yes" 1>&6
4128     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4129   cat >> confdefs.h <<EOF
4130 #define $ac_tr_hdr 1
4131 EOF
4132  
4133 else
4134   echo "$ac_t""no" 1>&6
4135 fi
4136 done
4137
4138
4139
4140
4141 echo $ac_n "checking for socket""... $ac_c" 1>&6
4142 echo "configure:4143: checking for socket" >&5
4143 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
4144   echo $ac_n "(cached) $ac_c" 1>&6
4145 else
4146   cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 /* System header to define __stub macros and hopefully few prototypes,
4150     which can conflict with char socket(); below.  */
4151 #include <assert.h>
4152 /* Override any gcc2 internal prototype to avoid an error.  */
4153 /* We use char because int might match the return type of a gcc2
4154     builtin and then its argument prototype would still apply.  */
4155 char socket();
4156
4157 int main() {
4158
4159 /* The GNU C library defines this for functions which it implements
4160     to always fail with ENOSYS.  Some functions are actually named
4161     something starting with __ and the normal name is an alias.  */
4162 #if defined (__stub_socket) || defined (__stub___socket)
4163 choke me
4164 #else
4165 socket();
4166 #endif
4167
4168 ; return 0; }
4169 EOF
4170 if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4171   rm -rf conftest*
4172   eval "ac_cv_func_socket=yes"
4173 else
4174   echo "configure: failed program was:" >&5
4175   cat conftest.$ac_ext >&5
4176   rm -rf conftest*
4177   eval "ac_cv_func_socket=no"
4178 fi
4179 rm -f conftest*
4180 fi
4181
4182 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4183   echo "$ac_t""yes" 1>&6
4184   :
4185 else
4186   echo "$ac_t""no" 1>&6
4187         
4188         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4189 echo "configure:4190: checking for main in -lsocket" >&5
4190 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4191 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   ac_save_LIBS="$LIBS"
4195 LIBS="-lsocket  $LIBS"
4196 cat > conftest.$ac_ext <<EOF
4197 #line 4198 "configure"
4198 #include "confdefs.h"
4199
4200 int main() {
4201 main()
4202 ; return 0; }
4203 EOF
4204 if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4205   rm -rf conftest*
4206   eval "ac_cv_lib_$ac_lib_var=yes"
4207 else
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_lib_$ac_lib_var=no"
4212 fi
4213 rm -f conftest*
4214 LIBS="$ac_save_LIBS"
4215
4216 fi
4217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4218   echo "$ac_t""yes" 1>&6
4219     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4221   cat >> confdefs.h <<EOF
4222 #define $ac_tr_lib 1
4223 EOF
4224
4225   LIBS="-lsocket $LIBS"
4226
4227 else
4228   echo "$ac_t""no" 1>&6
4229 fi
4230
4231         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4232 echo "configure:4233: checking for main in -lnet" >&5
4233 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
4234 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4235   echo $ac_n "(cached) $ac_c" 1>&6
4236 else
4237   ac_save_LIBS="$LIBS"
4238 LIBS="-lnet  $LIBS"
4239 cat > conftest.$ac_ext <<EOF
4240 #line 4241 "configure"
4241 #include "confdefs.h"
4242
4243 int main() {
4244 main()
4245 ; return 0; }
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4248   rm -rf conftest*
4249   eval "ac_cv_lib_$ac_lib_var=yes"
4250 else
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -rf conftest*
4254   eval "ac_cv_lib_$ac_lib_var=no"
4255 fi
4256 rm -f conftest*
4257 LIBS="$ac_save_LIBS"
4258
4259 fi
4260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4261   echo "$ac_t""yes" 1>&6
4262     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4263     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4264   cat >> confdefs.h <<EOF
4265 #define $ac_tr_lib 1
4266 EOF
4267
4268   LIBS="-lnet $LIBS"
4269
4270 else
4271   echo "$ac_t""no" 1>&6
4272 fi
4273
4274         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4275 echo "configure:4276: checking for socket in -lnet" >&5
4276 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
4277 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   ac_save_LIBS="$LIBS"
4281 LIBS="-lnet  $LIBS"
4282 cat > conftest.$ac_ext <<EOF
4283 #line 4284 "configure"
4284 #include "confdefs.h"
4285 /* Override any gcc2 internal prototype to avoid an error.  */
4286 /* We use char because int might match the return type of a gcc2
4287     builtin and then its argument prototype would still apply.  */
4288 char socket();
4289
4290 int main() {
4291 socket()
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 main in -lnsl_s""... $ac_c" 1>&6
4322 echo "configure:4323: checking for main in -lnsl_s" >&5
4323 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
4324 if eval "test \"`echo '$''{'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="-lnsl_s  $LIBS"
4329 cat > conftest.$ac_ext <<EOF
4330 #line 4331 "configure"
4331 #include "confdefs.h"
4332
4333 int main() {
4334 main()
4335 ; return 0; }
4336 EOF
4337 if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4338   rm -rf conftest*
4339   eval "ac_cv_lib_$ac_lib_var=yes"
4340 else
4341   echo "configure: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   rm -rf conftest*
4344   eval "ac_cv_lib_$ac_lib_var=no"
4345 fi
4346 rm -f conftest*
4347 LIBS="$ac_save_LIBS"
4348
4349 fi
4350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4351   echo "$ac_t""yes" 1>&6
4352     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4353     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4354   cat >> confdefs.h <<EOF
4355 #define $ac_tr_lib 1
4356 EOF
4357
4358   LIBS="-lnsl_s $LIBS"
4359
4360 else
4361   echo "$ac_t""no" 1>&6
4362 fi
4363
4364         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4365 echo "configure:4366: checking for main in -lnsl" >&5
4366 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4368   echo $ac_n "(cached) $ac_c" 1>&6
4369 else
4370   ac_save_LIBS="$LIBS"
4371 LIBS="-lnsl  $LIBS"
4372 cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4375
4376 int main() {
4377 main()
4378 ; return 0; }
4379 EOF
4380 if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4381   rm -rf conftest*
4382   eval "ac_cv_lib_$ac_lib_var=yes"
4383 else
4384   echo "configure: failed program was:" >&5
4385   cat conftest.$ac_ext >&5
4386   rm -rf conftest*
4387   eval "ac_cv_lib_$ac_lib_var=no"
4388 fi
4389 rm -f conftest*
4390 LIBS="$ac_save_LIBS"
4391
4392 fi
4393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4394   echo "$ac_t""yes" 1>&6
4395     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4396     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4397   cat >> confdefs.h <<EOF
4398 #define $ac_tr_lib 1
4399 EOF
4400
4401   LIBS="-lnsl $LIBS"
4402
4403 else
4404   echo "$ac_t""no" 1>&6
4405 fi
4406
4407         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4408 echo "configure:4409: checking for socket in -linet" >&5
4409 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
4410 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4411   echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413   ac_save_LIBS="$LIBS"
4414 LIBS="-linet  $LIBS"
4415 cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 /* Override any gcc2 internal prototype to avoid an error.  */
4419 /* We use char because int might match the return type of a gcc2
4420     builtin and then its argument prototype would still apply.  */
4421 char socket();
4422
4423 int main() {
4424 socket()
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 inet | 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="-linet $LIBS"
4449
4450 else
4451   echo "$ac_t""no" 1>&6
4452 fi
4453
4454         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4455 echo "configure:4456: checking for main in -lgen" >&5
4456 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
4457 if eval "test \"`echo '$''{'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="-lgen  $LIBS"
4462 cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465
4466 int main() {
4467 main()
4468 ; return 0; }
4469 EOF
4470 if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4471   rm -rf conftest*
4472   eval "ac_cv_lib_$ac_lib_var=yes"
4473 else
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -rf conftest*
4477   eval "ac_cv_lib_$ac_lib_var=no"
4478 fi
4479 rm -f conftest*
4480 LIBS="$ac_save_LIBS"
4481
4482 fi
4483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4484   echo "$ac_t""yes" 1>&6
4485     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4486     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4487   cat >> confdefs.h <<EOF
4488 #define $ac_tr_lib 1
4489 EOF
4490
4491   LIBS="-lgen $LIBS"
4492
4493 else
4494   echo "$ac_t""no" 1>&6
4495 fi
4496
4497
4498 fi
4499
4500
4501 echo $ac_n "checking for select""... $ac_c" 1>&6
4502 echo "configure:4503: checking for select" >&5
4503 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 /* System header to define __stub macros and hopefully few prototypes,
4510     which can conflict with char select(); below.  */
4511 #include <assert.h>
4512 /* Override any gcc2 internal prototype to avoid an error.  */
4513 /* We use char because int might match the return type of a gcc2
4514     builtin and then its argument prototype would still apply.  */
4515 char select();
4516
4517 int main() {
4518
4519 /* The GNU C library defines this for functions which it implements
4520     to always fail with ENOSYS.  Some functions are actually named
4521     something starting with __ and the normal name is an alias.  */
4522 #if defined (__stub_select) || defined (__stub___select)
4523 choke me
4524 #else
4525 select();
4526 #endif
4527
4528 ; return 0; }
4529 EOF
4530 if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4531   rm -rf conftest*
4532   eval "ac_cv_func_select=yes"
4533 else
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -rf conftest*
4537   eval "ac_cv_func_select=no"
4538 fi
4539 rm -f conftest*
4540 fi
4541
4542 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4543   echo "$ac_t""yes" 1>&6
4544   :
4545 else
4546   echo "$ac_t""no" 1>&6
4547 { echo "configure: error: select() required." 1>&2; exit 1; }
4548 fi
4549
4550
4551 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4552 echo "configure:4553: checking types of arguments for select()" >&5
4553  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4563      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4564       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4565        cat > conftest.$ac_ext <<EOF
4566 #line 4567 "configure"
4567 #include "confdefs.h"
4568 #ifdef HAVE_SYS_TYPES_H
4569 #include <sys/types.h>
4570 #endif
4571 #ifdef HAVE_SYS_TIME_H
4572 #include <sys/time.h>
4573 #endif
4574 #ifdef HAVE_SYS_SELECT_H
4575 #include <sys/select.h>
4576 #endif
4577 #ifdef HAVE_SYS_SOCKET_H
4578 #include <sys/socket.h>
4579 #endif
4580 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);
4581 int main() {
4582
4583 ; return 0; }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4586   rm -rf conftest*
4587           ac_not_found=no ; break 3
4588 else
4589   echo "configure: failed program was:" >&5
4590   cat conftest.$ac_ext >&5
4591   rm -rf conftest*
4592   ac_not_found=yes
4593 fi
4594 rm -f conftest*
4595       done
4596      done
4597     done
4598    
4599 fi
4600   
4601 fi
4602  
4603 fi
4604  if test "$ac_not_found" = yes; then
4605   ac_cv_func_select_arg1=int 
4606   ac_cv_func_select_arg234='int *' 
4607   ac_cv_func_select_arg5='struct timeval *'
4608  fi
4609  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4610  cat >> confdefs.h <<EOF
4611 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4612 EOF
4613
4614  cat >> confdefs.h <<EOF
4615 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4616 EOF
4617
4618  cat >> confdefs.h <<EOF
4619 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4620 EOF
4621
4622
4623
4624
4625 for ac_hdr in regex.h 
4626 do
4627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4629 echo "configure:4630: checking for $ac_hdr" >&5
4630 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 #include <$ac_hdr>
4637 EOF
4638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4639 { (eval echo configure:4640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4641 if test -z "$ac_err"; then
4642   rm -rf conftest*
4643   eval "ac_cv_header_$ac_safe=yes"
4644 else
4645   echo "$ac_err" >&5
4646   echo "configure: failed program was:" >&5
4647   cat conftest.$ac_ext >&5
4648   rm -rf conftest*
4649   eval "ac_cv_header_$ac_safe=no"
4650 fi
4651 rm -f conftest*
4652 fi
4653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4656   cat >> confdefs.h <<EOF
4657 #define $ac_tr_hdr 1
4658 EOF
4659  
4660 else
4661   echo "$ac_t""no" 1>&6
4662 fi
4663 done
4664
4665 if test "$ac_cv_header_regex_h" != yes ; then
4666         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4667 fi
4668 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4669 echo "configure:4670: checking for regfree" >&5
4670 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
4671   echo $ac_n "(cached) $ac_c" 1>&6
4672 else
4673   cat > conftest.$ac_ext <<EOF
4674 #line 4675 "configure"
4675 #include "confdefs.h"
4676 /* System header to define __stub macros and hopefully few prototypes,
4677     which can conflict with char regfree(); below.  */
4678 #include <assert.h>
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 /* We use char because int might match the return type of a gcc2
4681     builtin and then its argument prototype would still apply.  */
4682 char regfree();
4683
4684 int main() {
4685
4686 /* The GNU C library defines this for functions which it implements
4687     to always fail with ENOSYS.  Some functions are actually named
4688     something starting with __ and the normal name is an alias.  */
4689 #if defined (__stub_regfree) || defined (__stub___regfree)
4690 choke me
4691 #else
4692 regfree();
4693 #endif
4694
4695 ; return 0; }
4696 EOF
4697 if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4698   rm -rf conftest*
4699   eval "ac_cv_func_regfree=yes"
4700 else
4701   echo "configure: failed program was:" >&5
4702   cat conftest.$ac_ext >&5
4703   rm -rf conftest*
4704   eval "ac_cv_func_regfree=no"
4705 fi
4706 rm -f conftest*
4707 fi
4708
4709 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711   :
4712 else
4713   echo "$ac_t""no" 1>&6
4714 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4715 fi
4716
4717
4718
4719 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4720 echo "configure:4721: checking for compatible POSIX regex" >&5
4721 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
4722   echo $ac_n "(cached) $ac_c" 1>&6
4723 else
4724   
4725         if test "$cross_compiling" = yes; then
4726   ol_cv_c_posix_regex=cross
4727 else
4728   cat > conftest.$ac_ext <<EOF
4729 #line 4730 "configure"
4730 #include "confdefs.h"
4731
4732 #include <sys/types.h>
4733 #include <regex.h>
4734 static char *pattern, *string;
4735 main()
4736 {
4737         int rc;
4738         regex_t re;
4739
4740         pattern = "^A";
4741
4742         if(regcomp(&re, pattern, 0)) {
4743                 return -1;
4744         }
4745         
4746         string = "ALL MATCH";
4747         
4748         rc = regexec(&re, string, 0, (void*)0, 0);
4749
4750         regfree(&re);
4751
4752         return rc;
4753 }
4754 EOF
4755 if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4756 then
4757   ol_cv_c_posix_regex=yes
4758 else
4759   echo "configure: failed program was:" >&5
4760   cat conftest.$ac_ext >&5
4761   rm -fr conftest*
4762   ol_cv_c_posix_regex=no
4763 fi
4764 rm -fr conftest*
4765 fi
4766
4767 fi
4768
4769 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4770
4771 if test "$ol_cv_c_posix_regex" = no ; then
4772         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4773 fi
4774
4775
4776 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4777 echo "configure:4778: checking for sigset in -lV3" >&5
4778 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
4779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   ac_save_LIBS="$LIBS"
4783 LIBS="-lV3  $LIBS"
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 /* Override any gcc2 internal prototype to avoid an error.  */
4788 /* We use char because int might match the return type of a gcc2
4789     builtin and then its argument prototype would still apply.  */
4790 char sigset();
4791
4792 int main() {
4793 sigset()
4794 ; return 0; }
4795 EOF
4796 if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4797   rm -rf conftest*
4798   eval "ac_cv_lib_$ac_lib_var=yes"
4799 else
4800   echo "configure: failed program was:" >&5
4801   cat conftest.$ac_ext >&5
4802   rm -rf conftest*
4803   eval "ac_cv_lib_$ac_lib_var=no"
4804 fi
4805 rm -f conftest*
4806 LIBS="$ac_save_LIBS"
4807
4808 fi
4809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4810   echo "$ac_t""yes" 1>&6
4811     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4812     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4813   cat >> confdefs.h <<EOF
4814 #define $ac_tr_lib 1
4815 EOF
4816
4817   LIBS="-lV3 $LIBS"
4818
4819 else
4820   echo "$ac_t""no" 1>&6
4821 fi
4822
4823
4824
4825 # find res_search
4826 if test $ol_enable_dns != no ; then
4827                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4828 echo "configure:4829: checking for res_search" >&5
4829 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832   cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 /* System header to define __stub macros and hopefully few prototypes,
4836     which can conflict with char res_search(); below.  */
4837 #include <assert.h>
4838 /* Override any gcc2 internal prototype to avoid an error.  */
4839 /* We use char because int might match the return type of a gcc2
4840     builtin and then its argument prototype would still apply.  */
4841 char res_search();
4842
4843 int main() {
4844
4845 /* The GNU C library defines this for functions which it implements
4846     to always fail with ENOSYS.  Some functions are actually named
4847     something starting with __ and the normal name is an alias.  */
4848 #if defined (__stub_res_search) || defined (__stub___res_search)
4849 choke me
4850 #else
4851 res_search();
4852 #endif
4853
4854 ; return 0; }
4855 EOF
4856 if { (eval echo configure:4857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4857   rm -rf conftest*
4858   eval "ac_cv_func_res_search=yes"
4859 else
4860   echo "configure: failed program was:" >&5
4861   cat conftest.$ac_ext >&5
4862   rm -rf conftest*
4863   eval "ac_cv_func_res_search=no"
4864 fi
4865 rm -f conftest*
4866 fi
4867
4868 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4869   echo "$ac_t""yes" 1>&6
4870   :
4871 else
4872   echo "$ac_t""no" 1>&6
4873 fi
4874
4875         if test $ac_cv_func_res_search = no ; then 
4876                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4877 echo "configure:4878: checking for res_search in -lbind" >&5
4878 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
4879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4880   echo $ac_n "(cached) $ac_c" 1>&6
4881 else
4882   ac_save_LIBS="$LIBS"
4883 LIBS="-lbind  $LIBS"
4884 cat > conftest.$ac_ext <<EOF
4885 #line 4886 "configure"
4886 #include "confdefs.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
4892 int main() {
4893 res_search()
4894 ; return 0; }
4895 EOF
4896 if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4897   rm -rf conftest*
4898   eval "ac_cv_lib_$ac_lib_var=yes"
4899 else
4900   echo "configure: failed program was:" >&5
4901   cat conftest.$ac_ext >&5
4902   rm -rf conftest*
4903   eval "ac_cv_lib_$ac_lib_var=no"
4904 fi
4905 rm -f conftest*
4906 LIBS="$ac_save_LIBS"
4907
4908 fi
4909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4910   echo "$ac_t""yes" 1>&6
4911     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4912     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4913   cat >> confdefs.h <<EOF
4914 #define $ac_tr_lib 1
4915 EOF
4916
4917   LIBS="-lbind $LIBS"
4918
4919 else
4920   echo "$ac_t""no" 1>&6
4921 fi
4922
4923                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
4924         fi
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 \"`echo '$''{'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 \"`echo '$''{'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 \"`echo '$''{'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 \"`echo '$''{'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 \"`echo '$''{'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 \"`echo '$''{'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 \"`echo '$''{'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 if test $ol_enable_quipu != no ; then
5261         for ac_hdr in quipu/commonarg.h
5262 do
5263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5265 echo "configure:5266: checking for $ac_hdr" >&5
5266 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 #include <$ac_hdr>
5273 EOF
5274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5275 { (eval echo configure:5276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5277 if test -z "$ac_err"; then
5278   rm -rf conftest*
5279   eval "ac_cv_header_$ac_safe=yes"
5280 else
5281   echo "$ac_err" >&5
5282   echo "configure: failed program was:" >&5
5283   cat conftest.$ac_ext >&5
5284   rm -rf conftest*
5285   eval "ac_cv_header_$ac_safe=no"
5286 fi
5287 rm -f conftest*
5288 fi
5289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5290   echo "$ac_t""yes" 1>&6
5291     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5292   cat >> confdefs.h <<EOF
5293 #define $ac_tr_hdr 1
5294 EOF
5295  
5296 else
5297   echo "$ac_t""no" 1>&6
5298 fi
5299 done
5300
5301
5302         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5303                 BUILD_QUIPU=yes
5304         elif test $ol_enable_quipu = auto ; then
5305                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5306         else
5307                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5308         fi
5309 fi
5310
5311 ol_link_kerberos=no
5312
5313 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5314         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5315 do
5316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5318 echo "configure:5319: checking for $ac_hdr" >&5
5319 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5320   echo $ac_n "(cached) $ac_c" 1>&6
5321 else
5322   cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 #include <$ac_hdr>
5326 EOF
5327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5328 { (eval echo configure:5329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5330 if test -z "$ac_err"; then
5331   rm -rf conftest*
5332   eval "ac_cv_header_$ac_safe=yes"
5333 else
5334   echo "$ac_err" >&5
5335   echo "configure: failed program was:" >&5
5336   cat conftest.$ac_ext >&5
5337   rm -rf conftest*
5338   eval "ac_cv_header_$ac_safe=no"
5339 fi
5340 rm -f conftest*
5341 fi
5342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5343   echo "$ac_t""yes" 1>&6
5344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5345   cat >> confdefs.h <<EOF
5346 #define $ac_tr_hdr 1
5347 EOF
5348  
5349 else
5350   echo "$ac_t""no" 1>&6
5351 fi
5352 done
5353
5354
5355         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5356                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5357 echo "configure:5358: checking for main in -lkrb4" >&5
5358 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
5359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5360   echo $ac_n "(cached) $ac_c" 1>&6
5361 else
5362   ac_save_LIBS="$LIBS"
5363 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5364 cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367
5368 int main() {
5369 main()
5370 ; return 0; }
5371 EOF
5372 if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5373   rm -rf conftest*
5374   eval "ac_cv_lib_$ac_lib_var=yes"
5375 else
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -rf conftest*
5379   eval "ac_cv_lib_$ac_lib_var=no"
5380 fi
5381 rm -f conftest*
5382 LIBS="$ac_save_LIBS"
5383
5384 fi
5385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5386   echo "$ac_t""yes" 1>&6
5387   have_k5=yes
5388 else
5389   echo "$ac_t""no" 1>&6
5390 have_k5=no
5391 fi
5392
5393
5394                 if test $have_k5 = yes ; then
5395                         ol_with_kerberos=found
5396                         ol_link_kerberos=yes
5397
5398                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5399
5400                         LIBS="$KRB_LIBS $LIBS"
5401
5402                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5403 echo "configure:5404: checking for des_debug in Kerberos libraries" >&5
5404 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
5405   echo $ac_n "(cached) $ac_c" 1>&6
5406 else
5407   
5408                                                                 save_LIBS="$LIBS"
5409                                 LIBS="$KRB_LIBS $LIBS"
5410                                 cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5413
5414 #include <kerberosIV/krb.h>
5415 #include <kerberosIV/des.h>
5416 extern int des_debug;
5417
5418 int main() {
5419
5420 des_debug = 1;
5421
5422 ; return 0; }
5423 EOF
5424 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425   rm -rf conftest*
5426   ol_cv_var_des_debug=yes
5427 else
5428   echo "configure: failed program was:" >&5
5429   cat conftest.$ac_ext >&5
5430   rm -rf conftest*
5431   ol_cv_var_des_debug=no
5432 fi
5433 rm -f conftest*
5434                                                                 LIBS="$save_LIBS"
5435                         
5436 fi
5437
5438 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5439
5440                         if test $ol_cv_var_des_debug = yes ; then
5441                                 cat >> confdefs.h <<\EOF
5442 #define HAVE_DES_DEBUG 1
5443 EOF
5444
5445                         fi
5446
5447                         LIBS="$save_LIBS"
5448                 fi
5449         fi
5450 fi
5451
5452 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5453         for ac_hdr in krb.h des.h
5454 do
5455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5457 echo "configure:5458: checking for $ac_hdr" >&5
5458 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5459   echo $ac_n "(cached) $ac_c" 1>&6
5460 else
5461   cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464 #include <$ac_hdr>
5465 EOF
5466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5467 { (eval echo configure:5468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5469 if test -z "$ac_err"; then
5470   rm -rf conftest*
5471   eval "ac_cv_header_$ac_safe=yes"
5472 else
5473   echo "$ac_err" >&5
5474   echo "configure: failed program was:" >&5
5475   cat conftest.$ac_ext >&5
5476   rm -rf conftest*
5477   eval "ac_cv_header_$ac_safe=no"
5478 fi
5479 rm -f conftest*
5480 fi
5481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5482   echo "$ac_t""yes" 1>&6
5483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5484   cat >> confdefs.h <<EOF
5485 #define $ac_tr_hdr 1
5486 EOF
5487  
5488 else
5489   echo "$ac_t""no" 1>&6
5490 fi
5491 done
5492
5493
5494         if test $ac_cv_header_krb_h = yes ; then
5495                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5496 echo "configure:5497: checking for main in -lkrb" >&5
5497 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
5498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5499   echo $ac_n "(cached) $ac_c" 1>&6
5500 else
5501   ac_save_LIBS="$LIBS"
5502 LIBS="-lkrb -ldes $LIBS"
5503 cat > conftest.$ac_ext <<EOF
5504 #line 5505 "configure"
5505 #include "confdefs.h"
5506
5507 int main() {
5508 main()
5509 ; return 0; }
5510 EOF
5511 if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5512   rm -rf conftest*
5513   eval "ac_cv_lib_$ac_lib_var=yes"
5514 else
5515   echo "configure: failed program was:" >&5
5516   cat conftest.$ac_ext >&5
5517   rm -rf conftest*
5518   eval "ac_cv_lib_$ac_lib_var=no"
5519 fi
5520 rm -f conftest*
5521 LIBS="$ac_save_LIBS"
5522
5523 fi
5524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5525   echo "$ac_t""yes" 1>&6
5526   have_k4=yes
5527 else
5528   echo "$ac_t""no" 1>&6
5529 have_k4=no
5530 fi
5531
5532
5533                 if test $have_k4 = yes ; then
5534                         ol_with_kerberos=found
5535                         ol_link_kerberos=yes
5536
5537                         KRB_LIBS="-lkrb -ldes"
5538                 fi
5539         fi
5540 fi
5541
5542 if test $ol_link_kerberos = yes ; then
5543         cat >> confdefs.h <<\EOF
5544 #define HAVE_KERBEROS 1
5545 EOF
5546
5547 fi
5548
5549 ol_link_tls=no
5550 if test $ol_with_tls != no ; then
5551         
5552         for ac_hdr in openssl/ssl.h ssl.h
5553 do
5554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5556 echo "configure:5557: checking for $ac_hdr" >&5
5557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5558   echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560   cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 #include <$ac_hdr>
5564 EOF
5565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5566 { (eval echo configure:5567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5568 if test -z "$ac_err"; then
5569   rm -rf conftest*
5570   eval "ac_cv_header_$ac_safe=yes"
5571 else
5572   echo "$ac_err" >&5
5573   echo "configure: failed program was:" >&5
5574   cat conftest.$ac_ext >&5
5575   rm -rf conftest*
5576   eval "ac_cv_header_$ac_safe=no"
5577 fi
5578 rm -f conftest*
5579 fi
5580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5581   echo "$ac_t""yes" 1>&6
5582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5583   cat >> confdefs.h <<EOF
5584 #define $ac_tr_hdr 1
5585 EOF
5586  
5587 else
5588   echo "$ac_t""no" 1>&6
5589 fi
5590 done
5591
5592         
5593         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5594                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5595 echo "configure:5596: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5596 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
5597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5598   echo $ac_n "(cached) $ac_c" 1>&6
5599 else
5600   ac_save_LIBS="$LIBS"
5601 LIBS="-lssl -lcrypto $LIBS"
5602 cat > conftest.$ac_ext <<EOF
5603 #line 5604 "configure"
5604 #include "confdefs.h"
5605 /* Override any gcc2 internal prototype to avoid an error.  */
5606 /* We use char because int might match the return type of a gcc2
5607     builtin and then its argument prototype would still apply.  */
5608 char SSLeay_add_ssl_algorithms();
5609
5610 int main() {
5611 SSLeay_add_ssl_algorithms()
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615   rm -rf conftest*
5616   eval "ac_cv_lib_$ac_lib_var=yes"
5617 else
5618   echo "configure: failed program was:" >&5
5619   cat conftest.$ac_ext >&5
5620   rm -rf conftest*
5621   eval "ac_cv_lib_$ac_lib_var=no"
5622 fi
5623 rm -f conftest*
5624 LIBS="$ac_save_LIBS"
5625
5626 fi
5627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5628   echo "$ac_t""yes" 1>&6
5629   have_ssleay=yes
5630                         need_rsaref=no
5631 else
5632   echo "$ac_t""no" 1>&6
5633 have_ssleay=no
5634 fi
5635
5636                         
5637                 if test $have_ssleay = no ; then
5638                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5639 echo "configure:5640: checking for SSL_library_init in -lssl" >&5
5640 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
5641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5642   echo $ac_n "(cached) $ac_c" 1>&6
5643 else
5644   ac_save_LIBS="$LIBS"
5645 LIBS="-lssl -lcrypto $LIBS"
5646 cat > conftest.$ac_ext <<EOF
5647 #line 5648 "configure"
5648 #include "confdefs.h"
5649 /* Override any gcc2 internal prototype to avoid an error.  */
5650 /* We use char because int might match the return type of a gcc2
5651     builtin and then its argument prototype would still apply.  */
5652 char SSL_library_init();
5653
5654 int main() {
5655 SSL_library_init()
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=no"
5666 fi
5667 rm -f conftest*
5668 LIBS="$ac_save_LIBS"
5669
5670 fi
5671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5672   echo "$ac_t""yes" 1>&6
5673   have_ssleay=yes
5674                                 need_rsaref=no
5675 else
5676   echo "$ac_t""no" 1>&6
5677 have_ssleay=no
5678 fi
5679
5680                 fi
5681
5682                 if test $have_ssleay = no ; then
5683                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5684 echo "configure:5685: checking for ssl3_accept in -lssl" >&5
5685 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
5686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5687   echo $ac_n "(cached) $ac_c" 1>&6
5688 else
5689   ac_save_LIBS="$LIBS"
5690 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5691 cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694 /* Override any gcc2 internal prototype to avoid an error.  */
5695 /* We use char because int might match the return type of a gcc2
5696     builtin and then its argument prototype would still apply.  */
5697 char ssl3_accept();
5698
5699 int main() {
5700 ssl3_accept()
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=yes"
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   eval "ac_cv_lib_$ac_lib_var=no"
5711 fi
5712 rm -f conftest*
5713 LIBS="$ac_save_LIBS"
5714
5715 fi
5716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5717   echo "$ac_t""yes" 1>&6
5718   have_ssleay=yes
5719                                 need_rsaref=yes
5720 else
5721   echo "$ac_t""no" 1>&6
5722 have_ssleay=no
5723 fi
5724
5725                 fi
5726
5727                 if test $have_ssleay = yes ; then
5728                         ol_with_tls=found
5729                         ol_link_tls=yes
5730
5731                         cat >> confdefs.h <<\EOF
5732 #define HAVE_SSLEAY 1
5733 EOF
5734
5735
5736                         if test $need_rsaref = yes; then
5737                                 cat >> confdefs.h <<\EOF
5738 #define HAVE_RSAREF 1
5739 EOF
5740
5741
5742                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5743                         else
5744                                 TLS_LIBS="-lssl -lcrypto"
5745                         fi
5746                 fi
5747         fi
5748 fi
5749
5750 if test $ol_link_tls = yes ; then
5751         cat >> confdefs.h <<\EOF
5752 #define HAVE_TLS 1
5753 EOF
5754
5755 fi      
5756
5757 for ac_func in \
5758         ctime_r                 \
5759         gethostbyname_r gethostbyaddr_r \
5760
5761 do
5762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5763 echo "configure:5764: checking for $ac_func" >&5
5764 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5765   echo $ac_n "(cached) $ac_c" 1>&6
5766 else
5767   cat > conftest.$ac_ext <<EOF
5768 #line 5769 "configure"
5769 #include "confdefs.h"
5770 /* System header to define __stub macros and hopefully few prototypes,
5771     which can conflict with char $ac_func(); below.  */
5772 #include <assert.h>
5773 /* Override any gcc2 internal prototype to avoid an error.  */
5774 /* We use char because int might match the return type of a gcc2
5775     builtin and then its argument prototype would still apply.  */
5776 char $ac_func();
5777
5778 int main() {
5779
5780 /* The GNU C library defines this for functions which it implements
5781     to always fail with ENOSYS.  Some functions are actually named
5782     something starting with __ and the normal name is an alias.  */
5783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5784 choke me
5785 #else
5786 $ac_func();
5787 #endif
5788
5789 ; return 0; }
5790 EOF
5791 if { (eval echo configure:5792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5792   rm -rf conftest*
5793   eval "ac_cv_func_$ac_func=yes"
5794 else
5795   echo "configure: failed program was:" >&5
5796   cat conftest.$ac_ext >&5
5797   rm -rf conftest*
5798   eval "ac_cv_func_$ac_func=no"
5799 fi
5800 rm -f conftest*
5801 fi
5802
5803 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5804   echo "$ac_t""yes" 1>&6
5805     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5806   cat >> confdefs.h <<EOF
5807 #define $ac_tr_func 1
5808 EOF
5809  
5810 else
5811   echo "$ac_t""no" 1>&6
5812 fi
5813 done
5814
5815
5816 if test "$ac_cv_func_ctime_r" = no ; then
5817         ol_cv_func_ctime_r_nargs=0
5818 else
5819         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5820 echo "configure:5821: checking number of arguments of ctime_r" >&5
5821 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
5822   echo $ac_n "(cached) $ac_c" 1>&6
5823 else
5824   cat > conftest.$ac_ext <<EOF
5825 #line 5826 "configure"
5826 #include "confdefs.h"
5827 #include <time.h>
5828 int main() {
5829 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5830 ; return 0; }
5831 EOF
5832 if { (eval echo configure:5833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5833   rm -rf conftest*
5834   ol_cv_func_ctime_r_nargs=3
5835 else
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   cat > conftest.$ac_ext <<EOF
5840 #line 5841 "configure"
5841 #include "confdefs.h"
5842 #include <time.h>
5843 int main() {
5844 time_t ti; char *buffer; ctime_r(&ti,buffer);
5845 ; return 0; }
5846 EOF
5847 if { (eval echo configure:5848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5848   rm -rf conftest*
5849   ol_cv_func_ctime_r_nargs=2
5850 else
5851   echo "configure: failed program was:" >&5
5852   cat conftest.$ac_ext >&5
5853   rm -rf conftest*
5854   ol_cv_func_ctime_r_nargs=0
5855 fi
5856 rm -f conftest*
5857 fi
5858 rm -f conftest*
5859 fi
5860
5861 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5862   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5863     cat >> confdefs.h <<EOF
5864 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5865 EOF
5866
5867   fi
5868
5869 fi
5870
5871 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5872         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5873 echo "configure:5874: checking number of arguments of gethostbyname_r" >&5
5874 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
5875   echo $ac_n "(cached) $ac_c" 1>&6
5876 else
5877   cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880 #include <sys/types.h>
5881 #include <sys/socket.h>
5882 #include <netinet/in.h>
5883 #include <netdb.h>
5884 #define BUFSIZE (sizeof(struct hostent)+10)
5885 int main() {
5886 struct hostent hent; char buffer[BUFSIZE];
5887                 int bufsize=BUFSIZE;int h_errno;
5888                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5889                         buffer, bufsize, &h_errno);
5890 ; return 0; }
5891 EOF
5892 if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5893   rm -rf conftest*
5894   ol_cv_func_gethostbyname_r_nargs=5
5895 else
5896   echo "configure: failed program was:" >&5
5897   cat conftest.$ac_ext >&5
5898   rm -rf conftest*
5899   cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 #include <sys/types.h>
5903 #include <sys/socket.h>
5904 #include <netinet/in.h>
5905 #include <netdb.h>
5906 #define BUFSIZE (sizeof(struct hostent)+10)
5907 int main() {
5908 struct hostent hent;struct hostent *rhent;
5909                         char buffer[BUFSIZE];
5910                         int bufsize=BUFSIZE;int h_errno;
5911                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5912                                 &rhent, &h_errno);
5913 ; return 0; }
5914 EOF
5915 if { (eval echo configure:5916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5916   rm -rf conftest*
5917   ol_cv_func_gethostbyname_r_nargs=6
5918 else
5919   echo "configure: failed program was:" >&5
5920   cat conftest.$ac_ext >&5
5921   rm -rf conftest*
5922   ol_cv_func_gethostbyname_r_nargs=0
5923 fi
5924 rm -f conftest*
5925 fi
5926 rm -f conftest*
5927 fi
5928
5929 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5930   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5931         cat >> confdefs.h <<EOF
5932 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5933 EOF
5934
5935   fi
5936
5937 else
5938         ol_cv_func_gethostbyname_r_nargs=0
5939 fi
5940  
5941 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5942         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5943 echo "configure:5944: checking number of arguments of gethostbyaddr_r" >&5
5944 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
5945   echo $ac_n "(cached) $ac_c" 1>&6
5946 else
5947   cat > conftest.$ac_ext <<EOF
5948 #line 5949 "configure"
5949 #include "confdefs.h"
5950 #include <sys/types.h>
5951 #include <sys/socket.h>
5952 #include <netinet/in.h>
5953 #include <netdb.h>
5954 #define BUFSIZE (sizeof(struct hostent)+10)
5955 int main() {
5956 struct hostent hent; char buffer[BUFSIZE]; 
5957             struct in_addr add;
5958             size_t alen=sizeof(struct in_addr);
5959             int bufsize=BUFSIZE;int h_errno;
5960                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5961                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5962 ; return 0; }
5963 EOF
5964 if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5965   rm -rf conftest*
5966   ol_cv_func_gethostbyaddr_r_nargs=7
5967 else
5968   echo "configure: failed program was:" >&5
5969   cat conftest.$ac_ext >&5
5970   rm -rf conftest*
5971   cat > conftest.$ac_ext <<EOF
5972 #line 5973 "configure"
5973 #include "confdefs.h"
5974 #include <sys/types.h>
5975 #include <sys/socket.h>
5976 #include <netinet/in.h>
5977 #include <netdb.h>
5978 #define BUFSIZE (sizeof(struct hostent)+10)
5979 int main() {
5980 struct hostent hent;
5981                         struct hostent *rhent; char buffer[BUFSIZE]; 
5982                         struct in_addr add;
5983                         size_t alen=sizeof(struct in_addr);
5984                         int bufsize=BUFSIZE;int h_errno;
5985                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5986                                 alen, AF_INET, &hent, buffer, bufsize, 
5987                                 &rhent, &h_errno);
5988 ; return 0; }
5989 EOF
5990 if { (eval echo configure:5991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5991   rm -rf conftest*
5992   ol_cv_func_gethostbyaddr_r_nargs=8
5993 else
5994   echo "configure: failed program was:" >&5
5995   cat conftest.$ac_ext >&5
5996   rm -rf conftest*
5997   ol_cv_func_gethostbyaddr_r_nargs=0
5998 fi
5999 rm -f conftest*
6000 fi
6001 rm -f conftest*
6002 fi
6003
6004 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6005   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6006     cat >> confdefs.h <<EOF
6007 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6008 EOF
6009
6010   fi
6011
6012 else
6013         ol_cv_func_gethostbyaddr_r_nargs=0
6014 fi
6015
6016 if test "$ac_cv_func_ctime_r" = yes \
6017         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6018         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6019         -a "$ac_cv_func_gethostbyname_r" = yes \
6020         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6021         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6022         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6023         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6024         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6025         ; then
6026  
6027         cat >> confdefs.h <<\EOF
6028 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6029 EOF
6030
6031 fi
6032
6033 ol_link_threads=no
6034 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6035         -o $ol_with_threads = posix ; then
6036
6037         for ac_hdr in pthread.h sched.h
6038 do
6039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6041 echo "configure:6042: checking for $ac_hdr" >&5
6042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6043   echo $ac_n "(cached) $ac_c" 1>&6
6044 else
6045   cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 #include <$ac_hdr>
6049 EOF
6050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6051 { (eval echo configure:6052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6053 if test -z "$ac_err"; then
6054   rm -rf conftest*
6055   eval "ac_cv_header_$ac_safe=yes"
6056 else
6057   echo "$ac_err" >&5
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   eval "ac_cv_header_$ac_safe=no"
6062 fi
6063 rm -f conftest*
6064 fi
6065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6066   echo "$ac_t""yes" 1>&6
6067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6068   cat >> confdefs.h <<EOF
6069 #define $ac_tr_hdr 1
6070 EOF
6071  
6072 else
6073   echo "$ac_t""no" 1>&6
6074 fi
6075 done
6076
6077
6078         if test $ac_cv_header_pthread_h = yes ; then
6079                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6080 echo "configure:6081: checking POSIX thread version" >&5
6081 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
6082   echo $ac_n "(cached) $ac_c" 1>&6
6083 else
6084   
6085         cat > conftest.$ac_ext <<EOF
6086 #line 6087 "configure"
6087 #include "confdefs.h"
6088
6089 #               include <pthread.h>
6090                 /* this check could be improved */
6091 #               ifdef PTHREAD_ONCE_INIT
6092                         pthread_version_final
6093 #               endif
6094         
6095 EOF
6096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6097   egrep "pthread_version_final" >/dev/null 2>&1; then
6098   rm -rf conftest*
6099   ol_pthread_final=yes
6100 else
6101   rm -rf conftest*
6102   ol_pthread_final=no
6103 fi
6104 rm -f conftest*
6105
6106
6107         cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110
6111 #               include <pthread.h>
6112                 /* this check could be improved */
6113 #               ifdef pthread_once_init
6114                         pthread_version_draft4
6115 #               endif
6116         
6117 EOF
6118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6119   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6120   rm -rf conftest*
6121   ol_pthread_draft4=yes
6122 else
6123   rm -rf conftest*
6124   ol_pthread_draft4=no
6125 fi
6126 rm -f conftest*
6127
6128
6129         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6130                 ol_cv_pthread_version=final
6131         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6132                 ol_cv_pthread_version=draft4
6133         else
6134                 ol_cv_pthread_version=unknown
6135         fi
6136
6137 fi
6138
6139 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6140
6141
6142                 if test $ol_cv_pthread_version = final ; then
6143                         cat >> confdefs.h <<\EOF
6144 #define HAVE_PTHREADS_FINAL 1
6145 EOF
6146
6147                 elif test $ol_cv_pthread_version = draft4 ; then
6148                         cat >> confdefs.h <<\EOF
6149 #define HAVE_PTHREADS_D4 1
6150 EOF
6151
6152                 else
6153                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6154                 fi
6155
6156                 # consider threads found
6157                 ol_with_threads=found
6158
6159                 
6160         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6161 echo "configure:6162: checking for LinuxThreads pthread.h" >&5
6162 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6163   echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 #include <pthread.h>
6169 EOF
6170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6171   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6172   rm -rf conftest*
6173   ol_cv_header_linux_threads=yes
6174 else
6175   rm -rf conftest*
6176   ol_cv_header_linux_threads=no
6177 fi
6178 rm -f conftest*
6179
6180                 
6181 fi
6182
6183 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6184         if test $ol_cv_header_linux_threads = yes; then
6185                 cat >> confdefs.h <<\EOF
6186 #define HAVE_LINUX_THREADS 1
6187 EOF
6188
6189         fi
6190
6191
6192                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6193                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6194 echo "configure:6195: checking for pthread_create in default libraries" >&5
6195 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
6196   echo $ac_n "(cached) $ac_c" 1>&6
6197 else
6198   
6199                 if test "$cross_compiling" = yes; then
6200                         ol_cv_pthread_create=yes
6201 else
6202   cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205
6206 #include <pthread.h>
6207 #ifndef NULL
6208 #define NULL (void*)0
6209 #endif
6210
6211 static void *task(p)
6212         void *p;
6213 {
6214         return (void *) (p == NULL);
6215 }
6216
6217 int main(argc, argv)
6218         int argc;
6219         char **argv;
6220 {
6221         pthread_t t;
6222         int status;
6223
6224         /* make sure pthread_create() isn't just a stub */
6225 #if HAVE_PTHREADS_D4
6226         status = pthread_create(&t, pthread_attr_default, task, NULL);
6227 #else
6228         status = pthread_create(&t, NULL, task, NULL);
6229 #endif
6230
6231         if( status ) return status;
6232
6233         /* make sure pthread_detach() isn't just a stub */
6234 #if HAVE_PTHREADS_D4
6235         status = pthread_detach( &t );
6236 #else
6237         status = pthread_detach( t );
6238 #endif
6239
6240         return status;
6241 }
6242
6243 EOF
6244 if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6245 then
6246   ol_cv_pthread_create=yes
6247 else
6248   echo "configure: failed program was:" >&5
6249   cat conftest.$ac_ext >&5
6250   rm -fr conftest*
6251   ol_cv_pthread_create=no
6252 fi
6253 rm -fr conftest*
6254 fi
6255
6256 fi
6257
6258 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6259
6260                 if test $ol_cv_pthread_create != no ; then
6261                         ol_link_threads=posix
6262                         ol_link_pthreads=""
6263                 fi
6264                 
6265                 # Pthread try link: -mt (ol_cv_pthread_mt)
6266         if test "$ol_link_threads" = no ; then
6267                 # try -mt
6268                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6269 echo "configure:6270: checking for pthread link with -mt" >&5
6270 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
6271   echo $ac_n "(cached) $ac_c" 1>&6
6272 else
6273   
6274                         # save the flags
6275                         ol_LIBS="$LIBS"
6276                         LIBS="-mt $LIBS"
6277
6278                         cat > conftest.$ac_ext <<EOF
6279 #line 6280 "configure"
6280 #include "confdefs.h"
6281
6282 #include <pthread.h>
6283 #ifndef NULL
6284 #define NULL (void*)0
6285 #endif
6286
6287 int main() {
6288
6289         pthread_t t;
6290
6291 #if HAVE_PTHREADS_D4
6292         pthread_create(&t, pthread_attr_default, NULL, NULL);
6293         pthread_detach( &t );
6294 #else
6295         pthread_create(&t, NULL, NULL, NULL);
6296         pthread_detach( t );
6297 #endif
6298 #ifdef HAVE_LINUX_THREADS
6299         pthread_kill_other_threads_np();
6300 #endif
6301
6302 ; return 0; }
6303 EOF
6304 if { (eval echo configure:6305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6305   rm -rf conftest*
6306   ol_cv_pthread_mt=yes
6307 else
6308   echo "configure: failed program was:" >&5
6309   cat conftest.$ac_ext >&5
6310   rm -rf conftest*
6311   ol_cv_pthread_mt=no
6312 fi
6313 rm -f conftest*
6314
6315                 # restore the LIBS
6316                 LIBS="$ol_LIBS"
6317                 
6318 fi
6319
6320 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6321
6322                 if test $ol_cv_pthread_mt = yes ; then
6323                         ol_link_pthreads="-mt"
6324                         ol_link_threads=posix
6325                 fi
6326         fi
6327
6328                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6329         if test "$ol_link_threads" = no ; then
6330                 # try -kthread
6331                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6332 echo "configure:6333: checking for pthread link with -kthread" >&5
6333 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
6334   echo $ac_n "(cached) $ac_c" 1>&6
6335 else
6336   
6337                         # save the flags
6338                         ol_LIBS="$LIBS"
6339                         LIBS="-kthread $LIBS"
6340
6341                         cat > conftest.$ac_ext <<EOF
6342 #line 6343 "configure"
6343 #include "confdefs.h"
6344
6345 #include <pthread.h>
6346 #ifndef NULL
6347 #define NULL (void*)0
6348 #endif
6349
6350 int main() {
6351
6352         pthread_t t;
6353
6354 #if HAVE_PTHREADS_D4
6355         pthread_create(&t, pthread_attr_default, NULL, NULL);
6356         pthread_detach( &t );
6357 #else
6358         pthread_create(&t, NULL, NULL, NULL);
6359         pthread_detach( t );
6360 #endif
6361 #ifdef HAVE_LINUX_THREADS
6362         pthread_kill_other_threads_np();
6363 #endif
6364
6365 ; return 0; }
6366 EOF
6367 if { (eval echo configure:6368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6368   rm -rf conftest*
6369   ol_cv_pthread_kthread=yes
6370 else
6371   echo "configure: failed program was:" >&5
6372   cat conftest.$ac_ext >&5
6373   rm -rf conftest*
6374   ol_cv_pthread_kthread=no
6375 fi
6376 rm -f conftest*
6377
6378                 # restore the LIBS
6379                 LIBS="$ol_LIBS"
6380                 
6381 fi
6382
6383 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6384
6385                 if test $ol_cv_pthread_kthread = yes ; then
6386                         ol_link_pthreads="-kthread"
6387                         ol_link_threads=posix
6388                 fi
6389         fi
6390
6391                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6392         if test "$ol_link_threads" = no ; then
6393                 # try -pthread
6394                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6395 echo "configure:6396: checking for pthread link with -pthread" >&5
6396 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
6397   echo $ac_n "(cached) $ac_c" 1>&6
6398 else
6399   
6400                         # save the flags
6401                         ol_LIBS="$LIBS"
6402                         LIBS="-pthread $LIBS"
6403
6404                         cat > conftest.$ac_ext <<EOF
6405 #line 6406 "configure"
6406 #include "confdefs.h"
6407
6408 #include <pthread.h>
6409 #ifndef NULL
6410 #define NULL (void*)0
6411 #endif
6412
6413 int main() {
6414
6415         pthread_t t;
6416
6417 #if HAVE_PTHREADS_D4
6418         pthread_create(&t, pthread_attr_default, NULL, NULL);
6419         pthread_detach( &t );
6420 #else
6421         pthread_create(&t, NULL, NULL, NULL);
6422         pthread_detach( t );
6423 #endif
6424 #ifdef HAVE_LINUX_THREADS
6425         pthread_kill_other_threads_np();
6426 #endif
6427
6428 ; return 0; }
6429 EOF
6430 if { (eval echo configure:6431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6431   rm -rf conftest*
6432   ol_cv_pthread_pthread=yes
6433 else
6434   echo "configure: failed program was:" >&5
6435   cat conftest.$ac_ext >&5
6436   rm -rf conftest*
6437   ol_cv_pthread_pthread=no
6438 fi
6439 rm -f conftest*
6440
6441                 # restore the LIBS
6442                 LIBS="$ol_LIBS"
6443                 
6444 fi
6445
6446 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6447
6448                 if test $ol_cv_pthread_pthread = yes ; then
6449                         ol_link_pthreads="-pthread"
6450                         ol_link_threads=posix
6451                 fi
6452         fi
6453
6454                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6455         if test "$ol_link_threads" = no ; then
6456                 # try -pthreads
6457                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6458 echo "configure:6459: checking for pthread link with -pthreads" >&5
6459 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
6460   echo $ac_n "(cached) $ac_c" 1>&6
6461 else
6462   
6463                         # save the flags
6464                         ol_LIBS="$LIBS"
6465                         LIBS="-pthreads $LIBS"
6466
6467                         cat > conftest.$ac_ext <<EOF
6468 #line 6469 "configure"
6469 #include "confdefs.h"
6470
6471 #include <pthread.h>
6472 #ifndef NULL
6473 #define NULL (void*)0
6474 #endif
6475
6476 int main() {
6477
6478         pthread_t t;
6479
6480 #if HAVE_PTHREADS_D4
6481         pthread_create(&t, pthread_attr_default, NULL, NULL);
6482         pthread_detach( &t );
6483 #else
6484         pthread_create(&t, NULL, NULL, NULL);
6485         pthread_detach( t );
6486 #endif
6487 #ifdef HAVE_LINUX_THREADS
6488         pthread_kill_other_threads_np();
6489 #endif
6490
6491 ; return 0; }
6492 EOF
6493 if { (eval echo configure:6494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6494   rm -rf conftest*
6495   ol_cv_pthread_pthreads=yes
6496 else
6497   echo "configure: failed program was:" >&5
6498   cat conftest.$ac_ext >&5
6499   rm -rf conftest*
6500   ol_cv_pthread_pthreads=no
6501 fi
6502 rm -f conftest*
6503
6504                 # restore the LIBS
6505                 LIBS="$ol_LIBS"
6506                 
6507 fi
6508
6509 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6510
6511                 if test $ol_cv_pthread_pthreads = yes ; then
6512                         ol_link_pthreads="-pthreads"
6513                         ol_link_threads=posix
6514                 fi
6515         fi
6516
6517                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6518         if test "$ol_link_threads" = no ; then
6519                 # try -mthreads
6520                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6521 echo "configure:6522: checking for pthread link with -mthreads" >&5
6522 if eval "test \"`echo '$''{'ol_cv_pthread_mthreads'+set}'`\" = set"; then
6523   echo $ac_n "(cached) $ac_c" 1>&6
6524 else
6525   
6526                         # save the flags
6527                         ol_LIBS="$LIBS"
6528                         LIBS="-mthreads $LIBS"
6529
6530                         cat > conftest.$ac_ext <<EOF
6531 #line 6532 "configure"
6532 #include "confdefs.h"
6533
6534 #include <pthread.h>
6535 #ifndef NULL
6536 #define NULL (void*)0
6537 #endif
6538
6539 int main() {
6540
6541         pthread_t t;
6542
6543 #if HAVE_PTHREADS_D4
6544         pthread_create(&t, pthread_attr_default, NULL, NULL);
6545         pthread_detach( &t );
6546 #else
6547         pthread_create(&t, NULL, NULL, NULL);
6548         pthread_detach( t );
6549 #endif
6550 #ifdef HAVE_LINUX_THREADS
6551         pthread_kill_other_threads_np();
6552 #endif
6553
6554 ; return 0; }
6555 EOF
6556 if { (eval echo configure:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6557   rm -rf conftest*
6558   ol_cv_pthread_mthreads=yes
6559 else
6560   echo "configure: failed program was:" >&5
6561   cat conftest.$ac_ext >&5
6562   rm -rf conftest*
6563   ol_cv_pthread_mthreads=no
6564 fi
6565 rm -f conftest*
6566
6567                 # restore the LIBS
6568                 LIBS="$ol_LIBS"
6569                 
6570 fi
6571
6572 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6573
6574                 if test $ol_cv_pthread_mthreads = yes ; then
6575                         ol_link_pthreads="-mthreads"
6576                         ol_link_threads=posix
6577                 fi
6578         fi
6579
6580                 # Pthread try link: -thread (ol_cv_pthread_thread)
6581         if test "$ol_link_threads" = no ; then
6582                 # try -thread
6583                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6584 echo "configure:6585: checking for pthread link with -thread" >&5
6585 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
6586   echo $ac_n "(cached) $ac_c" 1>&6
6587 else
6588   
6589                         # save the flags
6590                         ol_LIBS="$LIBS"
6591                         LIBS="-thread $LIBS"
6592
6593                         cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596
6597 #include <pthread.h>
6598 #ifndef NULL
6599 #define NULL (void*)0
6600 #endif
6601
6602 int main() {
6603
6604         pthread_t t;
6605
6606 #if HAVE_PTHREADS_D4
6607         pthread_create(&t, pthread_attr_default, NULL, NULL);
6608         pthread_detach( &t );
6609 #else
6610         pthread_create(&t, NULL, NULL, NULL);
6611         pthread_detach( t );
6612 #endif
6613 #ifdef HAVE_LINUX_THREADS
6614         pthread_kill_other_threads_np();
6615 #endif
6616
6617 ; return 0; }
6618 EOF
6619 if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6620   rm -rf conftest*
6621   ol_cv_pthread_thread=yes
6622 else
6623   echo "configure: failed program was:" >&5
6624   cat conftest.$ac_ext >&5
6625   rm -rf conftest*
6626   ol_cv_pthread_thread=no
6627 fi
6628 rm -f conftest*
6629
6630                 # restore the LIBS
6631                 LIBS="$ol_LIBS"
6632                 
6633 fi
6634
6635 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6636
6637                 if test $ol_cv_pthread_thread = yes ; then
6638                         ol_link_pthreads="-thread"
6639                         ol_link_threads=posix
6640                 fi
6641         fi
6642
6643
6644                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6645         if test "$ol_link_threads" = no ; then
6646                 # try -lpthread -lmach -lexc -lc_r
6647                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6648 echo "configure:6649: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6649 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
6650   echo $ac_n "(cached) $ac_c" 1>&6
6651 else
6652   
6653                         # save the flags
6654                         ol_LIBS="$LIBS"
6655                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6656
6657                         cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660
6661 #include <pthread.h>
6662 #ifndef NULL
6663 #define NULL (void*)0
6664 #endif
6665
6666 int main() {
6667
6668         pthread_t t;
6669
6670 #if HAVE_PTHREADS_D4
6671         pthread_create(&t, pthread_attr_default, NULL, NULL);
6672         pthread_detach( &t );
6673 #else
6674         pthread_create(&t, NULL, NULL, NULL);
6675         pthread_detach( t );
6676 #endif
6677 #ifdef HAVE_LINUX_THREADS
6678         pthread_kill_other_threads_np();
6679 #endif
6680
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684   rm -rf conftest*
6685   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6686 else
6687   echo "configure: failed program was:" >&5
6688   cat conftest.$ac_ext >&5
6689   rm -rf conftest*
6690   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6691 fi
6692 rm -f conftest*
6693
6694                 # restore the LIBS
6695                 LIBS="$ol_LIBS"
6696                 
6697 fi
6698
6699 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6700
6701                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6702                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6703                         ol_link_threads=posix
6704                 fi
6705         fi
6706
6707                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6708         if test "$ol_link_threads" = no ; then
6709                 # try -lpthread -lmach -lexc
6710                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6711 echo "configure:6712: checking for pthread link with -lpthread -lmach -lexc" >&5
6712 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
6713   echo $ac_n "(cached) $ac_c" 1>&6
6714 else
6715   
6716                         # save the flags
6717                         ol_LIBS="$LIBS"
6718                         LIBS="-lpthread -lmach -lexc $LIBS"
6719
6720                         cat > conftest.$ac_ext <<EOF
6721 #line 6722 "configure"
6722 #include "confdefs.h"
6723
6724 #include <pthread.h>
6725 #ifndef NULL
6726 #define NULL (void*)0
6727 #endif
6728
6729 int main() {
6730
6731         pthread_t t;
6732
6733 #if HAVE_PTHREADS_D4
6734         pthread_create(&t, pthread_attr_default, NULL, NULL);
6735         pthread_detach( &t );
6736 #else
6737         pthread_create(&t, NULL, NULL, NULL);
6738         pthread_detach( t );
6739 #endif
6740 #ifdef HAVE_LINUX_THREADS
6741         pthread_kill_other_threads_np();
6742 #endif
6743
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747   rm -rf conftest*
6748   ol_cv_pthread_lpthread_lmach_lexc=yes
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   ol_cv_pthread_lpthread_lmach_lexc=no
6754 fi
6755 rm -f conftest*
6756
6757                 # restore the LIBS
6758                 LIBS="$ol_LIBS"
6759                 
6760 fi
6761
6762 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6763
6764                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6765                         ol_link_pthreads="-lpthread -lmach -lexc"
6766                         ol_link_threads=posix
6767                 fi
6768         fi
6769
6770
6771                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6772         if test "$ol_link_threads" = no ; then
6773                 # try -lpthread -Wl,-woff,85
6774                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6775 echo "configure:6776: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6776 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
6777   echo $ac_n "(cached) $ac_c" 1>&6
6778 else
6779   
6780                         # save the flags
6781                         ol_LIBS="$LIBS"
6782                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6783
6784                         cat > conftest.$ac_ext <<EOF
6785 #line 6786 "configure"
6786 #include "confdefs.h"
6787
6788 #include <pthread.h>
6789 #ifndef NULL
6790 #define NULL (void*)0
6791 #endif
6792
6793 int main() {
6794
6795         pthread_t t;
6796
6797 #if HAVE_PTHREADS_D4
6798         pthread_create(&t, pthread_attr_default, NULL, NULL);
6799         pthread_detach( &t );
6800 #else
6801         pthread_create(&t, NULL, NULL, NULL);
6802         pthread_detach( t );
6803 #endif
6804 #ifdef HAVE_LINUX_THREADS
6805         pthread_kill_other_threads_np();
6806 #endif
6807
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6811   rm -rf conftest*
6812   ol_cv_pthread_lib_lpthread_woff=yes
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   ol_cv_pthread_lib_lpthread_woff=no
6818 fi
6819 rm -f conftest*
6820
6821                 # restore the LIBS
6822                 LIBS="$ol_LIBS"
6823                 
6824 fi
6825
6826 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6827
6828                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6829                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6830                         ol_link_threads=posix
6831                 fi
6832         fi
6833
6834
6835                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6836         if test "$ol_link_threads" = no ; then
6837                 # try -lpthread
6838                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6839 echo "configure:6840: checking for pthread link with -lpthread" >&5
6840 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
6841   echo $ac_n "(cached) $ac_c" 1>&6
6842 else
6843   
6844                         # save the flags
6845                         ol_LIBS="$LIBS"
6846                         LIBS="-lpthread $LIBS"
6847
6848                         cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851
6852 #include <pthread.h>
6853 #ifndef NULL
6854 #define NULL (void*)0
6855 #endif
6856
6857 int main() {
6858
6859         pthread_t t;
6860
6861 #if HAVE_PTHREADS_D4
6862         pthread_create(&t, pthread_attr_default, NULL, NULL);
6863         pthread_detach( &t );
6864 #else
6865         pthread_create(&t, NULL, NULL, NULL);
6866         pthread_detach( t );
6867 #endif
6868 #ifdef HAVE_LINUX_THREADS
6869         pthread_kill_other_threads_np();
6870 #endif
6871
6872 ; return 0; }
6873 EOF
6874 if { (eval echo configure:6875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6875   rm -rf conftest*
6876   ol_cv_pthread_lpthread=yes
6877 else
6878   echo "configure: failed program was:" >&5
6879   cat conftest.$ac_ext >&5
6880   rm -rf conftest*
6881   ol_cv_pthread_lpthread=no
6882 fi
6883 rm -f conftest*
6884
6885                 # restore the LIBS
6886                 LIBS="$ol_LIBS"
6887                 
6888 fi
6889
6890 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6891
6892                 if test $ol_cv_pthread_lpthread = yes ; then
6893                         ol_link_pthreads="-lpthread"
6894                         ol_link_threads=posix
6895                 fi
6896         fi
6897
6898                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6899         if test "$ol_link_threads" = no ; then
6900                 # try -lc_r
6901                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6902 echo "configure:6903: checking for pthread link with -lc_r" >&5
6903 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
6904   echo $ac_n "(cached) $ac_c" 1>&6
6905 else
6906   
6907                         # save the flags
6908                         ol_LIBS="$LIBS"
6909                         LIBS="-lc_r $LIBS"
6910
6911                         cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914
6915 #include <pthread.h>
6916 #ifndef NULL
6917 #define NULL (void*)0
6918 #endif
6919
6920 int main() {
6921
6922         pthread_t t;
6923
6924 #if HAVE_PTHREADS_D4
6925         pthread_create(&t, pthread_attr_default, NULL, NULL);
6926         pthread_detach( &t );
6927 #else
6928         pthread_create(&t, NULL, NULL, NULL);
6929         pthread_detach( t );
6930 #endif
6931 #ifdef HAVE_LINUX_THREADS
6932         pthread_kill_other_threads_np();
6933 #endif
6934
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6938   rm -rf conftest*
6939   ol_cv_pthread_lc_r=yes
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   ol_cv_pthread_lc_r=no
6945 fi
6946 rm -f conftest*
6947
6948                 # restore the LIBS
6949                 LIBS="$ol_LIBS"
6950                 
6951 fi
6952
6953 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6954
6955                 if test $ol_cv_pthread_lc_r = yes ; then
6956                         ol_link_pthreads="-lc_r"
6957                         ol_link_threads=posix
6958                 fi
6959         fi
6960
6961
6962                 # Pthread try link: -threads (ol_cv_pthread_threads)
6963         if test "$ol_link_threads" = no ; then
6964                 # try -threads
6965                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6966 echo "configure:6967: checking for pthread link with -threads" >&5
6967 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
6968   echo $ac_n "(cached) $ac_c" 1>&6
6969 else
6970   
6971                         # save the flags
6972                         ol_LIBS="$LIBS"
6973                         LIBS="-threads $LIBS"
6974
6975                         cat > conftest.$ac_ext <<EOF
6976 #line 6977 "configure"
6977 #include "confdefs.h"
6978
6979 #include <pthread.h>
6980 #ifndef NULL
6981 #define NULL (void*)0
6982 #endif
6983
6984 int main() {
6985
6986         pthread_t t;
6987
6988 #if HAVE_PTHREADS_D4
6989         pthread_create(&t, pthread_attr_default, NULL, NULL);
6990         pthread_detach( &t );
6991 #else
6992         pthread_create(&t, NULL, NULL, NULL);
6993         pthread_detach( t );
6994 #endif
6995 #ifdef HAVE_LINUX_THREADS
6996         pthread_kill_other_threads_np();
6997 #endif
6998
6999 ; return 0; }
7000 EOF
7001 if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7002   rm -rf conftest*
7003   ol_cv_pthread_threads=yes
7004 else
7005   echo "configure: failed program was:" >&5
7006   cat conftest.$ac_ext >&5
7007   rm -rf conftest*
7008   ol_cv_pthread_threads=no
7009 fi
7010 rm -f conftest*
7011
7012                 # restore the LIBS
7013                 LIBS="$ol_LIBS"
7014                 
7015 fi
7016
7017 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7018
7019                 if test $ol_cv_pthread_threads = yes ; then
7020                         ol_link_pthreads="-threads"
7021                         ol_link_threads=posix
7022                 fi
7023         fi
7024
7025
7026                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7027         if test "$ol_link_threads" = no ; then
7028                 # try -lpthreads -lmach -lexc -lc_r
7029                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7030 echo "configure:7031: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7031 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
7032   echo $ac_n "(cached) $ac_c" 1>&6
7033 else
7034   
7035                         # save the flags
7036                         ol_LIBS="$LIBS"
7037                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7038
7039                         cat > conftest.$ac_ext <<EOF
7040 #line 7041 "configure"
7041 #include "confdefs.h"
7042
7043 #include <pthread.h>
7044 #ifndef NULL
7045 #define NULL (void*)0
7046 #endif
7047
7048 int main() {
7049
7050         pthread_t t;
7051
7052 #if HAVE_PTHREADS_D4
7053         pthread_create(&t, pthread_attr_default, NULL, NULL);
7054         pthread_detach( &t );
7055 #else
7056         pthread_create(&t, NULL, NULL, NULL);
7057         pthread_detach( t );
7058 #endif
7059 #ifdef HAVE_LINUX_THREADS
7060         pthread_kill_other_threads_np();
7061 #endif
7062
7063 ; return 0; }
7064 EOF
7065 if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7066   rm -rf conftest*
7067   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7068 else
7069   echo "configure: failed program was:" >&5
7070   cat conftest.$ac_ext >&5
7071   rm -rf conftest*
7072   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7073 fi
7074 rm -f conftest*
7075
7076                 # restore the LIBS
7077                 LIBS="$ol_LIBS"
7078                 
7079 fi
7080
7081 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7082
7083                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7084                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7085                         ol_link_threads=posix
7086                 fi
7087         fi
7088
7089                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7090         if test "$ol_link_threads" = no ; then
7091                 # try -lpthreads -lmach -lexc
7092                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7093 echo "configure:7094: checking for pthread link with -lpthreads -lmach -lexc" >&5
7094 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
7095   echo $ac_n "(cached) $ac_c" 1>&6
7096 else
7097   
7098                         # save the flags
7099                         ol_LIBS="$LIBS"
7100                         LIBS="-lpthreads -lmach -lexc $LIBS"
7101
7102                         cat > conftest.$ac_ext <<EOF
7103 #line 7104 "configure"
7104 #include "confdefs.h"
7105
7106 #include <pthread.h>
7107 #ifndef NULL
7108 #define NULL (void*)0
7109 #endif
7110
7111 int main() {
7112
7113         pthread_t t;
7114
7115 #if HAVE_PTHREADS_D4
7116         pthread_create(&t, pthread_attr_default, NULL, NULL);
7117         pthread_detach( &t );
7118 #else
7119         pthread_create(&t, NULL, NULL, NULL);
7120         pthread_detach( t );
7121 #endif
7122 #ifdef HAVE_LINUX_THREADS
7123         pthread_kill_other_threads_np();
7124 #endif
7125
7126 ; return 0; }
7127 EOF
7128 if { (eval echo configure:7129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7129   rm -rf conftest*
7130   ol_cv_pthread_lpthreads_lmach_lexc=yes
7131 else
7132   echo "configure: failed program was:" >&5
7133   cat conftest.$ac_ext >&5
7134   rm -rf conftest*
7135   ol_cv_pthread_lpthreads_lmach_lexc=no
7136 fi
7137 rm -f conftest*
7138
7139                 # restore the LIBS
7140                 LIBS="$ol_LIBS"
7141                 
7142 fi
7143
7144 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7145
7146                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7147                         ol_link_pthreads="-lpthreads -lmach -lexc"
7148                         ol_link_threads=posix
7149                 fi
7150         fi
7151
7152                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7153         if test "$ol_link_threads" = no ; then
7154                 # try -lpthreads -lexc
7155                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7156 echo "configure:7157: checking for pthread link with -lpthreads -lexc" >&5
7157 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
7158   echo $ac_n "(cached) $ac_c" 1>&6
7159 else
7160   
7161                         # save the flags
7162                         ol_LIBS="$LIBS"
7163                         LIBS="-lpthreads -lexc $LIBS"
7164
7165                         cat > conftest.$ac_ext <<EOF
7166 #line 7167 "configure"
7167 #include "confdefs.h"
7168
7169 #include <pthread.h>
7170 #ifndef NULL
7171 #define NULL (void*)0
7172 #endif
7173
7174 int main() {
7175
7176         pthread_t t;
7177
7178 #if HAVE_PTHREADS_D4
7179         pthread_create(&t, pthread_attr_default, NULL, NULL);
7180         pthread_detach( &t );
7181 #else
7182         pthread_create(&t, NULL, NULL, NULL);
7183         pthread_detach( t );
7184 #endif
7185 #ifdef HAVE_LINUX_THREADS
7186         pthread_kill_other_threads_np();
7187 #endif
7188
7189 ; return 0; }
7190 EOF
7191 if { (eval echo configure:7192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7192   rm -rf conftest*
7193   ol_cv_pthread_lpthreads_lexc=yes
7194 else
7195   echo "configure: failed program was:" >&5
7196   cat conftest.$ac_ext >&5
7197   rm -rf conftest*
7198   ol_cv_pthread_lpthreads_lexc=no
7199 fi
7200 rm -f conftest*
7201
7202                 # restore the LIBS
7203                 LIBS="$ol_LIBS"
7204                 
7205 fi
7206
7207 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7208
7209                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7210                         ol_link_pthreads="-lpthreads -lexc"
7211                         ol_link_threads=posix
7212                 fi
7213         fi
7214
7215
7216                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7217         if test "$ol_link_threads" = no ; then
7218                 # try -lpthreads
7219                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7220 echo "configure:7221: checking for pthread link with -lpthreads" >&5
7221 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
7222   echo $ac_n "(cached) $ac_c" 1>&6
7223 else
7224   
7225                         # save the flags
7226                         ol_LIBS="$LIBS"
7227                         LIBS="-lpthreads $LIBS"
7228
7229                         cat > conftest.$ac_ext <<EOF
7230 #line 7231 "configure"
7231 #include "confdefs.h"
7232
7233 #include <pthread.h>
7234 #ifndef NULL
7235 #define NULL (void*)0
7236 #endif
7237
7238 int main() {
7239
7240         pthread_t t;
7241
7242 #if HAVE_PTHREADS_D4
7243         pthread_create(&t, pthread_attr_default, NULL, NULL);
7244         pthread_detach( &t );
7245 #else
7246         pthread_create(&t, NULL, NULL, NULL);
7247         pthread_detach( t );
7248 #endif
7249 #ifdef HAVE_LINUX_THREADS
7250         pthread_kill_other_threads_np();
7251 #endif
7252
7253 ; return 0; }
7254 EOF
7255 if { (eval echo configure:7256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7256   rm -rf conftest*
7257   ol_cv_pthread_lib_lpthreads=yes
7258 else
7259   echo "configure: failed program was:" >&5
7260   cat conftest.$ac_ext >&5
7261   rm -rf conftest*
7262   ol_cv_pthread_lib_lpthreads=no
7263 fi
7264 rm -f conftest*
7265
7266                 # restore the LIBS
7267                 LIBS="$ol_LIBS"
7268                 
7269 fi
7270
7271 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7272
7273                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7274                         ol_link_pthreads="-lpthreads"
7275                         ol_link_threads=posix
7276                 fi
7277         fi
7278
7279
7280                 if test $ol_link_threads != no ; then
7281                         cat >> confdefs.h <<\EOF
7282 #define HAVE_PTHREADS 1
7283 EOF
7284
7285
7286                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7287
7288                                                 save_CPPFLAGS="$CPPFLAGS"
7289                         save_LIBS="$LIBS"
7290                         LIBS="$LTHREAD_LIBS $LIBS"
7291
7292                                                                                                 for ac_func in sched_yield pthread_yield
7293 do
7294 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7295 echo "configure:7296: checking for $ac_func" >&5
7296 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7297   echo $ac_n "(cached) $ac_c" 1>&6
7298 else
7299   cat > conftest.$ac_ext <<EOF
7300 #line 7301 "configure"
7301 #include "confdefs.h"
7302 /* System header to define __stub macros and hopefully few prototypes,
7303     which can conflict with char $ac_func(); below.  */
7304 #include <assert.h>
7305 /* Override any gcc2 internal prototype to avoid an error.  */
7306 /* We use char because int might match the return type of a gcc2
7307     builtin and then its argument prototype would still apply.  */
7308 char $ac_func();
7309
7310 int main() {
7311
7312 /* The GNU C library defines this for functions which it implements
7313     to always fail with ENOSYS.  Some functions are actually named
7314     something starting with __ and the normal name is an alias.  */
7315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7316 choke me
7317 #else
7318 $ac_func();
7319 #endif
7320
7321 ; return 0; }
7322 EOF
7323 if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7324   rm -rf conftest*
7325   eval "ac_cv_func_$ac_func=yes"
7326 else
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   eval "ac_cv_func_$ac_func=no"
7331 fi
7332 rm -f conftest*
7333 fi
7334
7335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7338   cat >> confdefs.h <<EOF
7339 #define $ac_tr_func 1
7340 EOF
7341  
7342 else
7343   echo "$ac_t""no" 1>&6
7344 fi
7345 done
7346
7347
7348                         if test $ac_cv_func_sched_yield = no -a \
7349                                 $ac_cv_func_pthread_yield = no ; then
7350                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7351 echo "configure:7352: checking for sched_yield in -lrt" >&5
7352 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
7353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7354   echo $ac_n "(cached) $ac_c" 1>&6
7355 else
7356   ac_save_LIBS="$LIBS"
7357 LIBS="-lrt  $LIBS"
7358 cat > conftest.$ac_ext <<EOF
7359 #line 7360 "configure"
7360 #include "confdefs.h"
7361 /* Override any gcc2 internal prototype to avoid an error.  */
7362 /* We use char because int might match the return type of a gcc2
7363     builtin and then its argument prototype would still apply.  */
7364 char sched_yield();
7365
7366 int main() {
7367 sched_yield()
7368 ; return 0; }
7369 EOF
7370 if { (eval echo configure:7371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7371   rm -rf conftest*
7372   eval "ac_cv_lib_$ac_lib_var=yes"
7373 else
7374   echo "configure: failed program was:" >&5
7375   cat conftest.$ac_ext >&5
7376   rm -rf conftest*
7377   eval "ac_cv_lib_$ac_lib_var=no"
7378 fi
7379 rm -f conftest*
7380 LIBS="$ac_save_LIBS"
7381
7382 fi
7383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7384   echo "$ac_t""yes" 1>&6
7385   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7386                                         cat >> confdefs.h <<\EOF
7387 #define HAVE_SCHED_YIELD 1
7388 EOF
7389
7390                                         ac_cv_func_sched_yield=yes
7391 else
7392   echo "$ac_t""no" 1>&6
7393 ac_cv_func_sched_yield=no
7394 fi
7395
7396                         fi
7397                         if test $ac_cv_func_sched_yield = no -a \
7398                                 $ac_cv_func_pthread_yield = no ; then
7399                                                                                                 for ac_func in thr_yield
7400 do
7401 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7402 echo "configure:7403: checking for $ac_func" >&5
7403 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7404   echo $ac_n "(cached) $ac_c" 1>&6
7405 else
7406   cat > conftest.$ac_ext <<EOF
7407 #line 7408 "configure"
7408 #include "confdefs.h"
7409 /* System header to define __stub macros and hopefully few prototypes,
7410     which can conflict with char $ac_func(); below.  */
7411 #include <assert.h>
7412 /* Override any gcc2 internal prototype to avoid an error.  */
7413 /* We use char because int might match the return type of a gcc2
7414     builtin and then its argument prototype would still apply.  */
7415 char $ac_func();
7416
7417 int main() {
7418
7419 /* The GNU C library defines this for functions which it implements
7420     to always fail with ENOSYS.  Some functions are actually named
7421     something starting with __ and the normal name is an alias.  */
7422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7423 choke me
7424 #else
7425 $ac_func();
7426 #endif
7427
7428 ; return 0; }
7429 EOF
7430 if { (eval echo configure:7431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7431   rm -rf conftest*
7432   eval "ac_cv_func_$ac_func=yes"
7433 else
7434   echo "configure: failed program was:" >&5
7435   cat conftest.$ac_ext >&5
7436   rm -rf conftest*
7437   eval "ac_cv_func_$ac_func=no"
7438 fi
7439 rm -f conftest*
7440 fi
7441
7442 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7443   echo "$ac_t""yes" 1>&6
7444     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7445   cat >> confdefs.h <<EOF
7446 #define $ac_tr_func 1
7447 EOF
7448  
7449 else
7450   echo "$ac_t""no" 1>&6
7451 fi
7452 done
7453
7454                         fi
7455                         if test $ac_cv_func_sched_yield = no -a \
7456                                 $ac_cv_func_pthread_yield = no -a \
7457                                 "$ac_cv_func_thr_yield" = no ; then
7458                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7459                         fi
7460
7461                                                 for ac_func in pthread_kill
7462 do
7463 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7464 echo "configure:7465: checking for $ac_func" >&5
7465 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   cat > conftest.$ac_ext <<EOF
7469 #line 7470 "configure"
7470 #include "confdefs.h"
7471 /* System header to define __stub macros and hopefully few prototypes,
7472     which can conflict with char $ac_func(); below.  */
7473 #include <assert.h>
7474 /* Override any gcc2 internal prototype to avoid an error.  */
7475 /* We use char because int might match the return type of a gcc2
7476     builtin and then its argument prototype would still apply.  */
7477 char $ac_func();
7478
7479 int main() {
7480
7481 /* The GNU C library defines this for functions which it implements
7482     to always fail with ENOSYS.  Some functions are actually named
7483     something starting with __ and the normal name is an alias.  */
7484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7485 choke me
7486 #else
7487 $ac_func();
7488 #endif
7489
7490 ; return 0; }
7491 EOF
7492 if { (eval echo configure:7493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7493   rm -rf conftest*
7494   eval "ac_cv_func_$ac_func=yes"
7495 else
7496   echo "configure: failed program was:" >&5
7497   cat conftest.$ac_ext >&5
7498   rm -rf conftest*
7499   eval "ac_cv_func_$ac_func=no"
7500 fi
7501 rm -f conftest*
7502 fi
7503
7504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7505   echo "$ac_t""yes" 1>&6
7506     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7507   cat >> confdefs.h <<EOF
7508 #define $ac_tr_func 1
7509 EOF
7510  
7511 else
7512   echo "$ac_t""no" 1>&6
7513 fi
7514 done
7515
7516
7517                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7518 echo "configure:7519: checking for pthread_detach with <pthread.h>" >&5
7519 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
7520   echo $ac_n "(cached) $ac_c" 1>&6
7521 else
7522   
7523                                                                 cat > conftest.$ac_ext <<EOF
7524 #line 7525 "configure"
7525 #include "confdefs.h"
7526
7527 #include <pthread.h>
7528 #ifndef NULL
7529 #define NULL (void*)0
7530 #endif
7531
7532 int main() {
7533 pthread_detach(NULL);
7534 ; return 0; }
7535 EOF
7536 if { (eval echo configure:7537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7537   rm -rf conftest*
7538   ol_cv_func_pthread_detach=yes
7539 else
7540   echo "configure: failed program was:" >&5
7541   cat conftest.$ac_ext >&5
7542   rm -rf conftest*
7543   ol_cv_func_pthread_detach=no
7544 fi
7545 rm -f conftest*
7546                         
7547 fi
7548
7549 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7550
7551                         if test $ol_cv_func_pthread_detach = no ; then
7552                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7553                         fi
7554
7555                         cat >> confdefs.h <<\EOF
7556 #define HAVE_PTHREAD_DETACH 1
7557 EOF
7558
7559
7560                                                 for ac_func in \
7561                                 pthread_setconcurrency \
7562                                 pthread_getconcurrency \
7563                                 thr_setconcurrency \
7564                                 thr_getconcurrency \
7565                         
7566 do
7567 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7568 echo "configure:7569: checking for $ac_func" >&5
7569 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7570   echo $ac_n "(cached) $ac_c" 1>&6
7571 else
7572   cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 /* System header to define __stub macros and hopefully few prototypes,
7576     which can conflict with char $ac_func(); below.  */
7577 #include <assert.h>
7578 /* Override any gcc2 internal prototype to avoid an error.  */
7579 /* We use char because int might match the return type of a gcc2
7580     builtin and then its argument prototype would still apply.  */
7581 char $ac_func();
7582
7583 int main() {
7584
7585 /* The GNU C library defines this for functions which it implements
7586     to always fail with ENOSYS.  Some functions are actually named
7587     something starting with __ and the normal name is an alias.  */
7588 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7589 choke me
7590 #else
7591 $ac_func();
7592 #endif
7593
7594 ; return 0; }
7595 EOF
7596 if { (eval echo configure:7597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7597   rm -rf conftest*
7598   eval "ac_cv_func_$ac_func=yes"
7599 else
7600   echo "configure: failed program was:" >&5
7601   cat conftest.$ac_ext >&5
7602   rm -rf conftest*
7603   eval "ac_cv_func_$ac_func=no"
7604 fi
7605 rm -f conftest*
7606 fi
7607
7608 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7609   echo "$ac_t""yes" 1>&6
7610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7611   cat >> confdefs.h <<EOF
7612 #define $ac_tr_func 1
7613 EOF
7614  
7615 else
7616   echo "$ac_t""no" 1>&6
7617 fi
7618 done
7619
7620
7621                         
7622         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7623 echo "configure:7624: checking for pthread_kill_other_threads_np" >&5
7624 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
7625   echo $ac_n "(cached) $ac_c" 1>&6
7626 else
7627   cat > conftest.$ac_ext <<EOF
7628 #line 7629 "configure"
7629 #include "confdefs.h"
7630 /* System header to define __stub macros and hopefully few prototypes,
7631     which can conflict with char pthread_kill_other_threads_np(); below.  */
7632 #include <assert.h>
7633 /* Override any gcc2 internal prototype to avoid an error.  */
7634 /* We use char because int might match the return type of a gcc2
7635     builtin and then its argument prototype would still apply.  */
7636 char pthread_kill_other_threads_np();
7637
7638 int main() {
7639
7640 /* The GNU C library defines this for functions which it implements
7641     to always fail with ENOSYS.  Some functions are actually named
7642     something starting with __ and the normal name is an alias.  */
7643 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7644 choke me
7645 #else
7646 pthread_kill_other_threads_np();
7647 #endif
7648
7649 ; return 0; }
7650 EOF
7651 if { (eval echo configure:7652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7652   rm -rf conftest*
7653   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7654 else
7655   echo "configure: failed program was:" >&5
7656   cat conftest.$ac_ext >&5
7657   rm -rf conftest*
7658   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7659 fi
7660 rm -f conftest*
7661 fi
7662
7663 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7664   echo "$ac_t""yes" 1>&6
7665   :
7666 else
7667   echo "$ac_t""no" 1>&6
7668 fi
7669
7670         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7671 echo "configure:7672: checking for LinuxThreads implementation" >&5
7672 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
7673   echo $ac_n "(cached) $ac_c" 1>&6
7674 else
7675   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7676 fi
7677
7678 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7679
7680                         
7681         
7682         
7683         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7684 echo "configure:7685: checking for LinuxThreads consistency" >&5
7685 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
7686   echo $ac_n "(cached) $ac_c" 1>&6
7687 else
7688   
7689                 if test $ol_cv_header_linux_threads = yes -a \
7690                         $ol_cv_sys_linux_threads = yes; then
7691                         ol_cv_linux_threads=yes
7692                 elif test $ol_cv_header_linux_threads = no -a \
7693                         $ol_cv_sys_linux_threads = no; then
7694                         ol_cv_linux_threads=no
7695                 else
7696                         ol_cv_linux_threads=error
7697                 fi
7698         
7699 fi
7700
7701 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7702
7703
7704                         if test $ol_cv_linux_threads = error; then
7705                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7706                         fi
7707
7708                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7709 echo "configure:7710: checking if pthread_create() works" >&5
7710 if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
7711   echo $ac_n "(cached) $ac_c" 1>&6
7712 else
7713   
7714                         if test "$cross_compiling" = yes; then
7715                                 ol_cv_pthread_create_works=yes
7716 else
7717   cat > conftest.$ac_ext <<EOF
7718 #line 7719 "configure"
7719 #include "confdefs.h"
7720
7721 #include <pthread.h>
7722 #ifndef NULL
7723 #define NULL (void*)0
7724 #endif
7725
7726 static void *task(p)
7727         void *p;
7728 {
7729         return (void *) (p == NULL);
7730 }
7731
7732 int main(argc, argv)
7733         int argc;
7734         char **argv;
7735 {
7736         pthread_t t;
7737 #if HAVE_PTHREADS_D4
7738         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7739 #else
7740         exit(pthread_create(&t, NULL, task, NULL));
7741 #endif
7742 }
7743
7744 EOF
7745 if { (eval echo configure:7746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7746 then
7747   ol_cv_pthread_create_works=yes
7748 else
7749   echo "configure: failed program was:" >&5
7750   cat conftest.$ac_ext >&5
7751   rm -fr conftest*
7752   ol_cv_pthread_create_works=no
7753 fi
7754 rm -fr conftest*
7755 fi
7756
7757 fi
7758
7759 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7760
7761                         if test $ol_cv_pthread_create_works = no ; then
7762                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7763                         fi
7764
7765                                                 if test $ol_with_yielding_select = auto ; then
7766                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7767 echo "configure:7768: checking if select yields when using pthreads" >&5
7768 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
7769   echo $ac_n "(cached) $ac_c" 1>&6
7770 else
7771   
7772                                 if test "$cross_compiling" = yes; then
7773   ol_cv_pthread_select_yields=cross
7774 else
7775   cat > conftest.$ac_ext <<EOF
7776 #line 7777 "configure"
7777 #include "confdefs.h"
7778
7779 #include <sys/types.h>
7780 #include <sys/time.h>
7781 #include <unistd.h>
7782 #include <pthread.h>
7783 #ifndef NULL
7784 #define NULL (void*) 0
7785 #endif
7786
7787 static int fildes[2];
7788
7789 static void *task(p)
7790         void *p;
7791 {
7792         int i;
7793         struct timeval tv;
7794
7795         fd_set rfds;
7796
7797         tv.tv_sec=10;
7798         tv.tv_usec=0;
7799
7800         FD_ZERO(&rfds);
7801         FD_SET(fildes[0], &rfds);
7802
7803         /* we're not interested in any fds */
7804         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7805
7806         if(i < 0) {
7807                 perror("select");
7808                 exit(10);
7809         }
7810
7811         exit(0); /* if we exit here, the select blocked the whole process */
7812 }
7813
7814 int main(argc, argv)
7815         int argc;
7816         char **argv;
7817 {
7818         pthread_t t;
7819
7820         /* create a pipe to select */
7821         if(pipe(&fildes[0])) {
7822                 perror("select");
7823                 exit(1);
7824         }
7825
7826 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7827         (void) pthread_setconcurrency(2);
7828 #else
7829 #ifdef HAVE_THR_SETCONCURRENCY
7830         /* Set Solaris LWP concurrency to 2 */
7831         thr_setconcurrency(2);
7832 #endif
7833 #endif
7834
7835 #if HAVE_PTHREADS_D4
7836         pthread_create(&t, pthread_attr_default, task, NULL);
7837 #else
7838         pthread_create(&t, NULL, task, NULL);
7839 #endif
7840
7841 #if HAVE_SCHED_YIELD
7842         sched_yield();  /* make sure task runs first */
7843 #else
7844 #ifdef HAVE_PTHREAD_YIELD
7845         pthread_yield();        /* make sure task runs first */
7846 #endif
7847 #endif
7848
7849         exit(2);
7850 }
7851 EOF
7852 if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7853 then
7854   ol_cv_pthread_select_yields=no
7855 else
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -fr conftest*
7859   ol_cv_pthread_select_yields=yes
7860 fi
7861 rm -fr conftest*
7862 fi
7863
7864 fi
7865
7866 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7867
7868                                 if test $ol_cv_pthread_select_yields = cross ; then
7869                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7870                                 fi
7871
7872                                 if test $ol_cv_pthread_select_yields = yes ; then
7873                                         ol_with_yielding_select=yes
7874                                 fi
7875                         fi
7876
7877                                                 CPPFLAGS="$save_CPPFLAGS"
7878                         LIBS="$save_LIBS"
7879                 else
7880                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7881                 fi
7882         fi
7883
7884         if test $ol_with_threads = posix ; then
7885                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7886         fi
7887 fi
7888
7889 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7890         -o $ol_with_threads = mach ; then
7891
7892                 for ac_hdr in mach/cthreads.h
7893 do
7894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7896 echo "configure:7897: checking for $ac_hdr" >&5
7897 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7898   echo $ac_n "(cached) $ac_c" 1>&6
7899 else
7900   cat > conftest.$ac_ext <<EOF
7901 #line 7902 "configure"
7902 #include "confdefs.h"
7903 #include <$ac_hdr>
7904 EOF
7905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7906 { (eval echo configure:7907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7908 if test -z "$ac_err"; then
7909   rm -rf conftest*
7910   eval "ac_cv_header_$ac_safe=yes"
7911 else
7912   echo "$ac_err" >&5
7913   echo "configure: failed program was:" >&5
7914   cat conftest.$ac_ext >&5
7915   rm -rf conftest*
7916   eval "ac_cv_header_$ac_safe=no"
7917 fi
7918 rm -f conftest*
7919 fi
7920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7921   echo "$ac_t""yes" 1>&6
7922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7923   cat >> confdefs.h <<EOF
7924 #define $ac_tr_hdr 1
7925 EOF
7926  
7927 else
7928   echo "$ac_t""no" 1>&6
7929 fi
7930 done
7931
7932         if test $ac_cv_header_mach_cthreads_h = yes ; then
7933                 ol_with_threads=found
7934
7935                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7936 echo "configure:7937: checking for cthread_fork" >&5
7937 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
7938   echo $ac_n "(cached) $ac_c" 1>&6
7939 else
7940   cat > conftest.$ac_ext <<EOF
7941 #line 7942 "configure"
7942 #include "confdefs.h"
7943 /* System header to define __stub macros and hopefully few prototypes,
7944     which can conflict with char cthread_fork(); below.  */
7945 #include <assert.h>
7946 /* Override any gcc2 internal prototype to avoid an error.  */
7947 /* We use char because int might match the return type of a gcc2
7948     builtin and then its argument prototype would still apply.  */
7949 char cthread_fork();
7950
7951 int main() {
7952
7953 /* The GNU C library defines this for functions which it implements
7954     to always fail with ENOSYS.  Some functions are actually named
7955     something starting with __ and the normal name is an alias.  */
7956 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7957 choke me
7958 #else
7959 cthread_fork();
7960 #endif
7961
7962 ; return 0; }
7963 EOF
7964 if { (eval echo configure:7965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7965   rm -rf conftest*
7966   eval "ac_cv_func_cthread_fork=yes"
7967 else
7968   echo "configure: failed program was:" >&5
7969   cat conftest.$ac_ext >&5
7970   rm -rf conftest*
7971   eval "ac_cv_func_cthread_fork=no"
7972 fi
7973 rm -f conftest*
7974 fi
7975
7976 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7977   echo "$ac_t""yes" 1>&6
7978   ol_link_threads=yes
7979 else
7980   echo "$ac_t""no" 1>&6
7981 fi
7982
7983
7984                 if test $ol_link_threads = no ; then
7985                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7986 echo "configure:7987: checking for cthread_fork with -all_load" >&5
7987 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   
7991                                                                 save_LIBS="$LIBS"
7992                                 LIBS="-all_load $LIBS"
7993                                 cat > conftest.$ac_ext <<EOF
7994 #line 7995 "configure"
7995 #include "confdefs.h"
7996 #include <mach/cthreads.h>
7997 int main() {
7998
7999                                         cthread_fork((void *)0, (void *)0);
8000                                         
8001 ; return 0; }
8002 EOF
8003 if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8004   rm -rf conftest*
8005   ol_cv_cthread_all_load=yes
8006 else
8007   echo "configure: failed program was:" >&5
8008   cat conftest.$ac_ext >&5
8009   rm -rf conftest*
8010   ol_cv_cthread_all_load=no
8011 fi
8012 rm -f conftest*
8013                                                                 LIBS="$save_LIBS"
8014                         
8015 fi
8016
8017 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
8018
8019                         if test $ol_cv_cthread_all_load = yes ; then
8020                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
8021                                 ol_link_threads=mach
8022                         fi
8023                 fi
8024
8025                 if test $ol_link_threads != no ; then
8026                         : check for cthread specific functionality here
8027                         cat >> confdefs.h <<\EOF
8028 #define HAVE_MACH_CTHREADS 1
8029 EOF
8030
8031                 else
8032                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
8033                 fi
8034         fi
8035
8036         if test $ol_with_threads = mach ; then
8037                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
8038         fi
8039 fi
8040
8041 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8042         -o $ol_with_threads = lwp ; then
8043
8044                 for ac_hdr in thread.h synch.h
8045 do
8046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8048 echo "configure:8049: checking for $ac_hdr" >&5
8049 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055 #include <$ac_hdr>
8056 EOF
8057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8058 { (eval echo configure:8059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8060 if test -z "$ac_err"; then
8061   rm -rf conftest*
8062   eval "ac_cv_header_$ac_safe=yes"
8063 else
8064   echo "$ac_err" >&5
8065   echo "configure: failed program was:" >&5
8066   cat conftest.$ac_ext >&5
8067   rm -rf conftest*
8068   eval "ac_cv_header_$ac_safe=no"
8069 fi
8070 rm -f conftest*
8071 fi
8072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8073   echo "$ac_t""yes" 1>&6
8074     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8075   cat >> confdefs.h <<EOF
8076 #define $ac_tr_hdr 1
8077 EOF
8078  
8079 else
8080   echo "$ac_t""no" 1>&6
8081 fi
8082 done
8083
8084         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8085                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8086 echo "configure:8087: checking for thr_create in -lthread" >&5
8087 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
8088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8089   echo $ac_n "(cached) $ac_c" 1>&6
8090 else
8091   ac_save_LIBS="$LIBS"
8092 LIBS="-lthread  $LIBS"
8093 cat > conftest.$ac_ext <<EOF
8094 #line 8095 "configure"
8095 #include "confdefs.h"
8096 /* Override any gcc2 internal prototype to avoid an error.  */
8097 /* We use char because int might match the return type of a gcc2
8098     builtin and then its argument prototype would still apply.  */
8099 char thr_create();
8100
8101 int main() {
8102 thr_create()
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106   rm -rf conftest*
8107   eval "ac_cv_lib_$ac_lib_var=yes"
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=no"
8113 fi
8114 rm -f conftest*
8115 LIBS="$ac_save_LIBS"
8116
8117 fi
8118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8119   echo "$ac_t""yes" 1>&6
8120   have_thr=yes
8121 else
8122   echo "$ac_t""no" 1>&6
8123 have_thr=no
8124 fi
8125
8126
8127                 if test $have_thr = yes ; then
8128                         cat >> confdefs.h <<\EOF
8129 #define HAVE_THR 1
8130 EOF
8131
8132                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8133                         ol_link_threads=thr
8134
8135                         if test $ol_with_yielding_select = auto ; then
8136                                 ol_with_yielding_select=yes
8137                         fi
8138
8139                                                 for ac_func in \
8140                                 thr_setconcurrency \
8141                                 thr_getconcurrency \
8142                         
8143 do
8144 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8145 echo "configure:8146: checking for $ac_func" >&5
8146 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8147   echo $ac_n "(cached) $ac_c" 1>&6
8148 else
8149   cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 /* System header to define __stub macros and hopefully few prototypes,
8153     which can conflict with char $ac_func(); below.  */
8154 #include <assert.h>
8155 /* Override any gcc2 internal prototype to avoid an error.  */
8156 /* We use char because int might match the return type of a gcc2
8157     builtin and then its argument prototype would still apply.  */
8158 char $ac_func();
8159
8160 int main() {
8161
8162 /* The GNU C library defines this for functions which it implements
8163     to always fail with ENOSYS.  Some functions are actually named
8164     something starting with __ and the normal name is an alias.  */
8165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8166 choke me
8167 #else
8168 $ac_func();
8169 #endif
8170
8171 ; return 0; }
8172 EOF
8173 if { (eval echo configure:8174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8174   rm -rf conftest*
8175   eval "ac_cv_func_$ac_func=yes"
8176 else
8177   echo "configure: failed program was:" >&5
8178   cat conftest.$ac_ext >&5
8179   rm -rf conftest*
8180   eval "ac_cv_func_$ac_func=no"
8181 fi
8182 rm -f conftest*
8183 fi
8184
8185 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8186   echo "$ac_t""yes" 1>&6
8187     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8188   cat >> confdefs.h <<EOF
8189 #define $ac_tr_func 1
8190 EOF
8191  
8192 else
8193   echo "$ac_t""no" 1>&6
8194 fi
8195 done
8196
8197                 fi
8198         fi
8199
8200                 for ac_hdr in lwp/lwp.h
8201 do
8202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8204 echo "configure:8205: checking for $ac_hdr" >&5
8205 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8206   echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8208   cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 #include <$ac_hdr>
8212 EOF
8213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8214 { (eval echo configure:8215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8216 if test -z "$ac_err"; then
8217   rm -rf conftest*
8218   eval "ac_cv_header_$ac_safe=yes"
8219 else
8220   echo "$ac_err" >&5
8221   echo "configure: failed program was:" >&5
8222   cat conftest.$ac_ext >&5
8223   rm -rf conftest*
8224   eval "ac_cv_header_$ac_safe=no"
8225 fi
8226 rm -f conftest*
8227 fi
8228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8229   echo "$ac_t""yes" 1>&6
8230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8231   cat >> confdefs.h <<EOF
8232 #define $ac_tr_hdr 1
8233 EOF
8234  
8235 else
8236   echo "$ac_t""no" 1>&6
8237 fi
8238 done
8239
8240         if test $ac_cv_header_lwp_lwp_h = yes ; then
8241                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8242 echo "configure:8243: checking for lwp_create in -llwp" >&5
8243 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
8244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8245   echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247   ac_save_LIBS="$LIBS"
8248 LIBS="-llwp  $LIBS"
8249 cat > conftest.$ac_ext <<EOF
8250 #line 8251 "configure"
8251 #include "confdefs.h"
8252 /* Override any gcc2 internal prototype to avoid an error.  */
8253 /* We use char because int might match the return type of a gcc2
8254     builtin and then its argument prototype would still apply.  */
8255 char lwp_create();
8256
8257 int main() {
8258 lwp_create()
8259 ; return 0; }
8260 EOF
8261 if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8262   rm -rf conftest*
8263   eval "ac_cv_lib_$ac_lib_var=yes"
8264 else
8265   echo "configure: failed program was:" >&5
8266   cat conftest.$ac_ext >&5
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=no"
8269 fi
8270 rm -f conftest*
8271 LIBS="$ac_save_LIBS"
8272
8273 fi
8274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8275   echo "$ac_t""yes" 1>&6
8276   have_lwp=yes
8277 else
8278   echo "$ac_t""no" 1>&6
8279 have_lwp=no
8280 fi
8281
8282
8283                 if test $have_lwp = yes ; then
8284                         cat >> confdefs.h <<\EOF
8285 #define HAVE_LWP 1
8286 EOF
8287
8288                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8289                         ol_link_threads=lwp
8290
8291                         if test $ol_with_yielding_select = auto ; then
8292                                 ol_with_yielding_select=no
8293                         fi
8294                 fi
8295         fi
8296 fi
8297
8298 if test $ol_with_yielding_select = yes ; then
8299         cat >> confdefs.h <<\EOF
8300 #define HAVE_YIELDING_SELECT 1
8301 EOF
8302
8303 fi
8304
8305 if test $ol_with_threads = manual ; then
8306                 ol_link_threads=yes
8307
8308         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8309
8310         for ac_hdr in pthread.h sched.h
8311 do
8312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8314 echo "configure:8315: checking for $ac_hdr" >&5
8315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8316   echo $ac_n "(cached) $ac_c" 1>&6
8317 else
8318   cat > conftest.$ac_ext <<EOF
8319 #line 8320 "configure"
8320 #include "confdefs.h"
8321 #include <$ac_hdr>
8322 EOF
8323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8324 { (eval echo configure:8325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8326 if test -z "$ac_err"; then
8327   rm -rf conftest*
8328   eval "ac_cv_header_$ac_safe=yes"
8329 else
8330   echo "$ac_err" >&5
8331   echo "configure: failed program was:" >&5
8332   cat conftest.$ac_ext >&5
8333   rm -rf conftest*
8334   eval "ac_cv_header_$ac_safe=no"
8335 fi
8336 rm -f conftest*
8337 fi
8338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8339   echo "$ac_t""yes" 1>&6
8340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8341   cat >> confdefs.h <<EOF
8342 #define $ac_tr_hdr 1
8343 EOF
8344  
8345 else
8346   echo "$ac_t""no" 1>&6
8347 fi
8348 done
8349
8350         for ac_func in sched_yield pthread_yield
8351 do
8352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8353 echo "configure:8354: checking for $ac_func" >&5
8354 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8355   echo $ac_n "(cached) $ac_c" 1>&6
8356 else
8357   cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 /* System header to define __stub macros and hopefully few prototypes,
8361     which can conflict with char $ac_func(); below.  */
8362 #include <assert.h>
8363 /* Override any gcc2 internal prototype to avoid an error.  */
8364 /* We use char because int might match the return type of a gcc2
8365     builtin and then its argument prototype would still apply.  */
8366 char $ac_func();
8367
8368 int main() {
8369
8370 /* The GNU C library defines this for functions which it implements
8371     to always fail with ENOSYS.  Some functions are actually named
8372     something starting with __ and the normal name is an alias.  */
8373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8374 choke me
8375 #else
8376 $ac_func();
8377 #endif
8378
8379 ; return 0; }
8380 EOF
8381 if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8382   rm -rf conftest*
8383   eval "ac_cv_func_$ac_func=yes"
8384 else
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   eval "ac_cv_func_$ac_func=no"
8389 fi
8390 rm -f conftest*
8391 fi
8392
8393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8394   echo "$ac_t""yes" 1>&6
8395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8396   cat >> confdefs.h <<EOF
8397 #define $ac_tr_func 1
8398 EOF
8399  
8400 else
8401   echo "$ac_t""no" 1>&6
8402 fi
8403 done
8404
8405         
8406         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8407 echo "configure:8408: checking for LinuxThreads pthread.h" >&5
8408 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
8409   echo $ac_n "(cached) $ac_c" 1>&6
8410 else
8411   cat > conftest.$ac_ext <<EOF
8412 #line 8413 "configure"
8413 #include "confdefs.h"
8414 #include <pthread.h>
8415 EOF
8416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8417   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8418   rm -rf conftest*
8419   ol_cv_header_linux_threads=yes
8420 else
8421   rm -rf conftest*
8422   ol_cv_header_linux_threads=no
8423 fi
8424 rm -f conftest*
8425
8426                 
8427 fi
8428
8429 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8430         if test $ol_cv_header_linux_threads = yes; then
8431                 cat >> confdefs.h <<\EOF
8432 #define HAVE_LINUX_THREADS 1
8433 EOF
8434
8435         fi
8436
8437
8438         for ac_hdr in mach/cthreads.h
8439 do
8440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8442 echo "configure:8443: checking for $ac_hdr" >&5
8443 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8444   echo $ac_n "(cached) $ac_c" 1>&6
8445 else
8446   cat > conftest.$ac_ext <<EOF
8447 #line 8448 "configure"
8448 #include "confdefs.h"
8449 #include <$ac_hdr>
8450 EOF
8451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8452 { (eval echo configure:8453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8454 if test -z "$ac_err"; then
8455   rm -rf conftest*
8456   eval "ac_cv_header_$ac_safe=yes"
8457 else
8458   echo "$ac_err" >&5
8459   echo "configure: failed program was:" >&5
8460   cat conftest.$ac_ext >&5
8461   rm -rf conftest*
8462   eval "ac_cv_header_$ac_safe=no"
8463 fi
8464 rm -f conftest*
8465 fi
8466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8467   echo "$ac_t""yes" 1>&6
8468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8469   cat >> confdefs.h <<EOF
8470 #define $ac_tr_hdr 1
8471 EOF
8472  
8473 else
8474   echo "$ac_t""no" 1>&6
8475 fi
8476 done
8477
8478         for ac_hdr in lwp/lwp.h
8479 do
8480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8482 echo "configure:8483: checking for $ac_hdr" >&5
8483 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8484   echo $ac_n "(cached) $ac_c" 1>&6
8485 else
8486   cat > conftest.$ac_ext <<EOF
8487 #line 8488 "configure"
8488 #include "confdefs.h"
8489 #include <$ac_hdr>
8490 EOF
8491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8492 { (eval echo configure:8493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8494 if test -z "$ac_err"; then
8495   rm -rf conftest*
8496   eval "ac_cv_header_$ac_safe=yes"
8497 else
8498   echo "$ac_err" >&5
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   eval "ac_cv_header_$ac_safe=no"
8503 fi
8504 rm -f conftest*
8505 fi
8506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8507   echo "$ac_t""yes" 1>&6
8508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8509   cat >> confdefs.h <<EOF
8510 #define $ac_tr_hdr 1
8511 EOF
8512  
8513 else
8514   echo "$ac_t""no" 1>&6
8515 fi
8516 done
8517
8518         for ac_hdr in thread.h synch.h
8519 do
8520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8522 echo "configure:8523: checking for $ac_hdr" >&5
8523 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8524   echo $ac_n "(cached) $ac_c" 1>&6
8525 else
8526   cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529 #include <$ac_hdr>
8530 EOF
8531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8532 { (eval echo configure:8533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8534 if test -z "$ac_err"; then
8535   rm -rf conftest*
8536   eval "ac_cv_header_$ac_safe=yes"
8537 else
8538   echo "$ac_err" >&5
8539   echo "configure: failed program was:" >&5
8540   cat conftest.$ac_ext >&5
8541   rm -rf conftest*
8542   eval "ac_cv_header_$ac_safe=no"
8543 fi
8544 rm -f conftest*
8545 fi
8546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8547   echo "$ac_t""yes" 1>&6
8548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8549   cat >> confdefs.h <<EOF
8550 #define $ac_tr_hdr 1
8551 EOF
8552  
8553 else
8554   echo "$ac_t""no" 1>&6
8555 fi
8556 done
8557
8558 fi
8559
8560 if test $ol_link_threads != no ; then  
8561                         cat >> confdefs.h <<\EOF
8562 #define REENTRANT 1
8563 EOF
8564
8565         cat >> confdefs.h <<\EOF
8566 #define _REENTRANT 1
8567 EOF
8568
8569         cat >> confdefs.h <<\EOF
8570 #define THREAD_SAFE 1
8571 EOF
8572
8573         cat >> confdefs.h <<\EOF
8574 #define _THREAD_SAFE 1
8575 EOF
8576
8577         cat >> confdefs.h <<\EOF
8578 #define THREADSAFE 1
8579 EOF
8580
8581         cat >> confdefs.h <<\EOF
8582 #define _THREADSAFE 1
8583 EOF
8584
8585         cat >> confdefs.h <<\EOF
8586 #define _SGI_MP_SOURCE 1
8587 EOF
8588
8589
8590                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8591 echo "configure:8592: checking for thread specific errno" >&5
8592 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
8593   echo $ac_n "(cached) $ac_c" 1>&6
8594 else
8595   
8596                 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <errno.h>
8600 int main() {
8601 errno = 0;
8602 ; return 0; }
8603 EOF
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8605   rm -rf conftest*
8606   ol_cv_errno_thread_specific=yes
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   ol_cv_errno_thread_specific=no
8612 fi
8613 rm -f conftest*
8614         
8615 fi
8616
8617 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8618
8619                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8620 echo "configure:8621: checking for thread specific h_errno" >&5
8621 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   
8625                 cat > conftest.$ac_ext <<EOF
8626 #line 8627 "configure"
8627 #include "confdefs.h"
8628 #include <netdb.h>
8629 int main() {
8630 h_errno = 0;
8631 ; return 0; }
8632 EOF
8633 if { (eval echo configure:8634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8634   rm -rf conftest*
8635   ol_cv_h_errno_thread_specific=yes
8636 else
8637   echo "configure: failed program was:" >&5
8638   cat conftest.$ac_ext >&5
8639   rm -rf conftest*
8640   ol_cv_h_errno_thread_specific=no
8641 fi
8642 rm -f conftest*
8643         
8644 fi
8645
8646 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8647
8648         if test $ol_cv_errno_thread_specific != yes \
8649                 -o $ol_cv_h_errno_thread_specific != yes ; then
8650                 LIBS="$LTHREAD_LIBS $LIBS"
8651                 LTHREAD_LIBS=""
8652         fi
8653
8654 fi  
8655
8656 if test $ol_link_threads = no ; then
8657         if test $ol_with_threads = yes ; then
8658                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8659         fi
8660
8661         if test $ol_with_threads = auto ; then
8662                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8663                 ol_with_threads=no
8664         fi
8665
8666         cat >> confdefs.h <<\EOF
8667 #define NO_THREADS 1
8668 EOF
8669
8670         LTHREAD_LIBS=""
8671 fi
8672
8673 if test $ol_link_threads != no ; then
8674         cat >> confdefs.h <<\EOF
8675 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8676 EOF
8677
8678 fi
8679
8680
8681 ol_link_ldbm=no 
8682 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8683         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8684 echo "configure:8685: checking for DB2 library" >&5
8685 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
8686   echo $ac_n "(cached) $ac_c" 1>&6
8687 else
8688         ol_LIBS="$LIBS"
8689         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8690 echo "configure:8691: checking for db_open in -ldb" >&5
8691 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
8692 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8693   echo $ac_n "(cached) $ac_c" 1>&6
8694 else
8695   ac_save_LIBS="$LIBS"
8696 LIBS="-ldb  $LIBS"
8697 cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 /* Override any gcc2 internal prototype to avoid an error.  */
8701 /* We use char because int might match the return type of a gcc2
8702     builtin and then its argument prototype would still apply.  */
8703 char db_open();
8704
8705 int main() {
8706 db_open()
8707 ; return 0; }
8708 EOF
8709 if { (eval echo configure:8710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8710   rm -rf conftest*
8711   eval "ac_cv_lib_$ac_lib_var=yes"
8712 else
8713   echo "configure: failed program was:" >&5
8714   cat conftest.$ac_ext >&5
8715   rm -rf conftest*
8716   eval "ac_cv_lib_$ac_lib_var=no"
8717 fi
8718 rm -f conftest*
8719 LIBS="$ac_save_LIBS"
8720
8721 fi
8722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8723   echo "$ac_t""yes" 1>&6
8724   ol_cv_lib_db2=-ldb
8725 else
8726   echo "$ac_t""no" 1>&6
8727 ol_cv_lib_db2=no
8728 fi
8729
8730         LIBS="$ol_LIBS"
8731
8732 fi
8733
8734 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8735
8736 for ac_hdr in db.h
8737 do
8738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8740 echo "configure:8741: checking for $ac_hdr" >&5
8741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8742   echo $ac_n "(cached) $ac_c" 1>&6
8743 else
8744   cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 #include <$ac_hdr>
8748 EOF
8749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8750 { (eval echo configure:8751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8752 if test -z "$ac_err"; then
8753   rm -rf conftest*
8754   eval "ac_cv_header_$ac_safe=yes"
8755 else
8756   echo "$ac_err" >&5
8757   echo "configure: failed program was:" >&5
8758   cat conftest.$ac_ext >&5
8759   rm -rf conftest*
8760   eval "ac_cv_header_$ac_safe=no"
8761 fi
8762 rm -f conftest*
8763 fi
8764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8765   echo "$ac_t""yes" 1>&6
8766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8767   cat >> confdefs.h <<EOF
8768 #define $ac_tr_hdr 1
8769 EOF
8770  
8771 else
8772   echo "$ac_t""no" 1>&6
8773 fi
8774 done
8775
8776 if test $ac_cv_header_db_h = yes ; then
8777         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8778 echo "configure:8779: checking if db.h is DB2" >&5
8779 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   
8783                 cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786
8787 #                       include <db.h>
8788                         /* this check could be improved */
8789 #                       ifdef DB_VERSION_MAJOR
8790 #                               if DB_VERSION_MAJOR == 2
8791                                         __db_version_2
8792 #                               endif
8793 #                       endif
8794                 
8795 EOF
8796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8797   egrep "__db_version_2" >/dev/null 2>&1; then
8798   rm -rf conftest*
8799   ol_cv_header_db2=yes
8800 else
8801   rm -rf conftest*
8802   ol_cv_header_db2=no
8803 fi
8804 rm -f conftest*
8805
8806 fi
8807
8808 echo "$ac_t""$ol_cv_header_db2" 1>&6
8809 else
8810         ol_cv_header_db2=no
8811 fi
8812
8813
8814  
8815  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8816 echo "configure:8817: checking for Berkeley DB2" >&5
8817 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
8818   echo $ac_n "(cached) $ac_c" 1>&6
8819 else
8820   
8821         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8822                 ol_cv_berkeley_db2=no
8823         else
8824                 ol_cv_berkeley_db2=yes
8825         fi
8826
8827 fi
8828
8829 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8830  if test $ol_cv_berkeley_db2 = yes ; then
8831         cat >> confdefs.h <<\EOF
8832 #define HAVE_BERKELEY_DB2 1
8833 EOF
8834
8835  fi
8836
8837
8838         if test $ol_cv_berkeley_db2 = yes ; then
8839                 ol_link_ldbm=db2
8840                 ol_with_ldbm_api=db2
8841
8842                 if test $ol_with_ldbm_type = hash ; then
8843                         cat >> confdefs.h <<\EOF
8844 #define LDBM_USE_DBHASH 1
8845 EOF
8846
8847                 else
8848                         cat >> confdefs.h <<\EOF
8849 #define LDBM_USE_DBBTREE 1
8850 EOF
8851
8852                 fi
8853
8854                                                 if test $ol_cv_lib_db2 != yes ; then
8855                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8856                 fi
8857         fi
8858 fi
8859
8860 ol_link_bdb2=no
8861 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8862         ol_link_bdb2=yes
8863 fi
8864
8865 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8866         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8867 echo "configure:8868: checking for Berkeley DB library" >&5
8868 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
8869   echo $ac_n "(cached) $ac_c" 1>&6
8870 else
8871   
8872         for ac_hdr in db1/db.h
8873 do
8874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8876 echo "configure:8877: checking for $ac_hdr" >&5
8877 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8878   echo $ac_n "(cached) $ac_c" 1>&6
8879 else
8880   cat > conftest.$ac_ext <<EOF
8881 #line 8882 "configure"
8882 #include "confdefs.h"
8883 #include <$ac_hdr>
8884 EOF
8885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8886 { (eval echo configure:8887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8888 if test -z "$ac_err"; then
8889   rm -rf conftest*
8890   eval "ac_cv_header_$ac_safe=yes"
8891 else
8892   echo "$ac_err" >&5
8893   echo "configure: failed program was:" >&5
8894   cat conftest.$ac_ext >&5
8895   rm -rf conftest*
8896   eval "ac_cv_header_$ac_safe=no"
8897 fi
8898 rm -f conftest*
8899 fi
8900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8901   echo "$ac_t""yes" 1>&6
8902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8903   cat >> confdefs.h <<EOF
8904 #define $ac_tr_hdr 1
8905 EOF
8906  
8907 else
8908   echo "$ac_t""no" 1>&6
8909 fi
8910 done
8911
8912         ol_LIBS="$LIBS"
8913         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8914 echo "configure:8915: checking for dbopen" >&5
8915 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
8916   echo $ac_n "(cached) $ac_c" 1>&6
8917 else
8918   cat > conftest.$ac_ext <<EOF
8919 #line 8920 "configure"
8920 #include "confdefs.h"
8921 /* System header to define __stub macros and hopefully few prototypes,
8922     which can conflict with char dbopen(); below.  */
8923 #include <assert.h>
8924 /* Override any gcc2 internal prototype to avoid an error.  */
8925 /* We use char because int might match the return type of a gcc2
8926     builtin and then its argument prototype would still apply.  */
8927 char dbopen();
8928
8929 int main() {
8930
8931 /* The GNU C library defines this for functions which it implements
8932     to always fail with ENOSYS.  Some functions are actually named
8933     something starting with __ and the normal name is an alias.  */
8934 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8935 choke me
8936 #else
8937 dbopen();
8938 #endif
8939
8940 ; return 0; }
8941 EOF
8942 if { (eval echo configure:8943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8943   rm -rf conftest*
8944   eval "ac_cv_func_dbopen=yes"
8945 else
8946   echo "configure: failed program was:" >&5
8947   cat conftest.$ac_ext >&5
8948   rm -rf conftest*
8949   eval "ac_cv_func_dbopen=no"
8950 fi
8951 rm -f conftest*
8952 fi
8953
8954 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8955   echo "$ac_t""yes" 1>&6
8956   ol_cv_lib_db=yes
8957 else
8958   echo "$ac_t""no" 1>&6
8959
8960                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8961 echo "configure:8962: checking for dbopen in -ldb1" >&5
8962 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
8963 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8964   echo $ac_n "(cached) $ac_c" 1>&6
8965 else
8966   ac_save_LIBS="$LIBS"
8967 LIBS="-ldb1  $LIBS"
8968 cat > conftest.$ac_ext <<EOF
8969 #line 8970 "configure"
8970 #include "confdefs.h"
8971 /* Override any gcc2 internal prototype to avoid an error.  */
8972 /* We use char because int might match the return type of a gcc2
8973     builtin and then its argument prototype would still apply.  */
8974 char dbopen();
8975
8976 int main() {
8977 dbopen()
8978 ; return 0; }
8979 EOF
8980 if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8981   rm -rf conftest*
8982   eval "ac_cv_lib_$ac_lib_var=yes"
8983 else
8984   echo "configure: failed program was:" >&5
8985   cat conftest.$ac_ext >&5
8986   rm -rf conftest*
8987   eval "ac_cv_lib_$ac_lib_var=no"
8988 fi
8989 rm -f conftest*
8990 LIBS="$ac_save_LIBS"
8991
8992 fi
8993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8994   echo "$ac_t""yes" 1>&6
8995   ol_cv_lib_db=-ldb1
8996 else
8997   echo "$ac_t""no" 1>&6
8998
8999                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
9000 echo "configure:9001: checking for dbopen in -ldb" >&5
9001 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
9002 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9003   echo $ac_n "(cached) $ac_c" 1>&6
9004 else
9005   ac_save_LIBS="$LIBS"
9006 LIBS="-ldb  $LIBS"
9007 cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010 /* Override any gcc2 internal prototype to avoid an error.  */
9011 /* We use char because int might match the return type of a gcc2
9012     builtin and then its argument prototype would still apply.  */
9013 char dbopen();
9014
9015 int main() {
9016 dbopen()
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_lib_$ac_lib_var=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=no"
9027 fi
9028 rm -f conftest*
9029 LIBS="$ac_save_LIBS"
9030
9031 fi
9032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9033   echo "$ac_t""yes" 1>&6
9034   ol_cv_lib_db=-ldb
9035 else
9036   echo "$ac_t""no" 1>&6
9037 ol_cv_lib_db=no
9038 fi
9039
9040                 
9041 fi
9042
9043         
9044 fi
9045
9046         LIBS="$ol_LIBS"
9047
9048 fi
9049
9050 echo "$ac_t""$ol_cv_lib_db" 1>&6
9051
9052
9053 for ac_hdr in db_185.h
9054 do
9055 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9056 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9057 echo "configure:9058: checking for $ac_hdr" >&5
9058 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9059   echo $ac_n "(cached) $ac_c" 1>&6
9060 else
9061   cat > conftest.$ac_ext <<EOF
9062 #line 9063 "configure"
9063 #include "confdefs.h"
9064 #include <$ac_hdr>
9065 EOF
9066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9067 { (eval echo configure:9068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9069 if test -z "$ac_err"; then
9070   rm -rf conftest*
9071   eval "ac_cv_header_$ac_safe=yes"
9072 else
9073   echo "$ac_err" >&5
9074   echo "configure: failed program was:" >&5
9075   cat conftest.$ac_ext >&5
9076   rm -rf conftest*
9077   eval "ac_cv_header_$ac_safe=no"
9078 fi
9079 rm -f conftest*
9080 fi
9081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9082   echo "$ac_t""yes" 1>&6
9083     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9084   cat >> confdefs.h <<EOF
9085 #define $ac_tr_hdr 1
9086 EOF
9087  
9088 else
9089   echo "$ac_t""no" 1>&6
9090 fi
9091 done
9092
9093 if test "$ol_cv_header_db2" = yes ; then
9094         
9095         ol_cv_header_db=$ac_cv_header_db_185_h
9096 else
9097         ol_cv_header_db=$ac_cv_header_db_h
9098 fi
9099
9100
9101  
9102  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9103 echo "configure:9104: checking for Berkeley DB" >&5
9104 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
9105   echo $ac_n "(cached) $ac_c" 1>&6
9106 else
9107   
9108         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9109                 ol_cv_berkeley_db=no
9110         else
9111                 ol_cv_berkeley_db=yes
9112         fi
9113
9114 fi
9115
9116 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9117  if test $ol_cv_berkeley_db = yes ; then
9118         cat >> confdefs.h <<\EOF
9119 #define HAVE_BERKELEY_DB 1
9120 EOF
9121
9122  fi
9123
9124
9125         if test $ol_cv_berkeley_db = yes ; then
9126                 ol_link_ldbm=db
9127                 ol_with_ldbm_api=db
9128
9129                 if test $ol_with_ldbm_type = hash ; then
9130                         cat >> confdefs.h <<\EOF
9131 #define LDBM_USE_DBHASH 1
9132 EOF
9133
9134                 else
9135                         cat >> confdefs.h <<\EOF
9136 #define LDBM_USE_DBBTREE 1
9137 EOF
9138
9139                 fi
9140
9141                                                 if test $ol_cv_lib_db != yes ; then
9142                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9143                 fi
9144         fi
9145 fi
9146
9147 if test $ol_with_ldbm_api = manual ; then
9148                 ol_link_ldbm=yes
9149
9150         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9151
9152         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9153 do
9154 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9155 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9156 echo "configure:9157: checking for $ac_hdr" >&5
9157 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9158   echo $ac_n "(cached) $ac_c" 1>&6
9159 else
9160   cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 #include <$ac_hdr>
9164 EOF
9165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9166 { (eval echo configure:9167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9168 if test -z "$ac_err"; then
9169   rm -rf conftest*
9170   eval "ac_cv_header_$ac_safe=yes"
9171 else
9172   echo "$ac_err" >&5
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_header_$ac_safe=no"
9177 fi
9178 rm -f conftest*
9179 fi
9180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9181   echo "$ac_t""yes" 1>&6
9182     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9183   cat >> confdefs.h <<EOF
9184 #define $ac_tr_hdr 1
9185 EOF
9186  
9187 else
9188   echo "$ac_t""no" 1>&6
9189 fi
9190 done
9191
9192 fi
9193
9194 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9195         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9196         ol_with_ldbm_api=none
9197 fi
9198
9199 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9200         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9201 echo "configure:9202: checking for MDBM library" >&5
9202 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
9203   echo $ac_n "(cached) $ac_c" 1>&6
9204 else
9205         ol_LIBS="$LIBS"
9206         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9207 echo "configure:9208: checking for mdbm_set_chain" >&5
9208 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
9209   echo $ac_n "(cached) $ac_c" 1>&6
9210 else
9211   cat > conftest.$ac_ext <<EOF
9212 #line 9213 "configure"
9213 #include "confdefs.h"
9214 /* System header to define __stub macros and hopefully few prototypes,
9215     which can conflict with char mdbm_set_chain(); below.  */
9216 #include <assert.h>
9217 /* Override any gcc2 internal prototype to avoid an error.  */
9218 /* We use char because int might match the return type of a gcc2
9219     builtin and then its argument prototype would still apply.  */
9220 char mdbm_set_chain();
9221
9222 int main() {
9223
9224 /* The GNU C library defines this for functions which it implements
9225     to always fail with ENOSYS.  Some functions are actually named
9226     something starting with __ and the normal name is an alias.  */
9227 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9228 choke me
9229 #else
9230 mdbm_set_chain();
9231 #endif
9232
9233 ; return 0; }
9234 EOF
9235 if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9236   rm -rf conftest*
9237   eval "ac_cv_func_mdbm_set_chain=yes"
9238 else
9239   echo "configure: failed program was:" >&5
9240   cat conftest.$ac_ext >&5
9241   rm -rf conftest*
9242   eval "ac_cv_func_mdbm_set_chain=no"
9243 fi
9244 rm -f conftest*
9245 fi
9246
9247 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9248   echo "$ac_t""yes" 1>&6
9249   ol_cv_lib_mdbm=yes
9250 else
9251   echo "$ac_t""no" 1>&6
9252
9253                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9254 echo "configure:9255: checking for mdbm_set_chain in -lmdbm" >&5
9255 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
9256 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9257   echo $ac_n "(cached) $ac_c" 1>&6
9258 else
9259   ac_save_LIBS="$LIBS"
9260 LIBS="-lmdbm  $LIBS"
9261 cat > conftest.$ac_ext <<EOF
9262 #line 9263 "configure"
9263 #include "confdefs.h"
9264 /* Override any gcc2 internal prototype to avoid an error.  */
9265 /* We use char because int might match the return type of a gcc2
9266     builtin and then its argument prototype would still apply.  */
9267 char mdbm_set_chain();
9268
9269 int main() {
9270 mdbm_set_chain()
9271 ; return 0; }
9272 EOF
9273 if { (eval echo configure:9274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9274   rm -rf conftest*
9275   eval "ac_cv_lib_$ac_lib_var=yes"
9276 else
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -rf conftest*
9280   eval "ac_cv_lib_$ac_lib_var=no"
9281 fi
9282 rm -f conftest*
9283 LIBS="$ac_save_LIBS"
9284
9285 fi
9286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9287   echo "$ac_t""yes" 1>&6
9288   ol_cv_lib_mdbm=-lmdbm
9289 else
9290   echo "$ac_t""no" 1>&6
9291 ol_cv_lib_mdbm=no
9292 fi
9293
9294         
9295 fi
9296
9297         LIBS="$ol_LIBS"
9298
9299 fi
9300
9301 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9302
9303
9304  for ac_hdr in mdbm.h
9305 do
9306 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9307 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9308 echo "configure:9309: checking for $ac_hdr" >&5
9309 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9310   echo $ac_n "(cached) $ac_c" 1>&6
9311 else
9312   cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315 #include <$ac_hdr>
9316 EOF
9317 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9318 { (eval echo configure:9319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9319 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9320 if test -z "$ac_err"; then
9321   rm -rf conftest*
9322   eval "ac_cv_header_$ac_safe=yes"
9323 else
9324   echo "$ac_err" >&5
9325   echo "configure: failed program was:" >&5
9326   cat conftest.$ac_ext >&5
9327   rm -rf conftest*
9328   eval "ac_cv_header_$ac_safe=no"
9329 fi
9330 rm -f conftest*
9331 fi
9332 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9333   echo "$ac_t""yes" 1>&6
9334     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9335   cat >> confdefs.h <<EOF
9336 #define $ac_tr_hdr 1
9337 EOF
9338  
9339 else
9340   echo "$ac_t""no" 1>&6
9341 fi
9342 done
9343
9344  echo $ac_n "checking for db""... $ac_c" 1>&6
9345 echo "configure:9346: checking for db" >&5
9346 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
9347   echo $ac_n "(cached) $ac_c" 1>&6
9348 else
9349   
9350         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9351                 ol_cv_mdbm=no
9352         else
9353                 ol_cv_mdbm=yes
9354         fi
9355
9356 fi
9357
9358 echo "$ac_t""$ol_cv_mdbm" 1>&6
9359  if test $ol_cv_mdbm = yes ; then
9360         cat >> confdefs.h <<\EOF
9361 #define HAVE_MDBM 1
9362 EOF
9363
9364  fi
9365
9366
9367         if test $ol_cv_mdbm = yes ; then
9368                 ol_link_ldbm=mdbm
9369                 ol_with_ldbm_api=mdbm
9370                 if test $ol_cv_lib_mdbm != yes ; then
9371                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9372                 fi
9373         fi
9374 fi
9375
9376 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9377         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9378 echo "configure:9379: checking for GDBM library" >&5
9379 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
9380   echo $ac_n "(cached) $ac_c" 1>&6
9381 else
9382         ol_LIBS="$LIBS"
9383         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9384 echo "configure:9385: checking for gdbm_open" >&5
9385 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
9386   echo $ac_n "(cached) $ac_c" 1>&6
9387 else
9388   cat > conftest.$ac_ext <<EOF
9389 #line 9390 "configure"
9390 #include "confdefs.h"
9391 /* System header to define __stub macros and hopefully few prototypes,
9392     which can conflict with char gdbm_open(); below.  */
9393 #include <assert.h>
9394 /* Override any gcc2 internal prototype to avoid an error.  */
9395 /* We use char because int might match the return type of a gcc2
9396     builtin and then its argument prototype would still apply.  */
9397 char gdbm_open();
9398
9399 int main() {
9400
9401 /* The GNU C library defines this for functions which it implements
9402     to always fail with ENOSYS.  Some functions are actually named
9403     something starting with __ and the normal name is an alias.  */
9404 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9405 choke me
9406 #else
9407 gdbm_open();
9408 #endif
9409
9410 ; return 0; }
9411 EOF
9412 if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9413   rm -rf conftest*
9414   eval "ac_cv_func_gdbm_open=yes"
9415 else
9416   echo "configure: failed program was:" >&5
9417   cat conftest.$ac_ext >&5
9418   rm -rf conftest*
9419   eval "ac_cv_func_gdbm_open=no"
9420 fi
9421 rm -f conftest*
9422 fi
9423
9424 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9425   echo "$ac_t""yes" 1>&6
9426   ol_cv_lib_gdbm=yes
9427 else
9428   echo "$ac_t""no" 1>&6
9429
9430                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9431 echo "configure:9432: checking for gdbm_open in -lgdbm" >&5
9432 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
9433 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9434   echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436   ac_save_LIBS="$LIBS"
9437 LIBS="-lgdbm  $LIBS"
9438 cat > conftest.$ac_ext <<EOF
9439 #line 9440 "configure"
9440 #include "confdefs.h"
9441 /* Override any gcc2 internal prototype to avoid an error.  */
9442 /* We use char because int might match the return type of a gcc2
9443     builtin and then its argument prototype would still apply.  */
9444 char gdbm_open();
9445
9446 int main() {
9447 gdbm_open()
9448 ; return 0; }
9449 EOF
9450 if { (eval echo configure:9451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9451   rm -rf conftest*
9452   eval "ac_cv_lib_$ac_lib_var=yes"
9453 else
9454   echo "configure: failed program was:" >&5
9455   cat conftest.$ac_ext >&5
9456   rm -rf conftest*
9457   eval "ac_cv_lib_$ac_lib_var=no"
9458 fi
9459 rm -f conftest*
9460 LIBS="$ac_save_LIBS"
9461
9462 fi
9463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9464   echo "$ac_t""yes" 1>&6
9465   ol_cv_lib_gdbm=-lgdbm
9466 else
9467   echo "$ac_t""no" 1>&6
9468 ol_cv_lib_gdbm=no
9469 fi
9470
9471         
9472 fi
9473
9474         LIBS="$ol_LIBS"
9475
9476 fi
9477
9478 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9479
9480
9481  for ac_hdr in gdbm.h
9482 do
9483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9485 echo "configure:9486: checking for $ac_hdr" >&5
9486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9487   echo $ac_n "(cached) $ac_c" 1>&6
9488 else
9489   cat > conftest.$ac_ext <<EOF
9490 #line 9491 "configure"
9491 #include "confdefs.h"
9492 #include <$ac_hdr>
9493 EOF
9494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9495 { (eval echo configure:9496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9497 if test -z "$ac_err"; then
9498   rm -rf conftest*
9499   eval "ac_cv_header_$ac_safe=yes"
9500 else
9501   echo "$ac_err" >&5
9502   echo "configure: failed program was:" >&5
9503   cat conftest.$ac_ext >&5
9504   rm -rf conftest*
9505   eval "ac_cv_header_$ac_safe=no"
9506 fi
9507 rm -f conftest*
9508 fi
9509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9510   echo "$ac_t""yes" 1>&6
9511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9512   cat >> confdefs.h <<EOF
9513 #define $ac_tr_hdr 1
9514 EOF
9515  
9516 else
9517   echo "$ac_t""no" 1>&6
9518 fi
9519 done
9520
9521  echo $ac_n "checking for db""... $ac_c" 1>&6
9522 echo "configure:9523: checking for db" >&5
9523 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526   
9527         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9528                 ol_cv_gdbm=no
9529         else
9530                 ol_cv_gdbm=yes
9531         fi
9532
9533 fi
9534
9535 echo "$ac_t""$ol_cv_gdbm" 1>&6
9536  if test $ol_cv_gdbm = yes ; then
9537         cat >> confdefs.h <<\EOF
9538 #define HAVE_GDBM 1
9539 EOF
9540
9541  fi
9542
9543
9544         if test $ol_cv_gdbm = yes ; then
9545                 ol_link_ldbm=gdbm
9546                 ol_with_ldbm_api=gdbm
9547
9548                 if test $ol_cv_lib_gdbm != yes ; then
9549                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9550                 fi
9551         fi
9552 fi
9553
9554 if test $ol_with_ldbm_api = auto ; then
9555         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9556 elif test $ol_with_ldbm_api = ndbm ; then
9557         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9558 echo "configure:9559: checking for NDBM library" >&5
9559 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
9560   echo $ac_n "(cached) $ac_c" 1>&6
9561 else
9562         ol_LIBS="$LIBS"
9563         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9564 echo "configure:9565: checking for dbm_open" >&5
9565 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568   cat > conftest.$ac_ext <<EOF
9569 #line 9570 "configure"
9570 #include "confdefs.h"
9571 /* System header to define __stub macros and hopefully few prototypes,
9572     which can conflict with char dbm_open(); below.  */
9573 #include <assert.h>
9574 /* Override any gcc2 internal prototype to avoid an error.  */
9575 /* We use char because int might match the return type of a gcc2
9576     builtin and then its argument prototype would still apply.  */
9577 char dbm_open();
9578
9579 int main() {
9580
9581 /* The GNU C library defines this for functions which it implements
9582     to always fail with ENOSYS.  Some functions are actually named
9583     something starting with __ and the normal name is an alias.  */
9584 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9585 choke me
9586 #else
9587 dbm_open();
9588 #endif
9589
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_func_dbm_open=yes"
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   eval "ac_cv_func_dbm_open=no"
9600 fi
9601 rm -f conftest*
9602 fi
9603
9604 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9605   echo "$ac_t""yes" 1>&6
9606   ol_cv_lib_ndbm=yes
9607 else
9608   echo "$ac_t""no" 1>&6
9609
9610                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9611 echo "configure:9612: checking for dbm_open in -lndbm" >&5
9612 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
9613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9614   echo $ac_n "(cached) $ac_c" 1>&6
9615 else
9616   ac_save_LIBS="$LIBS"
9617 LIBS="-lndbm  $LIBS"
9618 cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621 /* Override any gcc2 internal prototype to avoid an error.  */
9622 /* We use char because int might match the return type of a gcc2
9623     builtin and then its argument prototype would still apply.  */
9624 char dbm_open();
9625
9626 int main() {
9627 dbm_open()
9628 ; return 0; }
9629 EOF
9630 if { (eval echo configure:9631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9631   rm -rf conftest*
9632   eval "ac_cv_lib_$ac_lib_var=yes"
9633 else
9634   echo "configure: failed program was:" >&5
9635   cat conftest.$ac_ext >&5
9636   rm -rf conftest*
9637   eval "ac_cv_lib_$ac_lib_var=no"
9638 fi
9639 rm -f conftest*
9640 LIBS="$ac_save_LIBS"
9641
9642 fi
9643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9644   echo "$ac_t""yes" 1>&6
9645   ol_cv_lib_ndbm=-lndbm
9646 else
9647   echo "$ac_t""no" 1>&6
9648
9649                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9650 echo "configure:9651: checking for dbm_open in -ldbm" >&5
9651 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
9652 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9653   echo $ac_n "(cached) $ac_c" 1>&6
9654 else
9655   ac_save_LIBS="$LIBS"
9656 LIBS="-ldbm  $LIBS"
9657 cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660 /* Override any gcc2 internal prototype to avoid an error.  */
9661 /* We use char because int might match the return type of a gcc2
9662     builtin and then its argument prototype would still apply.  */
9663 char dbm_open();
9664
9665 int main() {
9666 dbm_open()
9667 ; return 0; }
9668 EOF
9669 if { (eval echo configure:9670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9670   rm -rf conftest*
9671   eval "ac_cv_lib_$ac_lib_var=yes"
9672 else
9673   echo "configure: failed program was:" >&5
9674   cat conftest.$ac_ext >&5
9675   rm -rf conftest*
9676   eval "ac_cv_lib_$ac_lib_var=no"
9677 fi
9678 rm -f conftest*
9679 LIBS="$ac_save_LIBS"
9680
9681 fi
9682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9683   echo "$ac_t""yes" 1>&6
9684   ol_cv_lib_ndbm=-ldbm
9685 else
9686   echo "$ac_t""no" 1>&6
9687 ol_cv_lib_ndbm=no
9688 fi
9689                 
9690 fi
9691
9692         
9693 fi
9694
9695         LIBS="$ol_LIBS"
9696
9697 fi
9698
9699 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9700
9701
9702  for ac_hdr in ndbm.h
9703 do
9704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9706 echo "configure:9707: checking for $ac_hdr" >&5
9707 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9708   echo $ac_n "(cached) $ac_c" 1>&6
9709 else
9710   cat > conftest.$ac_ext <<EOF
9711 #line 9712 "configure"
9712 #include "confdefs.h"
9713 #include <$ac_hdr>
9714 EOF
9715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9716 { (eval echo configure:9717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9718 if test -z "$ac_err"; then
9719   rm -rf conftest*
9720   eval "ac_cv_header_$ac_safe=yes"
9721 else
9722   echo "$ac_err" >&5
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -rf conftest*
9726   eval "ac_cv_header_$ac_safe=no"
9727 fi
9728 rm -f conftest*
9729 fi
9730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9731   echo "$ac_t""yes" 1>&6
9732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9733   cat >> confdefs.h <<EOF
9734 #define $ac_tr_hdr 1
9735 EOF
9736  
9737 else
9738   echo "$ac_t""no" 1>&6
9739 fi
9740 done
9741
9742  echo $ac_n "checking for db""... $ac_c" 1>&6
9743 echo "configure:9744: checking for db" >&5
9744 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
9745   echo $ac_n "(cached) $ac_c" 1>&6
9746 else
9747   
9748         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9749                 ol_cv_ndbm=no
9750         else
9751                 ol_cv_ndbm=yes
9752         fi
9753
9754 fi
9755
9756 echo "$ac_t""$ol_cv_ndbm" 1>&6
9757  if test $ol_cv_ndbm = yes ; then
9758         cat >> confdefs.h <<\EOF
9759 #define HAVE_NDBM 1
9760 EOF
9761
9762  fi
9763
9764
9765         if test $ol_cv_ndbm = yes ; then
9766                 ol_link_ldbm=ndbm
9767                 ol_with_ldbm_api=ndbm
9768
9769                 if test $ol_cv_lib_ndbm != yes ; then
9770                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9771                 fi
9772         fi
9773 fi
9774
9775 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9776         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9777         if test $ol_enable_ldbm = yes ; then
9778                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9779         fi
9780
9781         echo "configure: warning: disabling LDBM" 1>&2
9782         ol_enable_ldbm=no
9783 fi
9784
9785 if test $ol_enable_wrappers != no ; then
9786         for ac_hdr in tcpd.h
9787 do
9788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9790 echo "configure:9791: checking for $ac_hdr" >&5
9791 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9792   echo $ac_n "(cached) $ac_c" 1>&6
9793 else
9794   cat > conftest.$ac_ext <<EOF
9795 #line 9796 "configure"
9796 #include "confdefs.h"
9797 #include <$ac_hdr>
9798 EOF
9799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9800 { (eval echo configure:9801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9802 if test -z "$ac_err"; then
9803   rm -rf conftest*
9804   eval "ac_cv_header_$ac_safe=yes"
9805 else
9806   echo "$ac_err" >&5
9807   echo "configure: failed program was:" >&5
9808   cat conftest.$ac_ext >&5
9809   rm -rf conftest*
9810   eval "ac_cv_header_$ac_safe=no"
9811 fi
9812 rm -f conftest*
9813 fi
9814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9815   echo "$ac_t""yes" 1>&6
9816     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9817   cat >> confdefs.h <<EOF
9818 #define $ac_tr_hdr 1
9819 EOF
9820  
9821 else
9822   echo "$ac_t""no" 1>&6
9823 fi
9824 done
9825
9826
9827         if test $ac_cv_header_tcpd_h != yes ; then
9828                 have_wrappers=no
9829         else
9830                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9831 echo "configure:9832: checking for main in -lwrap" >&5
9832 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
9833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9834   echo $ac_n "(cached) $ac_c" 1>&6
9835 else
9836   ac_save_LIBS="$LIBS"
9837 LIBS="-lwrap  $LIBS"
9838 cat > conftest.$ac_ext <<EOF
9839 #line 9840 "configure"
9840 #include "confdefs.h"
9841
9842 int main() {
9843 main()
9844 ; return 0; }
9845 EOF
9846 if { (eval echo configure:9847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9847   rm -rf conftest*
9848   eval "ac_cv_lib_$ac_lib_var=yes"
9849 else
9850   echo "configure: failed program was:" >&5
9851   cat conftest.$ac_ext >&5
9852   rm -rf conftest*
9853   eval "ac_cv_lib_$ac_lib_var=no"
9854 fi
9855 rm -f conftest*
9856 LIBS="$ac_save_LIBS"
9857
9858 fi
9859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9860   echo "$ac_t""yes" 1>&6
9861   have_wrappers=yes
9862 else
9863   echo "$ac_t""no" 1>&6
9864 have_wrappers=no
9865 fi
9866
9867         fi
9868
9869         if test $have_wrappers = yes ; then
9870                 cat >> confdefs.h <<\EOF
9871 #define HAVE_TCPD 1
9872 EOF
9873
9874                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9875
9876                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9877 echo "configure:9878: checking for main in -lnsl" >&5
9878 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
9879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9880   echo $ac_n "(cached) $ac_c" 1>&6
9881 else
9882   ac_save_LIBS="$LIBS"
9883 LIBS="-lnsl  $LIBS"
9884 cat > conftest.$ac_ext <<EOF
9885 #line 9886 "configure"
9886 #include "confdefs.h"
9887
9888 int main() {
9889 main()
9890 ; return 0; }
9891 EOF
9892 if { (eval echo configure:9893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9893   rm -rf conftest*
9894   eval "ac_cv_lib_$ac_lib_var=yes"
9895 else
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -rf conftest*
9899   eval "ac_cv_lib_$ac_lib_var=no"
9900 fi
9901 rm -f conftest*
9902 LIBS="$ac_save_LIBS"
9903
9904 fi
9905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9906   echo "$ac_t""yes" 1>&6
9907     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9908     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9909   cat >> confdefs.h <<EOF
9910 #define $ac_tr_lib 1
9911 EOF
9912
9913   LIBS="-lnsl $LIBS"
9914
9915 else
9916   echo "$ac_t""no" 1>&6
9917 fi
9918
9919         else
9920                 echo "configure: warning: could not find -lwrap" 1>&2
9921                 if test $ol_enable_wrappers = yes ; then
9922                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9923                 fi
9924
9925                 echo "configure: warning: disabling wrappers support" 1>&2
9926                 ol_enable_wrappers=no
9927         fi
9928 fi
9929
9930 if test $ol_enable_syslog != no ; then
9931         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9932 echo "configure:9933: checking for openlog" >&5
9933 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
9934   echo $ac_n "(cached) $ac_c" 1>&6
9935 else
9936   cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939 /* System header to define __stub macros and hopefully few prototypes,
9940     which can conflict with char openlog(); below.  */
9941 #include <assert.h>
9942 /* Override any gcc2 internal prototype to avoid an error.  */
9943 /* We use char because int might match the return type of a gcc2
9944     builtin and then its argument prototype would still apply.  */
9945 char openlog();
9946
9947 int main() {
9948
9949 /* The GNU C library defines this for functions which it implements
9950     to always fail with ENOSYS.  Some functions are actually named
9951     something starting with __ and the normal name is an alias.  */
9952 #if defined (__stub_openlog) || defined (__stub___openlog)
9953 choke me
9954 #else
9955 openlog();
9956 #endif
9957
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   eval "ac_cv_func_openlog=yes"
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   eval "ac_cv_func_openlog=no"
9968 fi
9969 rm -f conftest*
9970 fi
9971
9972 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9973   echo "$ac_t""yes" 1>&6
9974   :
9975 else
9976   echo "$ac_t""no" 1>&6
9977 fi
9978
9979         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9980                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9981         fi
9982         ol_enable_syslog=$ac_cv_func_openlog
9983 fi
9984
9985 if test $ol_enable_dmalloc != no ; then
9986         for ac_hdr in dmalloc.h
9987 do
9988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9990 echo "configure:9991: checking for $ac_hdr" >&5
9991 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9992   echo $ac_n "(cached) $ac_c" 1>&6
9993 else
9994   cat > conftest.$ac_ext <<EOF
9995 #line 9996 "configure"
9996 #include "confdefs.h"
9997 #include <$ac_hdr>
9998 EOF
9999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10000 { (eval echo configure:10001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10002 if test -z "$ac_err"; then
10003   rm -rf conftest*
10004   eval "ac_cv_header_$ac_safe=yes"
10005 else
10006   echo "$ac_err" >&5
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   eval "ac_cv_header_$ac_safe=no"
10011 fi
10012 rm -f conftest*
10013 fi
10014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10015   echo "$ac_t""yes" 1>&6
10016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10017   cat >> confdefs.h <<EOF
10018 #define $ac_tr_hdr 1
10019 EOF
10020  
10021 else
10022   echo "$ac_t""no" 1>&6
10023 fi
10024 done
10025
10026         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
10027 echo "configure:10028: checking for dmalloc_shutdown in -ldmalloc" >&5
10028 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
10029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10030   echo $ac_n "(cached) $ac_c" 1>&6
10031 else
10032   ac_save_LIBS="$LIBS"
10033 LIBS="-ldmalloc  $LIBS"
10034 cat > conftest.$ac_ext <<EOF
10035 #line 10036 "configure"
10036 #include "confdefs.h"
10037 /* Override any gcc2 internal prototype to avoid an error.  */
10038 /* We use char because int might match the return type of a gcc2
10039     builtin and then its argument prototype would still apply.  */
10040 char dmalloc_shutdown();
10041
10042 int main() {
10043 dmalloc_shutdown()
10044 ; return 0; }
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10047   rm -rf conftest*
10048   eval "ac_cv_lib_$ac_lib_var=yes"
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   eval "ac_cv_lib_$ac_lib_var=no"
10054 fi
10055 rm -f conftest*
10056 LIBS="$ac_save_LIBS"
10057
10058 fi
10059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10060   echo "$ac_t""yes" 1>&6
10061     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10062     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10063   cat >> confdefs.h <<EOF
10064 #define $ac_tr_lib 1
10065 EOF
10066
10067   LIBS="-ldmalloc $LIBS"
10068
10069 else
10070   echo "$ac_t""no" 1>&6
10071 fi
10072
10073 fi
10074
10075 if test $ol_enable_tcl != no ; then
10076         for ac_hdr in tcl.h
10077 do
10078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10080 echo "configure:10081: checking for $ac_hdr" >&5
10081 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10082   echo $ac_n "(cached) $ac_c" 1>&6
10083 else
10084   cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include <$ac_hdr>
10088 EOF
10089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10090 { (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10092 if test -z "$ac_err"; then
10093   rm -rf conftest*
10094   eval "ac_cv_header_$ac_safe=yes"
10095 else
10096   echo "$ac_err" >&5
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_header_$ac_safe=no"
10101 fi
10102 rm -f conftest*
10103 fi
10104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10105   echo "$ac_t""yes" 1>&6
10106     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10107   cat >> confdefs.h <<EOF
10108 #define $ac_tr_hdr 1
10109 EOF
10110  
10111 else
10112   echo "$ac_t""no" 1>&6
10113 fi
10114 done
10115
10116
10117         if test $ac_cv_header_tcl_h != yes ; then
10118                 have_tcl=no
10119         else
10120                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10121 echo "configure:10122: checking for main in -ltcl" >&5
10122 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
10123 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10124   echo $ac_n "(cached) $ac_c" 1>&6
10125 else
10126   ac_save_LIBS="$LIBS"
10127 LIBS="-ltcl  $LIBS"
10128 cat > conftest.$ac_ext <<EOF
10129 #line 10130 "configure"
10130 #include "confdefs.h"
10131
10132 int main() {
10133 main()
10134 ; return 0; }
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10137   rm -rf conftest*
10138   eval "ac_cv_lib_$ac_lib_var=yes"
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   eval "ac_cv_lib_$ac_lib_var=no"
10144 fi
10145 rm -f conftest*
10146 LIBS="$ac_save_LIBS"
10147
10148 fi
10149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10150   echo "$ac_t""yes" 1>&6
10151   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10152 else
10153   echo "$ac_t""no" 1>&6
10154 have_tcl=no
10155 fi
10156
10157
10158                 if test $have_tcl != yes; then
10159                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10160 echo "configure:10161: checking for main in -ltcl7.6" >&5
10161 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
10162 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10163   echo $ac_n "(cached) $ac_c" 1>&6
10164 else
10165   ac_save_LIBS="$LIBS"
10166 LIBS="-ltcl7.6  $LIBS"
10167 cat > conftest.$ac_ext <<EOF
10168 #line 10169 "configure"
10169 #include "confdefs.h"
10170
10171 int main() {
10172 main()
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_lib_$ac_lib_var=no"
10183 fi
10184 rm -f conftest*
10185 LIBS="$ac_save_LIBS"
10186
10187 fi
10188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10191 else
10192   echo "$ac_t""no" 1>&6
10193 have_tcl=no
10194 fi
10195
10196                 fi
10197
10198                 if test $have_tcl != yes; then
10199                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10200 echo "configure:10201: checking for main in -ltcl8.0" >&5
10201 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
10202 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10203   echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205   ac_save_LIBS="$LIBS"
10206 LIBS="-ltcl8.0  $LIBS"
10207 cat > conftest.$ac_ext <<EOF
10208 #line 10209 "configure"
10209 #include "confdefs.h"
10210
10211 int main() {
10212 main()
10213 ; return 0; }
10214 EOF
10215 if { (eval echo configure:10216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10216   rm -rf conftest*
10217   eval "ac_cv_lib_$ac_lib_var=yes"
10218 else
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_lib_$ac_lib_var=no"
10223 fi
10224 rm -f conftest*
10225 LIBS="$ac_save_LIBS"
10226
10227 fi
10228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10229   echo "$ac_t""yes" 1>&6
10230   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10231 else
10232   echo "$ac_t""no" 1>&6
10233 have_tcl=no
10234 fi
10235
10236                 fi
10237         fi
10238
10239         if test $have_tcl != yes ; then
10240                 echo "configure: warning: could not find -ltcl" 1>&2
10241                 if test $ol_enable_tcl = yes ; then
10242                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10243                 fi
10244
10245                 ol_enable_tcl=no
10246         fi
10247 fi
10248
10249 # ud needs termcap (should insert check here)
10250 ol_link_termcap=no
10251 for ac_hdr in termcap.h ncurses.h
10252 do
10253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10255 echo "configure:10256: checking for $ac_hdr" >&5
10256 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10257   echo $ac_n "(cached) $ac_c" 1>&6
10258 else
10259   cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 #include <$ac_hdr>
10263 EOF
10264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10265 { (eval echo configure:10266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10267 if test -z "$ac_err"; then
10268   rm -rf conftest*
10269   eval "ac_cv_header_$ac_safe=yes"
10270 else
10271   echo "$ac_err" >&5
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   eval "ac_cv_header_$ac_safe=no"
10276 fi
10277 rm -f conftest*
10278 fi
10279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10280   echo "$ac_t""yes" 1>&6
10281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10282   cat >> confdefs.h <<EOF
10283 #define $ac_tr_hdr 1
10284 EOF
10285  
10286 else
10287   echo "$ac_t""no" 1>&6
10288 fi
10289 done
10290
10291
10292 if test $ol_link_termcap = no ; then
10293         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10294 echo "configure:10295: checking for tputs in -ltermcap" >&5
10295 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
10296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   ac_save_LIBS="$LIBS"
10300 LIBS="-ltermcap  $LIBS"
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 /* Override any gcc2 internal prototype to avoid an error.  */
10305 /* We use char because int might match the return type of a gcc2
10306     builtin and then its argument prototype would still apply.  */
10307 char tputs();
10308
10309 int main() {
10310 tputs()
10311 ; return 0; }
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10314   rm -rf conftest*
10315   eval "ac_cv_lib_$ac_lib_var=yes"
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -rf conftest*
10320   eval "ac_cv_lib_$ac_lib_var=no"
10321 fi
10322 rm -f conftest*
10323 LIBS="$ac_save_LIBS"
10324
10325 fi
10326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10327   echo "$ac_t""yes" 1>&6
10328   have_termcap=yes
10329 else
10330   echo "$ac_t""no" 1>&6
10331 have_termcap=no
10332 fi
10333
10334         if test $have_termcap = yes ; then
10335                 cat >> confdefs.h <<\EOF
10336 #define HAVE_TERMCAP 1
10337 EOF
10338
10339                 ol_link_termcap=yes
10340                 TERMCAP_LIBS=-ltermcap
10341         fi
10342 fi
10343
10344 if test $ol_link_termcap = no ; then
10345         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10346 echo "configure:10347: checking for initscr in -lncurses" >&5
10347 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
10348 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10349   echo $ac_n "(cached) $ac_c" 1>&6
10350 else
10351   ac_save_LIBS="$LIBS"
10352 LIBS="-lncurses  $LIBS"
10353 cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 /* Override any gcc2 internal prototype to avoid an error.  */
10357 /* We use char because int might match the return type of a gcc2
10358     builtin and then its argument prototype would still apply.  */
10359 char initscr();
10360
10361 int main() {
10362 initscr()
10363 ; return 0; }
10364 EOF
10365 if { (eval echo configure:10366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10366   rm -rf conftest*
10367   eval "ac_cv_lib_$ac_lib_var=yes"
10368 else
10369   echo "configure: failed program was:" >&5
10370   cat conftest.$ac_ext >&5
10371   rm -rf conftest*
10372   eval "ac_cv_lib_$ac_lib_var=no"
10373 fi
10374 rm -f conftest*
10375 LIBS="$ac_save_LIBS"
10376
10377 fi
10378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10379   echo "$ac_t""yes" 1>&6
10380   have_ncurses=yes
10381 else
10382   echo "$ac_t""no" 1>&6
10383 have_ncurses=no
10384 fi
10385
10386         if test $have_ncurses = yes ; then
10387                 cat >> confdefs.h <<\EOF
10388 #define HAVE_NCURSES 1
10389 EOF
10390
10391                 ol_link_termcap=yes
10392                 TERMCAP_LIBS=-lncurses
10393         fi
10394 fi
10395
10396 if test $ol_link_termcap = no ; then
10397         cat >> confdefs.h <<\EOF
10398 #define NO_TERMCAP 1
10399 EOF
10400
10401         TERMCAP_LIBS=
10402 fi
10403
10404 ol_link_sasl=no
10405 if test $ol_with_cyrus_sasl != no ; then
10406         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
10407 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
10408 echo "configure:10409: checking for sasl.h" >&5
10409 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415 #include <sasl.h>
10416 EOF
10417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10418 { (eval echo configure:10419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10420 if test -z "$ac_err"; then
10421   rm -rf conftest*
10422   eval "ac_cv_header_$ac_safe=yes"
10423 else
10424   echo "$ac_err" >&5
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   eval "ac_cv_header_$ac_safe=no"
10429 fi
10430 rm -f conftest*
10431 fi
10432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10433   echo "$ac_t""yes" 1>&6
10434   :
10435 else
10436   echo "$ac_t""no" 1>&6
10437 fi
10438
10439
10440         if test $ac_cv_header_sasl_h = yes ; then
10441                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
10442 echo "configure:10443: checking for sasl_client_init in -lsasl" >&5
10443 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-%__p_%'`
10444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   ac_save_LIBS="$LIBS"
10448 LIBS="-lsasl  $LIBS"
10449 cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452 /* Override any gcc2 internal prototype to avoid an error.  */
10453 /* We use char because int might match the return type of a gcc2
10454     builtin and then its argument prototype would still apply.  */
10455 char sasl_client_init();
10456
10457 int main() {
10458 sasl_client_init()
10459 ; return 0; }
10460 EOF
10461 if { (eval echo configure:10462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10462   rm -rf conftest*
10463   eval "ac_cv_lib_$ac_lib_var=yes"
10464 else
10465   echo "configure: failed program was:" >&5
10466   cat conftest.$ac_ext >&5
10467   rm -rf conftest*
10468   eval "ac_cv_lib_$ac_lib_var=no"
10469 fi
10470 rm -f conftest*
10471 LIBS="$ac_save_LIBS"
10472
10473 fi
10474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10475   echo "$ac_t""yes" 1>&6
10476   have_cyrus_sasl=yes
10477 else
10478   echo "$ac_t""no" 1>&6
10479 have_cyrus_sasl=no
10480 fi
10481
10482
10483                 if test $have_cyrus_sasl != no ; then
10484                         SASL_LIBS="-lsasl"
10485                         cat >> confdefs.h <<\EOF
10486 #define HAVE_CYRUS_SASL 1
10487 EOF
10488
10489                         ol_link_sasl=yes
10490                 fi
10491         fi
10492
10493         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
10494                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
10495         fi
10496 fi
10497
10498 ol_link_fetch=no
10499 if test $ol_with_fetch != no ; then
10500         ol=$LIBS
10501 LIBS="-lfetch -lcom_err $LIBS"
10502 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10503 echo "configure:10504: checking fetch(3) library" >&5
10504 if eval "test \"`echo '$''{'ol_cv_lib_fetch'+set}'`\" = set"; then
10505   echo $ac_n "(cached) $ac_c" 1>&6
10506 else
10507   
10508         cat > conftest.$ac_ext <<EOF
10509 #line 10510 "configure"
10510 #include "confdefs.h"
10511
10512 #include <sys/param.h>
10513 #include <stdio.h>
10514 #include <fetch.h>
10515 int main() {
10516 struct url *u = fetchParseURL("file:///"); 
10517 ; return 0; }
10518 EOF
10519 if { (eval echo configure:10520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10520   rm -rf conftest*
10521   ol_cv_lib_fetch=yes
10522 else
10523   echo "configure: failed program was:" >&5
10524   cat conftest.$ac_ext >&5
10525   rm -rf conftest*
10526   ol_cv_lib_fetch=no
10527 fi
10528 rm -f conftest*
10529 fi
10530
10531 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10532 LIBS=$ol_LIBS
10533 if test $ol_cv_lib_fetch != no ; then
10534         ol_link_fetch="-lfetch -lcom_err"
10535         cat >> confdefs.h <<\EOF
10536 #define HAVE_FETCH 1
10537 EOF
10538
10539 fi
10540
10541
10542         if test $ol_cv_lib_fetch != no ; then
10543                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10544                 ol_link_fetch=freebsd
10545
10546         elif test $ol_with_fetch != auto ; then
10547                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
10548         fi 
10549 fi
10550
10551 ol_link_readline=no
10552 if test $ol_with_readline != no ; then
10553         for ac_hdr in readline/readline.h readline/history.h
10554 do
10555 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10556 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10557 echo "configure:10558: checking for $ac_hdr" >&5
10558 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10559   echo $ac_n "(cached) $ac_c" 1>&6
10560 else
10561   cat > conftest.$ac_ext <<EOF
10562 #line 10563 "configure"
10563 #include "confdefs.h"
10564 #include <$ac_hdr>
10565 EOF
10566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10567 { (eval echo configure:10568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10569 if test -z "$ac_err"; then
10570   rm -rf conftest*
10571   eval "ac_cv_header_$ac_safe=yes"
10572 else
10573   echo "$ac_err" >&5
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_header_$ac_safe=no"
10578 fi
10579 rm -f conftest*
10580 fi
10581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10582   echo "$ac_t""yes" 1>&6
10583     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10584   cat >> confdefs.h <<EOF
10585 #define $ac_tr_hdr 1
10586 EOF
10587  
10588 else
10589   echo "$ac_t""no" 1>&6
10590 fi
10591 done
10592
10593
10594         if test $ac_cv_header_readline_readline_h = yes ; then
10595                 save_LIBS="$LIBS"
10596                 LIBS="$TERMCAP_LIBS $LIBS"
10597                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10598 echo "configure:10599: checking for readline in -lreadline" >&5
10599 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
10600 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10601   echo $ac_n "(cached) $ac_c" 1>&6
10602 else
10603   ac_save_LIBS="$LIBS"
10604 LIBS="-lreadline  $LIBS"
10605 cat > conftest.$ac_ext <<EOF
10606 #line 10607 "configure"
10607 #include "confdefs.h"
10608 /* Override any gcc2 internal prototype to avoid an error.  */
10609 /* We use char because int might match the return type of a gcc2
10610     builtin and then its argument prototype would still apply.  */
10611 char readline();
10612
10613 int main() {
10614 readline()
10615 ; return 0; }
10616 EOF
10617 if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=yes"
10620 else
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -rf conftest*
10624   eval "ac_cv_lib_$ac_lib_var=no"
10625 fi
10626 rm -f conftest*
10627 LIBS="$ac_save_LIBS"
10628
10629 fi
10630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10631   echo "$ac_t""yes" 1>&6
10632   have_readline=yes
10633 else
10634   echo "$ac_t""no" 1>&6
10635 have_readline=no
10636 fi
10637
10638                 LIBS="$save_LIBS"
10639                         
10640                 if test $have_readline = yes ; then
10641                         ol_with_readline=found
10642                         ol_link_readline=yes
10643
10644                         READLINE_LIBS="-lreadline"
10645                 fi
10646         fi
10647 fi
10648
10649 if test $ol_link_readline = yes ; then
10650         cat >> confdefs.h <<\EOF
10651 #define HAVE_READLINE 1
10652 EOF
10653
10654 fi
10655
10656
10657 # FreeBSD (and others) have crypt(3) in -lcrypt
10658 if test $ol_enable_crypt != no ; then
10659         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10660 echo "configure:10661: checking for crypt" >&5
10661 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
10662   echo $ac_n "(cached) $ac_c" 1>&6
10663 else
10664   cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667 /* System header to define __stub macros and hopefully few prototypes,
10668     which can conflict with char crypt(); below.  */
10669 #include <assert.h>
10670 /* Override any gcc2 internal prototype to avoid an error.  */
10671 /* We use char because int might match the return type of a gcc2
10672     builtin and then its argument prototype would still apply.  */
10673 char crypt();
10674
10675 int main() {
10676
10677 /* The GNU C library defines this for functions which it implements
10678     to always fail with ENOSYS.  Some functions are actually named
10679     something starting with __ and the normal name is an alias.  */
10680 #if defined (__stub_crypt) || defined (__stub___crypt)
10681 choke me
10682 #else
10683 crypt();
10684 #endif
10685
10686 ; return 0; }
10687 EOF
10688 if { (eval echo configure:10689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10689   rm -rf conftest*
10690   eval "ac_cv_func_crypt=yes"
10691 else
10692   echo "configure: failed program was:" >&5
10693   cat conftest.$ac_ext >&5
10694   rm -rf conftest*
10695   eval "ac_cv_func_crypt=no"
10696 fi
10697 rm -f conftest*
10698 fi
10699
10700 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10701   echo "$ac_t""yes" 1>&6
10702   have_crypt=yes
10703 else
10704   echo "$ac_t""no" 1>&6
10705
10706                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10707 echo "configure:10708: checking for crypt in -lcrypt" >&5
10708 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10710   echo $ac_n "(cached) $ac_c" 1>&6
10711 else
10712   ac_save_LIBS="$LIBS"
10713 LIBS="-lcrypt  $LIBS"
10714 cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717 /* Override any gcc2 internal prototype to avoid an error.  */
10718 /* We use char because int might match the return type of a gcc2
10719     builtin and then its argument prototype would still apply.  */
10720 char crypt();
10721
10722 int main() {
10723 crypt()
10724 ; return 0; }
10725 EOF
10726 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=yes"
10729 else
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_lib_$ac_lib_var=no"
10734 fi
10735 rm -f conftest*
10736 LIBS="$ac_save_LIBS"
10737
10738 fi
10739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10740   echo "$ac_t""yes" 1>&6
10741   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10742                         have_crypt=yes
10743 else
10744   echo "$ac_t""no" 1>&6
10745 have_crypt=no
10746 fi
10747
10748 fi
10749
10750
10751         if test $have_crypt = yes ; then
10752                 cat >> confdefs.h <<\EOF
10753 #define HAVE_CRYPT 1
10754 EOF
10755
10756         else
10757                 echo "configure: warning: could not find crypt" 1>&2
10758                 if test $ol_enable_crypt = yes ; then
10759                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10760                 fi
10761
10762                 echo "configure: warning: disabling crypt support" 1>&2
10763                 ol_enable_crypt=no
10764         fi
10765 fi
10766
10767 # FreeBSD (and others) have setproctitle(3) in -lutil
10768 if test $ol_enable_proctitle != no ; then
10769         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10770 echo "configure:10771: checking for setproctitle" >&5
10771 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
10772   echo $ac_n "(cached) $ac_c" 1>&6
10773 else
10774   cat > conftest.$ac_ext <<EOF
10775 #line 10776 "configure"
10776 #include "confdefs.h"
10777 /* System header to define __stub macros and hopefully few prototypes,
10778     which can conflict with char setproctitle(); below.  */
10779 #include <assert.h>
10780 /* Override any gcc2 internal prototype to avoid an error.  */
10781 /* We use char because int might match the return type of a gcc2
10782     builtin and then its argument prototype would still apply.  */
10783 char setproctitle();
10784
10785 int main() {
10786
10787 /* The GNU C library defines this for functions which it implements
10788     to always fail with ENOSYS.  Some functions are actually named
10789     something starting with __ and the normal name is an alias.  */
10790 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10791 choke me
10792 #else
10793 setproctitle();
10794 #endif
10795
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10799   rm -rf conftest*
10800   eval "ac_cv_func_setproctitle=yes"
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   eval "ac_cv_func_setproctitle=no"
10806 fi
10807 rm -f conftest*
10808 fi
10809
10810 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10811   echo "$ac_t""yes" 1>&6
10812   have_setproctitle=yes
10813 else
10814   echo "$ac_t""no" 1>&6
10815
10816                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10817 echo "configure:10818: checking for setproctitle in -lutil" >&5
10818 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
10819 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   ac_save_LIBS="$LIBS"
10823 LIBS="-lutil  $LIBS"
10824 cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 /* Override any gcc2 internal prototype to avoid an error.  */
10828 /* We use char because int might match the return type of a gcc2
10829     builtin and then its argument prototype would still apply.  */
10830 char setproctitle();
10831
10832 int main() {
10833 setproctitle()
10834 ; return 0; }
10835 EOF
10836 if { (eval echo configure:10837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10837   rm -rf conftest*
10838   eval "ac_cv_lib_$ac_lib_var=yes"
10839 else
10840   echo "configure: failed program was:" >&5
10841   cat conftest.$ac_ext >&5
10842   rm -rf conftest*
10843   eval "ac_cv_lib_$ac_lib_var=no"
10844 fi
10845 rm -f conftest*
10846 LIBS="$ac_save_LIBS"
10847
10848 fi
10849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10850   echo "$ac_t""yes" 1>&6
10851   have_setproctitle=yes
10852                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10853 else
10854   echo "$ac_t""no" 1>&6
10855 have_setproctitle=no
10856                         LIBOBJS="$LIBOBJS setproctitle.o"
10857 fi
10858
10859 fi
10860
10861
10862         if test $have_setproctitle = yes ; then
10863                 cat >> confdefs.h <<\EOF
10864 #define HAVE_SETPROCTITLE 1
10865 EOF
10866
10867         fi
10868 fi
10869
10870 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10871 echo "configure:10872: checking for uid_t in sys/types.h" >&5
10872 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   cat > conftest.$ac_ext <<EOF
10876 #line 10877 "configure"
10877 #include "confdefs.h"
10878 #include <sys/types.h>
10879 EOF
10880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10881   egrep "uid_t" >/dev/null 2>&1; then
10882   rm -rf conftest*
10883   ac_cv_type_uid_t=yes
10884 else
10885   rm -rf conftest*
10886   ac_cv_type_uid_t=no
10887 fi
10888 rm -f conftest*
10889
10890 fi
10891
10892 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10893 if test $ac_cv_type_uid_t = no; then
10894   cat >> confdefs.h <<\EOF
10895 #define uid_t int
10896 EOF
10897
10898   cat >> confdefs.h <<\EOF
10899 #define gid_t int
10900 EOF
10901
10902 fi
10903
10904 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10905 echo "configure:10906: checking type of array argument to getgroups" >&5
10906 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
10907   echo $ac_n "(cached) $ac_c" 1>&6
10908 else
10909   if test "$cross_compiling" = yes; then
10910   ac_cv_type_getgroups=cross
10911 else
10912   cat > conftest.$ac_ext <<EOF
10913 #line 10914 "configure"
10914 #include "confdefs.h"
10915
10916 /* Thanks to Mike Rendell for this test.  */
10917 #include <sys/types.h>
10918 #define NGID 256
10919 #undef MAX
10920 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10921 main()
10922 {
10923   gid_t gidset[NGID];
10924   int i, n;
10925   union { gid_t gval; long lval; }  val;
10926
10927   val.lval = -1;
10928   for (i = 0; i < NGID; i++)
10929     gidset[i] = val.gval;
10930   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10931                  gidset);
10932   /* Exit non-zero if getgroups seems to require an array of ints.  This
10933      happens when gid_t is short but getgroups modifies an array of ints.  */
10934   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10935 }
10936
10937 EOF
10938 if { (eval echo configure:10939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10939 then
10940     ac_cv_type_getgroups=gid_t
10941 else
10942   echo "configure: failed program was:" >&5
10943   cat conftest.$ac_ext >&5
10944   rm -fr conftest*
10945   ac_cv_type_getgroups=int
10946 fi
10947 rm -fr conftest*
10948 fi
10949
10950 if test $ac_cv_type_getgroups = cross; then
10951         cat > conftest.$ac_ext <<EOF
10952 #line 10953 "configure"
10953 #include "confdefs.h"
10954 #include <unistd.h>
10955 EOF
10956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10957   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10958   rm -rf conftest*
10959   ac_cv_type_getgroups=gid_t
10960 else
10961   rm -rf conftest*
10962   ac_cv_type_getgroups=int
10963 fi
10964 rm -f conftest*
10965
10966 fi
10967 fi
10968
10969 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10970 cat >> confdefs.h <<EOF
10971 #define GETGROUPS_T $ac_cv_type_getgroups
10972 EOF
10973
10974  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10975 echo "configure:10976: checking for ANSI C header files" >&5
10976 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
10977   echo $ac_n "(cached) $ac_c" 1>&6
10978 else
10979   cat > conftest.$ac_ext <<EOF
10980 #line 10981 "configure"
10981 #include "confdefs.h"
10982 #include <stdlib.h>
10983 #include <stdarg.h>
10984 #include <string.h>
10985 #include <float.h>
10986 EOF
10987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10988 { (eval echo configure:10989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10990 if test -z "$ac_err"; then
10991   rm -rf conftest*
10992   ac_cv_header_stdc=yes
10993 else
10994   echo "$ac_err" >&5
10995   echo "configure: failed program was:" >&5
10996   cat conftest.$ac_ext >&5
10997   rm -rf conftest*
10998   ac_cv_header_stdc=no
10999 fi
11000 rm -f conftest*
11001
11002 if test $ac_cv_header_stdc = yes; then
11003   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11004 cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007 #include <string.h>
11008 EOF
11009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11010   egrep "memchr" >/dev/null 2>&1; then
11011   :
11012 else
11013   rm -rf conftest*
11014   ac_cv_header_stdc=no
11015 fi
11016 rm -f conftest*
11017
11018 fi
11019
11020 if test $ac_cv_header_stdc = yes; then
11021   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11022 cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025 #include <stdlib.h>
11026 EOF
11027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11028   egrep "free" >/dev/null 2>&1; then
11029   :
11030 else
11031   rm -rf conftest*
11032   ac_cv_header_stdc=no
11033 fi
11034 rm -f conftest*
11035
11036 fi
11037
11038 if test $ac_cv_header_stdc = yes; then
11039   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11040 if test "$cross_compiling" = yes; then
11041   :
11042 else
11043   cat > conftest.$ac_ext <<EOF
11044 #line 11045 "configure"
11045 #include "confdefs.h"
11046 #include <ctype.h>
11047 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11048 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11049 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11050 int main () { int i; for (i = 0; i < 256; i++)
11051 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
11052 exit (0); }
11053
11054 EOF
11055 if { (eval echo configure:11056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11056 then
11057   :
11058 else
11059   echo "configure: failed program was:" >&5
11060   cat conftest.$ac_ext >&5
11061   rm -fr conftest*
11062   ac_cv_header_stdc=no
11063 fi
11064 rm -fr conftest*
11065 fi
11066
11067 fi
11068 fi
11069
11070 echo "$ac_t""$ac_cv_header_stdc" 1>&6
11071 if test $ac_cv_header_stdc = yes; then
11072   cat >> confdefs.h <<\EOF
11073 #define STDC_HEADERS 1
11074 EOF
11075
11076 fi
11077
11078 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
11079 echo "configure:11080: checking for mode_t" >&5
11080 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
11081   echo $ac_n "(cached) $ac_c" 1>&6
11082 else
11083   cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 #include <sys/types.h>
11087 #if STDC_HEADERS
11088 #include <stdlib.h>
11089 #include <stddef.h>
11090 #endif
11091 EOF
11092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11093   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11094   rm -rf conftest*
11095   ac_cv_type_mode_t=yes
11096 else
11097   rm -rf conftest*
11098   ac_cv_type_mode_t=no
11099 fi
11100 rm -f conftest*
11101
11102 fi
11103 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
11104 if test $ac_cv_type_mode_t = no; then
11105   cat >> confdefs.h <<\EOF
11106 #define mode_t int
11107 EOF
11108
11109 fi
11110
11111 echo $ac_n "checking for off_t""... $ac_c" 1>&6
11112 echo "configure:11113: checking for off_t" >&5
11113 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
11114   echo $ac_n "(cached) $ac_c" 1>&6
11115 else
11116   cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119 #include <sys/types.h>
11120 #if STDC_HEADERS
11121 #include <stdlib.h>
11122 #include <stddef.h>
11123 #endif
11124 EOF
11125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11126   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11127   rm -rf conftest*
11128   ac_cv_type_off_t=yes
11129 else
11130   rm -rf conftest*
11131   ac_cv_type_off_t=no
11132 fi
11133 rm -f conftest*
11134
11135 fi
11136 echo "$ac_t""$ac_cv_type_off_t" 1>&6
11137 if test $ac_cv_type_off_t = no; then
11138   cat >> confdefs.h <<\EOF
11139 #define off_t long
11140 EOF
11141
11142 fi
11143
11144 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11145 echo "configure:11146: checking for pid_t" >&5
11146 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
11147   echo $ac_n "(cached) $ac_c" 1>&6
11148 else
11149   cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 #include <sys/types.h>
11153 #if STDC_HEADERS
11154 #include <stdlib.h>
11155 #include <stddef.h>
11156 #endif
11157 EOF
11158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11159   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11160   rm -rf conftest*
11161   ac_cv_type_pid_t=yes
11162 else
11163   rm -rf conftest*
11164   ac_cv_type_pid_t=no
11165 fi
11166 rm -f conftest*
11167
11168 fi
11169 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
11170 if test $ac_cv_type_pid_t = no; then
11171   cat >> confdefs.h <<\EOF
11172 #define pid_t int
11173 EOF
11174
11175 fi
11176
11177 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11178 echo "configure:11179: checking for ptrdiff_t" >&5
11179 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
11180   echo $ac_n "(cached) $ac_c" 1>&6
11181 else
11182   cat > conftest.$ac_ext <<EOF
11183 #line 11184 "configure"
11184 #include "confdefs.h"
11185 #include <stddef.h>
11186 int main() {
11187 ptrdiff_t p
11188 ; return 0; }
11189 EOF
11190 if { (eval echo configure:11191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11191   rm -rf conftest*
11192   am_cv_type_ptrdiff_t=yes
11193 else
11194   echo "configure: failed program was:" >&5
11195   cat conftest.$ac_ext >&5
11196   rm -rf conftest*
11197   am_cv_type_ptrdiff_t=no
11198 fi
11199 rm -f conftest*
11200 fi
11201
11202 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11203    if test $am_cv_type_ptrdiff_t = yes; then
11204      cat >> confdefs.h <<\EOF
11205 #define HAVE_PTRDIFF_T 1
11206 EOF
11207
11208    fi
11209
11210 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11211 echo "configure:11212: checking return type of signal handlers" >&5
11212 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
11213   echo $ac_n "(cached) $ac_c" 1>&6
11214 else
11215   cat > conftest.$ac_ext <<EOF
11216 #line 11217 "configure"
11217 #include "confdefs.h"
11218 #include <sys/types.h>
11219 #include <signal.h>
11220 #ifdef signal
11221 #undef signal
11222 #endif
11223 #ifdef __cplusplus
11224 extern "C" void (*signal (int, void (*)(int)))(int);
11225 #else
11226 void (*signal ()) ();
11227 #endif
11228
11229 int main() {
11230 int i;
11231 ; return 0; }
11232 EOF
11233 if { (eval echo configure:11234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11234   rm -rf conftest*
11235   ac_cv_type_signal=void
11236 else
11237   echo "configure: failed program was:" >&5
11238   cat conftest.$ac_ext >&5
11239   rm -rf conftest*
11240   ac_cv_type_signal=int
11241 fi
11242 rm -f conftest*
11243 fi
11244
11245 echo "$ac_t""$ac_cv_type_signal" 1>&6
11246 cat >> confdefs.h <<EOF
11247 #define RETSIGTYPE $ac_cv_type_signal
11248 EOF
11249
11250
11251 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11252 echo "configure:11253: checking for sig_atomic_t" >&5
11253 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
11254   echo $ac_n "(cached) $ac_c" 1>&6
11255 else
11256   cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 #include <signal.h>
11260 int main() {
11261 sig_atomic_t atomic;
11262 ; return 0; }
11263 EOF
11264 if { (eval echo configure:11265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11265   rm -rf conftest*
11266   ol_cv_type_sig_atomic_t=yes
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   ol_cv_type_sig_atomic_t=no
11272 fi
11273 rm -f conftest*
11274 fi
11275
11276 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11277   if test $ol_cv_type_sig_atomic_t = no; then
11278     cat >> confdefs.h <<\EOF
11279 #define sig_atomic_t int
11280 EOF
11281
11282   fi
11283  
11284 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11285 echo "configure:11286: checking for size_t" >&5
11286 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
11287   echo $ac_n "(cached) $ac_c" 1>&6
11288 else
11289   cat > conftest.$ac_ext <<EOF
11290 #line 11291 "configure"
11291 #include "confdefs.h"
11292 #include <sys/types.h>
11293 #if STDC_HEADERS
11294 #include <stdlib.h>
11295 #include <stddef.h>
11296 #endif
11297 EOF
11298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11299   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11300   rm -rf conftest*
11301   ac_cv_type_size_t=yes
11302 else
11303   rm -rf conftest*
11304   ac_cv_type_size_t=no
11305 fi
11306 rm -f conftest*
11307
11308 fi
11309 echo "$ac_t""$ac_cv_type_size_t" 1>&6
11310 if test $ac_cv_type_size_t = no; then
11311   cat >> confdefs.h <<\EOF
11312 #define size_t unsigned
11313 EOF
11314
11315 fi
11316
11317 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11318 echo "configure:11319: checking for socklen_t" >&5
11319 if eval "test \"`echo '$''{'ol_cv_type_socklen_t'+set}'`\" = set"; then
11320   echo $ac_n "(cached) $ac_c" 1>&6
11321 else
11322   cat > conftest.$ac_ext <<EOF
11323 #line 11324 "configure"
11324 #include "confdefs.h"
11325
11326 #ifdef HAVE_SYS_TYPES_H
11327 #include <sys/types.h>
11328 #endif
11329 #ifdef HAVE_SYS_SOCKET_H
11330 #include <sys/socket.h>
11331 #endif
11332
11333 int main() {
11334 socklen_t len;
11335 ; return 0; }
11336 EOF
11337 if { (eval echo configure:11338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11338   rm -rf conftest*
11339   ol_cv_type_socklen_t=yes
11340 else
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   ol_cv_type_socklen_t=no
11345 fi
11346 rm -f conftest*
11347 fi
11348
11349 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11350   if test $ol_cv_type_socklen_t = no; then
11351     cat >> confdefs.h <<\EOF
11352 #define socklen_t int
11353 EOF
11354
11355   fi
11356  
11357 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11358 echo "configure:11359: checking for st_blksize in struct stat" >&5
11359 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
11360   echo $ac_n "(cached) $ac_c" 1>&6
11361 else
11362   cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365 #include <sys/types.h>
11366 #include <sys/stat.h>
11367 int main() {
11368 struct stat s; s.st_blksize;
11369 ; return 0; }
11370 EOF
11371 if { (eval echo configure:11372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11372   rm -rf conftest*
11373   ac_cv_struct_st_blksize=yes
11374 else
11375   echo "configure: failed program was:" >&5
11376   cat conftest.$ac_ext >&5
11377   rm -rf conftest*
11378   ac_cv_struct_st_blksize=no
11379 fi
11380 rm -f conftest*
11381 fi
11382
11383 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
11384 if test $ac_cv_struct_st_blksize = yes; then
11385   cat >> confdefs.h <<\EOF
11386 #define HAVE_ST_BLKSIZE 1
11387 EOF
11388
11389 fi
11390
11391 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11392 echo "configure:11393: checking whether time.h and sys/time.h may both be included" >&5
11393 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
11394   echo $ac_n "(cached) $ac_c" 1>&6
11395 else
11396   cat > conftest.$ac_ext <<EOF
11397 #line 11398 "configure"
11398 #include "confdefs.h"
11399 #include <sys/types.h>
11400 #include <sys/time.h>
11401 #include <time.h>
11402 int main() {
11403 struct tm *tp;
11404 ; return 0; }
11405 EOF
11406 if { (eval echo configure:11407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11407   rm -rf conftest*
11408   ac_cv_header_time=yes
11409 else
11410   echo "configure: failed program was:" >&5
11411   cat conftest.$ac_ext >&5
11412   rm -rf conftest*
11413   ac_cv_header_time=no
11414 fi
11415 rm -f conftest*
11416 fi
11417
11418 echo "$ac_t""$ac_cv_header_time" 1>&6
11419 if test $ac_cv_header_time = yes; then
11420   cat >> confdefs.h <<\EOF
11421 #define TIME_WITH_SYS_TIME 1
11422 EOF
11423
11424 fi
11425
11426 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11427 echo "configure:11428: checking whether struct tm is in sys/time.h or time.h" >&5
11428 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
11429   echo $ac_n "(cached) $ac_c" 1>&6
11430 else
11431   cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434 #include <sys/types.h>
11435 #include <time.h>
11436 int main() {
11437 struct tm *tp; tp->tm_sec;
11438 ; return 0; }
11439 EOF
11440 if { (eval echo configure:11441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11441   rm -rf conftest*
11442   ac_cv_struct_tm=time.h
11443 else
11444   echo "configure: failed program was:" >&5
11445   cat conftest.$ac_ext >&5
11446   rm -rf conftest*
11447   ac_cv_struct_tm=sys/time.h
11448 fi
11449 rm -f conftest*
11450 fi
11451
11452 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11453 if test $ac_cv_struct_tm = sys/time.h; then
11454   cat >> confdefs.h <<\EOF
11455 #define TM_IN_SYS_TIME 1
11456 EOF
11457
11458 fi
11459
11460 # test for pw_gecos in struct passwd
11461 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11462 echo "configure:11463: checking struct passwd for pw_gecos" >&5
11463 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   
11467         cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470 #include <pwd.h>
11471 int main() {
11472
11473         struct passwd pwd;
11474         pwd.pw_gecos = pwd.pw_name;
11475
11476 ; return 0; }
11477 EOF
11478 if { (eval echo configure:11479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11479   rm -rf conftest*
11480   ol_cv_struct_passwd_pw_gecos=yes
11481 else
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   ol_cv_struct_passwd_pw_gecos=no
11486 fi
11487 rm -f conftest*
11488 fi
11489
11490 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11491 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11492         cat >> confdefs.h <<\EOF
11493 #define HAVE_PW_GECOS 1
11494 EOF
11495
11496 fi
11497
11498 # test for pw_passwd in struct passwd
11499 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11500 echo "configure:11501: checking struct passwd for pw_passwd" >&5
11501 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
11502   echo $ac_n "(cached) $ac_c" 1>&6
11503 else
11504   
11505         cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 #include <pwd.h>
11509 int main() {
11510
11511         struct passwd pwd;
11512         pwd.pw_passwd = pwd.pw_name;
11513
11514 ; return 0; }
11515 EOF
11516 if { (eval echo configure:11517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11517   rm -rf conftest*
11518   ol_cv_struct_passwd_pw_passwd=yes
11519 else
11520   echo "configure: failed program was:" >&5
11521   cat conftest.$ac_ext >&5
11522   rm -rf conftest*
11523   ol_cv_struct_passwd_pw_passwd=no
11524 fi
11525 rm -f conftest*
11526 fi
11527
11528 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11529 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11530         cat >> confdefs.h <<\EOF
11531 #define HAVE_PW_PASSWD 1
11532 EOF
11533
11534 fi
11535
11536
11537 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11538 echo "configure:11539: checking if toupper() requires islower()" >&5
11539 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
11540   echo $ac_n "(cached) $ac_c" 1>&6
11541 else
11542   
11543         if test "$cross_compiling" = yes; then
11544   ol_cv_c_upper_lower=safe
11545 else
11546   cat > conftest.$ac_ext <<EOF
11547 #line 11548 "configure"
11548 #include "confdefs.h"
11549
11550 #include <ctype.h>
11551 main()
11552 {
11553         if ('C' == toupper('C'))
11554                 exit(0);
11555         else
11556                 exit(1);
11557 }
11558 EOF
11559 if { (eval echo configure:11560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11560 then
11561   ol_cv_c_upper_lower=no
11562 else
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -fr conftest*
11566   ol_cv_c_upper_lower=yes
11567 fi
11568 rm -fr conftest*
11569 fi
11570
11571 fi
11572
11573 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11574 if test $ol_cv_c_upper_lower != no ; then
11575         cat >> confdefs.h <<\EOF
11576 #define C_UPPER_LOWER 1
11577 EOF
11578
11579 fi
11580
11581 echo $ac_n "checking for working const""... $ac_c" 1>&6
11582 echo "configure:11583: checking for working const" >&5
11583 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589
11590 int main() {
11591
11592 /* Ultrix mips cc rejects this.  */
11593 typedef int charset[2]; const charset x;
11594 /* SunOS 4.1.1 cc rejects this.  */
11595 char const *const *ccp;
11596 char **p;
11597 /* NEC SVR4.0.2 mips cc rejects this.  */
11598 struct point {int x, y;};
11599 static struct point const zero = {0,0};
11600 /* AIX XL C 1.02.0.0 rejects this.
11601    It does not let you subtract one const X* pointer from another in an arm
11602    of an if-expression whose if-part is not a constant expression */
11603 const char *g = "string";
11604 ccp = &g + (g ? g-g : 0);
11605 /* HPUX 7.0 cc rejects these. */
11606 ++ccp;
11607 p = (char**) ccp;
11608 ccp = (char const *const *) p;
11609 { /* SCO 3.2v4 cc rejects this.  */
11610   char *t;
11611   char const *s = 0 ? (char *) 0 : (char const *) 0;
11612
11613   *t++ = 0;
11614 }
11615 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11616   int x[] = {25, 17};
11617   const int *foo = &x[0];
11618   ++foo;
11619 }
11620 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11621   typedef const int *iptr;
11622   iptr p = 0;
11623   ++p;
11624 }
11625 { /* AIX XL C 1.02.0.0 rejects this saying
11626      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11627   struct s { int j; const int *ap[3]; };
11628   struct s *b; b->j = 5;
11629 }
11630 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11631   const int foo = 10;
11632 }
11633
11634 ; return 0; }
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11637   rm -rf conftest*
11638   ac_cv_c_const=yes
11639 else
11640   echo "configure: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   rm -rf conftest*
11643   ac_cv_c_const=no
11644 fi
11645 rm -f conftest*
11646 fi
11647
11648 echo "$ac_t""$ac_cv_c_const" 1>&6
11649 if test $ac_cv_c_const = no; then
11650   cat >> confdefs.h <<\EOF
11651 #define const 
11652 EOF
11653
11654 fi
11655
11656 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11657 echo "configure:11658: checking if compiler understands volatile" >&5
11658 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
11659   echo $ac_n "(cached) $ac_c" 1>&6
11660 else
11661   cat > conftest.$ac_ext <<EOF
11662 #line 11663 "configure"
11663 #include "confdefs.h"
11664 int x, y, z;
11665 int main() {
11666 volatile int a; int * volatile b = x ? &y : &z;
11667       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11668       *b = 0;
11669 ; return 0; }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11672   rm -rf conftest*
11673   ol_cv_c_volatile=yes
11674 else
11675   echo "configure: failed program was:" >&5
11676   cat conftest.$ac_ext >&5
11677   rm -rf conftest*
11678   ol_cv_c_volatile=no
11679 fi
11680 rm -f conftest*
11681 fi
11682
11683 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11684   if test $ol_cv_c_volatile = yes; then
11685     : 
11686   else
11687     cat >> confdefs.h <<\EOF
11688 #define volatile 
11689 EOF
11690
11691   fi
11692  
11693
11694 if test $cross_compiling = yes ; then
11695         cat >> confdefs.h <<\EOF
11696 #define CROSS_COMPILING 1
11697 EOF
11698
11699
11700         cat >> confdefs.h <<\EOF
11701 #define LBER_INT_T long
11702 EOF
11703
11704         cat >> confdefs.h <<\EOF
11705 #define LBER_TAG_T long
11706 EOF
11707
11708         cat >> confdefs.h <<\EOF
11709 #define LBER_SOCKET_T int
11710 EOF
11711
11712
11713 else
11714         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11715 echo "configure:11716: checking whether byte ordering is bigendian" >&5
11716 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
11717   echo $ac_n "(cached) $ac_c" 1>&6
11718 else
11719   ac_cv_c_bigendian=unknown
11720 # See if sys/param.h defines the BYTE_ORDER macro.
11721 cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724 #include <sys/types.h>
11725 #include <sys/param.h>
11726 int main() {
11727
11728 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11729  bogus endian macros
11730 #endif
11731 ; return 0; }
11732 EOF
11733 if { (eval echo configure:11734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11734   rm -rf conftest*
11735   # It does; now see whether it defined to BIG_ENDIAN or not.
11736 cat > conftest.$ac_ext <<EOF
11737 #line 11738 "configure"
11738 #include "confdefs.h"
11739 #include <sys/types.h>
11740 #include <sys/param.h>
11741 int main() {
11742
11743 #if BYTE_ORDER != BIG_ENDIAN
11744  not big endian
11745 #endif
11746 ; return 0; }
11747 EOF
11748 if { (eval echo configure:11749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11749   rm -rf conftest*
11750   ac_cv_c_bigendian=yes
11751 else
11752   echo "configure: failed program was:" >&5
11753   cat conftest.$ac_ext >&5
11754   rm -rf conftest*
11755   ac_cv_c_bigendian=no
11756 fi
11757 rm -f conftest*
11758 else
11759   echo "configure: failed program was:" >&5
11760   cat conftest.$ac_ext >&5
11761 fi
11762 rm -f conftest*
11763 if test $ac_cv_c_bigendian = unknown; then
11764 if test "$cross_compiling" = yes; then
11765     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11766 else
11767   cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770 main () {
11771   /* Are we little or big endian?  From Harbison&Steele.  */
11772   union
11773   {
11774     long l;
11775     char c[sizeof (long)];
11776   } u;
11777   u.l = 1;
11778   exit (u.c[sizeof (long) - 1] == 1);
11779 }
11780 EOF
11781 if { (eval echo configure:11782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11782 then
11783   ac_cv_c_bigendian=no
11784 else
11785   echo "configure: failed program was:" >&5
11786   cat conftest.$ac_ext >&5
11787   rm -fr conftest*
11788   ac_cv_c_bigendian=yes
11789 fi
11790 rm -fr conftest*
11791 fi
11792
11793 fi
11794 fi
11795
11796 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11797 if test $ac_cv_c_bigendian = yes; then
11798   cat >> confdefs.h <<\EOF
11799 #define WORDS_BIGENDIAN 1
11800 EOF
11801
11802 fi
11803
11804         echo $ac_n "checking size of short""... $ac_c" 1>&6
11805 echo "configure:11806: checking size of short" >&5
11806 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   if test "$cross_compiling" = yes; then
11810     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11811 else
11812   cat > conftest.$ac_ext <<EOF
11813 #line 11814 "configure"
11814 #include "confdefs.h"
11815 #include <stdio.h>
11816 main()
11817 {
11818   FILE *f=fopen("conftestval", "w");
11819   if (!f) exit(1);
11820   fprintf(f, "%d\n", sizeof(short));
11821   exit(0);
11822 }
11823 EOF
11824 if { (eval echo configure:11825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11825 then
11826   ac_cv_sizeof_short=`cat conftestval`
11827 else
11828   echo "configure: failed program was:" >&5
11829   cat conftest.$ac_ext >&5
11830   rm -fr conftest*
11831   ac_cv_sizeof_short=0
11832 fi
11833 rm -fr conftest*
11834 fi
11835
11836 fi
11837 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11838 cat >> confdefs.h <<EOF
11839 #define SIZEOF_SHORT $ac_cv_sizeof_short
11840 EOF
11841
11842  
11843         echo $ac_n "checking size of int""... $ac_c" 1>&6
11844 echo "configure:11845: checking size of int" >&5
11845 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
11846   echo $ac_n "(cached) $ac_c" 1>&6
11847 else
11848   if test "$cross_compiling" = yes; then
11849     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11850 else
11851   cat > conftest.$ac_ext <<EOF
11852 #line 11853 "configure"
11853 #include "confdefs.h"
11854 #include <stdio.h>
11855 main()
11856 {
11857   FILE *f=fopen("conftestval", "w");
11858   if (!f) exit(1);
11859   fprintf(f, "%d\n", sizeof(int));
11860   exit(0);
11861 }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11864 then
11865   ac_cv_sizeof_int=`cat conftestval`
11866 else
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -fr conftest*
11870   ac_cv_sizeof_int=0
11871 fi
11872 rm -fr conftest*
11873 fi
11874
11875 fi
11876 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11877 cat >> confdefs.h <<EOF
11878 #define SIZEOF_INT $ac_cv_sizeof_int
11879 EOF
11880
11881  
11882         echo $ac_n "checking size of long""... $ac_c" 1>&6
11883 echo "configure:11884: checking size of long" >&5
11884 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
11885   echo $ac_n "(cached) $ac_c" 1>&6
11886 else
11887   if test "$cross_compiling" = yes; then
11888     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11889 else
11890   cat > conftest.$ac_ext <<EOF
11891 #line 11892 "configure"
11892 #include "confdefs.h"
11893 #include <stdio.h>
11894 main()
11895 {
11896   FILE *f=fopen("conftestval", "w");
11897   if (!f) exit(1);
11898   fprintf(f, "%d\n", sizeof(long));
11899   exit(0);
11900 }
11901 EOF
11902 if { (eval echo configure:11903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11903 then
11904   ac_cv_sizeof_long=`cat conftestval`
11905 else
11906   echo "configure: failed program was:" >&5
11907   cat conftest.$ac_ext >&5
11908   rm -fr conftest*
11909   ac_cv_sizeof_long=0
11910 fi
11911 rm -fr conftest*
11912 fi
11913
11914 fi
11915 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11916 cat >> confdefs.h <<EOF
11917 #define SIZEOF_LONG $ac_cv_sizeof_long
11918 EOF
11919
11920
11921
11922         if test "$ac_cv_sizeof_int" -lt 4 ; then
11923                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11924
11925                 cat >> confdefs.h <<\EOF
11926 #define LBER_INT_T long
11927 EOF
11928
11929                 cat >> confdefs.h <<\EOF
11930 #define LBER_TAG_T long
11931 EOF
11932
11933                 cat >> confdefs.h <<\EOF
11934 #define LBER_SOCKET_T int
11935 EOF
11936
11937         else
11938                 cat >> confdefs.h <<\EOF
11939 #define LBER_INT_T int
11940 EOF
11941
11942                 cat >> confdefs.h <<\EOF
11943 #define LBER_TAG_T long
11944 EOF
11945
11946                 cat >> confdefs.h <<\EOF
11947 #define LBER_SOCKET_T int
11948 EOF
11949
11950         fi
11951 fi
11952
11953 cat >> confdefs.h <<\EOF
11954 #define LBER_LEN_T long
11955 EOF
11956
11957
11958 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11959 echo "configure:11960: checking for 8-bit clean memcmp" >&5
11960 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
11961   echo $ac_n "(cached) $ac_c" 1>&6
11962 else
11963   if test "$cross_compiling" = yes; then
11964   ac_cv_func_memcmp_clean=no
11965 else
11966   cat > conftest.$ac_ext <<EOF
11967 #line 11968 "configure"
11968 #include "confdefs.h"
11969
11970 main()
11971 {
11972   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11973   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11974 }
11975
11976 EOF
11977 if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11978 then
11979   ac_cv_func_memcmp_clean=yes
11980 else
11981   echo "configure: failed program was:" >&5
11982   cat conftest.$ac_ext >&5
11983   rm -fr conftest*
11984   ac_cv_func_memcmp_clean=no
11985 fi
11986 rm -fr conftest*
11987 fi
11988
11989 fi
11990
11991 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11992 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11993
11994 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11995 echo "configure:11996: checking for strftime" >&5
11996 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
11997   echo $ac_n "(cached) $ac_c" 1>&6
11998 else
11999   cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 /* System header to define __stub macros and hopefully few prototypes,
12003     which can conflict with char strftime(); below.  */
12004 #include <assert.h>
12005 /* Override any gcc2 internal prototype to avoid an error.  */
12006 /* We use char because int might match the return type of a gcc2
12007     builtin and then its argument prototype would still apply.  */
12008 char strftime();
12009
12010 int main() {
12011
12012 /* The GNU C library defines this for functions which it implements
12013     to always fail with ENOSYS.  Some functions are actually named
12014     something starting with __ and the normal name is an alias.  */
12015 #if defined (__stub_strftime) || defined (__stub___strftime)
12016 choke me
12017 #else
12018 strftime();
12019 #endif
12020
12021 ; return 0; }
12022 EOF
12023 if { (eval echo configure:12024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12024   rm -rf conftest*
12025   eval "ac_cv_func_strftime=yes"
12026 else
12027   echo "configure: failed program was:" >&5
12028   cat conftest.$ac_ext >&5
12029   rm -rf conftest*
12030   eval "ac_cv_func_strftime=no"
12031 fi
12032 rm -f conftest*
12033 fi
12034
12035 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
12036   echo "$ac_t""yes" 1>&6
12037   cat >> confdefs.h <<\EOF
12038 #define HAVE_STRFTIME 1
12039 EOF
12040
12041 else
12042   echo "$ac_t""no" 1>&6
12043 # strftime is in -lintl on SCO UNIX.
12044 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
12045 echo "configure:12046: checking for strftime in -lintl" >&5
12046 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
12047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12048   echo $ac_n "(cached) $ac_c" 1>&6
12049 else
12050   ac_save_LIBS="$LIBS"
12051 LIBS="-lintl  $LIBS"
12052 cat > conftest.$ac_ext <<EOF
12053 #line 12054 "configure"
12054 #include "confdefs.h"
12055 /* Override any gcc2 internal prototype to avoid an error.  */
12056 /* We use char because int might match the return type of a gcc2
12057     builtin and then its argument prototype would still apply.  */
12058 char strftime();
12059
12060 int main() {
12061 strftime()
12062 ; return 0; }
12063 EOF
12064 if { (eval echo configure:12065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12065   rm -rf conftest*
12066   eval "ac_cv_lib_$ac_lib_var=yes"
12067 else
12068   echo "configure: failed program was:" >&5
12069   cat conftest.$ac_ext >&5
12070   rm -rf conftest*
12071   eval "ac_cv_lib_$ac_lib_var=no"
12072 fi
12073 rm -f conftest*
12074 LIBS="$ac_save_LIBS"
12075
12076 fi
12077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12078   echo "$ac_t""yes" 1>&6
12079   cat >> confdefs.h <<\EOF
12080 #define HAVE_STRFTIME 1
12081 EOF
12082
12083 LIBS="-lintl $LIBS"
12084 else
12085   echo "$ac_t""no" 1>&6
12086 fi
12087
12088 fi
12089
12090
12091 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
12092 echo "configure:12093: checking for inet_aton()" >&5
12093 if eval "test \"`echo '$''{'ol_cv_func_inet_aton'+set}'`\" = set"; then
12094   echo $ac_n "(cached) $ac_c" 1>&6
12095 else
12096   cat > conftest.$ac_ext <<EOF
12097 #line 12098 "configure"
12098 #include "confdefs.h"
12099
12100 #ifdef HAVE_SYS_TYPES_H
12101 #       include <sys/types.h>
12102 #endif
12103 #ifdef HAVE_SYS_SOCKET_H
12104 #       include <sys/socket.h>
12105 #       ifdef HAVE_SYS_SELECT_H
12106 #               include <sys/select.h>
12107 #       endif
12108 #       include <netinet/in.h>
12109 #       ifdef HAVE_ARPA_INET_H
12110 #               include <arpa/inet.h>
12111 #       endif
12112 #endif
12113
12114 int main() {
12115 struct in_addr in;
12116 int rc = inet_aton( "255.255.255.255", &in );
12117 ; return 0; }
12118 EOF
12119 if { (eval echo configure:12120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12120   rm -rf conftest*
12121   ol_cv_func_inet_aton=yes
12122 else
12123   echo "configure: failed program was:" >&5
12124   cat conftest.$ac_ext >&5
12125   rm -rf conftest*
12126   ol_cv_func_inet_aton=no
12127 fi
12128 rm -f conftest*
12129 fi
12130
12131 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
12132   if test $ol_cv_func_inet_aton != no; then
12133     cat >> confdefs.h <<\EOF
12134 #define HAVE_INET_ATON 1
12135 EOF
12136
12137   fi
12138  
12139
12140 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
12141 echo "configure:12142: checking for vprintf" >&5
12142 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
12143   echo $ac_n "(cached) $ac_c" 1>&6
12144 else
12145   cat > conftest.$ac_ext <<EOF
12146 #line 12147 "configure"
12147 #include "confdefs.h"
12148 /* System header to define __stub macros and hopefully few prototypes,
12149     which can conflict with char vprintf(); below.  */
12150 #include <assert.h>
12151 /* Override any gcc2 internal prototype to avoid an error.  */
12152 /* We use char because int might match the return type of a gcc2
12153     builtin and then its argument prototype would still apply.  */
12154 char vprintf();
12155
12156 int main() {
12157
12158 /* The GNU C library defines this for functions which it implements
12159     to always fail with ENOSYS.  Some functions are actually named
12160     something starting with __ and the normal name is an alias.  */
12161 #if defined (__stub_vprintf) || defined (__stub___vprintf)
12162 choke me
12163 #else
12164 vprintf();
12165 #endif
12166
12167 ; return 0; }
12168 EOF
12169 if { (eval echo configure:12170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12170   rm -rf conftest*
12171   eval "ac_cv_func_vprintf=yes"
12172 else
12173   echo "configure: failed program was:" >&5
12174   cat conftest.$ac_ext >&5
12175   rm -rf conftest*
12176   eval "ac_cv_func_vprintf=no"
12177 fi
12178 rm -f conftest*
12179 fi
12180
12181 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12182   echo "$ac_t""yes" 1>&6
12183   cat >> confdefs.h <<\EOF
12184 #define HAVE_VPRINTF 1
12185 EOF
12186
12187 else
12188   echo "$ac_t""no" 1>&6
12189 fi
12190
12191 if test "$ac_cv_func_vprintf" != yes; then
12192 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12193 echo "configure:12194: checking for _doprnt" >&5
12194 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
12195   echo $ac_n "(cached) $ac_c" 1>&6
12196 else
12197   cat > conftest.$ac_ext <<EOF
12198 #line 12199 "configure"
12199 #include "confdefs.h"
12200 /* System header to define __stub macros and hopefully few prototypes,
12201     which can conflict with char _doprnt(); below.  */
12202 #include <assert.h>
12203 /* Override any gcc2 internal prototype to avoid an error.  */
12204 /* We use char because int might match the return type of a gcc2
12205     builtin and then its argument prototype would still apply.  */
12206 char _doprnt();
12207
12208 int main() {
12209
12210 /* The GNU C library defines this for functions which it implements
12211     to always fail with ENOSYS.  Some functions are actually named
12212     something starting with __ and the normal name is an alias.  */
12213 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12214 choke me
12215 #else
12216 _doprnt();
12217 #endif
12218
12219 ; return 0; }
12220 EOF
12221 if { (eval echo configure:12222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12222   rm -rf conftest*
12223   eval "ac_cv_func__doprnt=yes"
12224 else
12225   echo "configure: failed program was:" >&5
12226   cat conftest.$ac_ext >&5
12227   rm -rf conftest*
12228   eval "ac_cv_func__doprnt=no"
12229 fi
12230 rm -f conftest*
12231 fi
12232
12233 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12234   echo "$ac_t""yes" 1>&6
12235   cat >> confdefs.h <<\EOF
12236 #define HAVE_DOPRNT 1
12237 EOF
12238
12239 else
12240   echo "$ac_t""no" 1>&6
12241 fi
12242
12243 fi
12244
12245
12246 if test $ac_cv_func_vprintf = yes ; then
12247                 for ac_func in vsnprintf vsprintf
12248 do
12249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12250 echo "configure:12251: checking for $ac_func" >&5
12251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12252   echo $ac_n "(cached) $ac_c" 1>&6
12253 else
12254   cat > conftest.$ac_ext <<EOF
12255 #line 12256 "configure"
12256 #include "confdefs.h"
12257 /* System header to define __stub macros and hopefully few prototypes,
12258     which can conflict with char $ac_func(); below.  */
12259 #include <assert.h>
12260 /* Override any gcc2 internal prototype to avoid an error.  */
12261 /* We use char because int might match the return type of a gcc2
12262     builtin and then its argument prototype would still apply.  */
12263 char $ac_func();
12264
12265 int main() {
12266
12267 /* The GNU C library defines this for functions which it implements
12268     to always fail with ENOSYS.  Some functions are actually named
12269     something starting with __ and the normal name is an alias.  */
12270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12271 choke me
12272 #else
12273 $ac_func();
12274 #endif
12275
12276 ; return 0; }
12277 EOF
12278 if { (eval echo configure:12279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12279   rm -rf conftest*
12280   eval "ac_cv_func_$ac_func=yes"
12281 else
12282   echo "configure: failed program was:" >&5
12283   cat conftest.$ac_ext >&5
12284   rm -rf conftest*
12285   eval "ac_cv_func_$ac_func=no"
12286 fi
12287 rm -f conftest*
12288 fi
12289
12290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12291   echo "$ac_t""yes" 1>&6
12292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12293   cat >> confdefs.h <<EOF
12294 #define $ac_tr_func 1
12295 EOF
12296  
12297 else
12298   echo "$ac_t""no" 1>&6
12299 fi
12300 done
12301
12302 fi
12303
12304 for ac_func in \
12305         bcopy                   \
12306         closesocket             \
12307         endgrent                \
12308         endpwent                \
12309         flock                   \
12310         getdtablesize   \
12311         getgrgid                \
12312         gethostname             \
12313         getpass                 \
12314         getpwuid                \
12315         getpwnam                \
12316         getspnam                \
12317         gettimeofday    \
12318         initgroups              \
12319         lockf                   \
12320         memcpy                  \
12321         memmove                 \
12322         mkstemp                 \
12323         read                    \
12324         recv                    \
12325         recvfrom                \
12326         setpwfile               \
12327         setgid                  \
12328         setegid                 \
12329         setsid                  \
12330         setuid                  \
12331         seteuid                 \
12332         signal                  \
12333         sigset                  \
12334         snprintf                \
12335         strdup                  \
12336         strerror                \
12337         strpbrk                 \
12338         strrchr                 \
12339         strsep                  \
12340         strstr                  \
12341         strtol                  \
12342         strtoul                 \
12343         strspn                  \
12344         sysconf                 \
12345         waitpid                 \
12346         wait4                   \
12347         write                   \
12348         send                    \
12349         sendto                  \
12350
12351 do
12352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12353 echo "configure:12354: checking for $ac_func" >&5
12354 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12355   echo $ac_n "(cached) $ac_c" 1>&6
12356 else
12357   cat > conftest.$ac_ext <<EOF
12358 #line 12359 "configure"
12359 #include "confdefs.h"
12360 /* System header to define __stub macros and hopefully few prototypes,
12361     which can conflict with char $ac_func(); below.  */
12362 #include <assert.h>
12363 /* Override any gcc2 internal prototype to avoid an error.  */
12364 /* We use char because int might match the return type of a gcc2
12365     builtin and then its argument prototype would still apply.  */
12366 char $ac_func();
12367
12368 int main() {
12369
12370 /* The GNU C library defines this for functions which it implements
12371     to always fail with ENOSYS.  Some functions are actually named
12372     something starting with __ and the normal name is an alias.  */
12373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12374 choke me
12375 #else
12376 $ac_func();
12377 #endif
12378
12379 ; return 0; }
12380 EOF
12381 if { (eval echo configure:12382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12382   rm -rf conftest*
12383   eval "ac_cv_func_$ac_func=yes"
12384 else
12385   echo "configure: failed program was:" >&5
12386   cat conftest.$ac_ext >&5
12387   rm -rf conftest*
12388   eval "ac_cv_func_$ac_func=no"
12389 fi
12390 rm -f conftest*
12391 fi
12392
12393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12394   echo "$ac_t""yes" 1>&6
12395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12396   cat >> confdefs.h <<EOF
12397 #define $ac_tr_func 1
12398 EOF
12399  
12400 else
12401   echo "$ac_t""no" 1>&6
12402 fi
12403 done
12404
12405
12406 for ac_func in getopt tempnam
12407 do
12408 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12409 echo "configure:12410: checking for $ac_func" >&5
12410 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12411   echo $ac_n "(cached) $ac_c" 1>&6
12412 else
12413   cat > conftest.$ac_ext <<EOF
12414 #line 12415 "configure"
12415 #include "confdefs.h"
12416 /* System header to define __stub macros and hopefully few prototypes,
12417     which can conflict with char $ac_func(); below.  */
12418 #include <assert.h>
12419 /* Override any gcc2 internal prototype to avoid an error.  */
12420 /* We use char because int might match the return type of a gcc2
12421     builtin and then its argument prototype would still apply.  */
12422 char $ac_func();
12423
12424 int main() {
12425
12426 /* The GNU C library defines this for functions which it implements
12427     to always fail with ENOSYS.  Some functions are actually named
12428     something starting with __ and the normal name is an alias.  */
12429 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12430 choke me
12431 #else
12432 $ac_func();
12433 #endif
12434
12435 ; return 0; }
12436 EOF
12437 if { (eval echo configure:12438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12438   rm -rf conftest*
12439   eval "ac_cv_func_$ac_func=yes"
12440 else
12441   echo "configure: failed program was:" >&5
12442   cat conftest.$ac_ext >&5
12443   rm -rf conftest*
12444   eval "ac_cv_func_$ac_func=no"
12445 fi
12446 rm -f conftest*
12447 fi
12448
12449 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12450   echo "$ac_t""yes" 1>&6
12451     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12452   cat >> confdefs.h <<EOF
12453 #define $ac_tr_func 1
12454 EOF
12455  
12456 else
12457   echo "$ac_t""no" 1>&6
12458 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12459 fi
12460 done
12461
12462
12463
12464 # Check Configuration
12465 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12466 echo "configure:12467: checking declaration of sys_errlist" >&5
12467 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
12468   echo $ac_n "(cached) $ac_c" 1>&6
12469 else
12470   
12471         cat > conftest.$ac_ext <<EOF
12472 #line 12473 "configure"
12473 #include "confdefs.h"
12474
12475 #include <stdio.h>
12476 #include <sys/types.h>
12477 #include <errno.h> 
12478 int main() {
12479 char *c = (char *) *sys_errlist
12480 ; return 0; }
12481 EOF
12482 if { (eval echo configure:12483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12483   rm -rf conftest*
12484   ol_cv_dcl_sys_errlist=yes
12485         ol_cv_have_sys_errlist=yes
12486 else
12487   echo "configure: failed program was:" >&5
12488   cat conftest.$ac_ext >&5
12489   rm -rf conftest*
12490   ol_cv_dcl_sys_errlist=no
12491 fi
12492 rm -f conftest*
12493 fi
12494
12495 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12496 #
12497 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12498 if test $ol_cv_dcl_sys_errlist = no ; then
12499         cat >> confdefs.h <<\EOF
12500 #define DECL_SYS_ERRLIST 1
12501 EOF
12502
12503
12504         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12505 echo "configure:12506: checking existence of sys_errlist" >&5
12506 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
12507   echo $ac_n "(cached) $ac_c" 1>&6
12508 else
12509   
12510                 cat > conftest.$ac_ext <<EOF
12511 #line 12512 "configure"
12512 #include "confdefs.h"
12513 #include <errno.h>
12514 int main() {
12515 char *c = (char *) *sys_errlist
12516 ; return 0; }
12517 EOF
12518 if { (eval echo configure:12519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12519   rm -rf conftest*
12520   ol_cv_have_sys_errlist=yes
12521 else
12522   echo "configure: failed program was:" >&5
12523   cat conftest.$ac_ext >&5
12524   rm -rf conftest*
12525   ol_cv_have_sys_errlist=no
12526 fi
12527 rm -f conftest*
12528 fi
12529
12530 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12531 fi
12532 if test $ol_cv_have_sys_errlist = yes ; then
12533         cat >> confdefs.h <<\EOF
12534 #define HAVE_SYS_ERRLIST 1
12535 EOF
12536
12537 fi
12538
12539
12540
12541 if test "$ol_enable_debug" != no ; then
12542         cat >> confdefs.h <<\EOF
12543 #define LDAP_DEBUG 1
12544 EOF
12545
12546 fi
12547 if test "$ol_enable_syslog" = yes ; then
12548         cat >> confdefs.h <<\EOF
12549 #define LDAP_SYSLOG 1
12550 EOF
12551
12552 fi
12553 if test "$ol_enable_libui" = yes ; then
12554         cat >> confdefs.h <<\EOF
12555 #define LDAP_LIBUI 1
12556 EOF
12557
12558 fi
12559 if test "$ol_enable_cache" = no ; then
12560         cat >> confdefs.h <<\EOF
12561 #define LDAP_NOCACHE 1
12562 EOF
12563
12564 fi
12565 if test "$ol_enable_dns" != no ; then
12566         cat >> confdefs.h <<\EOF
12567 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12568 EOF
12569
12570 fi
12571 if test "$ol_enable_proctitle" != no ; then
12572         cat >> confdefs.h <<\EOF
12573 #define LDAP_PROCTITLE 1
12574 EOF
12575
12576 fi
12577 if test "$ol_enable_referrals" != no ; then
12578         cat >> confdefs.h <<\EOF
12579 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12580 EOF
12581
12582 fi
12583 if test "$ol_enable_cldap" != no ; then
12584         cat >> confdefs.h <<\EOF
12585 #define LDAP_CONNECTIONLESS 1
12586 EOF
12587
12588 fi
12589
12590 if test "$ol_enable_crypt" != no ; then
12591         cat >> confdefs.h <<\EOF
12592 #define SLAPD_CRYPT 1
12593 EOF
12594
12595 fi
12596 if test "$ol_enable_cleartext" != no ; then
12597         cat >> confdefs.h <<\EOF
12598 #define SLAPD_CLEARTEXT 1
12599 EOF
12600
12601 fi
12602 if test "$ol_enable_multimaster" != no ; then
12603         cat >> confdefs.h <<\EOF
12604 #define SLAPD_MULTIMASTER 1
12605 EOF
12606
12607 fi
12608 if test "$ol_enable_phonetic" != no ; then
12609         cat >> confdefs.h <<\EOF
12610 #define SLAPD_PHONETIC 1
12611 EOF
12612
12613 fi
12614 if test "$ol_enable_rlookups" != no ; then
12615         cat >> confdefs.h <<\EOF
12616 #define SLAPD_RLOOKUPS 1
12617 EOF
12618
12619 fi
12620
12621 if test "$ol_enable_modules" != no ; then
12622         cat >> confdefs.h <<\EOF
12623 #define SLAPD_MODULES 1
12624 EOF
12625
12626         BUILD_SLAPD=yes
12627         MODULES_LIBS=-lltdl
12628         SLAPD_MODULES_LDFLAGS="-dlopen self"
12629 fi
12630
12631 if test "$ol_link_bdb2" != no ; then
12632         cat >> confdefs.h <<\EOF
12633 #define SLAPD_BDB2 1
12634 EOF
12635
12636         BUILD_SLAPD=yes
12637         BUILD_BDB2=yes
12638         if test "$ol_with_bdb2_module" != static ; then
12639                 cat >> confdefs.h <<\EOF
12640 #define SLAPD_BDB2_DYNAMIC 1
12641 EOF
12642
12643                 BUILD_BDB2=mod
12644                 BUILD_BDB2_DYNAMIC=shared
12645                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
12646         fi
12647 fi
12648
12649 if test "$ol_enable_ldap" != no ; then
12650         cat >> confdefs.h <<\EOF
12651 #define SLAPD_LDAP 1
12652 EOF
12653
12654         BUILD_SLAPD=yes
12655         BUILD_LDAP=yes
12656         if test "$ol_with_ldap_module" != static ; then
12657                 cat >> confdefs.h <<\EOF
12658 #define SLAPD_LDAP_DYNAMIC 1
12659 EOF
12660
12661                 BUILD_LDAP=mod
12662                 BUILD_LDAP_DYNAMIC=shared
12663                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
12664         fi
12665 fi
12666
12667 if test "$ol_link_ldbm" != no ; then
12668         cat >> confdefs.h <<\EOF
12669 #define SLAPD_LDBM 1
12670 EOF
12671
12672         BUILD_SLAPD=yes
12673         BUILD_LDBM=yes
12674         if test "$ol_with_ldbm_module" != static ; then
12675                 cat >> confdefs.h <<\EOF
12676 #define SLAPD_LDBM_DYNAMIC 1
12677 EOF
12678
12679                 BUILD_LDBM=mod
12680                 BUILD_LDBM_DYNAMIC=shared
12681                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
12682         fi
12683 fi
12684
12685 if test "$ol_enable_passwd" != no ; then
12686         cat >> confdefs.h <<\EOF
12687 #define SLAPD_PASSWD 1
12688 EOF
12689
12690         BUILD_SLAPD=yes
12691         BUILD_PASSWD=yes
12692         if test "$ol_with_passwd_module" != static ; then
12693                 cat >> confdefs.h <<\EOF
12694 #define SLAPD_PASSWD_DYNAMIC 1
12695 EOF
12696
12697                 BUILD_PASSWD=mod
12698                 BUILD_PASSWD_DYNAMIC=shared
12699                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
12700         fi
12701 fi
12702
12703 if test "$ol_link_perl" != no ; then
12704         cat >> confdefs.h <<\EOF
12705 #define SLAPD_PERL 1
12706 EOF
12707
12708         BUILD_SLAPD=yes
12709         BUILD_PERL=yes
12710         if test "$ol_with_perl_module" != static ; then
12711                 cat >> confdefs.h <<\EOF
12712 #define SLAPD_PERL_DYNAMIC 1
12713 EOF
12714
12715                 BUILD_PERL=mod
12716                 BUILD_PERL_DYNAMIC=shared
12717                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
12718         fi
12719 fi
12720
12721 if test "$ol_enable_shell" != no ; then
12722         cat >> confdefs.h <<\EOF
12723 #define SLAPD_SHELL 1
12724 EOF
12725
12726         BUILD_SLAPD=yes
12727         BUILD_SHELL=yes
12728         if test "$ol_with_shell_module" != static ; then
12729                 cat >> confdefs.h <<\EOF
12730 #define SLAPD_SHELL_DYNAMIC 1
12731 EOF
12732
12733                 BUILD_SHELL=mod
12734                 BUILD_SHELL_DYNAMIC=shared
12735                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
12736         fi
12737 fi
12738
12739 if test "$ol_enable_tcl" != no ; then
12740         cat >> confdefs.h <<\EOF
12741 #define SLAPD_TCL 1
12742 EOF
12743
12744         BUILD_SLAPD=yes
12745         BUILD_TCL=yes
12746         if test "$ol_with_tcl_module" != static; then
12747                 cat >> confdefs.h <<\EOF
12748 #define SLAPD_TCL_DYNAMIC 1
12749 EOF
12750
12751                 BUILD_TCL=mod
12752                 BUILD_TCL_DYNAMIC=shared
12753                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
12754         fi
12755 fi
12756
12757 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12758         $BUILD_SLAPD = yes ; then
12759         BUILD_SLURPD=yes
12760 fi
12761
12762 if test "$ol_link_isode" != no ; then
12763         BUILD_LDAPD=yes
12764 fi
12765
12766
12767
12768
12769   
12770   
12771   
12772   
12773   
12774   
12775   
12776   
12777   
12778   
12779   
12780   
12781   
12782   
12783   
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810 trap '' 1 2 15
12811
12812 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12813
12814 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12815 # Let make expand exec_prefix.
12816 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12817
12818 # Any assignment to VPATH causes Sun make to only execute
12819 # the first set of double-colon rules, so remove it if not needed.
12820 # If there is a colon in the path, we need to keep it.
12821 if test "x$srcdir" = x.; then
12822   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12823 fi
12824
12825 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12826
12827 DEFS=-DHAVE_CONFIG_H
12828
12829 # Without the "./", some shells look in PATH for config.status.
12830 : ${CONFIG_STATUS=./config.status}
12831
12832 echo creating $CONFIG_STATUS
12833 rm -f $CONFIG_STATUS
12834 cat > $CONFIG_STATUS <<EOF
12835 #! /bin/sh
12836 # Generated automatically by configure.
12837 # Run this file to recreate the current configuration.
12838 # This directory was configured as follows,
12839 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12840 #
12841 # $0 $ac_configure_args
12842 #
12843 # Compiler output produced by configure, useful for debugging
12844 # configure, is in ./config.log if it exists.
12845
12846 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12847 for ac_option
12848 do
12849   case "\$ac_option" in
12850   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12851     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12852     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12853   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12854     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12855     exit 0 ;;
12856   -help | --help | --hel | --he | --h)
12857     echo "\$ac_cs_usage"; exit 0 ;;
12858   *) echo "\$ac_cs_usage"; exit 1 ;;
12859   esac
12860 done
12861
12862 ac_given_srcdir=$srcdir
12863 ac_given_INSTALL="$INSTALL"
12864
12865 trap 'rm -fr `echo "\
12866 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12867 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12868 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12869 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12870 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12871 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12872 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12873 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12874 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12875 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12876 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12877 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12878 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12879 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12880 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12881 include/Makefile:build/top.mk:include/Makefile.in \
12882 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12883 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12884 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12885 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12886 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12887 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12888 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12889 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12890 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12891 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12892 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12893 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
12894 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
12895 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
12896 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
12897 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
12898 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
12899 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
12900 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12901 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12902 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12903 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12904 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12905 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12906 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12907 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12908  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12909 EOF
12910 cat >> $CONFIG_STATUS <<EOF
12911
12912 # Protect against being on the right side of a sed subst in config.status.
12913 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12914  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12915 $ac_vpsub
12916 $extrasub
12917 s%@SHELL@%$SHELL%g
12918 s%@CFLAGS@%$CFLAGS%g
12919 s%@CPPFLAGS@%$CPPFLAGS%g
12920 s%@CXXFLAGS@%$CXXFLAGS%g
12921 s%@FFLAGS@%$FFLAGS%g
12922 s%@DEFS@%$DEFS%g
12923 s%@LDFLAGS@%$LDFLAGS%g
12924 s%@LIBS@%$LIBS%g
12925 s%@exec_prefix@%$exec_prefix%g
12926 s%@prefix@%$prefix%g
12927 s%@program_transform_name@%$program_transform_name%g
12928 s%@bindir@%$bindir%g
12929 s%@sbindir@%$sbindir%g
12930 s%@libexecdir@%$libexecdir%g
12931 s%@datadir@%$datadir%g
12932 s%@sysconfdir@%$sysconfdir%g
12933 s%@sharedstatedir@%$sharedstatedir%g
12934 s%@localstatedir@%$localstatedir%g
12935 s%@libdir@%$libdir%g
12936 s%@includedir@%$includedir%g
12937 s%@oldincludedir@%$oldincludedir%g
12938 s%@infodir@%$infodir%g
12939 s%@mandir@%$mandir%g
12940 s%@host@%$host%g
12941 s%@host_alias@%$host_alias%g
12942 s%@host_cpu@%$host_cpu%g
12943 s%@host_vendor@%$host_vendor%g
12944 s%@host_os@%$host_os%g
12945 s%@target@%$target%g
12946 s%@target_alias@%$target_alias%g
12947 s%@target_cpu@%$target_cpu%g
12948 s%@target_vendor@%$target_vendor%g
12949 s%@target_os@%$target_os%g
12950 s%@build@%$build%g
12951 s%@build_alias@%$build_alias%g
12952 s%@build_cpu@%$build_cpu%g
12953 s%@build_vendor@%$build_vendor%g
12954 s%@build_os@%$build_os%g
12955 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12956 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12957 s%@INSTALL_DATA@%$INSTALL_DATA%g
12958 s%@PACKAGE@%$PACKAGE%g
12959 s%@VERSION@%$VERSION%g
12960 s%@ACLOCAL@%$ACLOCAL%g
12961 s%@AUTOCONF@%$AUTOCONF%g
12962 s%@AUTOMAKE@%$AUTOMAKE%g
12963 s%@AUTOHEADER@%$AUTOHEADER%g
12964 s%@MAKEINFO@%$MAKEINFO%g
12965 s%@install_sh@%$install_sh%g
12966 s%@AMTAR@%$AMTAR%g
12967 s%@AWK@%$AWK%g
12968 s%@AMTARFLAGS@%$AMTARFLAGS%g
12969 s%@SET_MAKE@%$SET_MAKE%g
12970 s%@top_builddir@%$top_builddir%g
12971 s%@ldap_subdir@%$ldap_subdir%g
12972 s%@CC@%$CC%g
12973 s%@RANLIB@%$RANLIB%g
12974 s%@LD@%$LD%g
12975 s%@NM@%$NM%g
12976 s%@LN_S@%$LN_S%g
12977 s%@LIBTOOL@%$LIBTOOL%g
12978 s%@LN_H@%$LN_H%g
12979 s%@SENDMAIL@%$SENDMAIL%g
12980 s%@EDITOR@%$EDITOR%g
12981 s%@FINGER@%$FINGER%g
12982 s%@PERLBIN@%$PERLBIN%g
12983 s%@CPP@%$CPP%g
12984 s%@EXEEXT@%$EXEEXT%g
12985 s%@OBJEXT@%$OBJEXT%g
12986 s%@OL_MKDEP@%$OL_MKDEP%g
12987 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12988 s%@PEPSY@%$PEPSY%g
12989 s%@LIBOBJS@%$LIBOBJS%g
12990 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12991 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12992 s%@BUILD_BDB2@%$BUILD_BDB2%g
12993 s%@BUILD_LDAP@%$BUILD_LDAP%g
12994 s%@BUILD_LDBM@%$BUILD_LDBM%g
12995 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12996 s%@BUILD_PERL@%$BUILD_PERL%g
12997 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
12998 s%@BUILD_SHELL@%$BUILD_SHELL%g
12999 s%@BUILD_TCL@%$BUILD_TCL%g
13000 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
13001 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
13002 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
13003 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
13004 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
13005 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
13006 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
13007 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
13008 s%@LDAP_LIBS@%$LDAP_LIBS%g
13009 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
13010 s%@LDIF_LIBS@%$LDIF_LIBS%g
13011 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
13012 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
13013 s%@LDBM_LIBS@%$LDBM_LIBS%g
13014 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
13015 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
13016 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
13017 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
13018 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
13019 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
13020 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
13021 s%@KRB_LIBS@%$KRB_LIBS%g
13022 s%@READLINE_LIBS@%$READLINE_LIBS%g
13023 s%@SASL_LIBS@%$SASL_LIBS%g
13024 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
13025 s%@TLS_LIBS@%$TLS_LIBS%g
13026 s%@MODULES_LIBS@%$MODULES_LIBS%g
13027
13028 CEOF
13029 EOF
13030
13031 cat >> $CONFIG_STATUS <<\EOF
13032
13033 # Split the substitutions into bite-sized pieces for seds with
13034 # small command number limits, like on Digital OSF/1 and HP-UX.
13035 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13036 ac_file=1 # Number of current file.
13037 ac_beg=1 # First line for current file.
13038 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13039 ac_more_lines=:
13040 ac_sed_cmds=""
13041 while $ac_more_lines; do
13042   if test $ac_beg -gt 1; then
13043     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13044   else
13045     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13046   fi
13047   if test ! -s conftest.s$ac_file; then
13048     ac_more_lines=false
13049     rm -f conftest.s$ac_file
13050   else
13051     if test -z "$ac_sed_cmds"; then
13052       ac_sed_cmds="sed -f conftest.s$ac_file"
13053     else
13054       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13055     fi
13056     ac_file=`expr $ac_file + 1`
13057     ac_beg=$ac_end
13058     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13059   fi
13060 done
13061 if test -z "$ac_sed_cmds"; then
13062   ac_sed_cmds=cat
13063 fi
13064 EOF
13065
13066 cat >> $CONFIG_STATUS <<EOF
13067
13068 CONFIG_FILES=\${CONFIG_FILES-"\
13069 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13070 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13071 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13072 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13073 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13074 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13075 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13076 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13077 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13078 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13079 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13080 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13081 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13082 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13083 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13084 include/Makefile:build/top.mk:include/Makefile.in \
13085 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13086 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13087 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13088 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13089 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13090 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13091 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13092 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13093 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13094 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13095 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13096 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
13097 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
13098 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
13099 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
13100 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
13101 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
13102 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
13103 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13104 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13105 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13106 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13107 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13108 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13109 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13110 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13111 "}
13112 EOF
13113 cat >> $CONFIG_STATUS <<\EOF
13114 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13115   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13116   case "$ac_file" in
13117   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13118        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13119   *) ac_file_in="${ac_file}.in" ;;
13120   esac
13121
13122   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13123
13124   # Remove last slash and all that follows it.  Not all systems have dirname.
13125   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13126   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13127     # The file is in a subdirectory.
13128     test ! -d "$ac_dir" && mkdir "$ac_dir"
13129     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13130     # A "../" for each directory in $ac_dir_suffix.
13131     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13132   else
13133     ac_dir_suffix= ac_dots=
13134   fi
13135
13136   case "$ac_given_srcdir" in
13137   .)  srcdir=.
13138       if test -z "$ac_dots"; then top_srcdir=.
13139       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13140   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13141   *) # Relative path.
13142     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13143     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13144   esac
13145
13146   case "$ac_given_INSTALL" in
13147   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13148   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13149   esac
13150
13151   echo creating "$ac_file"
13152   rm -f "$ac_file"
13153   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13154   case "$ac_file" in
13155   *Makefile*) ac_comsub="1i\\
13156 # $configure_input" ;;
13157   *) ac_comsub= ;;
13158   esac
13159
13160   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13161   sed -e "$ac_comsub
13162 s%@configure_input@%$configure_input%g
13163 s%@srcdir@%$srcdir%g
13164 s%@top_srcdir@%$top_srcdir%g
13165 s%@INSTALL@%$INSTALL%g
13166 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13167 fi; done
13168 rm -f conftest.s*
13169
13170 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13171 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13172 #
13173 # ac_d sets the value in "#define NAME VALUE" lines.
13174 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13175 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13176 ac_dC='\3'
13177 ac_dD='%g'
13178 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13179 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13180 ac_uB='\([      ]\)%\1#\2define\3'
13181 ac_uC=' '
13182 ac_uD='\4%g'
13183 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13184 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13185 ac_eB='$%\1#\2define\3'
13186 ac_eC=' '
13187 ac_eD='%g'
13188
13189 if test "${CONFIG_HEADERS+set}" != set; then
13190 EOF
13191 cat >> $CONFIG_STATUS <<EOF
13192   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
13193 EOF
13194 cat >> $CONFIG_STATUS <<\EOF
13195 fi
13196 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13197   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13198   case "$ac_file" in
13199   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13200        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13201   *) ac_file_in="${ac_file}.in" ;;
13202   esac
13203
13204   echo creating $ac_file
13205
13206   rm -f conftest.frag conftest.in conftest.out
13207   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13208   cat $ac_file_inputs > conftest.in
13209
13210 EOF
13211
13212 # Transform confdefs.h into a sed script conftest.vals that substitutes
13213 # the proper values into config.h.in to produce config.h.  And first:
13214 # Protect against being on the right side of a sed subst in config.status.
13215 # Protect against being in an unquoted here document in config.status.
13216 rm -f conftest.vals
13217 cat > conftest.hdr <<\EOF
13218 s/[\\&%]/\\&/g
13219 s%[\\$`]%\\&%g
13220 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13221 s%ac_d%ac_u%gp
13222 s%ac_u%ac_e%gp
13223 EOF
13224 sed -n -f conftest.hdr confdefs.h > conftest.vals
13225 rm -f conftest.hdr
13226
13227 # This sed command replaces #undef with comments.  This is necessary, for
13228 # example, in the case of _POSIX_SOURCE, which is predefined and required
13229 # on some systems where configure will not decide to define it.
13230 cat >> conftest.vals <<\EOF
13231 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13232 EOF
13233
13234 # Break up conftest.vals because some shells have a limit on
13235 # the size of here documents, and old seds have small limits too.
13236
13237 rm -f conftest.tail
13238 while :
13239 do
13240   ac_lines=`grep -c . conftest.vals`
13241   # grep -c gives empty output for an empty file on some AIX systems.
13242   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13243   # Write a limited-size here document to conftest.frag.
13244   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13245   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13246   echo 'CEOF
13247   sed -f conftest.frag conftest.in > conftest.out
13248   rm -f conftest.in
13249   mv conftest.out conftest.in
13250 ' >> $CONFIG_STATUS
13251   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13252   rm -f conftest.vals
13253   mv conftest.tail conftest.vals
13254 done
13255 rm -f conftest.vals
13256
13257 cat >> $CONFIG_STATUS <<\EOF
13258   rm -f conftest.frag conftest.h
13259   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13260   cat conftest.in >> conftest.h
13261   rm -f conftest.in
13262   if cmp -s $ac_file conftest.h 2>/dev/null; then
13263     echo "$ac_file is unchanged"
13264     rm -f conftest.h
13265   else
13266     # Remove last slash and all that follows it.  Not all systems have dirname.
13267       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13268       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13269       # The file is in a subdirectory.
13270       test ! -d "$ac_dir" && mkdir "$ac_dir"
13271     fi
13272     rm -f $ac_file
13273     mv conftest.h $ac_file
13274   fi
13275 fi; done
13276
13277 EOF
13278 cat >> $CONFIG_STATUS <<EOF
13279
13280 EOF
13281 cat >> $CONFIG_STATUS <<\EOF
13282
13283 date > stamp-h
13284 echo Please \"make depend\" to build dependencies
13285
13286 exit 0
13287 EOF
13288 chmod +x $CONFIG_STATUS
13289 rm -fr confdefs* $ac_clean_files
13290 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13291