]> git.sur5r.net Git - openldap/blob - configure
370c39f45b0526a43e7013fcded9cc18c0b1c345
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.261 1999/09/22 15:45:59 jsanchez Exp  
4
5 # Copyright 1998,1999 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-1999 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-x-compile    enable cross compiling (no)"
45 ac_help="$ac_help
46   --enable-dmalloc      enable debug malloc support (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with Kerberos support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 LDAPD (X.500-to-LDAP Gateway) Options:"
63 ac_help="$ac_help
64   --enable-ldapd        enable building ldapd (no)"
65 ac_help="$ac_help
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd        enable building slapd (yes)"
69 ac_help="$ac_help
70     --enable-cleartext  enable cleartext passwords (yes)"
71 ac_help="$ac_help
72     --enable-crypt      enable crypt(3) passwords (auto)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-discreteaci        enable discrete rights in ACIs (no)"
87 ac_help="$ac_help
88     --enable-wrappers   enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-bdb2       enable bdb2 backend (no)"
91 ac_help="$ac_help
92       --with-bdb2-module        module type (static)"
93 ac_help="$ac_help
94     --enable-ldap       enable ldap backend (no)"
95 ac_help="$ac_help
96       --with-ldap-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm       enable ldbm backend (yes)"
99 ac_help="$ac_help
100       --with-ldbm-api   use LDBM API (auto)"
101 ac_help="$ac_help
102       --with-ldbm-module        module type (static)"
103 ac_help="$ac_help
104       --with-ldbm-type  use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd     enable passwd backend (no)"
107 ac_help="$ac_help
108       --with-passwd-module      module type (static)"
109 ac_help="$ac_help
110     --enable-perl       enable perl backend (no)"
111 ac_help="$ac_help
112       --with-perl-module        module type (static)"
113 ac_help="$ac_help
114     --enable-shell      enable shell backend (no)"
115 ac_help="$ac_help
116       --with-shell-module       module type (static)"
117 ac_help="$ac_help
118     --enable-tcl        enable tcl backend (no)"
119 ac_help="$ac_help
120       --with-tcl-module module type (static)"
121 ac_help="$ac_help
122 SLURPD (Replication Daemon) Options:"
123 ac_help="$ac_help
124   --enable-slurpd       enable building slurpd (auto)"
125 ac_help="$ac_help
126 Library Generation & Linking Options"
127 ac_help="$ac_help
128   --enable-static[=PKGS]  build static libraries [default=yes]"
129 ac_help="$ac_help
130   --enable-shared[=PKGS]  build shared libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
133 ac_help="$ac_help
134   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
135 ac_help="$ac_help
136   --disable-libtool-lock  avoid locking (might break parallel builds)"
137
138 # Initialize some variables set by options.
139 # The variables have the same names as the options, with
140 # dashes changed to underlines.
141 build=NONE
142 cache_file=./config.cache
143 exec_prefix=NONE
144 host=NONE
145 no_create=
146 nonopt=NONE
147 no_recursion=
148 prefix=NONE
149 program_prefix=NONE
150 program_suffix=NONE
151 program_transform_name=s,x,x,
152 silent=
153 site=
154 srcdir=
155 target=NONE
156 verbose=
157 x_includes=NONE
158 x_libraries=NONE
159 bindir='${exec_prefix}/bin'
160 sbindir='${exec_prefix}/sbin'
161 libexecdir='${exec_prefix}/libexec'
162 datadir='${prefix}/share'
163 sysconfdir='${prefix}/etc'
164 sharedstatedir='${prefix}/com'
165 localstatedir='${prefix}/var'
166 libdir='${exec_prefix}/lib'
167 includedir='${prefix}/include'
168 oldincludedir='/usr/include'
169 infodir='${prefix}/info'
170 mandir='${prefix}/man'
171
172 # Initialize some other variables.
173 subdirs=
174 MFLAGS= MAKEFLAGS=
175 SHELL=${CONFIG_SHELL-/bin/sh}
176 # Maximum number of lines to put in a shell here document.
177 ac_max_here_lines=12
178
179 ac_prev=
180 for ac_option
181 do
182
183   # If the previous option needs an argument, assign it.
184   if test -n "$ac_prev"; then
185     eval "$ac_prev=\$ac_option"
186     ac_prev=
187     continue
188   fi
189
190   case "$ac_option" in
191   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
192   *) ac_optarg= ;;
193   esac
194
195   # Accept the important Cygnus configure options, so we can diagnose typos.
196
197   case "$ac_option" in
198
199   -bindir | --bindir | --bindi | --bind | --bin | --bi)
200     ac_prev=bindir ;;
201   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
202     bindir="$ac_optarg" ;;
203
204   -build | --build | --buil | --bui | --bu)
205     ac_prev=build ;;
206   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
207     build="$ac_optarg" ;;
208
209   -cache-file | --cache-file | --cache-fil | --cache-fi \
210   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
211     ac_prev=cache_file ;;
212   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
213   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
214     cache_file="$ac_optarg" ;;
215
216   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
217     ac_prev=datadir ;;
218   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
219   | --da=*)
220     datadir="$ac_optarg" ;;
221
222   -disable-* | --disable-*)
223     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
224     # Reject names that are not valid shell variable names.
225     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
226       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
227     fi
228     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
229     eval "enable_${ac_feature}=no" ;;
230
231   -enable-* | --enable-*)
232     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
233     # Reject names that are not valid shell variable names.
234     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
235       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
236     fi
237     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
238     case "$ac_option" in
239       *=*) ;;
240       *) ac_optarg=yes ;;
241     esac
242     eval "enable_${ac_feature}='$ac_optarg'" ;;
243
244   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
245   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
246   | --exec | --exe | --ex)
247     ac_prev=exec_prefix ;;
248   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
249   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
250   | --exec=* | --exe=* | --ex=*)
251     exec_prefix="$ac_optarg" ;;
252
253   -gas | --gas | --ga | --g)
254     # Obsolete; use --with-gas.
255     with_gas=yes ;;
256
257   -help | --help | --hel | --he)
258     # Omit some internal or obsolete options to make the list less imposing.
259     # This message is too long to be a string in the A/UX 3.1 sh.
260     cat << EOF
261 Usage: configure [options] [host]
262 Options: [defaults in brackets after descriptions]
263 Configuration:
264   --cache-file=FILE       cache test results in FILE
265   --help                  print this message
266   --no-create             do not create output files
267   --quiet, --silent       do not print \`checking...' messages
268   --version               print the version of autoconf that created configure
269 Directory and file names:
270   --prefix=PREFIX         install architecture-independent files in PREFIX
271                           [$ac_default_prefix]
272   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
273                           [same as prefix]
274   --bindir=DIR            user executables in DIR [EPREFIX/bin]
275   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
276   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
277   --datadir=DIR           read-only architecture-independent data in DIR
278                           [PREFIX/share]
279   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
280   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
281                           [PREFIX/com]
282   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
283   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
284   --includedir=DIR        C header files in DIR [PREFIX/include]
285   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
286   --infodir=DIR           info documentation in DIR [PREFIX/info]
287   --mandir=DIR            man documentation in DIR [PREFIX/man]
288   --srcdir=DIR            find the sources in DIR [configure dir or ..]
289   --program-prefix=PREFIX prepend PREFIX to installed program names
290   --program-suffix=SUFFIX append SUFFIX to installed program names
291   --program-transform-name=PROGRAM
292                           run sed PROGRAM on installed program names
293 EOF
294     cat << EOF
295 Host type:
296   --build=BUILD           configure for building on BUILD [BUILD=HOST]
297   --host=HOST             configure for HOST [guessed]
298   --target=TARGET         configure for TARGET [TARGET=HOST]
299 Features and packages:
300   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
301   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
302   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
303   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
304   --x-includes=DIR        X include files are in DIR
305   --x-libraries=DIR       X library files are in DIR
306 EOF
307     if test -n "$ac_help"; then
308       echo "--enable and --with options recognized:$ac_help"
309     fi
310     exit 0 ;;
311
312   -host | --host | --hos | --ho)
313     ac_prev=host ;;
314   -host=* | --host=* | --hos=* | --ho=*)
315     host="$ac_optarg" ;;
316
317   -includedir | --includedir | --includedi | --included | --include \
318   | --includ | --inclu | --incl | --inc)
319     ac_prev=includedir ;;
320   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
321   | --includ=* | --inclu=* | --incl=* | --inc=*)
322     includedir="$ac_optarg" ;;
323
324   -infodir | --infodir | --infodi | --infod | --info | --inf)
325     ac_prev=infodir ;;
326   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
327     infodir="$ac_optarg" ;;
328
329   -libdir | --libdir | --libdi | --libd)
330     ac_prev=libdir ;;
331   -libdir=* | --libdir=* | --libdi=* | --libd=*)
332     libdir="$ac_optarg" ;;
333
334   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
335   | --libexe | --libex | --libe)
336     ac_prev=libexecdir ;;
337   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
338   | --libexe=* | --libex=* | --libe=*)
339     libexecdir="$ac_optarg" ;;
340
341   -localstatedir | --localstatedir | --localstatedi | --localstated \
342   | --localstate | --localstat | --localsta | --localst \
343   | --locals | --local | --loca | --loc | --lo)
344     ac_prev=localstatedir ;;
345   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
346   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
347   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
348     localstatedir="$ac_optarg" ;;
349
350   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
351     ac_prev=mandir ;;
352   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
353     mandir="$ac_optarg" ;;
354
355   -nfp | --nfp | --nf)
356     # Obsolete; use --without-fp.
357     with_fp=no ;;
358
359   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
360   | --no-cr | --no-c)
361     no_create=yes ;;
362
363   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
364   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
365     no_recursion=yes ;;
366
367   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
368   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
369   | --oldin | --oldi | --old | --ol | --o)
370     ac_prev=oldincludedir ;;
371   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
372   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
373   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
374     oldincludedir="$ac_optarg" ;;
375
376   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
377     ac_prev=prefix ;;
378   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
379     prefix="$ac_optarg" ;;
380
381   -program-prefix | --program-prefix | --program-prefi | --program-pref \
382   | --program-pre | --program-pr | --program-p)
383     ac_prev=program_prefix ;;
384   -program-prefix=* | --program-prefix=* | --program-prefi=* \
385   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
386     program_prefix="$ac_optarg" ;;
387
388   -program-suffix | --program-suffix | --program-suffi | --program-suff \
389   | --program-suf | --program-su | --program-s)
390     ac_prev=program_suffix ;;
391   -program-suffix=* | --program-suffix=* | --program-suffi=* \
392   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
393     program_suffix="$ac_optarg" ;;
394
395   -program-transform-name | --program-transform-name \
396   | --program-transform-nam | --program-transform-na \
397   | --program-transform-n | --program-transform- \
398   | --program-transform | --program-transfor \
399   | --program-transfo | --program-transf \
400   | --program-trans | --program-tran \
401   | --progr-tra | --program-tr | --program-t)
402     ac_prev=program_transform_name ;;
403   -program-transform-name=* | --program-transform-name=* \
404   | --program-transform-nam=* | --program-transform-na=* \
405   | --program-transform-n=* | --program-transform-=* \
406   | --program-transform=* | --program-transfor=* \
407   | --program-transfo=* | --program-transf=* \
408   | --program-trans=* | --program-tran=* \
409   | --progr-tra=* | --program-tr=* | --program-t=*)
410     program_transform_name="$ac_optarg" ;;
411
412   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
413   | -silent | --silent | --silen | --sile | --sil)
414     silent=yes ;;
415
416   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
417     ac_prev=sbindir ;;
418   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
419   | --sbi=* | --sb=*)
420     sbindir="$ac_optarg" ;;
421
422   -sharedstatedir | --sharedstatedir | --sharedstatedi \
423   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
424   | --sharedst | --shareds | --shared | --share | --shar \
425   | --sha | --sh)
426     ac_prev=sharedstatedir ;;
427   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
428   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
429   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
430   | --sha=* | --sh=*)
431     sharedstatedir="$ac_optarg" ;;
432
433   -site | --site | --sit)
434     ac_prev=site ;;
435   -site=* | --site=* | --sit=*)
436     site="$ac_optarg" ;;
437
438   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
439     ac_prev=srcdir ;;
440   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
441     srcdir="$ac_optarg" ;;
442
443   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
444   | --syscon | --sysco | --sysc | --sys | --sy)
445     ac_prev=sysconfdir ;;
446   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
447   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
448     sysconfdir="$ac_optarg" ;;
449
450   -target | --target | --targe | --targ | --tar | --ta | --t)
451     ac_prev=target ;;
452   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
453     target="$ac_optarg" ;;
454
455   -v | -verbose | --verbose | --verbos | --verbo | --verb)
456     verbose=yes ;;
457
458   -version | --version | --versio | --versi | --vers)
459     echo "configure generated by autoconf version 2.13.1"
460     exit 0 ;;
461
462   -with-* | --with-*)
463     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
464     # Reject names that are not valid shell variable names.
465     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
466       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
467     fi
468     ac_package=`echo $ac_package| sed 's/-/_/g'`
469     case "$ac_option" in
470       *=*) ;;
471       *) ac_optarg=yes ;;
472     esac
473     eval "with_${ac_package}='$ac_optarg'" ;;
474
475   -without-* | --without-*)
476     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
477     # Reject names that are not valid shell variable names.
478     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
479       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
480     fi
481     ac_package=`echo $ac_package| sed 's/-/_/g'`
482     eval "with_${ac_package}=no" ;;
483
484   --x)
485     # Obsolete; use --with-x.
486     with_x=yes ;;
487
488   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
489   | --x-incl | --x-inc | --x-in | --x-i)
490     ac_prev=x_includes ;;
491   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
492   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
493     x_includes="$ac_optarg" ;;
494
495   -x-libraries | --x-libraries | --x-librarie | --x-librari \
496   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
497     ac_prev=x_libraries ;;
498   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
499   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
500     x_libraries="$ac_optarg" ;;
501
502   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
503     ;;
504
505   *)
506     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
507       echo "configure: warning: $ac_option: invalid host type" 1>&2
508     fi
509     if test "x$nonopt" != xNONE; then
510       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
511     fi
512     nonopt="$ac_option"
513     ;;
514
515   esac
516 done
517
518 if test -n "$ac_prev"; then
519   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
520 fi
521
522 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
523
524 # File descriptor usage:
525 # 0 standard input
526 # 1 file creation
527 # 2 errors and warnings
528 # 3 some systems may open it to /dev/tty
529 # 4 used on the Kubota Titan
530 # 6 checking for... messages and results
531 # 5 compiler messages saved in config.log
532 if test "$silent" = yes; then
533   exec 6>/dev/null
534 else
535   exec 6>&1
536 fi
537 exec 5>./config.log
538
539 echo "\
540 This file contains any messages produced by compilers while
541 running configure, to aid debugging if configure makes a mistake.
542 " 1>&5
543
544 # Strip out --no-create and --no-recursion so they do not pile up.
545 # Also quote any args containing shell metacharacters.
546 ac_configure_args=
547 for ac_arg
548 do
549   case "$ac_arg" in
550   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
551   | --no-cr | --no-c) ;;
552   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
553   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
554   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
555   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
556   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
557   esac
558 done
559
560 # NLS nuisances.
561 # Only set these to C if already set.  These must not be set unconditionally
562 # because not all systems understand e.g. LANG=C (notably SCO).
563 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
564 # Non-C LC_CTYPE values break the ctype check.
565 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
566 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
567 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
568 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
569
570 # confdefs.h avoids OS command line length limits that DEFS can exceed.
571 rm -rf conftest* confdefs.h
572 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
573 echo > confdefs.h
574
575 # A filename unique to this package, relative to the directory that
576 # configure is in, which we can look for to find out if srcdir is correct.
577 ac_unique_file=build/version
578
579 # Find the source files, if location was not specified.
580 if test -z "$srcdir"; then
581   ac_srcdir_defaulted=yes
582   # Try the directory containing this script, then its parent.
583   ac_prog=$0
584   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
585   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
586   srcdir=$ac_confdir
587   if test ! -r $srcdir/$ac_unique_file; then
588     srcdir=..
589   fi
590 else
591   ac_srcdir_defaulted=no
592 fi
593 if test ! -r $srcdir/$ac_unique_file; then
594   if test "$ac_srcdir_defaulted" = yes; then
595     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
596   else
597     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
598   fi
599 fi
600 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
601
602 # Prefer explicitly selected file to automatically selected ones.
603 if test -z "$CONFIG_SITE"; then
604   if test "x$prefix" != xNONE; then
605     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
606   else
607     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
608   fi
609 fi
610 for ac_site_file in $CONFIG_SITE; do
611   if test -r "$ac_site_file"; then
612     echo "loading site script $ac_site_file"
613     . "$ac_site_file"
614   fi
615 done
616
617
618 ac_ext=c
619 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
620 ac_cpp='$CPP $CPPFLAGS'
621 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
622 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
623 cross_compiling=$ac_cv_prog_cc_cross
624
625 ac_exeext=
626 ac_objext=o
627 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
628   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
629   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
630     ac_n= ac_c='
631 ' ac_t='        '
632   else
633     ac_n=-n ac_c= ac_t=
634   fi
635 else
636   ac_n= ac_c='\c' ac_t=
637 fi
638
639 ac_aux_dir=
640 for ac_dir in build $srcdir/build; do
641   if test -f $ac_dir/install-sh; then
642     ac_aux_dir=$ac_dir
643     ac_install_sh="$ac_aux_dir/install-sh -c"
644     break
645   elif test -f $ac_dir/install.sh; then
646     ac_aux_dir=$ac_dir
647     ac_install_sh="$ac_aux_dir/install.sh -c"
648     break
649   fi
650 done
651 if test -z "$ac_aux_dir"; then
652   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
653 fi
654 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
655 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
656 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
657
658 OL_VERSION=`cat $ac_aux_dir/version`
659 if test -z "$OL_VERSION"; then
660         { echo "configure: error: could not determine version" 1>&2; exit 1; }
661 fi
662
663 echo "Configuring OpenLDAP $OL_VERSION ..."
664
665
666 echo $ac_n "checking host system type""... $ac_c" 1>&6
667 echo "configure:668: checking host system type" >&5
668 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
669
670 # Make sure we can run config.sub.
671   if $ac_config_sub sun4 >/dev/null 2>&1; then :
672     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
673   fi
674
675   ac_cv_host_alias=$host
676   case "$ac_cv_host_alias" in
677   NONE)
678     case $nonopt in
679     NONE)
680       if ac_cv_host_alias=`$ac_config_guess`; then :
681       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
682       fi ;;
683     *) ac_cv_host_alias=$nonopt ;;
684     esac ;;
685   esac
686
687   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
688   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
689   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
690   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
691 else
692   echo $ac_n "(cached) $ac_c" 1>&6
693 fi
694
695 echo "$ac_t""$ac_cv_host" 1>&6
696
697 host=$ac_cv_host
698 host_alias=$ac_cv_host_alias
699 host_cpu=$ac_cv_host_cpu
700 host_vendor=$ac_cv_host_vendor
701 host_os=$ac_cv_host_os
702
703
704
705
706
707 echo $ac_n "checking target system type""... $ac_c" 1>&6
708 echo "configure:709: checking target system type" >&5
709 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
710
711 # Make sure we can run config.sub.
712   if $ac_config_sub sun4 >/dev/null 2>&1; then :
713     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
714   fi
715
716   ac_cv_target_alias=$target
717   case "$ac_cv_target_alias" in
718   NONE)
719     case $nonopt in
720     NONE)
721       ac_cv_target_alias=$host_alias ;;
722
723     *) ac_cv_target_alias=$nonopt ;;
724     esac ;;
725   esac
726
727   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
728   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
729   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
730   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
731 else
732   echo $ac_n "(cached) $ac_c" 1>&6
733 fi
734
735 echo "$ac_t""$ac_cv_target" 1>&6
736
737 target=$ac_cv_target
738 target_alias=$ac_cv_target_alias
739 target_cpu=$ac_cv_target_cpu
740 target_vendor=$ac_cv_target_vendor
741 target_os=$ac_cv_target_os
742
743
744
745
746
747 echo $ac_n "checking build system type""... $ac_c" 1>&6
748 echo "configure:749: checking build system type" >&5
749 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
750
751 # Make sure we can run config.sub.
752   if $ac_config_sub sun4 >/dev/null 2>&1; then :
753     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
754   fi
755
756   ac_cv_build_alias=$build
757   case "$ac_cv_build_alias" in
758   NONE)
759     case $nonopt in
760     NONE)
761       ac_cv_build_alias=$host_alias ;;
762
763     *) ac_cv_build_alias=$nonopt ;;
764     esac ;;
765   esac
766
767   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
768   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
769   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
770   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
771 else
772   echo $ac_n "(cached) $ac_c" 1>&6
773 fi
774
775 echo "$ac_t""$ac_cv_build" 1>&6
776
777 build=$ac_cv_build
778 build_alias=$ac_cv_build_alias
779 build_cpu=$ac_cv_build_cpu
780 build_vendor=$ac_cv_build_vendor
781 build_os=$ac_cv_build_os
782
783
784
785
786
787 # Do some error checking and defaulting for the host and target type.
788 # The inputs are:
789 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
790 #
791 # The rules are:
792 # 1. You are not allowed to specify --host, --target, and nonopt at the
793 #    same time.
794 # 2. Host defaults to nonopt.
795 # 3. If nonopt is not specified, then host defaults to the current host,
796 #    as determined by config.guess.
797 # 4. Target and build default to nonopt.
798 # 5. If nonopt is not specified, then target and build default to host.
799
800 # The aliases save the names the user supplied, while $host etc.
801 # will get canonicalized.
802 case $host---$target---$nonopt in
803 NONE---*---* | *---NONE---* | *---*---NONE) ;;
804 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
805 esac
806
807 test "$host_alias" != "$target_alias" &&
808   test "$program_prefix$program_suffix$program_transform_name" = \
809     NONENONEs,x,x, &&
810   program_prefix=${target_alias}-
811
812
813 # Find a good install program.  We prefer a C program (faster),
814 # so one script is as good as another.  But avoid the broken or
815 # incompatible versions:
816 # SysV /etc/install, /usr/sbin/install
817 # SunOS /usr/etc/install
818 # IRIX /sbin/install
819 # AIX /bin/install
820 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
821 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
822 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
823 # ./install, which can be erroneously created by make from ./install.sh.
824 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
825 echo "configure:826: checking for a BSD compatible install" >&5
826 if test -z "$INSTALL"; then
827 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
828   echo $ac_n "(cached) $ac_c" 1>&6
829 else
830     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
831   for ac_dir in $PATH; do
832     # Account for people who put trailing slashes in PATH elements.
833     case "$ac_dir/" in
834     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
835     *)
836       # OSF1 and SCO ODT 3.0 have their own names for install.
837       # Don't use installbsd from OSF since it installs stuff as root
838       # by default.
839       for ac_prog in ginstall scoinst install; do
840         if test -f $ac_dir/$ac_prog; then
841           if test $ac_prog = install &&
842             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
843             # AIX install.  It has an incompatible calling convention.
844             :
845           elif test $ac_prog = install &&
846             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
847             # program-specific install script used by HP pwplus--don't use.
848             :
849           else
850             ac_cv_path_install="$ac_dir/$ac_prog -c"
851             break 2
852           fi
853         fi
854       done
855       ;;
856     esac
857   done
858   IFS="$ac_save_IFS"
859
860 fi
861   if test "${ac_cv_path_install+set}" = set; then
862     INSTALL="$ac_cv_path_install"
863   else
864     # As a last resort, use the slow shell script.  We don't cache a
865     # path for INSTALL within a source directory, because that will
866     # break other packages using the cache if that directory is
867     # removed, or if the path is relative.
868     INSTALL="$ac_install_sh"
869   fi
870 fi
871 echo "$ac_t""$INSTALL" 1>&6
872
873 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
874 # It thinks the first close brace ends the variable substitution.
875 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
876
877 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
878
879 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
880
881 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
882 echo "configure:883: checking whether build environment is sane" >&5
883 # Just in case
884 sleep 1
885 echo timestamp > conftestfile
886 # Do `set' in a subshell so we don't clobber the current shell's
887 # arguments.  Must try -L first in case configure is actually a
888 # symlink; some systems play weird games with the mod time of symlinks
889 # (eg FreeBSD returns the mod time of the symlink's containing
890 # directory).
891 if (
892    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
893    if test "$*" = "X"; then
894       # -L didn't work.
895       set X `ls -t $srcdir/configure conftestfile`
896    fi
897    if test "$*" != "X $srcdir/configure conftestfile" \
898       && test "$*" != "X conftestfile $srcdir/configure"; then
899
900       # If neither matched, then we have a broken ls.  This can happen
901       # if, for instance, CONFIG_SHELL is bash and it inherits a
902       # broken ls alias from the environment.  This has actually
903       # happened.  Such a system could not be considered "sane".
904       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
905 alias in your environment" 1>&2; exit 1; }
906    fi
907
908    test "$2" = conftestfile
909    )
910 then
911    # Ok.
912    :
913 else
914    { echo "configure: error: newly created file is older than distributed files!
915 Check your system clock" 1>&2; exit 1; }
916 fi
917 rm -f conftest*
918 echo "$ac_t""yes" 1>&6
919 if test "$program_transform_name" = s,x,x,; then
920   program_transform_name=
921 else
922   # Double any \ or $.  echo might interpret backslashes.
923   cat <<\EOF_SED > conftestsed
924 s,\\,\\\\,g; s,\$,$$,g
925 EOF_SED
926   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
927   rm -f conftestsed
928 fi
929 test "$program_prefix" != NONE &&
930   program_transform_name="s,^,${program_prefix},;$program_transform_name"
931 # Use a double $ so make ignores it.
932 test "$program_suffix" != NONE &&
933   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
934
935 # sed with no file args requires a program.
936 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
937
938 for ac_prog in mawk gawk nawk awk
939 do
940 # Extract the first word of "$ac_prog", so it can be a program name with args.
941 set dummy $ac_prog; ac_word=$2
942 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
943 echo "configure:944: checking for $ac_word" >&5
944 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
945   echo $ac_n "(cached) $ac_c" 1>&6
946 else
947   if test -n "$AWK"; then
948   ac_cv_prog_AWK="$AWK" # Let the user override the test.
949 else
950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
951   ac_dummy="$PATH"
952   for ac_dir in $ac_dummy; do
953     test -z "$ac_dir" && ac_dir=.
954     if test -f $ac_dir/$ac_word; then
955       ac_cv_prog_AWK="$ac_prog"
956       break
957     fi
958   done
959   IFS="$ac_save_ifs"
960 fi
961 fi
962 AWK="$ac_cv_prog_AWK"
963 if test -n "$AWK"; then
964   echo "$ac_t""$AWK" 1>&6
965 else
966   echo "$ac_t""no" 1>&6
967 fi
968
969 test -n "$AWK" && break
970 done
971
972 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
973 echo "configure:974: checking whether ${MAKE-make} sets \${MAKE}" >&5
974 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
975 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
976   echo $ac_n "(cached) $ac_c" 1>&6
977 else
978   cat > conftestmake <<\EOF
979 all:
980         @echo 'ac_maketemp="${MAKE}"'
981 EOF
982 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
983 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
984 if test -n "$ac_maketemp"; then
985   eval ac_cv_prog_make_${ac_make}_set=yes
986 else
987   eval ac_cv_prog_make_${ac_make}_set=no
988 fi
989 rm -f conftestmake
990 fi
991 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
992   echo "$ac_t""yes" 1>&6
993   SET_MAKE=
994 else
995   echo "$ac_t""no" 1>&6
996   SET_MAKE="MAKE=${MAKE-make}"
997 fi
998
999
1000
1001 PACKAGE=OpenLDAP
1002
1003 VERSION=$OL_VERSION
1004
1005 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1006   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1007 fi
1008
1009
1010
1011 missing_dir=`cd $ac_aux_dir && pwd`
1012 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1013 echo "configure:1014: checking for working aclocal" >&5
1014 # Run test in a subshell; some versions of sh will print an error if
1015 # an executable is not found, even if stderr is redirected.
1016 # Redirect stdin to placate older versions of autoconf.  Sigh.
1017 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1018    ACLOCAL=aclocal
1019    echo "$ac_t""found" 1>&6
1020 else
1021    ACLOCAL="$missing_dir/missing aclocal"
1022    echo "$ac_t""missing" 1>&6
1023 fi
1024
1025 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1026 echo "configure:1027: checking for working autoconf" >&5
1027 # Run test in a subshell; some versions of sh will print an error if
1028 # an executable is not found, even if stderr is redirected.
1029 # Redirect stdin to placate older versions of autoconf.  Sigh.
1030 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1031    AUTOCONF=autoconf
1032    echo "$ac_t""found" 1>&6
1033 else
1034    AUTOCONF="$missing_dir/missing autoconf"
1035    echo "$ac_t""missing" 1>&6
1036 fi
1037
1038 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1039 echo "configure:1040: checking for working automake" >&5
1040 # Run test in a subshell; some versions of sh will print an error if
1041 # an executable is not found, even if stderr is redirected.
1042 # Redirect stdin to placate older versions of autoconf.  Sigh.
1043 if (automake --version) < /dev/null > /dev/null 2>&1; then
1044    AUTOMAKE=automake
1045    echo "$ac_t""found" 1>&6
1046 else
1047    AUTOMAKE="$missing_dir/missing automake"
1048    echo "$ac_t""missing" 1>&6
1049 fi
1050
1051 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1052 echo "configure:1053: checking for working autoheader" >&5
1053 # Run test in a subshell; some versions of sh will print an error if
1054 # an executable is not found, even if stderr is redirected.
1055 # Redirect stdin to placate older versions of autoconf.  Sigh.
1056 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1057    AUTOHEADER=autoheader
1058    echo "$ac_t""found" 1>&6
1059 else
1060    AUTOHEADER="$missing_dir/missing autoheader"
1061    echo "$ac_t""missing" 1>&6
1062 fi
1063
1064 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1065 echo "configure:1066: checking for working makeinfo" >&5
1066 # Run test in a subshell; some versions of sh will print an error if
1067 # an executable is not found, even if stderr is redirected.
1068 # Redirect stdin to placate older versions of autoconf.  Sigh.
1069 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1070    MAKEINFO=makeinfo
1071    echo "$ac_t""found" 1>&6
1072 else
1073    MAKEINFO="$missing_dir/missing makeinfo"
1074    echo "$ac_t""missing" 1>&6
1075 fi
1076
1077 install_sh="$missing_dir/install-sh"
1078 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1079
1080 for ac_prog in gnutar gtar tar
1081 do
1082 # Extract the first word of "$ac_prog", so it can be a program name with args.
1083 set dummy $ac_prog; ac_word=$2
1084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1085 echo "configure:1086: checking for $ac_word" >&5
1086 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1087   echo $ac_n "(cached) $ac_c" 1>&6
1088 else
1089   if test -n "$AMTAR"; then
1090   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1091 else
1092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1093   ac_dummy="$PATH"
1094   for ac_dir in $ac_dummy; do
1095     test -z "$ac_dir" && ac_dir=.
1096     if test -f $ac_dir/$ac_word; then
1097       ac_cv_prog_AMTAR="$ac_prog"
1098       break
1099     fi
1100   done
1101   IFS="$ac_save_ifs"
1102 fi
1103 fi
1104 AMTAR="$ac_cv_prog_AMTAR"
1105 if test -n "$AMTAR"; then
1106   echo "$ac_t""$AMTAR" 1>&6
1107 else
1108   echo "$ac_t""no" 1>&6
1109 fi
1110
1111 test -n "$AMTAR" && break
1112 done
1113
1114
1115 AMTARFLAGS=
1116 if test -n "$AMTAR"; then
1117   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1118         AMTARFLAGS=o
1119   fi
1120 fi
1121
1122
1123
1124 cat >> confdefs.h <<EOF
1125 #define OPENLDAP_PACKAGE "$PACKAGE"
1126 EOF
1127
1128 cat >> confdefs.h <<EOF
1129 #define OPENLDAP_VERSION "$VERSION"
1130 EOF
1131
1132
1133
1134
1135 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1136 echo "configure:1137: checking configure arguments" >&5
1137
1138
1139 top_builddir=`pwd`
1140
1141 ldap_subdir="/openldap"
1142
1143 # Check whether --with-subdir or --without-subdir was given.
1144 if test "${with_subdir+set}" = set; then
1145   withval="$with_subdir"
1146   case "$withval" in
1147         no) ldap_subdir=""
1148                 ;;
1149         yes)
1150                 ;;
1151         /*|\\*)
1152                 ldap_subdir="$withval"
1153                 ;;
1154         *)
1155                 ldap_subdir="/$withval"
1156                 ;;
1157 esac
1158
1159 fi
1160
1161
1162 # OpenLDAP --enable-debug
1163         # Check whether --enable-debug or --disable-debug was given.
1164 if test "${enable_debug+set}" = set; then
1165   enableval="$enable_debug"
1166   
1167         ol_arg=invalid
1168         for ol_val in auto yes no ; do
1169                 if test "$enableval" = "$ol_val" ; then
1170                         ol_arg="$ol_val"
1171                 fi
1172         done
1173         if test "$ol_arg" = "invalid" ; then
1174                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1175         fi
1176         ol_enable_debug="$ol_arg"
1177
1178 else
1179         ol_enable_debug="yes"
1180 fi
1181 # end --enable-debug
1182 # OpenLDAP --enable-syslog
1183         # Check whether --enable-syslog or --disable-syslog was given.
1184 if test "${enable_syslog+set}" = set; then
1185   enableval="$enable_syslog"
1186   
1187         ol_arg=invalid
1188         for ol_val in auto yes no ; do
1189                 if test "$enableval" = "$ol_val" ; then
1190                         ol_arg="$ol_val"
1191                 fi
1192         done
1193         if test "$ol_arg" = "invalid" ; then
1194                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1195         fi
1196         ol_enable_syslog="$ol_arg"
1197
1198 else
1199         ol_enable_syslog="auto"
1200 fi
1201 # end --enable-syslog
1202 # OpenLDAP --enable-proctitle
1203         # Check whether --enable-proctitle or --disable-proctitle was given.
1204 if test "${enable_proctitle+set}" = set; then
1205   enableval="$enable_proctitle"
1206   
1207         ol_arg=invalid
1208         for ol_val in auto yes no ; do
1209                 if test "$enableval" = "$ol_val" ; then
1210                         ol_arg="$ol_val"
1211                 fi
1212         done
1213         if test "$ol_arg" = "invalid" ; then
1214                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1215         fi
1216         ol_enable_proctitle="$ol_arg"
1217
1218 else
1219         ol_enable_proctitle="yes"
1220 fi
1221 # end --enable-proctitle
1222 # OpenLDAP --enable-cache
1223         # Check whether --enable-cache or --disable-cache was given.
1224 if test "${enable_cache+set}" = set; then
1225   enableval="$enable_cache"
1226   
1227         ol_arg=invalid
1228         for ol_val in auto yes no ; do
1229                 if test "$enableval" = "$ol_val" ; then
1230                         ol_arg="$ol_val"
1231                 fi
1232         done
1233         if test "$ol_arg" = "invalid" ; then
1234                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1235         fi
1236         ol_enable_cache="$ol_arg"
1237
1238 else
1239         ol_enable_cache="yes"
1240 fi
1241 # end --enable-cache
1242 # OpenLDAP --enable-dns
1243         # Check whether --enable-dns or --disable-dns was given.
1244 if test "${enable_dns+set}" = set; then
1245   enableval="$enable_dns"
1246   
1247         ol_arg=invalid
1248         for ol_val in auto yes no ; do
1249                 if test "$enableval" = "$ol_val" ; then
1250                         ol_arg="$ol_val"
1251                 fi
1252         done
1253         if test "$ol_arg" = "invalid" ; then
1254                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1255         fi
1256         ol_enable_dns="$ol_arg"
1257
1258 else
1259         ol_enable_dns="no"
1260 fi
1261 # end --enable-dns
1262 # OpenLDAP --enable-referrals
1263         # Check whether --enable-referrals or --disable-referrals was given.
1264 if test "${enable_referrals+set}" = set; then
1265   enableval="$enable_referrals"
1266   
1267         ol_arg=invalid
1268         for ol_val in auto yes no ; do
1269                 if test "$enableval" = "$ol_val" ; then
1270                         ol_arg="$ol_val"
1271                 fi
1272         done
1273         if test "$ol_arg" = "invalid" ; then
1274                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1275         fi
1276         ol_enable_referrals="$ol_arg"
1277
1278 else
1279         ol_enable_referrals="yes"
1280 fi
1281 # end --enable-referrals
1282 # OpenLDAP --enable-cldap
1283         # Check whether --enable-cldap or --disable-cldap was given.
1284 if test "${enable_cldap+set}" = set; then
1285   enableval="$enable_cldap"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no ; do
1289                 if test "$enableval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1295         fi
1296         ol_enable_cldap="$ol_arg"
1297
1298 else
1299         ol_enable_cldap="no"
1300 fi
1301 # end --enable-cldap
1302 # OpenLDAP --enable-x_compile
1303         # Check whether --enable-x_compile or --disable-x_compile was given.
1304 if test "${enable_x_compile+set}" = set; then
1305   enableval="$enable_x_compile"
1306   
1307         ol_arg=invalid
1308         for ol_val in yes no ; do
1309                 if test "$enableval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1315         fi
1316         ol_enable_x_compile="$ol_arg"
1317
1318 else
1319         ol_enable_x_compile="no"
1320 fi
1321 # end --enable-x_compile
1322
1323 # OpenLDAP --enable-dmalloc
1324         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1325 if test "${enable_dmalloc+set}" = set; then
1326   enableval="$enable_dmalloc"
1327   
1328         ol_arg=invalid
1329         for ol_val in auto yes no ; do
1330                 if test "$enableval" = "$ol_val" ; then
1331                         ol_arg="$ol_val"
1332                 fi
1333         done
1334         if test "$ol_arg" = "invalid" ; then
1335                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1336         fi
1337         ol_enable_dmalloc="$ol_arg"
1338
1339 else
1340         ol_enable_dmalloc="no"
1341 fi
1342 # end --enable-dmalloc
1343
1344 # OpenLDAP --with-cyrus_sasl
1345         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1346 if test "${with_cyrus_sasl+set}" = set; then
1347   withval="$with_cyrus_sasl"
1348   
1349         ol_arg=invalid
1350         for ol_val in auto yes no  ; do
1351                 if test "$withval" = "$ol_val" ; then
1352                         ol_arg="$ol_val"
1353                 fi
1354         done
1355         if test "$ol_arg" = "invalid" ; then
1356                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1357         fi
1358         ol_with_cyrus_sasl="$ol_arg"
1359
1360 else
1361         ol_with_cyrus_sasl="auto"
1362 fi
1363 # end --with-cyrus_sasl
1364
1365 # OpenLDAP --with-fetch
1366         # Check whether --with-fetch or --without-fetch was given.
1367 if test "${with_fetch+set}" = set; then
1368   withval="$with_fetch"
1369   
1370         ol_arg=invalid
1371         for ol_val in auto yes no  ; do
1372                 if test "$withval" = "$ol_val" ; then
1373                         ol_arg="$ol_val"
1374                 fi
1375         done
1376         if test "$ol_arg" = "invalid" ; then
1377                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1378         fi
1379         ol_with_fetch="$ol_arg"
1380
1381 else
1382         ol_with_fetch="auto"
1383 fi
1384 # end --with-fetch
1385
1386 # OpenLDAP --with-kerberos
1387         # Check whether --with-kerberos or --without-kerberos was given.
1388 if test "${with_kerberos+set}" = set; then
1389   withval="$with_kerberos"
1390   
1391         ol_arg=invalid
1392         for ol_val in auto k5 k4 afs yes no ; do
1393                 if test "$withval" = "$ol_val" ; then
1394                         ol_arg="$ol_val"
1395                 fi
1396         done
1397         if test "$ol_arg" = "invalid" ; then
1398                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1399         fi
1400         ol_with_kerberos="$ol_arg"
1401
1402 else
1403         ol_with_kerberos="auto"
1404 fi
1405 # end --with-kerberos
1406
1407 # OpenLDAP --with-readline
1408         # Check whether --with-readline or --without-readline was given.
1409 if test "${with_readline+set}" = set; then
1410   withval="$with_readline"
1411   
1412         ol_arg=invalid
1413         for ol_val in auto yes no  ; do
1414                 if test "$withval" = "$ol_val" ; then
1415                         ol_arg="$ol_val"
1416                 fi
1417         done
1418         if test "$ol_arg" = "invalid" ; then
1419                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1420         fi
1421         ol_with_readline="$ol_arg"
1422
1423 else
1424         ol_with_readline="auto"
1425 fi
1426 # end --with-readline
1427
1428 # OpenLDAP --with-threads
1429         # Check whether --with-threads or --without-threads was given.
1430 if test "${with_threads+set}" = set; then
1431   withval="$with_threads"
1432   
1433         ol_arg=invalid
1434         for ol_val in auto posix mach pth lwp yes no manual  ; do
1435                 if test "$withval" = "$ol_val" ; then
1436                         ol_arg="$ol_val"
1437                 fi
1438         done
1439         if test "$ol_arg" = "invalid" ; then
1440                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1441         fi
1442         ol_with_threads="$ol_arg"
1443
1444 else
1445         ol_with_threads="auto"
1446 fi
1447 # end --with-threads
1448
1449 # OpenLDAP --with-tls
1450         # Check whether --with-tls or --without-tls was given.
1451 if test "${with_tls+set}" = set; then
1452   withval="$with_tls"
1453   
1454         ol_arg=invalid
1455         for ol_val in auto ssleay openssl yes no  ; do
1456                 if test "$withval" = "$ol_val" ; then
1457                         ol_arg="$ol_val"
1458                 fi
1459         done
1460         if test "$ol_arg" = "invalid" ; then
1461                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1462         fi
1463         ol_with_tls="$ol_arg"
1464
1465 else
1466         ol_with_tls="auto"
1467 fi
1468 # end --with-tls
1469
1470 # OpenLDAP --with-yielding_select
1471         # Check whether --with-yielding_select or --without-yielding_select was given.
1472 if test "${with_yielding_select+set}" = set; then
1473   withval="$with_yielding_select"
1474   
1475         ol_arg=invalid
1476         for ol_val in auto yes no manual  ; do
1477                 if test "$withval" = "$ol_val" ; then
1478                         ol_arg="$ol_val"
1479                 fi
1480         done
1481         if test "$ol_arg" = "invalid" ; then
1482                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1483         fi
1484         ol_with_yielding_select="$ol_arg"
1485
1486 else
1487         ol_with_yielding_select="auto"
1488 fi
1489 # end --with-yielding_select
1490
1491
1492 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1493 if test "${with_xxldapdoptions+set}" = set; then
1494   withval="$with_xxldapdoptions"
1495   :
1496 fi
1497
1498 # OpenLDAP --enable-ldapd
1499         # Check whether --enable-ldapd or --disable-ldapd was given.
1500 if test "${enable_ldapd+set}" = set; then
1501   enableval="$enable_ldapd"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto yes no ; do
1505                 if test "$enableval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1511         fi
1512         ol_enable_ldapd="$ol_arg"
1513
1514 else
1515         ol_enable_ldapd="no"
1516 fi
1517 # end --enable-ldapd
1518
1519 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1520 if test "${with_xxslapdoptions+set}" = set; then
1521   withval="$with_xxslapdoptions"
1522   :
1523 fi
1524
1525 # OpenLDAP --enable-slapd
1526         # Check whether --enable-slapd or --disable-slapd was given.
1527 if test "${enable_slapd+set}" = set; then
1528   enableval="$enable_slapd"
1529   
1530         ol_arg=invalid
1531         for ol_val in auto yes no ; do
1532                 if test "$enableval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1538         fi
1539         ol_enable_slapd="$ol_arg"
1540
1541 else
1542         ol_enable_slapd="yes"
1543 fi
1544 # end --enable-slapd
1545 # OpenLDAP --enable-cleartext
1546         # Check whether --enable-cleartext or --disable-cleartext was given.
1547 if test "${enable_cleartext+set}" = set; then
1548   enableval="$enable_cleartext"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no ; do
1552                 if test "$enableval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1558         fi
1559         ol_enable_cleartext="$ol_arg"
1560
1561 else
1562         ol_enable_cleartext="yes"
1563 fi
1564 # end --enable-cleartext
1565 # OpenLDAP --enable-crypt
1566         # Check whether --enable-crypt or --disable-crypt was given.
1567 if test "${enable_crypt+set}" = set; then
1568   enableval="$enable_crypt"
1569   
1570         ol_arg=invalid
1571         for ol_val in auto yes no ; do
1572                 if test "$enableval" = "$ol_val" ; then
1573                         ol_arg="$ol_val"
1574                 fi
1575         done
1576         if test "$ol_arg" = "invalid" ; then
1577                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1578         fi
1579         ol_enable_crypt="$ol_arg"
1580
1581 else
1582         ol_enable_crypt="auto"
1583 fi
1584 # end --enable-crypt
1585 # OpenLDAP --enable-modules
1586         # Check whether --enable-modules or --disable-modules was given.
1587 if test "${enable_modules+set}" = set; then
1588   enableval="$enable_modules"
1589   
1590         ol_arg=invalid
1591         for ol_val in auto yes no ; do
1592                 if test "$enableval" = "$ol_val" ; then
1593                         ol_arg="$ol_val"
1594                 fi
1595         done
1596         if test "$ol_arg" = "invalid" ; then
1597                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1598         fi
1599         ol_enable_modules="$ol_arg"
1600
1601 else
1602         ol_enable_modules="no"
1603 fi
1604 # end --enable-modules
1605 # OpenLDAP --enable-multimaster
1606         # Check whether --enable-multimaster or --disable-multimaster was given.
1607 if test "${enable_multimaster+set}" = set; then
1608   enableval="$enable_multimaster"
1609   
1610         ol_arg=invalid
1611         for ol_val in auto yes no ; do
1612                 if test "$enableval" = "$ol_val" ; then
1613                         ol_arg="$ol_val"
1614                 fi
1615         done
1616         if test "$ol_arg" = "invalid" ; then
1617                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1618         fi
1619         ol_enable_multimaster="$ol_arg"
1620
1621 else
1622         ol_enable_multimaster="no"
1623 fi
1624 # end --enable-multimaster
1625 # OpenLDAP --enable-phonetic
1626         # Check whether --enable-phonetic or --disable-phonetic was given.
1627 if test "${enable_phonetic+set}" = set; then
1628   enableval="$enable_phonetic"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no ; do
1632                 if test "$enableval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1638         fi
1639         ol_enable_phonetic="$ol_arg"
1640
1641 else
1642         ol_enable_phonetic="no"
1643 fi
1644 # end --enable-phonetic
1645 # OpenLDAP --enable-quipu
1646         # Check whether --enable-quipu or --disable-quipu was given.
1647 if test "${enable_quipu+set}" = set; then
1648   enableval="$enable_quipu"
1649   
1650         ol_arg=invalid
1651         for ol_val in auto yes no ; do
1652                 if test "$enableval" = "$ol_val" ; then
1653                         ol_arg="$ol_val"
1654                 fi
1655         done
1656         if test "$ol_arg" = "invalid" ; then
1657                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1658         fi
1659         ol_enable_quipu="$ol_arg"
1660
1661 else
1662         ol_enable_quipu="no"
1663 fi
1664 # end --enable-quipu
1665 # OpenLDAP --enable-rlookups
1666         # Check whether --enable-rlookups or --disable-rlookups was given.
1667 if test "${enable_rlookups+set}" = set; then
1668   enableval="$enable_rlookups"
1669   
1670         ol_arg=invalid
1671         for ol_val in auto yes no ; do
1672                 if test "$enableval" = "$ol_val" ; then
1673                         ol_arg="$ol_val"
1674                 fi
1675         done
1676         if test "$ol_arg" = "invalid" ; then
1677                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1678         fi
1679         ol_enable_rlookups="$ol_arg"
1680
1681 else
1682         ol_enable_rlookups="auto"
1683 fi
1684 # end --enable-rlookups
1685 # OpenLDAP --enable-aci
1686         # Check whether --enable-aci or --disable-aci was given.
1687 if test "${enable_aci+set}" = set; then
1688   enableval="$enable_aci"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto yes no ; do
1692                 if test "$enableval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1698         fi
1699         ol_enable_aci="$ol_arg"
1700
1701 else
1702         ol_enable_aci="no"
1703 fi
1704 # end --enable-aci
1705 # OpenLDAP --enable-discreteaci
1706         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1707 if test "${enable_discreteaci+set}" = set; then
1708   enableval="$enable_discreteaci"
1709   
1710         ol_arg=invalid
1711         for ol_val in auto yes no ; do
1712                 if test "$enableval" = "$ol_val" ; then
1713                         ol_arg="$ol_val"
1714                 fi
1715         done
1716         if test "$ol_arg" = "invalid" ; then
1717                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1718         fi
1719         ol_enable_discreteaci="$ol_arg"
1720
1721 else
1722         ol_enable_discreteaci="no"
1723 fi
1724 # end --enable-discreteaci
1725 # OpenLDAP --enable-wrappers
1726         # Check whether --enable-wrappers or --disable-wrappers was given.
1727 if test "${enable_wrappers+set}" = set; then
1728   enableval="$enable_wrappers"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1738         fi
1739         ol_enable_wrappers="$ol_arg"
1740
1741 else
1742         ol_enable_wrappers="no"
1743 fi
1744 # end --enable-wrappers
1745
1746 # OpenLDAP --enable-bdb2
1747         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1748 if test "${enable_bdb2+set}" = set; then
1749   enableval="$enable_bdb2"
1750   
1751         ol_arg=invalid
1752         for ol_val in auto yes no ; do
1753                 if test "$enableval" = "$ol_val" ; then
1754                         ol_arg="$ol_val"
1755                 fi
1756         done
1757         if test "$ol_arg" = "invalid" ; then
1758                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1759         fi
1760         ol_enable_bdb2="$ol_arg"
1761
1762 else
1763         ol_enable_bdb2="no"
1764 fi
1765 # end --enable-bdb2
1766 # OpenLDAP --with-bdb2_module
1767         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1768 if test "${with_bdb2_module+set}" = set; then
1769   withval="$with_bdb2_module"
1770   
1771         ol_arg=invalid
1772         for ol_val in static dynamic ; do
1773                 if test "$withval" = "$ol_val" ; then
1774                         ol_arg="$ol_val"
1775                 fi
1776         done
1777         if test "$ol_arg" = "invalid" ; then
1778                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1779         fi
1780         ol_with_bdb2_module="$ol_arg"
1781
1782 else
1783         ol_with_bdb2_module="static"
1784 fi
1785 # end --with-bdb2_module
1786
1787 # OpenLDAP --enable-ldap
1788         # Check whether --enable-ldap or --disable-ldap was given.
1789 if test "${enable_ldap+set}" = set; then
1790   enableval="$enable_ldap"
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-ldap" 1>&2; exit 1; }
1800         fi
1801         ol_enable_ldap="$ol_arg"
1802
1803 else
1804         ol_enable_ldap="no"
1805 fi
1806 # end --enable-ldap
1807 # OpenLDAP --with-ldap_module
1808         # Check whether --with-ldap_module or --without-ldap_module was given.
1809 if test "${with_ldap_module+set}" = set; then
1810   withval="$with_ldap_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-ldap_module" 1>&2; exit 1; }
1820         fi
1821         ol_with_ldap_module="$ol_arg"
1822
1823 else
1824         ol_with_ldap_module="static"
1825 fi
1826 # end --with-ldap_module
1827
1828 # OpenLDAP --enable-ldbm
1829         # Check whether --enable-ldbm or --disable-ldbm was given.
1830 if test "${enable_ldbm+set}" = set; then
1831   enableval="$enable_ldbm"
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-ldbm" 1>&2; exit 1; }
1841         fi
1842         ol_enable_ldbm="$ol_arg"
1843
1844 else
1845         ol_enable_ldbm="yes"
1846 fi
1847 # end --enable-ldbm
1848 # OpenLDAP --with-ldbm_api
1849         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1850 if test "${with_ldbm_api+set}" = set; then
1851   withval="$with_ldbm_api"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto db2 db mdbm gdbm ndbm manual ; 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-ldbm_api" 1>&2; exit 1; }
1861         fi
1862         ol_with_ldbm_api="$ol_arg"
1863
1864 else
1865         ol_with_ldbm_api="auto"
1866 fi
1867 # end --with-ldbm_api
1868
1869 # OpenLDAP --with-ldbm_module
1870         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1871 if test "${with_ldbm_module+set}" = set; then
1872   withval="$with_ldbm_module"
1873   
1874         ol_arg=invalid
1875         for ol_val in static dynamic ; do
1876                 if test "$withval" = "$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 $withval for --with-ldbm_module" 1>&2; exit 1; }
1882         fi
1883         ol_with_ldbm_module="$ol_arg"
1884
1885 else
1886         ol_with_ldbm_module="static"
1887 fi
1888 # end --with-ldbm_module
1889
1890 # OpenLDAP --with-ldbm_type
1891         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1892 if test "${with_ldbm_type+set}" = set; then
1893   withval="$with_ldbm_type"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto btree hash ; do
1897                 if test "$withval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1903         fi
1904         ol_with_ldbm_type="$ol_arg"
1905
1906 else
1907         ol_with_ldbm_type="auto"
1908 fi
1909 # end --with-ldbm_type
1910
1911
1912 # OpenLDAP --enable-passwd
1913         # Check whether --enable-passwd or --disable-passwd was given.
1914 if test "${enable_passwd+set}" = set; then
1915   enableval="$enable_passwd"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto yes no ; do
1919                 if test "$enableval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1925         fi
1926         ol_enable_passwd="$ol_arg"
1927
1928 else
1929         ol_enable_passwd="no"
1930 fi
1931 # end --enable-passwd
1932 # OpenLDAP --with-passwd_module
1933         # Check whether --with-passwd_module or --without-passwd_module was given.
1934 if test "${with_passwd_module+set}" = set; then
1935   withval="$with_passwd_module"
1936   
1937         ol_arg=invalid
1938         for ol_val in static dynamic ; do
1939                 if test "$withval" = "$ol_val" ; then
1940                         ol_arg="$ol_val"
1941                 fi
1942         done
1943         if test "$ol_arg" = "invalid" ; then
1944                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1945         fi
1946         ol_with_passwd_module="$ol_arg"
1947
1948 else
1949         ol_with_passwd_module="static"
1950 fi
1951 # end --with-passwd_module
1952
1953 # OpenLDAP --enable-perl
1954         # Check whether --enable-perl or --disable-perl was given.
1955 if test "${enable_perl+set}" = set; then
1956   enableval="$enable_perl"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1966         fi
1967         ol_enable_perl="$ol_arg"
1968
1969 else
1970         ol_enable_perl="no"
1971 fi
1972 # end --enable-perl
1973 # OpenLDAP --with-perl_module
1974         # Check whether --with-perl_module or --without-perl_module was given.
1975 if test "${with_perl_module+set}" = set; then
1976   withval="$with_perl_module"
1977   
1978         ol_arg=invalid
1979         for ol_val in static dynamic ; do
1980                 if test "$withval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1986         fi
1987         ol_with_perl_module="$ol_arg"
1988
1989 else
1990         ol_with_perl_module="static"
1991 fi
1992 # end --with-perl_module
1993
1994 # OpenLDAP --enable-shell
1995         # Check whether --enable-shell or --disable-shell was given.
1996 if test "${enable_shell+set}" = set; then
1997   enableval="$enable_shell"
1998   
1999         ol_arg=invalid
2000         for ol_val in auto yes no ; do
2001                 if test "$enableval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2007         fi
2008         ol_enable_shell="$ol_arg"
2009
2010 else
2011         ol_enable_shell="no"
2012 fi
2013 # end --enable-shell
2014 # OpenLDAP --with-shell_module
2015         # Check whether --with-shell_module or --without-shell_module was given.
2016 if test "${with_shell_module+set}" = set; then
2017   withval="$with_shell_module"
2018   
2019         ol_arg=invalid
2020         for ol_val in static dynamic ; do
2021                 if test "$withval" = "$ol_val" ; then
2022                         ol_arg="$ol_val"
2023                 fi
2024         done
2025         if test "$ol_arg" = "invalid" ; then
2026                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2027         fi
2028         ol_with_shell_module="$ol_arg"
2029
2030 else
2031         ol_with_shell_module="static"
2032 fi
2033 # end --with-shell_module
2034
2035 # OpenLDAP --enable-tcl
2036         # Check whether --enable-tcl or --disable-tcl was given.
2037 if test "${enable_tcl+set}" = set; then
2038   enableval="$enable_tcl"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto yes no ; do
2042                 if test "$enableval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2048         fi
2049         ol_enable_tcl="$ol_arg"
2050
2051 else
2052         ol_enable_tcl="no"
2053 fi
2054 # end --enable-tcl
2055 # OpenLDAP --with-tcl_module
2056         # Check whether --with-tcl_module or --without-tcl_module was given.
2057 if test "${with_tcl_module+set}" = set; then
2058   withval="$with_tcl_module"
2059   
2060         ol_arg=invalid
2061         for ol_val in static dynamic ; do
2062                 if test "$withval" = "$ol_val" ; then
2063                         ol_arg="$ol_val"
2064                 fi
2065         done
2066         if test "$ol_arg" = "invalid" ; then
2067                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2068         fi
2069         ol_with_tcl_module="$ol_arg"
2070
2071 else
2072         ol_with_tcl_module="static"
2073 fi
2074 # end --with-tcl_module
2075
2076
2077 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2078 if test "${with_xxslurpdoptions+set}" = set; then
2079   withval="$with_xxslurpdoptions"
2080   :
2081 fi
2082
2083 # OpenLDAP --enable-slurpd
2084         # Check whether --enable-slurpd or --disable-slurpd was given.
2085 if test "${enable_slurpd+set}" = set; then
2086   enableval="$enable_slurpd"
2087   
2088         ol_arg=invalid
2089         for ol_val in auto yes no ; do
2090                 if test "$enableval" = "$ol_val" ; then
2091                         ol_arg="$ol_val"
2092                 fi
2093         done
2094         if test "$ol_arg" = "invalid" ; then
2095                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2096         fi
2097         ol_enable_slurpd="$ol_arg"
2098
2099 else
2100         ol_enable_slurpd="auto"
2101 fi
2102 # end --enable-slurpd
2103
2104 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2105 if test "${with_xxliboptions+set}" = set; then
2106   withval="$with_xxliboptions"
2107   :
2108 fi
2109
2110 # Check whether --enable-static or --disable-static was given.
2111 if test "${enable_static+set}" = set; then
2112   enableval="$enable_static"
2113   p=${PACKAGE-default}
2114 case "$enableval" in
2115 yes) enable_static=yes ;;
2116 no) enable_static=no ;;
2117 *)
2118   enable_static=no
2119   # Look at the argument we got.  We use all the common list separators.
2120   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2121   for pkg in $enableval; do
2122     if test "X$pkg" = "X$p"; then
2123       enable_static=yes
2124     fi
2125   done
2126   IFS="$ac_save_ifs"
2127   ;;
2128 esac
2129 else
2130   enable_static=yes
2131 fi
2132
2133 # Check whether --enable-shared or --disable-shared was given.
2134 if test "${enable_shared+set}" = set; then
2135   enableval="$enable_shared"
2136   p=${PACKAGE-default}
2137 case "$enableval" in
2138 yes) enable_shared=yes ;;
2139 no) enable_shared=no ;;
2140 *)
2141   enable_shared=no
2142   # Look at the argument we got.  We use all the common list separators.
2143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2144   for pkg in $enableval; do
2145     if test "X$pkg" = "X$p"; then
2146       enable_shared=yes
2147     fi
2148   done
2149   IFS="$ac_save_ifs"
2150   ;;
2151 esac
2152 else
2153   enable_shared=yes
2154 fi
2155
2156
2157
2158 # validate options
2159 if test $ol_enable_dns = yes ; then
2160         if test $ol_enable_referrals = no ; then
2161                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2162         fi
2163         if test $ol_enable_referrals = auto ; then
2164                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2165                 ol_enable_referrals=yes
2166         fi
2167 fi
2168
2169 if test $ol_enable_slapd = no ; then
2170                 if test $ol_enable_bdb2 = yes ; then
2171                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2172         fi
2173         if test $ol_enable_ldap = yes ; then
2174                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2175         fi
2176         if test $ol_enable_ldbm = yes ; then
2177                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2178         fi
2179         if test $ol_enable_passwd = yes ; then
2180                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2181         fi
2182         if test $ol_enable_perl = yes ; then
2183                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2184         fi
2185         if test $ol_enable_shell = yes ; then
2186                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2187         fi
2188         if test $ol_enable_tcl = yes ; then
2189                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2190         fi
2191         if test $ol_enable_modules = yes ; then
2192                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2193         fi
2194         if test $ol_enable_multimaster = yes ; then
2195                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2196         fi
2197         if test $ol_enable_wrappers = yes ; then
2198                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2199         fi
2200         if test $ol_enable_phonetic = yes ; then
2201                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2202         fi
2203         if test $ol_enable_quipu = yes ; then
2204                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2205         fi
2206         if test $ol_enable_rlookups = yes ; then
2207                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2208         fi
2209         if test $ol_enable_aci = yes ; then
2210                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2211         fi
2212         if test $ol_enable_discreteaci = yes ; then
2213                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2214         fi
2215         if test $ol_with_ldbm_api != auto ; then
2216                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2217         fi
2218         if test $ol_with_ldbm_type != auto ; then
2219                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2220         fi
2221         if test $ol_with_bdb2_module != static ; then
2222                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2223         fi
2224         if test $ol_with_ldap_module != static ; then
2225                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2226         fi
2227         if test $ol_with_ldbm_module != static ; then
2228                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2229         fi
2230         if test $ol_with_passwd_module != static ; then
2231                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2232         fi
2233         if test $ol_with_perl_module != static ; then
2234                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2235         fi
2236         if test $ol_with_shell_module != static ; then
2237                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2238         fi
2239         if test $ol_with_tcl_module != static ; then
2240                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2241         fi
2242         if test $ol_enable_slurpd = yes ; then
2243                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2244         fi
2245
2246         # force settings to no
2247         ol_enable_bdb2=no
2248         ol_enable_ldap=no
2249         ol_enable_ldbm=no
2250         ol_enable_passwd=no
2251         ol_enable_perl=no
2252         ol_enable_shell=no
2253         ol_enable_tcl=no
2254
2255         ol_enable_modules=no
2256         ol_enable_multimaster=no
2257         ol_enable_phonetic=no
2258         ol_enable_quipu=no
2259         ol_enable_rlookups=no
2260         ol_enable_aci=no
2261         ol_enable_discreteaci=no
2262         ol_enable_wrappers=no
2263
2264         ol_with_ldbm_api=no
2265         ol_with_ldbm_type=no
2266
2267         ol_with_bdb2_module=static
2268         ol_with_ldap_module=static
2269         ol_with_ldbm_module=static
2270         ol_with_passwd_module=static
2271         ol_with_perl_module=static
2272         ol_with_shell_module=static
2273         ol_with_tcl_module=static
2274
2275         ol_enable_slurpd=no
2276
2277 elif test $ol_enable_ldbm = no ; then
2278         
2279         if test $ol_with_ldbm_api != auto ; then
2280                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2281         fi
2282
2283         if test $ol_with_ldbm_type != auto ; then
2284                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2285         fi
2286
2287         if test $ol_with_ldbm_module != static ; then
2288                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2289         fi
2290
2291         if test $ol_enable_bdb2 = yes ; then
2292                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2293         fi
2294
2295         if test $ol_enable_modules != yes -a \
2296                 $ol_enable_ldap = no -a \
2297                 $ol_enable_passwd = no -a \
2298                 $ol_enable_perl = no -a \
2299                 $ol_enable_shell = no -a \
2300                 $ol_enable_tcl = no ; then
2301                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2302         fi
2303
2304         ol_with_ldbm_api=no
2305         ol_with_ldbm_type=no
2306         ol_with_ldbm_module=static
2307
2308 elif test $ol_enable_bdb2 = yes ; then
2309         
2310         if test $ol_with_ldbm_api != auto -a \
2311                 $ol_with_ldbm_api != db2 ; then
2312                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2313         fi
2314
2315         ol_with_ldbm_api=db2
2316
2317 else
2318         
2319         if test $ol_enable_bdb2 != no ; then
2320                 if test $ol_with_ldbm_api != auto -a \
2321                         $ol_with_ldbm_api != db2 ; then
2322                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2323                         ol_enable_bdb2=no
2324                 fi
2325         fi
2326
2327         if test $ol_with_ldbm_api = gdbm -a \
2328                 $ol_with_ldbm_type = btree ; then
2329                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2330         fi
2331         if test $ol_with_ldbm_api = mdbm -a \
2332                 $ol_with_ldbm_type = btree ; then
2333                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2334         fi
2335         if test $ol_with_ldbm_api = ndbm -a \
2336                 $ol_with_ldbm_type = btree ; then
2337                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2338         fi
2339 fi
2340
2341 if test $ol_enable_slurpd = yes ; then
2342                 if test $ol_with_threads = no ; then
2343                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2344         fi
2345 fi
2346
2347 echo "$ac_t""done" 1>&6
2348
2349 LDAP_LIBS=
2350 LDIF_LIBS=
2351 LDBM_LIBS=
2352 LTHREAD_LIBS=
2353 LUTIL_LIBS=
2354
2355 LDAPD_LIBS=
2356 SLAPD_LIBS=
2357 SLURPD_LIBS=
2358
2359 BUILD_LDAPD=no
2360 BUILD_SLAPD=no
2361 BUILD_SLURPD=no
2362
2363 BUILD_BDB2=no
2364 BUILD_LDAP=no
2365 BUILD_LDBM=no
2366 BUILD_PASSWD=no
2367 BUILD_PERL=no
2368 BUILD_QUIPU=no
2369 BUILD_SHELL=no
2370 BUILD_TCL=no
2371 BUILD_THREAD=no
2372
2373 BUILD_BDB2_DYNAMIC=static
2374 BUILD_LDAP_DYNAMIC=static
2375 BUILD_LDBM_DYNAMIC=static
2376 BUILD_PASSWD_DYNAMIC=static
2377 BUILD_PERL_DYNAMIC=static
2378 BUILD_SHELL_DYNAMIC=static
2379 BUILD_TCL_DYNAMIC=static
2380
2381 SLAPD_MODULES_LDFLAGS=
2382 SLAPD_MODULES_CPPFLAGS=
2383 SLAPD_MODULES_LIST=
2384
2385 SLAPD_PERL_LDFLAGS=
2386 SLAPD_PERL_CPPFLAGS=
2387
2388 KRB_LIBS=
2389 READLINE_LIBS=
2390 SASL_LIBS=
2391 TERMCAP_LIBS=
2392 TLS_LIBS=
2393 MODULES_LIBS=
2394
2395
2396
2397 cat >> confdefs.h <<\EOF
2398 #define HAVE_MKVERSION 1
2399 EOF
2400
2401
2402
2403
2404 ol_aix_threads=no
2405 case "$target" in
2406 *-*-aix*)       if test -z "$CC" ; then
2407                 case "$ol_with_threads" in
2408                 auto | yes |  posix) ol_aix_threads=yes ;;
2409                 esac
2410         fi
2411 ;;
2412 esac
2413
2414 if test $ol_aix_threads = yes ; then
2415         if test -z "${CC}" ; then
2416                 for ac_prog in cc_r xlc_r cc
2417 do
2418 # Extract the first word of "$ac_prog", so it can be a program name with args.
2419 set dummy $ac_prog; ac_word=$2
2420 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2421 echo "configure:2422: checking for $ac_word" >&5
2422 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2423   echo $ac_n "(cached) $ac_c" 1>&6
2424 else
2425   if test -n "$CC"; then
2426   ac_cv_prog_CC="$CC" # Let the user override the test.
2427 else
2428   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2429   ac_dummy="$PATH"
2430   for ac_dir in $ac_dummy; do
2431     test -z "$ac_dir" && ac_dir=.
2432     if test -f $ac_dir/$ac_word; then
2433       ac_cv_prog_CC="$ac_prog"
2434       break
2435     fi
2436   done
2437   IFS="$ac_save_ifs"
2438 fi
2439 fi
2440 CC="$ac_cv_prog_CC"
2441 if test -n "$CC"; then
2442   echo "$ac_t""$CC" 1>&6
2443 else
2444   echo "$ac_t""no" 1>&6
2445 fi
2446
2447 test -n "$CC" && break
2448 done
2449
2450
2451                 if test "$CC" = cc ; then
2452                                                 if test $ol_with_threads != auto ; then
2453                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2454                         else
2455                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2456                         fi
2457                         ol_with_threads=no
2458                 fi
2459         fi
2460
2461         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2462                 ol_with_threads=posix
2463                 ol_cv_pthread_create=yes
2464         fi
2465 fi
2466
2467 if test -z "${CC}"; then
2468         for ac_prog in cc
2469 do
2470 # Extract the first word of "$ac_prog", so it can be a program name with args.
2471 set dummy $ac_prog; ac_word=$2
2472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2473 echo "configure:2474: checking for $ac_word" >&5
2474 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2475   echo $ac_n "(cached) $ac_c" 1>&6
2476 else
2477   if test -n "$CC"; then
2478   ac_cv_prog_CC="$CC" # Let the user override the test.
2479 else
2480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2481   ac_dummy="$PATH"
2482   for ac_dir in $ac_dummy; do
2483     test -z "$ac_dir" && ac_dir=.
2484     if test -f $ac_dir/$ac_word; then
2485       ac_cv_prog_CC="$ac_prog"
2486       break
2487     fi
2488   done
2489   IFS="$ac_save_ifs"
2490 fi
2491 fi
2492 CC="$ac_cv_prog_CC"
2493 if test -n "$CC"; then
2494   echo "$ac_t""$CC" 1>&6
2495 else
2496   echo "$ac_t""no" 1>&6
2497 fi
2498
2499 test -n "$CC" && break
2500 done
2501
2502 fi
2503
2504
2505
2506 # Check whether --enable-fast-install or --disable-fast-install was given.
2507 if test "${enable_fast_install+set}" = set; then
2508   enableval="$enable_fast_install"
2509   p=${PACKAGE-default}
2510 case "$enableval" in
2511 yes) enable_fast_install=yes ;;
2512 no) enable_fast_install=no ;;
2513 *)
2514   enable_fast_install=no
2515   # Look at the argument we got.  We use all the common list separators.
2516   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2517   for pkg in $enableval; do
2518     if test "X$pkg" = "X$p"; then
2519       enable_fast_install=yes
2520     fi
2521   done
2522   IFS="$ac_save_ifs"
2523   ;;
2524 esac
2525 else
2526   enable_fast_install=yes
2527 fi
2528
2529 # Extract the first word of "ranlib", so it can be a program name with args.
2530 set dummy ranlib; ac_word=$2
2531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2532 echo "configure:2533: checking for $ac_word" >&5
2533 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2534   echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536   if test -n "$RANLIB"; then
2537   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2538 else
2539   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2540   ac_dummy="$PATH"
2541   for ac_dir in $ac_dummy; do
2542     test -z "$ac_dir" && ac_dir=.
2543     if test -f $ac_dir/$ac_word; then
2544       ac_cv_prog_RANLIB="ranlib"
2545       break
2546     fi
2547   done
2548   IFS="$ac_save_ifs"
2549   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2550 fi
2551 fi
2552 RANLIB="$ac_cv_prog_RANLIB"
2553 if test -n "$RANLIB"; then
2554   echo "$ac_t""$RANLIB" 1>&6
2555 else
2556   echo "$ac_t""no" 1>&6
2557 fi
2558
2559 # Extract the first word of "gcc", so it can be a program name with args.
2560 set dummy gcc; ac_word=$2
2561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2562 echo "configure:2563: checking for $ac_word" >&5
2563 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2564   echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566   if test -n "$CC"; then
2567   ac_cv_prog_CC="$CC" # Let the user override the test.
2568 else
2569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2570   ac_dummy="$PATH"
2571   for ac_dir in $ac_dummy; do
2572     test -z "$ac_dir" && ac_dir=.
2573     if test -f $ac_dir/$ac_word; then
2574       ac_cv_prog_CC="gcc"
2575       break
2576     fi
2577   done
2578   IFS="$ac_save_ifs"
2579 fi
2580 fi
2581 CC="$ac_cv_prog_CC"
2582 if test -n "$CC"; then
2583   echo "$ac_t""$CC" 1>&6
2584 else
2585   echo "$ac_t""no" 1>&6
2586 fi
2587
2588 if test -z "$CC"; then
2589   # Extract the first word of "cc", so it can be a program name with args.
2590 set dummy cc; ac_word=$2
2591 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2592 echo "configure:2593: checking for $ac_word" >&5
2593 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2594   echo $ac_n "(cached) $ac_c" 1>&6
2595 else
2596   if test -n "$CC"; then
2597   ac_cv_prog_CC="$CC" # Let the user override the test.
2598 else
2599   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2600   ac_prog_rejected=no
2601   ac_dummy="$PATH"
2602   for ac_dir in $ac_dummy; do
2603     test -z "$ac_dir" && ac_dir=.
2604     if test -f $ac_dir/$ac_word; then
2605       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2606         ac_prog_rejected=yes
2607         continue
2608       fi
2609       ac_cv_prog_CC="cc"
2610       break
2611     fi
2612   done
2613   IFS="$ac_save_ifs"
2614 if test $ac_prog_rejected = yes; then
2615   # We found a bogon in the path, so make sure we never use it.
2616   set dummy $ac_cv_prog_CC
2617   shift
2618   if test $# -gt 0; then
2619     # We chose a different compiler from the bogus one.
2620     # However, it has the same basename, so the bogon will be chosen
2621     # first if we set CC to just the basename; use the full file name.
2622     shift
2623     set dummy "$ac_dir/$ac_word" "$@"
2624     shift
2625     ac_cv_prog_CC="$@"
2626   fi
2627 fi
2628 fi
2629 fi
2630 CC="$ac_cv_prog_CC"
2631 if test -n "$CC"; then
2632   echo "$ac_t""$CC" 1>&6
2633 else
2634   echo "$ac_t""no" 1>&6
2635 fi
2636
2637   if test -z "$CC"; then
2638     case "`uname -s`" in
2639     *win32* | *WIN32* | *CYGWIN*)
2640       # Extract the first word of "cl", so it can be a program name with args.
2641 set dummy cl; ac_word=$2
2642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2643 echo "configure:2644: checking for $ac_word" >&5
2644 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2645   echo $ac_n "(cached) $ac_c" 1>&6
2646 else
2647   if test -n "$CC"; then
2648   ac_cv_prog_CC="$CC" # Let the user override the test.
2649 else
2650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2651   ac_dummy="$PATH"
2652   for ac_dir in $ac_dummy; do
2653     test -z "$ac_dir" && ac_dir=.
2654     if test -f $ac_dir/$ac_word; then
2655       ac_cv_prog_CC="cl"
2656       break
2657     fi
2658   done
2659   IFS="$ac_save_ifs"
2660 fi
2661 fi
2662 CC="$ac_cv_prog_CC"
2663 if test -n "$CC"; then
2664   echo "$ac_t""$CC" 1>&6
2665 else
2666   echo "$ac_t""no" 1>&6
2667 fi
2668  ;;
2669     esac
2670   fi
2671   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2672 fi
2673
2674 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2675 echo "configure:2676: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2676
2677 ac_ext=c
2678 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2679 ac_cpp='$CPP $CPPFLAGS'
2680 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2681 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2682 cross_compiling=$ac_cv_prog_cc_cross
2683
2684 cat > conftest.$ac_ext << EOF
2685
2686 #line 2687 "configure"
2687 #include "confdefs.h"
2688
2689 main(){return(0);}
2690 EOF
2691 if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2692   ac_cv_prog_cc_works=yes
2693   # If we can't run a trivial program, we are probably using a cross compiler.
2694   if (./conftest; exit) 2>/dev/null; then
2695     ac_cv_prog_cc_cross=no
2696   else
2697     ac_cv_prog_cc_cross=yes
2698   fi
2699 else
2700   echo "configure: failed program was:" >&5
2701   cat conftest.$ac_ext >&5
2702   ac_cv_prog_cc_works=no
2703 fi
2704 rm -fr conftest*
2705 ac_ext=c
2706 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2707 ac_cpp='$CPP $CPPFLAGS'
2708 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2709 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2710 cross_compiling=$ac_cv_prog_cc_cross
2711
2712 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2713 if test $ac_cv_prog_cc_works = no; then
2714   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2715 fi
2716 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2717 echo "configure:2718: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2718 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2719 cross_compiling=$ac_cv_prog_cc_cross
2720
2721 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2722 echo "configure:2723: checking whether we are using GNU C" >&5
2723 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2724   echo $ac_n "(cached) $ac_c" 1>&6
2725 else
2726   cat > conftest.c <<EOF
2727 #ifdef __GNUC__
2728   yes;
2729 #endif
2730 EOF
2731 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2732   ac_cv_prog_gcc=yes
2733 else
2734   ac_cv_prog_gcc=no
2735 fi
2736 fi
2737
2738 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2739
2740 if test $ac_cv_prog_gcc = yes; then
2741   GCC=yes
2742 else
2743   GCC=
2744 fi
2745
2746 ac_test_CFLAGS="${CFLAGS+set}"
2747 ac_save_CFLAGS="$CFLAGS"
2748 CFLAGS=
2749 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2750 echo "configure:2751: checking whether ${CC-cc} accepts -g" >&5
2751 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2752   echo $ac_n "(cached) $ac_c" 1>&6
2753 else
2754   echo 'void f(){}' > conftest.c
2755 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2756   ac_cv_prog_cc_g=yes
2757 else
2758   ac_cv_prog_cc_g=no
2759 fi
2760 rm -f conftest*
2761
2762 fi
2763
2764 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2765 if test "$ac_test_CFLAGS" = set; then
2766   CFLAGS="$ac_save_CFLAGS"
2767 elif test $ac_cv_prog_cc_g = yes; then
2768   if test "$GCC" = yes; then
2769     CFLAGS="-g -O2"
2770   else
2771     CFLAGS="-g"
2772   fi
2773 else
2774   if test "$GCC" = yes; then
2775     CFLAGS="-O2"
2776   else
2777     CFLAGS=
2778   fi
2779 fi
2780
2781 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2782 if test "${with_gnu_ld+set}" = set; then
2783   withval="$with_gnu_ld"
2784   test "$withval" = no || with_gnu_ld=yes
2785 else
2786   with_gnu_ld=no
2787 fi
2788
2789 ac_prog=ld
2790 if test "$ac_cv_prog_gcc" = yes; then
2791   # Check if gcc -print-prog-name=ld gives a path.
2792   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2793 echo "configure:2794: checking for ld used by GCC" >&5
2794   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2795   case "$ac_prog" in
2796     # Accept absolute paths.
2797     [\\/]* | [A-Za-z]:[\\/]*)
2798       re_direlt='/[^/][^/]*/\.\./'
2799       # Canonicalize the path of ld
2800       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2801       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2802         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2803       done
2804       test -z "$LD" && LD="$ac_prog"
2805       ;;
2806   "")
2807     # If it fails, then pretend we aren't using GCC.
2808     ac_prog=ld
2809     ;;
2810   *)
2811     # If it is relative, then search for the first ld in PATH.
2812     with_gnu_ld=unknown
2813     ;;
2814   esac
2815 elif test "$with_gnu_ld" = yes; then
2816   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2817 echo "configure:2818: checking for GNU ld" >&5
2818 else
2819   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2820 echo "configure:2821: checking for non-GNU ld" >&5
2821 fi
2822 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   if test -z "$LD"; then
2826   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2827   for ac_dir in $PATH; do
2828     test -z "$ac_dir" && ac_dir=.
2829     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2830       ac_cv_path_LD="$ac_dir/$ac_prog"
2831       # Check to see if the program is GNU ld.  I'd rather use --version,
2832       # but apparently some GNU ld's only accept -v.
2833       # Break only if it was the GNU/non-GNU ld that we prefer.
2834       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2835         test "$with_gnu_ld" != no && break
2836       else
2837         test "$with_gnu_ld" != yes && break
2838       fi
2839     fi
2840   done
2841   IFS="$ac_save_ifs"
2842 else
2843   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2844 fi
2845 fi
2846
2847 LD="$ac_cv_path_LD"
2848 if test -n "$LD"; then
2849   echo "$ac_t""$LD" 1>&6
2850 else
2851   echo "$ac_t""no" 1>&6
2852 fi
2853 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2854
2855 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2856 echo "configure:2857: checking if the linker ($LD) is GNU ld" >&5
2857 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2858   echo $ac_n "(cached) $ac_c" 1>&6
2859 else
2860   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2861 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2862   ac_cv_prog_gnu_ld=yes
2863 else
2864   ac_cv_prog_gnu_ld=no
2865 fi
2866 fi
2867
2868 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2869
2870
2871 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2872 echo "configure:2873: checking for BSD-compatible nm" >&5
2873 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   if test -n "$NM"; then
2877   # Let the user override the test.
2878   ac_cv_path_NM="$NM"
2879 else
2880   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2881   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2882     test -z "$ac_dir" && ac_dir=.
2883     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2884       # Check to see if the nm accepts a BSD-compat flag.
2885       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2886       #   nm: unknown option "B" ignored
2887       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2888         ac_cv_path_NM="$ac_dir/nm -B"
2889         break
2890       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2891         ac_cv_path_NM="$ac_dir/nm -p"
2892         break
2893       else
2894         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2895         continue # so that we can try to find one that supports BSD flags
2896       fi
2897     fi
2898   done
2899   IFS="$ac_save_ifs"
2900   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2901 fi
2902 fi
2903
2904 NM="$ac_cv_path_NM"
2905 echo "$ac_t""$NM" 1>&6
2906
2907
2908 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2909 echo "configure:2910: checking whether ln -s works" >&5
2910 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913   rm -f conftestdata
2914 if ln -s X conftestdata 2>/dev/null
2915 then
2916   rm -f conftestdata
2917   ac_cv_prog_LN_S="ln -s"
2918 else
2919   ac_cv_prog_LN_S=ln
2920 fi
2921 fi
2922 LN_S="$ac_cv_prog_LN_S"
2923 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2924   echo "$ac_t""yes" 1>&6
2925 else
2926   echo "$ac_t""no" 1>&6
2927 fi
2928
2929
2930 # Check for any special flags to pass to ltconfig.
2931 libtool_flags="--cache-file=$cache_file"
2932 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2933 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2934 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2935 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2936 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2937 libtool_flags="$libtool_flags --enable-dlopen"
2938
2939 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2940 if test "${enable_libtool_lock+set}" = set; then
2941   enableval="$enable_libtool_lock"
2942   :
2943 fi
2944
2945 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2946 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2947
2948 # Some flags need to be propagated to the compiler or linker for good
2949 # libtool support.
2950 case "$host" in
2951 *-*-irix6*)
2952   # Find out which ABI we are using.
2953   echo '#line 2954 "configure"' > conftest.$ac_ext
2954   if { (eval echo configure:2955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2955     case "`/usr/bin/file conftest.o`" in
2956     *32-bit*)
2957       LD="${LD-ld} -32"
2958       ;;
2959     *N32*)
2960       LD="${LD-ld} -n32"
2961       ;;
2962     *64-bit*)
2963       LD="${LD-ld} -64"
2964       ;;
2965     esac
2966   fi
2967   rm -rf conftest*
2968   ;;
2969
2970 *-*-sco3.2v5*)
2971   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2972   SAVE_CFLAGS="$CFLAGS"
2973   CFLAGS="$CFLAGS -belf"
2974   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2975 echo "configure:2976: checking whether the C compiler needs -belf" >&5
2976 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2977   echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979   cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982
2983 int main() {
2984
2985 ; return 0; }
2986 EOF
2987 if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2988   rm -rf conftest*
2989   lt_cv_cc_needs_belf=yes
2990 else
2991   echo "configure: failed program was:" >&5
2992   cat conftest.$ac_ext >&5
2993   rm -rf conftest*
2994   lt_cv_cc_needs_belf=no
2995 fi
2996 rm -f conftest*
2997 fi
2998
2999 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3000   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3001     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3002     CFLAGS="$SAVE_CFLAGS"
3003   fi
3004   ;;
3005
3006
3007 esac
3008
3009
3010 # Save cache, so that ltconfig can load it
3011
3012
3013 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3014 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3015 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3016 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3017 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3018 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3019 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3020 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3021
3022 # Reload cache, that may have been modified by ltconfig
3023
3024
3025 # This can be used to rebuild libtool when needed
3026 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3027
3028 # Always use our own libtool.
3029 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3030
3031 # Redirect the config.log output again, so that the ltconfig log is not
3032 # clobbered by the next message.
3033 exec 5>>./config.log
3034
3035
3036 for ac_prog in mawk gawk nawk awk
3037 do
3038 # Extract the first word of "$ac_prog", so it can be a program name with args.
3039 set dummy $ac_prog; ac_word=$2
3040 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3041 echo "configure:3042: checking for $ac_word" >&5
3042 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3043   echo $ac_n "(cached) $ac_c" 1>&6
3044 else
3045   if test -n "$AWK"; then
3046   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3047 else
3048   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3049   ac_dummy="$PATH"
3050   for ac_dir in $ac_dummy; do
3051     test -z "$ac_dir" && ac_dir=.
3052     if test -f $ac_dir/$ac_word; then
3053       ac_cv_prog_AWK="$ac_prog"
3054       break
3055     fi
3056   done
3057   IFS="$ac_save_ifs"
3058 fi
3059 fi
3060 AWK="$ac_cv_prog_AWK"
3061 if test -n "$AWK"; then
3062   echo "$ac_t""$AWK" 1>&6
3063 else
3064   echo "$ac_t""no" 1>&6
3065 fi
3066
3067 test -n "$AWK" && break
3068 done
3069
3070 # test for ln hardlink support
3071 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3072 echo "configure:3073: checking whether ln works" >&5
3073 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   rm -f conftest.src conftest.dst
3077 echo "conftest" > conftest.src
3078 if ln conftest.src conftest.dst 2>/dev/null
3079 then
3080   ol_cv_prog_LN_H="ln"
3081 else
3082   ol_cv_prog_LN_H="cp"
3083 fi
3084 rm -f conftest.src conftest.dst
3085
3086 fi
3087 LN_H="$ol_cv_prog_LN_H"
3088 if test "$ol_cv_prog_LN_H" = "ln"; then
3089         echo "$ac_t""yes" 1>&6
3090 else
3091         echo "$ac_t""no" 1>&6
3092 fi
3093
3094 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3095 echo "configure:3096: checking whether ln -s works" >&5
3096 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   rm -f conftestdata
3100 if ln -s X conftestdata 2>/dev/null
3101 then
3102   rm -f conftestdata
3103   ac_cv_prog_LN_S="ln -s"
3104 else
3105   ac_cv_prog_LN_S=ln
3106 fi
3107 fi
3108 LN_S="$ac_cv_prog_LN_S"
3109 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3110   echo "$ac_t""yes" 1>&6
3111 else
3112   echo "$ac_t""no" 1>&6
3113 fi
3114
3115
3116 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3117         LN_S="$LN_H"
3118 fi
3119
3120 # Extract the first word of "sendmail", so it can be a program name with args.
3121 set dummy sendmail; ac_word=$2
3122 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3123 echo "configure:3124: checking for $ac_word" >&5
3124 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3125   echo $ac_n "(cached) $ac_c" 1>&6
3126 else
3127   case "$SENDMAIL" in
3128   /*)
3129   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3130   ;;
3131   ?:/*)                  
3132   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3133   ;;
3134   *)
3135   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3136   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3137   for ac_dir in $ac_dummy; do 
3138     test -z "$ac_dir" && ac_dir=.
3139     if test -f $ac_dir/$ac_word; then
3140       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3141       break
3142     fi
3143   done
3144   IFS="$ac_save_ifs"
3145   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3146   ;;
3147 esac
3148 fi
3149 SENDMAIL="$ac_cv_path_SENDMAIL"
3150 if test -n "$SENDMAIL"; then
3151   echo "$ac_t""$SENDMAIL" 1>&6
3152 else
3153   echo "$ac_t""no" 1>&6
3154 fi
3155
3156 # Extract the first word of "vi", so it can be a program name with args.
3157 set dummy vi; ac_word=$2
3158 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3159 echo "configure:3160: checking for $ac_word" >&5
3160 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3161   echo $ac_n "(cached) $ac_c" 1>&6
3162 else
3163   case "$EDITOR" in
3164   /*)
3165   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3166   ;;
3167   ?:/*)                  
3168   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3169   ;;
3170   *)
3171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3172   ac_dummy="$PATH:/usr/ucb"
3173   for ac_dir in $ac_dummy; do 
3174     test -z "$ac_dir" && ac_dir=.
3175     if test -f $ac_dir/$ac_word; then
3176       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3177       break
3178     fi
3179   done
3180   IFS="$ac_save_ifs"
3181   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3182   ;;
3183 esac
3184 fi
3185 EDITOR="$ac_cv_path_EDITOR"
3186 if test -n "$EDITOR"; then
3187   echo "$ac_t""$EDITOR" 1>&6
3188 else
3189   echo "$ac_t""no" 1>&6
3190 fi
3191
3192 # Extract the first word of "finger", so it can be a program name with args.
3193 set dummy finger; ac_word=$2
3194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3195 echo "configure:3196: checking for $ac_word" >&5
3196 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   case "$FINGER" in
3200   /*)
3201   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3202   ;;
3203   ?:/*)                  
3204   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3205   ;;
3206   *)
3207   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3208   ac_dummy="$PATH:/usr/ucb"
3209   for ac_dir in $ac_dummy; do 
3210     test -z "$ac_dir" && ac_dir=.
3211     if test -f $ac_dir/$ac_word; then
3212       ac_cv_path_FINGER="$ac_dir/$ac_word"
3213       break
3214     fi
3215   done
3216   IFS="$ac_save_ifs"
3217   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3218   ;;
3219 esac
3220 fi
3221 FINGER="$ac_cv_path_FINGER"
3222 if test -n "$FINGER"; then
3223   echo "$ac_t""$FINGER" 1>&6
3224 else
3225   echo "$ac_t""no" 1>&6
3226 fi
3227
3228
3229 ol_link_perl=no
3230 if test $ol_enable_perl != no ; then
3231         # Extract the first word of "perl", so it can be a program name with args.
3232 set dummy perl; ac_word=$2
3233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3234 echo "configure:3235: checking for $ac_word" >&5
3235 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   case "$PERLBIN" in
3239   /*)
3240   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3241   ;;
3242   ?:/*)                  
3243   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3244   ;;
3245   *)
3246   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3247   ac_dummy="$PATH"
3248   for ac_dir in $ac_dummy; do 
3249     test -z "$ac_dir" && ac_dir=.
3250     if test -f $ac_dir/$ac_word; then
3251       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3252       break
3253     fi
3254   done
3255   IFS="$ac_save_ifs"
3256   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3257   ;;
3258 esac
3259 fi
3260 PERLBIN="$ac_cv_path_PERLBIN"
3261 if test -n "$PERLBIN"; then
3262   echo "$ac_t""$PERLBIN" 1>&6
3263 else
3264   echo "$ac_t""no" 1>&6
3265 fi
3266
3267
3268         if test "no$PERLBIN" = "no" ; then
3269                 if test $ol_enable_perl = yes ; then
3270                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3271                 fi
3272
3273         else
3274                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3275                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3276
3277                                 ol_link_perl=yes
3278         fi
3279 fi
3280
3281 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3282 echo "configure:3283: checking how to run the C preprocessor" >&5
3283 # On Suns, sometimes $CPP names a directory.
3284 if test -n "$CPP" && test -d "$CPP"; then
3285   CPP=
3286 fi
3287 if test -z "$CPP"; then
3288 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291     # This must be in double quotes, not single quotes, because CPP may get
3292   # substituted into the Makefile and "${CC-cc}" will confuse make.
3293   CPP="${CC-cc} -E"
3294   # On the NeXT, cc -E runs the code through the compiler's parser,
3295   # not just through cpp.
3296   cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299 #include <assert.h>
3300 Syntax Error
3301 EOF
3302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3303 { (eval echo configure:3304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3305 if test -z "$ac_err"; then
3306   :
3307 else
3308   echo "$ac_err" >&5
3309   echo "configure: failed program was:" >&5
3310   cat conftest.$ac_ext >&5
3311   rm -rf conftest*
3312   CPP="${CC-cc} -E -traditional-cpp"
3313   cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316 #include <assert.h>
3317 Syntax Error
3318 EOF
3319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3320 { (eval echo configure:3321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3322 if test -z "$ac_err"; then
3323   :
3324 else
3325   echo "$ac_err" >&5
3326   echo "configure: failed program was:" >&5
3327   cat conftest.$ac_ext >&5
3328   rm -rf conftest*
3329   CPP="${CC-cc} -nologo -E"
3330   cat > conftest.$ac_ext <<EOF
3331 #line 3332 "configure"
3332 #include "confdefs.h"
3333 #include <assert.h>
3334 Syntax Error
3335 EOF
3336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3337 { (eval echo configure:3338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3339 if test -z "$ac_err"; then
3340   :
3341 else
3342   echo "$ac_err" >&5
3343   echo "configure: failed program was:" >&5
3344   cat conftest.$ac_ext >&5
3345   rm -rf conftest*
3346   CPP=/lib/cpp
3347 fi
3348 rm -f conftest*
3349 fi
3350 rm -f conftest*
3351 fi
3352 rm -f conftest*
3353   ac_cv_prog_CPP="$CPP"
3354 fi
3355   CPP="$ac_cv_prog_CPP"
3356 else
3357   ac_cv_prog_CPP="$CPP"
3358 fi
3359 echo "$ac_t""$CPP" 1>&6
3360
3361
3362 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3363         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3364
3365 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3366         echo "configure: warning: programs compiled here do run here..." 1>&2
3367         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3368
3369 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3370         echo "configure: warning: programs compiled here do not run here..." 1>&2
3371         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3372 fi
3373
3374 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3375 echo "configure:3376: checking for AIX" >&5
3376 cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379 #ifdef _AIX
3380   yes
3381 #endif
3382
3383 EOF
3384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3385   egrep "yes" >/dev/null 2>&1; then
3386   rm -rf conftest*
3387   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3388 #define _ALL_SOURCE 1
3389 EOF
3390
3391 else
3392   rm -rf conftest*
3393   echo "$ac_t""no" 1>&6
3394 fi
3395 rm -f conftest*
3396
3397
3398 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3399 echo "configure:3400: checking for POSIXized ISC" >&5
3400 if test -d /etc/conf/kconfig.d &&
3401   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3402 then
3403   echo "$ac_t""yes" 1>&6
3404   ISC=yes # If later tests want to check for ISC.
3405   cat >> confdefs.h <<\EOF
3406 #define _POSIX_SOURCE 1
3407 EOF
3408
3409   if test "$GCC" = yes; then
3410     CC="$CC -posix"
3411   else
3412     CC="$CC -Xp"
3413   fi
3414 else
3415   echo "$ac_t""no" 1>&6
3416   ISC=
3417 fi
3418
3419 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3420 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3421 echo "configure:3422: checking for minix/config.h" >&5
3422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3423   echo $ac_n "(cached) $ac_c" 1>&6
3424 else
3425   cat > conftest.$ac_ext <<EOF
3426 #line 3427 "configure"
3427 #include "confdefs.h"
3428 #include <minix/config.h>
3429 EOF
3430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3431 { (eval echo configure:3432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3433 if test -z "$ac_err"; then
3434   rm -rf conftest*
3435   eval "ac_cv_header_$ac_safe=yes"
3436 else
3437   echo "$ac_err" >&5
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_header_$ac_safe=no"
3442 fi
3443 rm -f conftest*
3444 fi
3445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3446   echo "$ac_t""yes" 1>&6
3447   MINIX=yes
3448 else
3449   echo "$ac_t""no" 1>&6
3450 MINIX=
3451 fi
3452
3453 if test "$MINIX" = yes; then
3454   cat >> confdefs.h <<\EOF
3455 #define _POSIX_SOURCE 1
3456 EOF
3457
3458   cat >> confdefs.h <<\EOF
3459 #define _POSIX_1_SOURCE 2
3460 EOF
3461
3462   cat >> confdefs.h <<\EOF
3463 #define _MINIX 1
3464 EOF
3465
3466 fi
3467
3468
3469 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3470 echo "configure:3471: checking for Cygwin environment" >&5
3471 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3472   echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474   cat > conftest.$ac_ext <<EOF
3475 #line 3476 "configure"
3476 #include "confdefs.h"
3477
3478 int main() {
3479
3480 #ifndef __CYGWIN__
3481 #define __CYGWIN__ __CYGWIN32__
3482 #endif
3483 return __CYGWIN__;
3484 ; return 0; }
3485 EOF
3486 if { (eval echo configure:3487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3487   rm -rf conftest*
3488   ac_cv_cygwin=yes
3489 else
3490   echo "configure: failed program was:" >&5
3491   cat conftest.$ac_ext >&5
3492   rm -rf conftest*
3493   ac_cv_cygwin=no
3494 fi
3495 rm -f conftest*
3496 fi
3497
3498 echo "$ac_t""$ac_cv_cygwin" 1>&6
3499 CYGWIN=
3500 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3501 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3502 echo "configure:3503: checking for mingw32 environment" >&5
3503 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3504   echo $ac_n "(cached) $ac_c" 1>&6
3505 else
3506   cat > conftest.$ac_ext <<EOF
3507 #line 3508 "configure"
3508 #include "confdefs.h"
3509
3510 int main() {
3511 return __MINGW32__;
3512 ; return 0; }
3513 EOF
3514 if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3515   rm -rf conftest*
3516   ac_cv_mingw32=yes
3517 else
3518   echo "configure: failed program was:" >&5
3519   cat conftest.$ac_ext >&5
3520   rm -rf conftest*
3521   ac_cv_mingw32=no
3522 fi
3523 rm -f conftest*
3524 fi
3525
3526 echo "$ac_t""$ac_cv_mingw32" 1>&6
3527 MINGW32=
3528 test "$ac_cv_mingw32" = yes && MINGW32=yes
3529 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3530 echo "configure:3531: checking for EMX OS/2 environment" >&5
3531 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3532   echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534   cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537
3538 int main() {
3539 return __EMX__;
3540 ; return 0; }
3541 EOF
3542 if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3543   rm -rf conftest*
3544   ac_cv_emxos2=yes
3545 else
3546   echo "configure: failed program was:" >&5
3547   cat conftest.$ac_ext >&5
3548   rm -rf conftest*
3549   ac_cv_emxos2=no
3550 fi
3551 rm -f conftest*
3552 fi
3553
3554 echo "$ac_t""$ac_cv_emxos2" 1>&6
3555 EMXOS2=
3556 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3557
3558
3559
3560 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3561 echo "configure:3562: checking for executable suffix" >&5
3562 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3563   echo $ac_n "(cached) $ac_c" 1>&6
3564 else
3565   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3566   ac_cv_exeext=.exe
3567 else
3568   rm -f conftest*
3569   echo 'int main () { return 0; }' > conftest.$ac_ext
3570   ac_cv_exeext=
3571   if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3572     for file in conftest.*; do
3573       case $file in
3574       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3575       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3576       esac
3577     done
3578   else
3579     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3580   fi
3581   rm -f conftest*
3582   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3583 fi
3584 fi
3585
3586 EXEEXT=""
3587 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3588 echo "$ac_t""${ac_cv_exeext}" 1>&6
3589 ac_exeext=$EXEEXT
3590
3591 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3592 echo "configure:3593: checking for object suffix" >&5
3593 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   rm -f conftest*
3597 echo 'int i = 1;' > conftest.$ac_ext
3598 if { (eval echo configure:3599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3599   for ac_file in conftest.*; do
3600     case $ac_file in
3601     *.c) ;;
3602     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3603     esac
3604   done
3605 else
3606   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3607 fi
3608 rm -f conftest*
3609 fi
3610
3611 echo "$ac_t""$ac_cv_objext" 1>&6
3612 OBJEXT=$ac_cv_objext
3613 ac_objext=$ac_cv_objext
3614
3615
3616 cat >> confdefs.h <<EOF
3617 #define EXEEXT "${EXEEXT}"
3618 EOF
3619
3620
3621 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3622 echo "configure:3623: checking for be_app in -lbe" >&5
3623 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627   ac_save_LIBS="$LIBS"
3628 LIBS="-lbe -lroot -lnet $LIBS"
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 /* Override any gcc2 internal prototype to avoid an error.  */
3633 /* We use char because int might match the return type of a gcc2
3634     builtin and then its argument prototype would still apply.  */
3635 char be_app();
3636
3637 int main() {
3638 be_app()
3639 ; return 0; }
3640 EOF
3641 if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3642   rm -rf conftest*
3643   eval "ac_cv_lib_$ac_lib_var=yes"
3644 else
3645   echo "configure: failed program was:" >&5
3646   cat conftest.$ac_ext >&5
3647   rm -rf conftest*
3648   eval "ac_cv_lib_$ac_lib_var=no"
3649 fi
3650 rm -f conftest*
3651 LIBS="$ac_save_LIBS"
3652
3653 fi
3654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3655   echo "$ac_t""yes" 1>&6
3656   LIBS="$LIBS -lbe -lroot -lnet"
3657 else
3658   echo "$ac_t""no" 1>&6
3659 :
3660 fi
3661
3662
3663
3664
3665
3666 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3667 echo "configure:3668: checking for ${CC-cc} option to accept ANSI C" >&5
3668 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3669   echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671   am_cv_prog_cc_stdc=no
3672 ac_save_CC="$CC"
3673 # Don't try gcc -ansi; that turns off useful extensions and
3674 # breaks some systems' header files.
3675 # AIX                   -qlanglvl=ansi
3676 # Ultrix and OSF/1      -std1
3677 # HP-UX 10.20 and later -Ae
3678 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3679 # SVR4                  -Xc -D__EXTENSIONS__
3680 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3681 do
3682   CC="$ac_save_CC $ac_arg"
3683   cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 #include <stdarg.h>
3687 #include <stdio.h>
3688 #include <sys/types.h>
3689 #include <sys/stat.h>
3690 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3691 struct buf { int x; };
3692 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3693 static char *e (p, i)
3694      char **p;
3695      int i;
3696 {
3697   return p[i];
3698 }
3699 static char *f (char * (*g) (char **, int), char **p, ...)
3700 {
3701   char *s;
3702   va_list v;
3703   va_start (v,p);
3704   s = g (p, va_arg (v,int));
3705   va_end (v);
3706   return s;
3707 }
3708 int test (int i, double x);
3709 struct s1 {int (*f) (int a);};
3710 struct s2 {int (*f) (double a);};
3711 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3712 int argc;
3713 char **argv;
3714
3715 int main() {
3716
3717 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3718
3719 ; return 0; }
3720 EOF
3721 if { (eval echo configure:3722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3722   rm -rf conftest*
3723   am_cv_prog_cc_stdc="$ac_arg"; break
3724 else
3725   echo "configure: failed program was:" >&5
3726   cat conftest.$ac_ext >&5
3727 fi
3728 rm -f conftest*
3729 done
3730 CC="$ac_save_CC"
3731
3732 fi
3733
3734 if test -z "$am_cv_prog_cc_stdc"; then
3735   echo "$ac_t""none needed" 1>&6
3736 else
3737   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3738 fi
3739 case "x$am_cv_prog_cc_stdc" in
3740   x|xno) ;;
3741   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3742 esac
3743
3744 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3745         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3746 fi
3747
3748 # test for make depend flag
3749 OL_MKDEP=
3750 OL_MKDEP_FLAGS=
3751 if test -z "${MKDEP}"; then
3752         OL_MKDEP="${CC-cc}"
3753         if test -z "${MKDEP_FLAGS}"; then
3754                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3755 echo "configure:3756: checking for ${OL_MKDEP} depend flag" >&5
3756 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3757   echo $ac_n "(cached) $ac_c" 1>&6
3758 else
3759   
3760                         ol_cv_mkdep=no
3761                         for flag in "-M" "-xM"; do
3762                                 cat > conftest.c <<EOF
3763  noCode;
3764 EOF
3765                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3766                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3767                                 then
3768                                         if test ! -f conftest."${ac_object}" ; then
3769                                                 ol_cv_mkdep=$flag
3770                                                 OL_MKDEP_FLAGS="$flag"
3771                                                 break
3772                                         fi
3773                                 fi
3774                         done
3775                         rm -f conftest*
3776                 
3777 fi
3778
3779 echo "$ac_t""$ol_cv_mkdep" 1>&6
3780         else
3781                 cc_cv_mkdep=yes
3782                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3783         fi
3784 else
3785         cc_cv_mkdep=yes
3786         OL_MKDEP="${MKDEP}"
3787         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3788 fi
3789
3790
3791
3792 if test "${ol_cv_mkdep}" = no ; then
3793         # this will soon become an error
3794         echo "configure: warning: do not know how to generate dependencies" 1>&2
3795 fi
3796
3797 ol_link_modules=no
3798 if test $ol_enable_modules != no ; then
3799         for ac_hdr in ltdl.h
3800 do
3801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3803 echo "configure:3804: checking for $ac_hdr" >&5
3804 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3805   echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807   cat > conftest.$ac_ext <<EOF
3808 #line 3809 "configure"
3809 #include "confdefs.h"
3810 #include <$ac_hdr>
3811 EOF
3812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3813 { (eval echo configure:3814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3815 if test -z "$ac_err"; then
3816   rm -rf conftest*
3817   eval "ac_cv_header_$ac_safe=yes"
3818 else
3819   echo "$ac_err" >&5
3820   echo "configure: failed program was:" >&5
3821   cat conftest.$ac_ext >&5
3822   rm -rf conftest*
3823   eval "ac_cv_header_$ac_safe=no"
3824 fi
3825 rm -f conftest*
3826 fi
3827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3828   echo "$ac_t""yes" 1>&6
3829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3830   cat >> confdefs.h <<EOF
3831 #define $ac_tr_hdr 1
3832 EOF
3833  
3834 else
3835   echo "$ac_t""no" 1>&6
3836 fi
3837 done
3838
3839
3840         if test $ac_cv_header_ltdl_h = no ; then
3841                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3842         fi
3843
3844         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3845 echo "configure:3846: checking for lt_dlinit in -lltdl" >&5
3846 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3848   echo $ac_n "(cached) $ac_c" 1>&6
3849 else
3850   ac_save_LIBS="$LIBS"
3851 LIBS="-lltdl  $LIBS"
3852 cat > conftest.$ac_ext <<EOF
3853 #line 3854 "configure"
3854 #include "confdefs.h"
3855 /* Override any gcc2 internal prototype to avoid an error.  */
3856 /* We use char because int might match the return type of a gcc2
3857     builtin and then its argument prototype would still apply.  */
3858 char lt_dlinit();
3859
3860 int main() {
3861 lt_dlinit()
3862 ; return 0; }
3863 EOF
3864 if { (eval echo configure:3865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3865   rm -rf conftest*
3866   eval "ac_cv_lib_$ac_lib_var=yes"
3867 else
3868   echo "configure: failed program was:" >&5
3869   cat conftest.$ac_ext >&5
3870   rm -rf conftest*
3871   eval "ac_cv_lib_$ac_lib_var=no"
3872 fi
3873 rm -f conftest*
3874 LIBS="$ac_save_LIBS"
3875
3876 fi
3877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3878   echo "$ac_t""yes" 1>&6
3879     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3880     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3881   cat >> confdefs.h <<EOF
3882 #define $ac_tr_lib 1
3883 EOF
3884
3885   LIBS="-lltdl $LIBS"
3886
3887 else
3888   echo "$ac_t""no" 1>&6
3889 fi
3890
3891         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3892                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3893         fi
3894         ol_link_modules=yes
3895
3896 else
3897         ol_with_bdb2_module=static
3898         ol_with_ldap_module=static
3899         ol_with_ldbm_module=static
3900         ol_with_passwd_module=static
3901         ol_with_perl_module=static
3902         ol_with_shell_module=static
3903         ol_with_tcl_module=static
3904 fi
3905
3906 # test for EBCDIC
3907 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3908 echo "configure:3909: checking for EBCDIC" >&5
3909 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   
3913         cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916
3917 #if !('M' == 0xd4)
3918 #include <__ASCII__/generate_error.h>
3919 #endif
3920
3921 EOF
3922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3923 { (eval echo configure:3924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3925 if test -z "$ac_err"; then
3926   rm -rf conftest*
3927   ol_cv_cpp_ebcdic=yes
3928 else
3929   echo "$ac_err" >&5
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   ol_cv_cpp_ebcdic=no
3934 fi
3935 rm -f conftest*
3936 fi
3937
3938 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3939 if test $ol_cv_cpp_ebcdic = yes ; then
3940         cat >> confdefs.h <<\EOF
3941 #define HAVE_EBCDIC 1
3942 EOF
3943
3944 fi
3945
3946 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3947 echo "configure:3948: checking for ANSI C header files" >&5
3948 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <stdlib.h>
3955 #include <stdarg.h>
3956 #include <string.h>
3957 #include <float.h>
3958 EOF
3959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3960 { (eval echo configure:3961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3962 if test -z "$ac_err"; then
3963   rm -rf conftest*
3964   ol_cv_header_stdc=yes
3965 else
3966   echo "$ac_err" >&5
3967   echo "configure: failed program was:" >&5
3968   cat conftest.$ac_ext >&5
3969   rm -rf conftest*
3970   ol_cv_header_stdc=no
3971 fi
3972 rm -f conftest*
3973
3974 if test $ol_cv_header_stdc = yes; then
3975   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3976 cat > conftest.$ac_ext <<EOF
3977 #line 3978 "configure"
3978 #include "confdefs.h"
3979 #include <string.h>
3980 EOF
3981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3982   egrep "memchr" >/dev/null 2>&1; then
3983   :
3984 else
3985   rm -rf conftest*
3986   ol_cv_header_stdc=no
3987 fi
3988 rm -f conftest*
3989
3990 fi
3991
3992 if test $ol_cv_header_stdc = yes; then
3993   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997 #include <stdlib.h>
3998 EOF
3999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4000   egrep "free" >/dev/null 2>&1; then
4001   :
4002 else
4003   rm -rf conftest*
4004   ol_cv_header_stdc=no
4005 fi
4006 rm -f conftest*
4007
4008 fi
4009
4010 if test $ol_cv_header_stdc = yes; then
4011   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4012 if test "$cross_compiling" = yes; then
4013   :
4014 else
4015   cat > conftest.$ac_ext <<EOF
4016 #line 4017 "configure"
4017 #include "confdefs.h"
4018 #include <ctype.h>
4019 #ifndef HAVE_EBCDIC
4020 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4021 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4022 #else
4023 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4024                 || ('j' <= (c) && (c) <= 'r') \
4025                 || ('s' <= (c) && (c) <= 'z'))
4026 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4027 #endif
4028 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4029 int main () { int i; for (i = 0; i < 256; i++)
4030 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4031 exit (0); }
4032
4033 EOF
4034 if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4035 then
4036   :
4037 else
4038   echo "configure: failed program was:" >&5
4039   cat conftest.$ac_ext >&5
4040   rm -fr conftest*
4041   ol_cv_header_stdc=no
4042 fi
4043 rm -fr conftest*
4044 fi
4045
4046 fi
4047 fi
4048
4049 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4050 if test $ol_cv_header_stdc = yes; then
4051   cat >> confdefs.h <<\EOF
4052 #define STDC_HEADERS 1
4053 EOF
4054
4055 fi
4056 ac_cv_header_stdc=disable
4057
4058
4059 if test $ol_cv_header_stdc != yes; then
4060         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4061 fi
4062
4063 ac_header_dirent=no
4064 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4065 do
4066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4067 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4068 echo "configure:4069: checking for $ac_hdr that defines DIR" >&5
4069 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4070   echo $ac_n "(cached) $ac_c" 1>&6
4071 else
4072   cat > conftest.$ac_ext <<EOF
4073 #line 4074 "configure"
4074 #include "confdefs.h"
4075 #include <sys/types.h>
4076 #include <$ac_hdr>
4077 int main() {
4078 DIR *dirp = 0;
4079 ; return 0; }
4080 EOF
4081 if { (eval echo configure:4082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4082   rm -rf conftest*
4083   eval "ac_cv_header_dirent_$ac_safe=yes"
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   eval "ac_cv_header_dirent_$ac_safe=no"
4089 fi
4090 rm -f conftest*
4091 fi
4092 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4093   echo "$ac_t""yes" 1>&6
4094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4095   cat >> confdefs.h <<EOF
4096 #define $ac_tr_hdr 1
4097 EOF
4098  ac_header_dirent=$ac_hdr; break
4099 else
4100   echo "$ac_t""no" 1>&6
4101 fi
4102 done
4103 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4104 if test $ac_header_dirent = dirent.h; then
4105 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4106 echo "configure:4107: checking for opendir in -ldir" >&5
4107 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4109   echo $ac_n "(cached) $ac_c" 1>&6
4110 else
4111   ac_save_LIBS="$LIBS"
4112 LIBS="-ldir  $LIBS"
4113 cat > conftest.$ac_ext <<EOF
4114 #line 4115 "configure"
4115 #include "confdefs.h"
4116 /* Override any gcc2 internal prototype to avoid an error.  */
4117 /* We use char because int might match the return type of a gcc2
4118     builtin and then its argument prototype would still apply.  */
4119 char opendir();
4120
4121 int main() {
4122 opendir()
4123 ; return 0; }
4124 EOF
4125 if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4126   rm -rf conftest*
4127   eval "ac_cv_lib_$ac_lib_var=yes"
4128 else
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   eval "ac_cv_lib_$ac_lib_var=no"
4133 fi
4134 rm -f conftest*
4135 LIBS="$ac_save_LIBS"
4136
4137 fi
4138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4139   echo "$ac_t""yes" 1>&6
4140   LIBS="$LIBS -ldir"
4141 else
4142   echo "$ac_t""no" 1>&6
4143 fi
4144
4145 else
4146 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4147 echo "configure:4148: checking for opendir in -lx" >&5
4148 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4150   echo $ac_n "(cached) $ac_c" 1>&6
4151 else
4152   ac_save_LIBS="$LIBS"
4153 LIBS="-lx  $LIBS"
4154 cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 /* Override any gcc2 internal prototype to avoid an error.  */
4158 /* We use char because int might match the return type of a gcc2
4159     builtin and then its argument prototype would still apply.  */
4160 char opendir();
4161
4162 int main() {
4163 opendir()
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4167   rm -rf conftest*
4168   eval "ac_cv_lib_$ac_lib_var=yes"
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   eval "ac_cv_lib_$ac_lib_var=no"
4174 fi
4175 rm -f conftest*
4176 LIBS="$ac_save_LIBS"
4177
4178 fi
4179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4180   echo "$ac_t""yes" 1>&6
4181   LIBS="$LIBS -lx"
4182 else
4183   echo "$ac_t""no" 1>&6
4184 fi
4185
4186 fi
4187
4188 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4189 echo "configure:4190: checking for sys/wait.h that is POSIX.1 compatible" >&5
4190 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4191   echo $ac_n "(cached) $ac_c" 1>&6
4192 else
4193   cat > conftest.$ac_ext <<EOF
4194 #line 4195 "configure"
4195 #include "confdefs.h"
4196 #include <sys/types.h>
4197 #include <sys/wait.h>
4198 #ifndef WEXITSTATUS
4199 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4200 #endif
4201 #ifndef WIFEXITED
4202 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4203 #endif
4204 int main() {
4205 int s;
4206 wait (&s);
4207 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4208 ; return 0; }
4209 EOF
4210 if { (eval echo configure:4211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4211   rm -rf conftest*
4212   ac_cv_header_sys_wait_h=yes
4213 else
4214   echo "configure: failed program was:" >&5
4215   cat conftest.$ac_ext >&5
4216   rm -rf conftest*
4217   ac_cv_header_sys_wait_h=no
4218 fi
4219 rm -f conftest*
4220 fi
4221
4222 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4223 if test $ac_cv_header_sys_wait_h = yes; then
4224   cat >> confdefs.h <<\EOF
4225 #define HAVE_SYS_WAIT_H 1
4226 EOF
4227
4228 fi
4229
4230 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4231 echo "configure:4232: checking POSIX termios" >&5
4232 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4233   echo $ac_n "(cached) $ac_c" 1>&6
4234 else
4235   cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <sys/types.h>
4239 #include <unistd.h>
4240 #include <termios.h>
4241 int main() {
4242 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4243    tcgetattr(0, 0);
4244 ; return 0; }
4245 EOF
4246 if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4247   rm -rf conftest*
4248   am_cv_sys_posix_termios=yes
4249 else
4250   echo "configure: failed program was:" >&5
4251   cat conftest.$ac_ext >&5
4252   rm -rf conftest*
4253   am_cv_sys_posix_termios=no
4254 fi
4255 rm -f conftest*
4256 fi
4257
4258 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4259
4260
4261  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4262 echo "configure:4263: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4263 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4264   echo $ac_n "(cached) $ac_c" 1>&6
4265 else
4266   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4267
4268   gwinsz_in_termios_h=no
4269   if test $am_cv_sys_posix_termios = yes; then
4270     cat > conftest.$ac_ext <<EOF
4271 #line 4272 "configure"
4272 #include "confdefs.h"
4273 #include <sys/types.h>
4274 #     include <termios.h>
4275 #     ifdef TIOCGWINSZ
4276         yes
4277 #     endif
4278     
4279 EOF
4280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4281   egrep "yes" >/dev/null 2>&1; then
4282   rm -rf conftest*
4283   gwinsz_in_termios_h=yes
4284 fi
4285 rm -f conftest*
4286
4287   fi
4288
4289   if test $gwinsz_in_termios_h = no; then
4290     cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4293 #include <sys/types.h>
4294 #     include <sys/ioctl.h>
4295 #     ifdef TIOCGWINSZ
4296         yes
4297 #     endif
4298     
4299 EOF
4300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4301   egrep "yes" >/dev/null 2>&1; then
4302   rm -rf conftest*
4303   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4304 fi
4305 rm -f conftest*
4306
4307   fi
4308   
4309 fi
4310
4311 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4312   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4313     cat >> confdefs.h <<\EOF
4314 #define GWINSZ_IN_SYS_IOCTL 1
4315 EOF
4316
4317   fi
4318
4319 if test $am_cv_sys_posix_termios = yes ; then
4320         cat >> confdefs.h <<\EOF
4321 #define HAVE_POSIX_TERMIOS 1
4322 EOF
4323
4324 fi
4325
4326 for ac_hdr in \
4327         arpa/inet.h             \
4328         arpa/nameser.h  \
4329         assert.h                \
4330         crypt.h                 \
4331         errno.h                 \
4332         fcntl.h                 \
4333         filio.h                 \
4334         getopt.h                \
4335         grp.h                   \
4336         libutil.h               \
4337         limits.h                \
4338         locale.h                \
4339         netinet/tcp.h   \
4340         malloc.h                \
4341         memory.h                \
4342         psap.h                  \
4343         pwd.h                   \
4344         resolv.h                \
4345         sgtty.h                 \
4346         shadow.h                \
4347         stddef.h                \
4348         string.h                \
4349         strings.h               \
4350         sysexits.h              \
4351         sys/file.h              \
4352         sys/filio.h             \
4353         sys/errno.h             \
4354         sys/ioctl.h             \
4355         sys/param.h             \
4356         sys/resource.h  \
4357         sys/select.h    \
4358         sys/socket.h    \
4359         sys/syslog.h    \
4360         sys/time.h              \
4361         sys/types.h             \
4362         syslog.h                \
4363         termios.h               \
4364         unistd.h                \
4365
4366 do
4367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4369 echo "configure:4370: checking for $ac_hdr" >&5
4370 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 #include <$ac_hdr>
4377 EOF
4378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4379 { (eval echo configure:4380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4381 if test -z "$ac_err"; then
4382   rm -rf conftest*
4383   eval "ac_cv_header_$ac_safe=yes"
4384 else
4385   echo "$ac_err" >&5
4386   echo "configure: failed program was:" >&5
4387   cat conftest.$ac_ext >&5
4388   rm -rf conftest*
4389   eval "ac_cv_header_$ac_safe=no"
4390 fi
4391 rm -f conftest*
4392 fi
4393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4394   echo "$ac_t""yes" 1>&6
4395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4396   cat >> confdefs.h <<EOF
4397 #define $ac_tr_hdr 1
4398 EOF
4399  
4400 else
4401   echo "$ac_t""no" 1>&6
4402 fi
4403 done
4404
4405
4406
4407 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4408 echo "configure:4409: checking for sigset in -lV3" >&5
4409 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4410 if eval "test \"\${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="-lV3  $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 sigset();
4422
4423 int main() {
4424 sigset()
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 V3 | 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="-lV3 $LIBS"
4449
4450 else
4451   echo "$ac_t""no" 1>&6
4452 fi
4453
4454
4455
4456 echo $ac_n "checking for socket""... $ac_c" 1>&6
4457 echo "configure:4458: checking for socket" >&5
4458 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 /* System header to define __stub macros and hopefully few prototypes,
4465     which can conflict with char socket(); below.  */
4466 #include <assert.h>
4467 /* Override any gcc2 internal prototype to avoid an error.  */
4468 /* We use char because int might match the return type of a gcc2
4469     builtin and then its argument prototype would still apply.  */
4470 char socket();
4471 char (*f)();
4472
4473 int main() {
4474
4475 /* The GNU C library defines this for functions which it implements
4476     to always fail with ENOSYS.  Some functions are actually named
4477     something starting with __ and the normal name is an alias.  */
4478 #if defined (__stub_socket) || defined (__stub___socket)
4479 choke me
4480 #else
4481 f = socket;
4482 #endif
4483
4484 ; return 0; }
4485 EOF
4486 if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487   rm -rf conftest*
4488   eval "ac_cv_func_socket=yes"
4489 else
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -rf conftest*
4493   eval "ac_cv_func_socket=no"
4494 fi
4495 rm -f conftest*
4496 fi
4497
4498 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4499   echo "$ac_t""yes" 1>&6
4500   :
4501 else
4502   echo "$ac_t""no" 1>&6
4503         
4504         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4505 echo "configure:4506: checking for main in -lsocket" >&5
4506 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4508   echo $ac_n "(cached) $ac_c" 1>&6
4509 else
4510   ac_save_LIBS="$LIBS"
4511 LIBS="-lsocket  $LIBS"
4512 cat > conftest.$ac_ext <<EOF
4513 #line 4514 "configure"
4514 #include "confdefs.h"
4515
4516 int main() {
4517 main()
4518 ; return 0; }
4519 EOF
4520 if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4521   rm -rf conftest*
4522   eval "ac_cv_lib_$ac_lib_var=yes"
4523 else
4524   echo "configure: failed program was:" >&5
4525   cat conftest.$ac_ext >&5
4526   rm -rf conftest*
4527   eval "ac_cv_lib_$ac_lib_var=no"
4528 fi
4529 rm -f conftest*
4530 LIBS="$ac_save_LIBS"
4531
4532 fi
4533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4536     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4537   cat >> confdefs.h <<EOF
4538 #define $ac_tr_lib 1
4539 EOF
4540
4541   LIBS="-lsocket $LIBS"
4542
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546
4547         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4548 echo "configure:4549: checking for main in -lnet" >&5
4549 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4551   echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553   ac_save_LIBS="$LIBS"
4554 LIBS="-lnet  $LIBS"
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558
4559 int main() {
4560 main()
4561 ; return 0; }
4562 EOF
4563 if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4564   rm -rf conftest*
4565   eval "ac_cv_lib_$ac_lib_var=yes"
4566 else
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -rf conftest*
4570   eval "ac_cv_lib_$ac_lib_var=no"
4571 fi
4572 rm -f conftest*
4573 LIBS="$ac_save_LIBS"
4574
4575 fi
4576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4577   echo "$ac_t""yes" 1>&6
4578     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4579     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_lib 1
4582 EOF
4583
4584   LIBS="-lnet $LIBS"
4585
4586 else
4587   echo "$ac_t""no" 1>&6
4588 fi
4589
4590         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4591 echo "configure:4592: checking for socket in -lnet" >&5
4592 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   ac_save_LIBS="$LIBS"
4597 LIBS="-lnet  $LIBS"
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 /* Override any gcc2 internal prototype to avoid an error.  */
4602 /* We use char because int might match the return type of a gcc2
4603     builtin and then its argument prototype would still apply.  */
4604 char socket();
4605
4606 int main() {
4607 socket()
4608 ; return 0; }
4609 EOF
4610 if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4611   rm -rf conftest*
4612   eval "ac_cv_lib_$ac_lib_var=yes"
4613 else
4614   echo "configure: failed program was:" >&5
4615   cat conftest.$ac_ext >&5
4616   rm -rf conftest*
4617   eval "ac_cv_lib_$ac_lib_var=no"
4618 fi
4619 rm -f conftest*
4620 LIBS="$ac_save_LIBS"
4621
4622 fi
4623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4624   echo "$ac_t""yes" 1>&6
4625     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4626     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4627   cat >> confdefs.h <<EOF
4628 #define $ac_tr_lib 1
4629 EOF
4630
4631   LIBS="-lnet $LIBS"
4632
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4638 echo "configure:4639: checking for main in -lnsl_s" >&5
4639 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4641   echo $ac_n "(cached) $ac_c" 1>&6
4642 else
4643   ac_save_LIBS="$LIBS"
4644 LIBS="-lnsl_s  $LIBS"
4645 cat > conftest.$ac_ext <<EOF
4646 #line 4647 "configure"
4647 #include "confdefs.h"
4648
4649 int main() {
4650 main()
4651 ; return 0; }
4652 EOF
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4654   rm -rf conftest*
4655   eval "ac_cv_lib_$ac_lib_var=yes"
4656 else
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659   rm -rf conftest*
4660   eval "ac_cv_lib_$ac_lib_var=no"
4661 fi
4662 rm -f conftest*
4663 LIBS="$ac_save_LIBS"
4664
4665 fi
4666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4667   echo "$ac_t""yes" 1>&6
4668     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4669     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4670   cat >> confdefs.h <<EOF
4671 #define $ac_tr_lib 1
4672 EOF
4673
4674   LIBS="-lnsl_s $LIBS"
4675
4676 else
4677   echo "$ac_t""no" 1>&6
4678 fi
4679
4680         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4681 echo "configure:4682: checking for main in -lnsl" >&5
4682 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4683 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4684   echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686   ac_save_LIBS="$LIBS"
4687 LIBS="-lnsl  $LIBS"
4688 cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691
4692 int main() {
4693 main()
4694 ; return 0; }
4695 EOF
4696 if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=yes"
4699 else
4700   echo "configure: failed program was:" >&5
4701   cat conftest.$ac_ext >&5
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=no"
4704 fi
4705 rm -f conftest*
4706 LIBS="$ac_save_LIBS"
4707
4708 fi
4709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4712     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4713   cat >> confdefs.h <<EOF
4714 #define $ac_tr_lib 1
4715 EOF
4716
4717   LIBS="-lnsl $LIBS"
4718
4719 else
4720   echo "$ac_t""no" 1>&6
4721 fi
4722
4723         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4724 echo "configure:4725: checking for socket in -linet" >&5
4725 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4727   echo $ac_n "(cached) $ac_c" 1>&6
4728 else
4729   ac_save_LIBS="$LIBS"
4730 LIBS="-linet  $LIBS"
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 /* Override any gcc2 internal prototype to avoid an error.  */
4735 /* We use char because int might match the return type of a gcc2
4736     builtin and then its argument prototype would still apply.  */
4737 char socket();
4738
4739 int main() {
4740 socket()
4741 ; return 0; }
4742 EOF
4743 if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4744   rm -rf conftest*
4745   eval "ac_cv_lib_$ac_lib_var=yes"
4746 else
4747   echo "configure: failed program was:" >&5
4748   cat conftest.$ac_ext >&5
4749   rm -rf conftest*
4750   eval "ac_cv_lib_$ac_lib_var=no"
4751 fi
4752 rm -f conftest*
4753 LIBS="$ac_save_LIBS"
4754
4755 fi
4756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4757   echo "$ac_t""yes" 1>&6
4758     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4759     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4760   cat >> confdefs.h <<EOF
4761 #define $ac_tr_lib 1
4762 EOF
4763
4764   LIBS="-linet $LIBS"
4765
4766 else
4767   echo "$ac_t""no" 1>&6
4768 fi
4769
4770         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4771 echo "configure:4772: checking for main in -lgen" >&5
4772 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4774   echo $ac_n "(cached) $ac_c" 1>&6
4775 else
4776   ac_save_LIBS="$LIBS"
4777 LIBS="-lgen  $LIBS"
4778 cat > conftest.$ac_ext <<EOF
4779 #line 4780 "configure"
4780 #include "confdefs.h"
4781
4782 int main() {
4783 main()
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   eval "ac_cv_lib_$ac_lib_var=yes"
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -rf conftest*
4793   eval "ac_cv_lib_$ac_lib_var=no"
4794 fi
4795 rm -f conftest*
4796 LIBS="$ac_save_LIBS"
4797
4798 fi
4799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4800   echo "$ac_t""yes" 1>&6
4801     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4802     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4803   cat >> confdefs.h <<EOF
4804 #define $ac_tr_lib 1
4805 EOF
4806
4807   LIBS="-lgen $LIBS"
4808
4809 else
4810   echo "$ac_t""no" 1>&6
4811 fi
4812
4813
4814 fi
4815
4816
4817 echo $ac_n "checking for select""... $ac_c" 1>&6
4818 echo "configure:4819: checking for select" >&5
4819 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4820   echo $ac_n "(cached) $ac_c" 1>&6
4821 else
4822   cat > conftest.$ac_ext <<EOF
4823 #line 4824 "configure"
4824 #include "confdefs.h"
4825 /* System header to define __stub macros and hopefully few prototypes,
4826     which can conflict with char select(); below.  */
4827 #include <assert.h>
4828 /* Override any gcc2 internal prototype to avoid an error.  */
4829 /* We use char because int might match the return type of a gcc2
4830     builtin and then its argument prototype would still apply.  */
4831 char select();
4832 char (*f)();
4833
4834 int main() {
4835
4836 /* The GNU C library defines this for functions which it implements
4837     to always fail with ENOSYS.  Some functions are actually named
4838     something starting with __ and the normal name is an alias.  */
4839 #if defined (__stub_select) || defined (__stub___select)
4840 choke me
4841 #else
4842 f = select;
4843 #endif
4844
4845 ; return 0; }
4846 EOF
4847 if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4848   rm -rf conftest*
4849   eval "ac_cv_func_select=yes"
4850 else
4851   echo "configure: failed program was:" >&5
4852   cat conftest.$ac_ext >&5
4853   rm -rf conftest*
4854   eval "ac_cv_func_select=no"
4855 fi
4856 rm -f conftest*
4857 fi
4858
4859 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4860   echo "$ac_t""yes" 1>&6
4861   :
4862 else
4863   echo "$ac_t""no" 1>&6
4864 { echo "configure: error: select() required." 1>&2; exit 1; }
4865 fi
4866
4867
4868 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4869 echo "configure:4870: checking types of arguments for select()" >&5
4870  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4874   echo $ac_n "(cached) $ac_c" 1>&6
4875 else
4876     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4880      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4881       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4882        cat > conftest.$ac_ext <<EOF
4883 #line 4884 "configure"
4884 #include "confdefs.h"
4885 #ifdef HAVE_SYS_TYPES_H
4886 #include <sys/types.h>
4887 #endif
4888 #ifdef HAVE_SYS_TIME_H
4889 #include <sys/time.h>
4890 #endif
4891 #ifdef HAVE_SYS_SELECT_H
4892 #include <sys/select.h>
4893 #endif
4894 #ifdef HAVE_SYS_SOCKET_H
4895 #include <sys/socket.h>
4896 #endif
4897 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);
4898 int main() {
4899
4900 ; return 0; }
4901 EOF
4902 if { (eval echo configure:4903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4903   rm -rf conftest*
4904           ac_not_found=no ; break 3
4905 else
4906   echo "configure: failed program was:" >&5
4907   cat conftest.$ac_ext >&5
4908   rm -rf conftest*
4909   ac_not_found=yes
4910 fi
4911 rm -f conftest*
4912       done
4913      done
4914     done
4915    
4916 fi
4917   
4918 fi
4919  
4920 fi
4921  if test "$ac_not_found" = yes; then
4922   ac_cv_func_select_arg1=int 
4923   ac_cv_func_select_arg234='int *' 
4924   ac_cv_func_select_arg5='struct timeval *'
4925  fi
4926  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4927  cat >> confdefs.h <<EOF
4928 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4929 EOF
4930
4931  cat >> confdefs.h <<EOF
4932 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4933 EOF
4934
4935  cat >> confdefs.h <<EOF
4936 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4937 EOF
4938
4939
4940
4941
4942 for ac_hdr in regex.h 
4943 do
4944 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4946 echo "configure:4947: checking for $ac_hdr" >&5
4947 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4948   echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950   cat > conftest.$ac_ext <<EOF
4951 #line 4952 "configure"
4952 #include "confdefs.h"
4953 #include <$ac_hdr>
4954 EOF
4955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4956 { (eval echo configure:4957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4958 if test -z "$ac_err"; then
4959   rm -rf conftest*
4960   eval "ac_cv_header_$ac_safe=yes"
4961 else
4962   echo "$ac_err" >&5
4963   echo "configure: failed program was:" >&5
4964   cat conftest.$ac_ext >&5
4965   rm -rf conftest*
4966   eval "ac_cv_header_$ac_safe=no"
4967 fi
4968 rm -f conftest*
4969 fi
4970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4971   echo "$ac_t""yes" 1>&6
4972     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4973   cat >> confdefs.h <<EOF
4974 #define $ac_tr_hdr 1
4975 EOF
4976  
4977 else
4978   echo "$ac_t""no" 1>&6
4979 fi
4980 done
4981
4982 if test "$ac_cv_header_regex_h" != yes ; then
4983         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4984 fi
4985 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4986 echo "configure:4987: checking for regfree" >&5
4987 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   cat > conftest.$ac_ext <<EOF
4991 #line 4992 "configure"
4992 #include "confdefs.h"
4993 /* System header to define __stub macros and hopefully few prototypes,
4994     which can conflict with char regfree(); below.  */
4995 #include <assert.h>
4996 /* Override any gcc2 internal prototype to avoid an error.  */
4997 /* We use char because int might match the return type of a gcc2
4998     builtin and then its argument prototype would still apply.  */
4999 char regfree();
5000 char (*f)();
5001
5002 int main() {
5003
5004 /* The GNU C library defines this for functions which it implements
5005     to always fail with ENOSYS.  Some functions are actually named
5006     something starting with __ and the normal name is an alias.  */
5007 #if defined (__stub_regfree) || defined (__stub___regfree)
5008 choke me
5009 #else
5010 f = regfree;
5011 #endif
5012
5013 ; return 0; }
5014 EOF
5015 if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5016   rm -rf conftest*
5017   eval "ac_cv_func_regfree=yes"
5018 else
5019   echo "configure: failed program was:" >&5
5020   cat conftest.$ac_ext >&5
5021   rm -rf conftest*
5022   eval "ac_cv_func_regfree=no"
5023 fi
5024 rm -f conftest*
5025 fi
5026
5027 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5028   echo "$ac_t""yes" 1>&6
5029   :
5030 else
5031   echo "$ac_t""no" 1>&6
5032 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5033 fi
5034
5035
5036
5037 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5038 echo "configure:5039: checking for compatible POSIX regex" >&5
5039 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5040   echo $ac_n "(cached) $ac_c" 1>&6
5041 else
5042   
5043         if test "$cross_compiling" = yes; then
5044   ol_cv_c_posix_regex=cross
5045 else
5046   cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049
5050 #include <sys/types.h>
5051 #include <regex.h>
5052 static char *pattern, *string;
5053 main()
5054 {
5055         int rc;
5056         regex_t re;
5057
5058         pattern = "^A";
5059
5060         if(regcomp(&re, pattern, 0)) {
5061                 return -1;
5062         }
5063         
5064         string = "ALL MATCH";
5065         
5066         rc = regexec(&re, string, 0, (void*)0, 0);
5067
5068         regfree(&re);
5069
5070         return rc;
5071 }
5072 EOF
5073 if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5074 then
5075   ol_cv_c_posix_regex=yes
5076 else
5077   echo "configure: failed program was:" >&5
5078   cat conftest.$ac_ext >&5
5079   rm -fr conftest*
5080   ol_cv_c_posix_regex=no
5081 fi
5082 rm -fr conftest*
5083 fi
5084
5085 fi
5086
5087 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5088
5089 if test "$ol_cv_c_posix_regex" = no ; then
5090         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5091 fi
5092
5093 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5094 echo "configure:5095: checking for res_search" >&5
5095 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5096   echo $ac_n "(cached) $ac_c" 1>&6
5097 else
5098   cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101 /* System header to define __stub macros and hopefully few prototypes,
5102     which can conflict with char res_search(); below.  */
5103 #include <assert.h>
5104 /* Override any gcc2 internal prototype to avoid an error.  */
5105 /* We use char because int might match the return type of a gcc2
5106     builtin and then its argument prototype would still apply.  */
5107 char res_search();
5108 char (*f)();
5109
5110 int main() {
5111
5112 /* The GNU C library defines this for functions which it implements
5113     to always fail with ENOSYS.  Some functions are actually named
5114     something starting with __ and the normal name is an alias.  */
5115 #if defined (__stub_res_search) || defined (__stub___res_search)
5116 choke me
5117 #else
5118 f = res_search;
5119 #endif
5120
5121 ; return 0; }
5122 EOF
5123 if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5124   rm -rf conftest*
5125   eval "ac_cv_func_res_search=yes"
5126 else
5127   echo "configure: failed program was:" >&5
5128   cat conftest.$ac_ext >&5
5129   rm -rf conftest*
5130   eval "ac_cv_func_res_search=no"
5131 fi
5132 rm -f conftest*
5133 fi
5134
5135 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5136   echo "$ac_t""yes" 1>&6
5137   :
5138 else
5139   echo "$ac_t""no" 1>&6
5140 fi
5141
5142 if test $ac_cv_func_res_search = no ; then 
5143         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5144 echo "configure:5145: checking for res_search in -lbind" >&5
5145 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5147   echo $ac_n "(cached) $ac_c" 1>&6
5148 else
5149   ac_save_LIBS="$LIBS"
5150 LIBS="-lbind  $LIBS"
5151 cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154 /* Override any gcc2 internal prototype to avoid an error.  */
5155 /* We use char because int might match the return type of a gcc2
5156     builtin and then its argument prototype would still apply.  */
5157 char res_search();
5158
5159 int main() {
5160 res_search()
5161 ; return 0; }
5162 EOF
5163 if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5164   rm -rf conftest*
5165   eval "ac_cv_lib_$ac_lib_var=yes"
5166 else
5167   echo "configure: failed program was:" >&5
5168   cat conftest.$ac_ext >&5
5169   rm -rf conftest*
5170   eval "ac_cv_lib_$ac_lib_var=no"
5171 fi
5172 rm -f conftest*
5173 LIBS="$ac_save_LIBS"
5174
5175 fi
5176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5177   echo "$ac_t""yes" 1>&6
5178     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5179     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5180   cat >> confdefs.h <<EOF
5181 #define $ac_tr_lib 1
5182 EOF
5183
5184   LIBS="-lbind $LIBS"
5185
5186 else
5187   echo "$ac_t""no" 1>&6
5188 fi
5189
5190         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5191 fi
5192
5193 if test $ac_cv_func_res_search = no ; then 
5194         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5195 echo "configure:5196: checking for __res_search in -lbind" >&5
5196 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200   ac_save_LIBS="$LIBS"
5201 LIBS="-lbind  $LIBS"
5202 cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205 /* Override any gcc2 internal prototype to avoid an error.  */
5206 /* We use char because int might match the return type of a gcc2
5207     builtin and then its argument prototype would still apply.  */
5208 char __res_search();
5209
5210 int main() {
5211 __res_search()
5212 ; return 0; }
5213 EOF
5214 if { (eval echo configure:5215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5215   rm -rf conftest*
5216   eval "ac_cv_lib_$ac_lib_var=yes"
5217 else
5218   echo "configure: failed program was:" >&5
5219   cat conftest.$ac_ext >&5
5220   rm -rf conftest*
5221   eval "ac_cv_lib_$ac_lib_var=no"
5222 fi
5223 rm -f conftest*
5224 LIBS="$ac_save_LIBS"
5225
5226 fi
5227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5228   echo "$ac_t""yes" 1>&6
5229     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5230     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5231   cat >> confdefs.h <<EOF
5232 #define $ac_tr_lib 1
5233 EOF
5234
5235   LIBS="-lbind $LIBS"
5236
5237 else
5238   echo "$ac_t""no" 1>&6
5239 fi
5240
5241         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5242 fi
5243
5244 if test $ac_cv_func_res_search = no ; then 
5245         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5246 echo "configure:5247: checking for res_search in -lresolv" >&5
5247 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5248 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5249   echo $ac_n "(cached) $ac_c" 1>&6
5250 else
5251   ac_save_LIBS="$LIBS"
5252 LIBS="-lresolv  $LIBS"
5253 cat > conftest.$ac_ext <<EOF
5254 #line 5255 "configure"
5255 #include "confdefs.h"
5256 /* Override any gcc2 internal prototype to avoid an error.  */
5257 /* We use char because int might match the return type of a gcc2
5258     builtin and then its argument prototype would still apply.  */
5259 char res_search();
5260
5261 int main() {
5262 res_search()
5263 ; return 0; }
5264 EOF
5265 if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5266   rm -rf conftest*
5267   eval "ac_cv_lib_$ac_lib_var=yes"
5268 else
5269   echo "configure: failed program was:" >&5
5270   cat conftest.$ac_ext >&5
5271   rm -rf conftest*
5272   eval "ac_cv_lib_$ac_lib_var=no"
5273 fi
5274 rm -f conftest*
5275 LIBS="$ac_save_LIBS"
5276
5277 fi
5278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5279   echo "$ac_t""yes" 1>&6
5280     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5281     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5282   cat >> confdefs.h <<EOF
5283 #define $ac_tr_lib 1
5284 EOF
5285
5286   LIBS="-lresolv $LIBS"
5287
5288 else
5289   echo "$ac_t""no" 1>&6
5290 fi
5291
5292         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5293 fi
5294
5295 if test "$ac_cv_func_res_search" = yes ; then
5296         cat >> confdefs.h <<\EOF
5297 #define HAVE_RES_SEARCH 1
5298 EOF
5299
5300 elif test $ol_enable_dns = yes ; then
5301         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5302 elif test $ol_enable_dns != no ; then
5303         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5304 fi
5305
5306
5307 ol_link_isode=no
5308 if test $ol_enable_ldapd != no ; then
5309         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5310
5311                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5312 echo "configure:5313: checking for main in -lxtpp" >&5
5313 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5315   echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317   ac_save_LIBS="$LIBS"
5318 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5319 cat > conftest.$ac_ext <<EOF
5320 #line 5321 "configure"
5321 #include "confdefs.h"
5322
5323 int main() {
5324 main()
5325 ; return 0; }
5326 EOF
5327 if { (eval echo configure:5328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5328   rm -rf conftest*
5329   eval "ac_cv_lib_$ac_lib_var=yes"
5330 else
5331   echo "configure: failed program was:" >&5
5332   cat conftest.$ac_ext >&5
5333   rm -rf conftest*
5334   eval "ac_cv_lib_$ac_lib_var=no"
5335 fi
5336 rm -f conftest*
5337 LIBS="$ac_save_LIBS"
5338
5339 fi
5340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5341   echo "$ac_t""yes" 1>&6
5342   
5343                 ol_link_isode=yes
5344                 cat >> confdefs.h <<\EOF
5345 #define HAVE_XTPP 1
5346 EOF
5347
5348                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5349                 
5350 else
5351   echo "$ac_t""no" 1>&6
5352 :
5353 fi
5354
5355         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5356 echo "configure:5357: checking for main in -ldsap" >&5
5357 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5359   echo $ac_n "(cached) $ac_c" 1>&6
5360 else
5361   ac_save_LIBS="$LIBS"
5362 LIBS="-ldsap -lisode $LIBS"
5363 cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366
5367 int main() {
5368 main()
5369 ; return 0; }
5370 EOF
5371 if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5372   rm -rf conftest*
5373   eval "ac_cv_lib_$ac_lib_var=yes"
5374 else
5375   echo "configure: failed program was:" >&5
5376   cat conftest.$ac_ext >&5
5377   rm -rf conftest*
5378   eval "ac_cv_lib_$ac_lib_var=no"
5379 fi
5380 rm -f conftest*
5381 LIBS="$ac_save_LIBS"
5382
5383 fi
5384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5385   echo "$ac_t""yes" 1>&6
5386   
5387                 ol_link_isode=yes
5388                 cat >> confdefs.h <<\EOF
5389 #define HAVE_DSAP 1
5390 EOF
5391
5392                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5393                 
5394 else
5395   echo "$ac_t""no" 1>&6
5396 :
5397 fi
5398
5399         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5400 echo "configure:5401: checking for main in -lisode" >&5
5401 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5402 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5403   echo $ac_n "(cached) $ac_c" 1>&6
5404 else
5405   ac_save_LIBS="$LIBS"
5406 LIBS="-lisode  $LIBS"
5407 cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5410
5411 int main() {
5412 main()
5413 ; return 0; }
5414 EOF
5415 if { (eval echo configure:5416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5416   rm -rf conftest*
5417   eval "ac_cv_lib_$ac_lib_var=yes"
5418 else
5419   echo "configure: failed program was:" >&5
5420   cat conftest.$ac_ext >&5
5421   rm -rf conftest*
5422   eval "ac_cv_lib_$ac_lib_var=no"
5423 fi
5424 rm -f conftest*
5425 LIBS="$ac_save_LIBS"
5426
5427 fi
5428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5429   echo "$ac_t""yes" 1>&6
5430   
5431                 ol_link_isode=yes
5432                 cat >> confdefs.h <<\EOF
5433 #define HAVE_ISODE 1
5434 EOF
5435
5436                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5437                 
5438 else
5439   echo "$ac_t""no" 1>&6
5440 :
5441 fi
5442
5443 fi
5444
5445 if test $ol_link_isode != no; then
5446         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5447 echo "configure:5448: checking for main in -lpp" >&5
5448 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5450   echo $ac_n "(cached) $ac_c" 1>&6
5451 else
5452   ac_save_LIBS="$LIBS"
5453 LIBS="-lpp  $LIBS"
5454 cat > conftest.$ac_ext <<EOF
5455 #line 5456 "configure"
5456 #include "confdefs.h"
5457
5458 int main() {
5459 main()
5460 ; return 0; }
5461 EOF
5462 if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5463   rm -rf conftest*
5464   eval "ac_cv_lib_$ac_lib_var=yes"
5465 else
5466   echo "configure: failed program was:" >&5
5467   cat conftest.$ac_ext >&5
5468   rm -rf conftest*
5469   eval "ac_cv_lib_$ac_lib_var=no"
5470 fi
5471 rm -f conftest*
5472 LIBS="$ac_save_LIBS"
5473
5474 fi
5475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5476   echo "$ac_t""yes" 1>&6
5477   
5478                 cat >> confdefs.h <<\EOF
5479 #define HAVE_PP 1
5480 EOF
5481
5482                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5483                 
5484 else
5485   echo "$ac_t""no" 1>&6
5486 :
5487 fi
5488
5489
5490         # Extract the first word of "pepsy", so it can be a program name with args.
5491 set dummy pepsy; ac_word=$2
5492 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5493 echo "configure:5494: checking for $ac_word" >&5
5494 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5495   echo $ac_n "(cached) $ac_c" 1>&6
5496 else
5497   case "$PEPSY" in
5498   /*)
5499   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5500   ;;
5501   ?:/*)                  
5502   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5503   ;;
5504   *)
5505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5506   ac_dummy="$PATH"
5507   for ac_dir in $ac_dummy; do 
5508     test -z "$ac_dir" && ac_dir=.
5509     if test -f $ac_dir/$ac_word; then
5510       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5511       break
5512     fi
5513   done
5514   IFS="$ac_save_ifs"
5515   ;;
5516 esac
5517 fi
5518 PEPSY="$ac_cv_path_PEPSY"
5519 if test -n "$PEPSY"; then
5520   echo "$ac_t""$PEPSY" 1>&6
5521 else
5522   echo "$ac_t""no" 1>&6
5523 fi
5524
5525 fi
5526
5527 if test $ol_enable_quipu != no ; then
5528         for ac_hdr in quipu/commonarg.h
5529 do
5530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5532 echo "configure:5533: checking for $ac_hdr" >&5
5533 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5534   echo $ac_n "(cached) $ac_c" 1>&6
5535 else
5536   cat > conftest.$ac_ext <<EOF
5537 #line 5538 "configure"
5538 #include "confdefs.h"
5539 #include <$ac_hdr>
5540 EOF
5541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5542 { (eval echo configure:5543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5544 if test -z "$ac_err"; then
5545   rm -rf conftest*
5546   eval "ac_cv_header_$ac_safe=yes"
5547 else
5548   echo "$ac_err" >&5
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   eval "ac_cv_header_$ac_safe=no"
5553 fi
5554 rm -f conftest*
5555 fi
5556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5557   echo "$ac_t""yes" 1>&6
5558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5559   cat >> confdefs.h <<EOF
5560 #define $ac_tr_hdr 1
5561 EOF
5562  
5563 else
5564   echo "$ac_t""no" 1>&6
5565 fi
5566 done
5567
5568
5569         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5570                 BUILD_QUIPU=yes
5571         elif test $ol_enable_quipu = auto ; then
5572                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5573         else
5574                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5575         fi
5576 fi
5577
5578 ol_link_kerberos=no
5579
5580 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5581         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5582 do
5583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5584 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5585 echo "configure:5586: checking for $ac_hdr" >&5
5586 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5587   echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589   cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592 #include <$ac_hdr>
5593 EOF
5594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5595 { (eval echo configure:5596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5597 if test -z "$ac_err"; then
5598   rm -rf conftest*
5599   eval "ac_cv_header_$ac_safe=yes"
5600 else
5601   echo "$ac_err" >&5
5602   echo "configure: failed program was:" >&5
5603   cat conftest.$ac_ext >&5
5604   rm -rf conftest*
5605   eval "ac_cv_header_$ac_safe=no"
5606 fi
5607 rm -f conftest*
5608 fi
5609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5610   echo "$ac_t""yes" 1>&6
5611     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5612   cat >> confdefs.h <<EOF
5613 #define $ac_tr_hdr 1
5614 EOF
5615  
5616 else
5617   echo "$ac_t""no" 1>&6
5618 fi
5619 done
5620
5621
5622         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5623                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5624 echo "configure:5625: checking for main in -lkrb4" >&5
5625 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5626 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5627   echo $ac_n "(cached) $ac_c" 1>&6
5628 else
5629   ac_save_LIBS="$LIBS"
5630 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5631 cat > conftest.$ac_ext <<EOF
5632 #line 5633 "configure"
5633 #include "confdefs.h"
5634
5635 int main() {
5636 main()
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   eval "ac_cv_lib_$ac_lib_var=yes"
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_lib_$ac_lib_var=no"
5647 fi
5648 rm -f conftest*
5649 LIBS="$ac_save_LIBS"
5650
5651 fi
5652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5653   echo "$ac_t""yes" 1>&6
5654   have_k5=yes
5655 else
5656   echo "$ac_t""no" 1>&6
5657 have_k5=no
5658 fi
5659
5660
5661                 if test $have_k5 = yes ; then
5662                         ol_with_kerberos=found
5663                         ol_link_kerberos=yes
5664
5665                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5666
5667                         LIBS="$KRB_LIBS $LIBS"
5668
5669                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5670 echo "configure:5671: checking for des_debug in Kerberos libraries" >&5
5671 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5672   echo $ac_n "(cached) $ac_c" 1>&6
5673 else
5674   
5675                                                                 save_LIBS="$LIBS"
5676                                 LIBS="$KRB_LIBS $LIBS"
5677                                 cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680
5681 #include <kerberosIV/krb.h>
5682 #include <kerberosIV/des.h>
5683 extern int des_debug;
5684
5685 int main() {
5686
5687 des_debug = 1;
5688
5689 ; return 0; }
5690 EOF
5691 if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5692   rm -rf conftest*
5693   ol_cv_var_des_debug=yes
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   ol_cv_var_des_debug=no
5699 fi
5700 rm -f conftest*
5701                                                                 LIBS="$save_LIBS"
5702                         
5703 fi
5704
5705 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5706
5707                         if test $ol_cv_var_des_debug = yes ; then
5708                                 cat >> confdefs.h <<\EOF
5709 #define HAVE_DES_DEBUG 1
5710 EOF
5711
5712                         fi
5713
5714                         LIBS="$save_LIBS"
5715                 fi
5716         fi
5717 fi
5718
5719 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5720         for ac_hdr in krb.h des.h
5721 do
5722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5724 echo "configure:5725: checking for $ac_hdr" >&5
5725 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5726   echo $ac_n "(cached) $ac_c" 1>&6
5727 else
5728   cat > conftest.$ac_ext <<EOF
5729 #line 5730 "configure"
5730 #include "confdefs.h"
5731 #include <$ac_hdr>
5732 EOF
5733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5734 { (eval echo configure:5735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5736 if test -z "$ac_err"; then
5737   rm -rf conftest*
5738   eval "ac_cv_header_$ac_safe=yes"
5739 else
5740   echo "$ac_err" >&5
5741   echo "configure: failed program was:" >&5
5742   cat conftest.$ac_ext >&5
5743   rm -rf conftest*
5744   eval "ac_cv_header_$ac_safe=no"
5745 fi
5746 rm -f conftest*
5747 fi
5748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5749   echo "$ac_t""yes" 1>&6
5750     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5751   cat >> confdefs.h <<EOF
5752 #define $ac_tr_hdr 1
5753 EOF
5754  
5755 else
5756   echo "$ac_t""no" 1>&6
5757 fi
5758 done
5759
5760
5761         if test $ac_cv_header_krb_h = yes ; then
5762                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5763 echo "configure:5764: checking for main in -lkrb" >&5
5764 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5765 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5766   echo $ac_n "(cached) $ac_c" 1>&6
5767 else
5768   ac_save_LIBS="$LIBS"
5769 LIBS="-lkrb -ldes $LIBS"
5770 cat > conftest.$ac_ext <<EOF
5771 #line 5772 "configure"
5772 #include "confdefs.h"
5773
5774 int main() {
5775 main()
5776 ; return 0; }
5777 EOF
5778 if { (eval echo configure:5779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5779   rm -rf conftest*
5780   eval "ac_cv_lib_$ac_lib_var=yes"
5781 else
5782   echo "configure: failed program was:" >&5
5783   cat conftest.$ac_ext >&5
5784   rm -rf conftest*
5785   eval "ac_cv_lib_$ac_lib_var=no"
5786 fi
5787 rm -f conftest*
5788 LIBS="$ac_save_LIBS"
5789
5790 fi
5791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5792   echo "$ac_t""yes" 1>&6
5793   have_k4=yes
5794 else
5795   echo "$ac_t""no" 1>&6
5796 have_k4=no
5797 fi
5798
5799
5800                 if test $have_k4 = yes ; then
5801                         ol_with_kerberos=found
5802                         ol_link_kerberos=yes
5803
5804                         KRB_LIBS="-lkrb -ldes"
5805                 fi
5806         fi
5807 fi
5808
5809 if test $ol_link_kerberos = yes ; then
5810         cat >> confdefs.h <<\EOF
5811 #define HAVE_KERBEROS 1
5812 EOF
5813
5814 fi
5815
5816 ol_link_tls=no
5817 if test $ol_with_tls != no ; then
5818         
5819         for ac_hdr in openssl/ssl.h ssl.h
5820 do
5821 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5822 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5823 echo "configure:5824: checking for $ac_hdr" >&5
5824 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5825   echo $ac_n "(cached) $ac_c" 1>&6
5826 else
5827   cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 #include <$ac_hdr>
5831 EOF
5832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5833 { (eval echo configure:5834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5835 if test -z "$ac_err"; then
5836   rm -rf conftest*
5837   eval "ac_cv_header_$ac_safe=yes"
5838 else
5839   echo "$ac_err" >&5
5840   echo "configure: failed program was:" >&5
5841   cat conftest.$ac_ext >&5
5842   rm -rf conftest*
5843   eval "ac_cv_header_$ac_safe=no"
5844 fi
5845 rm -f conftest*
5846 fi
5847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5848   echo "$ac_t""yes" 1>&6
5849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5850   cat >> confdefs.h <<EOF
5851 #define $ac_tr_hdr 1
5852 EOF
5853  
5854 else
5855   echo "$ac_t""no" 1>&6
5856 fi
5857 done
5858
5859         
5860         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5861                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5862 echo "configure:5863: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5863 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5865   echo $ac_n "(cached) $ac_c" 1>&6
5866 else
5867   ac_save_LIBS="$LIBS"
5868 LIBS="-lssl -lcrypto $LIBS"
5869 cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872 /* Override any gcc2 internal prototype to avoid an error.  */
5873 /* We use char because int might match the return type of a gcc2
5874     builtin and then its argument prototype would still apply.  */
5875 char SSLeay_add_ssl_algorithms();
5876
5877 int main() {
5878 SSLeay_add_ssl_algorithms()
5879 ; return 0; }
5880 EOF
5881 if { (eval echo configure:5882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5882   rm -rf conftest*
5883   eval "ac_cv_lib_$ac_lib_var=yes"
5884 else
5885   echo "configure: failed program was:" >&5
5886   cat conftest.$ac_ext >&5
5887   rm -rf conftest*
5888   eval "ac_cv_lib_$ac_lib_var=no"
5889 fi
5890 rm -f conftest*
5891 LIBS="$ac_save_LIBS"
5892
5893 fi
5894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5895   echo "$ac_t""yes" 1>&6
5896   have_ssleay=yes
5897                         need_rsaref=no
5898 else
5899   echo "$ac_t""no" 1>&6
5900 have_ssleay=no
5901 fi
5902
5903                         
5904                 if test $have_ssleay = no ; then
5905                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5906 echo "configure:5907: checking for SSL_library_init in -lssl" >&5
5907 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5908 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5909   echo $ac_n "(cached) $ac_c" 1>&6
5910 else
5911   ac_save_LIBS="$LIBS"
5912 LIBS="-lssl -lcrypto $LIBS"
5913 cat > conftest.$ac_ext <<EOF
5914 #line 5915 "configure"
5915 #include "confdefs.h"
5916 /* Override any gcc2 internal prototype to avoid an error.  */
5917 /* We use char because int might match the return type of a gcc2
5918     builtin and then its argument prototype would still apply.  */
5919 char SSL_library_init();
5920
5921 int main() {
5922 SSL_library_init()
5923 ; return 0; }
5924 EOF
5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5926   rm -rf conftest*
5927   eval "ac_cv_lib_$ac_lib_var=yes"
5928 else
5929   echo "configure: failed program was:" >&5
5930   cat conftest.$ac_ext >&5
5931   rm -rf conftest*
5932   eval "ac_cv_lib_$ac_lib_var=no"
5933 fi
5934 rm -f conftest*
5935 LIBS="$ac_save_LIBS"
5936
5937 fi
5938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5939   echo "$ac_t""yes" 1>&6
5940   have_ssleay=yes
5941                                 need_rsaref=no
5942 else
5943   echo "$ac_t""no" 1>&6
5944 have_ssleay=no
5945 fi
5946
5947                 fi
5948
5949                 if test $have_ssleay = no ; then
5950                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5951 echo "configure:5952: checking for ssl3_accept in -lssl" >&5
5952 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5953 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5954   echo $ac_n "(cached) $ac_c" 1>&6
5955 else
5956   ac_save_LIBS="$LIBS"
5957 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5958 cat > conftest.$ac_ext <<EOF
5959 #line 5960 "configure"
5960 #include "confdefs.h"
5961 /* Override any gcc2 internal prototype to avoid an error.  */
5962 /* We use char because int might match the return type of a gcc2
5963     builtin and then its argument prototype would still apply.  */
5964 char ssl3_accept();
5965
5966 int main() {
5967 ssl3_accept()
5968 ; return 0; }
5969 EOF
5970 if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5971   rm -rf conftest*
5972   eval "ac_cv_lib_$ac_lib_var=yes"
5973 else
5974   echo "configure: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   rm -rf conftest*
5977   eval "ac_cv_lib_$ac_lib_var=no"
5978 fi
5979 rm -f conftest*
5980 LIBS="$ac_save_LIBS"
5981
5982 fi
5983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5984   echo "$ac_t""yes" 1>&6
5985   have_ssleay=yes
5986                                 need_rsaref=yes
5987 else
5988   echo "$ac_t""no" 1>&6
5989 have_ssleay=no
5990 fi
5991
5992                 fi
5993
5994                 if test $have_ssleay = yes ; then
5995                         ol_with_tls=found
5996                         ol_link_tls=yes
5997
5998                         cat >> confdefs.h <<\EOF
5999 #define HAVE_SSLEAY 1
6000 EOF
6001
6002
6003                         if test $need_rsaref = yes; then
6004                                 cat >> confdefs.h <<\EOF
6005 #define HAVE_RSAREF 1
6006 EOF
6007
6008
6009                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6010                         else
6011                                 TLS_LIBS="-lssl -lcrypto"
6012                         fi
6013                 fi
6014         fi
6015 fi
6016
6017 if test $ol_link_tls = yes ; then
6018         cat >> confdefs.h <<\EOF
6019 #define HAVE_TLS 1
6020 EOF
6021
6022 fi      
6023
6024 for ac_func in \
6025         ctime_r                 \
6026         gethostbyname_r gethostbyaddr_r \
6027
6028 do
6029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6030 echo "configure:6031: checking for $ac_func" >&5
6031 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6032   echo $ac_n "(cached) $ac_c" 1>&6
6033 else
6034   cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037 /* System header to define __stub macros and hopefully few prototypes,
6038     which can conflict with char $ac_func(); below.  */
6039 #include <assert.h>
6040 /* Override any gcc2 internal prototype to avoid an error.  */
6041 /* We use char because int might match the return type of a gcc2
6042     builtin and then its argument prototype would still apply.  */
6043 char $ac_func();
6044 char (*f)();
6045
6046 int main() {
6047
6048 /* The GNU C library defines this for functions which it implements
6049     to always fail with ENOSYS.  Some functions are actually named
6050     something starting with __ and the normal name is an alias.  */
6051 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6052 choke me
6053 #else
6054 f = $ac_func;
6055 #endif
6056
6057 ; return 0; }
6058 EOF
6059 if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6060   rm -rf conftest*
6061   eval "ac_cv_func_$ac_func=yes"
6062 else
6063   echo "configure: failed program was:" >&5
6064   cat conftest.$ac_ext >&5
6065   rm -rf conftest*
6066   eval "ac_cv_func_$ac_func=no"
6067 fi
6068 rm -f conftest*
6069 fi
6070
6071 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6072   echo "$ac_t""yes" 1>&6
6073     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6074   cat >> confdefs.h <<EOF
6075 #define $ac_tr_func 1
6076 EOF
6077  
6078 else
6079   echo "$ac_t""no" 1>&6
6080 fi
6081 done
6082
6083
6084 if test "$ac_cv_func_ctime_r" = no ; then
6085         ol_cv_func_ctime_r_nargs=0
6086 else
6087         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6088 echo "configure:6089: checking number of arguments of ctime_r" >&5
6089 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6090   echo $ac_n "(cached) $ac_c" 1>&6
6091 else
6092   cat > conftest.$ac_ext <<EOF
6093 #line 6094 "configure"
6094 #include "confdefs.h"
6095 #include <time.h>
6096 int main() {
6097 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6098 ; return 0; }
6099 EOF
6100 if { (eval echo configure:6101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6101   rm -rf conftest*
6102   ol_cv_func_ctime_r_nargs=3
6103 else
6104   echo "configure: failed program was:" >&5
6105   cat conftest.$ac_ext >&5
6106   rm -rf conftest*
6107   cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110 #include <time.h>
6111 int main() {
6112 time_t ti; char *buffer; ctime_r(&ti,buffer);
6113 ; return 0; }
6114 EOF
6115 if { (eval echo configure:6116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6116   rm -rf conftest*
6117   ol_cv_func_ctime_r_nargs=2
6118 else
6119   echo "configure: failed program was:" >&5
6120   cat conftest.$ac_ext >&5
6121   rm -rf conftest*
6122   ol_cv_func_ctime_r_nargs=0
6123 fi
6124 rm -f conftest*
6125 fi
6126 rm -f conftest*
6127 fi
6128
6129 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6130   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6131     cat >> confdefs.h <<EOF
6132 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6133 EOF
6134
6135   fi
6136
6137 fi
6138
6139 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6140         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6141 echo "configure:6142: checking number of arguments of gethostbyname_r" >&5
6142 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6143   echo $ac_n "(cached) $ac_c" 1>&6
6144 else
6145   cat > conftest.$ac_ext <<EOF
6146 #line 6147 "configure"
6147 #include "confdefs.h"
6148 #include <sys/types.h>
6149 #include <sys/socket.h>
6150 #include <netinet/in.h>
6151 #include <netdb.h>
6152 #define BUFSIZE (sizeof(struct hostent)+10)
6153 int main() {
6154 struct hostent hent; char buffer[BUFSIZE];
6155                 int bufsize=BUFSIZE;int h_errno;
6156                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6157                         buffer, bufsize, &h_errno);
6158 ; return 0; }
6159 EOF
6160 if { (eval echo configure:6161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6161   rm -rf conftest*
6162   ol_cv_func_gethostbyname_r_nargs=5
6163 else
6164   echo "configure: failed program was:" >&5
6165   cat conftest.$ac_ext >&5
6166   rm -rf conftest*
6167   cat > conftest.$ac_ext <<EOF
6168 #line 6169 "configure"
6169 #include "confdefs.h"
6170 #include <sys/types.h>
6171 #include <sys/socket.h>
6172 #include <netinet/in.h>
6173 #include <netdb.h>
6174 #define BUFSIZE (sizeof(struct hostent)+10)
6175 int main() {
6176 struct hostent hent;struct hostent *rhent;
6177                         char buffer[BUFSIZE];
6178                         int bufsize=BUFSIZE;int h_errno;
6179                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6180                                 &rhent, &h_errno);
6181 ; return 0; }
6182 EOF
6183 if { (eval echo configure:6184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6184   rm -rf conftest*
6185   ol_cv_func_gethostbyname_r_nargs=6
6186 else
6187   echo "configure: failed program was:" >&5
6188   cat conftest.$ac_ext >&5
6189   rm -rf conftest*
6190   ol_cv_func_gethostbyname_r_nargs=0
6191 fi
6192 rm -f conftest*
6193 fi
6194 rm -f conftest*
6195 fi
6196
6197 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6198   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6199         cat >> confdefs.h <<EOF
6200 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6201 EOF
6202
6203   fi
6204
6205 else
6206         ol_cv_func_gethostbyname_r_nargs=0
6207 fi
6208  
6209 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6210         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6211 echo "configure:6212: checking number of arguments of gethostbyaddr_r" >&5
6212 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6213   echo $ac_n "(cached) $ac_c" 1>&6
6214 else
6215   cat > conftest.$ac_ext <<EOF
6216 #line 6217 "configure"
6217 #include "confdefs.h"
6218 #include <sys/types.h>
6219 #include <sys/socket.h>
6220 #include <netinet/in.h>
6221 #include <netdb.h>
6222 #define BUFSIZE (sizeof(struct hostent)+10)
6223 int main() {
6224 struct hostent hent; char buffer[BUFSIZE]; 
6225             struct in_addr add;
6226             size_t alen=sizeof(struct in_addr);
6227             int bufsize=BUFSIZE;int h_errno;
6228                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6229                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6230 ; return 0; }
6231 EOF
6232 if { (eval echo configure:6233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6233   rm -rf conftest*
6234   ol_cv_func_gethostbyaddr_r_nargs=7
6235 else
6236   echo "configure: failed program was:" >&5
6237   cat conftest.$ac_ext >&5
6238   rm -rf conftest*
6239   cat > conftest.$ac_ext <<EOF
6240 #line 6241 "configure"
6241 #include "confdefs.h"
6242 #include <sys/types.h>
6243 #include <sys/socket.h>
6244 #include <netinet/in.h>
6245 #include <netdb.h>
6246 #define BUFSIZE (sizeof(struct hostent)+10)
6247 int main() {
6248 struct hostent hent;
6249                         struct hostent *rhent; char buffer[BUFSIZE]; 
6250                         struct in_addr add;
6251                         size_t alen=sizeof(struct in_addr);
6252                         int bufsize=BUFSIZE;int h_errno;
6253                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6254                                 alen, AF_INET, &hent, buffer, bufsize, 
6255                                 &rhent, &h_errno);
6256 ; return 0; }
6257 EOF
6258 if { (eval echo configure:6259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6259   rm -rf conftest*
6260   ol_cv_func_gethostbyaddr_r_nargs=8
6261 else
6262   echo "configure: failed program was:" >&5
6263   cat conftest.$ac_ext >&5
6264   rm -rf conftest*
6265   ol_cv_func_gethostbyaddr_r_nargs=0
6266 fi
6267 rm -f conftest*
6268 fi
6269 rm -f conftest*
6270 fi
6271
6272 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6273   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6274     cat >> confdefs.h <<EOF
6275 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6276 EOF
6277
6278   fi
6279
6280 else
6281         ol_cv_func_gethostbyaddr_r_nargs=0
6282 fi
6283
6284 if test "$ac_cv_func_ctime_r" = yes \
6285         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6286         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6287         -a "$ac_cv_func_gethostbyname_r" = yes \
6288         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6289         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6290         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6291         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6292         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6293         ; then
6294  
6295         cat >> confdefs.h <<\EOF
6296 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6297 EOF
6298
6299 fi
6300
6301 ol_link_threads=no
6302 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6303         -o $ol_with_threads = posix ; then
6304
6305         for ac_hdr in pthread.h
6306 do
6307 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6308 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6309 echo "configure:6310: checking for $ac_hdr" >&5
6310 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6311   echo $ac_n "(cached) $ac_c" 1>&6
6312 else
6313   cat > conftest.$ac_ext <<EOF
6314 #line 6315 "configure"
6315 #include "confdefs.h"
6316 #include <$ac_hdr>
6317 EOF
6318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6319 { (eval echo configure:6320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6321 if test -z "$ac_err"; then
6322   rm -rf conftest*
6323   eval "ac_cv_header_$ac_safe=yes"
6324 else
6325   echo "$ac_err" >&5
6326   echo "configure: failed program was:" >&5
6327   cat conftest.$ac_ext >&5
6328   rm -rf conftest*
6329   eval "ac_cv_header_$ac_safe=no"
6330 fi
6331 rm -f conftest*
6332 fi
6333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6334   echo "$ac_t""yes" 1>&6
6335     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6336   cat >> confdefs.h <<EOF
6337 #define $ac_tr_hdr 1
6338 EOF
6339  
6340 else
6341   echo "$ac_t""no" 1>&6
6342 fi
6343 done
6344
6345
6346         if test $ac_cv_header_pthread_h = yes ; then
6347                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6348 echo "configure:6349: checking POSIX thread version" >&5
6349 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6350   echo $ac_n "(cached) $ac_c" 1>&6
6351 else
6352   
6353         cat > conftest.$ac_ext <<EOF
6354 #line 6355 "configure"
6355 #include "confdefs.h"
6356
6357 #               include <pthread.h>
6358                 /* this check could be improved */
6359 #               ifdef PTHREAD_ONCE_INIT
6360                         pthread_version_final;
6361 #               endif
6362         
6363 EOF
6364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6365   egrep "pthread_version_final" >/dev/null 2>&1; then
6366   rm -rf conftest*
6367   ol_pthread_final=yes
6368 else
6369   rm -rf conftest*
6370   ol_pthread_final=no
6371 fi
6372 rm -f conftest*
6373
6374
6375         cat > conftest.$ac_ext <<EOF
6376 #line 6377 "configure"
6377 #include "confdefs.h"
6378
6379 #               include <pthread.h>
6380                 /* this check could be improved */
6381 #               ifdef pthread_once_init
6382                         pthread_version_draft4;
6383 #               endif
6384         
6385 EOF
6386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6387   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6388   rm -rf conftest*
6389   ol_pthread_draft4=yes
6390 else
6391   rm -rf conftest*
6392   ol_pthread_draft4=no
6393 fi
6394 rm -f conftest*
6395
6396
6397         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6398                 ol_cv_pthread_version=final
6399         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6400                 ol_cv_pthread_version=draft4
6401         else
6402                 ol_cv_pthread_version=unknown
6403         fi
6404
6405 fi
6406
6407 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6408
6409
6410                 if test $ol_cv_pthread_version = final ; then
6411                         cat >> confdefs.h <<\EOF
6412 #define HAVE_PTHREADS_FINAL 1
6413 EOF
6414
6415                 elif test $ol_cv_pthread_version = draft4 ; then
6416                         cat >> confdefs.h <<\EOF
6417 #define HAVE_PTHREADS_D4 1
6418 EOF
6419
6420                 else
6421                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6422                 fi
6423
6424                 # consider threads found
6425                 ol_with_threads=found
6426
6427                 
6428         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6429 echo "configure:6430: checking for LinuxThreads pthread.h" >&5
6430 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6431   echo $ac_n "(cached) $ac_c" 1>&6
6432 else
6433   cat > conftest.$ac_ext <<EOF
6434 #line 6435 "configure"
6435 #include "confdefs.h"
6436 #include <pthread.h>
6437 EOF
6438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6439   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6440   rm -rf conftest*
6441   ol_cv_header_linux_threads=yes
6442 else
6443   rm -rf conftest*
6444   ol_cv_header_linux_threads=no
6445 fi
6446 rm -f conftest*
6447
6448                 
6449 fi
6450
6451 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6452         if test $ol_cv_header_linux_threads = yes; then
6453                 cat >> confdefs.h <<\EOF
6454 #define HAVE_LINUX_THREADS 1
6455 EOF
6456
6457         fi
6458
6459                 
6460         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6461 echo "configure:6462: checking for GNU Pth pthread.h" >&5
6462 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6463   echo $ac_n "(cached) $ac_c" 1>&6
6464 else
6465   cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6468 #include <pthread.h>
6469 #ifdef _POSIX_THREAD_IS_GNU_PTH
6470         __gnu_pth__;
6471 #endif
6472
6473 EOF
6474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6475   egrep "__gnu_pth__" >/dev/null 2>&1; then
6476   rm -rf conftest*
6477   ol_cv_header_gnu_pth_pthread_h=yes
6478 else
6479   rm -rf conftest*
6480   ol_cv_header_gnu_pth_pthread_h=no
6481 fi
6482 rm -f conftest*
6483
6484                 
6485 fi
6486
6487 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6488
6489
6490                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6491                         for ac_hdr in sched.h
6492 do
6493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6495 echo "configure:6496: checking for $ac_hdr" >&5
6496 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6497   echo $ac_n "(cached) $ac_c" 1>&6
6498 else
6499   cat > conftest.$ac_ext <<EOF
6500 #line 6501 "configure"
6501 #include "confdefs.h"
6502 #include <$ac_hdr>
6503 EOF
6504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6505 { (eval echo configure:6506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6507 if test -z "$ac_err"; then
6508   rm -rf conftest*
6509   eval "ac_cv_header_$ac_safe=yes"
6510 else
6511   echo "$ac_err" >&5
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514   rm -rf conftest*
6515   eval "ac_cv_header_$ac_safe=no"
6516 fi
6517 rm -f conftest*
6518 fi
6519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6520   echo "$ac_t""yes" 1>&6
6521     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6522   cat >> confdefs.h <<EOF
6523 #define $ac_tr_hdr 1
6524 EOF
6525  
6526 else
6527   echo "$ac_t""no" 1>&6
6528 fi
6529 done
6530
6531                 fi
6532
6533                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6534                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6535 echo "configure:6536: checking for pthread_create in default libraries" >&5
6536 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6537   echo $ac_n "(cached) $ac_c" 1>&6
6538 else
6539   
6540                 if test "$cross_compiling" = yes; then
6541   cat > conftest.$ac_ext <<EOF
6542 #line 6543 "configure"
6543 #include "confdefs.h"
6544 /* pthread test headers */
6545 #include <pthread.h>
6546 #ifndef NULL
6547 #define NULL (void*)0
6548 #endif
6549
6550 static void *task(p)
6551         void *p;
6552 {
6553         return (void *) (p == NULL);
6554 }
6555
6556 int main() {
6557
6558         /* pthread test function */
6559         pthread_t t;
6560         int status;
6561
6562         /* make sure pthread_create() isn't just a stub */
6563 #if HAVE_PTHREADS_D4
6564         status = pthread_create(&t, pthread_attr_default, task, NULL);
6565 #else
6566         status = pthread_create(&t, NULL, task, NULL);
6567 #endif
6568
6569         if( status ) exit( status );
6570
6571         /* make sure pthread_detach() isn't just a stub */
6572 #if HAVE_PTHREADS_D4
6573         status = pthread_detach( &t );
6574 #else
6575         status = pthread_detach( t );
6576 #endif
6577
6578 #ifdef HAVE_LINUX_THREADS
6579         pthread_kill_other_threads_np();
6580 #endif
6581
6582         exit( status );
6583
6584 ; return 0; }
6585 EOF
6586 if { (eval echo configure:6587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6587   rm -rf conftest*
6588   ol_cv_pthread_create=yes
6589 else
6590   echo "configure: failed program was:" >&5
6591   cat conftest.$ac_ext >&5
6592   rm -rf conftest*
6593   ol_cv_pthread_create=no
6594 fi
6595 rm -f conftest*
6596 else
6597   cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 /* pthread test headers */
6601 #include <pthread.h>
6602 #ifndef NULL
6603 #define NULL (void*)0
6604 #endif
6605
6606 static void *task(p)
6607         void *p;
6608 {
6609         return (void *) (p == NULL);
6610 }
6611
6612
6613 int main(argc, argv)
6614         int argc;
6615         char **argv;
6616 {
6617
6618         /* pthread test function */
6619         pthread_t t;
6620         int status;
6621
6622         /* make sure pthread_create() isn't just a stub */
6623 #if HAVE_PTHREADS_D4
6624         status = pthread_create(&t, pthread_attr_default, task, NULL);
6625 #else
6626         status = pthread_create(&t, NULL, task, NULL);
6627 #endif
6628
6629         if( status ) exit( status );
6630
6631         /* make sure pthread_detach() isn't just a stub */
6632 #if HAVE_PTHREADS_D4
6633         status = pthread_detach( &t );
6634 #else
6635         status = pthread_detach( t );
6636 #endif
6637
6638 #ifdef HAVE_LINUX_THREADS
6639         pthread_kill_other_threads_np();
6640 #endif
6641
6642         exit( status );
6643
6644 }
6645
6646 EOF
6647 if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6648 then
6649   ol_cv_pthread_create=yes
6650 else
6651   echo "configure: failed program was:" >&5
6652   cat conftest.$ac_ext >&5
6653   rm -fr conftest*
6654   ol_cv_pthread_create=no
6655 fi
6656 rm -fr conftest*
6657 fi
6658
6659 fi
6660
6661 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6662
6663                 if test $ol_cv_pthread_create != no ; then
6664                         ol_link_threads=posix
6665                         ol_link_pthreads=""
6666                 fi
6667                 
6668                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6669 if test "$ol_link_threads" = no ; then
6670         # try -kthread
6671         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6672 echo "configure:6673: checking for pthread link with -kthread" >&5
6673 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6674   echo $ac_n "(cached) $ac_c" 1>&6
6675 else
6676   
6677                 # save the flags
6678                 ol_LIBS="$LIBS"
6679                 LIBS="-kthread $LIBS"
6680
6681                 if test "$cross_compiling" = yes; then
6682   cat > conftest.$ac_ext <<EOF
6683 #line 6684 "configure"
6684 #include "confdefs.h"
6685 /* pthread test headers */
6686 #include <pthread.h>
6687 #ifndef NULL
6688 #define NULL (void*)0
6689 #endif
6690
6691 static void *task(p)
6692         void *p;
6693 {
6694         return (void *) (p == NULL);
6695 }
6696
6697 int main() {
6698
6699         /* pthread test function */
6700         pthread_t t;
6701         int status;
6702
6703         /* make sure pthread_create() isn't just a stub */
6704 #if HAVE_PTHREADS_D4
6705         status = pthread_create(&t, pthread_attr_default, task, NULL);
6706 #else
6707         status = pthread_create(&t, NULL, task, NULL);
6708 #endif
6709
6710         if( status ) exit( status );
6711
6712         /* make sure pthread_detach() isn't just a stub */
6713 #if HAVE_PTHREADS_D4
6714         status = pthread_detach( &t );
6715 #else
6716         status = pthread_detach( t );
6717 #endif
6718
6719 #ifdef HAVE_LINUX_THREADS
6720         pthread_kill_other_threads_np();
6721 #endif
6722
6723         exit( status );
6724
6725 ; return 0; }
6726 EOF
6727 if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6728   rm -rf conftest*
6729   ol_cv_pthread_kthread=yes
6730 else
6731   echo "configure: failed program was:" >&5
6732   cat conftest.$ac_ext >&5
6733   rm -rf conftest*
6734   ol_cv_pthread_kthread=no
6735 fi
6736 rm -f conftest*
6737 else
6738   cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 /* pthread test headers */
6742 #include <pthread.h>
6743 #ifndef NULL
6744 #define NULL (void*)0
6745 #endif
6746
6747 static void *task(p)
6748         void *p;
6749 {
6750         return (void *) (p == NULL);
6751 }
6752
6753
6754 int main(argc, argv)
6755         int argc;
6756         char **argv;
6757 {
6758
6759         /* pthread test function */
6760         pthread_t t;
6761         int status;
6762
6763         /* make sure pthread_create() isn't just a stub */
6764 #if HAVE_PTHREADS_D4
6765         status = pthread_create(&t, pthread_attr_default, task, NULL);
6766 #else
6767         status = pthread_create(&t, NULL, task, NULL);
6768 #endif
6769
6770         if( status ) exit( status );
6771
6772         /* make sure pthread_detach() isn't just a stub */
6773 #if HAVE_PTHREADS_D4
6774         status = pthread_detach( &t );
6775 #else
6776         status = pthread_detach( t );
6777 #endif
6778
6779 #ifdef HAVE_LINUX_THREADS
6780         pthread_kill_other_threads_np();
6781 #endif
6782
6783         exit( status );
6784
6785 }
6786
6787 EOF
6788 if { (eval echo configure:6789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6789 then
6790   ol_cv_pthread_kthread=yes
6791 else
6792   echo "configure: failed program was:" >&5
6793   cat conftest.$ac_ext >&5
6794   rm -fr conftest*
6795   ol_cv_pthread_kthread=no
6796 fi
6797 rm -fr conftest*
6798 fi
6799
6800
6801                 # restore the LIBS
6802                 LIBS="$ol_LIBS"
6803         
6804 fi
6805
6806 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6807
6808         if test $ol_cv_pthread_kthread = yes ; then
6809                 ol_link_pthreads="-kthread"
6810                 ol_link_threads=posix
6811         fi
6812 fi
6813
6814                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6815 if test "$ol_link_threads" = no ; then
6816         # try -pthread
6817         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6818 echo "configure:6819: checking for pthread link with -pthread" >&5
6819 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6820   echo $ac_n "(cached) $ac_c" 1>&6
6821 else
6822   
6823                 # save the flags
6824                 ol_LIBS="$LIBS"
6825                 LIBS="-pthread $LIBS"
6826
6827                 if test "$cross_compiling" = yes; then
6828   cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* pthread test headers */
6832 #include <pthread.h>
6833 #ifndef NULL
6834 #define NULL (void*)0
6835 #endif
6836
6837 static void *task(p)
6838         void *p;
6839 {
6840         return (void *) (p == NULL);
6841 }
6842
6843 int main() {
6844
6845         /* pthread test function */
6846         pthread_t t;
6847         int status;
6848
6849         /* make sure pthread_create() isn't just a stub */
6850 #if HAVE_PTHREADS_D4
6851         status = pthread_create(&t, pthread_attr_default, task, NULL);
6852 #else
6853         status = pthread_create(&t, NULL, task, NULL);
6854 #endif
6855
6856         if( status ) exit( status );
6857
6858         /* make sure pthread_detach() isn't just a stub */
6859 #if HAVE_PTHREADS_D4
6860         status = pthread_detach( &t );
6861 #else
6862         status = pthread_detach( t );
6863 #endif
6864
6865 #ifdef HAVE_LINUX_THREADS
6866         pthread_kill_other_threads_np();
6867 #endif
6868
6869         exit( status );
6870
6871 ; return 0; }
6872 EOF
6873 if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6874   rm -rf conftest*
6875   ol_cv_pthread_pthread=yes
6876 else
6877   echo "configure: failed program was:" >&5
6878   cat conftest.$ac_ext >&5
6879   rm -rf conftest*
6880   ol_cv_pthread_pthread=no
6881 fi
6882 rm -f conftest*
6883 else
6884   cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887 /* pthread test headers */
6888 #include <pthread.h>
6889 #ifndef NULL
6890 #define NULL (void*)0
6891 #endif
6892
6893 static void *task(p)
6894         void *p;
6895 {
6896         return (void *) (p == NULL);
6897 }
6898
6899
6900 int main(argc, argv)
6901         int argc;
6902         char **argv;
6903 {
6904
6905         /* pthread test function */
6906         pthread_t t;
6907         int status;
6908
6909         /* make sure pthread_create() isn't just a stub */
6910 #if HAVE_PTHREADS_D4
6911         status = pthread_create(&t, pthread_attr_default, task, NULL);
6912 #else
6913         status = pthread_create(&t, NULL, task, NULL);
6914 #endif
6915
6916         if( status ) exit( status );
6917
6918         /* make sure pthread_detach() isn't just a stub */
6919 #if HAVE_PTHREADS_D4
6920         status = pthread_detach( &t );
6921 #else
6922         status = pthread_detach( t );
6923 #endif
6924
6925 #ifdef HAVE_LINUX_THREADS
6926         pthread_kill_other_threads_np();
6927 #endif
6928
6929         exit( status );
6930
6931 }
6932
6933 EOF
6934 if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6935 then
6936   ol_cv_pthread_pthread=yes
6937 else
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -fr conftest*
6941   ol_cv_pthread_pthread=no
6942 fi
6943 rm -fr conftest*
6944 fi
6945
6946
6947                 # restore the LIBS
6948                 LIBS="$ol_LIBS"
6949         
6950 fi
6951
6952 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6953
6954         if test $ol_cv_pthread_pthread = yes ; then
6955                 ol_link_pthreads="-pthread"
6956                 ol_link_threads=posix
6957         fi
6958 fi
6959
6960                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6961 if test "$ol_link_threads" = no ; then
6962         # try -pthreads
6963         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6964 echo "configure:6965: checking for pthread link with -pthreads" >&5
6965 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6966   echo $ac_n "(cached) $ac_c" 1>&6
6967 else
6968   
6969                 # save the flags
6970                 ol_LIBS="$LIBS"
6971                 LIBS="-pthreads $LIBS"
6972
6973                 if test "$cross_compiling" = yes; then
6974   cat > conftest.$ac_ext <<EOF
6975 #line 6976 "configure"
6976 #include "confdefs.h"
6977 /* pthread test headers */
6978 #include <pthread.h>
6979 #ifndef NULL
6980 #define NULL (void*)0
6981 #endif
6982
6983 static void *task(p)
6984         void *p;
6985 {
6986         return (void *) (p == NULL);
6987 }
6988
6989 int main() {
6990
6991         /* pthread test function */
6992         pthread_t t;
6993         int status;
6994
6995         /* make sure pthread_create() isn't just a stub */
6996 #if HAVE_PTHREADS_D4
6997         status = pthread_create(&t, pthread_attr_default, task, NULL);
6998 #else
6999         status = pthread_create(&t, NULL, task, NULL);
7000 #endif
7001
7002         if( status ) exit( status );
7003
7004         /* make sure pthread_detach() isn't just a stub */
7005 #if HAVE_PTHREADS_D4
7006         status = pthread_detach( &t );
7007 #else
7008         status = pthread_detach( t );
7009 #endif
7010
7011 #ifdef HAVE_LINUX_THREADS
7012         pthread_kill_other_threads_np();
7013 #endif
7014
7015         exit( status );
7016
7017 ; return 0; }
7018 EOF
7019 if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7020   rm -rf conftest*
7021   ol_cv_pthread_pthreads=yes
7022 else
7023   echo "configure: failed program was:" >&5
7024   cat conftest.$ac_ext >&5
7025   rm -rf conftest*
7026   ol_cv_pthread_pthreads=no
7027 fi
7028 rm -f conftest*
7029 else
7030   cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* pthread test headers */
7034 #include <pthread.h>
7035 #ifndef NULL
7036 #define NULL (void*)0
7037 #endif
7038
7039 static void *task(p)
7040         void *p;
7041 {
7042         return (void *) (p == NULL);
7043 }
7044
7045
7046 int main(argc, argv)
7047         int argc;
7048         char **argv;
7049 {
7050
7051         /* pthread test function */
7052         pthread_t t;
7053         int status;
7054
7055         /* make sure pthread_create() isn't just a stub */
7056 #if HAVE_PTHREADS_D4
7057         status = pthread_create(&t, pthread_attr_default, task, NULL);
7058 #else
7059         status = pthread_create(&t, NULL, task, NULL);
7060 #endif
7061
7062         if( status ) exit( status );
7063
7064         /* make sure pthread_detach() isn't just a stub */
7065 #if HAVE_PTHREADS_D4
7066         status = pthread_detach( &t );
7067 #else
7068         status = pthread_detach( t );
7069 #endif
7070
7071 #ifdef HAVE_LINUX_THREADS
7072         pthread_kill_other_threads_np();
7073 #endif
7074
7075         exit( status );
7076
7077 }
7078
7079 EOF
7080 if { (eval echo configure:7081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7081 then
7082   ol_cv_pthread_pthreads=yes
7083 else
7084   echo "configure: failed program was:" >&5
7085   cat conftest.$ac_ext >&5
7086   rm -fr conftest*
7087   ol_cv_pthread_pthreads=no
7088 fi
7089 rm -fr conftest*
7090 fi
7091
7092
7093                 # restore the LIBS
7094                 LIBS="$ol_LIBS"
7095         
7096 fi
7097
7098 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7099
7100         if test $ol_cv_pthread_pthreads = yes ; then
7101                 ol_link_pthreads="-pthreads"
7102                 ol_link_threads=posix
7103         fi
7104 fi
7105
7106                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7107 if test "$ol_link_threads" = no ; then
7108         # try -mthreads
7109         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7110 echo "configure:7111: checking for pthread link with -mthreads" >&5
7111 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7112   echo $ac_n "(cached) $ac_c" 1>&6
7113 else
7114   
7115                 # save the flags
7116                 ol_LIBS="$LIBS"
7117                 LIBS="-mthreads $LIBS"
7118
7119                 if test "$cross_compiling" = yes; then
7120   cat > conftest.$ac_ext <<EOF
7121 #line 7122 "configure"
7122 #include "confdefs.h"
7123 /* pthread test headers */
7124 #include <pthread.h>
7125 #ifndef NULL
7126 #define NULL (void*)0
7127 #endif
7128
7129 static void *task(p)
7130         void *p;
7131 {
7132         return (void *) (p == NULL);
7133 }
7134
7135 int main() {
7136
7137         /* pthread test function */
7138         pthread_t t;
7139         int status;
7140
7141         /* make sure pthread_create() isn't just a stub */
7142 #if HAVE_PTHREADS_D4
7143         status = pthread_create(&t, pthread_attr_default, task, NULL);
7144 #else
7145         status = pthread_create(&t, NULL, task, NULL);
7146 #endif
7147
7148         if( status ) exit( status );
7149
7150         /* make sure pthread_detach() isn't just a stub */
7151 #if HAVE_PTHREADS_D4
7152         status = pthread_detach( &t );
7153 #else
7154         status = pthread_detach( t );
7155 #endif
7156
7157 #ifdef HAVE_LINUX_THREADS
7158         pthread_kill_other_threads_np();
7159 #endif
7160
7161         exit( status );
7162
7163 ; return 0; }
7164 EOF
7165 if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7166   rm -rf conftest*
7167   ol_cv_pthread_mthreads=yes
7168 else
7169   echo "configure: failed program was:" >&5
7170   cat conftest.$ac_ext >&5
7171   rm -rf conftest*
7172   ol_cv_pthread_mthreads=no
7173 fi
7174 rm -f conftest*
7175 else
7176   cat > conftest.$ac_ext <<EOF
7177 #line 7178 "configure"
7178 #include "confdefs.h"
7179 /* pthread test headers */
7180 #include <pthread.h>
7181 #ifndef NULL
7182 #define NULL (void*)0
7183 #endif
7184
7185 static void *task(p)
7186         void *p;
7187 {
7188         return (void *) (p == NULL);
7189 }
7190
7191
7192 int main(argc, argv)
7193         int argc;
7194         char **argv;
7195 {
7196
7197         /* pthread test function */
7198         pthread_t t;
7199         int status;
7200
7201         /* make sure pthread_create() isn't just a stub */
7202 #if HAVE_PTHREADS_D4
7203         status = pthread_create(&t, pthread_attr_default, task, NULL);
7204 #else
7205         status = pthread_create(&t, NULL, task, NULL);
7206 #endif
7207
7208         if( status ) exit( status );
7209
7210         /* make sure pthread_detach() isn't just a stub */
7211 #if HAVE_PTHREADS_D4
7212         status = pthread_detach( &t );
7213 #else
7214         status = pthread_detach( t );
7215 #endif
7216
7217 #ifdef HAVE_LINUX_THREADS
7218         pthread_kill_other_threads_np();
7219 #endif
7220
7221         exit( status );
7222
7223 }
7224
7225 EOF
7226 if { (eval echo configure:7227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7227 then
7228   ol_cv_pthread_mthreads=yes
7229 else
7230   echo "configure: failed program was:" >&5
7231   cat conftest.$ac_ext >&5
7232   rm -fr conftest*
7233   ol_cv_pthread_mthreads=no
7234 fi
7235 rm -fr conftest*
7236 fi
7237
7238
7239                 # restore the LIBS
7240                 LIBS="$ol_LIBS"
7241         
7242 fi
7243
7244 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7245
7246         if test $ol_cv_pthread_mthreads = yes ; then
7247                 ol_link_pthreads="-mthreads"
7248                 ol_link_threads=posix
7249         fi
7250 fi
7251
7252                 # Pthread try link: -thread (ol_cv_pthread_thread)
7253 if test "$ol_link_threads" = no ; then
7254         # try -thread
7255         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7256 echo "configure:7257: checking for pthread link with -thread" >&5
7257 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7258   echo $ac_n "(cached) $ac_c" 1>&6
7259 else
7260   
7261                 # save the flags
7262                 ol_LIBS="$LIBS"
7263                 LIBS="-thread $LIBS"
7264
7265                 if test "$cross_compiling" = yes; then
7266   cat > conftest.$ac_ext <<EOF
7267 #line 7268 "configure"
7268 #include "confdefs.h"
7269 /* pthread test headers */
7270 #include <pthread.h>
7271 #ifndef NULL
7272 #define NULL (void*)0
7273 #endif
7274
7275 static void *task(p)
7276         void *p;
7277 {
7278         return (void *) (p == NULL);
7279 }
7280
7281 int main() {
7282
7283         /* pthread test function */
7284         pthread_t t;
7285         int status;
7286
7287         /* make sure pthread_create() isn't just a stub */
7288 #if HAVE_PTHREADS_D4
7289         status = pthread_create(&t, pthread_attr_default, task, NULL);
7290 #else
7291         status = pthread_create(&t, NULL, task, NULL);
7292 #endif
7293
7294         if( status ) exit( status );
7295
7296         /* make sure pthread_detach() isn't just a stub */
7297 #if HAVE_PTHREADS_D4
7298         status = pthread_detach( &t );
7299 #else
7300         status = pthread_detach( t );
7301 #endif
7302
7303 #ifdef HAVE_LINUX_THREADS
7304         pthread_kill_other_threads_np();
7305 #endif
7306
7307         exit( status );
7308
7309 ; return 0; }
7310 EOF
7311 if { (eval echo configure:7312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7312   rm -rf conftest*
7313   ol_cv_pthread_thread=yes
7314 else
7315   echo "configure: failed program was:" >&5
7316   cat conftest.$ac_ext >&5
7317   rm -rf conftest*
7318   ol_cv_pthread_thread=no
7319 fi
7320 rm -f conftest*
7321 else
7322   cat > conftest.$ac_ext <<EOF
7323 #line 7324 "configure"
7324 #include "confdefs.h"
7325 /* pthread test headers */
7326 #include <pthread.h>
7327 #ifndef NULL
7328 #define NULL (void*)0
7329 #endif
7330
7331 static void *task(p)
7332         void *p;
7333 {
7334         return (void *) (p == NULL);
7335 }
7336
7337
7338 int main(argc, argv)
7339         int argc;
7340         char **argv;
7341 {
7342
7343         /* pthread test function */
7344         pthread_t t;
7345         int status;
7346
7347         /* make sure pthread_create() isn't just a stub */
7348 #if HAVE_PTHREADS_D4
7349         status = pthread_create(&t, pthread_attr_default, task, NULL);
7350 #else
7351         status = pthread_create(&t, NULL, task, NULL);
7352 #endif
7353
7354         if( status ) exit( status );
7355
7356         /* make sure pthread_detach() isn't just a stub */
7357 #if HAVE_PTHREADS_D4
7358         status = pthread_detach( &t );
7359 #else
7360         status = pthread_detach( t );
7361 #endif
7362
7363 #ifdef HAVE_LINUX_THREADS
7364         pthread_kill_other_threads_np();
7365 #endif
7366
7367         exit( status );
7368
7369 }
7370
7371 EOF
7372 if { (eval echo configure:7373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7373 then
7374   ol_cv_pthread_thread=yes
7375 else
7376   echo "configure: failed program was:" >&5
7377   cat conftest.$ac_ext >&5
7378   rm -fr conftest*
7379   ol_cv_pthread_thread=no
7380 fi
7381 rm -fr conftest*
7382 fi
7383
7384
7385                 # restore the LIBS
7386                 LIBS="$ol_LIBS"
7387         
7388 fi
7389
7390 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7391
7392         if test $ol_cv_pthread_thread = yes ; then
7393                 ol_link_pthreads="-thread"
7394                 ol_link_threads=posix
7395         fi
7396 fi
7397
7398
7399                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7400 if test "$ol_link_threads" = no ; then
7401         # try -lpthread -lmach -lexc -lc_r
7402         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7403 echo "configure:7404: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7404 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7405   echo $ac_n "(cached) $ac_c" 1>&6
7406 else
7407   
7408                 # save the flags
7409                 ol_LIBS="$LIBS"
7410                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7411
7412                 if test "$cross_compiling" = yes; then
7413   cat > conftest.$ac_ext <<EOF
7414 #line 7415 "configure"
7415 #include "confdefs.h"
7416 /* pthread test headers */
7417 #include <pthread.h>
7418 #ifndef NULL
7419 #define NULL (void*)0
7420 #endif
7421
7422 static void *task(p)
7423         void *p;
7424 {
7425         return (void *) (p == NULL);
7426 }
7427
7428 int main() {
7429
7430         /* pthread test function */
7431         pthread_t t;
7432         int status;
7433
7434         /* make sure pthread_create() isn't just a stub */
7435 #if HAVE_PTHREADS_D4
7436         status = pthread_create(&t, pthread_attr_default, task, NULL);
7437 #else
7438         status = pthread_create(&t, NULL, task, NULL);
7439 #endif
7440
7441         if( status ) exit( status );
7442
7443         /* make sure pthread_detach() isn't just a stub */
7444 #if HAVE_PTHREADS_D4
7445         status = pthread_detach( &t );
7446 #else
7447         status = pthread_detach( t );
7448 #endif
7449
7450 #ifdef HAVE_LINUX_THREADS
7451         pthread_kill_other_threads_np();
7452 #endif
7453
7454         exit( status );
7455
7456 ; return 0; }
7457 EOF
7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7459   rm -rf conftest*
7460   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7461 else
7462   echo "configure: failed program was:" >&5
7463   cat conftest.$ac_ext >&5
7464   rm -rf conftest*
7465   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7466 fi
7467 rm -f conftest*
7468 else
7469   cat > conftest.$ac_ext <<EOF
7470 #line 7471 "configure"
7471 #include "confdefs.h"
7472 /* pthread test headers */
7473 #include <pthread.h>
7474 #ifndef NULL
7475 #define NULL (void*)0
7476 #endif
7477
7478 static void *task(p)
7479         void *p;
7480 {
7481         return (void *) (p == NULL);
7482 }
7483
7484
7485 int main(argc, argv)
7486         int argc;
7487         char **argv;
7488 {
7489
7490         /* pthread test function */
7491         pthread_t t;
7492         int status;
7493
7494         /* make sure pthread_create() isn't just a stub */
7495 #if HAVE_PTHREADS_D4
7496         status = pthread_create(&t, pthread_attr_default, task, NULL);
7497 #else
7498         status = pthread_create(&t, NULL, task, NULL);
7499 #endif
7500
7501         if( status ) exit( status );
7502
7503         /* make sure pthread_detach() isn't just a stub */
7504 #if HAVE_PTHREADS_D4
7505         status = pthread_detach( &t );
7506 #else
7507         status = pthread_detach( t );
7508 #endif
7509
7510 #ifdef HAVE_LINUX_THREADS
7511         pthread_kill_other_threads_np();
7512 #endif
7513
7514         exit( status );
7515
7516 }
7517
7518 EOF
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7520 then
7521   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7522 else
7523   echo "configure: failed program was:" >&5
7524   cat conftest.$ac_ext >&5
7525   rm -fr conftest*
7526   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7527 fi
7528 rm -fr conftest*
7529 fi
7530
7531
7532                 # restore the LIBS
7533                 LIBS="$ol_LIBS"
7534         
7535 fi
7536
7537 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7538
7539         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7540                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7541                 ol_link_threads=posix
7542         fi
7543 fi
7544
7545                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7546 if test "$ol_link_threads" = no ; then
7547         # try -lpthread -lmach -lexc
7548         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7549 echo "configure:7550: checking for pthread link with -lpthread -lmach -lexc" >&5
7550 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7551   echo $ac_n "(cached) $ac_c" 1>&6
7552 else
7553   
7554                 # save the flags
7555                 ol_LIBS="$LIBS"
7556                 LIBS="-lpthread -lmach -lexc $LIBS"
7557
7558                 if test "$cross_compiling" = yes; then
7559   cat > conftest.$ac_ext <<EOF
7560 #line 7561 "configure"
7561 #include "confdefs.h"
7562 /* pthread test headers */
7563 #include <pthread.h>
7564 #ifndef NULL
7565 #define NULL (void*)0
7566 #endif
7567
7568 static void *task(p)
7569         void *p;
7570 {
7571         return (void *) (p == NULL);
7572 }
7573
7574 int main() {
7575
7576         /* pthread test function */
7577         pthread_t t;
7578         int status;
7579
7580         /* make sure pthread_create() isn't just a stub */
7581 #if HAVE_PTHREADS_D4
7582         status = pthread_create(&t, pthread_attr_default, task, NULL);
7583 #else
7584         status = pthread_create(&t, NULL, task, NULL);
7585 #endif
7586
7587         if( status ) exit( status );
7588
7589         /* make sure pthread_detach() isn't just a stub */
7590 #if HAVE_PTHREADS_D4
7591         status = pthread_detach( &t );
7592 #else
7593         status = pthread_detach( t );
7594 #endif
7595
7596 #ifdef HAVE_LINUX_THREADS
7597         pthread_kill_other_threads_np();
7598 #endif
7599
7600         exit( status );
7601
7602 ; return 0; }
7603 EOF
7604 if { (eval echo configure:7605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7605   rm -rf conftest*
7606   ol_cv_pthread_lpthread_lmach_lexc=yes
7607 else
7608   echo "configure: failed program was:" >&5
7609   cat conftest.$ac_ext >&5
7610   rm -rf conftest*
7611   ol_cv_pthread_lpthread_lmach_lexc=no
7612 fi
7613 rm -f conftest*
7614 else
7615   cat > conftest.$ac_ext <<EOF
7616 #line 7617 "configure"
7617 #include "confdefs.h"
7618 /* pthread test headers */
7619 #include <pthread.h>
7620 #ifndef NULL
7621 #define NULL (void*)0
7622 #endif
7623
7624 static void *task(p)
7625         void *p;
7626 {
7627         return (void *) (p == NULL);
7628 }
7629
7630
7631 int main(argc, argv)
7632         int argc;
7633         char **argv;
7634 {
7635
7636         /* pthread test function */
7637         pthread_t t;
7638         int status;
7639
7640         /* make sure pthread_create() isn't just a stub */
7641 #if HAVE_PTHREADS_D4
7642         status = pthread_create(&t, pthread_attr_default, task, NULL);
7643 #else
7644         status = pthread_create(&t, NULL, task, NULL);
7645 #endif
7646
7647         if( status ) exit( status );
7648
7649         /* make sure pthread_detach() isn't just a stub */
7650 #if HAVE_PTHREADS_D4
7651         status = pthread_detach( &t );
7652 #else
7653         status = pthread_detach( t );
7654 #endif
7655
7656 #ifdef HAVE_LINUX_THREADS
7657         pthread_kill_other_threads_np();
7658 #endif
7659
7660         exit( status );
7661
7662 }
7663
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7666 then
7667   ol_cv_pthread_lpthread_lmach_lexc=yes
7668 else
7669   echo "configure: failed program was:" >&5
7670   cat conftest.$ac_ext >&5
7671   rm -fr conftest*
7672   ol_cv_pthread_lpthread_lmach_lexc=no
7673 fi
7674 rm -fr conftest*
7675 fi
7676
7677
7678                 # restore the LIBS
7679                 LIBS="$ol_LIBS"
7680         
7681 fi
7682
7683 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7684
7685         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7686                 ol_link_pthreads="-lpthread -lmach -lexc"
7687                 ol_link_threads=posix
7688         fi
7689 fi
7690
7691
7692                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7693 if test "$ol_link_threads" = no ; then
7694         # try -lpthread -Wl,-woff,85
7695         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7696 echo "configure:7697: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7697 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7698   echo $ac_n "(cached) $ac_c" 1>&6
7699 else
7700   
7701                 # save the flags
7702                 ol_LIBS="$LIBS"
7703                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7704
7705                 if test "$cross_compiling" = yes; then
7706   cat > conftest.$ac_ext <<EOF
7707 #line 7708 "configure"
7708 #include "confdefs.h"
7709 /* pthread test headers */
7710 #include <pthread.h>
7711 #ifndef NULL
7712 #define NULL (void*)0
7713 #endif
7714
7715 static void *task(p)
7716         void *p;
7717 {
7718         return (void *) (p == NULL);
7719 }
7720
7721 int main() {
7722
7723         /* pthread test function */
7724         pthread_t t;
7725         int status;
7726
7727         /* make sure pthread_create() isn't just a stub */
7728 #if HAVE_PTHREADS_D4
7729         status = pthread_create(&t, pthread_attr_default, task, NULL);
7730 #else
7731         status = pthread_create(&t, NULL, task, NULL);
7732 #endif
7733
7734         if( status ) exit( status );
7735
7736         /* make sure pthread_detach() isn't just a stub */
7737 #if HAVE_PTHREADS_D4
7738         status = pthread_detach( &t );
7739 #else
7740         status = pthread_detach( t );
7741 #endif
7742
7743 #ifdef HAVE_LINUX_THREADS
7744         pthread_kill_other_threads_np();
7745 #endif
7746
7747         exit( status );
7748
7749 ; return 0; }
7750 EOF
7751 if { (eval echo configure:7752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7752   rm -rf conftest*
7753   ol_cv_pthread_lib_lpthread_woff=yes
7754 else
7755   echo "configure: failed program was:" >&5
7756   cat conftest.$ac_ext >&5
7757   rm -rf conftest*
7758   ol_cv_pthread_lib_lpthread_woff=no
7759 fi
7760 rm -f conftest*
7761 else
7762   cat > conftest.$ac_ext <<EOF
7763 #line 7764 "configure"
7764 #include "confdefs.h"
7765 /* pthread test headers */
7766 #include <pthread.h>
7767 #ifndef NULL
7768 #define NULL (void*)0
7769 #endif
7770
7771 static void *task(p)
7772         void *p;
7773 {
7774         return (void *) (p == NULL);
7775 }
7776
7777
7778 int main(argc, argv)
7779         int argc;
7780         char **argv;
7781 {
7782
7783         /* pthread test function */
7784         pthread_t t;
7785         int status;
7786
7787         /* make sure pthread_create() isn't just a stub */
7788 #if HAVE_PTHREADS_D4
7789         status = pthread_create(&t, pthread_attr_default, task, NULL);
7790 #else
7791         status = pthread_create(&t, NULL, task, NULL);
7792 #endif
7793
7794         if( status ) exit( status );
7795
7796         /* make sure pthread_detach() isn't just a stub */
7797 #if HAVE_PTHREADS_D4
7798         status = pthread_detach( &t );
7799 #else
7800         status = pthread_detach( t );
7801 #endif
7802
7803 #ifdef HAVE_LINUX_THREADS
7804         pthread_kill_other_threads_np();
7805 #endif
7806
7807         exit( status );
7808
7809 }
7810
7811 EOF
7812 if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7813 then
7814   ol_cv_pthread_lib_lpthread_woff=yes
7815 else
7816   echo "configure: failed program was:" >&5
7817   cat conftest.$ac_ext >&5
7818   rm -fr conftest*
7819   ol_cv_pthread_lib_lpthread_woff=no
7820 fi
7821 rm -fr conftest*
7822 fi
7823
7824
7825                 # restore the LIBS
7826                 LIBS="$ol_LIBS"
7827         
7828 fi
7829
7830 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7831
7832         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7833                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7834                 ol_link_threads=posix
7835         fi
7836 fi
7837
7838
7839                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7840 if test "$ol_link_threads" = no ; then
7841         # try -lpthread
7842         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7843 echo "configure:7844: checking for pthread link with -lpthread" >&5
7844 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7845   echo $ac_n "(cached) $ac_c" 1>&6
7846 else
7847   
7848                 # save the flags
7849                 ol_LIBS="$LIBS"
7850                 LIBS="-lpthread $LIBS"
7851
7852                 if test "$cross_compiling" = yes; then
7853   cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856 /* pthread test headers */
7857 #include <pthread.h>
7858 #ifndef NULL
7859 #define NULL (void*)0
7860 #endif
7861
7862 static void *task(p)
7863         void *p;
7864 {
7865         return (void *) (p == NULL);
7866 }
7867
7868 int main() {
7869
7870         /* pthread test function */
7871         pthread_t t;
7872         int status;
7873
7874         /* make sure pthread_create() isn't just a stub */
7875 #if HAVE_PTHREADS_D4
7876         status = pthread_create(&t, pthread_attr_default, task, NULL);
7877 #else
7878         status = pthread_create(&t, NULL, task, NULL);
7879 #endif
7880
7881         if( status ) exit( status );
7882
7883         /* make sure pthread_detach() isn't just a stub */
7884 #if HAVE_PTHREADS_D4
7885         status = pthread_detach( &t );
7886 #else
7887         status = pthread_detach( t );
7888 #endif
7889
7890 #ifdef HAVE_LINUX_THREADS
7891         pthread_kill_other_threads_np();
7892 #endif
7893
7894         exit( status );
7895
7896 ; return 0; }
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7899   rm -rf conftest*
7900   ol_cv_pthread_lpthread=yes
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   ol_cv_pthread_lpthread=no
7906 fi
7907 rm -f conftest*
7908 else
7909   cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 /* pthread test headers */
7913 #include <pthread.h>
7914 #ifndef NULL
7915 #define NULL (void*)0
7916 #endif
7917
7918 static void *task(p)
7919         void *p;
7920 {
7921         return (void *) (p == NULL);
7922 }
7923
7924
7925 int main(argc, argv)
7926         int argc;
7927         char **argv;
7928 {
7929
7930         /* pthread test function */
7931         pthread_t t;
7932         int status;
7933
7934         /* make sure pthread_create() isn't just a stub */
7935 #if HAVE_PTHREADS_D4
7936         status = pthread_create(&t, pthread_attr_default, task, NULL);
7937 #else
7938         status = pthread_create(&t, NULL, task, NULL);
7939 #endif
7940
7941         if( status ) exit( status );
7942
7943         /* make sure pthread_detach() isn't just a stub */
7944 #if HAVE_PTHREADS_D4
7945         status = pthread_detach( &t );
7946 #else
7947         status = pthread_detach( t );
7948 #endif
7949
7950 #ifdef HAVE_LINUX_THREADS
7951         pthread_kill_other_threads_np();
7952 #endif
7953
7954         exit( status );
7955
7956 }
7957
7958 EOF
7959 if { (eval echo configure:7960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7960 then
7961   ol_cv_pthread_lpthread=yes
7962 else
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -fr conftest*
7966   ol_cv_pthread_lpthread=no
7967 fi
7968 rm -fr conftest*
7969 fi
7970
7971
7972                 # restore the LIBS
7973                 LIBS="$ol_LIBS"
7974         
7975 fi
7976
7977 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7978
7979         if test $ol_cv_pthread_lpthread = yes ; then
7980                 ol_link_pthreads="-lpthread"
7981                 ol_link_threads=posix
7982         fi
7983 fi
7984
7985                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7986 if test "$ol_link_threads" = no ; then
7987         # try -lc_r
7988         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7989 echo "configure:7990: checking for pthread link with -lc_r" >&5
7990 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7991   echo $ac_n "(cached) $ac_c" 1>&6
7992 else
7993   
7994                 # save the flags
7995                 ol_LIBS="$LIBS"
7996                 LIBS="-lc_r $LIBS"
7997
7998                 if test "$cross_compiling" = yes; then
7999   cat > conftest.$ac_ext <<EOF
8000 #line 8001 "configure"
8001 #include "confdefs.h"
8002 /* pthread test headers */
8003 #include <pthread.h>
8004 #ifndef NULL
8005 #define NULL (void*)0
8006 #endif
8007
8008 static void *task(p)
8009         void *p;
8010 {
8011         return (void *) (p == NULL);
8012 }
8013
8014 int main() {
8015
8016         /* pthread test function */
8017         pthread_t t;
8018         int status;
8019
8020         /* make sure pthread_create() isn't just a stub */
8021 #if HAVE_PTHREADS_D4
8022         status = pthread_create(&t, pthread_attr_default, task, NULL);
8023 #else
8024         status = pthread_create(&t, NULL, task, NULL);
8025 #endif
8026
8027         if( status ) exit( status );
8028
8029         /* make sure pthread_detach() isn't just a stub */
8030 #if HAVE_PTHREADS_D4
8031         status = pthread_detach( &t );
8032 #else
8033         status = pthread_detach( t );
8034 #endif
8035
8036 #ifdef HAVE_LINUX_THREADS
8037         pthread_kill_other_threads_np();
8038 #endif
8039
8040         exit( status );
8041
8042 ; return 0; }
8043 EOF
8044 if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8045   rm -rf conftest*
8046   ol_cv_pthread_lc_r=yes
8047 else
8048   echo "configure: failed program was:" >&5
8049   cat conftest.$ac_ext >&5
8050   rm -rf conftest*
8051   ol_cv_pthread_lc_r=no
8052 fi
8053 rm -f conftest*
8054 else
8055   cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 /* pthread test headers */
8059 #include <pthread.h>
8060 #ifndef NULL
8061 #define NULL (void*)0
8062 #endif
8063
8064 static void *task(p)
8065         void *p;
8066 {
8067         return (void *) (p == NULL);
8068 }
8069
8070
8071 int main(argc, argv)
8072         int argc;
8073         char **argv;
8074 {
8075
8076         /* pthread test function */
8077         pthread_t t;
8078         int status;
8079
8080         /* make sure pthread_create() isn't just a stub */
8081 #if HAVE_PTHREADS_D4
8082         status = pthread_create(&t, pthread_attr_default, task, NULL);
8083 #else
8084         status = pthread_create(&t, NULL, task, NULL);
8085 #endif
8086
8087         if( status ) exit( status );
8088
8089         /* make sure pthread_detach() isn't just a stub */
8090 #if HAVE_PTHREADS_D4
8091         status = pthread_detach( &t );
8092 #else
8093         status = pthread_detach( t );
8094 #endif
8095
8096 #ifdef HAVE_LINUX_THREADS
8097         pthread_kill_other_threads_np();
8098 #endif
8099
8100         exit( status );
8101
8102 }
8103
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8106 then
8107   ol_cv_pthread_lc_r=yes
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -fr conftest*
8112   ol_cv_pthread_lc_r=no
8113 fi
8114 rm -fr conftest*
8115 fi
8116
8117
8118                 # restore the LIBS
8119                 LIBS="$ol_LIBS"
8120         
8121 fi
8122
8123 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8124
8125         if test $ol_cv_pthread_lc_r = yes ; then
8126                 ol_link_pthreads="-lc_r"
8127                 ol_link_threads=posix
8128         fi
8129 fi
8130
8131
8132                 # Pthread try link: -threads (ol_cv_pthread_threads)
8133 if test "$ol_link_threads" = no ; then
8134         # try -threads
8135         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8136 echo "configure:8137: checking for pthread link with -threads" >&5
8137 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8138   echo $ac_n "(cached) $ac_c" 1>&6
8139 else
8140   
8141                 # save the flags
8142                 ol_LIBS="$LIBS"
8143                 LIBS="-threads $LIBS"
8144
8145                 if test "$cross_compiling" = yes; then
8146   cat > conftest.$ac_ext <<EOF
8147 #line 8148 "configure"
8148 #include "confdefs.h"
8149 /* pthread test headers */
8150 #include <pthread.h>
8151 #ifndef NULL
8152 #define NULL (void*)0
8153 #endif
8154
8155 static void *task(p)
8156         void *p;
8157 {
8158         return (void *) (p == NULL);
8159 }
8160
8161 int main() {
8162
8163         /* pthread test function */
8164         pthread_t t;
8165         int status;
8166
8167         /* make sure pthread_create() isn't just a stub */
8168 #if HAVE_PTHREADS_D4
8169         status = pthread_create(&t, pthread_attr_default, task, NULL);
8170 #else
8171         status = pthread_create(&t, NULL, task, NULL);
8172 #endif
8173
8174         if( status ) exit( status );
8175
8176         /* make sure pthread_detach() isn't just a stub */
8177 #if HAVE_PTHREADS_D4
8178         status = pthread_detach( &t );
8179 #else
8180         status = pthread_detach( t );
8181 #endif
8182
8183 #ifdef HAVE_LINUX_THREADS
8184         pthread_kill_other_threads_np();
8185 #endif
8186
8187         exit( status );
8188
8189 ; return 0; }
8190 EOF
8191 if { (eval echo configure:8192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8192   rm -rf conftest*
8193   ol_cv_pthread_threads=yes
8194 else
8195   echo "configure: failed program was:" >&5
8196   cat conftest.$ac_ext >&5
8197   rm -rf conftest*
8198   ol_cv_pthread_threads=no
8199 fi
8200 rm -f conftest*
8201 else
8202   cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* pthread test headers */
8206 #include <pthread.h>
8207 #ifndef NULL
8208 #define NULL (void*)0
8209 #endif
8210
8211 static void *task(p)
8212         void *p;
8213 {
8214         return (void *) (p == NULL);
8215 }
8216
8217
8218 int main(argc, argv)
8219         int argc;
8220         char **argv;
8221 {
8222
8223         /* pthread test function */
8224         pthread_t t;
8225         int status;
8226
8227         /* make sure pthread_create() isn't just a stub */
8228 #if HAVE_PTHREADS_D4
8229         status = pthread_create(&t, pthread_attr_default, task, NULL);
8230 #else
8231         status = pthread_create(&t, NULL, task, NULL);
8232 #endif
8233
8234         if( status ) exit( status );
8235
8236         /* make sure pthread_detach() isn't just a stub */
8237 #if HAVE_PTHREADS_D4
8238         status = pthread_detach( &t );
8239 #else
8240         status = pthread_detach( t );
8241 #endif
8242
8243 #ifdef HAVE_LINUX_THREADS
8244         pthread_kill_other_threads_np();
8245 #endif
8246
8247         exit( status );
8248
8249 }
8250
8251 EOF
8252 if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8253 then
8254   ol_cv_pthread_threads=yes
8255 else
8256   echo "configure: failed program was:" >&5
8257   cat conftest.$ac_ext >&5
8258   rm -fr conftest*
8259   ol_cv_pthread_threads=no
8260 fi
8261 rm -fr conftest*
8262 fi
8263
8264
8265                 # restore the LIBS
8266                 LIBS="$ol_LIBS"
8267         
8268 fi
8269
8270 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8271
8272         if test $ol_cv_pthread_threads = yes ; then
8273                 ol_link_pthreads="-threads"
8274                 ol_link_threads=posix
8275         fi
8276 fi
8277
8278
8279                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8280 if test "$ol_link_threads" = no ; then
8281         # try -lpthreads -lmach -lexc -lc_r
8282         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8283 echo "configure:8284: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8284 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8285   echo $ac_n "(cached) $ac_c" 1>&6
8286 else
8287   
8288                 # save the flags
8289                 ol_LIBS="$LIBS"
8290                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8291
8292                 if test "$cross_compiling" = yes; then
8293   cat > conftest.$ac_ext <<EOF
8294 #line 8295 "configure"
8295 #include "confdefs.h"
8296 /* pthread test headers */
8297 #include <pthread.h>
8298 #ifndef NULL
8299 #define NULL (void*)0
8300 #endif
8301
8302 static void *task(p)
8303         void *p;
8304 {
8305         return (void *) (p == NULL);
8306 }
8307
8308 int main() {
8309
8310         /* pthread test function */
8311         pthread_t t;
8312         int status;
8313
8314         /* make sure pthread_create() isn't just a stub */
8315 #if HAVE_PTHREADS_D4
8316         status = pthread_create(&t, pthread_attr_default, task, NULL);
8317 #else
8318         status = pthread_create(&t, NULL, task, NULL);
8319 #endif
8320
8321         if( status ) exit( status );
8322
8323         /* make sure pthread_detach() isn't just a stub */
8324 #if HAVE_PTHREADS_D4
8325         status = pthread_detach( &t );
8326 #else
8327         status = pthread_detach( t );
8328 #endif
8329
8330 #ifdef HAVE_LINUX_THREADS
8331         pthread_kill_other_threads_np();
8332 #endif
8333
8334         exit( status );
8335
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8339   rm -rf conftest*
8340   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8346 fi
8347 rm -f conftest*
8348 else
8349   cat > conftest.$ac_ext <<EOF
8350 #line 8351 "configure"
8351 #include "confdefs.h"
8352 /* pthread test headers */
8353 #include <pthread.h>
8354 #ifndef NULL
8355 #define NULL (void*)0
8356 #endif
8357
8358 static void *task(p)
8359         void *p;
8360 {
8361         return (void *) (p == NULL);
8362 }
8363
8364
8365 int main(argc, argv)
8366         int argc;
8367         char **argv;
8368 {
8369
8370         /* pthread test function */
8371         pthread_t t;
8372         int status;
8373
8374         /* make sure pthread_create() isn't just a stub */
8375 #if HAVE_PTHREADS_D4
8376         status = pthread_create(&t, pthread_attr_default, task, NULL);
8377 #else
8378         status = pthread_create(&t, NULL, task, NULL);
8379 #endif
8380
8381         if( status ) exit( status );
8382
8383         /* make sure pthread_detach() isn't just a stub */
8384 #if HAVE_PTHREADS_D4
8385         status = pthread_detach( &t );
8386 #else
8387         status = pthread_detach( t );
8388 #endif
8389
8390 #ifdef HAVE_LINUX_THREADS
8391         pthread_kill_other_threads_np();
8392 #endif
8393
8394         exit( status );
8395
8396 }
8397
8398 EOF
8399 if { (eval echo configure:8400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8400 then
8401   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8402 else
8403   echo "configure: failed program was:" >&5
8404   cat conftest.$ac_ext >&5
8405   rm -fr conftest*
8406   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8407 fi
8408 rm -fr conftest*
8409 fi
8410
8411
8412                 # restore the LIBS
8413                 LIBS="$ol_LIBS"
8414         
8415 fi
8416
8417 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8418
8419         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8420                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8421                 ol_link_threads=posix
8422         fi
8423 fi
8424
8425                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8426 if test "$ol_link_threads" = no ; then
8427         # try -lpthreads -lmach -lexc
8428         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8429 echo "configure:8430: checking for pthread link with -lpthreads -lmach -lexc" >&5
8430 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8431   echo $ac_n "(cached) $ac_c" 1>&6
8432 else
8433   
8434                 # save the flags
8435                 ol_LIBS="$LIBS"
8436                 LIBS="-lpthreads -lmach -lexc $LIBS"
8437
8438                 if test "$cross_compiling" = yes; then
8439   cat > conftest.$ac_ext <<EOF
8440 #line 8441 "configure"
8441 #include "confdefs.h"
8442 /* pthread test headers */
8443 #include <pthread.h>
8444 #ifndef NULL
8445 #define NULL (void*)0
8446 #endif
8447
8448 static void *task(p)
8449         void *p;
8450 {
8451         return (void *) (p == NULL);
8452 }
8453
8454 int main() {
8455
8456         /* pthread test function */
8457         pthread_t t;
8458         int status;
8459
8460         /* make sure pthread_create() isn't just a stub */
8461 #if HAVE_PTHREADS_D4
8462         status = pthread_create(&t, pthread_attr_default, task, NULL);
8463 #else
8464         status = pthread_create(&t, NULL, task, NULL);
8465 #endif
8466
8467         if( status ) exit( status );
8468
8469         /* make sure pthread_detach() isn't just a stub */
8470 #if HAVE_PTHREADS_D4
8471         status = pthread_detach( &t );
8472 #else
8473         status = pthread_detach( t );
8474 #endif
8475
8476 #ifdef HAVE_LINUX_THREADS
8477         pthread_kill_other_threads_np();
8478 #endif
8479
8480         exit( status );
8481
8482 ; return 0; }
8483 EOF
8484 if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8485   rm -rf conftest*
8486   ol_cv_pthread_lpthreads_lmach_lexc=yes
8487 else
8488   echo "configure: failed program was:" >&5
8489   cat conftest.$ac_ext >&5
8490   rm -rf conftest*
8491   ol_cv_pthread_lpthreads_lmach_lexc=no
8492 fi
8493 rm -f conftest*
8494 else
8495   cat > conftest.$ac_ext <<EOF
8496 #line 8497 "configure"
8497 #include "confdefs.h"
8498 /* pthread test headers */
8499 #include <pthread.h>
8500 #ifndef NULL
8501 #define NULL (void*)0
8502 #endif
8503
8504 static void *task(p)
8505         void *p;
8506 {
8507         return (void *) (p == NULL);
8508 }
8509
8510
8511 int main(argc, argv)
8512         int argc;
8513         char **argv;
8514 {
8515
8516         /* pthread test function */
8517         pthread_t t;
8518         int status;
8519
8520         /* make sure pthread_create() isn't just a stub */
8521 #if HAVE_PTHREADS_D4
8522         status = pthread_create(&t, pthread_attr_default, task, NULL);
8523 #else
8524         status = pthread_create(&t, NULL, task, NULL);
8525 #endif
8526
8527         if( status ) exit( status );
8528
8529         /* make sure pthread_detach() isn't just a stub */
8530 #if HAVE_PTHREADS_D4
8531         status = pthread_detach( &t );
8532 #else
8533         status = pthread_detach( t );
8534 #endif
8535
8536 #ifdef HAVE_LINUX_THREADS
8537         pthread_kill_other_threads_np();
8538 #endif
8539
8540         exit( status );
8541
8542 }
8543
8544 EOF
8545 if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8546 then
8547   ol_cv_pthread_lpthreads_lmach_lexc=yes
8548 else
8549   echo "configure: failed program was:" >&5
8550   cat conftest.$ac_ext >&5
8551   rm -fr conftest*
8552   ol_cv_pthread_lpthreads_lmach_lexc=no
8553 fi
8554 rm -fr conftest*
8555 fi
8556
8557
8558                 # restore the LIBS
8559                 LIBS="$ol_LIBS"
8560         
8561 fi
8562
8563 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8564
8565         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8566                 ol_link_pthreads="-lpthreads -lmach -lexc"
8567                 ol_link_threads=posix
8568         fi
8569 fi
8570
8571                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8572 if test "$ol_link_threads" = no ; then
8573         # try -lpthreads -lexc
8574         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8575 echo "configure:8576: checking for pthread link with -lpthreads -lexc" >&5
8576 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8577   echo $ac_n "(cached) $ac_c" 1>&6
8578 else
8579   
8580                 # save the flags
8581                 ol_LIBS="$LIBS"
8582                 LIBS="-lpthreads -lexc $LIBS"
8583
8584                 if test "$cross_compiling" = yes; then
8585   cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 /* pthread test headers */
8589 #include <pthread.h>
8590 #ifndef NULL
8591 #define NULL (void*)0
8592 #endif
8593
8594 static void *task(p)
8595         void *p;
8596 {
8597         return (void *) (p == NULL);
8598 }
8599
8600 int main() {
8601
8602         /* pthread test function */
8603         pthread_t t;
8604         int status;
8605
8606         /* make sure pthread_create() isn't just a stub */
8607 #if HAVE_PTHREADS_D4
8608         status = pthread_create(&t, pthread_attr_default, task, NULL);
8609 #else
8610         status = pthread_create(&t, NULL, task, NULL);
8611 #endif
8612
8613         if( status ) exit( status );
8614
8615         /* make sure pthread_detach() isn't just a stub */
8616 #if HAVE_PTHREADS_D4
8617         status = pthread_detach( &t );
8618 #else
8619         status = pthread_detach( t );
8620 #endif
8621
8622 #ifdef HAVE_LINUX_THREADS
8623         pthread_kill_other_threads_np();
8624 #endif
8625
8626         exit( status );
8627
8628 ; return 0; }
8629 EOF
8630 if { (eval echo configure:8631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8631   rm -rf conftest*
8632   ol_cv_pthread_lpthreads_lexc=yes
8633 else
8634   echo "configure: failed program was:" >&5
8635   cat conftest.$ac_ext >&5
8636   rm -rf conftest*
8637   ol_cv_pthread_lpthreads_lexc=no
8638 fi
8639 rm -f conftest*
8640 else
8641   cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 /* pthread test headers */
8645 #include <pthread.h>
8646 #ifndef NULL
8647 #define NULL (void*)0
8648 #endif
8649
8650 static void *task(p)
8651         void *p;
8652 {
8653         return (void *) (p == NULL);
8654 }
8655
8656
8657 int main(argc, argv)
8658         int argc;
8659         char **argv;
8660 {
8661
8662         /* pthread test function */
8663         pthread_t t;
8664         int status;
8665
8666         /* make sure pthread_create() isn't just a stub */
8667 #if HAVE_PTHREADS_D4
8668         status = pthread_create(&t, pthread_attr_default, task, NULL);
8669 #else
8670         status = pthread_create(&t, NULL, task, NULL);
8671 #endif
8672
8673         if( status ) exit( status );
8674
8675         /* make sure pthread_detach() isn't just a stub */
8676 #if HAVE_PTHREADS_D4
8677         status = pthread_detach( &t );
8678 #else
8679         status = pthread_detach( t );
8680 #endif
8681
8682 #ifdef HAVE_LINUX_THREADS
8683         pthread_kill_other_threads_np();
8684 #endif
8685
8686         exit( status );
8687
8688 }
8689
8690 EOF
8691 if { (eval echo configure:8692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8692 then
8693   ol_cv_pthread_lpthreads_lexc=yes
8694 else
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -fr conftest*
8698   ol_cv_pthread_lpthreads_lexc=no
8699 fi
8700 rm -fr conftest*
8701 fi
8702
8703
8704                 # restore the LIBS
8705                 LIBS="$ol_LIBS"
8706         
8707 fi
8708
8709 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8710
8711         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8712                 ol_link_pthreads="-lpthreads -lexc"
8713                 ol_link_threads=posix
8714         fi
8715 fi
8716
8717
8718                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8719 if test "$ol_link_threads" = no ; then
8720         # try -lpthreads
8721         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8722 echo "configure:8723: checking for pthread link with -lpthreads" >&5
8723 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8724   echo $ac_n "(cached) $ac_c" 1>&6
8725 else
8726   
8727                 # save the flags
8728                 ol_LIBS="$LIBS"
8729                 LIBS="-lpthreads $LIBS"
8730
8731                 if test "$cross_compiling" = yes; then
8732   cat > conftest.$ac_ext <<EOF
8733 #line 8734 "configure"
8734 #include "confdefs.h"
8735 /* pthread test headers */
8736 #include <pthread.h>
8737 #ifndef NULL
8738 #define NULL (void*)0
8739 #endif
8740
8741 static void *task(p)
8742         void *p;
8743 {
8744         return (void *) (p == NULL);
8745 }
8746
8747 int main() {
8748
8749         /* pthread test function */
8750         pthread_t t;
8751         int status;
8752
8753         /* make sure pthread_create() isn't just a stub */
8754 #if HAVE_PTHREADS_D4
8755         status = pthread_create(&t, pthread_attr_default, task, NULL);
8756 #else
8757         status = pthread_create(&t, NULL, task, NULL);
8758 #endif
8759
8760         if( status ) exit( status );
8761
8762         /* make sure pthread_detach() isn't just a stub */
8763 #if HAVE_PTHREADS_D4
8764         status = pthread_detach( &t );
8765 #else
8766         status = pthread_detach( t );
8767 #endif
8768
8769 #ifdef HAVE_LINUX_THREADS
8770         pthread_kill_other_threads_np();
8771 #endif
8772
8773         exit( status );
8774
8775 ; return 0; }
8776 EOF
8777 if { (eval echo configure:8778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8778   rm -rf conftest*
8779   ol_cv_pthread_lib_lpthreads=yes
8780 else
8781   echo "configure: failed program was:" >&5
8782   cat conftest.$ac_ext >&5
8783   rm -rf conftest*
8784   ol_cv_pthread_lib_lpthreads=no
8785 fi
8786 rm -f conftest*
8787 else
8788   cat > conftest.$ac_ext <<EOF
8789 #line 8790 "configure"
8790 #include "confdefs.h"
8791 /* pthread test headers */
8792 #include <pthread.h>
8793 #ifndef NULL
8794 #define NULL (void*)0
8795 #endif
8796
8797 static void *task(p)
8798         void *p;
8799 {
8800         return (void *) (p == NULL);
8801 }
8802
8803
8804 int main(argc, argv)
8805         int argc;
8806         char **argv;
8807 {
8808
8809         /* pthread test function */
8810         pthread_t t;
8811         int status;
8812
8813         /* make sure pthread_create() isn't just a stub */
8814 #if HAVE_PTHREADS_D4
8815         status = pthread_create(&t, pthread_attr_default, task, NULL);
8816 #else
8817         status = pthread_create(&t, NULL, task, NULL);
8818 #endif
8819
8820         if( status ) exit( status );
8821
8822         /* make sure pthread_detach() isn't just a stub */
8823 #if HAVE_PTHREADS_D4
8824         status = pthread_detach( &t );
8825 #else
8826         status = pthread_detach( t );
8827 #endif
8828
8829 #ifdef HAVE_LINUX_THREADS
8830         pthread_kill_other_threads_np();
8831 #endif
8832
8833         exit( status );
8834
8835 }
8836
8837 EOF
8838 if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8839 then
8840   ol_cv_pthread_lib_lpthreads=yes
8841 else
8842   echo "configure: failed program was:" >&5
8843   cat conftest.$ac_ext >&5
8844   rm -fr conftest*
8845   ol_cv_pthread_lib_lpthreads=no
8846 fi
8847 rm -fr conftest*
8848 fi
8849
8850
8851                 # restore the LIBS
8852                 LIBS="$ol_LIBS"
8853         
8854 fi
8855
8856 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8857
8858         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8859                 ol_link_pthreads="-lpthreads"
8860                 ol_link_threads=posix
8861         fi
8862 fi
8863
8864
8865                 if test $ol_link_threads != no ; then
8866                         cat >> confdefs.h <<\EOF
8867 #define HAVE_PTHREADS 1
8868 EOF
8869
8870
8871                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8872
8873                                                 save_CPPFLAGS="$CPPFLAGS"
8874                         save_LIBS="$LIBS"
8875                         LIBS="$LTHREAD_LIBS $LIBS"
8876
8877                                                                                                 for ac_func in sched_yield pthread_yield
8878 do
8879 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8880 echo "configure:8881: checking for $ac_func" >&5
8881 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8882   echo $ac_n "(cached) $ac_c" 1>&6
8883 else
8884   cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887 /* System header to define __stub macros and hopefully few prototypes,
8888     which can conflict with char $ac_func(); below.  */
8889 #include <assert.h>
8890 /* Override any gcc2 internal prototype to avoid an error.  */
8891 /* We use char because int might match the return type of a gcc2
8892     builtin and then its argument prototype would still apply.  */
8893 char $ac_func();
8894 char (*f)();
8895
8896 int main() {
8897
8898 /* The GNU C library defines this for functions which it implements
8899     to always fail with ENOSYS.  Some functions are actually named
8900     something starting with __ and the normal name is an alias.  */
8901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8902 choke me
8903 #else
8904 f = $ac_func;
8905 #endif
8906
8907 ; return 0; }
8908 EOF
8909 if { (eval echo configure:8910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8910   rm -rf conftest*
8911   eval "ac_cv_func_$ac_func=yes"
8912 else
8913   echo "configure: failed program was:" >&5
8914   cat conftest.$ac_ext >&5
8915   rm -rf conftest*
8916   eval "ac_cv_func_$ac_func=no"
8917 fi
8918 rm -f conftest*
8919 fi
8920
8921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8922   echo "$ac_t""yes" 1>&6
8923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8924   cat >> confdefs.h <<EOF
8925 #define $ac_tr_func 1
8926 EOF
8927  
8928 else
8929   echo "$ac_t""no" 1>&6
8930 fi
8931 done
8932
8933
8934                         if test $ac_cv_func_sched_yield = no -a \
8935                                 $ac_cv_func_pthread_yield = no ; then
8936                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8937 echo "configure:8938: checking for sched_yield in -lrt" >&5
8938 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8940   echo $ac_n "(cached) $ac_c" 1>&6
8941 else
8942   ac_save_LIBS="$LIBS"
8943 LIBS="-lrt  $LIBS"
8944 cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947 /* Override any gcc2 internal prototype to avoid an error.  */
8948 /* We use char because int might match the return type of a gcc2
8949     builtin and then its argument prototype would still apply.  */
8950 char sched_yield();
8951
8952 int main() {
8953 sched_yield()
8954 ; return 0; }
8955 EOF
8956 if { (eval echo configure:8957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8957   rm -rf conftest*
8958   eval "ac_cv_lib_$ac_lib_var=yes"
8959 else
8960   echo "configure: failed program was:" >&5
8961   cat conftest.$ac_ext >&5
8962   rm -rf conftest*
8963   eval "ac_cv_lib_$ac_lib_var=no"
8964 fi
8965 rm -f conftest*
8966 LIBS="$ac_save_LIBS"
8967
8968 fi
8969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8970   echo "$ac_t""yes" 1>&6
8971   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8972                                         cat >> confdefs.h <<\EOF
8973 #define HAVE_SCHED_YIELD 1
8974 EOF
8975
8976                                         ac_cv_func_sched_yield=yes
8977 else
8978   echo "$ac_t""no" 1>&6
8979 ac_cv_func_sched_yield=no
8980 fi
8981
8982                         fi
8983                         if test $ac_cv_func_sched_yield = no -a \
8984                                 $ac_cv_func_pthread_yield = no ; then
8985                                                                                                 for ac_func in thr_yield
8986 do
8987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8988 echo "configure:8989: checking for $ac_func" >&5
8989 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8990   echo $ac_n "(cached) $ac_c" 1>&6
8991 else
8992   cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995 /* System header to define __stub macros and hopefully few prototypes,
8996     which can conflict with char $ac_func(); below.  */
8997 #include <assert.h>
8998 /* Override any gcc2 internal prototype to avoid an error.  */
8999 /* We use char because int might match the return type of a gcc2
9000     builtin and then its argument prototype would still apply.  */
9001 char $ac_func();
9002 char (*f)();
9003
9004 int main() {
9005
9006 /* The GNU C library defines this for functions which it implements
9007     to always fail with ENOSYS.  Some functions are actually named
9008     something starting with __ and the normal name is an alias.  */
9009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9010 choke me
9011 #else
9012 f = $ac_func;
9013 #endif
9014
9015 ; return 0; }
9016 EOF
9017 if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9018   rm -rf conftest*
9019   eval "ac_cv_func_$ac_func=yes"
9020 else
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   eval "ac_cv_func_$ac_func=no"
9025 fi
9026 rm -f conftest*
9027 fi
9028
9029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9030   echo "$ac_t""yes" 1>&6
9031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9032   cat >> confdefs.h <<EOF
9033 #define $ac_tr_func 1
9034 EOF
9035  
9036 else
9037   echo "$ac_t""no" 1>&6
9038 fi
9039 done
9040
9041                         fi
9042                         if test $ac_cv_func_sched_yield = no -a \
9043                                 $ac_cv_func_pthread_yield = no -a \
9044                                 "$ac_cv_func_thr_yield" = no ; then
9045                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9046                         fi
9047
9048                                                 for ac_func in pthread_kill
9049 do
9050 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9051 echo "configure:9052: checking for $ac_func" >&5
9052 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9053   echo $ac_n "(cached) $ac_c" 1>&6
9054 else
9055   cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9058 /* System header to define __stub macros and hopefully few prototypes,
9059     which can conflict with char $ac_func(); below.  */
9060 #include <assert.h>
9061 /* Override any gcc2 internal prototype to avoid an error.  */
9062 /* We use char because int might match the return type of a gcc2
9063     builtin and then its argument prototype would still apply.  */
9064 char $ac_func();
9065 char (*f)();
9066
9067 int main() {
9068
9069 /* The GNU C library defines this for functions which it implements
9070     to always fail with ENOSYS.  Some functions are actually named
9071     something starting with __ and the normal name is an alias.  */
9072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9073 choke me
9074 #else
9075 f = $ac_func;
9076 #endif
9077
9078 ; return 0; }
9079 EOF
9080 if { (eval echo configure:9081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9081   rm -rf conftest*
9082   eval "ac_cv_func_$ac_func=yes"
9083 else
9084   echo "configure: failed program was:" >&5
9085   cat conftest.$ac_ext >&5
9086   rm -rf conftest*
9087   eval "ac_cv_func_$ac_func=no"
9088 fi
9089 rm -f conftest*
9090 fi
9091
9092 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9093   echo "$ac_t""yes" 1>&6
9094     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9095   cat >> confdefs.h <<EOF
9096 #define $ac_tr_func 1
9097 EOF
9098  
9099 else
9100   echo "$ac_t""no" 1>&6
9101 fi
9102 done
9103
9104
9105                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9106 echo "configure:9107: checking for pthread_detach with <pthread.h>" >&5
9107 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9108   echo $ac_n "(cached) $ac_c" 1>&6
9109 else
9110   
9111                                                                 cat > conftest.$ac_ext <<EOF
9112 #line 9113 "configure"
9113 #include "confdefs.h"
9114
9115 #include <pthread.h>
9116 #ifndef NULL
9117 #define NULL (void*)0
9118 #endif
9119
9120 int main() {
9121 pthread_detach(NULL);
9122 ; return 0; }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9125   rm -rf conftest*
9126   ol_cv_func_pthread_detach=yes
9127 else
9128   echo "configure: failed program was:" >&5
9129   cat conftest.$ac_ext >&5
9130   rm -rf conftest*
9131   ol_cv_func_pthread_detach=no
9132 fi
9133 rm -f conftest*
9134                         
9135 fi
9136
9137 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9138
9139                         if test $ol_cv_func_pthread_detach = no ; then
9140                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9141                         fi
9142
9143                         cat >> confdefs.h <<\EOF
9144 #define HAVE_PTHREAD_DETACH 1
9145 EOF
9146
9147
9148                                                 for ac_func in \
9149                                 pthread_setconcurrency \
9150                                 pthread_getconcurrency \
9151                                 thr_setconcurrency \
9152                                 thr_getconcurrency \
9153                         
9154 do
9155 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9156 echo "configure:9157: checking for $ac_func" >&5
9157 if eval "test \"\${ac_cv_func_$ac_func+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 /* System header to define __stub macros and hopefully few prototypes,
9164     which can conflict with char $ac_func(); below.  */
9165 #include <assert.h>
9166 /* Override any gcc2 internal prototype to avoid an error.  */
9167 /* We use char because int might match the return type of a gcc2
9168     builtin and then its argument prototype would still apply.  */
9169 char $ac_func();
9170 char (*f)();
9171
9172 int main() {
9173
9174 /* The GNU C library defines this for functions which it implements
9175     to always fail with ENOSYS.  Some functions are actually named
9176     something starting with __ and the normal name is an alias.  */
9177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9178 choke me
9179 #else
9180 f = $ac_func;
9181 #endif
9182
9183 ; return 0; }
9184 EOF
9185 if { (eval echo configure:9186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9186   rm -rf conftest*
9187   eval "ac_cv_func_$ac_func=yes"
9188 else
9189   echo "configure: failed program was:" >&5
9190   cat conftest.$ac_ext >&5
9191   rm -rf conftest*
9192   eval "ac_cv_func_$ac_func=no"
9193 fi
9194 rm -f conftest*
9195 fi
9196
9197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9198   echo "$ac_t""yes" 1>&6
9199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9200   cat >> confdefs.h <<EOF
9201 #define $ac_tr_func 1
9202 EOF
9203  
9204 else
9205   echo "$ac_t""no" 1>&6
9206 fi
9207 done
9208
9209
9210                         
9211         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9212 echo "configure:9213: checking for pthread_kill_other_threads_np" >&5
9213 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   cat > conftest.$ac_ext <<EOF
9217 #line 9218 "configure"
9218 #include "confdefs.h"
9219 /* System header to define __stub macros and hopefully few prototypes,
9220     which can conflict with char pthread_kill_other_threads_np(); below.  */
9221 #include <assert.h>
9222 /* Override any gcc2 internal prototype to avoid an error.  */
9223 /* We use char because int might match the return type of a gcc2
9224     builtin and then its argument prototype would still apply.  */
9225 char pthread_kill_other_threads_np();
9226 char (*f)();
9227
9228 int main() {
9229
9230 /* The GNU C library defines this for functions which it implements
9231     to always fail with ENOSYS.  Some functions are actually named
9232     something starting with __ and the normal name is an alias.  */
9233 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9234 choke me
9235 #else
9236 f = pthread_kill_other_threads_np;
9237 #endif
9238
9239 ; return 0; }
9240 EOF
9241 if { (eval echo configure:9242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9242   rm -rf conftest*
9243   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9244 else
9245   echo "configure: failed program was:" >&5
9246   cat conftest.$ac_ext >&5
9247   rm -rf conftest*
9248   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9249 fi
9250 rm -f conftest*
9251 fi
9252
9253 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9254   echo "$ac_t""yes" 1>&6
9255   :
9256 else
9257   echo "$ac_t""no" 1>&6
9258 fi
9259
9260         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9261 echo "configure:9262: checking for LinuxThreads implementation" >&5
9262 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9263   echo $ac_n "(cached) $ac_c" 1>&6
9264 else
9265   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9266 fi
9267
9268 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9269
9270                         
9271         
9272         
9273         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9274 echo "configure:9275: checking for LinuxThreads consistency" >&5
9275 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9276   echo $ac_n "(cached) $ac_c" 1>&6
9277 else
9278   
9279                 if test $ol_cv_header_linux_threads = yes -a \
9280                         $ol_cv_sys_linux_threads = yes; then
9281                         ol_cv_linux_threads=yes
9282                 elif test $ol_cv_header_linux_threads = no -a \
9283                         $ol_cv_sys_linux_threads = no; then
9284                         ol_cv_linux_threads=no
9285                 else
9286                         ol_cv_linux_threads=error
9287                 fi
9288         
9289 fi
9290
9291 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9292
9293
9294                         if test $ol_cv_linux_threads = error; then
9295                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9296                         fi
9297
9298                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9299 echo "configure:9300: checking if pthread_create() works" >&5
9300 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9301   echo $ac_n "(cached) $ac_c" 1>&6
9302 else
9303   
9304                         if test "$cross_compiling" = yes; then
9305                                 ol_cv_pthread_create_works=yes
9306 else
9307   cat > conftest.$ac_ext <<EOF
9308 #line 9309 "configure"
9309 #include "confdefs.h"
9310 /* pthread test headers */
9311 #include <pthread.h>
9312 #ifndef NULL
9313 #define NULL (void*)0
9314 #endif
9315
9316 static void *task(p)
9317         void *p;
9318 {
9319         return (void *) (p == NULL);
9320 }
9321
9322
9323 int main(argc, argv)
9324         int argc;
9325         char **argv;
9326 {
9327
9328         /* pthread test function */
9329         pthread_t t;
9330         int status;
9331
9332         /* make sure pthread_create() isn't just a stub */
9333 #if HAVE_PTHREADS_D4
9334         status = pthread_create(&t, pthread_attr_default, task, NULL);
9335 #else
9336         status = pthread_create(&t, NULL, task, NULL);
9337 #endif
9338
9339         if( status ) exit( status );
9340
9341         /* make sure pthread_detach() isn't just a stub */
9342 #if HAVE_PTHREADS_D4
9343         status = pthread_detach( &t );
9344 #else
9345         status = pthread_detach( t );
9346 #endif
9347
9348 #ifdef HAVE_LINUX_THREADS
9349         pthread_kill_other_threads_np();
9350 #endif
9351
9352         exit( status );
9353
9354 }
9355
9356 EOF
9357 if { (eval echo configure:9358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9358 then
9359   ol_cv_pthread_create_works=yes
9360 else
9361   echo "configure: failed program was:" >&5
9362   cat conftest.$ac_ext >&5
9363   rm -fr conftest*
9364   ol_cv_pthread_create_works=no
9365 fi
9366 rm -fr conftest*
9367 fi
9368
9369 fi
9370
9371 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9372
9373                         if test $ol_cv_pthread_create_works = no ; then
9374                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9375                         fi
9376
9377                                                 if test $ol_with_yielding_select = auto ; then
9378                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9379 echo "configure:9380: checking if select yields when using pthreads" >&5
9380 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9381   echo $ac_n "(cached) $ac_c" 1>&6
9382 else
9383   
9384                                 if test "$cross_compiling" = yes; then
9385   ol_cv_pthread_select_yields=cross
9386 else
9387   cat > conftest.$ac_ext <<EOF
9388 #line 9389 "configure"
9389 #include "confdefs.h"
9390
9391 #include <sys/types.h>
9392 #include <sys/time.h>
9393 #include <unistd.h>
9394 #include <pthread.h>
9395 #ifndef NULL
9396 #define NULL (void*) 0
9397 #endif
9398
9399 static int fildes[2];
9400
9401 static void *task(p)
9402         void *p;
9403 {
9404         int i;
9405         struct timeval tv;
9406
9407         fd_set rfds;
9408
9409         tv.tv_sec=10;
9410         tv.tv_usec=0;
9411
9412         FD_ZERO(&rfds);
9413         FD_SET(fildes[0], &rfds);
9414
9415         /* we're not interested in any fds */
9416         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9417
9418         if(i < 0) {
9419                 perror("select");
9420                 exit(10);
9421         }
9422
9423         exit(0); /* if we exit here, the select blocked the whole process */
9424 }
9425
9426 int main(argc, argv)
9427         int argc;
9428         char **argv;
9429 {
9430         pthread_t t;
9431
9432         /* create a pipe to select */
9433         if(pipe(&fildes[0])) {
9434                 perror("select");
9435                 exit(1);
9436         }
9437
9438 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9439         (void) pthread_setconcurrency(2);
9440 #else
9441 #ifdef HAVE_THR_SETCONCURRENCY
9442         /* Set Solaris LWP concurrency to 2 */
9443         thr_setconcurrency(2);
9444 #endif
9445 #endif
9446
9447 #if HAVE_PTHREADS_D4
9448         pthread_create(&t, pthread_attr_default, task, NULL);
9449 #else
9450         pthread_create(&t, NULL, task, NULL);
9451 #endif
9452
9453 #if HAVE_SCHED_YIELD
9454         sched_yield();  /* make sure task runs first */
9455 #else
9456 #ifdef HAVE_PTHREAD_YIELD
9457         pthread_yield();        /* make sure task runs first */
9458 #endif
9459 #endif
9460
9461         exit(2);
9462 }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9465 then
9466   ol_cv_pthread_select_yields=no
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -fr conftest*
9471   ol_cv_pthread_select_yields=yes
9472 fi
9473 rm -fr conftest*
9474 fi
9475
9476 fi
9477
9478 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9479
9480                                 if test $ol_cv_pthread_select_yields = cross ; then
9481                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9482                                 fi
9483
9484                                 if test $ol_cv_pthread_select_yields = yes ; then
9485                                         ol_with_yielding_select=yes
9486                                 fi
9487                         fi
9488
9489                                                 CPPFLAGS="$save_CPPFLAGS"
9490                         LIBS="$save_LIBS"
9491                 else
9492                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9493                 fi
9494         fi
9495
9496         if test $ol_with_threads = posix ; then
9497                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9498         fi
9499 fi
9500
9501 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9502         -o $ol_with_threads = mach ; then
9503
9504                 for ac_hdr in mach/cthreads.h
9505 do
9506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9508 echo "configure:9509: checking for $ac_hdr" >&5
9509 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9510   echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512   cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515 #include <$ac_hdr>
9516 EOF
9517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9518 { (eval echo configure:9519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9520 if test -z "$ac_err"; then
9521   rm -rf conftest*
9522   eval "ac_cv_header_$ac_safe=yes"
9523 else
9524   echo "$ac_err" >&5
9525   echo "configure: failed program was:" >&5
9526   cat conftest.$ac_ext >&5
9527   rm -rf conftest*
9528   eval "ac_cv_header_$ac_safe=no"
9529 fi
9530 rm -f conftest*
9531 fi
9532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9533   echo "$ac_t""yes" 1>&6
9534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9535   cat >> confdefs.h <<EOF
9536 #define $ac_tr_hdr 1
9537 EOF
9538  
9539 else
9540   echo "$ac_t""no" 1>&6
9541 fi
9542 done
9543
9544         if test $ac_cv_header_mach_cthreads_h = yes ; then
9545                 ol_with_threads=found
9546
9547                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9548 echo "configure:9549: checking for cthread_fork" >&5
9549 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9550   echo $ac_n "(cached) $ac_c" 1>&6
9551 else
9552   cat > conftest.$ac_ext <<EOF
9553 #line 9554 "configure"
9554 #include "confdefs.h"
9555 /* System header to define __stub macros and hopefully few prototypes,
9556     which can conflict with char cthread_fork(); below.  */
9557 #include <assert.h>
9558 /* Override any gcc2 internal prototype to avoid an error.  */
9559 /* We use char because int might match the return type of a gcc2
9560     builtin and then its argument prototype would still apply.  */
9561 char cthread_fork();
9562 char (*f)();
9563
9564 int main() {
9565
9566 /* The GNU C library defines this for functions which it implements
9567     to always fail with ENOSYS.  Some functions are actually named
9568     something starting with __ and the normal name is an alias.  */
9569 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9570 choke me
9571 #else
9572 f = cthread_fork;
9573 #endif
9574
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578   rm -rf conftest*
9579   eval "ac_cv_func_cthread_fork=yes"
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   eval "ac_cv_func_cthread_fork=no"
9585 fi
9586 rm -f conftest*
9587 fi
9588
9589 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9590   echo "$ac_t""yes" 1>&6
9591   ol_link_threads=yes
9592 else
9593   echo "$ac_t""no" 1>&6
9594 fi
9595
9596
9597                 if test $ol_link_threads = no ; then
9598                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9599 echo "configure:9600: checking for cthread_fork with -all_load" >&5
9600 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9601   echo $ac_n "(cached) $ac_c" 1>&6
9602 else
9603   
9604                                                                 save_LIBS="$LIBS"
9605                                 LIBS="-all_load $LIBS"
9606                                 cat > conftest.$ac_ext <<EOF
9607 #line 9608 "configure"
9608 #include "confdefs.h"
9609 #include <mach/cthreads.h>
9610 int main() {
9611
9612                                         cthread_fork((void *)0, (void *)0);
9613                                         
9614 ; return 0; }
9615 EOF
9616 if { (eval echo configure:9617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9617   rm -rf conftest*
9618   ol_cv_cthread_all_load=yes
9619 else
9620   echo "configure: failed program was:" >&5
9621   cat conftest.$ac_ext >&5
9622   rm -rf conftest*
9623   ol_cv_cthread_all_load=no
9624 fi
9625 rm -f conftest*
9626                                                                 LIBS="$save_LIBS"
9627                         
9628 fi
9629
9630 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9631
9632                         if test $ol_cv_cthread_all_load = yes ; then
9633                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9634                                 ol_link_threads=mach
9635                         fi
9636                 fi
9637
9638                 if test $ol_link_threads != no ; then
9639                         : check for cthread specific functionality here
9640                         cat >> confdefs.h <<\EOF
9641 #define HAVE_MACH_CTHREADS 1
9642 EOF
9643
9644                 else
9645                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9646                 fi
9647         fi
9648
9649         if test $ol_with_threads = mach ; then
9650                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9651         fi
9652 fi
9653
9654 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9655         -o $ol_with_threads = pth ; then
9656
9657         for ac_hdr in pth.h
9658 do
9659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9661 echo "configure:9662: checking for $ac_hdr" >&5
9662 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9663   echo $ac_n "(cached) $ac_c" 1>&6
9664 else
9665   cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 #include <$ac_hdr>
9669 EOF
9670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9671 { (eval echo configure:9672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9673 if test -z "$ac_err"; then
9674   rm -rf conftest*
9675   eval "ac_cv_header_$ac_safe=yes"
9676 else
9677   echo "$ac_err" >&5
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   eval "ac_cv_header_$ac_safe=no"
9682 fi
9683 rm -f conftest*
9684 fi
9685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9686   echo "$ac_t""yes" 1>&6
9687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9688   cat >> confdefs.h <<EOF
9689 #define $ac_tr_hdr 1
9690 EOF
9691  
9692 else
9693   echo "$ac_t""no" 1>&6
9694 fi
9695 done
9696
9697
9698         if test $ac_cv_header_pth_h = yes ; then
9699                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9700 echo "configure:9701: checking for pth_version in -lpth" >&5
9701 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   ac_save_LIBS="$LIBS"
9706 LIBS="-lpth  $LIBS"
9707 cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710 /* Override any gcc2 internal prototype to avoid an error.  */
9711 /* We use char because int might match the return type of a gcc2
9712     builtin and then its argument prototype would still apply.  */
9713 char pth_version();
9714
9715 int main() {
9716 pth_version()
9717 ; return 0; }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9720   rm -rf conftest*
9721   eval "ac_cv_lib_$ac_lib_var=yes"
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -rf conftest*
9726   eval "ac_cv_lib_$ac_lib_var=no"
9727 fi
9728 rm -f conftest*
9729 LIBS="$ac_save_LIBS"
9730
9731 fi
9732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9733   echo "$ac_t""yes" 1>&6
9734   have_pth=yes
9735 else
9736   echo "$ac_t""no" 1>&6
9737 have_pth=no
9738 fi
9739
9740
9741                 if test $have_pth = yes ; then
9742                         cat >> confdefs.h <<\EOF
9743 #define HAVE_GNU_PTH 1
9744 EOF
9745
9746                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9747                         ol_link_threads=pth
9748
9749                         if test $ol_with_yielding_select = auto ; then
9750                                 ol_with_yielding_select=yes
9751                         fi
9752                 fi
9753         fi
9754 fi
9755
9756 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9757         -o $ol_with_threads = lwp ; then
9758
9759                 for ac_hdr in thread.h synch.h
9760 do
9761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9763 echo "configure:9764: checking for $ac_hdr" >&5
9764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9765   echo $ac_n "(cached) $ac_c" 1>&6
9766 else
9767   cat > conftest.$ac_ext <<EOF
9768 #line 9769 "configure"
9769 #include "confdefs.h"
9770 #include <$ac_hdr>
9771 EOF
9772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9773 { (eval echo configure:9774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9775 if test -z "$ac_err"; then
9776   rm -rf conftest*
9777   eval "ac_cv_header_$ac_safe=yes"
9778 else
9779   echo "$ac_err" >&5
9780   echo "configure: failed program was:" >&5
9781   cat conftest.$ac_ext >&5
9782   rm -rf conftest*
9783   eval "ac_cv_header_$ac_safe=no"
9784 fi
9785 rm -f conftest*
9786 fi
9787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9788   echo "$ac_t""yes" 1>&6
9789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9790   cat >> confdefs.h <<EOF
9791 #define $ac_tr_hdr 1
9792 EOF
9793  
9794 else
9795   echo "$ac_t""no" 1>&6
9796 fi
9797 done
9798
9799         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9800                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9801 echo "configure:9802: checking for thr_create in -lthread" >&5
9802 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9804   echo $ac_n "(cached) $ac_c" 1>&6
9805 else
9806   ac_save_LIBS="$LIBS"
9807 LIBS="-lthread  $LIBS"
9808 cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811 /* Override any gcc2 internal prototype to avoid an error.  */
9812 /* We use char because int might match the return type of a gcc2
9813     builtin and then its argument prototype would still apply.  */
9814 char thr_create();
9815
9816 int main() {
9817 thr_create()
9818 ; return 0; }
9819 EOF
9820 if { (eval echo configure:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9821   rm -rf conftest*
9822   eval "ac_cv_lib_$ac_lib_var=yes"
9823 else
9824   echo "configure: failed program was:" >&5
9825   cat conftest.$ac_ext >&5
9826   rm -rf conftest*
9827   eval "ac_cv_lib_$ac_lib_var=no"
9828 fi
9829 rm -f conftest*
9830 LIBS="$ac_save_LIBS"
9831
9832 fi
9833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9834   echo "$ac_t""yes" 1>&6
9835   have_thr=yes
9836 else
9837   echo "$ac_t""no" 1>&6
9838 have_thr=no
9839 fi
9840
9841
9842                 if test $have_thr = yes ; then
9843                         cat >> confdefs.h <<\EOF
9844 #define HAVE_THR 1
9845 EOF
9846
9847                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9848                         ol_link_threads=thr
9849
9850                         if test $ol_with_yielding_select = auto ; then
9851                                 ol_with_yielding_select=yes
9852                         fi
9853
9854                                                 for ac_func in \
9855                                 thr_setconcurrency \
9856                                 thr_getconcurrency \
9857                         
9858 do
9859 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9860 echo "configure:9861: checking for $ac_func" >&5
9861 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9862   echo $ac_n "(cached) $ac_c" 1>&6
9863 else
9864   cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 /* System header to define __stub macros and hopefully few prototypes,
9868     which can conflict with char $ac_func(); below.  */
9869 #include <assert.h>
9870 /* Override any gcc2 internal prototype to avoid an error.  */
9871 /* We use char because int might match the return type of a gcc2
9872     builtin and then its argument prototype would still apply.  */
9873 char $ac_func();
9874 char (*f)();
9875
9876 int main() {
9877
9878 /* The GNU C library defines this for functions which it implements
9879     to always fail with ENOSYS.  Some functions are actually named
9880     something starting with __ and the normal name is an alias.  */
9881 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9882 choke me
9883 #else
9884 f = $ac_func;
9885 #endif
9886
9887 ; return 0; }
9888 EOF
9889 if { (eval echo configure:9890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9890   rm -rf conftest*
9891   eval "ac_cv_func_$ac_func=yes"
9892 else
9893   echo "configure: failed program was:" >&5
9894   cat conftest.$ac_ext >&5
9895   rm -rf conftest*
9896   eval "ac_cv_func_$ac_func=no"
9897 fi
9898 rm -f conftest*
9899 fi
9900
9901 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9902   echo "$ac_t""yes" 1>&6
9903     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9904   cat >> confdefs.h <<EOF
9905 #define $ac_tr_func 1
9906 EOF
9907  
9908 else
9909   echo "$ac_t""no" 1>&6
9910 fi
9911 done
9912
9913                 fi
9914         fi
9915
9916                 for ac_hdr in lwp/lwp.h
9917 do
9918 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9919 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9920 echo "configure:9921: checking for $ac_hdr" >&5
9921 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9922   echo $ac_n "(cached) $ac_c" 1>&6
9923 else
9924   cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 #include <$ac_hdr>
9928 EOF
9929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9930 { (eval echo configure:9931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9932 if test -z "$ac_err"; then
9933   rm -rf conftest*
9934   eval "ac_cv_header_$ac_safe=yes"
9935 else
9936   echo "$ac_err" >&5
9937   echo "configure: failed program was:" >&5
9938   cat conftest.$ac_ext >&5
9939   rm -rf conftest*
9940   eval "ac_cv_header_$ac_safe=no"
9941 fi
9942 rm -f conftest*
9943 fi
9944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9945   echo "$ac_t""yes" 1>&6
9946     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9947   cat >> confdefs.h <<EOF
9948 #define $ac_tr_hdr 1
9949 EOF
9950  
9951 else
9952   echo "$ac_t""no" 1>&6
9953 fi
9954 done
9955
9956         if test $ac_cv_header_lwp_lwp_h = yes ; then
9957                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9958 echo "configure:9959: checking for lwp_create in -llwp" >&5
9959 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9961   echo $ac_n "(cached) $ac_c" 1>&6
9962 else
9963   ac_save_LIBS="$LIBS"
9964 LIBS="-llwp  $LIBS"
9965 cat > conftest.$ac_ext <<EOF
9966 #line 9967 "configure"
9967 #include "confdefs.h"
9968 /* Override any gcc2 internal prototype to avoid an error.  */
9969 /* We use char because int might match the return type of a gcc2
9970     builtin and then its argument prototype would still apply.  */
9971 char lwp_create();
9972
9973 int main() {
9974 lwp_create()
9975 ; return 0; }
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9978   rm -rf conftest*
9979   eval "ac_cv_lib_$ac_lib_var=yes"
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   eval "ac_cv_lib_$ac_lib_var=no"
9985 fi
9986 rm -f conftest*
9987 LIBS="$ac_save_LIBS"
9988
9989 fi
9990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9991   echo "$ac_t""yes" 1>&6
9992   have_lwp=yes
9993 else
9994   echo "$ac_t""no" 1>&6
9995 have_lwp=no
9996 fi
9997
9998
9999                 if test $have_lwp = yes ; then
10000                         cat >> confdefs.h <<\EOF
10001 #define HAVE_LWP 1
10002 EOF
10003
10004                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10005                         ol_link_threads=lwp
10006
10007                         if test $ol_with_yielding_select = auto ; then
10008                                 ol_with_yielding_select=no
10009                         fi
10010                 fi
10011         fi
10012 fi
10013
10014 if test $ol_with_yielding_select = yes ; then
10015         cat >> confdefs.h <<\EOF
10016 #define HAVE_YIELDING_SELECT 1
10017 EOF
10018
10019 fi
10020
10021 if test $ol_with_threads = manual ; then
10022                 ol_link_threads=yes
10023
10024         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10025
10026         for ac_hdr in pthread.h sched.h
10027 do
10028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10030 echo "configure:10031: checking for $ac_hdr" >&5
10031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10032   echo $ac_n "(cached) $ac_c" 1>&6
10033 else
10034   cat > conftest.$ac_ext <<EOF
10035 #line 10036 "configure"
10036 #include "confdefs.h"
10037 #include <$ac_hdr>
10038 EOF
10039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10040 { (eval echo configure:10041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10042 if test -z "$ac_err"; then
10043   rm -rf conftest*
10044   eval "ac_cv_header_$ac_safe=yes"
10045 else
10046   echo "$ac_err" >&5
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   eval "ac_cv_header_$ac_safe=no"
10051 fi
10052 rm -f conftest*
10053 fi
10054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10055   echo "$ac_t""yes" 1>&6
10056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10057   cat >> confdefs.h <<EOF
10058 #define $ac_tr_hdr 1
10059 EOF
10060  
10061 else
10062   echo "$ac_t""no" 1>&6
10063 fi
10064 done
10065
10066         for ac_func in sched_yield pthread_yield
10067 do
10068 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10069 echo "configure:10070: checking for $ac_func" >&5
10070 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10071   echo $ac_n "(cached) $ac_c" 1>&6
10072 else
10073   cat > conftest.$ac_ext <<EOF
10074 #line 10075 "configure"
10075 #include "confdefs.h"
10076 /* System header to define __stub macros and hopefully few prototypes,
10077     which can conflict with char $ac_func(); below.  */
10078 #include <assert.h>
10079 /* Override any gcc2 internal prototype to avoid an error.  */
10080 /* We use char because int might match the return type of a gcc2
10081     builtin and then its argument prototype would still apply.  */
10082 char $ac_func();
10083 char (*f)();
10084
10085 int main() {
10086
10087 /* The GNU C library defines this for functions which it implements
10088     to always fail with ENOSYS.  Some functions are actually named
10089     something starting with __ and the normal name is an alias.  */
10090 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10091 choke me
10092 #else
10093 f = $ac_func;
10094 #endif
10095
10096 ; return 0; }
10097 EOF
10098 if { (eval echo configure:10099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10099   rm -rf conftest*
10100   eval "ac_cv_func_$ac_func=yes"
10101 else
10102   echo "configure: failed program was:" >&5
10103   cat conftest.$ac_ext >&5
10104   rm -rf conftest*
10105   eval "ac_cv_func_$ac_func=no"
10106 fi
10107 rm -f conftest*
10108 fi
10109
10110 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10111   echo "$ac_t""yes" 1>&6
10112     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10113   cat >> confdefs.h <<EOF
10114 #define $ac_tr_func 1
10115 EOF
10116  
10117 else
10118   echo "$ac_t""no" 1>&6
10119 fi
10120 done
10121
10122         
10123         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10124 echo "configure:10125: checking for LinuxThreads pthread.h" >&5
10125 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10126   echo $ac_n "(cached) $ac_c" 1>&6
10127 else
10128   cat > conftest.$ac_ext <<EOF
10129 #line 10130 "configure"
10130 #include "confdefs.h"
10131 #include <pthread.h>
10132 EOF
10133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10134   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10135   rm -rf conftest*
10136   ol_cv_header_linux_threads=yes
10137 else
10138   rm -rf conftest*
10139   ol_cv_header_linux_threads=no
10140 fi
10141 rm -f conftest*
10142
10143                 
10144 fi
10145
10146 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10147         if test $ol_cv_header_linux_threads = yes; then
10148                 cat >> confdefs.h <<\EOF
10149 #define HAVE_LINUX_THREADS 1
10150 EOF
10151
10152         fi
10153
10154
10155         for ac_hdr in mach/cthreads.h
10156 do
10157 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10158 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10159 echo "configure:10160: checking for $ac_hdr" >&5
10160 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10161   echo $ac_n "(cached) $ac_c" 1>&6
10162 else
10163   cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166 #include <$ac_hdr>
10167 EOF
10168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10169 { (eval echo configure:10170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10171 if test -z "$ac_err"; then
10172   rm -rf conftest*
10173   eval "ac_cv_header_$ac_safe=yes"
10174 else
10175   echo "$ac_err" >&5
10176   echo "configure: failed program was:" >&5
10177   cat conftest.$ac_ext >&5
10178   rm -rf conftest*
10179   eval "ac_cv_header_$ac_safe=no"
10180 fi
10181 rm -f conftest*
10182 fi
10183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10184   echo "$ac_t""yes" 1>&6
10185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10186   cat >> confdefs.h <<EOF
10187 #define $ac_tr_hdr 1
10188 EOF
10189  
10190 else
10191   echo "$ac_t""no" 1>&6
10192 fi
10193 done
10194
10195         for ac_hdr in lwp/lwp.h
10196 do
10197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10199 echo "configure:10200: checking for $ac_hdr" >&5
10200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10201   echo $ac_n "(cached) $ac_c" 1>&6
10202 else
10203   cat > conftest.$ac_ext <<EOF
10204 #line 10205 "configure"
10205 #include "confdefs.h"
10206 #include <$ac_hdr>
10207 EOF
10208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10209 { (eval echo configure:10210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10211 if test -z "$ac_err"; then
10212   rm -rf conftest*
10213   eval "ac_cv_header_$ac_safe=yes"
10214 else
10215   echo "$ac_err" >&5
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -rf conftest*
10219   eval "ac_cv_header_$ac_safe=no"
10220 fi
10221 rm -f conftest*
10222 fi
10223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10224   echo "$ac_t""yes" 1>&6
10225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10226   cat >> confdefs.h <<EOF
10227 #define $ac_tr_hdr 1
10228 EOF
10229  
10230 else
10231   echo "$ac_t""no" 1>&6
10232 fi
10233 done
10234
10235         for ac_hdr in thread.h synch.h
10236 do
10237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10239 echo "configure:10240: checking for $ac_hdr" >&5
10240 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   cat > conftest.$ac_ext <<EOF
10244 #line 10245 "configure"
10245 #include "confdefs.h"
10246 #include <$ac_hdr>
10247 EOF
10248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10249 { (eval echo configure:10250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10251 if test -z "$ac_err"; then
10252   rm -rf conftest*
10253   eval "ac_cv_header_$ac_safe=yes"
10254 else
10255   echo "$ac_err" >&5
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_header_$ac_safe=no"
10260 fi
10261 rm -f conftest*
10262 fi
10263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10264   echo "$ac_t""yes" 1>&6
10265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10266   cat >> confdefs.h <<EOF
10267 #define $ac_tr_hdr 1
10268 EOF
10269  
10270 else
10271   echo "$ac_t""no" 1>&6
10272 fi
10273 done
10274
10275 fi
10276
10277 if test $ol_link_threads != no ; then  
10278                         cat >> confdefs.h <<\EOF
10279 #define REENTRANT 1
10280 EOF
10281
10282         cat >> confdefs.h <<\EOF
10283 #define _REENTRANT 1
10284 EOF
10285
10286         cat >> confdefs.h <<\EOF
10287 #define THREAD_SAFE 1
10288 EOF
10289
10290         cat >> confdefs.h <<\EOF
10291 #define _THREAD_SAFE 1
10292 EOF
10293
10294         cat >> confdefs.h <<\EOF
10295 #define THREADSAFE 1
10296 EOF
10297
10298         cat >> confdefs.h <<\EOF
10299 #define _THREADSAFE 1
10300 EOF
10301
10302         cat >> confdefs.h <<\EOF
10303 #define _SGI_MP_SOURCE 1
10304 EOF
10305
10306
10307                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10308 echo "configure:10309: checking for thread specific errno" >&5
10309 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10310   echo $ac_n "(cached) $ac_c" 1>&6
10311 else
10312   
10313                 cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316 #include <errno.h>
10317 int main() {
10318 errno = 0;
10319 ; return 0; }
10320 EOF
10321 if { (eval echo configure:10322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10322   rm -rf conftest*
10323   ol_cv_errno_thread_specific=yes
10324 else
10325   echo "configure: failed program was:" >&5
10326   cat conftest.$ac_ext >&5
10327   rm -rf conftest*
10328   ol_cv_errno_thread_specific=no
10329 fi
10330 rm -f conftest*
10331         
10332 fi
10333
10334 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10335
10336                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10337 echo "configure:10338: checking for thread specific h_errno" >&5
10338 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10339   echo $ac_n "(cached) $ac_c" 1>&6
10340 else
10341   
10342                 cat > conftest.$ac_ext <<EOF
10343 #line 10344 "configure"
10344 #include "confdefs.h"
10345 #include <netdb.h>
10346 int main() {
10347 h_errno = 0;
10348 ; return 0; }
10349 EOF
10350 if { (eval echo configure:10351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10351   rm -rf conftest*
10352   ol_cv_h_errno_thread_specific=yes
10353 else
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -rf conftest*
10357   ol_cv_h_errno_thread_specific=no
10358 fi
10359 rm -f conftest*
10360         
10361 fi
10362
10363 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10364
10365         if test $ol_cv_errno_thread_specific != yes \
10366                 -o $ol_cv_h_errno_thread_specific != yes ; then
10367                 LIBS="$LTHREAD_LIBS $LIBS"
10368                 LTHREAD_LIBS=""
10369         fi
10370
10371 fi  
10372
10373 if test $ol_link_threads = no ; then
10374         if test $ol_with_threads = yes ; then
10375                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10376         fi
10377
10378         if test $ol_with_threads = auto ; then
10379                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10380                 ol_with_threads=no
10381         fi
10382
10383         cat >> confdefs.h <<\EOF
10384 #define NO_THREADS 1
10385 EOF
10386
10387         LTHREAD_LIBS=""
10388 fi
10389
10390 if test $ol_link_threads != no ; then
10391         cat >> confdefs.h <<\EOF
10392 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10393 EOF
10394
10395 fi
10396
10397
10398 ol_link_ldbm=no 
10399 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10400         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10401 echo "configure:10402: checking for DB2 library" >&5
10402 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405         ol_LIBS="$LIBS"
10406         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10407 echo "configure:10408: checking for db_appexit in -ldb" >&5
10408 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   ac_save_LIBS="$LIBS"
10413 LIBS="-ldb  $LIBS"
10414 cat > conftest.$ac_ext <<EOF
10415 #line 10416 "configure"
10416 #include "confdefs.h"
10417 /* Override any gcc2 internal prototype to avoid an error.  */
10418 /* We use char because int might match the return type of a gcc2
10419     builtin and then its argument prototype would still apply.  */
10420 char db_appexit();
10421
10422 int main() {
10423 db_appexit()
10424 ; return 0; }
10425 EOF
10426 if { (eval echo configure:10427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10427   rm -rf conftest*
10428   eval "ac_cv_lib_$ac_lib_var=yes"
10429 else
10430   echo "configure: failed program was:" >&5
10431   cat conftest.$ac_ext >&5
10432   rm -rf conftest*
10433   eval "ac_cv_lib_$ac_lib_var=no"
10434 fi
10435 rm -f conftest*
10436 LIBS="$ac_save_LIBS"
10437
10438 fi
10439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10440   echo "$ac_t""yes" 1>&6
10441   ol_cv_lib_db2=-ldb
10442 else
10443   echo "$ac_t""no" 1>&6
10444 ol_cv_lib_db2=no
10445 fi
10446
10447         LIBS="$ol_LIBS"
10448
10449 fi
10450
10451 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10452
10453 for ac_hdr in db.h
10454 do
10455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10457 echo "configure:10458: checking for $ac_hdr" >&5
10458 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10459   echo $ac_n "(cached) $ac_c" 1>&6
10460 else
10461   cat > conftest.$ac_ext <<EOF
10462 #line 10463 "configure"
10463 #include "confdefs.h"
10464 #include <$ac_hdr>
10465 EOF
10466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10467 { (eval echo configure:10468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10469 if test -z "$ac_err"; then
10470   rm -rf conftest*
10471   eval "ac_cv_header_$ac_safe=yes"
10472 else
10473   echo "$ac_err" >&5
10474   echo "configure: failed program was:" >&5
10475   cat conftest.$ac_ext >&5
10476   rm -rf conftest*
10477   eval "ac_cv_header_$ac_safe=no"
10478 fi
10479 rm -f conftest*
10480 fi
10481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10482   echo "$ac_t""yes" 1>&6
10483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10484   cat >> confdefs.h <<EOF
10485 #define $ac_tr_hdr 1
10486 EOF
10487  
10488 else
10489   echo "$ac_t""no" 1>&6
10490 fi
10491 done
10492
10493 if test $ac_cv_header_db_h = yes ; then
10494         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10495 echo "configure:10496: checking if db.h is DB2" >&5
10496 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10497   echo $ac_n "(cached) $ac_c" 1>&6
10498 else
10499   
10500                 cat > conftest.$ac_ext <<EOF
10501 #line 10502 "configure"
10502 #include "confdefs.h"
10503
10504 #                       include <db.h>
10505                         /* this check could be improved */
10506 #                       ifdef DB_VERSION_MAJOR
10507 #                               if DB_VERSION_MAJOR == 2
10508                                         __db_version_2;
10509 #                               endif
10510 #                       endif
10511                 
10512 EOF
10513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10514   egrep "__db_version_2" >/dev/null 2>&1; then
10515   rm -rf conftest*
10516   ol_cv_header_db2=yes
10517 else
10518   rm -rf conftest*
10519   ol_cv_header_db2=no
10520 fi
10521 rm -f conftest*
10522
10523 fi
10524
10525 echo "$ac_t""$ol_cv_header_db2" 1>&6
10526 else
10527         ol_cv_header_db2=no
10528 fi
10529
10530
10531  
10532  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10533 echo "configure:10534: checking for Berkeley DB2" >&5
10534 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10535   echo $ac_n "(cached) $ac_c" 1>&6
10536 else
10537   
10538         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10539                 ol_cv_berkeley_db2=no
10540         else
10541                 ol_cv_berkeley_db2=yes
10542         fi
10543
10544 fi
10545
10546 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10547  if test $ol_cv_berkeley_db2 = yes ; then
10548         cat >> confdefs.h <<\EOF
10549 #define HAVE_BERKELEY_DB2 1
10550 EOF
10551
10552  fi
10553
10554
10555         if test $ol_cv_berkeley_db2 = yes ; then
10556                 ol_link_ldbm=db2
10557                 ol_with_ldbm_api=db2
10558
10559                 if test $ol_with_ldbm_type = hash ; then
10560                         cat >> confdefs.h <<\EOF
10561 #define LDBM_USE_DBHASH 1
10562 EOF
10563
10564                 else
10565                         cat >> confdefs.h <<\EOF
10566 #define LDBM_USE_DBBTREE 1
10567 EOF
10568
10569                 fi
10570
10571                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10572 echo "configure:10573: checking for DB_THREAD support" >&5
10573 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
10574   echo $ac_n "(cached) $ac_c" 1>&6
10575 else
10576   
10577         ol_LIBS="$LIBS"
10578         if test $ol_cv_lib_db2 != yes ; then
10579                 LIBS="$ol_cv_lib_db2"
10580         fi
10581
10582         if test "$cross_compiling" = yes; then
10583   ol_cv_berkeley_db2_db_thread=cross
10584 else
10585   cat > conftest.$ac_ext <<EOF
10586 #line 10587 "configure"
10587 #include "confdefs.h"
10588
10589 #include <db.h>
10590 #ifndef NULL
10591 #define NULL ((void *)0)
10592 #endif
10593 main()
10594 {
10595         int rc;
10596         DB_ENV env;
10597         u_int32_t flags = DB_CREATE | DB_THREAD;
10598
10599         memset( &env, '\0', sizeof(env) );
10600
10601         rc = db_appinit( NULL, NULL, &env, flags );
10602
10603         if( rc == 0 ) {
10604                 db_appexit( &env );
10605         }
10606
10607         return rc;
10608 }
10609 EOF
10610 if { (eval echo configure:10611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10611 then
10612   ol_cv_berkeley_db2_db_thread=yes
10613 else
10614   echo "configure: failed program was:" >&5
10615   cat conftest.$ac_ext >&5
10616   rm -fr conftest*
10617   ol_cv_berkeley_db2_db_thread=no
10618 fi
10619 rm -fr conftest*
10620 fi
10621
10622
10623         LIBS="$ol_LIBS"
10624
10625         if test $ol_cv_berkeley_db2_db_thread != no ; then
10626                 cat >> confdefs.h <<\EOF
10627 #define HAVE_BERKELEY_DB2_DB_THREAD 1
10628 EOF
10629
10630         fi
10631
10632 fi
10633
10634 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
10635
10636                                                 if test $ol_cv_lib_db2 != yes ; then
10637                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10638                 fi
10639         fi
10640 fi
10641
10642 ol_link_bdb2=no
10643 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10644         if test $ol_cv_berkeley_db2_db_thread != no ; then
10645                 ol_link_bdb2=yes
10646         else
10647                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
10648         fi
10649 fi
10650
10651 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10652         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10653 echo "configure:10654: checking for Berkeley DB library" >&5
10654 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   
10658         for ac_hdr in db1/db.h
10659 do
10660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10662 echo "configure:10663: checking for $ac_hdr" >&5
10663 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10664   echo $ac_n "(cached) $ac_c" 1>&6
10665 else
10666   cat > conftest.$ac_ext <<EOF
10667 #line 10668 "configure"
10668 #include "confdefs.h"
10669 #include <$ac_hdr>
10670 EOF
10671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10672 { (eval echo configure:10673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10674 if test -z "$ac_err"; then
10675   rm -rf conftest*
10676   eval "ac_cv_header_$ac_safe=yes"
10677 else
10678   echo "$ac_err" >&5
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   eval "ac_cv_header_$ac_safe=no"
10683 fi
10684 rm -f conftest*
10685 fi
10686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10687   echo "$ac_t""yes" 1>&6
10688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10689   cat >> confdefs.h <<EOF
10690 #define $ac_tr_hdr 1
10691 EOF
10692  
10693 else
10694   echo "$ac_t""no" 1>&6
10695 fi
10696 done
10697
10698         ol_LIBS="$LIBS"
10699         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10700 echo "configure:10701: checking for dbopen" >&5
10701 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10702   echo $ac_n "(cached) $ac_c" 1>&6
10703 else
10704   cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707 /* System header to define __stub macros and hopefully few prototypes,
10708     which can conflict with char dbopen(); below.  */
10709 #include <assert.h>
10710 /* Override any gcc2 internal prototype to avoid an error.  */
10711 /* We use char because int might match the return type of a gcc2
10712     builtin and then its argument prototype would still apply.  */
10713 char dbopen();
10714 char (*f)();
10715
10716 int main() {
10717
10718 /* The GNU C library defines this for functions which it implements
10719     to always fail with ENOSYS.  Some functions are actually named
10720     something starting with __ and the normal name is an alias.  */
10721 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10722 choke me
10723 #else
10724 f = dbopen;
10725 #endif
10726
10727 ; return 0; }
10728 EOF
10729 if { (eval echo configure:10730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10730   rm -rf conftest*
10731   eval "ac_cv_func_dbopen=yes"
10732 else
10733   echo "configure: failed program was:" >&5
10734   cat conftest.$ac_ext >&5
10735   rm -rf conftest*
10736   eval "ac_cv_func_dbopen=no"
10737 fi
10738 rm -f conftest*
10739 fi
10740
10741 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10742   echo "$ac_t""yes" 1>&6
10743   ol_cv_lib_db=yes
10744 else
10745   echo "$ac_t""no" 1>&6
10746
10747                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10748 echo "configure:10749: checking for dbopen in -ldb1" >&5
10749 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10750 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10751   echo $ac_n "(cached) $ac_c" 1>&6
10752 else
10753   ac_save_LIBS="$LIBS"
10754 LIBS="-ldb1  $LIBS"
10755 cat > conftest.$ac_ext <<EOF
10756 #line 10757 "configure"
10757 #include "confdefs.h"
10758 /* Override any gcc2 internal prototype to avoid an error.  */
10759 /* We use char because int might match the return type of a gcc2
10760     builtin and then its argument prototype would still apply.  */
10761 char dbopen();
10762
10763 int main() {
10764 dbopen()
10765 ; return 0; }
10766 EOF
10767 if { (eval echo configure:10768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10768   rm -rf conftest*
10769   eval "ac_cv_lib_$ac_lib_var=yes"
10770 else
10771   echo "configure: failed program was:" >&5
10772   cat conftest.$ac_ext >&5
10773   rm -rf conftest*
10774   eval "ac_cv_lib_$ac_lib_var=no"
10775 fi
10776 rm -f conftest*
10777 LIBS="$ac_save_LIBS"
10778
10779 fi
10780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10781   echo "$ac_t""yes" 1>&6
10782   ol_cv_lib_db=-ldb1
10783 else
10784   echo "$ac_t""no" 1>&6
10785
10786                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10787 echo "configure:10788: checking for dbopen in -ldb" >&5
10788 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10789 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10790   echo $ac_n "(cached) $ac_c" 1>&6
10791 else
10792   ac_save_LIBS="$LIBS"
10793 LIBS="-ldb  $LIBS"
10794 cat > conftest.$ac_ext <<EOF
10795 #line 10796 "configure"
10796 #include "confdefs.h"
10797 /* Override any gcc2 internal prototype to avoid an error.  */
10798 /* We use char because int might match the return type of a gcc2
10799     builtin and then its argument prototype would still apply.  */
10800 char dbopen();
10801
10802 int main() {
10803 dbopen()
10804 ; return 0; }
10805 EOF
10806 if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10807   rm -rf conftest*
10808   eval "ac_cv_lib_$ac_lib_var=yes"
10809 else
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -rf conftest*
10813   eval "ac_cv_lib_$ac_lib_var=no"
10814 fi
10815 rm -f conftest*
10816 LIBS="$ac_save_LIBS"
10817
10818 fi
10819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10820   echo "$ac_t""yes" 1>&6
10821   ol_cv_lib_db=-ldb
10822 else
10823   echo "$ac_t""no" 1>&6
10824 ol_cv_lib_db=no
10825 fi
10826
10827                 
10828 fi
10829
10830         
10831 fi
10832
10833         LIBS="$ol_LIBS"
10834
10835 fi
10836
10837 echo "$ac_t""$ol_cv_lib_db" 1>&6
10838
10839
10840 for ac_hdr in db_185.h
10841 do
10842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10844 echo "configure:10845: checking for $ac_hdr" >&5
10845 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10846   echo $ac_n "(cached) $ac_c" 1>&6
10847 else
10848   cat > conftest.$ac_ext <<EOF
10849 #line 10850 "configure"
10850 #include "confdefs.h"
10851 #include <$ac_hdr>
10852 EOF
10853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10854 { (eval echo configure:10855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10856 if test -z "$ac_err"; then
10857   rm -rf conftest*
10858   eval "ac_cv_header_$ac_safe=yes"
10859 else
10860   echo "$ac_err" >&5
10861   echo "configure: failed program was:" >&5
10862   cat conftest.$ac_ext >&5
10863   rm -rf conftest*
10864   eval "ac_cv_header_$ac_safe=no"
10865 fi
10866 rm -f conftest*
10867 fi
10868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10869   echo "$ac_t""yes" 1>&6
10870     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10871   cat >> confdefs.h <<EOF
10872 #define $ac_tr_hdr 1
10873 EOF
10874  
10875 else
10876   echo "$ac_t""no" 1>&6
10877 fi
10878 done
10879
10880 if test "$ol_cv_header_db2" = yes ; then
10881         
10882         ol_cv_header_db=$ac_cv_header_db_185_h
10883 else
10884         ol_cv_header_db=$ac_cv_header_db_h
10885 fi
10886
10887
10888  
10889  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10890 echo "configure:10891: checking for Berkeley DB" >&5
10891 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   
10895         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10896                 ol_cv_berkeley_db=no
10897         else
10898                 ol_cv_berkeley_db=yes
10899         fi
10900
10901 fi
10902
10903 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10904  if test $ol_cv_berkeley_db = yes ; then
10905         cat >> confdefs.h <<\EOF
10906 #define HAVE_BERKELEY_DB 1
10907 EOF
10908
10909  fi
10910
10911
10912         if test $ol_cv_berkeley_db = yes ; then
10913                 ol_link_ldbm=db
10914                 ol_with_ldbm_api=db
10915
10916                 if test $ol_with_ldbm_type = hash ; then
10917                         cat >> confdefs.h <<\EOF
10918 #define LDBM_USE_DBHASH 1
10919 EOF
10920
10921                 else
10922                         cat >> confdefs.h <<\EOF
10923 #define LDBM_USE_DBBTREE 1
10924 EOF
10925
10926                 fi
10927
10928                                                 if test $ol_cv_lib_db != yes ; then
10929                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10930                 fi
10931         fi
10932 fi
10933
10934 if test $ol_with_ldbm_api = manual ; then
10935                 ol_link_ldbm=yes
10936
10937         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10938
10939         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10940 do
10941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10943 echo "configure:10944: checking for $ac_hdr" >&5
10944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10945   echo $ac_n "(cached) $ac_c" 1>&6
10946 else
10947   cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 #include <$ac_hdr>
10951 EOF
10952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10953 { (eval echo configure:10954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10955 if test -z "$ac_err"; then
10956   rm -rf conftest*
10957   eval "ac_cv_header_$ac_safe=yes"
10958 else
10959   echo "$ac_err" >&5
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -rf conftest*
10963   eval "ac_cv_header_$ac_safe=no"
10964 fi
10965 rm -f conftest*
10966 fi
10967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10968   echo "$ac_t""yes" 1>&6
10969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10970   cat >> confdefs.h <<EOF
10971 #define $ac_tr_hdr 1
10972 EOF
10973  
10974 else
10975   echo "$ac_t""no" 1>&6
10976 fi
10977 done
10978
10979 fi
10980
10981 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10982         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10983         ol_with_ldbm_api=none
10984 fi
10985
10986 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10987         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10988 echo "configure:10989: checking for MDBM library" >&5
10989 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10990   echo $ac_n "(cached) $ac_c" 1>&6
10991 else
10992         ol_LIBS="$LIBS"
10993         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10994 echo "configure:10995: checking for mdbm_set_chain" >&5
10995 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10996   echo $ac_n "(cached) $ac_c" 1>&6
10997 else
10998   cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11001 /* System header to define __stub macros and hopefully few prototypes,
11002     which can conflict with char mdbm_set_chain(); below.  */
11003 #include <assert.h>
11004 /* Override any gcc2 internal prototype to avoid an error.  */
11005 /* We use char because int might match the return type of a gcc2
11006     builtin and then its argument prototype would still apply.  */
11007 char mdbm_set_chain();
11008 char (*f)();
11009
11010 int main() {
11011
11012 /* The GNU C library defines this for functions which it implements
11013     to always fail with ENOSYS.  Some functions are actually named
11014     something starting with __ and the normal name is an alias.  */
11015 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11016 choke me
11017 #else
11018 f = mdbm_set_chain;
11019 #endif
11020
11021 ; return 0; }
11022 EOF
11023 if { (eval echo configure:11024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11024   rm -rf conftest*
11025   eval "ac_cv_func_mdbm_set_chain=yes"
11026 else
11027   echo "configure: failed program was:" >&5
11028   cat conftest.$ac_ext >&5
11029   rm -rf conftest*
11030   eval "ac_cv_func_mdbm_set_chain=no"
11031 fi
11032 rm -f conftest*
11033 fi
11034
11035 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11036   echo "$ac_t""yes" 1>&6
11037   ol_cv_lib_mdbm=yes
11038 else
11039   echo "$ac_t""no" 1>&6
11040
11041                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11042 echo "configure:11043: checking for mdbm_set_chain in -lmdbm" >&5
11043 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11045   echo $ac_n "(cached) $ac_c" 1>&6
11046 else
11047   ac_save_LIBS="$LIBS"
11048 LIBS="-lmdbm  $LIBS"
11049 cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 /* Override any gcc2 internal prototype to avoid an error.  */
11053 /* We use char because int might match the return type of a gcc2
11054     builtin and then its argument prototype would still apply.  */
11055 char mdbm_set_chain();
11056
11057 int main() {
11058 mdbm_set_chain()
11059 ; return 0; }
11060 EOF
11061 if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11062   rm -rf conftest*
11063   eval "ac_cv_lib_$ac_lib_var=yes"
11064 else
11065   echo "configure: failed program was:" >&5
11066   cat conftest.$ac_ext >&5
11067   rm -rf conftest*
11068   eval "ac_cv_lib_$ac_lib_var=no"
11069 fi
11070 rm -f conftest*
11071 LIBS="$ac_save_LIBS"
11072
11073 fi
11074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11075   echo "$ac_t""yes" 1>&6
11076   ol_cv_lib_mdbm=-lmdbm
11077 else
11078   echo "$ac_t""no" 1>&6
11079 ol_cv_lib_mdbm=no
11080 fi
11081
11082         
11083 fi
11084
11085         LIBS="$ol_LIBS"
11086
11087 fi
11088
11089 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11090
11091
11092  for ac_hdr in mdbm.h
11093 do
11094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11096 echo "configure:11097: checking for $ac_hdr" >&5
11097 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11098   echo $ac_n "(cached) $ac_c" 1>&6
11099 else
11100   cat > conftest.$ac_ext <<EOF
11101 #line 11102 "configure"
11102 #include "confdefs.h"
11103 #include <$ac_hdr>
11104 EOF
11105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11106 { (eval echo configure:11107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11108 if test -z "$ac_err"; then
11109   rm -rf conftest*
11110   eval "ac_cv_header_$ac_safe=yes"
11111 else
11112   echo "$ac_err" >&5
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -rf conftest*
11116   eval "ac_cv_header_$ac_safe=no"
11117 fi
11118 rm -f conftest*
11119 fi
11120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11121   echo "$ac_t""yes" 1>&6
11122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11123   cat >> confdefs.h <<EOF
11124 #define $ac_tr_hdr 1
11125 EOF
11126  
11127 else
11128   echo "$ac_t""no" 1>&6
11129 fi
11130 done
11131
11132  echo $ac_n "checking for db""... $ac_c" 1>&6
11133 echo "configure:11134: checking for db" >&5
11134 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11135   echo $ac_n "(cached) $ac_c" 1>&6
11136 else
11137   
11138         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11139                 ol_cv_mdbm=no
11140         else
11141                 ol_cv_mdbm=yes
11142         fi
11143
11144 fi
11145
11146 echo "$ac_t""$ol_cv_mdbm" 1>&6
11147  if test $ol_cv_mdbm = yes ; then
11148         cat >> confdefs.h <<\EOF
11149 #define HAVE_MDBM 1
11150 EOF
11151
11152  fi
11153
11154
11155         if test $ol_cv_mdbm = yes ; then
11156                 ol_link_ldbm=mdbm
11157                 ol_with_ldbm_api=mdbm
11158                 if test $ol_cv_lib_mdbm != yes ; then
11159                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11160                 fi
11161         fi
11162 fi
11163
11164 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11165         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11166 echo "configure:11167: checking for GDBM library" >&5
11167 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170         ol_LIBS="$LIBS"
11171         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11172 echo "configure:11173: checking for gdbm_open" >&5
11173 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11174   echo $ac_n "(cached) $ac_c" 1>&6
11175 else
11176   cat > conftest.$ac_ext <<EOF
11177 #line 11178 "configure"
11178 #include "confdefs.h"
11179 /* System header to define __stub macros and hopefully few prototypes,
11180     which can conflict with char gdbm_open(); below.  */
11181 #include <assert.h>
11182 /* Override any gcc2 internal prototype to avoid an error.  */
11183 /* We use char because int might match the return type of a gcc2
11184     builtin and then its argument prototype would still apply.  */
11185 char gdbm_open();
11186 char (*f)();
11187
11188 int main() {
11189
11190 /* The GNU C library defines this for functions which it implements
11191     to always fail with ENOSYS.  Some functions are actually named
11192     something starting with __ and the normal name is an alias.  */
11193 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11194 choke me
11195 #else
11196 f = gdbm_open;
11197 #endif
11198
11199 ; return 0; }
11200 EOF
11201 if { (eval echo configure:11202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11202   rm -rf conftest*
11203   eval "ac_cv_func_gdbm_open=yes"
11204 else
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -rf conftest*
11208   eval "ac_cv_func_gdbm_open=no"
11209 fi
11210 rm -f conftest*
11211 fi
11212
11213 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11214   echo "$ac_t""yes" 1>&6
11215   ol_cv_lib_gdbm=yes
11216 else
11217   echo "$ac_t""no" 1>&6
11218
11219                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11220 echo "configure:11221: checking for gdbm_open in -lgdbm" >&5
11221 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11223   echo $ac_n "(cached) $ac_c" 1>&6
11224 else
11225   ac_save_LIBS="$LIBS"
11226 LIBS="-lgdbm  $LIBS"
11227 cat > conftest.$ac_ext <<EOF
11228 #line 11229 "configure"
11229 #include "confdefs.h"
11230 /* Override any gcc2 internal prototype to avoid an error.  */
11231 /* We use char because int might match the return type of a gcc2
11232     builtin and then its argument prototype would still apply.  */
11233 char gdbm_open();
11234
11235 int main() {
11236 gdbm_open()
11237 ; return 0; }
11238 EOF
11239 if { (eval echo configure:11240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11240   rm -rf conftest*
11241   eval "ac_cv_lib_$ac_lib_var=yes"
11242 else
11243   echo "configure: failed program was:" >&5
11244   cat conftest.$ac_ext >&5
11245   rm -rf conftest*
11246   eval "ac_cv_lib_$ac_lib_var=no"
11247 fi
11248 rm -f conftest*
11249 LIBS="$ac_save_LIBS"
11250
11251 fi
11252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11253   echo "$ac_t""yes" 1>&6
11254   ol_cv_lib_gdbm=-lgdbm
11255 else
11256   echo "$ac_t""no" 1>&6
11257 ol_cv_lib_gdbm=no
11258 fi
11259
11260         
11261 fi
11262
11263         LIBS="$ol_LIBS"
11264
11265 fi
11266
11267 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11268
11269
11270  for ac_hdr in gdbm.h
11271 do
11272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11274 echo "configure:11275: checking for $ac_hdr" >&5
11275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11276   echo $ac_n "(cached) $ac_c" 1>&6
11277 else
11278   cat > conftest.$ac_ext <<EOF
11279 #line 11280 "configure"
11280 #include "confdefs.h"
11281 #include <$ac_hdr>
11282 EOF
11283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11284 { (eval echo configure:11285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11286 if test -z "$ac_err"; then
11287   rm -rf conftest*
11288   eval "ac_cv_header_$ac_safe=yes"
11289 else
11290   echo "$ac_err" >&5
11291   echo "configure: failed program was:" >&5
11292   cat conftest.$ac_ext >&5
11293   rm -rf conftest*
11294   eval "ac_cv_header_$ac_safe=no"
11295 fi
11296 rm -f conftest*
11297 fi
11298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11299   echo "$ac_t""yes" 1>&6
11300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11301   cat >> confdefs.h <<EOF
11302 #define $ac_tr_hdr 1
11303 EOF
11304  
11305 else
11306   echo "$ac_t""no" 1>&6
11307 fi
11308 done
11309
11310  echo $ac_n "checking for db""... $ac_c" 1>&6
11311 echo "configure:11312: checking for db" >&5
11312 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11313   echo $ac_n "(cached) $ac_c" 1>&6
11314 else
11315   
11316         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11317                 ol_cv_gdbm=no
11318         else
11319                 ol_cv_gdbm=yes
11320         fi
11321
11322 fi
11323
11324 echo "$ac_t""$ol_cv_gdbm" 1>&6
11325  if test $ol_cv_gdbm = yes ; then
11326         cat >> confdefs.h <<\EOF
11327 #define HAVE_GDBM 1
11328 EOF
11329
11330  fi
11331
11332
11333         if test $ol_cv_gdbm = yes ; then
11334                 ol_link_ldbm=gdbm
11335                 ol_with_ldbm_api=gdbm
11336
11337                 if test $ol_cv_lib_gdbm != yes ; then
11338                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11339                 fi
11340         fi
11341 fi
11342
11343 if test $ol_with_ldbm_api = auto ; then
11344         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11345 elif test $ol_with_ldbm_api = ndbm ; then
11346         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11347 echo "configure:11348: checking for NDBM library" >&5
11348 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11349   echo $ac_n "(cached) $ac_c" 1>&6
11350 else
11351         ol_LIBS="$LIBS"
11352         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11353 echo "configure:11354: checking for dbm_open" >&5
11354 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11355   echo $ac_n "(cached) $ac_c" 1>&6
11356 else
11357   cat > conftest.$ac_ext <<EOF
11358 #line 11359 "configure"
11359 #include "confdefs.h"
11360 /* System header to define __stub macros and hopefully few prototypes,
11361     which can conflict with char dbm_open(); below.  */
11362 #include <assert.h>
11363 /* Override any gcc2 internal prototype to avoid an error.  */
11364 /* We use char because int might match the return type of a gcc2
11365     builtin and then its argument prototype would still apply.  */
11366 char dbm_open();
11367 char (*f)();
11368
11369 int main() {
11370
11371 /* The GNU C library defines this for functions which it implements
11372     to always fail with ENOSYS.  Some functions are actually named
11373     something starting with __ and the normal name is an alias.  */
11374 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11375 choke me
11376 #else
11377 f = dbm_open;
11378 #endif
11379
11380 ; return 0; }
11381 EOF
11382 if { (eval echo configure:11383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11383   rm -rf conftest*
11384   eval "ac_cv_func_dbm_open=yes"
11385 else
11386   echo "configure: failed program was:" >&5
11387   cat conftest.$ac_ext >&5
11388   rm -rf conftest*
11389   eval "ac_cv_func_dbm_open=no"
11390 fi
11391 rm -f conftest*
11392 fi
11393
11394 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11395   echo "$ac_t""yes" 1>&6
11396   ol_cv_lib_ndbm=yes
11397 else
11398   echo "$ac_t""no" 1>&6
11399
11400                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11401 echo "configure:11402: checking for dbm_open in -lndbm" >&5
11402 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11403 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11404   echo $ac_n "(cached) $ac_c" 1>&6
11405 else
11406   ac_save_LIBS="$LIBS"
11407 LIBS="-lndbm  $LIBS"
11408 cat > conftest.$ac_ext <<EOF
11409 #line 11410 "configure"
11410 #include "confdefs.h"
11411 /* Override any gcc2 internal prototype to avoid an error.  */
11412 /* We use char because int might match the return type of a gcc2
11413     builtin and then its argument prototype would still apply.  */
11414 char dbm_open();
11415
11416 int main() {
11417 dbm_open()
11418 ; return 0; }
11419 EOF
11420 if { (eval echo configure:11421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11421   rm -rf conftest*
11422   eval "ac_cv_lib_$ac_lib_var=yes"
11423 else
11424   echo "configure: failed program was:" >&5
11425   cat conftest.$ac_ext >&5
11426   rm -rf conftest*
11427   eval "ac_cv_lib_$ac_lib_var=no"
11428 fi
11429 rm -f conftest*
11430 LIBS="$ac_save_LIBS"
11431
11432 fi
11433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11434   echo "$ac_t""yes" 1>&6
11435   ol_cv_lib_ndbm=-lndbm
11436 else
11437   echo "$ac_t""no" 1>&6
11438
11439                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11440 echo "configure:11441: checking for dbm_open in -ldbm" >&5
11441 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11442 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11443   echo $ac_n "(cached) $ac_c" 1>&6
11444 else
11445   ac_save_LIBS="$LIBS"
11446 LIBS="-ldbm  $LIBS"
11447 cat > conftest.$ac_ext <<EOF
11448 #line 11449 "configure"
11449 #include "confdefs.h"
11450 /* Override any gcc2 internal prototype to avoid an error.  */
11451 /* We use char because int might match the return type of a gcc2
11452     builtin and then its argument prototype would still apply.  */
11453 char dbm_open();
11454
11455 int main() {
11456 dbm_open()
11457 ; return 0; }
11458 EOF
11459 if { (eval echo configure:11460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11460   rm -rf conftest*
11461   eval "ac_cv_lib_$ac_lib_var=yes"
11462 else
11463   echo "configure: failed program was:" >&5
11464   cat conftest.$ac_ext >&5
11465   rm -rf conftest*
11466   eval "ac_cv_lib_$ac_lib_var=no"
11467 fi
11468 rm -f conftest*
11469 LIBS="$ac_save_LIBS"
11470
11471 fi
11472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11473   echo "$ac_t""yes" 1>&6
11474   ol_cv_lib_ndbm=-ldbm
11475 else
11476   echo "$ac_t""no" 1>&6
11477 ol_cv_lib_ndbm=no
11478 fi
11479                 
11480 fi
11481
11482         
11483 fi
11484
11485         LIBS="$ol_LIBS"
11486
11487 fi
11488
11489 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11490
11491
11492  for ac_hdr in ndbm.h
11493 do
11494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11496 echo "configure:11497: checking for $ac_hdr" >&5
11497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   cat > conftest.$ac_ext <<EOF
11501 #line 11502 "configure"
11502 #include "confdefs.h"
11503 #include <$ac_hdr>
11504 EOF
11505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11506 { (eval echo configure:11507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11508 if test -z "$ac_err"; then
11509   rm -rf conftest*
11510   eval "ac_cv_header_$ac_safe=yes"
11511 else
11512   echo "$ac_err" >&5
11513   echo "configure: failed program was:" >&5
11514   cat conftest.$ac_ext >&5
11515   rm -rf conftest*
11516   eval "ac_cv_header_$ac_safe=no"
11517 fi
11518 rm -f conftest*
11519 fi
11520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11521   echo "$ac_t""yes" 1>&6
11522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11523   cat >> confdefs.h <<EOF
11524 #define $ac_tr_hdr 1
11525 EOF
11526  
11527 else
11528   echo "$ac_t""no" 1>&6
11529 fi
11530 done
11531
11532  echo $ac_n "checking for db""... $ac_c" 1>&6
11533 echo "configure:11534: checking for db" >&5
11534 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11535   echo $ac_n "(cached) $ac_c" 1>&6
11536 else
11537   
11538         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11539                 ol_cv_ndbm=no
11540         else
11541                 ol_cv_ndbm=yes
11542         fi
11543
11544 fi
11545
11546 echo "$ac_t""$ol_cv_ndbm" 1>&6
11547  if test $ol_cv_ndbm = yes ; then
11548         cat >> confdefs.h <<\EOF
11549 #define HAVE_NDBM 1
11550 EOF
11551
11552  fi
11553
11554
11555         if test $ol_cv_ndbm = yes ; then
11556                 ol_link_ldbm=ndbm
11557                 ol_with_ldbm_api=ndbm
11558
11559                 if test $ol_cv_lib_ndbm != yes ; then
11560                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11561                 fi
11562         fi
11563 fi
11564
11565 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11566         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11567         if test $ol_enable_ldbm = yes ; then
11568                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11569         fi
11570
11571         echo "configure: warning: disabling LDBM" 1>&2
11572         ol_enable_ldbm=no
11573 fi
11574
11575 if test $ol_enable_wrappers != no ; then
11576         for ac_hdr in tcpd.h
11577 do
11578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11580 echo "configure:11581: checking for $ac_hdr" >&5
11581 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587 #include <$ac_hdr>
11588 EOF
11589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11590 { (eval echo configure:11591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11592 if test -z "$ac_err"; then
11593   rm -rf conftest*
11594   eval "ac_cv_header_$ac_safe=yes"
11595 else
11596   echo "$ac_err" >&5
11597   echo "configure: failed program was:" >&5
11598   cat conftest.$ac_ext >&5
11599   rm -rf conftest*
11600   eval "ac_cv_header_$ac_safe=no"
11601 fi
11602 rm -f conftest*
11603 fi
11604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11605   echo "$ac_t""yes" 1>&6
11606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11607   cat >> confdefs.h <<EOF
11608 #define $ac_tr_hdr 1
11609 EOF
11610  
11611 else
11612   echo "$ac_t""no" 1>&6
11613 fi
11614 done
11615
11616
11617         if test $ac_cv_header_tcpd_h != yes ; then
11618                 have_wrappers=no
11619         else
11620                 cat > conftest.$ac_ext <<EOF
11621 #line 11622 "configure"
11622 #include "confdefs.h"
11623
11624 int allow_severity = 0;
11625 int deny_severity  = 0;
11626                 
11627 int main() {
11628 hosts_access()
11629 ; return 0; }
11630 EOF
11631 if { (eval echo configure:11632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11632   rm -rf conftest*
11633   have_wrappers=yes
11634 else
11635   echo "configure: failed program was:" >&5
11636   cat conftest.$ac_ext >&5
11637   rm -rf conftest*
11638   have_wrappers=no
11639 fi
11640 rm -f conftest*
11641         fi
11642
11643         if test $have_wrappers = yes ; then
11644                 cat >> confdefs.h <<\EOF
11645 #define HAVE_TCPD 1
11646 EOF
11647
11648                 WRAP_LIBS="-lwrap"
11649
11650                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11651 echo "configure:11652: checking for main in -lnsl" >&5
11652 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11654   echo $ac_n "(cached) $ac_c" 1>&6
11655 else
11656   ac_save_LIBS="$LIBS"
11657 LIBS="-lnsl  $LIBS"
11658 cat > conftest.$ac_ext <<EOF
11659 #line 11660 "configure"
11660 #include "confdefs.h"
11661
11662 int main() {
11663 main()
11664 ; return 0; }
11665 EOF
11666 if { (eval echo configure:11667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11667   rm -rf conftest*
11668   eval "ac_cv_lib_$ac_lib_var=yes"
11669 else
11670   echo "configure: failed program was:" >&5
11671   cat conftest.$ac_ext >&5
11672   rm -rf conftest*
11673   eval "ac_cv_lib_$ac_lib_var=no"
11674 fi
11675 rm -f conftest*
11676 LIBS="$ac_save_LIBS"
11677
11678 fi
11679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11680   echo "$ac_t""yes" 1>&6
11681     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11682     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11683   cat >> confdefs.h <<EOF
11684 #define $ac_tr_lib 1
11685 EOF
11686
11687   LIBS="-lnsl $LIBS"
11688
11689 else
11690   echo "$ac_t""no" 1>&6
11691 fi
11692
11693         else
11694                 echo "configure: warning: could not find -lwrap" 1>&2
11695                 if test $ol_enable_wrappers = yes ; then
11696                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11697                 fi
11698
11699                 echo "configure: warning: disabling wrappers support" 1>&2
11700                 ol_enable_wrappers=no
11701                 WRAP_LIBS=""
11702         fi
11703 fi
11704
11705 if test $ol_enable_syslog != no ; then
11706         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11707 echo "configure:11708: checking for openlog" >&5
11708 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11709   echo $ac_n "(cached) $ac_c" 1>&6
11710 else
11711   cat > conftest.$ac_ext <<EOF
11712 #line 11713 "configure"
11713 #include "confdefs.h"
11714 /* System header to define __stub macros and hopefully few prototypes,
11715     which can conflict with char openlog(); below.  */
11716 #include <assert.h>
11717 /* Override any gcc2 internal prototype to avoid an error.  */
11718 /* We use char because int might match the return type of a gcc2
11719     builtin and then its argument prototype would still apply.  */
11720 char openlog();
11721 char (*f)();
11722
11723 int main() {
11724
11725 /* The GNU C library defines this for functions which it implements
11726     to always fail with ENOSYS.  Some functions are actually named
11727     something starting with __ and the normal name is an alias.  */
11728 #if defined (__stub_openlog) || defined (__stub___openlog)
11729 choke me
11730 #else
11731 f = openlog;
11732 #endif
11733
11734 ; return 0; }
11735 EOF
11736 if { (eval echo configure:11737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11737   rm -rf conftest*
11738   eval "ac_cv_func_openlog=yes"
11739 else
11740   echo "configure: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   rm -rf conftest*
11743   eval "ac_cv_func_openlog=no"
11744 fi
11745 rm -f conftest*
11746 fi
11747
11748 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11749   echo "$ac_t""yes" 1>&6
11750   :
11751 else
11752   echo "$ac_t""no" 1>&6
11753 fi
11754
11755         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11756                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11757         fi
11758         ol_enable_syslog=$ac_cv_func_openlog
11759 fi
11760
11761 if test $ol_enable_dmalloc != no ; then
11762         for ac_hdr in dmalloc.h
11763 do
11764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11766 echo "configure:11767: checking for $ac_hdr" >&5
11767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11768   echo $ac_n "(cached) $ac_c" 1>&6
11769 else
11770   cat > conftest.$ac_ext <<EOF
11771 #line 11772 "configure"
11772 #include "confdefs.h"
11773 #include <$ac_hdr>
11774 EOF
11775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11776 { (eval echo configure:11777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11778 if test -z "$ac_err"; then
11779   rm -rf conftest*
11780   eval "ac_cv_header_$ac_safe=yes"
11781 else
11782   echo "$ac_err" >&5
11783   echo "configure: failed program was:" >&5
11784   cat conftest.$ac_ext >&5
11785   rm -rf conftest*
11786   eval "ac_cv_header_$ac_safe=no"
11787 fi
11788 rm -f conftest*
11789 fi
11790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11791   echo "$ac_t""yes" 1>&6
11792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11793   cat >> confdefs.h <<EOF
11794 #define $ac_tr_hdr 1
11795 EOF
11796  
11797 else
11798   echo "$ac_t""no" 1>&6
11799 fi
11800 done
11801
11802         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11803 echo "configure:11804: checking for dmalloc_shutdown in -ldmalloc" >&5
11804 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   ac_save_LIBS="$LIBS"
11809 LIBS="-ldmalloc  $LIBS"
11810 cat > conftest.$ac_ext <<EOF
11811 #line 11812 "configure"
11812 #include "confdefs.h"
11813 /* Override any gcc2 internal prototype to avoid an error.  */
11814 /* We use char because int might match the return type of a gcc2
11815     builtin and then its argument prototype would still apply.  */
11816 char dmalloc_shutdown();
11817
11818 int main() {
11819 dmalloc_shutdown()
11820 ; return 0; }
11821 EOF
11822 if { (eval echo configure:11823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11823   rm -rf conftest*
11824   eval "ac_cv_lib_$ac_lib_var=yes"
11825 else
11826   echo "configure: failed program was:" >&5
11827   cat conftest.$ac_ext >&5
11828   rm -rf conftest*
11829   eval "ac_cv_lib_$ac_lib_var=no"
11830 fi
11831 rm -f conftest*
11832 LIBS="$ac_save_LIBS"
11833
11834 fi
11835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11836   echo "$ac_t""yes" 1>&6
11837     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11839   cat >> confdefs.h <<EOF
11840 #define $ac_tr_lib 1
11841 EOF
11842
11843   LIBS="-ldmalloc $LIBS"
11844
11845 else
11846   echo "$ac_t""no" 1>&6
11847 fi
11848
11849 fi
11850
11851 if test $ol_enable_tcl != no ; then
11852         for ac_hdr in tcl.h
11853 do
11854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11856 echo "configure:11857: checking for $ac_hdr" >&5
11857 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11858   echo $ac_n "(cached) $ac_c" 1>&6
11859 else
11860   cat > conftest.$ac_ext <<EOF
11861 #line 11862 "configure"
11862 #include "confdefs.h"
11863 #include <$ac_hdr>
11864 EOF
11865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11866 { (eval echo configure:11867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11868 if test -z "$ac_err"; then
11869   rm -rf conftest*
11870   eval "ac_cv_header_$ac_safe=yes"
11871 else
11872   echo "$ac_err" >&5
11873   echo "configure: failed program was:" >&5
11874   cat conftest.$ac_ext >&5
11875   rm -rf conftest*
11876   eval "ac_cv_header_$ac_safe=no"
11877 fi
11878 rm -f conftest*
11879 fi
11880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11881   echo "$ac_t""yes" 1>&6
11882     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11883   cat >> confdefs.h <<EOF
11884 #define $ac_tr_hdr 1
11885 EOF
11886  
11887 else
11888   echo "$ac_t""no" 1>&6
11889 fi
11890 done
11891
11892
11893         if test $ac_cv_header_tcl_h != yes ; then
11894                 have_tcl=no
11895         else
11896                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11897 echo "configure:11898: checking for main in -ltcl" >&5
11898 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11900   echo $ac_n "(cached) $ac_c" 1>&6
11901 else
11902   ac_save_LIBS="$LIBS"
11903 LIBS="-ltcl  $LIBS"
11904 cat > conftest.$ac_ext <<EOF
11905 #line 11906 "configure"
11906 #include "confdefs.h"
11907
11908 int main() {
11909 main()
11910 ; return 0; }
11911 EOF
11912 if { (eval echo configure:11913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11913   rm -rf conftest*
11914   eval "ac_cv_lib_$ac_lib_var=yes"
11915 else
11916   echo "configure: failed program was:" >&5
11917   cat conftest.$ac_ext >&5
11918   rm -rf conftest*
11919   eval "ac_cv_lib_$ac_lib_var=no"
11920 fi
11921 rm -f conftest*
11922 LIBS="$ac_save_LIBS"
11923
11924 fi
11925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11926   echo "$ac_t""yes" 1>&6
11927   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11928 else
11929   echo "$ac_t""no" 1>&6
11930 have_tcl=no
11931 fi
11932
11933
11934                 if test $have_tcl != yes; then
11935                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11936 echo "configure:11937: checking for main in -ltcl7.6" >&5
11937 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11939   echo $ac_n "(cached) $ac_c" 1>&6
11940 else
11941   ac_save_LIBS="$LIBS"
11942 LIBS="-ltcl7.6  $LIBS"
11943 cat > conftest.$ac_ext <<EOF
11944 #line 11945 "configure"
11945 #include "confdefs.h"
11946
11947 int main() {
11948 main()
11949 ; return 0; }
11950 EOF
11951 if { (eval echo configure:11952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11952   rm -rf conftest*
11953   eval "ac_cv_lib_$ac_lib_var=yes"
11954 else
11955   echo "configure: failed program was:" >&5
11956   cat conftest.$ac_ext >&5
11957   rm -rf conftest*
11958   eval "ac_cv_lib_$ac_lib_var=no"
11959 fi
11960 rm -f conftest*
11961 LIBS="$ac_save_LIBS"
11962
11963 fi
11964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11965   echo "$ac_t""yes" 1>&6
11966   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11967 else
11968   echo "$ac_t""no" 1>&6
11969 have_tcl=no
11970 fi
11971
11972                 fi
11973
11974                 if test $have_tcl != yes; then
11975                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11976 echo "configure:11977: checking for main in -ltcl8.0" >&5
11977 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11979   echo $ac_n "(cached) $ac_c" 1>&6
11980 else
11981   ac_save_LIBS="$LIBS"
11982 LIBS="-ltcl8.0  $LIBS"
11983 cat > conftest.$ac_ext <<EOF
11984 #line 11985 "configure"
11985 #include "confdefs.h"
11986
11987 int main() {
11988 main()
11989 ; return 0; }
11990 EOF
11991 if { (eval echo configure:11992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11992   rm -rf conftest*
11993   eval "ac_cv_lib_$ac_lib_var=yes"
11994 else
11995   echo "configure: failed program was:" >&5
11996   cat conftest.$ac_ext >&5
11997   rm -rf conftest*
11998   eval "ac_cv_lib_$ac_lib_var=no"
11999 fi
12000 rm -f conftest*
12001 LIBS="$ac_save_LIBS"
12002
12003 fi
12004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12005   echo "$ac_t""yes" 1>&6
12006   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
12007 else
12008   echo "$ac_t""no" 1>&6
12009 have_tcl=no
12010 fi
12011
12012                 fi
12013         fi
12014
12015         if test $have_tcl != yes ; then
12016                 echo "configure: warning: could not find -ltcl" 1>&2
12017                 if test $ol_enable_tcl = yes ; then
12018                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12019                 fi
12020
12021                 ol_enable_tcl=no
12022         fi
12023 fi
12024
12025 ol_link_termcap=no
12026 for ac_hdr in termcap.h ncurses.h
12027 do
12028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12030 echo "configure:12031: checking for $ac_hdr" >&5
12031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12032   echo $ac_n "(cached) $ac_c" 1>&6
12033 else
12034   cat > conftest.$ac_ext <<EOF
12035 #line 12036 "configure"
12036 #include "confdefs.h"
12037 #include <$ac_hdr>
12038 EOF
12039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12040 { (eval echo configure:12041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12042 if test -z "$ac_err"; then
12043   rm -rf conftest*
12044   eval "ac_cv_header_$ac_safe=yes"
12045 else
12046   echo "$ac_err" >&5
12047   echo "configure: failed program was:" >&5
12048   cat conftest.$ac_ext >&5
12049   rm -rf conftest*
12050   eval "ac_cv_header_$ac_safe=no"
12051 fi
12052 rm -f conftest*
12053 fi
12054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12055   echo "$ac_t""yes" 1>&6
12056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12057   cat >> confdefs.h <<EOF
12058 #define $ac_tr_hdr 1
12059 EOF
12060  
12061 else
12062   echo "$ac_t""no" 1>&6
12063 fi
12064 done
12065
12066
12067 if test $ol_link_termcap = no ; then
12068         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12069 echo "configure:12070: checking for tputs in -ltermcap" >&5
12070 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12072   echo $ac_n "(cached) $ac_c" 1>&6
12073 else
12074   ac_save_LIBS="$LIBS"
12075 LIBS="-ltermcap  $LIBS"
12076 cat > conftest.$ac_ext <<EOF
12077 #line 12078 "configure"
12078 #include "confdefs.h"
12079 /* Override any gcc2 internal prototype to avoid an error.  */
12080 /* We use char because int might match the return type of a gcc2
12081     builtin and then its argument prototype would still apply.  */
12082 char tputs();
12083
12084 int main() {
12085 tputs()
12086 ; return 0; }
12087 EOF
12088 if { (eval echo configure:12089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12089   rm -rf conftest*
12090   eval "ac_cv_lib_$ac_lib_var=yes"
12091 else
12092   echo "configure: failed program was:" >&5
12093   cat conftest.$ac_ext >&5
12094   rm -rf conftest*
12095   eval "ac_cv_lib_$ac_lib_var=no"
12096 fi
12097 rm -f conftest*
12098 LIBS="$ac_save_LIBS"
12099
12100 fi
12101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12102   echo "$ac_t""yes" 1>&6
12103   have_termcap=yes
12104 else
12105   echo "$ac_t""no" 1>&6
12106 have_termcap=no
12107 fi
12108
12109         if test $have_termcap = yes ; then
12110                 cat >> confdefs.h <<\EOF
12111 #define HAVE_TERMCAP 1
12112 EOF
12113
12114                 ol_link_termcap=yes
12115                 TERMCAP_LIBS=-ltermcap
12116         fi
12117 fi
12118
12119 if test $ol_link_termcap = no ; then
12120         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12121 echo "configure:12122: checking for initscr in -lncurses" >&5
12122 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12123 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12124   echo $ac_n "(cached) $ac_c" 1>&6
12125 else
12126   ac_save_LIBS="$LIBS"
12127 LIBS="-lncurses  $LIBS"
12128 cat > conftest.$ac_ext <<EOF
12129 #line 12130 "configure"
12130 #include "confdefs.h"
12131 /* Override any gcc2 internal prototype to avoid an error.  */
12132 /* We use char because int might match the return type of a gcc2
12133     builtin and then its argument prototype would still apply.  */
12134 char initscr();
12135
12136 int main() {
12137 initscr()
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12141   rm -rf conftest*
12142   eval "ac_cv_lib_$ac_lib_var=yes"
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   eval "ac_cv_lib_$ac_lib_var=no"
12148 fi
12149 rm -f conftest*
12150 LIBS="$ac_save_LIBS"
12151
12152 fi
12153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12154   echo "$ac_t""yes" 1>&6
12155   have_ncurses=yes
12156 else
12157   echo "$ac_t""no" 1>&6
12158 have_ncurses=no
12159 fi
12160
12161         if test $have_ncurses = yes ; then
12162                 cat >> confdefs.h <<\EOF
12163 #define HAVE_NCURSES 1
12164 EOF
12165
12166                 ol_link_termcap=yes
12167                 TERMCAP_LIBS=-lncurses
12168         fi
12169 fi
12170
12171 if test $ol_link_termcap = no ; then
12172         cat >> confdefs.h <<\EOF
12173 #define NO_TERMCAP 1
12174 EOF
12175
12176         TERMCAP_LIBS=
12177 fi
12178
12179 ol_link_sasl=no
12180 if test $ol_with_cyrus_sasl != no ; then
12181         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12182 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12183 echo "configure:12184: checking for sasl.h" >&5
12184 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12185   echo $ac_n "(cached) $ac_c" 1>&6
12186 else
12187   cat > conftest.$ac_ext <<EOF
12188 #line 12189 "configure"
12189 #include "confdefs.h"
12190 #include <sasl.h>
12191 EOF
12192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12193 { (eval echo configure:12194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12195 if test -z "$ac_err"; then
12196   rm -rf conftest*
12197   eval "ac_cv_header_$ac_safe=yes"
12198 else
12199   echo "$ac_err" >&5
12200   echo "configure: failed program was:" >&5
12201   cat conftest.$ac_ext >&5
12202   rm -rf conftest*
12203   eval "ac_cv_header_$ac_safe=no"
12204 fi
12205 rm -f conftest*
12206 fi
12207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12208   echo "$ac_t""yes" 1>&6
12209   :
12210 else
12211   echo "$ac_t""no" 1>&6
12212 fi
12213
12214
12215         if test $ac_cv_header_sasl_h = yes ; then
12216                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12217 echo "configure:12218: checking for sasl_client_init in -lsasl" >&5
12218 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12220   echo $ac_n "(cached) $ac_c" 1>&6
12221 else
12222   ac_save_LIBS="$LIBS"
12223 LIBS="-lsasl  $LIBS"
12224 cat > conftest.$ac_ext <<EOF
12225 #line 12226 "configure"
12226 #include "confdefs.h"
12227 /* Override any gcc2 internal prototype to avoid an error.  */
12228 /* We use char because int might match the return type of a gcc2
12229     builtin and then its argument prototype would still apply.  */
12230 char sasl_client_init();
12231
12232 int main() {
12233 sasl_client_init()
12234 ; return 0; }
12235 EOF
12236 if { (eval echo configure:12237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12237   rm -rf conftest*
12238   eval "ac_cv_lib_$ac_lib_var=yes"
12239 else
12240   echo "configure: failed program was:" >&5
12241   cat conftest.$ac_ext >&5
12242   rm -rf conftest*
12243   eval "ac_cv_lib_$ac_lib_var=no"
12244 fi
12245 rm -f conftest*
12246 LIBS="$ac_save_LIBS"
12247
12248 fi
12249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12250   echo "$ac_t""yes" 1>&6
12251   have_cyrus_sasl=yes
12252 else
12253   echo "$ac_t""no" 1>&6
12254 have_cyrus_sasl=no
12255 fi
12256
12257
12258                 if test $have_cyrus_sasl != no ; then
12259                         SASL_LIBS="-lsasl"
12260                         cat >> confdefs.h <<\EOF
12261 #define HAVE_CYRUS_SASL 1
12262 EOF
12263
12264                         ol_link_sasl=yes
12265                 fi
12266         fi
12267
12268         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12269                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12270         fi
12271 fi
12272
12273 ol_link_fetch=no
12274 if test $ol_with_fetch != no ; then
12275         ol=$LIBS
12276 LIBS="-lfetch -lcom_err $LIBS"
12277 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12278 echo "configure:12279: checking fetch(3) library" >&5
12279 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12280   echo $ac_n "(cached) $ac_c" 1>&6
12281 else
12282   
12283         cat > conftest.$ac_ext <<EOF
12284 #line 12285 "configure"
12285 #include "confdefs.h"
12286
12287 #include <sys/param.h>
12288 #include <stdio.h>
12289 #include <fetch.h>
12290 int main() {
12291 struct url *u = fetchParseURL("file:///"); 
12292 ; return 0; }
12293 EOF
12294 if { (eval echo configure:12295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12295   rm -rf conftest*
12296   ol_cv_lib_fetch=yes
12297 else
12298   echo "configure: failed program was:" >&5
12299   cat conftest.$ac_ext >&5
12300   rm -rf conftest*
12301   ol_cv_lib_fetch=no
12302 fi
12303 rm -f conftest*
12304 fi
12305
12306 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12307 LIBS=$ol_LIBS
12308 if test $ol_cv_lib_fetch != no ; then
12309         ol_link_fetch="-lfetch -lcom_err"
12310         cat >> confdefs.h <<\EOF
12311 #define HAVE_FETCH 1
12312 EOF
12313
12314 fi
12315
12316
12317         if test $ol_cv_lib_fetch != no ; then
12318                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12319                 ol_link_fetch=freebsd
12320
12321         elif test $ol_with_fetch != auto ; then
12322                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12323         fi 
12324 fi
12325
12326 ol_link_readline=no
12327 if test $ol_with_readline != no ; then
12328         for ac_hdr in readline/readline.h readline/history.h
12329 do
12330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12332 echo "configure:12333: checking for $ac_hdr" >&5
12333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12334   echo $ac_n "(cached) $ac_c" 1>&6
12335 else
12336   cat > conftest.$ac_ext <<EOF
12337 #line 12338 "configure"
12338 #include "confdefs.h"
12339 #include <$ac_hdr>
12340 EOF
12341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12342 { (eval echo configure:12343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12344 if test -z "$ac_err"; then
12345   rm -rf conftest*
12346   eval "ac_cv_header_$ac_safe=yes"
12347 else
12348   echo "$ac_err" >&5
12349   echo "configure: failed program was:" >&5
12350   cat conftest.$ac_ext >&5
12351   rm -rf conftest*
12352   eval "ac_cv_header_$ac_safe=no"
12353 fi
12354 rm -f conftest*
12355 fi
12356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12357   echo "$ac_t""yes" 1>&6
12358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12359   cat >> confdefs.h <<EOF
12360 #define $ac_tr_hdr 1
12361 EOF
12362  
12363 else
12364   echo "$ac_t""no" 1>&6
12365 fi
12366 done
12367
12368
12369         if test $ac_cv_header_readline_readline_h = yes ; then
12370                 save_LIBS="$LIBS"
12371                 LIBS="$TERMCAP_LIBS $LIBS"
12372                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12373 echo "configure:12374: checking for readline in -lreadline" >&5
12374 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12376   echo $ac_n "(cached) $ac_c" 1>&6
12377 else
12378   ac_save_LIBS="$LIBS"
12379 LIBS="-lreadline  $LIBS"
12380 cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 /* We use char because int might match the return type of a gcc2
12385     builtin and then its argument prototype would still apply.  */
12386 char readline();
12387
12388 int main() {
12389 readline()
12390 ; return 0; }
12391 EOF
12392 if { (eval echo configure:12393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12393   rm -rf conftest*
12394   eval "ac_cv_lib_$ac_lib_var=yes"
12395 else
12396   echo "configure: failed program was:" >&5
12397   cat conftest.$ac_ext >&5
12398   rm -rf conftest*
12399   eval "ac_cv_lib_$ac_lib_var=no"
12400 fi
12401 rm -f conftest*
12402 LIBS="$ac_save_LIBS"
12403
12404 fi
12405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12406   echo "$ac_t""yes" 1>&6
12407   have_readline=yes
12408 else
12409   echo "$ac_t""no" 1>&6
12410 have_readline=no
12411 fi
12412
12413                 LIBS="$save_LIBS"
12414                         
12415                 if test $have_readline = yes ; then
12416                         ol_with_readline=found
12417                         ol_link_readline=yes
12418
12419                         READLINE_LIBS="-lreadline"
12420                 fi
12421         fi
12422 fi
12423
12424 if test $ol_link_readline = yes ; then
12425         cat >> confdefs.h <<\EOF
12426 #define HAVE_READLINE 1
12427 EOF
12428
12429 fi
12430
12431
12432 if test $ol_enable_crypt != no ; then
12433         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12434 echo "configure:12435: checking for crypt" >&5
12435 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12436   echo $ac_n "(cached) $ac_c" 1>&6
12437 else
12438   cat > conftest.$ac_ext <<EOF
12439 #line 12440 "configure"
12440 #include "confdefs.h"
12441 /* System header to define __stub macros and hopefully few prototypes,
12442     which can conflict with char crypt(); below.  */
12443 #include <assert.h>
12444 /* Override any gcc2 internal prototype to avoid an error.  */
12445 /* We use char because int might match the return type of a gcc2
12446     builtin and then its argument prototype would still apply.  */
12447 char crypt();
12448 char (*f)();
12449
12450 int main() {
12451
12452 /* The GNU C library defines this for functions which it implements
12453     to always fail with ENOSYS.  Some functions are actually named
12454     something starting with __ and the normal name is an alias.  */
12455 #if defined (__stub_crypt) || defined (__stub___crypt)
12456 choke me
12457 #else
12458 f = crypt;
12459 #endif
12460
12461 ; return 0; }
12462 EOF
12463 if { (eval echo configure:12464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12464   rm -rf conftest*
12465   eval "ac_cv_func_crypt=yes"
12466 else
12467   echo "configure: failed program was:" >&5
12468   cat conftest.$ac_ext >&5
12469   rm -rf conftest*
12470   eval "ac_cv_func_crypt=no"
12471 fi
12472 rm -f conftest*
12473 fi
12474
12475 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12476   echo "$ac_t""yes" 1>&6
12477   have_crypt=yes
12478 else
12479   echo "$ac_t""no" 1>&6
12480
12481                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12482 echo "configure:12483: checking for crypt in -lcrypt" >&5
12483 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12484 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12485   echo $ac_n "(cached) $ac_c" 1>&6
12486 else
12487   ac_save_LIBS="$LIBS"
12488 LIBS="-lcrypt  $LIBS"
12489 cat > conftest.$ac_ext <<EOF
12490 #line 12491 "configure"
12491 #include "confdefs.h"
12492 /* Override any gcc2 internal prototype to avoid an error.  */
12493 /* We use char because int might match the return type of a gcc2
12494     builtin and then its argument prototype would still apply.  */
12495 char crypt();
12496
12497 int main() {
12498 crypt()
12499 ; return 0; }
12500 EOF
12501 if { (eval echo configure:12502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12502   rm -rf conftest*
12503   eval "ac_cv_lib_$ac_lib_var=yes"
12504 else
12505   echo "configure: failed program was:" >&5
12506   cat conftest.$ac_ext >&5
12507   rm -rf conftest*
12508   eval "ac_cv_lib_$ac_lib_var=no"
12509 fi
12510 rm -f conftest*
12511 LIBS="$ac_save_LIBS"
12512
12513 fi
12514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12515   echo "$ac_t""yes" 1>&6
12516   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12517                         have_crypt=yes
12518 else
12519   echo "$ac_t""no" 1>&6
12520 have_crypt=no
12521 fi
12522
12523 fi
12524
12525
12526         if test $have_crypt = yes ; then
12527                 cat >> confdefs.h <<\EOF
12528 #define HAVE_CRYPT 1
12529 EOF
12530
12531         else
12532                 echo "configure: warning: could not find crypt" 1>&2
12533                 if test $ol_enable_crypt = yes ; then
12534                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12535                 fi
12536
12537                 echo "configure: warning: disabling crypt support" 1>&2
12538                 ol_enable_crypt=no
12539         fi
12540 fi
12541
12542 if test $ol_enable_proctitle != no ; then
12543         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12544 echo "configure:12545: checking for setproctitle" >&5
12545 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12546   echo $ac_n "(cached) $ac_c" 1>&6
12547 else
12548   cat > conftest.$ac_ext <<EOF
12549 #line 12550 "configure"
12550 #include "confdefs.h"
12551 /* System header to define __stub macros and hopefully few prototypes,
12552     which can conflict with char setproctitle(); below.  */
12553 #include <assert.h>
12554 /* Override any gcc2 internal prototype to avoid an error.  */
12555 /* We use char because int might match the return type of a gcc2
12556     builtin and then its argument prototype would still apply.  */
12557 char setproctitle();
12558 char (*f)();
12559
12560 int main() {
12561
12562 /* The GNU C library defines this for functions which it implements
12563     to always fail with ENOSYS.  Some functions are actually named
12564     something starting with __ and the normal name is an alias.  */
12565 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12566 choke me
12567 #else
12568 f = setproctitle;
12569 #endif
12570
12571 ; return 0; }
12572 EOF
12573 if { (eval echo configure:12574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12574   rm -rf conftest*
12575   eval "ac_cv_func_setproctitle=yes"
12576 else
12577   echo "configure: failed program was:" >&5
12578   cat conftest.$ac_ext >&5
12579   rm -rf conftest*
12580   eval "ac_cv_func_setproctitle=no"
12581 fi
12582 rm -f conftest*
12583 fi
12584
12585 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12586   echo "$ac_t""yes" 1>&6
12587   have_setproctitle=yes
12588 else
12589   echo "$ac_t""no" 1>&6
12590
12591                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12592 echo "configure:12593: checking for setproctitle in -lutil" >&5
12593 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12595   echo $ac_n "(cached) $ac_c" 1>&6
12596 else
12597   ac_save_LIBS="$LIBS"
12598 LIBS="-lutil  $LIBS"
12599 cat > conftest.$ac_ext <<EOF
12600 #line 12601 "configure"
12601 #include "confdefs.h"
12602 /* Override any gcc2 internal prototype to avoid an error.  */
12603 /* We use char because int might match the return type of a gcc2
12604     builtin and then its argument prototype would still apply.  */
12605 char setproctitle();
12606
12607 int main() {
12608 setproctitle()
12609 ; return 0; }
12610 EOF
12611 if { (eval echo configure:12612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12612   rm -rf conftest*
12613   eval "ac_cv_lib_$ac_lib_var=yes"
12614 else
12615   echo "configure: failed program was:" >&5
12616   cat conftest.$ac_ext >&5
12617   rm -rf conftest*
12618   eval "ac_cv_lib_$ac_lib_var=no"
12619 fi
12620 rm -f conftest*
12621 LIBS="$ac_save_LIBS"
12622
12623 fi
12624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12625   echo "$ac_t""yes" 1>&6
12626   have_setproctitle=yes
12627                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12628 else
12629   echo "$ac_t""no" 1>&6
12630 have_setproctitle=no
12631                         LIBOBJS="$LIBOBJS setproctitle.o"
12632 fi
12633
12634 fi
12635
12636
12637         if test $have_setproctitle = yes ; then
12638                 cat >> confdefs.h <<\EOF
12639 #define HAVE_SETPROCTITLE 1
12640 EOF
12641
12642         fi
12643 fi
12644
12645 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12646 echo "configure:12647: checking for uid_t in sys/types.h" >&5
12647 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12648   echo $ac_n "(cached) $ac_c" 1>&6
12649 else
12650   cat > conftest.$ac_ext <<EOF
12651 #line 12652 "configure"
12652 #include "confdefs.h"
12653 #include <sys/types.h>
12654 EOF
12655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12656   egrep "uid_t" >/dev/null 2>&1; then
12657   rm -rf conftest*
12658   ac_cv_type_uid_t=yes
12659 else
12660   rm -rf conftest*
12661   ac_cv_type_uid_t=no
12662 fi
12663 rm -f conftest*
12664
12665 fi
12666
12667 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12668 if test $ac_cv_type_uid_t = no; then
12669   cat >> confdefs.h <<\EOF
12670 #define uid_t int
12671 EOF
12672
12673   cat >> confdefs.h <<\EOF
12674 #define gid_t int
12675 EOF
12676
12677 fi
12678
12679 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12680 echo "configure:12681: checking type of array argument to getgroups" >&5
12681 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12682   echo $ac_n "(cached) $ac_c" 1>&6
12683 else
12684   if test "$cross_compiling" = yes; then
12685   ac_cv_type_getgroups=cross
12686 else
12687   cat > conftest.$ac_ext <<EOF
12688 #line 12689 "configure"
12689 #include "confdefs.h"
12690
12691 /* Thanks to Mike Rendell for this test.  */
12692 #include <sys/types.h>
12693 #define NGID 256
12694 #undef MAX
12695 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12696 main()
12697 {
12698   gid_t gidset[NGID];
12699   int i, n;
12700   union { gid_t gval; long lval; }  val;
12701
12702   val.lval = -1;
12703   for (i = 0; i < NGID; i++)
12704     gidset[i] = val.gval;
12705   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12706                  gidset);
12707   /* Exit non-zero if getgroups seems to require an array of ints.  This
12708      happens when gid_t is short but getgroups modifies an array of ints.  */
12709   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12710 }
12711
12712 EOF
12713 if { (eval echo configure:12714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12714 then
12715     ac_cv_type_getgroups=gid_t
12716 else
12717   echo "configure: failed program was:" >&5
12718   cat conftest.$ac_ext >&5
12719   rm -fr conftest*
12720   ac_cv_type_getgroups=int
12721 fi
12722 rm -fr conftest*
12723 fi
12724
12725 if test $ac_cv_type_getgroups = cross; then
12726         cat > conftest.$ac_ext <<EOF
12727 #line 12728 "configure"
12728 #include "confdefs.h"
12729 #include <unistd.h>
12730 EOF
12731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12732   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12733   rm -rf conftest*
12734   ac_cv_type_getgroups=gid_t
12735 else
12736   rm -rf conftest*
12737   ac_cv_type_getgroups=int
12738 fi
12739 rm -f conftest*
12740
12741 fi
12742 fi
12743
12744 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12745 cat >> confdefs.h <<EOF
12746 #define GETGROUPS_T $ac_cv_type_getgroups
12747 EOF
12748
12749  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12750 echo "configure:12751: checking for ANSI C header files" >&5
12751 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12752   echo $ac_n "(cached) $ac_c" 1>&6
12753 else
12754   cat > conftest.$ac_ext <<EOF
12755 #line 12756 "configure"
12756 #include "confdefs.h"
12757 #include <stdlib.h>
12758 #include <stdarg.h>
12759 #include <string.h>
12760 #include <float.h>
12761 EOF
12762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12763 { (eval echo configure:12764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12765 if test -z "$ac_err"; then
12766   rm -rf conftest*
12767   ac_cv_header_stdc=yes
12768 else
12769   echo "$ac_err" >&5
12770   echo "configure: failed program was:" >&5
12771   cat conftest.$ac_ext >&5
12772   rm -rf conftest*
12773   ac_cv_header_stdc=no
12774 fi
12775 rm -f conftest*
12776
12777 if test $ac_cv_header_stdc = yes; then
12778   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12779 cat > conftest.$ac_ext <<EOF
12780 #line 12781 "configure"
12781 #include "confdefs.h"
12782 #include <string.h>
12783 EOF
12784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12785   egrep "memchr" >/dev/null 2>&1; then
12786   :
12787 else
12788   rm -rf conftest*
12789   ac_cv_header_stdc=no
12790 fi
12791 rm -f conftest*
12792
12793 fi
12794
12795 if test $ac_cv_header_stdc = yes; then
12796   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12797 cat > conftest.$ac_ext <<EOF
12798 #line 12799 "configure"
12799 #include "confdefs.h"
12800 #include <stdlib.h>
12801 EOF
12802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12803   egrep "free" >/dev/null 2>&1; then
12804   :
12805 else
12806   rm -rf conftest*
12807   ac_cv_header_stdc=no
12808 fi
12809 rm -f conftest*
12810
12811 fi
12812
12813 if test $ac_cv_header_stdc = yes; then
12814   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12815 if test "$cross_compiling" = yes; then
12816   :
12817 else
12818   cat > conftest.$ac_ext <<EOF
12819 #line 12820 "configure"
12820 #include "confdefs.h"
12821 #include <ctype.h>
12822 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12823 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12824 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12825 int main () { int i; for (i = 0; i < 256; i++)
12826 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12827 exit (0); }
12828
12829 EOF
12830 if { (eval echo configure:12831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12831 then
12832   :
12833 else
12834   echo "configure: failed program was:" >&5
12835   cat conftest.$ac_ext >&5
12836   rm -fr conftest*
12837   ac_cv_header_stdc=no
12838 fi
12839 rm -fr conftest*
12840 fi
12841
12842 fi
12843 fi
12844
12845 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12846 if test $ac_cv_header_stdc = yes; then
12847   cat >> confdefs.h <<\EOF
12848 #define STDC_HEADERS 1
12849 EOF
12850
12851 fi
12852
12853 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12854 echo "configure:12855: checking for mode_t" >&5
12855 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12856   echo $ac_n "(cached) $ac_c" 1>&6
12857 else
12858   cat > conftest.$ac_ext <<EOF
12859 #line 12860 "configure"
12860 #include "confdefs.h"
12861 #include <sys/types.h>
12862 #if STDC_HEADERS
12863 #include <stdlib.h>
12864 #include <stddef.h>
12865 #endif
12866 EOF
12867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12868   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12869   rm -rf conftest*
12870   eval "ac_cv_type_mode_t=yes"
12871 else
12872   rm -rf conftest*
12873   eval "ac_cv_type_mode_t=no"
12874 fi
12875 rm -f conftest*
12876
12877 fi
12878 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12879   echo "$ac_t""yes" 1>&6
12880 else
12881   echo "$ac_t""no" 1>&6
12882   cat >> confdefs.h <<EOF
12883 #define mode_t int
12884 EOF
12885
12886 fi
12887
12888 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12889 echo "configure:12890: checking for off_t" >&5
12890 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12891   echo $ac_n "(cached) $ac_c" 1>&6
12892 else
12893   cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896 #include <sys/types.h>
12897 #if STDC_HEADERS
12898 #include <stdlib.h>
12899 #include <stddef.h>
12900 #endif
12901 EOF
12902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12903   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12904   rm -rf conftest*
12905   eval "ac_cv_type_off_t=yes"
12906 else
12907   rm -rf conftest*
12908   eval "ac_cv_type_off_t=no"
12909 fi
12910 rm -f conftest*
12911
12912 fi
12913 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12914   echo "$ac_t""yes" 1>&6
12915 else
12916   echo "$ac_t""no" 1>&6
12917   cat >> confdefs.h <<EOF
12918 #define off_t long
12919 EOF
12920
12921 fi
12922
12923 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12924 echo "configure:12925: checking for pid_t" >&5
12925 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12926   echo $ac_n "(cached) $ac_c" 1>&6
12927 else
12928   cat > conftest.$ac_ext <<EOF
12929 #line 12930 "configure"
12930 #include "confdefs.h"
12931 #include <sys/types.h>
12932 #if STDC_HEADERS
12933 #include <stdlib.h>
12934 #include <stddef.h>
12935 #endif
12936 EOF
12937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12938   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12939   rm -rf conftest*
12940   eval "ac_cv_type_pid_t=yes"
12941 else
12942   rm -rf conftest*
12943   eval "ac_cv_type_pid_t=no"
12944 fi
12945 rm -f conftest*
12946
12947 fi
12948 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12949   echo "$ac_t""yes" 1>&6
12950 else
12951   echo "$ac_t""no" 1>&6
12952   cat >> confdefs.h <<EOF
12953 #define pid_t int
12954 EOF
12955
12956 fi
12957
12958 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12959 echo "configure:12960: checking for ptrdiff_t" >&5
12960 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12961   echo $ac_n "(cached) $ac_c" 1>&6
12962 else
12963   cat > conftest.$ac_ext <<EOF
12964 #line 12965 "configure"
12965 #include "confdefs.h"
12966 #include <stddef.h>
12967 int main() {
12968 ptrdiff_t p
12969 ; return 0; }
12970 EOF
12971 if { (eval echo configure:12972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12972   rm -rf conftest*
12973   am_cv_type_ptrdiff_t=yes
12974 else
12975   echo "configure: failed program was:" >&5
12976   cat conftest.$ac_ext >&5
12977   rm -rf conftest*
12978   am_cv_type_ptrdiff_t=no
12979 fi
12980 rm -f conftest*
12981 fi
12982
12983 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12984    if test $am_cv_type_ptrdiff_t = yes; then
12985      cat >> confdefs.h <<\EOF
12986 #define HAVE_PTRDIFF_T 1
12987 EOF
12988
12989    fi
12990
12991 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12992 echo "configure:12993: checking return type of signal handlers" >&5
12993 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12994   echo $ac_n "(cached) $ac_c" 1>&6
12995 else
12996   cat > conftest.$ac_ext <<EOF
12997 #line 12998 "configure"
12998 #include "confdefs.h"
12999 #include <sys/types.h>
13000 #include <signal.h>
13001 #ifdef signal
13002 #undef signal
13003 #endif
13004 #ifdef __cplusplus
13005 extern "C" void (*signal (int, void (*)(int)))(int);
13006 #else
13007 void (*signal ()) ();
13008 #endif
13009
13010 int main() {
13011 int i;
13012 ; return 0; }
13013 EOF
13014 if { (eval echo configure:13015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13015   rm -rf conftest*
13016   ac_cv_type_signal=void
13017 else
13018   echo "configure: failed program was:" >&5
13019   cat conftest.$ac_ext >&5
13020   rm -rf conftest*
13021   ac_cv_type_signal=int
13022 fi
13023 rm -f conftest*
13024 fi
13025
13026 echo "$ac_t""$ac_cv_type_signal" 1>&6
13027 cat >> confdefs.h <<EOF
13028 #define RETSIGTYPE $ac_cv_type_signal
13029 EOF
13030
13031
13032 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13033 echo "configure:13034: checking for sig_atomic_t" >&5
13034 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13035   echo $ac_n "(cached) $ac_c" 1>&6
13036 else
13037   cat > conftest.$ac_ext <<EOF
13038 #line 13039 "configure"
13039 #include "confdefs.h"
13040 #include <signal.h>
13041 int main() {
13042 sig_atomic_t atomic;
13043 ; return 0; }
13044 EOF
13045 if { (eval echo configure:13046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13046   rm -rf conftest*
13047   ol_cv_type_sig_atomic_t=yes
13048 else
13049   echo "configure: failed program was:" >&5
13050   cat conftest.$ac_ext >&5
13051   rm -rf conftest*
13052   ol_cv_type_sig_atomic_t=no
13053 fi
13054 rm -f conftest*
13055 fi
13056
13057 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13058   if test $ol_cv_type_sig_atomic_t = no; then
13059     cat >> confdefs.h <<\EOF
13060 #define sig_atomic_t int
13061 EOF
13062
13063   fi
13064  
13065 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13066 echo "configure:13067: checking for size_t" >&5
13067 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13068   echo $ac_n "(cached) $ac_c" 1>&6
13069 else
13070   cat > conftest.$ac_ext <<EOF
13071 #line 13072 "configure"
13072 #include "confdefs.h"
13073 #include <sys/types.h>
13074 #if STDC_HEADERS
13075 #include <stdlib.h>
13076 #include <stddef.h>
13077 #endif
13078 EOF
13079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13080   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13081   rm -rf conftest*
13082   eval "ac_cv_type_size_t=yes"
13083 else
13084   rm -rf conftest*
13085   eval "ac_cv_type_size_t=no"
13086 fi
13087 rm -f conftest*
13088
13089 fi
13090 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13091   echo "$ac_t""yes" 1>&6
13092 else
13093   echo "$ac_t""no" 1>&6
13094   cat >> confdefs.h <<EOF
13095 #define size_t unsigned
13096 EOF
13097
13098 fi
13099
13100 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13101 echo "configure:13102: checking for socklen_t" >&5
13102 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13103   echo $ac_n "(cached) $ac_c" 1>&6
13104 else
13105   cat > conftest.$ac_ext <<EOF
13106 #line 13107 "configure"
13107 #include "confdefs.h"
13108
13109 #ifdef HAVE_SYS_TYPES_H
13110 #include <sys/types.h>
13111 #endif
13112 #ifdef HAVE_SYS_SOCKET_H
13113 #include <sys/socket.h>
13114 #endif
13115
13116 int main() {
13117 socklen_t len;
13118 ; return 0; }
13119 EOF
13120 if { (eval echo configure:13121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13121   rm -rf conftest*
13122   ol_cv_type_socklen_t=yes
13123 else
13124   echo "configure: failed program was:" >&5
13125   cat conftest.$ac_ext >&5
13126   rm -rf conftest*
13127   ol_cv_type_socklen_t=no
13128 fi
13129 rm -f conftest*
13130 fi
13131
13132 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13133   if test $ol_cv_type_socklen_t = no; then
13134     cat >> confdefs.h <<\EOF
13135 #define socklen_t int
13136 EOF
13137
13138   fi
13139  
13140 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13141 echo "configure:13142: checking for member st_blksize in aggregate type struct stat" >&5
13142 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13143   echo $ac_n "(cached) $ac_c" 1>&6
13144 else
13145   cat > conftest.$ac_ext <<EOF
13146 #line 13147 "configure"
13147 #include "confdefs.h"
13148 #include <sys/types.h>
13149 #include <sys/stat.h>
13150 int main() {
13151 struct stat foo; foo.st_blksize;
13152 ; return 0; }
13153 EOF
13154 if { (eval echo configure:13155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13155   rm -rf conftest*
13156   ac_cv_c_struct_member_st_blksize=yes
13157 else
13158   echo "configure: failed program was:" >&5
13159   cat conftest.$ac_ext >&5
13160   rm -rf conftest*
13161   ac_cv_c_struct_member_st_blksize=no
13162 fi
13163 rm -f conftest*
13164 fi
13165
13166 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13167 st_blksize="$ac_cv_c_struct_member_st_blksize"
13168 if test $ac_cv_c_struct_member_st_blksize = yes; then
13169   cat >> confdefs.h <<\EOF
13170 #define HAVE_ST_BLKSIZE 1
13171 EOF
13172
13173 fi
13174
13175 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13176 echo "configure:13177: checking whether time.h and sys/time.h may both be included" >&5
13177 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13178   echo $ac_n "(cached) $ac_c" 1>&6
13179 else
13180   cat > conftest.$ac_ext <<EOF
13181 #line 13182 "configure"
13182 #include "confdefs.h"
13183 #include <sys/types.h>
13184 #include <sys/time.h>
13185 #include <time.h>
13186 int main() {
13187 struct tm *tp;
13188 ; return 0; }
13189 EOF
13190 if { (eval echo configure:13191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13191   rm -rf conftest*
13192   ac_cv_header_time=yes
13193 else
13194   echo "configure: failed program was:" >&5
13195   cat conftest.$ac_ext >&5
13196   rm -rf conftest*
13197   ac_cv_header_time=no
13198 fi
13199 rm -f conftest*
13200 fi
13201
13202 echo "$ac_t""$ac_cv_header_time" 1>&6
13203 if test $ac_cv_header_time = yes; then
13204   cat >> confdefs.h <<\EOF
13205 #define TIME_WITH_SYS_TIME 1
13206 EOF
13207
13208 fi
13209
13210 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13211 echo "configure:13212: checking whether struct tm is in sys/time.h or time.h" >&5
13212 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13213   echo $ac_n "(cached) $ac_c" 1>&6
13214 else
13215   cat > conftest.$ac_ext <<EOF
13216 #line 13217 "configure"
13217 #include "confdefs.h"
13218 #include <sys/types.h>
13219 #include <time.h>
13220 int main() {
13221 struct tm *tp; tp->tm_sec;
13222 ; return 0; }
13223 EOF
13224 if { (eval echo configure:13225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13225   rm -rf conftest*
13226   ac_cv_struct_tm=time.h
13227 else
13228   echo "configure: failed program was:" >&5
13229   cat conftest.$ac_ext >&5
13230   rm -rf conftest*
13231   ac_cv_struct_tm=sys/time.h
13232 fi
13233 rm -f conftest*
13234 fi
13235
13236 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13237 if test $ac_cv_struct_tm = sys/time.h; then
13238   cat >> confdefs.h <<\EOF
13239 #define TM_IN_SYS_TIME 1
13240 EOF
13241
13242 fi
13243
13244 # test for pw_gecos in struct passwd
13245 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13246 echo "configure:13247: checking struct passwd for pw_gecos" >&5
13247 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13248   echo $ac_n "(cached) $ac_c" 1>&6
13249 else
13250   
13251         cat > conftest.$ac_ext <<EOF
13252 #line 13253 "configure"
13253 #include "confdefs.h"
13254 #include <pwd.h>
13255 int main() {
13256
13257         struct passwd pwd;
13258         pwd.pw_gecos = pwd.pw_name;
13259
13260 ; return 0; }
13261 EOF
13262 if { (eval echo configure:13263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13263   rm -rf conftest*
13264   ol_cv_struct_passwd_pw_gecos=yes
13265 else
13266   echo "configure: failed program was:" >&5
13267   cat conftest.$ac_ext >&5
13268   rm -rf conftest*
13269   ol_cv_struct_passwd_pw_gecos=no
13270 fi
13271 rm -f conftest*
13272 fi
13273
13274 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13275 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13276         cat >> confdefs.h <<\EOF
13277 #define HAVE_PW_GECOS 1
13278 EOF
13279
13280 fi
13281
13282 # test for pw_passwd in struct passwd
13283 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13284 echo "configure:13285: checking struct passwd for pw_passwd" >&5
13285 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13286   echo $ac_n "(cached) $ac_c" 1>&6
13287 else
13288   
13289         cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292 #include <pwd.h>
13293 int main() {
13294
13295         struct passwd pwd;
13296         pwd.pw_passwd = pwd.pw_name;
13297
13298 ; return 0; }
13299 EOF
13300 if { (eval echo configure:13301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13301   rm -rf conftest*
13302   ol_cv_struct_passwd_pw_passwd=yes
13303 else
13304   echo "configure: failed program was:" >&5
13305   cat conftest.$ac_ext >&5
13306   rm -rf conftest*
13307   ol_cv_struct_passwd_pw_passwd=no
13308 fi
13309 rm -f conftest*
13310 fi
13311
13312 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13313 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13314         cat >> confdefs.h <<\EOF
13315 #define HAVE_PW_PASSWD 1
13316 EOF
13317
13318 fi
13319
13320
13321 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13322 echo "configure:13323: checking if toupper() requires islower()" >&5
13323 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13324   echo $ac_n "(cached) $ac_c" 1>&6
13325 else
13326   
13327         if test "$cross_compiling" = yes; then
13328   ol_cv_c_upper_lower=safe
13329 else
13330   cat > conftest.$ac_ext <<EOF
13331 #line 13332 "configure"
13332 #include "confdefs.h"
13333
13334 #include <ctype.h>
13335 main()
13336 {
13337         if ('C' == toupper('C'))
13338                 exit(0);
13339         else
13340                 exit(1);
13341 }
13342 EOF
13343 if { (eval echo configure:13344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13344 then
13345   ol_cv_c_upper_lower=no
13346 else
13347   echo "configure: failed program was:" >&5
13348   cat conftest.$ac_ext >&5
13349   rm -fr conftest*
13350   ol_cv_c_upper_lower=yes
13351 fi
13352 rm -fr conftest*
13353 fi
13354
13355 fi
13356
13357 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13358 if test $ol_cv_c_upper_lower != no ; then
13359         cat >> confdefs.h <<\EOF
13360 #define C_UPPER_LOWER 1
13361 EOF
13362
13363 fi
13364
13365 echo $ac_n "checking for working const""... $ac_c" 1>&6
13366 echo "configure:13367: checking for working const" >&5
13367 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13368   echo $ac_n "(cached) $ac_c" 1>&6
13369 else
13370   cat > conftest.$ac_ext <<EOF
13371 #line 13372 "configure"
13372 #include "confdefs.h"
13373
13374 int main() {
13375
13376 /* Ultrix mips cc rejects this.  */
13377 typedef int charset[2]; const charset x;
13378 /* SunOS 4.1.1 cc rejects this.  */
13379 char const *const *ccp;
13380 char **p;
13381 /* NEC SVR4.0.2 mips cc rejects this.  */
13382 struct point {int x, y;};
13383 static struct point const zero = {0,0};
13384 /* AIX XL C 1.02.0.0 rejects this.
13385    It does not let you subtract one const X* pointer from another in an arm
13386    of an if-expression whose if-part is not a constant expression */
13387 const char *g = "string";
13388 ccp = &g + (g ? g-g : 0);
13389 /* HPUX 7.0 cc rejects these. */
13390 ++ccp;
13391 p = (char**) ccp;
13392 ccp = (char const *const *) p;
13393 { /* SCO 3.2v4 cc rejects this.  */
13394   char *t;
13395   char const *s = 0 ? (char *) 0 : (char const *) 0;
13396
13397   *t++ = 0;
13398 }
13399 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13400   int x[] = {25, 17};
13401   const int *foo = &x[0];
13402   ++foo;
13403 }
13404 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13405   typedef const int *iptr;
13406   iptr p = 0;
13407   ++p;
13408 }
13409 { /* AIX XL C 1.02.0.0 rejects this saying
13410      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13411   struct s { int j; const int *ap[3]; };
13412   struct s *b; b->j = 5;
13413 }
13414 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13415   const int foo = 10;
13416 }
13417
13418 ; return 0; }
13419 EOF
13420 if { (eval echo configure:13421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13421   rm -rf conftest*
13422   ac_cv_c_const=yes
13423 else
13424   echo "configure: failed program was:" >&5
13425   cat conftest.$ac_ext >&5
13426   rm -rf conftest*
13427   ac_cv_c_const=no
13428 fi
13429 rm -f conftest*
13430 fi
13431
13432 echo "$ac_t""$ac_cv_c_const" 1>&6
13433 if test $ac_cv_c_const = no; then
13434   cat >> confdefs.h <<\EOF
13435 #define const 
13436 EOF
13437
13438 fi
13439
13440 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13441 echo "configure:13442: checking if compiler understands volatile" >&5
13442 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13443   echo $ac_n "(cached) $ac_c" 1>&6
13444 else
13445   cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448 int x, y, z;
13449 int main() {
13450 volatile int a; int * volatile b = x ? &y : &z;
13451       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13452       *b = 0;
13453 ; return 0; }
13454 EOF
13455 if { (eval echo configure:13456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13456   rm -rf conftest*
13457   ol_cv_c_volatile=yes
13458 else
13459   echo "configure: failed program was:" >&5
13460   cat conftest.$ac_ext >&5
13461   rm -rf conftest*
13462   ol_cv_c_volatile=no
13463 fi
13464 rm -f conftest*
13465 fi
13466
13467 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13468   if test $ol_cv_c_volatile = yes; then
13469     : 
13470   else
13471     cat >> confdefs.h <<\EOF
13472 #define volatile 
13473 EOF
13474
13475   fi
13476  
13477
13478 if test $cross_compiling = yes ; then
13479         cat >> confdefs.h <<\EOF
13480 #define CROSS_COMPILING 1
13481 EOF
13482
13483
13484         cat >> confdefs.h <<\EOF
13485 #define LBER_INT_T long
13486 EOF
13487
13488         cat >> confdefs.h <<\EOF
13489 #define LBER_TAG_T long
13490 EOF
13491
13492         cat >> confdefs.h <<\EOF
13493 #define LBER_SOCKET_T int
13494 EOF
13495
13496
13497 else
13498         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13499 echo "configure:13500: checking whether byte ordering is bigendian" >&5
13500 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13501   echo $ac_n "(cached) $ac_c" 1>&6
13502 else
13503   ac_cv_c_bigendian=unknown
13504 # See if sys/param.h defines the BYTE_ORDER macro.
13505 cat > conftest.$ac_ext <<EOF
13506 #line 13507 "configure"
13507 #include "confdefs.h"
13508 #include <sys/types.h>
13509 #include <sys/param.h>
13510 int main() {
13511
13512 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13513  bogus endian macros
13514 #endif
13515 ; return 0; }
13516 EOF
13517 if { (eval echo configure:13518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13518   rm -rf conftest*
13519   # It does; now see whether it defined to BIG_ENDIAN or not.
13520 cat > conftest.$ac_ext <<EOF
13521 #line 13522 "configure"
13522 #include "confdefs.h"
13523 #include <sys/types.h>
13524 #include <sys/param.h>
13525 int main() {
13526
13527 #if BYTE_ORDER != BIG_ENDIAN
13528  not big endian
13529 #endif
13530 ; return 0; }
13531 EOF
13532 if { (eval echo configure:13533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13533   rm -rf conftest*
13534   ac_cv_c_bigendian=yes
13535 else
13536   echo "configure: failed program was:" >&5
13537   cat conftest.$ac_ext >&5
13538   rm -rf conftest*
13539   ac_cv_c_bigendian=no
13540 fi
13541 rm -f conftest*
13542 else
13543   echo "configure: failed program was:" >&5
13544   cat conftest.$ac_ext >&5
13545 fi
13546 rm -f conftest*
13547 if test $ac_cv_c_bigendian = unknown; then
13548 if test "$cross_compiling" = yes; then
13549     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13550 else
13551   cat > conftest.$ac_ext <<EOF
13552 #line 13553 "configure"
13553 #include "confdefs.h"
13554 main () {
13555   /* Are we little or big endian?  From Harbison&Steele.  */
13556   union
13557   {
13558     long l;
13559     char c[sizeof (long)];
13560   } u;
13561   u.l = 1;
13562   exit (u.c[sizeof (long) - 1] == 1);
13563 }
13564 EOF
13565 if { (eval echo configure:13566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13566 then
13567   ac_cv_c_bigendian=no
13568 else
13569   echo "configure: failed program was:" >&5
13570   cat conftest.$ac_ext >&5
13571   rm -fr conftest*
13572   ac_cv_c_bigendian=yes
13573 fi
13574 rm -fr conftest*
13575 fi
13576
13577 fi
13578 fi
13579
13580 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13581 if test $ac_cv_c_bigendian = yes; then
13582   cat >> confdefs.h <<\EOF
13583 #define WORDS_BIGENDIAN 1
13584 EOF
13585
13586 fi
13587
13588         echo $ac_n "checking size of short""... $ac_c" 1>&6
13589 echo "configure:13590: checking size of short" >&5
13590 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13591   echo $ac_n "(cached) $ac_c" 1>&6
13592 else
13593   if test "$cross_compiling" = yes; then
13594     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13595 else
13596   cat > conftest.$ac_ext <<EOF
13597 #line 13598 "configure"
13598 #include "confdefs.h"
13599 #include <stdio.h>
13600 main()
13601 {
13602   FILE *f=fopen("conftestval", "w");
13603   if (!f) exit(1);
13604   fprintf(f, "%d\n", sizeof(short));
13605   exit(0);
13606 }
13607 EOF
13608 if { (eval echo configure:13609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13609 then
13610   ac_cv_sizeof_short=`cat conftestval`
13611 else
13612   echo "configure: failed program was:" >&5
13613   cat conftest.$ac_ext >&5
13614   rm -fr conftest*
13615   ac_cv_sizeof_short=0
13616 fi
13617 rm -fr conftest*
13618 fi
13619
13620 fi
13621 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13622 cat >> confdefs.h <<EOF
13623 #define SIZEOF_SHORT $ac_cv_sizeof_short
13624 EOF
13625
13626  
13627         echo $ac_n "checking size of int""... $ac_c" 1>&6
13628 echo "configure:13629: checking size of int" >&5
13629 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13630   echo $ac_n "(cached) $ac_c" 1>&6
13631 else
13632   if test "$cross_compiling" = yes; then
13633     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13634 else
13635   cat > conftest.$ac_ext <<EOF
13636 #line 13637 "configure"
13637 #include "confdefs.h"
13638 #include <stdio.h>
13639 main()
13640 {
13641   FILE *f=fopen("conftestval", "w");
13642   if (!f) exit(1);
13643   fprintf(f, "%d\n", sizeof(int));
13644   exit(0);
13645 }
13646 EOF
13647 if { (eval echo configure:13648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13648 then
13649   ac_cv_sizeof_int=`cat conftestval`
13650 else
13651   echo "configure: failed program was:" >&5
13652   cat conftest.$ac_ext >&5
13653   rm -fr conftest*
13654   ac_cv_sizeof_int=0
13655 fi
13656 rm -fr conftest*
13657 fi
13658
13659 fi
13660 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13661 cat >> confdefs.h <<EOF
13662 #define SIZEOF_INT $ac_cv_sizeof_int
13663 EOF
13664
13665  
13666         echo $ac_n "checking size of long""... $ac_c" 1>&6
13667 echo "configure:13668: checking size of long" >&5
13668 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13669   echo $ac_n "(cached) $ac_c" 1>&6
13670 else
13671   if test "$cross_compiling" = yes; then
13672     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13673 else
13674   cat > conftest.$ac_ext <<EOF
13675 #line 13676 "configure"
13676 #include "confdefs.h"
13677 #include <stdio.h>
13678 main()
13679 {
13680   FILE *f=fopen("conftestval", "w");
13681   if (!f) exit(1);
13682   fprintf(f, "%d\n", sizeof(long));
13683   exit(0);
13684 }
13685 EOF
13686 if { (eval echo configure:13687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13687 then
13688   ac_cv_sizeof_long=`cat conftestval`
13689 else
13690   echo "configure: failed program was:" >&5
13691   cat conftest.$ac_ext >&5
13692   rm -fr conftest*
13693   ac_cv_sizeof_long=0
13694 fi
13695 rm -fr conftest*
13696 fi
13697
13698 fi
13699 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13700 cat >> confdefs.h <<EOF
13701 #define SIZEOF_LONG $ac_cv_sizeof_long
13702 EOF
13703
13704
13705
13706         if test "$ac_cv_sizeof_int" -lt 4 ; then
13707                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13708
13709                 cat >> confdefs.h <<\EOF
13710 #define LBER_INT_T long
13711 EOF
13712
13713                 cat >> confdefs.h <<\EOF
13714 #define LBER_TAG_T long
13715 EOF
13716
13717                 cat >> confdefs.h <<\EOF
13718 #define LBER_SOCKET_T int
13719 EOF
13720
13721         else
13722                 cat >> confdefs.h <<\EOF
13723 #define LBER_INT_T int
13724 EOF
13725
13726                 cat >> confdefs.h <<\EOF
13727 #define LBER_TAG_T long
13728 EOF
13729
13730                 cat >> confdefs.h <<\EOF
13731 #define LBER_SOCKET_T int
13732 EOF
13733
13734         fi
13735 fi
13736
13737 cat >> confdefs.h <<\EOF
13738 #define LBER_LEN_T long
13739 EOF
13740
13741
13742 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13743 echo "configure:13744: checking for 8-bit clean memcmp" >&5
13744 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13745   echo $ac_n "(cached) $ac_c" 1>&6
13746 else
13747   if test "$cross_compiling" = yes; then
13748   ac_cv_func_memcmp_clean=no
13749 else
13750   cat > conftest.$ac_ext <<EOF
13751 #line 13752 "configure"
13752 #include "confdefs.h"
13753
13754 main()
13755 {
13756   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13757   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13758 }
13759
13760 EOF
13761 if { (eval echo configure:13762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13762 then
13763   ac_cv_func_memcmp_clean=yes
13764 else
13765   echo "configure: failed program was:" >&5
13766   cat conftest.$ac_ext >&5
13767   rm -fr conftest*
13768   ac_cv_func_memcmp_clean=no
13769 fi
13770 rm -fr conftest*
13771 fi
13772
13773 fi
13774
13775 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13776 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13777
13778 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13779 echo "configure:13780: checking for strftime" >&5
13780 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13781   echo $ac_n "(cached) $ac_c" 1>&6
13782 else
13783   cat > conftest.$ac_ext <<EOF
13784 #line 13785 "configure"
13785 #include "confdefs.h"
13786 /* System header to define __stub macros and hopefully few prototypes,
13787     which can conflict with char strftime(); below.  */
13788 #include <assert.h>
13789 /* Override any gcc2 internal prototype to avoid an error.  */
13790 /* We use char because int might match the return type of a gcc2
13791     builtin and then its argument prototype would still apply.  */
13792 char strftime();
13793 char (*f)();
13794
13795 int main() {
13796
13797 /* The GNU C library defines this for functions which it implements
13798     to always fail with ENOSYS.  Some functions are actually named
13799     something starting with __ and the normal name is an alias.  */
13800 #if defined (__stub_strftime) || defined (__stub___strftime)
13801 choke me
13802 #else
13803 f = strftime;
13804 #endif
13805
13806 ; return 0; }
13807 EOF
13808 if { (eval echo configure:13809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13809   rm -rf conftest*
13810   eval "ac_cv_func_strftime=yes"
13811 else
13812   echo "configure: failed program was:" >&5
13813   cat conftest.$ac_ext >&5
13814   rm -rf conftest*
13815   eval "ac_cv_func_strftime=no"
13816 fi
13817 rm -f conftest*
13818 fi
13819
13820 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13821   echo "$ac_t""yes" 1>&6
13822   cat >> confdefs.h <<\EOF
13823 #define HAVE_STRFTIME 1
13824 EOF
13825
13826 else
13827   echo "$ac_t""no" 1>&6
13828 # strftime is in -lintl on SCO UNIX.
13829 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13830 echo "configure:13831: checking for strftime in -lintl" >&5
13831 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13832 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13833   echo $ac_n "(cached) $ac_c" 1>&6
13834 else
13835   ac_save_LIBS="$LIBS"
13836 LIBS="-lintl  $LIBS"
13837 cat > conftest.$ac_ext <<EOF
13838 #line 13839 "configure"
13839 #include "confdefs.h"
13840 /* Override any gcc2 internal prototype to avoid an error.  */
13841 /* We use char because int might match the return type of a gcc2
13842     builtin and then its argument prototype would still apply.  */
13843 char strftime();
13844
13845 int main() {
13846 strftime()
13847 ; return 0; }
13848 EOF
13849 if { (eval echo configure:13850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13850   rm -rf conftest*
13851   eval "ac_cv_lib_$ac_lib_var=yes"
13852 else
13853   echo "configure: failed program was:" >&5
13854   cat conftest.$ac_ext >&5
13855   rm -rf conftest*
13856   eval "ac_cv_lib_$ac_lib_var=no"
13857 fi
13858 rm -f conftest*
13859 LIBS="$ac_save_LIBS"
13860
13861 fi
13862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13863   echo "$ac_t""yes" 1>&6
13864   cat >> confdefs.h <<\EOF
13865 #define HAVE_STRFTIME 1
13866 EOF
13867
13868 LIBS="-lintl $LIBS"
13869 else
13870   echo "$ac_t""no" 1>&6
13871 fi
13872
13873 fi
13874
13875
13876 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13877 echo "configure:13878: checking for inet_aton()" >&5
13878 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13879   echo $ac_n "(cached) $ac_c" 1>&6
13880 else
13881   cat > conftest.$ac_ext <<EOF
13882 #line 13883 "configure"
13883 #include "confdefs.h"
13884
13885 #ifdef HAVE_SYS_TYPES_H
13886 #       include <sys/types.h>
13887 #endif
13888 #ifdef HAVE_SYS_SOCKET_H
13889 #       include <sys/socket.h>
13890 #       ifdef HAVE_SYS_SELECT_H
13891 #               include <sys/select.h>
13892 #       endif
13893 #       include <netinet/in.h>
13894 #       ifdef HAVE_ARPA_INET_H
13895 #               include <arpa/inet.h>
13896 #       endif
13897 #endif
13898
13899 int main() {
13900 struct in_addr in;
13901 int rc = inet_aton( "255.255.255.255", &in );
13902 ; return 0; }
13903 EOF
13904 if { (eval echo configure:13905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13905   rm -rf conftest*
13906   ol_cv_func_inet_aton=yes
13907 else
13908   echo "configure: failed program was:" >&5
13909   cat conftest.$ac_ext >&5
13910   rm -rf conftest*
13911   ol_cv_func_inet_aton=no
13912 fi
13913 rm -f conftest*
13914 fi
13915
13916 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13917   if test $ol_cv_func_inet_aton != no; then
13918     cat >> confdefs.h <<\EOF
13919 #define HAVE_INET_ATON 1
13920 EOF
13921
13922   fi
13923  
13924
13925 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13926 echo "configure:13927: checking for vprintf" >&5
13927 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13928   echo $ac_n "(cached) $ac_c" 1>&6
13929 else
13930   cat > conftest.$ac_ext <<EOF
13931 #line 13932 "configure"
13932 #include "confdefs.h"
13933 /* System header to define __stub macros and hopefully few prototypes,
13934     which can conflict with char vprintf(); below.  */
13935 #include <assert.h>
13936 /* Override any gcc2 internal prototype to avoid an error.  */
13937 /* We use char because int might match the return type of a gcc2
13938     builtin and then its argument prototype would still apply.  */
13939 char vprintf();
13940 char (*f)();
13941
13942 int main() {
13943
13944 /* The GNU C library defines this for functions which it implements
13945     to always fail with ENOSYS.  Some functions are actually named
13946     something starting with __ and the normal name is an alias.  */
13947 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13948 choke me
13949 #else
13950 f = vprintf;
13951 #endif
13952
13953 ; return 0; }
13954 EOF
13955 if { (eval echo configure:13956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13956   rm -rf conftest*
13957   eval "ac_cv_func_vprintf=yes"
13958 else
13959   echo "configure: failed program was:" >&5
13960   cat conftest.$ac_ext >&5
13961   rm -rf conftest*
13962   eval "ac_cv_func_vprintf=no"
13963 fi
13964 rm -f conftest*
13965 fi
13966
13967 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13968   echo "$ac_t""yes" 1>&6
13969   cat >> confdefs.h <<\EOF
13970 #define HAVE_VPRINTF 1
13971 EOF
13972
13973 else
13974   echo "$ac_t""no" 1>&6
13975 fi
13976
13977 if test "$ac_cv_func_vprintf" != yes; then
13978 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13979 echo "configure:13980: checking for _doprnt" >&5
13980 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13981   echo $ac_n "(cached) $ac_c" 1>&6
13982 else
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13985 "configure"
13985 #include "confdefs.h"
13986 /* System header to define __stub macros and hopefully few prototypes,
13987     which can conflict with char _doprnt(); below.  */
13988 #include <assert.h>
13989 /* Override any gcc2 internal prototype to avoid an error.  */
13990 /* We use char because int might match the return type of a gcc2
13991     builtin and then its argument prototype would still apply.  */
13992 char _doprnt();
13993 char (*f)();
13994
13995 int main() {
13996
13997 /* The GNU C library defines this for functions which it implements
13998     to always fail with ENOSYS.  Some functions are actually named
13999     something starting with __ and the normal name is an alias.  */
14000 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14001 choke me
14002 #else
14003 f = _doprnt;
14004 #endif
14005
14006 ; return 0; }
14007 EOF
14008 if { (eval echo configure:14009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14009   rm -rf conftest*
14010   eval "ac_cv_func__doprnt=yes"
14011 else
14012   echo "configure: failed program was:" >&5
14013   cat conftest.$ac_ext >&5
14014   rm -rf conftest*
14015   eval "ac_cv_func__doprnt=no"
14016 fi
14017 rm -f conftest*
14018 fi
14019
14020 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14021   echo "$ac_t""yes" 1>&6
14022   cat >> confdefs.h <<\EOF
14023 #define HAVE_DOPRNT 1
14024 EOF
14025
14026 else
14027   echo "$ac_t""no" 1>&6
14028 fi
14029
14030 fi
14031
14032
14033 if test $ac_cv_func_vprintf = yes ; then
14034                 for ac_func in vsnprintf vsprintf
14035 do
14036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14037 echo "configure:14038: checking for $ac_func" >&5
14038 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14039   echo $ac_n "(cached) $ac_c" 1>&6
14040 else
14041   cat > conftest.$ac_ext <<EOF
14042 #line 14043 "configure"
14043 #include "confdefs.h"
14044 /* System header to define __stub macros and hopefully few prototypes,
14045     which can conflict with char $ac_func(); below.  */
14046 #include <assert.h>
14047 /* Override any gcc2 internal prototype to avoid an error.  */
14048 /* We use char because int might match the return type of a gcc2
14049     builtin and then its argument prototype would still apply.  */
14050 char $ac_func();
14051 char (*f)();
14052
14053 int main() {
14054
14055 /* The GNU C library defines this for functions which it implements
14056     to always fail with ENOSYS.  Some functions are actually named
14057     something starting with __ and the normal name is an alias.  */
14058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14059 choke me
14060 #else
14061 f = $ac_func;
14062 #endif
14063
14064 ; return 0; }
14065 EOF
14066 if { (eval echo configure:14067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14067   rm -rf conftest*
14068   eval "ac_cv_func_$ac_func=yes"
14069 else
14070   echo "configure: failed program was:" >&5
14071   cat conftest.$ac_ext >&5
14072   rm -rf conftest*
14073   eval "ac_cv_func_$ac_func=no"
14074 fi
14075 rm -f conftest*
14076 fi
14077
14078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14079   echo "$ac_t""yes" 1>&6
14080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14081   cat >> confdefs.h <<EOF
14082 #define $ac_tr_func 1
14083 EOF
14084  
14085 else
14086   echo "$ac_t""no" 1>&6
14087 fi
14088 done
14089
14090 fi
14091
14092 for ac_func in \
14093         bcopy                   \
14094         closesocket             \
14095         endgrent                \
14096         endpwent                \
14097         flock                   \
14098         getdtablesize   \
14099         getgrgid                \
14100         gethostname             \
14101         getpass                 \
14102         getpwuid                \
14103         getpwnam                \
14104         getspnam                \
14105         gettimeofday    \
14106         initgroups              \
14107         lockf                   \
14108         memcpy                  \
14109         memmove                 \
14110         mkstemp                 \
14111         pipe                    \
14112         read                    \
14113         recv                    \
14114         recvfrom                \
14115         setpwfile               \
14116         setgid                  \
14117         setegid                 \
14118         setsid                  \
14119         setuid                  \
14120         seteuid                 \
14121         sigaction               \
14122         signal                  \
14123         sigset                  \
14124         snprintf                \
14125         strdup                  \
14126         strerror                \
14127         strpbrk                 \
14128         strrchr                 \
14129         strsep                  \
14130         strstr                  \
14131         strtol                  \
14132         strtoul                 \
14133         strspn                  \
14134         sysconf                 \
14135         waitpid                 \
14136         wait4                   \
14137         write                   \
14138         send                    \
14139         sendto                  \
14140
14141 do
14142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14143 echo "configure:14144: checking for $ac_func" >&5
14144 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14145   echo $ac_n "(cached) $ac_c" 1>&6
14146 else
14147   cat > conftest.$ac_ext <<EOF
14148 #line 14149 "configure"
14149 #include "confdefs.h"
14150 /* System header to define __stub macros and hopefully few prototypes,
14151     which can conflict with char $ac_func(); below.  */
14152 #include <assert.h>
14153 /* Override any gcc2 internal prototype to avoid an error.  */
14154 /* We use char because int might match the return type of a gcc2
14155     builtin and then its argument prototype would still apply.  */
14156 char $ac_func();
14157 char (*f)();
14158
14159 int main() {
14160
14161 /* The GNU C library defines this for functions which it implements
14162     to always fail with ENOSYS.  Some functions are actually named
14163     something starting with __ and the normal name is an alias.  */
14164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14165 choke me
14166 #else
14167 f = $ac_func;
14168 #endif
14169
14170 ; return 0; }
14171 EOF
14172 if { (eval echo configure:14173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14173   rm -rf conftest*
14174   eval "ac_cv_func_$ac_func=yes"
14175 else
14176   echo "configure: failed program was:" >&5
14177   cat conftest.$ac_ext >&5
14178   rm -rf conftest*
14179   eval "ac_cv_func_$ac_func=no"
14180 fi
14181 rm -f conftest*
14182 fi
14183
14184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14185   echo "$ac_t""yes" 1>&6
14186     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14187   cat >> confdefs.h <<EOF
14188 #define $ac_tr_func 1
14189 EOF
14190  
14191 else
14192   echo "$ac_t""no" 1>&6
14193 fi
14194 done
14195
14196
14197 for ac_func in getopt tempnam
14198 do
14199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14200 echo "configure:14201: checking for $ac_func" >&5
14201 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14202   echo $ac_n "(cached) $ac_c" 1>&6
14203 else
14204   cat > conftest.$ac_ext <<EOF
14205 #line 14206 "configure"
14206 #include "confdefs.h"
14207 /* System header to define __stub macros and hopefully few prototypes,
14208     which can conflict with char $ac_func(); below.  */
14209 #include <assert.h>
14210 /* Override any gcc2 internal prototype to avoid an error.  */
14211 /* We use char because int might match the return type of a gcc2
14212     builtin and then its argument prototype would still apply.  */
14213 char $ac_func();
14214 char (*f)();
14215
14216 int main() {
14217
14218 /* The GNU C library defines this for functions which it implements
14219     to always fail with ENOSYS.  Some functions are actually named
14220     something starting with __ and the normal name is an alias.  */
14221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14222 choke me
14223 #else
14224 f = $ac_func;
14225 #endif
14226
14227 ; return 0; }
14228 EOF
14229 if { (eval echo configure:14230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14230   rm -rf conftest*
14231   eval "ac_cv_func_$ac_func=yes"
14232 else
14233   echo "configure: failed program was:" >&5
14234   cat conftest.$ac_ext >&5
14235   rm -rf conftest*
14236   eval "ac_cv_func_$ac_func=no"
14237 fi
14238 rm -f conftest*
14239 fi
14240
14241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14242   echo "$ac_t""yes" 1>&6
14243     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14244   cat >> confdefs.h <<EOF
14245 #define $ac_tr_func 1
14246 EOF
14247  
14248 else
14249   echo "$ac_t""no" 1>&6
14250 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14251 fi
14252 done
14253
14254
14255
14256 # Check Configuration
14257 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14258 echo "configure:14259: checking declaration of sys_errlist" >&5
14259 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14260   echo $ac_n "(cached) $ac_c" 1>&6
14261 else
14262   
14263         cat > conftest.$ac_ext <<EOF
14264 #line 14265 "configure"
14265 #include "confdefs.h"
14266
14267 #include <stdio.h>
14268 #include <sys/types.h>
14269 #include <errno.h> 
14270 int main() {
14271 char *c = (char *) *sys_errlist
14272 ; return 0; }
14273 EOF
14274 if { (eval echo configure:14275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14275   rm -rf conftest*
14276   ol_cv_dcl_sys_errlist=yes
14277         ol_cv_have_sys_errlist=yes
14278 else
14279   echo "configure: failed program was:" >&5
14280   cat conftest.$ac_ext >&5
14281   rm -rf conftest*
14282   ol_cv_dcl_sys_errlist=no
14283 fi
14284 rm -f conftest*
14285 fi
14286
14287 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14288 #
14289 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14290 if test $ol_cv_dcl_sys_errlist = no ; then
14291         cat >> confdefs.h <<\EOF
14292 #define DECL_SYS_ERRLIST 1
14293 EOF
14294
14295
14296         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14297 echo "configure:14298: checking existence of sys_errlist" >&5
14298 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14299   echo $ac_n "(cached) $ac_c" 1>&6
14300 else
14301   
14302                 cat > conftest.$ac_ext <<EOF
14303 #line 14304 "configure"
14304 #include "confdefs.h"
14305 #include <errno.h>
14306 int main() {
14307 char *c = (char *) *sys_errlist
14308 ; return 0; }
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14311   rm -rf conftest*
14312   ol_cv_have_sys_errlist=yes
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -rf conftest*
14317   ol_cv_have_sys_errlist=no
14318 fi
14319 rm -f conftest*
14320 fi
14321
14322 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14323 fi
14324 if test $ol_cv_have_sys_errlist = yes ; then
14325         cat >> confdefs.h <<\EOF
14326 #define HAVE_SYS_ERRLIST 1
14327 EOF
14328
14329 fi
14330
14331
14332
14333 if test "$ol_enable_debug" != no ; then
14334         cat >> confdefs.h <<\EOF
14335 #define LDAP_DEBUG 1
14336 EOF
14337
14338 fi
14339 if test "$ol_enable_syslog" = yes ; then
14340         cat >> confdefs.h <<\EOF
14341 #define LDAP_SYSLOG 1
14342 EOF
14343
14344 fi
14345 if test "$ol_enable_libui" = yes ; then
14346         cat >> confdefs.h <<\EOF
14347 #define LDAP_LIBUI 1
14348 EOF
14349
14350 fi
14351 if test "$ol_enable_cache" = no ; then
14352         cat >> confdefs.h <<\EOF
14353 #define LDAP_NOCACHE 1
14354 EOF
14355
14356 fi
14357 if test "$ol_enable_dns" != no ; then
14358         cat >> confdefs.h <<\EOF
14359 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14360 EOF
14361
14362 fi
14363 if test "$ol_enable_proctitle" != no ; then
14364         cat >> confdefs.h <<\EOF
14365 #define LDAP_PROCTITLE 1
14366 EOF
14367
14368 fi
14369 if test "$ol_enable_referrals" != no ; then
14370         cat >> confdefs.h <<\EOF
14371 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14372 EOF
14373
14374 fi
14375 if test "$ol_enable_cldap" != no ; then
14376         cat >> confdefs.h <<\EOF
14377 #define LDAP_CONNECTIONLESS 1
14378 EOF
14379
14380 fi
14381
14382 if test "$ol_enable_crypt" != no ; then
14383         cat >> confdefs.h <<\EOF
14384 #define SLAPD_CRYPT 1
14385 EOF
14386
14387 fi
14388 if test "$ol_enable_cleartext" != no ; then
14389         cat >> confdefs.h <<\EOF
14390 #define SLAPD_CLEARTEXT 1
14391 EOF
14392
14393 fi
14394 if test "$ol_enable_multimaster" != no ; then
14395         cat >> confdefs.h <<\EOF
14396 #define SLAPD_MULTIMASTER 1
14397 EOF
14398
14399 fi
14400 if test "$ol_enable_phonetic" != no ; then
14401         cat >> confdefs.h <<\EOF
14402 #define SLAPD_PHONETIC 1
14403 EOF
14404
14405 fi
14406 if test "$ol_enable_rlookups" != no ; then
14407         cat >> confdefs.h <<\EOF
14408 #define SLAPD_RLOOKUPS 1
14409 EOF
14410
14411 fi
14412 if test "$ol_enable_aci" != no ; then
14413         cat >> confdefs.h <<\EOF
14414 #define SLAPD_ACI_ENABLED 1
14415 EOF
14416
14417 fi
14418 if test "$ol_enable_discreteaci" != no ; then
14419         cat >> confdefs.h <<\EOF
14420 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14421 EOF
14422
14423 fi
14424
14425 if test "$ol_link_modules" != no ; then
14426         cat >> confdefs.h <<\EOF
14427 #define SLAPD_MODULES 1
14428 EOF
14429
14430         BUILD_SLAPD=yes
14431         MODULES_LIBS=-lltdl
14432         SLAPD_MODULES_LDFLAGS="-dlopen self"
14433 fi
14434
14435 if test "$ol_link_bdb2" != no ; then
14436         cat >> confdefs.h <<\EOF
14437 #define SLAPD_BDB2 1
14438 EOF
14439
14440         BUILD_SLAPD=yes
14441         BUILD_BDB2=yes
14442         if test "$ol_with_bdb2_module" != static ; then
14443                 cat >> confdefs.h <<\EOF
14444 #define SLAPD_BDB2_DYNAMIC 1
14445 EOF
14446
14447                 BUILD_BDB2=mod
14448                 BUILD_BDB2_DYNAMIC=shared
14449                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14450         fi
14451 fi
14452
14453 if test "$ol_enable_ldap" != no ; then
14454         cat >> confdefs.h <<\EOF
14455 #define SLAPD_LDAP 1
14456 EOF
14457
14458         BUILD_SLAPD=yes
14459         BUILD_LDAP=yes
14460         if test "$ol_with_ldap_module" != static ; then
14461                 cat >> confdefs.h <<\EOF
14462 #define SLAPD_LDAP_DYNAMIC 1
14463 EOF
14464
14465                 BUILD_LDAP=mod
14466                 BUILD_LDAP_DYNAMIC=shared
14467                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14468         fi
14469 fi
14470
14471 if test "$ol_link_ldbm" != no ; then
14472         cat >> confdefs.h <<\EOF
14473 #define SLAPD_LDBM 1
14474 EOF
14475
14476         BUILD_SLAPD=yes
14477         BUILD_LDBM=yes
14478         if test "$ol_with_ldbm_module" != static ; then
14479                 cat >> confdefs.h <<\EOF
14480 #define SLAPD_LDBM_DYNAMIC 1
14481 EOF
14482
14483                 BUILD_LDBM=mod
14484                 BUILD_LDBM_DYNAMIC=shared
14485                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14486         fi
14487 fi
14488
14489 if test "$ol_enable_passwd" != no ; then
14490         cat >> confdefs.h <<\EOF
14491 #define SLAPD_PASSWD 1
14492 EOF
14493
14494         BUILD_SLAPD=yes
14495         BUILD_PASSWD=yes
14496         if test "$ol_with_passwd_module" != static ; then
14497                 cat >> confdefs.h <<\EOF
14498 #define SLAPD_PASSWD_DYNAMIC 1
14499 EOF
14500
14501                 BUILD_PASSWD=mod
14502                 BUILD_PASSWD_DYNAMIC=shared
14503                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14504         fi
14505 fi
14506
14507 if test "$ol_link_perl" != no ; then
14508         cat >> confdefs.h <<\EOF
14509 #define SLAPD_PERL 1
14510 EOF
14511
14512         BUILD_SLAPD=yes
14513         BUILD_PERL=yes
14514         if test "$ol_with_perl_module" != static ; then
14515                 cat >> confdefs.h <<\EOF
14516 #define SLAPD_PERL_DYNAMIC 1
14517 EOF
14518
14519                 BUILD_PERL=mod
14520                 BUILD_PERL_DYNAMIC=shared
14521                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14522         fi
14523 fi
14524
14525 if test "$ol_enable_shell" != no ; then
14526         cat >> confdefs.h <<\EOF
14527 #define SLAPD_SHELL 1
14528 EOF
14529
14530         BUILD_SLAPD=yes
14531         BUILD_SHELL=yes
14532         if test "$ol_with_shell_module" != static ; then
14533                 cat >> confdefs.h <<\EOF
14534 #define SLAPD_SHELL_DYNAMIC 1
14535 EOF
14536
14537                 BUILD_SHELL=mod
14538                 BUILD_SHELL_DYNAMIC=shared
14539                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14540         fi
14541 fi
14542
14543 if test "$ol_enable_tcl" != no ; then
14544         cat >> confdefs.h <<\EOF
14545 #define SLAPD_TCL 1
14546 EOF
14547
14548         BUILD_SLAPD=yes
14549         BUILD_TCL=yes
14550         if test "$ol_with_tcl_module" != static; then
14551                 cat >> confdefs.h <<\EOF
14552 #define SLAPD_TCL_DYNAMIC 1
14553 EOF
14554
14555                 BUILD_TCL=mod
14556                 BUILD_TCL_DYNAMIC=shared
14557                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14558         fi
14559 fi
14560
14561 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14562         $BUILD_SLAPD = yes ; then
14563         BUILD_SLURPD=yes
14564 fi
14565
14566 if test "$ol_link_isode" != no ; then
14567         BUILD_LDAPD=yes
14568 fi
14569
14570
14571
14572
14573   
14574   
14575   
14576   
14577   
14578   
14579   
14580   
14581   
14582   
14583   
14584   
14585   
14586   
14587   
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615 trap '' 1 2 15
14616
14617 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14618
14619 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14620 # Let make expand exec_prefix.
14621 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14622
14623 # Any assignment to VPATH causes Sun make to only execute
14624 # the first set of double-colon rules, so remove it if not needed.
14625 # If there is a colon in the path, we need to keep it.
14626 if test "x$srcdir" = x.; then
14627   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14628 fi
14629
14630 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14631
14632 DEFS=-DHAVE_CONFIG_H
14633
14634 # Without the "./", some shells look in PATH for config.status.
14635 : ${CONFIG_STATUS=./config.status}
14636
14637 echo creating $CONFIG_STATUS
14638 rm -f $CONFIG_STATUS
14639 cat > $CONFIG_STATUS <<EOF
14640 #! /bin/sh
14641 # Generated automatically by configure.
14642 # Run this file to recreate the current configuration.
14643 # This directory was configured as follows,
14644 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14645 #
14646 # $0 $ac_configure_args
14647 #
14648 # Compiler output produced by configure, useful for debugging
14649 # configure, is in ./config.log if it exists.
14650
14651 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14652 for ac_option
14653 do
14654   case "\$ac_option" in
14655   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14656     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14657     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14658   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14659     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14660     exit 0 ;;
14661   -help | --help | --hel | --he | --h)
14662     echo "\$ac_cs_usage"; exit 0 ;;
14663   *) echo "\$ac_cs_usage"; exit 1 ;;
14664   esac
14665 done
14666
14667 ac_given_srcdir=$srcdir
14668 ac_given_INSTALL="$INSTALL"
14669
14670 trap 'rm -fr `echo "\
14671 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14672 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14673 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14674 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14675 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14676 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14677 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14678 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14679 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14680 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14681 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14682 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14683 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14684 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14685 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14686 include/Makefile:build/top.mk:include/Makefile.in \
14687 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14688 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14689 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14690 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14691 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14692 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14693 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14694 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14695 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14696 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14697 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14698 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14699 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14700 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14701 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14702 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14703 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14704 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14705 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14706 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14707 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14708 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14709 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14710 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14711 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14712 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14713  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14714 EOF
14715 cat >> $CONFIG_STATUS <<EOF
14716
14717 # Protect against being on the right side of a sed subst in config.status.
14718 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14719  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14720 $ac_vpsub
14721 $extrasub
14722 s%@SHELL@%$SHELL%g
14723 s%@CFLAGS@%$CFLAGS%g
14724 s%@CPPFLAGS@%$CPPFLAGS%g
14725 s%@CXXFLAGS@%$CXXFLAGS%g
14726 s%@FFLAGS@%$FFLAGS%g
14727 s%@DEFS@%$DEFS%g
14728 s%@LDFLAGS@%$LDFLAGS%g
14729 s%@LIBS@%$LIBS%g
14730 s%@exec_prefix@%$exec_prefix%g
14731 s%@prefix@%$prefix%g
14732 s%@program_transform_name@%$program_transform_name%g
14733 s%@bindir@%$bindir%g
14734 s%@sbindir@%$sbindir%g
14735 s%@libexecdir@%$libexecdir%g
14736 s%@datadir@%$datadir%g
14737 s%@sysconfdir@%$sysconfdir%g
14738 s%@sharedstatedir@%$sharedstatedir%g
14739 s%@localstatedir@%$localstatedir%g
14740 s%@libdir@%$libdir%g
14741 s%@includedir@%$includedir%g
14742 s%@oldincludedir@%$oldincludedir%g
14743 s%@infodir@%$infodir%g
14744 s%@mandir@%$mandir%g
14745 s%@host@%$host%g
14746 s%@host_alias@%$host_alias%g
14747 s%@host_cpu@%$host_cpu%g
14748 s%@host_vendor@%$host_vendor%g
14749 s%@host_os@%$host_os%g
14750 s%@target@%$target%g
14751 s%@target_alias@%$target_alias%g
14752 s%@target_cpu@%$target_cpu%g
14753 s%@target_vendor@%$target_vendor%g
14754 s%@target_os@%$target_os%g
14755 s%@build@%$build%g
14756 s%@build_alias@%$build_alias%g
14757 s%@build_cpu@%$build_cpu%g
14758 s%@build_vendor@%$build_vendor%g
14759 s%@build_os@%$build_os%g
14760 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14761 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14762 s%@INSTALL_DATA@%$INSTALL_DATA%g
14763 s%@PACKAGE@%$PACKAGE%g
14764 s%@VERSION@%$VERSION%g
14765 s%@ACLOCAL@%$ACLOCAL%g
14766 s%@AUTOCONF@%$AUTOCONF%g
14767 s%@AUTOMAKE@%$AUTOMAKE%g
14768 s%@AUTOHEADER@%$AUTOHEADER%g
14769 s%@MAKEINFO@%$MAKEINFO%g
14770 s%@install_sh@%$install_sh%g
14771 s%@AMTAR@%$AMTAR%g
14772 s%@AWK@%$AWK%g
14773 s%@AMTARFLAGS@%$AMTARFLAGS%g
14774 s%@SET_MAKE@%$SET_MAKE%g
14775 s%@top_builddir@%$top_builddir%g
14776 s%@ldap_subdir@%$ldap_subdir%g
14777 s%@CC@%$CC%g
14778 s%@RANLIB@%$RANLIB%g
14779 s%@LD@%$LD%g
14780 s%@NM@%$NM%g
14781 s%@LN_S@%$LN_S%g
14782 s%@LIBTOOL@%$LIBTOOL%g
14783 s%@LN_H@%$LN_H%g
14784 s%@SENDMAIL@%$SENDMAIL%g
14785 s%@EDITOR@%$EDITOR%g
14786 s%@FINGER@%$FINGER%g
14787 s%@PERLBIN@%$PERLBIN%g
14788 s%@CPP@%$CPP%g
14789 s%@EXEEXT@%$EXEEXT%g
14790 s%@OBJEXT@%$OBJEXT%g
14791 s%@OL_MKDEP@%$OL_MKDEP%g
14792 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14793 s%@PEPSY@%$PEPSY%g
14794 s%@LIBOBJS@%$LIBOBJS%g
14795 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14796 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14797 s%@BUILD_BDB2@%$BUILD_BDB2%g
14798 s%@BUILD_LDAP@%$BUILD_LDAP%g
14799 s%@BUILD_LDBM@%$BUILD_LDBM%g
14800 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14801 s%@BUILD_PERL@%$BUILD_PERL%g
14802 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14803 s%@BUILD_SHELL@%$BUILD_SHELL%g
14804 s%@BUILD_TCL@%$BUILD_TCL%g
14805 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14806 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14807 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14808 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14809 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14810 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14811 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14812 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14813 s%@LDAP_LIBS@%$LDAP_LIBS%g
14814 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14815 s%@LDIF_LIBS@%$LDIF_LIBS%g
14816 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14817 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14818 s%@LDBM_LIBS@%$LDBM_LIBS%g
14819 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14820 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14821 s%@WRAP_LIBS@%$WRAP_LIBS%g
14822 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14823 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14824 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14825 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14826 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14827 s%@KRB_LIBS@%$KRB_LIBS%g
14828 s%@READLINE_LIBS@%$READLINE_LIBS%g
14829 s%@SASL_LIBS@%$SASL_LIBS%g
14830 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14831 s%@TLS_LIBS@%$TLS_LIBS%g
14832 s%@MODULES_LIBS@%$MODULES_LIBS%g
14833
14834 CEOF
14835 EOF
14836
14837 cat >> $CONFIG_STATUS <<\EOF
14838
14839 # Split the substitutions into bite-sized pieces for seds with
14840 # small command number limits, like on Digital OSF/1 and HP-UX.
14841 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14842 ac_file=1 # Number of current file.
14843 ac_beg=1 # First line for current file.
14844 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14845 ac_more_lines=:
14846 ac_sed_cmds=""
14847 while $ac_more_lines; do
14848   if test $ac_beg -gt 1; then
14849     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14850   else
14851     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14852   fi
14853   if test ! -s conftest.s$ac_file; then
14854     ac_more_lines=false
14855     rm -f conftest.s$ac_file
14856   else
14857     if test -z "$ac_sed_cmds"; then
14858       ac_sed_cmds="sed -f conftest.s$ac_file"
14859     else
14860       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14861     fi
14862     ac_file=`expr $ac_file + 1`
14863     ac_beg=$ac_end
14864     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14865   fi
14866 done
14867 if test -z "$ac_sed_cmds"; then
14868   ac_sed_cmds=cat
14869 fi
14870 EOF
14871
14872 cat >> $CONFIG_STATUS <<EOF
14873
14874 CONFIG_FILES=\${CONFIG_FILES-"\
14875 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14876 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14877 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14878 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14879 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14880 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14881 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14882 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14883 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14884 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14885 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14886 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14887 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14888 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14889 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14890 include/Makefile:build/top.mk:include/Makefile.in \
14891 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14892 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14893 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14894 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14895 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14896 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14897 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14898 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14899 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14900 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14901 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14902 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14903 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14904 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14905 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14906 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14907 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14908 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14909 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14910 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14911 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14912 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14913 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14914 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14915 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14916 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14917 "}
14918 EOF
14919 cat >> $CONFIG_STATUS <<\EOF
14920 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14921   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14922   case "$ac_file" in
14923   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14924        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14925   *) ac_file_in="${ac_file}.in" ;;
14926   esac
14927
14928   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14929
14930   # Remove last slash and all that follows it.  Not all systems have dirname.
14931   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14932   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14933     # The file is in a subdirectory.
14934     test ! -d "$ac_dir" && mkdir "$ac_dir"
14935     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14936     # A "../" for each directory in $ac_dir_suffix.
14937     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14938   else
14939     ac_dir_suffix= ac_dots=
14940   fi
14941
14942   case "$ac_given_srcdir" in
14943   .)  srcdir=.
14944       if test -z "$ac_dots"; then top_srcdir=.
14945       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14946   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14947   *) # Relative path.
14948     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14949     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14950   esac
14951
14952   case "$ac_given_INSTALL" in
14953   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14954   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14955   esac
14956
14957   echo creating "$ac_file"
14958   rm -f "$ac_file"
14959   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14960   case "$ac_file" in
14961   *Makefile*) ac_comsub="1i\\
14962 # $configure_input" ;;
14963   *) ac_comsub= ;;
14964   esac
14965
14966   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14967   sed -e "$ac_comsub
14968 s%@configure_input@%$configure_input%g
14969 s%@srcdir@%$srcdir%g
14970 s%@top_srcdir@%$top_srcdir%g
14971 s%@INSTALL@%$INSTALL%g
14972 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14973 fi; done
14974 rm -f conftest.s*
14975
14976 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14977 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14978 #
14979 # ac_d sets the value in "#define NAME VALUE" lines.
14980 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14981 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14982 ac_dC='\3'
14983 ac_dD='%g'
14984 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14985 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14986 ac_uB='\([      ]\)%\1#\2define\3'
14987 ac_uC=' '
14988 ac_uD='\4%g'
14989 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14990 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14991 ac_eB='$%\1#\2define\3'
14992 ac_eC=' '
14993 ac_eD='%g'
14994
14995 if test "${CONFIG_HEADERS+set}" != set; then
14996 EOF
14997 cat >> $CONFIG_STATUS <<EOF
14998   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14999 EOF
15000 cat >> $CONFIG_STATUS <<\EOF
15001 fi
15002 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15003   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15004   case "$ac_file" in
15005   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15006        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15007   *) ac_file_in="${ac_file}.in" ;;
15008   esac
15009
15010   echo creating $ac_file
15011
15012   rm -f conftest.frag conftest.in conftest.out
15013   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15014   cat $ac_file_inputs > conftest.in
15015
15016 EOF
15017
15018 # Transform confdefs.h into a sed script conftest.vals that substitutes
15019 # the proper values into config.h.in to produce config.h.  And first:
15020 # Protect against being on the right side of a sed subst in config.status.
15021 # Protect against being in an unquoted here document in config.status.
15022 rm -f conftest.vals
15023 cat > conftest.hdr <<\EOF
15024 s/[\\&%]/\\&/g
15025 s%[\\$`]%\\&%g
15026 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15027 s%ac_d%ac_u%gp
15028 s%ac_u%ac_e%gp
15029 EOF
15030 sed -n -f conftest.hdr confdefs.h > conftest.vals
15031 rm -f conftest.hdr
15032
15033 # This sed command replaces #undef with comments.  This is necessary, for
15034 # example, in the case of _POSIX_SOURCE, which is predefined and required
15035 # on some systems where configure will not decide to define it.
15036 cat >> conftest.vals <<\EOF
15037 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15038 EOF
15039
15040 # Break up conftest.vals because some shells have a limit on
15041 # the size of here documents, and old seds have small limits too.
15042
15043 rm -f conftest.tail
15044 while :
15045 do
15046   ac_lines=`grep -c . conftest.vals`
15047   # grep -c gives empty output for an empty file on some AIX systems.
15048   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15049   # Write a limited-size here document to conftest.frag.
15050   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15051   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15052   echo 'CEOF
15053   sed -f conftest.frag conftest.in > conftest.out
15054   rm -f conftest.in
15055   mv conftest.out conftest.in
15056 ' >> $CONFIG_STATUS
15057   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15058   rm -f conftest.vals
15059   mv conftest.tail conftest.vals
15060 done
15061 rm -f conftest.vals
15062
15063 cat >> $CONFIG_STATUS <<\EOF
15064   rm -f conftest.frag conftest.h
15065   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15066   cat conftest.in >> conftest.h
15067   rm -f conftest.in
15068   if cmp -s $ac_file conftest.h 2>/dev/null; then
15069     echo "$ac_file is unchanged"
15070     rm -f conftest.h
15071   else
15072     # Remove last slash and all that follows it.  Not all systems have dirname.
15073       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15074       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15075       # The file is in a subdirectory.
15076       test ! -d "$ac_dir" && mkdir "$ac_dir"
15077     fi
15078     rm -f $ac_file
15079     mv conftest.h $ac_file
15080   fi
15081 fi; done
15082
15083 EOF
15084 cat >> $CONFIG_STATUS <<EOF
15085
15086 EOF
15087 cat >> $CONFIG_STATUS <<\EOF
15088
15089 date > stamp-h
15090 echo Please \"make depend\" to build dependencies
15091
15092 exit 0
15093 EOF
15094 chmod +x $CONFIG_STATUS
15095 rm -fr confdefs* $ac_clean_files
15096 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15097