]> git.sur5r.net Git - openldap/blob - configure
Update main copyright to y2k
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.282 1999/11/26 22:32:19 kdz 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-ldapi        enable domain socket (PF_LOCAL) transport (no)"
45 ac_help="$ac_help
46   --enable-x-compile    enable cross compiling (no)"
47 ac_help="$ac_help
48   --enable-dmalloc      enable debug malloc support (no)"
49 ac_help="$ac_help
50   --with-cyrus-sasl     with Cyrus SASL support (auto)"
51 ac_help="$ac_help
52   --with-fetch          with fetch URL support (auto)"
53 ac_help="$ac_help
54   --with-kerberos       with Kerberos support (auto)"
55 ac_help="$ac_help
56   --with-readline       with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads        use threads (auto)"
59 ac_help="$ac_help
60   --with-tls            with TLS/SSL support (auto)"
61 ac_help="$ac_help
62   --with-yielding-select        with implicitly yielding select (auto)"
63 ac_help="$ac_help
64 LDAPD (X.500-to-LDAP Gateway) Options:"
65 ac_help="$ac_help
66   --enable-ldapd        enable building ldapd (no)"
67 ac_help="$ac_help
68 SLAPD (Standalone LDAP Daemon) Options:"
69 ac_help="$ac_help
70   --enable-slapd        enable building slapd (yes)"
71 ac_help="$ac_help
72     --enable-cleartext  enable cleartext passwords (yes)"
73 ac_help="$ac_help
74     --enable-crypt      enable crypt(3) passwords (auto)"
75 ac_help="$ac_help
76     --enable-modules    enable dynamic module support (no)"
77 ac_help="$ac_help
78     --enable-multimaster        enable multimaster replication (no)"
79 ac_help="$ac_help
80     --enable-phonetic   enable phonetic/soundex (no)"
81 ac_help="$ac_help
82     --enable-quipu      build quipu migration tools (no)"
83 ac_help="$ac_help
84     --enable-rlookups   enable reverse lookups (auto)"
85 ac_help="$ac_help
86     --enable-aci        enable per-object ACIs (no)"
87 ac_help="$ac_help
88     --enable-discreteaci        enable discrete rights in ACIs (no)"
89 ac_help="$ac_help
90     --enable-wrappers   enable tcp wrapper support (no)"
91 ac_help="$ac_help
92     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
93 ac_help="$ac_help
94     --enable-bdb2       enable bdb2 backend (no)"
95 ac_help="$ac_help
96       --with-bdb2-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldap       enable ldap backend (no)"
99 ac_help="$ac_help
100       --with-ldap-module        module type (static)"
101 ac_help="$ac_help
102     --enable-ldbm       enable ldbm backend (yes)"
103 ac_help="$ac_help
104       --with-ldbm-api   use LDBM API (auto)"
105 ac_help="$ac_help
106       --with-ldbm-module        module type (static)"
107 ac_help="$ac_help
108       --with-ldbm-type  use LDBM type (auto)"
109 ac_help="$ac_help
110     --enable-passwd     enable passwd backend (no)"
111 ac_help="$ac_help
112       --with-passwd-module      module type (static)"
113 ac_help="$ac_help
114     --enable-perl       enable perl backend (no)"
115 ac_help="$ac_help
116       --with-perl-module        module type (static)"
117 ac_help="$ac_help
118     --enable-shell      enable shell backend (no)"
119 ac_help="$ac_help
120       --with-shell-module       module type (static)"
121 ac_help="$ac_help
122     --enable-tcl        enable tcl backend (no)"
123 ac_help="$ac_help
124       --with-tcl-module module type (static)"
125 ac_help="$ac_help
126 SLURPD (Replication Daemon) Options:"
127 ac_help="$ac_help
128   --enable-slurpd       enable building slurpd (auto)"
129 ac_help="$ac_help
130 Library Generation & Linking Options"
131 ac_help="$ac_help
132   --enable-static[=PKGS]  build static libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-shared[=PKGS]  build shared libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
137 ac_help="$ac_help
138   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
139 ac_help="$ac_help
140   --disable-libtool-lock  avoid locking (might break parallel builds)"
141
142 # Initialize some variables set by options.
143 # The variables have the same names as the options, with
144 # dashes changed to underlines.
145 build=NONE
146 cache_file=./config.cache
147 exec_prefix=NONE
148 host=NONE
149 no_create=
150 nonopt=NONE
151 no_recursion=
152 prefix=NONE
153 program_prefix=NONE
154 program_suffix=NONE
155 program_transform_name=s,x,x,
156 silent=
157 site=
158 srcdir=
159 target=NONE
160 verbose=
161 x_includes=NONE
162 x_libraries=NONE
163 bindir='${exec_prefix}/bin'
164 sbindir='${exec_prefix}/sbin'
165 libexecdir='${exec_prefix}/libexec'
166 datadir='${prefix}/share'
167 sysconfdir='${prefix}/etc'
168 sharedstatedir='${prefix}/com'
169 localstatedir='${prefix}/var'
170 libdir='${exec_prefix}/lib'
171 includedir='${prefix}/include'
172 oldincludedir='/usr/include'
173 infodir='${prefix}/info'
174 mandir='${prefix}/man'
175
176 # Initialize some other variables.
177 subdirs=
178 MFLAGS= MAKEFLAGS=
179 SHELL=${CONFIG_SHELL-/bin/sh}
180 # Maximum number of lines to put in a shell here document.
181 ac_max_here_lines=12
182
183 ac_prev=
184 for ac_option
185 do
186
187   # If the previous option needs an argument, assign it.
188   if test -n "$ac_prev"; then
189     eval "$ac_prev=\$ac_option"
190     ac_prev=
191     continue
192   fi
193
194   case "$ac_option" in
195   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
196   *) ac_optarg= ;;
197   esac
198
199   # Accept the important Cygnus configure options, so we can diagnose typos.
200
201   case "$ac_option" in
202
203   -bindir | --bindir | --bindi | --bind | --bin | --bi)
204     ac_prev=bindir ;;
205   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
206     bindir="$ac_optarg" ;;
207
208   -build | --build | --buil | --bui | --bu)
209     ac_prev=build ;;
210   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
211     build="$ac_optarg" ;;
212
213   -cache-file | --cache-file | --cache-fil | --cache-fi \
214   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
215     ac_prev=cache_file ;;
216   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
217   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
218     cache_file="$ac_optarg" ;;
219
220   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
221     ac_prev=datadir ;;
222   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
223   | --da=*)
224     datadir="$ac_optarg" ;;
225
226   -disable-* | --disable-*)
227     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
228     # Reject names that are not valid shell variable names.
229     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
230       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
231     fi
232     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
233     eval "enable_${ac_feature}=no" ;;
234
235   -enable-* | --enable-*)
236     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
237     # Reject names that are not valid shell variable names.
238     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
239       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
240     fi
241     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
242     case "$ac_option" in
243       *=*) ;;
244       *) ac_optarg=yes ;;
245     esac
246     eval "enable_${ac_feature}='$ac_optarg'" ;;
247
248   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
249   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
250   | --exec | --exe | --ex)
251     ac_prev=exec_prefix ;;
252   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
253   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
254   | --exec=* | --exe=* | --ex=*)
255     exec_prefix="$ac_optarg" ;;
256
257   -gas | --gas | --ga | --g)
258     # Obsolete; use --with-gas.
259     with_gas=yes ;;
260
261   -help | --help | --hel | --he)
262     # Omit some internal or obsolete options to make the list less imposing.
263     # This message is too long to be a string in the A/UX 3.1 sh.
264     cat << EOF
265 Usage: configure [options] [host]
266 Options: [defaults in brackets after descriptions]
267 Configuration:
268   --cache-file=FILE       cache test results in FILE
269   --help                  print this message
270   --no-create             do not create output files
271   --quiet, --silent       do not print \`checking...' messages
272   --version               print the version of autoconf that created configure
273 Directory and file names:
274   --prefix=PREFIX         install architecture-independent files in PREFIX
275                           [$ac_default_prefix]
276   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
277                           [same as prefix]
278   --bindir=DIR            user executables in DIR [EPREFIX/bin]
279   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
280   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
281   --datadir=DIR           read-only architecture-independent data in DIR
282                           [PREFIX/share]
283   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
284   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
285                           [PREFIX/com]
286   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
287   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
288   --includedir=DIR        C header files in DIR [PREFIX/include]
289   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
290   --infodir=DIR           info documentation in DIR [PREFIX/info]
291   --mandir=DIR            man documentation in DIR [PREFIX/man]
292   --srcdir=DIR            find the sources in DIR [configure dir or ..]
293   --program-prefix=PREFIX prepend PREFIX to installed program names
294   --program-suffix=SUFFIX append SUFFIX to installed program names
295   --program-transform-name=PROGRAM
296                           run sed PROGRAM on installed program names
297 EOF
298     cat << EOF
299 Host type:
300   --build=BUILD           configure for building on BUILD [BUILD=HOST]
301   --host=HOST             configure for HOST [guessed]
302   --target=TARGET         configure for TARGET [TARGET=HOST]
303 Features and packages:
304   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
305   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
306   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
307   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
308   --x-includes=DIR        X include files are in DIR
309   --x-libraries=DIR       X library files are in DIR
310 EOF
311     if test -n "$ac_help"; then
312       echo "--enable and --with options recognized:$ac_help"
313     fi
314     exit 0 ;;
315
316   -host | --host | --hos | --ho)
317     ac_prev=host ;;
318   -host=* | --host=* | --hos=* | --ho=*)
319     host="$ac_optarg" ;;
320
321   -includedir | --includedir | --includedi | --included | --include \
322   | --includ | --inclu | --incl | --inc)
323     ac_prev=includedir ;;
324   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
325   | --includ=* | --inclu=* | --incl=* | --inc=*)
326     includedir="$ac_optarg" ;;
327
328   -infodir | --infodir | --infodi | --infod | --info | --inf)
329     ac_prev=infodir ;;
330   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
331     infodir="$ac_optarg" ;;
332
333   -libdir | --libdir | --libdi | --libd)
334     ac_prev=libdir ;;
335   -libdir=* | --libdir=* | --libdi=* | --libd=*)
336     libdir="$ac_optarg" ;;
337
338   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
339   | --libexe | --libex | --libe)
340     ac_prev=libexecdir ;;
341   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
342   | --libexe=* | --libex=* | --libe=*)
343     libexecdir="$ac_optarg" ;;
344
345   -localstatedir | --localstatedir | --localstatedi | --localstated \
346   | --localstate | --localstat | --localsta | --localst \
347   | --locals | --local | --loca | --loc | --lo)
348     ac_prev=localstatedir ;;
349   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
350   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
351   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
352     localstatedir="$ac_optarg" ;;
353
354   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
355     ac_prev=mandir ;;
356   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
357     mandir="$ac_optarg" ;;
358
359   -nfp | --nfp | --nf)
360     # Obsolete; use --without-fp.
361     with_fp=no ;;
362
363   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
364   | --no-cr | --no-c)
365     no_create=yes ;;
366
367   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
368   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
369     no_recursion=yes ;;
370
371   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
372   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
373   | --oldin | --oldi | --old | --ol | --o)
374     ac_prev=oldincludedir ;;
375   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
376   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
377   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
378     oldincludedir="$ac_optarg" ;;
379
380   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
381     ac_prev=prefix ;;
382   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
383     prefix="$ac_optarg" ;;
384
385   -program-prefix | --program-prefix | --program-prefi | --program-pref \
386   | --program-pre | --program-pr | --program-p)
387     ac_prev=program_prefix ;;
388   -program-prefix=* | --program-prefix=* | --program-prefi=* \
389   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
390     program_prefix="$ac_optarg" ;;
391
392   -program-suffix | --program-suffix | --program-suffi | --program-suff \
393   | --program-suf | --program-su | --program-s)
394     ac_prev=program_suffix ;;
395   -program-suffix=* | --program-suffix=* | --program-suffi=* \
396   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
397     program_suffix="$ac_optarg" ;;
398
399   -program-transform-name | --program-transform-name \
400   | --program-transform-nam | --program-transform-na \
401   | --program-transform-n | --program-transform- \
402   | --program-transform | --program-transfor \
403   | --program-transfo | --program-transf \
404   | --program-trans | --program-tran \
405   | --progr-tra | --program-tr | --program-t)
406     ac_prev=program_transform_name ;;
407   -program-transform-name=* | --program-transform-name=* \
408   | --program-transform-nam=* | --program-transform-na=* \
409   | --program-transform-n=* | --program-transform-=* \
410   | --program-transform=* | --program-transfor=* \
411   | --program-transfo=* | --program-transf=* \
412   | --program-trans=* | --program-tran=* \
413   | --progr-tra=* | --program-tr=* | --program-t=*)
414     program_transform_name="$ac_optarg" ;;
415
416   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
417   | -silent | --silent | --silen | --sile | --sil)
418     silent=yes ;;
419
420   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
421     ac_prev=sbindir ;;
422   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
423   | --sbi=* | --sb=*)
424     sbindir="$ac_optarg" ;;
425
426   -sharedstatedir | --sharedstatedir | --sharedstatedi \
427   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
428   | --sharedst | --shareds | --shared | --share | --shar \
429   | --sha | --sh)
430     ac_prev=sharedstatedir ;;
431   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
432   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
433   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
434   | --sha=* | --sh=*)
435     sharedstatedir="$ac_optarg" ;;
436
437   -site | --site | --sit)
438     ac_prev=site ;;
439   -site=* | --site=* | --sit=*)
440     site="$ac_optarg" ;;
441
442   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
443     ac_prev=srcdir ;;
444   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
445     srcdir="$ac_optarg" ;;
446
447   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
448   | --syscon | --sysco | --sysc | --sys | --sy)
449     ac_prev=sysconfdir ;;
450   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
451   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
452     sysconfdir="$ac_optarg" ;;
453
454   -target | --target | --targe | --targ | --tar | --ta | --t)
455     ac_prev=target ;;
456   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
457     target="$ac_optarg" ;;
458
459   -v | -verbose | --verbose | --verbos | --verbo | --verb)
460     verbose=yes ;;
461
462   -version | --version | --versio | --versi | --vers)
463     echo "configure generated by autoconf version 2.13.1"
464     exit 0 ;;
465
466   -with-* | --with-*)
467     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
468     # Reject names that are not valid shell variable names.
469     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
470       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
471     fi
472     ac_package=`echo $ac_package| sed 's/-/_/g'`
473     case "$ac_option" in
474       *=*) ;;
475       *) ac_optarg=yes ;;
476     esac
477     eval "with_${ac_package}='$ac_optarg'" ;;
478
479   -without-* | --without-*)
480     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
481     # Reject names that are not valid shell variable names.
482     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
483       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
484     fi
485     ac_package=`echo $ac_package| sed 's/-/_/g'`
486     eval "with_${ac_package}=no" ;;
487
488   --x)
489     # Obsolete; use --with-x.
490     with_x=yes ;;
491
492   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
493   | --x-incl | --x-inc | --x-in | --x-i)
494     ac_prev=x_includes ;;
495   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
496   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
497     x_includes="$ac_optarg" ;;
498
499   -x-libraries | --x-libraries | --x-librarie | --x-librari \
500   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
501     ac_prev=x_libraries ;;
502   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
503   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
504     x_libraries="$ac_optarg" ;;
505
506   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
507     ;;
508
509   *)
510     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
511       echo "configure: warning: $ac_option: invalid host type" 1>&2
512     fi
513     if test "x$nonopt" != xNONE; then
514       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
515     fi
516     nonopt="$ac_option"
517     ;;
518
519   esac
520 done
521
522 if test -n "$ac_prev"; then
523   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
524 fi
525
526 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
527
528 # File descriptor usage:
529 # 0 standard input
530 # 1 file creation
531 # 2 errors and warnings
532 # 3 some systems may open it to /dev/tty
533 # 4 used on the Kubota Titan
534 # 6 checking for... messages and results
535 # 5 compiler messages saved in config.log
536 if test "$silent" = yes; then
537   exec 6>/dev/null
538 else
539   exec 6>&1
540 fi
541 exec 5>./config.log
542
543 echo "\
544 This file contains any messages produced by compilers while
545 running configure, to aid debugging if configure makes a mistake.
546 " 1>&5
547
548 # Strip out --no-create and --no-recursion so they do not pile up.
549 # Also quote any args containing shell metacharacters.
550 ac_configure_args=
551 for ac_arg
552 do
553   case "$ac_arg" in
554   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
555   | --no-cr | --no-c) ;;
556   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
557   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
558   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
559   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
560   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
561   esac
562 done
563
564 # NLS nuisances.
565 # Only set these to C if already set.  These must not be set unconditionally
566 # because not all systems understand e.g. LANG=C (notably SCO).
567 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
568 # Non-C LC_CTYPE values break the ctype check.
569 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
570 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
571 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
572 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
573
574 # confdefs.h avoids OS command line length limits that DEFS can exceed.
575 rm -rf conftest* confdefs.h
576 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
577 echo > confdefs.h
578
579 # A filename unique to this package, relative to the directory that
580 # configure is in, which we can look for to find out if srcdir is correct.
581 ac_unique_file=build/version
582
583 # Find the source files, if location was not specified.
584 if test -z "$srcdir"; then
585   ac_srcdir_defaulted=yes
586   # Try the directory containing this script, then its parent.
587   ac_prog=$0
588   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
589   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
590   srcdir=$ac_confdir
591   if test ! -r $srcdir/$ac_unique_file; then
592     srcdir=..
593   fi
594 else
595   ac_srcdir_defaulted=no
596 fi
597 if test ! -r $srcdir/$ac_unique_file; then
598   if test "$ac_srcdir_defaulted" = yes; then
599     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
600   else
601     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
602   fi
603 fi
604 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
605
606 # Prefer explicitly selected file to automatically selected ones.
607 if test -z "$CONFIG_SITE"; then
608   if test "x$prefix" != xNONE; then
609     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
610   else
611     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
612   fi
613 fi
614 for ac_site_file in $CONFIG_SITE; do
615   if test -r "$ac_site_file"; then
616     echo "loading site script $ac_site_file"
617     . "$ac_site_file"
618   fi
619 done
620
621
622 ac_ext=c
623 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
624 ac_cpp='$CPP $CPPFLAGS'
625 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
626 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
627 cross_compiling=$ac_cv_prog_cc_cross
628
629 ac_exeext=
630 ac_objext=o
631 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
632   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
633   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
634     ac_n= ac_c='
635 ' ac_t='        '
636   else
637     ac_n=-n ac_c= ac_t=
638   fi
639 else
640   ac_n= ac_c='\c' ac_t=
641 fi
642
643 ac_aux_dir=
644 for ac_dir in build $srcdir/build; do
645   if 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   elif test -f $ac_dir/install.sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install.sh -c"
652     break
653   elif test -f $ac_dir/shtool; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/shtool install -c"
656     break
657   fi
658 done
659 if test -z "$ac_aux_dir"; then
660   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
661 fi
662 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
663 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
664 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
665
666 OL_VERSION=`cat $ac_aux_dir/version`
667 if test -z "$OL_VERSION"; then
668         { echo "configure: error: could not determine version" 1>&2; exit 1; }
669 fi
670
671 echo "Configuring OpenLDAP $OL_VERSION ..."
672
673
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:674: checking host system type" >&5
676 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
677
678 # Make sure we can run config.sub.
679   if $ac_config_sub sun4 >/dev/null 2>&1; then :
680     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
681   fi
682
683   ac_cv_host_alias=$host
684   case "$ac_cv_host_alias" in
685   NONE)
686     case $nonopt in
687     NONE)
688       if ac_cv_host_alias=`$ac_config_guess`; then :
689       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
690       fi ;;
691     *) ac_cv_host_alias=$nonopt ;;
692     esac ;;
693   esac
694
695   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
696   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
697   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
698   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
699 else
700   echo $ac_n "(cached) $ac_c" 1>&6
701 fi
702
703 echo "$ac_t""$ac_cv_host" 1>&6
704
705 host=$ac_cv_host
706 host_alias=$ac_cv_host_alias
707 host_cpu=$ac_cv_host_cpu
708 host_vendor=$ac_cv_host_vendor
709 host_os=$ac_cv_host_os
710
711
712
713
714
715 echo $ac_n "checking target system type""... $ac_c" 1>&6
716 echo "configure:715: checking target system type" >&5
717 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
718
719 # Make sure we can run config.sub.
720   if $ac_config_sub sun4 >/dev/null 2>&1; then :
721     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
722   fi
723
724   ac_cv_target_alias=$target
725   case "$ac_cv_target_alias" in
726   NONE)
727     case $nonopt in
728     NONE)
729       ac_cv_target_alias=$host_alias ;;
730
731     *) ac_cv_target_alias=$nonopt ;;
732     esac ;;
733   esac
734
735   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
736   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
737   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
738   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
739 else
740   echo $ac_n "(cached) $ac_c" 1>&6
741 fi
742
743 echo "$ac_t""$ac_cv_target" 1>&6
744
745 target=$ac_cv_target
746 target_alias=$ac_cv_target_alias
747 target_cpu=$ac_cv_target_cpu
748 target_vendor=$ac_cv_target_vendor
749 target_os=$ac_cv_target_os
750
751
752
753
754
755 echo $ac_n "checking build system type""... $ac_c" 1>&6
756 echo "configure:755: checking build system type" >&5
757 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
758
759 # Make sure we can run config.sub.
760   if $ac_config_sub sun4 >/dev/null 2>&1; then :
761     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
762   fi
763
764   ac_cv_build_alias=$build
765   case "$ac_cv_build_alias" in
766   NONE)
767     case $nonopt in
768     NONE)
769       ac_cv_build_alias=$host_alias ;;
770
771     *) ac_cv_build_alias=$nonopt ;;
772     esac ;;
773   esac
774
775   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
776   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
777   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
778   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
779 else
780   echo $ac_n "(cached) $ac_c" 1>&6
781 fi
782
783 echo "$ac_t""$ac_cv_build" 1>&6
784
785 build=$ac_cv_build
786 build_alias=$ac_cv_build_alias
787 build_cpu=$ac_cv_build_cpu
788 build_vendor=$ac_cv_build_vendor
789 build_os=$ac_cv_build_os
790
791
792
793
794
795 # Do some error checking and defaulting for the host and target type.
796 # The inputs are:
797 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
798 #
799 # The rules are:
800 # 1. You are not allowed to specify --host, --target, and nonopt at the
801 #    same time.
802 # 2. Host defaults to nonopt.
803 # 3. If nonopt is not specified, then host defaults to the current host,
804 #    as determined by config.guess.
805 # 4. Target and build default to nonopt.
806 # 5. If nonopt is not specified, then target and build default to host.
807
808 # The aliases save the names the user supplied, while $host etc.
809 # will get canonicalized.
810 case $host---$target---$nonopt in
811 NONE---*---* | *---NONE---* | *---*---NONE) ;;
812 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
813 esac
814
815 test "$host_alias" != "$target_alias" &&
816   test "$program_prefix$program_suffix$program_transform_name" = \
817     NONENONEs,x,x, &&
818   program_prefix=${target_alias}-
819
820
821 # Find a good install program.  We prefer a C program (faster),
822 # so one script is as good as another.  But avoid the broken or
823 # incompatible versions:
824 # SysV /etc/install, /usr/sbin/install
825 # SunOS /usr/etc/install
826 # IRIX /sbin/install
827 # AIX /bin/install
828 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
829 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
830 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
831 # ./install, which can be erroneously created by make from ./install.sh.
832 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
833 echo "configure:832: checking for a BSD compatible install" >&5
834 if test -z "$INSTALL"; then
835 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
836   echo $ac_n "(cached) $ac_c" 1>&6
837 else
838     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
839   for ac_dir in $PATH; do
840     # Account for people who put trailing slashes in PATH elements.
841     case "$ac_dir/" in
842     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
843     *)
844       # OSF1 and SCO ODT 3.0 have their own names for install.
845       # Don't use installbsd from OSF since it installs stuff as root
846       # by default.
847       for ac_prog in ginstall scoinst install; do
848         if test -f $ac_dir/$ac_prog; then
849           if test $ac_prog = install &&
850             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
851             # AIX install.  It has an incompatible calling convention.
852             :
853           elif test $ac_prog = install &&
854             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # program-specific install script used by HP pwplus--don't use.
856             :
857           else
858             ac_cv_path_install="$ac_dir/$ac_prog -c"
859             break 2
860           fi
861         fi
862       done
863       ;;
864     esac
865   done
866   IFS="$ac_save_IFS"
867
868 fi
869   if test "${ac_cv_path_install+set}" = set; then
870     INSTALL="$ac_cv_path_install"
871   else
872     # As a last resort, use the slow shell script.  We don't cache a
873     # path for INSTALL within a source directory, because that will
874     # break other packages using the cache if that directory is
875     # removed, or if the path is relative.
876     INSTALL="$ac_install_sh"
877   fi
878 fi
879 echo "$ac_t""$INSTALL" 1>&6
880
881 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
882 # It thinks the first close brace ends the variable substitution.
883 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
884
885 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
886
887 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
888
889 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
890 echo "configure:889: checking whether build environment is sane" >&5
891 # Just in case
892 sleep 1
893 echo timestamp > conftestfile
894 # Do `set' in a subshell so we don't clobber the current shell's
895 # arguments.  Must try -L first in case configure is actually a
896 # symlink; some systems play weird games with the mod time of symlinks
897 # (eg FreeBSD returns the mod time of the symlink's containing
898 # directory).
899 if (
900    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
901    if test "$*" = "X"; then
902       # -L didn't work.
903       set X `ls -t $srcdir/configure conftestfile`
904    fi
905    if test "$*" != "X $srcdir/configure conftestfile" \
906       && test "$*" != "X conftestfile $srcdir/configure"; then
907
908       # If neither matched, then we have a broken ls.  This can happen
909       # if, for instance, CONFIG_SHELL is bash and it inherits a
910       # broken ls alias from the environment.  This has actually
911       # happened.  Such a system could not be considered "sane".
912       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
913 alias in your environment" 1>&2; exit 1; }
914    fi
915
916    test "$2" = conftestfile
917    )
918 then
919    # Ok.
920    :
921 else
922    { echo "configure: error: newly created file is older than distributed files!
923 Check your system clock" 1>&2; exit 1; }
924 fi
925 rm -f conftest*
926 echo "$ac_t""yes" 1>&6
927 if test "$program_transform_name" = s,x,x,; then
928   program_transform_name=
929 else
930   # Double any \ or $.  echo might interpret backslashes.
931   cat <<\EOF_SED > conftestsed
932 s,\\,\\\\,g; s,\$,$$,g
933 EOF_SED
934   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
935   rm -f conftestsed
936 fi
937 test "$program_prefix" != NONE &&
938   program_transform_name="s,^,${program_prefix},;$program_transform_name"
939 # Use a double $ so make ignores it.
940 test "$program_suffix" != NONE &&
941   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
942
943 # sed with no file args requires a program.
944 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
945
946 for ac_prog in mawk gawk nawk awk
947 do
948 # Extract the first word of "$ac_prog", so it can be a program name with args.
949 set dummy $ac_prog; ac_word=$2
950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
951 echo "configure:950: checking for $ac_word" >&5
952 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
953   echo $ac_n "(cached) $ac_c" 1>&6
954 else
955   if test -n "$AWK"; then
956   ac_cv_prog_AWK="$AWK" # Let the user override the test.
957 else
958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
959   ac_dummy="$PATH"
960   for ac_dir in $ac_dummy; do
961     test -z "$ac_dir" && ac_dir=.
962     if test -f $ac_dir/$ac_word; then
963       ac_cv_prog_AWK="$ac_prog"
964       break
965     fi
966   done
967   IFS="$ac_save_ifs"
968 fi
969 fi
970 AWK="$ac_cv_prog_AWK"
971 if test -n "$AWK"; then
972   echo "$ac_t""$AWK" 1>&6
973 else
974   echo "$ac_t""no" 1>&6
975 fi
976
977 test -n "$AWK" && break
978 done
979
980 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
981 echo "configure:980: checking whether ${MAKE-make} sets \${MAKE}" >&5
982 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
983 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
984   echo $ac_n "(cached) $ac_c" 1>&6
985 else
986   cat > conftestmake <<\EOF
987 all:
988         @echo 'ac_maketemp="${MAKE}"'
989 EOF
990 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
991 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
992 if test -n "$ac_maketemp"; then
993   eval ac_cv_prog_make_${ac_make}_set=yes
994 else
995   eval ac_cv_prog_make_${ac_make}_set=no
996 fi
997 rm -f conftestmake
998 fi
999 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1000   echo "$ac_t""yes" 1>&6
1001   SET_MAKE=
1002 else
1003   echo "$ac_t""no" 1>&6
1004   SET_MAKE="MAKE=${MAKE-make}"
1005 fi
1006
1007
1008
1009 PACKAGE=OpenLDAP
1010
1011 VERSION=$OL_VERSION
1012
1013 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1014   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1015 fi
1016
1017
1018
1019 missing_dir=`cd $ac_aux_dir && pwd`
1020 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1021 echo "configure:1020: checking for working aclocal" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1026    ACLOCAL=aclocal
1027    echo "$ac_t""found" 1>&6
1028 else
1029    ACLOCAL="$missing_dir/missing aclocal"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1034 echo "configure:1033: checking for working autoconf" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOCONF=autoconf
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOCONF="$missing_dir/missing autoconf"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1047 echo "configure:1046: checking for working automake" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (automake --version) < /dev/null > /dev/null 2>&1; then
1052    AUTOMAKE=automake
1053    echo "$ac_t""found" 1>&6
1054 else
1055    AUTOMAKE="$missing_dir/missing automake"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1060 echo "configure:1059: checking for working autoheader" >&5
1061 # Run test in a subshell; some versions of sh will print an error if
1062 # an executable is not found, even if stderr is redirected.
1063 # Redirect stdin to placate older versions of autoconf.  Sigh.
1064 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1065    AUTOHEADER=autoheader
1066    echo "$ac_t""found" 1>&6
1067 else
1068    AUTOHEADER="$missing_dir/missing autoheader"
1069    echo "$ac_t""missing" 1>&6
1070 fi
1071
1072 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1073 echo "configure:1072: checking for working makeinfo" >&5
1074 # Run test in a subshell; some versions of sh will print an error if
1075 # an executable is not found, even if stderr is redirected.
1076 # Redirect stdin to placate older versions of autoconf.  Sigh.
1077 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1078    MAKEINFO=makeinfo
1079    echo "$ac_t""found" 1>&6
1080 else
1081    MAKEINFO="$missing_dir/missing makeinfo"
1082    echo "$ac_t""missing" 1>&6
1083 fi
1084
1085 install_sh="$missing_dir/install-sh"
1086 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1087
1088 for ac_prog in gnutar gtar tar
1089 do
1090 # Extract the first word of "$ac_prog", so it can be a program name with args.
1091 set dummy $ac_prog; ac_word=$2
1092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1093 echo "configure:1092: checking for $ac_word" >&5
1094 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1095   echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097   if test -n "$AMTAR"; then
1098   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1099 else
1100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1101   ac_dummy="$PATH"
1102   for ac_dir in $ac_dummy; do
1103     test -z "$ac_dir" && ac_dir=.
1104     if test -f $ac_dir/$ac_word; then
1105       ac_cv_prog_AMTAR="$ac_prog"
1106       break
1107     fi
1108   done
1109   IFS="$ac_save_ifs"
1110 fi
1111 fi
1112 AMTAR="$ac_cv_prog_AMTAR"
1113 if test -n "$AMTAR"; then
1114   echo "$ac_t""$AMTAR" 1>&6
1115 else
1116   echo "$ac_t""no" 1>&6
1117 fi
1118
1119 test -n "$AMTAR" && break
1120 done
1121
1122
1123 AMTARFLAGS=
1124 if test -n "$AMTAR"; then
1125   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1126         AMTARFLAGS=o
1127   fi
1128 fi
1129
1130
1131
1132 cat >> confdefs.h <<EOF
1133 #define OPENLDAP_PACKAGE "$PACKAGE"
1134 EOF
1135
1136 cat >> confdefs.h <<EOF
1137 #define OPENLDAP_VERSION "$VERSION"
1138 EOF
1139
1140
1141
1142
1143 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1144 echo "configure:1143: checking configure arguments" >&5
1145
1146
1147 top_builddir=`pwd`
1148
1149 ldap_subdir="/openldap"
1150
1151 # Check whether --with-subdir or --without-subdir was given.
1152 if test "${with_subdir+set}" = set; then
1153   withval="$with_subdir"
1154   case "$withval" in
1155         no) ldap_subdir=""
1156                 ;;
1157         yes)
1158                 ;;
1159         /*|\\*)
1160                 ldap_subdir="$withval"
1161                 ;;
1162         *)
1163                 ldap_subdir="/$withval"
1164                 ;;
1165 esac
1166
1167 fi
1168
1169
1170 # OpenLDAP --enable-debug
1171         # Check whether --enable-debug or --disable-debug was given.
1172 if test "${enable_debug+set}" = set; then
1173   enableval="$enable_debug"
1174   
1175         ol_arg=invalid
1176         for ol_val in auto yes no ; do
1177                 if test "$enableval" = "$ol_val" ; then
1178                         ol_arg="$ol_val"
1179                 fi
1180         done
1181         if test "$ol_arg" = "invalid" ; then
1182                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1183         fi
1184         ol_enable_debug="$ol_arg"
1185
1186 else
1187         ol_enable_debug="yes"
1188 fi
1189 # end --enable-debug
1190 # OpenLDAP --enable-syslog
1191         # Check whether --enable-syslog or --disable-syslog was given.
1192 if test "${enable_syslog+set}" = set; then
1193   enableval="$enable_syslog"
1194   
1195         ol_arg=invalid
1196         for ol_val in auto yes no ; do
1197                 if test "$enableval" = "$ol_val" ; then
1198                         ol_arg="$ol_val"
1199                 fi
1200         done
1201         if test "$ol_arg" = "invalid" ; then
1202                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1203         fi
1204         ol_enable_syslog="$ol_arg"
1205
1206 else
1207         ol_enable_syslog="auto"
1208 fi
1209 # end --enable-syslog
1210 # OpenLDAP --enable-proctitle
1211         # Check whether --enable-proctitle or --disable-proctitle was given.
1212 if test "${enable_proctitle+set}" = set; then
1213   enableval="$enable_proctitle"
1214   
1215         ol_arg=invalid
1216         for ol_val in auto yes no ; do
1217                 if test "$enableval" = "$ol_val" ; then
1218                         ol_arg="$ol_val"
1219                 fi
1220         done
1221         if test "$ol_arg" = "invalid" ; then
1222                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1223         fi
1224         ol_enable_proctitle="$ol_arg"
1225
1226 else
1227         ol_enable_proctitle="yes"
1228 fi
1229 # end --enable-proctitle
1230 # OpenLDAP --enable-cache
1231         # Check whether --enable-cache or --disable-cache was given.
1232 if test "${enable_cache+set}" = set; then
1233   enableval="$enable_cache"
1234   
1235         ol_arg=invalid
1236         for ol_val in auto yes no ; do
1237                 if test "$enableval" = "$ol_val" ; then
1238                         ol_arg="$ol_val"
1239                 fi
1240         done
1241         if test "$ol_arg" = "invalid" ; then
1242                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1243         fi
1244         ol_enable_cache="$ol_arg"
1245
1246 else
1247         ol_enable_cache="yes"
1248 fi
1249 # end --enable-cache
1250 # OpenLDAP --enable-dns
1251         # Check whether --enable-dns or --disable-dns was given.
1252 if test "${enable_dns+set}" = set; then
1253   enableval="$enable_dns"
1254   
1255         ol_arg=invalid
1256         for ol_val in auto yes no ; do
1257                 if test "$enableval" = "$ol_val" ; then
1258                         ol_arg="$ol_val"
1259                 fi
1260         done
1261         if test "$ol_arg" = "invalid" ; then
1262                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1263         fi
1264         ol_enable_dns="$ol_arg"
1265
1266 else
1267         ol_enable_dns="no"
1268 fi
1269 # end --enable-dns
1270 # OpenLDAP --enable-referrals
1271         # Check whether --enable-referrals or --disable-referrals was given.
1272 if test "${enable_referrals+set}" = set; then
1273   enableval="$enable_referrals"
1274   
1275         ol_arg=invalid
1276         for ol_val in auto yes no ; do
1277                 if test "$enableval" = "$ol_val" ; then
1278                         ol_arg="$ol_val"
1279                 fi
1280         done
1281         if test "$ol_arg" = "invalid" ; then
1282                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1283         fi
1284         ol_enable_referrals="$ol_arg"
1285
1286 else
1287         ol_enable_referrals="yes"
1288 fi
1289 # end --enable-referrals
1290 # OpenLDAP --enable-cldap
1291         # Check whether --enable-cldap or --disable-cldap was given.
1292 if test "${enable_cldap+set}" = set; then
1293   enableval="$enable_cldap"
1294   
1295         ol_arg=invalid
1296         for ol_val in auto yes no ; do
1297                 if test "$enableval" = "$ol_val" ; then
1298                         ol_arg="$ol_val"
1299                 fi
1300         done
1301         if test "$ol_arg" = "invalid" ; then
1302                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1303         fi
1304         ol_enable_cldap="$ol_arg"
1305
1306 else
1307         ol_enable_cldap="no"
1308 fi
1309 # end --enable-cldap
1310 # OpenLDAP --enable-ldapi
1311         # Check whether --enable-ldapi or --disable-ldapi was given.
1312 if test "${enable_ldapi+set}" = set; then
1313   enableval="$enable_ldapi"
1314   
1315         ol_arg=invalid
1316         for ol_val in auto yes no ; do
1317                 if test "$enableval" = "$ol_val" ; then
1318                         ol_arg="$ol_val"
1319                 fi
1320         done
1321         if test "$ol_arg" = "invalid" ; then
1322                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1323         fi
1324         ol_enable_ldapi="$ol_arg"
1325
1326 else
1327         ol_enable_ldapi="no"
1328 fi
1329 # end --enable-ldapi
1330 # OpenLDAP --enable-x_compile
1331         # Check whether --enable-x_compile or --disable-x_compile was given.
1332 if test "${enable_x_compile+set}" = set; then
1333   enableval="$enable_x_compile"
1334   
1335         ol_arg=invalid
1336         for ol_val in yes no ; do
1337                 if test "$enableval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1343         fi
1344         ol_enable_x_compile="$ol_arg"
1345
1346 else
1347         ol_enable_x_compile="no"
1348 fi
1349 # end --enable-x_compile
1350
1351 # OpenLDAP --enable-dmalloc
1352         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1353 if test "${enable_dmalloc+set}" = set; then
1354   enableval="$enable_dmalloc"
1355   
1356         ol_arg=invalid
1357         for ol_val in auto yes no ; do
1358                 if test "$enableval" = "$ol_val" ; then
1359                         ol_arg="$ol_val"
1360                 fi
1361         done
1362         if test "$ol_arg" = "invalid" ; then
1363                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1364         fi
1365         ol_enable_dmalloc="$ol_arg"
1366
1367 else
1368         ol_enable_dmalloc="no"
1369 fi
1370 # end --enable-dmalloc
1371
1372 # OpenLDAP --with-cyrus-sasl
1373         # Check whether --with-cyrus-sasl or --without-cyrus_sasl was given.
1374 if test "${with_cyrus_sasl+set}" = set; then
1375   withval="$with_cyrus_sasl"
1376   
1377         ol_arg=invalid
1378         for ol_val in auto yes no  ; do
1379                 if test "$withval" = "$ol_val" ; then
1380                         ol_arg="$ol_val"
1381                 fi
1382         done
1383         if test "$ol_arg" = "invalid" ; then
1384                 { echo "configure: error: bad value $withval for --with-cyrus-sasl" 1>&2; exit 1; }
1385         fi
1386         ol_with_cyrus_sasl="$ol_arg"
1387
1388 else
1389         ol_with_cyrus_sasl="auto"
1390 fi
1391 # end --with-cyrus-sasl
1392
1393 # OpenLDAP --with-fetch
1394         # Check whether --with-fetch or --without-fetch was given.
1395 if test "${with_fetch+set}" = set; then
1396   withval="$with_fetch"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no  ; do
1400                 if test "$withval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1406         fi
1407         ol_with_fetch="$ol_arg"
1408
1409 else
1410         ol_with_fetch="auto"
1411 fi
1412 # end --with-fetch
1413
1414 # OpenLDAP --with-kerberos
1415         # Check whether --with-kerberos or --without-kerberos was given.
1416 if test "${with_kerberos+set}" = set; then
1417   withval="$with_kerberos"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto k5 kth k4 afs yes no ; do
1421                 if test "$withval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1427         fi
1428         ol_with_kerberos="$ol_arg"
1429
1430 else
1431         ol_with_kerberos="auto"
1432 fi
1433 # end --with-kerberos
1434
1435 # OpenLDAP --with-readline
1436         # Check whether --with-readline or --without-readline was given.
1437 if test "${with_readline+set}" = set; then
1438   withval="$with_readline"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto yes no  ; do
1442                 if test "$withval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1448         fi
1449         ol_with_readline="$ol_arg"
1450
1451 else
1452         ol_with_readline="auto"
1453 fi
1454 # end --with-readline
1455
1456 # OpenLDAP --with-threads
1457         # Check whether --with-threads or --without-threads was given.
1458 if test "${with_threads+set}" = set; then
1459   withval="$with_threads"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1463                 if test "$withval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1469         fi
1470         ol_with_threads="$ol_arg"
1471
1472 else
1473         ol_with_threads="auto"
1474 fi
1475 # end --with-threads
1476
1477 # OpenLDAP --with-tls
1478         # Check whether --with-tls or --without-tls was given.
1479 if test "${with_tls+set}" = set; then
1480   withval="$with_tls"
1481   
1482         ol_arg=invalid
1483         for ol_val in auto ssleay openssl yes no  ; do
1484                 if test "$withval" = "$ol_val" ; then
1485                         ol_arg="$ol_val"
1486                 fi
1487         done
1488         if test "$ol_arg" = "invalid" ; then
1489                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1490         fi
1491         ol_with_tls="$ol_arg"
1492
1493 else
1494         ol_with_tls="auto"
1495 fi
1496 # end --with-tls
1497
1498 # OpenLDAP --with-yielding_select
1499         # Check whether --with-yielding_select or --without-yielding_select was given.
1500 if test "${with_yielding_select+set}" = set; then
1501   withval="$with_yielding_select"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto yes no manual  ; do
1505                 if test "$withval" = "$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 $withval for --with-yielding_select" 1>&2; exit 1; }
1511         fi
1512         ol_with_yielding_select="$ol_arg"
1513
1514 else
1515         ol_with_yielding_select="auto"
1516 fi
1517 # end --with-yielding_select
1518
1519
1520 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1521 if test "${with_xxldapdoptions+set}" = set; then
1522   withval="$with_xxldapdoptions"
1523   :
1524 fi
1525
1526 # OpenLDAP --enable-ldapd
1527         # Check whether --enable-ldapd or --disable-ldapd was given.
1528 if test "${enable_ldapd+set}" = set; then
1529   enableval="$enable_ldapd"
1530   
1531         ol_arg=invalid
1532         for ol_val in auto yes no ; do
1533                 if test "$enableval" = "$ol_val" ; then
1534                         ol_arg="$ol_val"
1535                 fi
1536         done
1537         if test "$ol_arg" = "invalid" ; then
1538                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1539         fi
1540         ol_enable_ldapd="$ol_arg"
1541
1542 else
1543         ol_enable_ldapd="no"
1544 fi
1545 # end --enable-ldapd
1546
1547 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1548 if test "${with_xxslapdoptions+set}" = set; then
1549   withval="$with_xxslapdoptions"
1550   :
1551 fi
1552
1553 # OpenLDAP --enable-slapd
1554         # Check whether --enable-slapd or --disable-slapd was given.
1555 if test "${enable_slapd+set}" = set; then
1556   enableval="$enable_slapd"
1557   
1558         ol_arg=invalid
1559         for ol_val in auto yes no ; do
1560                 if test "$enableval" = "$ol_val" ; then
1561                         ol_arg="$ol_val"
1562                 fi
1563         done
1564         if test "$ol_arg" = "invalid" ; then
1565                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1566         fi
1567         ol_enable_slapd="$ol_arg"
1568
1569 else
1570         ol_enable_slapd="yes"
1571 fi
1572 # end --enable-slapd
1573 # OpenLDAP --enable-cleartext
1574         # Check whether --enable-cleartext or --disable-cleartext was given.
1575 if test "${enable_cleartext+set}" = set; then
1576   enableval="$enable_cleartext"
1577   
1578         ol_arg=invalid
1579         for ol_val in auto yes no ; do
1580                 if test "$enableval" = "$ol_val" ; then
1581                         ol_arg="$ol_val"
1582                 fi
1583         done
1584         if test "$ol_arg" = "invalid" ; then
1585                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1586         fi
1587         ol_enable_cleartext="$ol_arg"
1588
1589 else
1590         ol_enable_cleartext="yes"
1591 fi
1592 # end --enable-cleartext
1593 # OpenLDAP --enable-crypt
1594         # Check whether --enable-crypt or --disable-crypt was given.
1595 if test "${enable_crypt+set}" = set; then
1596   enableval="$enable_crypt"
1597   
1598         ol_arg=invalid
1599         for ol_val in auto yes no ; do
1600                 if test "$enableval" = "$ol_val" ; then
1601                         ol_arg="$ol_val"
1602                 fi
1603         done
1604         if test "$ol_arg" = "invalid" ; then
1605                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1606         fi
1607         ol_enable_crypt="$ol_arg"
1608
1609 else
1610         ol_enable_crypt="auto"
1611 fi
1612 # end --enable-crypt
1613 # OpenLDAP --enable-modules
1614         # Check whether --enable-modules or --disable-modules was given.
1615 if test "${enable_modules+set}" = set; then
1616   enableval="$enable_modules"
1617   
1618         ol_arg=invalid
1619         for ol_val in auto yes no ; do
1620                 if test "$enableval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1626         fi
1627         ol_enable_modules="$ol_arg"
1628
1629 else
1630         ol_enable_modules="no"
1631 fi
1632 # end --enable-modules
1633 # OpenLDAP --enable-multimaster
1634         # Check whether --enable-multimaster or --disable-multimaster was given.
1635 if test "${enable_multimaster+set}" = set; then
1636   enableval="$enable_multimaster"
1637   
1638         ol_arg=invalid
1639         for ol_val in auto yes no ; do
1640                 if test "$enableval" = "$ol_val" ; then
1641                         ol_arg="$ol_val"
1642                 fi
1643         done
1644         if test "$ol_arg" = "invalid" ; then
1645                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1646         fi
1647         ol_enable_multimaster="$ol_arg"
1648
1649 else
1650         ol_enable_multimaster="no"
1651 fi
1652 # end --enable-multimaster
1653 # OpenLDAP --enable-phonetic
1654         # Check whether --enable-phonetic or --disable-phonetic was given.
1655 if test "${enable_phonetic+set}" = set; then
1656   enableval="$enable_phonetic"
1657   
1658         ol_arg=invalid
1659         for ol_val in auto yes no ; do
1660                 if test "$enableval" = "$ol_val" ; then
1661                         ol_arg="$ol_val"
1662                 fi
1663         done
1664         if test "$ol_arg" = "invalid" ; then
1665                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1666         fi
1667         ol_enable_phonetic="$ol_arg"
1668
1669 else
1670         ol_enable_phonetic="no"
1671 fi
1672 # end --enable-phonetic
1673 # OpenLDAP --enable-quipu
1674         # Check whether --enable-quipu or --disable-quipu was given.
1675 if test "${enable_quipu+set}" = set; then
1676   enableval="$enable_quipu"
1677   
1678         ol_arg=invalid
1679         for ol_val in auto yes no ; do
1680                 if test "$enableval" = "$ol_val" ; then
1681                         ol_arg="$ol_val"
1682                 fi
1683         done
1684         if test "$ol_arg" = "invalid" ; then
1685                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1686         fi
1687         ol_enable_quipu="$ol_arg"
1688
1689 else
1690         ol_enable_quipu="no"
1691 fi
1692 # end --enable-quipu
1693 # OpenLDAP --enable-rlookups
1694         # Check whether --enable-rlookups or --disable-rlookups was given.
1695 if test "${enable_rlookups+set}" = set; then
1696   enableval="$enable_rlookups"
1697   
1698         ol_arg=invalid
1699         for ol_val in auto yes no ; do
1700                 if test "$enableval" = "$ol_val" ; then
1701                         ol_arg="$ol_val"
1702                 fi
1703         done
1704         if test "$ol_arg" = "invalid" ; then
1705                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1706         fi
1707         ol_enable_rlookups="$ol_arg"
1708
1709 else
1710         ol_enable_rlookups="auto"
1711 fi
1712 # end --enable-rlookups
1713 # OpenLDAP --enable-aci
1714         # Check whether --enable-aci or --disable-aci was given.
1715 if test "${enable_aci+set}" = set; then
1716   enableval="$enable_aci"
1717   
1718         ol_arg=invalid
1719         for ol_val in auto yes no ; do
1720                 if test "$enableval" = "$ol_val" ; then
1721                         ol_arg="$ol_val"
1722                 fi
1723         done
1724         if test "$ol_arg" = "invalid" ; then
1725                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1726         fi
1727         ol_enable_aci="$ol_arg"
1728
1729 else
1730         ol_enable_aci="no"
1731 fi
1732 # end --enable-aci
1733 # OpenLDAP --enable-discreteaci
1734         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1735 if test "${enable_discreteaci+set}" = set; then
1736   enableval="$enable_discreteaci"
1737   
1738         ol_arg=invalid
1739         for ol_val in auto yes no ; do
1740                 if test "$enableval" = "$ol_val" ; then
1741                         ol_arg="$ol_val"
1742                 fi
1743         done
1744         if test "$ol_arg" = "invalid" ; then
1745                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1746         fi
1747         ol_enable_discreteaci="$ol_arg"
1748
1749 else
1750         ol_enable_discreteaci="no"
1751 fi
1752 # end --enable-discreteaci
1753 # OpenLDAP --enable-wrappers
1754         # Check whether --enable-wrappers or --disable-wrappers was given.
1755 if test "${enable_wrappers+set}" = set; then
1756   enableval="$enable_wrappers"
1757   
1758         ol_arg=invalid
1759         for ol_val in auto yes no ; do
1760                 if test "$enableval" = "$ol_val" ; then
1761                         ol_arg="$ol_val"
1762                 fi
1763         done
1764         if test "$ol_arg" = "invalid" ; then
1765                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1766         fi
1767         ol_enable_wrappers="$ol_arg"
1768
1769 else
1770         ol_enable_wrappers="no"
1771 fi
1772 # end --enable-wrappers
1773 # OpenLDAP --enable-dynamic
1774         # Check whether --enable-dynamic or --disable-dynamic was given.
1775 if test "${enable_dynamic+set}" = set; then
1776   enableval="$enable_dynamic"
1777   
1778         ol_arg=invalid
1779         for ol_val in auto yes no ; do
1780                 if test "$enableval" = "$ol_val" ; then
1781                         ol_arg="$ol_val"
1782                 fi
1783         done
1784         if test "$ol_arg" = "invalid" ; then
1785                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1786         fi
1787         ol_enable_dynamic="$ol_arg"
1788
1789 else
1790         ol_enable_dynamic="no"
1791 fi
1792 # end --enable-dynamic
1793
1794 # OpenLDAP --enable-bdb2
1795         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1796 if test "${enable_bdb2+set}" = set; then
1797   enableval="$enable_bdb2"
1798   
1799         ol_arg=invalid
1800         for ol_val in auto yes no ; do
1801                 if test "$enableval" = "$ol_val" ; then
1802                         ol_arg="$ol_val"
1803                 fi
1804         done
1805         if test "$ol_arg" = "invalid" ; then
1806                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1807         fi
1808         ol_enable_bdb2="$ol_arg"
1809
1810 else
1811         ol_enable_bdb2="no"
1812 fi
1813 # end --enable-bdb2
1814 # OpenLDAP --with-bdb2_module
1815         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1816 if test "${with_bdb2_module+set}" = set; then
1817   withval="$with_bdb2_module"
1818   
1819         ol_arg=invalid
1820         for ol_val in static dynamic ; do
1821                 if test "$withval" = "$ol_val" ; then
1822                         ol_arg="$ol_val"
1823                 fi
1824         done
1825         if test "$ol_arg" = "invalid" ; then
1826                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1827         fi
1828         ol_with_bdb2_module="$ol_arg"
1829
1830 else
1831         ol_with_bdb2_module="static"
1832 fi
1833 # end --with-bdb2_module
1834
1835 # OpenLDAP --enable-ldap
1836         # Check whether --enable-ldap or --disable-ldap was given.
1837 if test "${enable_ldap+set}" = set; then
1838   enableval="$enable_ldap"
1839   
1840         ol_arg=invalid
1841         for ol_val in auto yes no ; do
1842                 if test "$enableval" = "$ol_val" ; then
1843                         ol_arg="$ol_val"
1844                 fi
1845         done
1846         if test "$ol_arg" = "invalid" ; then
1847                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1848         fi
1849         ol_enable_ldap="$ol_arg"
1850
1851 else
1852         ol_enable_ldap="no"
1853 fi
1854 # end --enable-ldap
1855 # OpenLDAP --with-ldap_module
1856         # Check whether --with-ldap_module or --without-ldap_module was given.
1857 if test "${with_ldap_module+set}" = set; then
1858   withval="$with_ldap_module"
1859   
1860         ol_arg=invalid
1861         for ol_val in static dynamic ; do
1862                 if test "$withval" = "$ol_val" ; then
1863                         ol_arg="$ol_val"
1864                 fi
1865         done
1866         if test "$ol_arg" = "invalid" ; then
1867                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1868         fi
1869         ol_with_ldap_module="$ol_arg"
1870
1871 else
1872         ol_with_ldap_module="static"
1873 fi
1874 # end --with-ldap_module
1875
1876 # OpenLDAP --enable-ldbm
1877         # Check whether --enable-ldbm or --disable-ldbm was given.
1878 if test "${enable_ldbm+set}" = set; then
1879   enableval="$enable_ldbm"
1880   
1881         ol_arg=invalid
1882         for ol_val in auto yes no ; do
1883                 if test "$enableval" = "$ol_val" ; then
1884                         ol_arg="$ol_val"
1885                 fi
1886         done
1887         if test "$ol_arg" = "invalid" ; then
1888                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1889         fi
1890         ol_enable_ldbm="$ol_arg"
1891
1892 else
1893         ol_enable_ldbm="yes"
1894 fi
1895 # end --enable-ldbm
1896 # OpenLDAP --with-ldbm_api
1897         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1898 if test "${with_ldbm_api+set}" = set; then
1899   withval="$with_ldbm_api"
1900   
1901         ol_arg=invalid
1902         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1903                 if test "$withval" = "$ol_val" ; then
1904                         ol_arg="$ol_val"
1905                 fi
1906         done
1907         if test "$ol_arg" = "invalid" ; then
1908                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1909         fi
1910         ol_with_ldbm_api="$ol_arg"
1911
1912 else
1913         ol_with_ldbm_api="auto"
1914 fi
1915 # end --with-ldbm_api
1916
1917 # OpenLDAP --with-ldbm_module
1918         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1919 if test "${with_ldbm_module+set}" = set; then
1920   withval="$with_ldbm_module"
1921   
1922         ol_arg=invalid
1923         for ol_val in static dynamic ; do
1924                 if test "$withval" = "$ol_val" ; then
1925                         ol_arg="$ol_val"
1926                 fi
1927         done
1928         if test "$ol_arg" = "invalid" ; then
1929                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1930         fi
1931         ol_with_ldbm_module="$ol_arg"
1932
1933 else
1934         ol_with_ldbm_module="static"
1935 fi
1936 # end --with-ldbm_module
1937
1938 # OpenLDAP --with-ldbm_type
1939         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1940 if test "${with_ldbm_type+set}" = set; then
1941   withval="$with_ldbm_type"
1942   
1943         ol_arg=invalid
1944         for ol_val in auto btree hash ; do
1945                 if test "$withval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1951         fi
1952         ol_with_ldbm_type="$ol_arg"
1953
1954 else
1955         ol_with_ldbm_type="auto"
1956 fi
1957 # end --with-ldbm_type
1958
1959
1960 # OpenLDAP --enable-passwd
1961         # Check whether --enable-passwd or --disable-passwd was given.
1962 if test "${enable_passwd+set}" = set; then
1963   enableval="$enable_passwd"
1964   
1965         ol_arg=invalid
1966         for ol_val in auto yes no ; do
1967                 if test "$enableval" = "$ol_val" ; then
1968                         ol_arg="$ol_val"
1969                 fi
1970         done
1971         if test "$ol_arg" = "invalid" ; then
1972                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1973         fi
1974         ol_enable_passwd="$ol_arg"
1975
1976 else
1977         ol_enable_passwd="no"
1978 fi
1979 # end --enable-passwd
1980 # OpenLDAP --with-passwd_module
1981         # Check whether --with-passwd_module or --without-passwd_module was given.
1982 if test "${with_passwd_module+set}" = set; then
1983   withval="$with_passwd_module"
1984   
1985         ol_arg=invalid
1986         for ol_val in static dynamic ; do
1987                 if test "$withval" = "$ol_val" ; then
1988                         ol_arg="$ol_val"
1989                 fi
1990         done
1991         if test "$ol_arg" = "invalid" ; then
1992                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1993         fi
1994         ol_with_passwd_module="$ol_arg"
1995
1996 else
1997         ol_with_passwd_module="static"
1998 fi
1999 # end --with-passwd_module
2000
2001 # OpenLDAP --enable-perl
2002         # Check whether --enable-perl or --disable-perl was given.
2003 if test "${enable_perl+set}" = set; then
2004   enableval="$enable_perl"
2005   
2006         ol_arg=invalid
2007         for ol_val in auto yes no ; do
2008                 if test "$enableval" = "$ol_val" ; then
2009                         ol_arg="$ol_val"
2010                 fi
2011         done
2012         if test "$ol_arg" = "invalid" ; then
2013                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2014         fi
2015         ol_enable_perl="$ol_arg"
2016
2017 else
2018         ol_enable_perl="no"
2019 fi
2020 # end --enable-perl
2021 # OpenLDAP --with-perl_module
2022         # Check whether --with-perl_module or --without-perl_module was given.
2023 if test "${with_perl_module+set}" = set; then
2024   withval="$with_perl_module"
2025   
2026         ol_arg=invalid
2027         for ol_val in static dynamic ; do
2028                 if test "$withval" = "$ol_val" ; then
2029                         ol_arg="$ol_val"
2030                 fi
2031         done
2032         if test "$ol_arg" = "invalid" ; then
2033                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2034         fi
2035         ol_with_perl_module="$ol_arg"
2036
2037 else
2038         ol_with_perl_module="static"
2039 fi
2040 # end --with-perl_module
2041
2042 # OpenLDAP --enable-shell
2043         # Check whether --enable-shell or --disable-shell was given.
2044 if test "${enable_shell+set}" = set; then
2045   enableval="$enable_shell"
2046   
2047         ol_arg=invalid
2048         for ol_val in auto yes no ; do
2049                 if test "$enableval" = "$ol_val" ; then
2050                         ol_arg="$ol_val"
2051                 fi
2052         done
2053         if test "$ol_arg" = "invalid" ; then
2054                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2055         fi
2056         ol_enable_shell="$ol_arg"
2057
2058 else
2059         ol_enable_shell="no"
2060 fi
2061 # end --enable-shell
2062 # OpenLDAP --with-shell_module
2063         # Check whether --with-shell_module or --without-shell_module was given.
2064 if test "${with_shell_module+set}" = set; then
2065   withval="$with_shell_module"
2066   
2067         ol_arg=invalid
2068         for ol_val in static dynamic ; do
2069                 if test "$withval" = "$ol_val" ; then
2070                         ol_arg="$ol_val"
2071                 fi
2072         done
2073         if test "$ol_arg" = "invalid" ; then
2074                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2075         fi
2076         ol_with_shell_module="$ol_arg"
2077
2078 else
2079         ol_with_shell_module="static"
2080 fi
2081 # end --with-shell_module
2082
2083 # OpenLDAP --enable-tcl
2084         # Check whether --enable-tcl or --disable-tcl was given.
2085 if test "${enable_tcl+set}" = set; then
2086   enableval="$enable_tcl"
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-tcl" 1>&2; exit 1; }
2096         fi
2097         ol_enable_tcl="$ol_arg"
2098
2099 else
2100         ol_enable_tcl="no"
2101 fi
2102 # end --enable-tcl
2103 # OpenLDAP --with-tcl_module
2104         # Check whether --with-tcl_module or --without-tcl_module was given.
2105 if test "${with_tcl_module+set}" = set; then
2106   withval="$with_tcl_module"
2107   
2108         ol_arg=invalid
2109         for ol_val in static dynamic ; do
2110                 if test "$withval" = "$ol_val" ; then
2111                         ol_arg="$ol_val"
2112                 fi
2113         done
2114         if test "$ol_arg" = "invalid" ; then
2115                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2116         fi
2117         ol_with_tcl_module="$ol_arg"
2118
2119 else
2120         ol_with_tcl_module="static"
2121 fi
2122 # end --with-tcl_module
2123
2124
2125 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2126 if test "${with_xxslurpdoptions+set}" = set; then
2127   withval="$with_xxslurpdoptions"
2128   :
2129 fi
2130
2131 # OpenLDAP --enable-slurpd
2132         # Check whether --enable-slurpd or --disable-slurpd was given.
2133 if test "${enable_slurpd+set}" = set; then
2134   enableval="$enable_slurpd"
2135   
2136         ol_arg=invalid
2137         for ol_val in auto yes no ; do
2138                 if test "$enableval" = "$ol_val" ; then
2139                         ol_arg="$ol_val"
2140                 fi
2141         done
2142         if test "$ol_arg" = "invalid" ; then
2143                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2144         fi
2145         ol_enable_slurpd="$ol_arg"
2146
2147 else
2148         ol_enable_slurpd="auto"
2149 fi
2150 # end --enable-slurpd
2151
2152 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2153 if test "${with_xxliboptions+set}" = set; then
2154   withval="$with_xxliboptions"
2155   :
2156 fi
2157
2158 # Check whether --enable-static or --disable-static was given.
2159 if test "${enable_static+set}" = set; then
2160   enableval="$enable_static"
2161   p=${PACKAGE-default}
2162 case "$enableval" in
2163 yes) enable_static=yes ;;
2164 no) enable_static=no ;;
2165 *)
2166   enable_static=no
2167   # Look at the argument we got.  We use all the common list separators.
2168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2169   for pkg in $enableval; do
2170     if test "X$pkg" = "X$p"; then
2171       enable_static=yes
2172     fi
2173   done
2174   IFS="$ac_save_ifs"
2175   ;;
2176 esac
2177 else
2178   enable_static=yes
2179 fi
2180
2181 # Check whether --enable-shared or --disable-shared was given.
2182 if test "${enable_shared+set}" = set; then
2183   enableval="$enable_shared"
2184   p=${PACKAGE-default}
2185 case "$enableval" in
2186 yes) enable_shared=yes ;;
2187 no) enable_shared=no ;;
2188 *)
2189   enable_shared=no
2190   # Look at the argument we got.  We use all the common list separators.
2191   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2192   for pkg in $enableval; do
2193     if test "X$pkg" = "X$p"; then
2194       enable_shared=yes
2195     fi
2196   done
2197   IFS="$ac_save_ifs"
2198   ;;
2199 esac
2200 else
2201   enable_shared=yes
2202 fi
2203
2204
2205
2206 # validate options
2207 if test $ol_enable_dns = yes ; then
2208         if test $ol_enable_referrals = no ; then
2209                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2210         fi
2211         if test $ol_enable_referrals = auto ; then
2212                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2213                 ol_enable_referrals=yes
2214         fi
2215 fi
2216
2217 if test $ol_enable_slapd = no ; then
2218                 if test $ol_enable_bdb2 = yes ; then
2219                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2220         fi
2221         if test $ol_enable_ldap = yes ; then
2222                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2223         fi
2224         if test $ol_enable_ldbm = yes ; then
2225                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2226         fi
2227         if test $ol_enable_passwd = yes ; then
2228                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2229         fi
2230         if test $ol_enable_perl = yes ; then
2231                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2232         fi
2233         if test $ol_enable_shell = yes ; then
2234                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2235         fi
2236         if test $ol_enable_tcl = yes ; then
2237                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2238         fi
2239         if test $ol_enable_modules = yes ; then
2240                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2241         fi
2242         if test $ol_enable_multimaster = yes ; then
2243                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2244         fi
2245         if test $ol_enable_wrappers = yes ; then
2246                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2247         fi
2248         if test $ol_enable_phonetic = yes ; then
2249                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2250         fi
2251         if test $ol_enable_quipu = yes ; then
2252                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2253         fi
2254         if test $ol_enable_rlookups = yes ; then
2255                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2256         fi
2257         if test $ol_enable_aci = yes ; then
2258                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2259         fi
2260         if test $ol_enable_discreteaci = yes ; then
2261                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2262         fi
2263         if test $ol_with_ldbm_api != auto ; then
2264                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2265         fi
2266         if test $ol_with_ldbm_type != auto ; then
2267                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2268         fi
2269         if test $ol_with_bdb2_module != static ; then
2270                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2271         fi
2272         if test $ol_with_ldap_module != static ; then
2273                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2274         fi
2275         if test $ol_with_ldbm_module != static ; then
2276                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2277         fi
2278         if test $ol_with_passwd_module != static ; then
2279                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2280         fi
2281         if test $ol_with_perl_module != static ; then
2282                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2283         fi
2284         if test $ol_with_shell_module != static ; then
2285                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2286         fi
2287         if test $ol_with_tcl_module != static ; then
2288                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2289         fi
2290         if test $ol_enable_slurpd = yes ; then
2291                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2292         fi
2293
2294         # force settings to no
2295         ol_enable_bdb2=no
2296         ol_enable_ldap=no
2297         ol_enable_ldbm=no
2298         ol_enable_passwd=no
2299         ol_enable_perl=no
2300         ol_enable_shell=no
2301         ol_enable_tcl=no
2302
2303         ol_enable_modules=no
2304         ol_enable_multimaster=no
2305         ol_enable_phonetic=no
2306         ol_enable_quipu=no
2307         ol_enable_rlookups=no
2308         ol_enable_aci=no
2309         ol_enable_discreteaci=no
2310         ol_enable_wrappers=no
2311         ol_enable_dynamic=no
2312
2313         ol_with_ldbm_api=no
2314         ol_with_ldbm_type=no
2315
2316         ol_with_bdb2_module=static
2317         ol_with_ldap_module=static
2318         ol_with_ldbm_module=static
2319         ol_with_passwd_module=static
2320         ol_with_perl_module=static
2321         ol_with_shell_module=static
2322         ol_with_tcl_module=static
2323
2324         ol_enable_slurpd=no
2325
2326 elif test $ol_enable_ldbm = no ; then
2327         
2328         if test $ol_with_ldbm_api != auto ; then
2329                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2330         fi
2331
2332         if test $ol_with_ldbm_type != auto ; then
2333                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2334         fi
2335
2336         if test $ol_with_ldbm_module != static ; then
2337                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2338         fi
2339
2340         if test $ol_enable_bdb2 = yes ; then
2341                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2342         fi
2343
2344         if test $ol_enable_modules != yes -a \
2345                 $ol_enable_ldap = no -a \
2346                 $ol_enable_passwd = no -a \
2347                 $ol_enable_perl = no -a \
2348                 $ol_enable_shell = no -a \
2349                 $ol_enable_tcl = no ; then
2350                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2351         fi
2352
2353         ol_with_ldbm_api=no
2354         ol_with_ldbm_type=no
2355         ol_with_ldbm_module=static
2356
2357 elif test $ol_enable_bdb2 = yes ; then
2358         
2359         if test $ol_with_ldbm_api != auto -a \
2360                 $ol_with_ldbm_api != db2 ; then
2361                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2362         fi
2363
2364         ol_with_ldbm_api=db2
2365
2366 else
2367         
2368         if test $ol_enable_bdb2 != no ; then
2369                 if test $ol_with_ldbm_api != auto -a \
2370                         $ol_with_ldbm_api != db2 ; then
2371                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2372                         ol_enable_bdb2=no
2373                 fi
2374         fi
2375
2376         if test $ol_with_ldbm_api = gdbm -a \
2377                 $ol_with_ldbm_type = btree ; then
2378                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2379         fi
2380         if test $ol_with_ldbm_api = mdbm -a \
2381                 $ol_with_ldbm_type = btree ; then
2382                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2383         fi
2384         if test $ol_with_ldbm_api = ndbm -a \
2385                 $ol_with_ldbm_type = btree ; then
2386                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2387         fi
2388 fi
2389
2390 if test $ol_enable_slurpd = yes ; then
2391                 if test $ol_with_threads = no ; then
2392                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2393         fi
2394 fi
2395
2396 echo "$ac_t""done" 1>&6
2397
2398 LDAP_LIBS=
2399 LDIF_LIBS=
2400 LDBM_LIBS=
2401 LTHREAD_LIBS=
2402 LUTIL_LIBS=
2403
2404 LDAPD_LIBS=
2405 SLAPD_LIBS=
2406 SLURPD_LIBS=
2407
2408 BUILD_LDAPD=no
2409 BUILD_SLAPD=no
2410 BUILD_SLURPD=no
2411
2412 BUILD_BDB2=no
2413 BUILD_LDAP=no
2414 BUILD_LDBM=no
2415 BUILD_PASSWD=no
2416 BUILD_PERL=no
2417 BUILD_QUIPU=no
2418 BUILD_SHELL=no
2419 BUILD_TCL=no
2420 BUILD_THREAD=no
2421
2422 BUILD_BDB2_DYNAMIC=static
2423 BUILD_LDAP_DYNAMIC=static
2424 BUILD_LDBM_DYNAMIC=static
2425 BUILD_PASSWD_DYNAMIC=static
2426 BUILD_PERL_DYNAMIC=static
2427 BUILD_SHELL_DYNAMIC=static
2428 BUILD_TCL_DYNAMIC=static
2429
2430 SLAPD_MODULES_LDFLAGS=
2431 SLAPD_MODULES_CPPFLAGS=
2432 SLAPD_MODULES_LIST=
2433
2434 SLAPD_PERL_LDFLAGS=
2435 MOD_PERL_LDFLAGS=
2436 PERL_CPPFLAGS=
2437
2438 MOD_TCL_LIB=
2439 KRB_LIBS=
2440 READLINE_LIBS=
2441 SASL_LIBS=
2442 TERMCAP_LIBS=
2443 TLS_LIBS=
2444 MODULES_LIBS=
2445
2446
2447
2448 cat >> confdefs.h <<\EOF
2449 #define HAVE_MKVERSION 1
2450 EOF
2451
2452
2453
2454
2455 ol_aix_threads=no
2456 case "$target" in
2457 *-*-aix*)       if test -z "$CC" ; then
2458                 case "$ol_with_threads" in
2459                 auto | yes |  posix) ol_aix_threads=yes ;;
2460                 esac
2461         fi
2462 ;;
2463 esac
2464
2465 if test $ol_aix_threads = yes ; then
2466         if test -z "${CC}" ; then
2467                 for ac_prog in cc_r xlc_r cc
2468 do
2469 # Extract the first word of "$ac_prog", so it can be a program name with args.
2470 set dummy $ac_prog; ac_word=$2
2471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2472 echo "configure:2451: checking for $ac_word" >&5
2473 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2474   echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476   if test -n "$CC"; then
2477   ac_cv_prog_CC="$CC" # Let the user override the test.
2478 else
2479   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2480   ac_dummy="$PATH"
2481   for ac_dir in $ac_dummy; do
2482     test -z "$ac_dir" && ac_dir=.
2483     if test -f $ac_dir/$ac_word; then
2484       ac_cv_prog_CC="$ac_prog"
2485       break
2486     fi
2487   done
2488   IFS="$ac_save_ifs"
2489 fi
2490 fi
2491 CC="$ac_cv_prog_CC"
2492 if test -n "$CC"; then
2493   echo "$ac_t""$CC" 1>&6
2494 else
2495   echo "$ac_t""no" 1>&6
2496 fi
2497
2498 test -n "$CC" && break
2499 done
2500
2501
2502                 if test "$CC" = cc ; then
2503                                                 if test $ol_with_threads != auto ; then
2504                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2505                         else
2506                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2507                         fi
2508                         ol_with_threads=no
2509                 fi
2510         fi
2511
2512         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2513                 ol_with_threads=posix
2514                 ol_cv_pthread_create=yes
2515         fi
2516 fi
2517
2518 if test -z "${CC}"; then
2519         for ac_prog in cc
2520 do
2521 # Extract the first word of "$ac_prog", so it can be a program name with args.
2522 set dummy $ac_prog; ac_word=$2
2523 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2524 echo "configure:2503: checking for $ac_word" >&5
2525 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2526   echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528   if test -n "$CC"; then
2529   ac_cv_prog_CC="$CC" # Let the user override the test.
2530 else
2531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2532   ac_dummy="$PATH"
2533   for ac_dir in $ac_dummy; do
2534     test -z "$ac_dir" && ac_dir=.
2535     if test -f $ac_dir/$ac_word; then
2536       ac_cv_prog_CC="$ac_prog"
2537       break
2538     fi
2539   done
2540   IFS="$ac_save_ifs"
2541 fi
2542 fi
2543 CC="$ac_cv_prog_CC"
2544 if test -n "$CC"; then
2545   echo "$ac_t""$CC" 1>&6
2546 else
2547   echo "$ac_t""no" 1>&6
2548 fi
2549
2550 test -n "$CC" && break
2551 done
2552
2553 fi
2554
2555
2556
2557
2558 # Check whether --enable-fast-install or --disable-fast-install was given.
2559 if test "${enable_fast_install+set}" = set; then
2560   enableval="$enable_fast_install"
2561   p=${PACKAGE-default}
2562 case "$enableval" in
2563 yes) enable_fast_install=yes ;;
2564 no) enable_fast_install=no ;;
2565 *)
2566   enable_fast_install=no
2567   # Look at the argument we got.  We use all the common list separators.
2568   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2569   for pkg in $enableval; do
2570     if test "X$pkg" = "X$p"; then
2571       enable_fast_install=yes
2572     fi
2573   done
2574   IFS="$ac_save_ifs"
2575   ;;
2576 esac
2577 else
2578   enable_fast_install=yes
2579 fi
2580
2581 # Extract the first word of "ranlib", so it can be a program name with args.
2582 set dummy ranlib; ac_word=$2
2583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2584 echo "configure:2563: checking for $ac_word" >&5
2585 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2586   echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588   if test -n "$RANLIB"; then
2589   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2590 else
2591   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2592   ac_dummy="$PATH"
2593   for ac_dir in $ac_dummy; do
2594     test -z "$ac_dir" && ac_dir=.
2595     if test -f $ac_dir/$ac_word; then
2596       ac_cv_prog_RANLIB="ranlib"
2597       break
2598     fi
2599   done
2600   IFS="$ac_save_ifs"
2601   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2602 fi
2603 fi
2604 RANLIB="$ac_cv_prog_RANLIB"
2605 if test -n "$RANLIB"; then
2606   echo "$ac_t""$RANLIB" 1>&6
2607 else
2608   echo "$ac_t""no" 1>&6
2609 fi
2610
2611 # Extract the first word of "gcc", so it can be a program name with args.
2612 set dummy gcc; ac_word=$2
2613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2614 echo "configure:2593: checking for $ac_word" >&5
2615 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2616   echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618   if test -n "$CC"; then
2619   ac_cv_prog_CC="$CC" # Let the user override the test.
2620 else
2621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2622   ac_dummy="$PATH"
2623   for ac_dir in $ac_dummy; do
2624     test -z "$ac_dir" && ac_dir=.
2625     if test -f $ac_dir/$ac_word; then
2626       ac_cv_prog_CC="gcc"
2627       break
2628     fi
2629   done
2630   IFS="$ac_save_ifs"
2631 fi
2632 fi
2633 CC="$ac_cv_prog_CC"
2634 if test -n "$CC"; then
2635   echo "$ac_t""$CC" 1>&6
2636 else
2637   echo "$ac_t""no" 1>&6
2638 fi
2639
2640 if test -z "$CC"; then
2641   # Extract the first word of "cc", so it can be a program name with args.
2642 set dummy cc; ac_word=$2
2643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2644 echo "configure:2623: checking for $ac_word" >&5
2645 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   if test -n "$CC"; then
2649   ac_cv_prog_CC="$CC" # Let the user override the test.
2650 else
2651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2652   ac_prog_rejected=no
2653   ac_dummy="$PATH"
2654   for ac_dir in $ac_dummy; do
2655     test -z "$ac_dir" && ac_dir=.
2656     if test -f $ac_dir/$ac_word; then
2657       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2658         ac_prog_rejected=yes
2659         continue
2660       fi
2661       ac_cv_prog_CC="cc"
2662       break
2663     fi
2664   done
2665   IFS="$ac_save_ifs"
2666 if test $ac_prog_rejected = yes; then
2667   # We found a bogon in the path, so make sure we never use it.
2668   set dummy $ac_cv_prog_CC
2669   shift
2670   if test $# -gt 0; then
2671     # We chose a different compiler from the bogus one.
2672     # However, it has the same basename, so the bogon will be chosen
2673     # first if we set CC to just the basename; use the full file name.
2674     shift
2675     set dummy "$ac_dir/$ac_word" "$@"
2676     shift
2677     ac_cv_prog_CC="$@"
2678   fi
2679 fi
2680 fi
2681 fi
2682 CC="$ac_cv_prog_CC"
2683 if test -n "$CC"; then
2684   echo "$ac_t""$CC" 1>&6
2685 else
2686   echo "$ac_t""no" 1>&6
2687 fi
2688
2689   if test -z "$CC"; then
2690     case "`uname -s`" in
2691     *win32* | *WIN32* | *CYGWIN*)
2692       # Extract the first word of "cl", so it can be a program name with args.
2693 set dummy cl; ac_word=$2
2694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2695 echo "configure:2674: checking for $ac_word" >&5
2696 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2697   echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699   if test -n "$CC"; then
2700   ac_cv_prog_CC="$CC" # Let the user override the test.
2701 else
2702   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2703   ac_dummy="$PATH"
2704   for ac_dir in $ac_dummy; do
2705     test -z "$ac_dir" && ac_dir=.
2706     if test -f $ac_dir/$ac_word; then
2707       ac_cv_prog_CC="cl"
2708       break
2709     fi
2710   done
2711   IFS="$ac_save_ifs"
2712 fi
2713 fi
2714 CC="$ac_cv_prog_CC"
2715 if test -n "$CC"; then
2716   echo "$ac_t""$CC" 1>&6
2717 else
2718   echo "$ac_t""no" 1>&6
2719 fi
2720  ;;
2721     esac
2722   fi
2723   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2724 fi
2725
2726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2727 echo "configure:2706: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2728
2729 ac_ext=c
2730 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2731 ac_cpp='$CPP $CPPFLAGS'
2732 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2733 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2734 cross_compiling=$ac_cv_prog_cc_cross
2735
2736 cat > conftest.$ac_ext << EOF
2737
2738 #line 2717 "configure"
2739 #include "confdefs.h"
2740
2741 main(){return(0);}
2742 EOF
2743 if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2744   ac_cv_prog_cc_works=yes
2745   # If we can't run a trivial program, we are probably using a cross compiler.
2746   if (./conftest; exit) 2>/dev/null; then
2747     ac_cv_prog_cc_cross=no
2748   else
2749     ac_cv_prog_cc_cross=yes
2750   fi
2751 else
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   ac_cv_prog_cc_works=no
2755 fi
2756 rm -fr conftest*
2757 ac_ext=c
2758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2759 ac_cpp='$CPP $CPPFLAGS'
2760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2762 cross_compiling=$ac_cv_prog_cc_cross
2763
2764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2765 if test $ac_cv_prog_cc_works = no; then
2766   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2767 fi
2768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2769 echo "configure:2748: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2771 cross_compiling=$ac_cv_prog_cc_cross
2772
2773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2774 echo "configure:2753: checking whether we are using GNU C" >&5
2775 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2776   echo $ac_n "(cached) $ac_c" 1>&6
2777 else
2778   cat > conftest.c <<EOF
2779 #ifdef __GNUC__
2780   yes;
2781 #endif
2782 EOF
2783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2784   ac_cv_prog_gcc=yes
2785 else
2786   ac_cv_prog_gcc=no
2787 fi
2788 fi
2789
2790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2791
2792 if test $ac_cv_prog_gcc = yes; then
2793   GCC=yes
2794 else
2795   GCC=
2796 fi
2797
2798 ac_test_CFLAGS="${CFLAGS+set}"
2799 ac_save_CFLAGS="$CFLAGS"
2800 CFLAGS=
2801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2802 echo "configure:2781: checking whether ${CC-cc} accepts -g" >&5
2803 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2804   echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806   echo 'void f(){}' > conftest.c
2807 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2808   ac_cv_prog_cc_g=yes
2809 else
2810   ac_cv_prog_cc_g=no
2811 fi
2812 rm -f conftest*
2813
2814 fi
2815
2816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2817 if test "$ac_test_CFLAGS" = set; then
2818   CFLAGS="$ac_save_CFLAGS"
2819 elif test $ac_cv_prog_cc_g = yes; then
2820   if test "$GCC" = yes; then
2821     CFLAGS="-g -O2"
2822   else
2823     CFLAGS="-g"
2824   fi
2825 else
2826   if test "$GCC" = yes; then
2827     CFLAGS="-O2"
2828   else
2829     CFLAGS=
2830   fi
2831 fi
2832
2833 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2834 if test "${with_gnu_ld+set}" = set; then
2835   withval="$with_gnu_ld"
2836   test "$withval" = no || with_gnu_ld=yes
2837 else
2838   with_gnu_ld=no
2839 fi
2840
2841 ac_prog=ld
2842 if test "$ac_cv_prog_gcc" = yes; then
2843   # Check if gcc -print-prog-name=ld gives a path.
2844   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2845 echo "configure:2824: checking for ld used by GCC" >&5
2846   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2847   case "$ac_prog" in
2848     # Accept absolute paths.
2849     [\\/]* | [A-Za-z]:[\\/]*)
2850       re_direlt='/[^/][^/]*/\.\./'
2851       # Canonicalize the path of ld
2852       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2853       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2854         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2855       done
2856       test -z "$LD" && LD="$ac_prog"
2857       ;;
2858   "")
2859     # If it fails, then pretend we aren't using GCC.
2860     ac_prog=ld
2861     ;;
2862   *)
2863     # If it is relative, then search for the first ld in PATH.
2864     with_gnu_ld=unknown
2865     ;;
2866   esac
2867 elif test "$with_gnu_ld" = yes; then
2868   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2869 echo "configure:2848: checking for GNU ld" >&5
2870 else
2871   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2872 echo "configure:2851: checking for non-GNU ld" >&5
2873 fi
2874 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2875   echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877   if test -z "$LD"; then
2878   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2879   for ac_dir in $PATH; do
2880     test -z "$ac_dir" && ac_dir=.
2881     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2882       ac_cv_path_LD="$ac_dir/$ac_prog"
2883       # Check to see if the program is GNU ld.  I'd rather use --version,
2884       # but apparently some GNU ld's only accept -v.
2885       # Break only if it was the GNU/non-GNU ld that we prefer.
2886       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2887         test "$with_gnu_ld" != no && break
2888       else
2889         test "$with_gnu_ld" != yes && break
2890       fi
2891     fi
2892   done
2893   IFS="$ac_save_ifs"
2894 else
2895   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2896 fi
2897 fi
2898
2899 LD="$ac_cv_path_LD"
2900 if test -n "$LD"; then
2901   echo "$ac_t""$LD" 1>&6
2902 else
2903   echo "$ac_t""no" 1>&6
2904 fi
2905 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2906
2907 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2908 echo "configure:2887: checking if the linker ($LD) is GNU ld" >&5
2909 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2910   echo $ac_n "(cached) $ac_c" 1>&6
2911 else
2912   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2913 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2914   ac_cv_prog_gnu_ld=yes
2915 else
2916   ac_cv_prog_gnu_ld=no
2917 fi
2918 fi
2919
2920 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2921
2922
2923 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2924 echo "configure:2903: checking for BSD-compatible nm" >&5
2925 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2926   echo $ac_n "(cached) $ac_c" 1>&6
2927 else
2928   if test -n "$NM"; then
2929   # Let the user override the test.
2930   ac_cv_path_NM="$NM"
2931 else
2932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2933   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2934     test -z "$ac_dir" && ac_dir=.
2935     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2936       # Check to see if the nm accepts a BSD-compat flag.
2937       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2938       #   nm: unknown option "B" ignored
2939       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2940         ac_cv_path_NM="$ac_dir/nm -B"
2941         break
2942       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2943         ac_cv_path_NM="$ac_dir/nm -p"
2944         break
2945       else
2946         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2947         continue # so that we can try to find one that supports BSD flags
2948       fi
2949     fi
2950   done
2951   IFS="$ac_save_ifs"
2952   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2953 fi
2954 fi
2955
2956 NM="$ac_cv_path_NM"
2957 echo "$ac_t""$NM" 1>&6
2958
2959
2960 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2961 echo "configure:2940: checking whether ln -s works" >&5
2962 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2963   echo $ac_n "(cached) $ac_c" 1>&6
2964 else
2965   rm -f conftestdata
2966 if ln -s X conftestdata 2>/dev/null
2967 then
2968   rm -f conftestdata
2969   ac_cv_prog_LN_S="ln -s"
2970 else
2971   ac_cv_prog_LN_S=ln
2972 fi
2973 fi
2974 LN_S="$ac_cv_prog_LN_S"
2975 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2976   echo "$ac_t""yes" 1>&6
2977 else
2978   echo "$ac_t""no" 1>&6
2979 fi
2980
2981 if test $host != $build; then
2982   ac_tool_prefix=${host_alias}-
2983 else
2984   ac_tool_prefix=
2985 fi
2986
2987
2988 # Check for any special flags to pass to ltconfig.
2989 libtool_flags="--cache-file=$cache_file"
2990 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2991 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2992 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2993 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2994 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2995 libtool_flags="$libtool_flags --enable-dlopen"
2996 libtool_flags="$libtool_flags --enable-win32-dll"
2997 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2998 if test "${enable_libtool_lock+set}" = set; then
2999   enableval="$enable_libtool_lock"
3000   :
3001 fi
3002
3003 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3004 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3005
3006 # Some flags need to be propagated to the compiler or linker for good
3007 # libtool support.
3008 case "$host" in
3009 *-*-irix6*)
3010   # Find out which ABI we are using.
3011   echo '#line 2990 "configure"' > conftest.$ac_ext
3012   if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3013     case "`/usr/bin/file conftest.o`" in
3014     *32-bit*)
3015       LD="${LD-ld} -32"
3016       ;;
3017     *N32*)
3018       LD="${LD-ld} -n32"
3019       ;;
3020     *64-bit*)
3021       LD="${LD-ld} -64"
3022       ;;
3023     esac
3024   fi
3025   rm -rf conftest*
3026   ;;
3027
3028 *-*-sco3.2v5*)
3029   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3030   SAVE_CFLAGS="$CFLAGS"
3031   CFLAGS="$CFLAGS -belf"
3032   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3033 echo "configure:3012: checking whether the C compiler needs -belf" >&5
3034 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3035   echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037   cat > conftest.$ac_ext <<EOF
3038 #line 3017 "configure"
3039 #include "confdefs.h"
3040
3041 int main() {
3042
3043 ; return 0; }
3044 EOF
3045 if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3046   rm -rf conftest*
3047   lt_cv_cc_needs_belf=yes
3048 else
3049   echo "configure: failed program was:" >&5
3050   cat conftest.$ac_ext >&5
3051   rm -rf conftest*
3052   lt_cv_cc_needs_belf=no
3053 fi
3054 rm -f conftest*
3055 fi
3056
3057 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3058   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3059     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3060     CFLAGS="$SAVE_CFLAGS"
3061   fi
3062   ;;
3063
3064 *-*-cygwin* | *-*-mingw*)
3065   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3066 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3068 echo "configure:3047: checking for $ac_word" >&5
3069 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   if test -n "$DLLTOOL"; then
3073   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3074 else
3075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3076   ac_dummy="$PATH"
3077   for ac_dir in $ac_dummy; do
3078     test -z "$ac_dir" && ac_dir=.
3079     if test -f $ac_dir/$ac_word; then
3080       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3081       break
3082     fi
3083   done
3084   IFS="$ac_save_ifs"
3085 fi
3086 fi
3087 DLLTOOL="$ac_cv_prog_DLLTOOL"
3088 if test -n "$DLLTOOL"; then
3089   echo "$ac_t""$DLLTOOL" 1>&6
3090 else
3091   echo "$ac_t""no" 1>&6
3092 fi
3093
3094
3095 if test -z "$ac_cv_prog_DLLTOOL"; then
3096 if test -n "$ac_tool_prefix"; then
3097   # Extract the first word of "dlltool", so it can be a program name with args.
3098 set dummy dlltool; ac_word=$2
3099 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3100 echo "configure:3079: checking for $ac_word" >&5
3101 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   if test -n "$DLLTOOL"; then
3105   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3106 else
3107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3108   ac_dummy="$PATH"
3109   for ac_dir in $ac_dummy; do
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/$ac_word; then
3112       ac_cv_prog_DLLTOOL="dlltool"
3113       break
3114     fi
3115   done
3116   IFS="$ac_save_ifs"
3117   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3118 fi
3119 fi
3120 DLLTOOL="$ac_cv_prog_DLLTOOL"
3121 if test -n "$DLLTOOL"; then
3122   echo "$ac_t""$DLLTOOL" 1>&6
3123 else
3124   echo "$ac_t""no" 1>&6
3125 fi
3126
3127 else
3128   DLLTOOL="false"
3129 fi
3130 fi
3131
3132   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3133 set dummy ${ac_tool_prefix}as; ac_word=$2
3134 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3135 echo "configure:3114: checking for $ac_word" >&5
3136 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3137   echo $ac_n "(cached) $ac_c" 1>&6
3138 else
3139   if test -n "$AS"; then
3140   ac_cv_prog_AS="$AS" # Let the user override the test.
3141 else
3142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3143   ac_dummy="$PATH"
3144   for ac_dir in $ac_dummy; do
3145     test -z "$ac_dir" && ac_dir=.
3146     if test -f $ac_dir/$ac_word; then
3147       ac_cv_prog_AS="${ac_tool_prefix}as"
3148       break
3149     fi
3150   done
3151   IFS="$ac_save_ifs"
3152 fi
3153 fi
3154 AS="$ac_cv_prog_AS"
3155 if test -n "$AS"; then
3156   echo "$ac_t""$AS" 1>&6
3157 else
3158   echo "$ac_t""no" 1>&6
3159 fi
3160
3161
3162 if test -z "$ac_cv_prog_AS"; then
3163 if test -n "$ac_tool_prefix"; then
3164   # Extract the first word of "as", so it can be a program name with args.
3165 set dummy as; ac_word=$2
3166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3167 echo "configure:3146: checking for $ac_word" >&5
3168 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3169   echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171   if test -n "$AS"; then
3172   ac_cv_prog_AS="$AS" # Let the user override the test.
3173 else
3174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3175   ac_dummy="$PATH"
3176   for ac_dir in $ac_dummy; do
3177     test -z "$ac_dir" && ac_dir=.
3178     if test -f $ac_dir/$ac_word; then
3179       ac_cv_prog_AS="as"
3180       break
3181     fi
3182   done
3183   IFS="$ac_save_ifs"
3184   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3185 fi
3186 fi
3187 AS="$ac_cv_prog_AS"
3188 if test -n "$AS"; then
3189   echo "$ac_t""$AS" 1>&6
3190 else
3191   echo "$ac_t""no" 1>&6
3192 fi
3193
3194 else
3195   AS="false"
3196 fi
3197 fi
3198
3199   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3200 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3202 echo "configure:3181: checking for $ac_word" >&5
3203 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3204   echo $ac_n "(cached) $ac_c" 1>&6
3205 else
3206   if test -n "$OBJDUMP"; then
3207   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3208 else
3209   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3210   ac_dummy="$PATH"
3211   for ac_dir in $ac_dummy; do
3212     test -z "$ac_dir" && ac_dir=.
3213     if test -f $ac_dir/$ac_word; then
3214       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3215       break
3216     fi
3217   done
3218   IFS="$ac_save_ifs"
3219 fi
3220 fi
3221 OBJDUMP="$ac_cv_prog_OBJDUMP"
3222 if test -n "$OBJDUMP"; then
3223   echo "$ac_t""$OBJDUMP" 1>&6
3224 else
3225   echo "$ac_t""no" 1>&6
3226 fi
3227
3228
3229 if test -z "$ac_cv_prog_OBJDUMP"; then
3230 if test -n "$ac_tool_prefix"; then
3231   # Extract the first word of "objdump", so it can be a program name with args.
3232 set dummy objdump; ac_word=$2
3233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3234 echo "configure:3213: checking for $ac_word" >&5
3235 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   if test -n "$OBJDUMP"; then
3239   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3240 else
3241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3242   ac_dummy="$PATH"
3243   for ac_dir in $ac_dummy; do
3244     test -z "$ac_dir" && ac_dir=.
3245     if test -f $ac_dir/$ac_word; then
3246       ac_cv_prog_OBJDUMP="objdump"
3247       break
3248     fi
3249   done
3250   IFS="$ac_save_ifs"
3251   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3252 fi
3253 fi
3254 OBJDUMP="$ac_cv_prog_OBJDUMP"
3255 if test -n "$OBJDUMP"; then
3256   echo "$ac_t""$OBJDUMP" 1>&6
3257 else
3258   echo "$ac_t""no" 1>&6
3259 fi
3260
3261 else
3262   OBJDUMP="false"
3263 fi
3264 fi
3265
3266   ;;
3267
3268 esac
3269
3270
3271 # Save cache, so that ltconfig can load it
3272
3273
3274 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3275 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3276 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3277 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3278 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3279 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3280 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3281 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3282
3283 # Reload cache, that may have been modified by ltconfig
3284
3285
3286 # This can be used to rebuild libtool when needed
3287 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3288
3289 # Always use our own libtool.
3290 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3291
3292 # Redirect the config.log output again, so that the ltconfig log is not
3293 # clobbered by the next message.
3294 exec 5>>./config.log
3295
3296
3297 for ac_prog in mawk gawk nawk awk
3298 do
3299 # Extract the first word of "$ac_prog", so it can be a program name with args.
3300 set dummy $ac_prog; ac_word=$2
3301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3302 echo "configure:3281: checking for $ac_word" >&5
3303 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3304   echo $ac_n "(cached) $ac_c" 1>&6
3305 else
3306   if test -n "$AWK"; then
3307   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3308 else
3309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3310   ac_dummy="$PATH"
3311   for ac_dir in $ac_dummy; do
3312     test -z "$ac_dir" && ac_dir=.
3313     if test -f $ac_dir/$ac_word; then
3314       ac_cv_prog_AWK="$ac_prog"
3315       break
3316     fi
3317   done
3318   IFS="$ac_save_ifs"
3319 fi
3320 fi
3321 AWK="$ac_cv_prog_AWK"
3322 if test -n "$AWK"; then
3323   echo "$ac_t""$AWK" 1>&6
3324 else
3325   echo "$ac_t""no" 1>&6
3326 fi
3327
3328 test -n "$AWK" && break
3329 done
3330
3331 # test for ln hardlink support
3332 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3333 echo "configure:3312: checking whether ln works" >&5
3334 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   rm -f conftest.src conftest.dst
3338 echo "conftest" > conftest.src
3339 if ln conftest.src conftest.dst 2>/dev/null
3340 then
3341   ol_cv_prog_LN_H="ln"
3342 else
3343   ol_cv_prog_LN_H="cp"
3344 fi
3345 rm -f conftest.src conftest.dst
3346
3347 fi
3348 LN_H="$ol_cv_prog_LN_H"
3349 if test "$ol_cv_prog_LN_H" = "ln"; then
3350         echo "$ac_t""yes" 1>&6
3351 else
3352         echo "$ac_t""no" 1>&6
3353 fi
3354
3355 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3356 echo "configure:3335: checking whether ln -s works" >&5
3357 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3358   echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360   rm -f conftestdata
3361 if ln -s X conftestdata 2>/dev/null
3362 then
3363   rm -f conftestdata
3364   ac_cv_prog_LN_S="ln -s"
3365 else
3366   ac_cv_prog_LN_S=ln
3367 fi
3368 fi
3369 LN_S="$ac_cv_prog_LN_S"
3370 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3371   echo "$ac_t""yes" 1>&6
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375
3376
3377 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3378         LN_S="$LN_H"
3379 fi
3380
3381 # Extract the first word of "sendmail", so it can be a program name with args.
3382 set dummy sendmail; ac_word=$2
3383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3384 echo "configure:3363: checking for $ac_word" >&5
3385 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   case "$SENDMAIL" in
3389   /*)
3390   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3391   ;;
3392   ?:/*)
3393   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3394   ;;
3395   *)
3396   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3397   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3398   for ac_dir in $ac_dummy; do 
3399     test -z "$ac_dir" && ac_dir=.
3400     if test -f $ac_dir/$ac_word; then
3401       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3402       break
3403     fi
3404   done
3405   IFS="$ac_save_ifs"
3406   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3407   ;;
3408 esac
3409 fi
3410 SENDMAIL="$ac_cv_path_SENDMAIL"
3411 if test -n "$SENDMAIL"; then
3412   echo "$ac_t""$SENDMAIL" 1>&6
3413 else
3414   echo "$ac_t""no" 1>&6
3415 fi
3416
3417 # Extract the first word of "vi", so it can be a program name with args.
3418 set dummy vi; ac_word=$2
3419 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3420 echo "configure:3399: checking for $ac_word" >&5
3421 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   case "$EDITOR" in
3425   /*)
3426   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3427   ;;
3428   ?:/*)
3429   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3430   ;;
3431   *)
3432   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3433   ac_dummy="$PATH:/usr/ucb"
3434   for ac_dir in $ac_dummy; do 
3435     test -z "$ac_dir" && ac_dir=.
3436     if test -f $ac_dir/$ac_word; then
3437       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3438       break
3439     fi
3440   done
3441   IFS="$ac_save_ifs"
3442   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3443   ;;
3444 esac
3445 fi
3446 EDITOR="$ac_cv_path_EDITOR"
3447 if test -n "$EDITOR"; then
3448   echo "$ac_t""$EDITOR" 1>&6
3449 else
3450   echo "$ac_t""no" 1>&6
3451 fi
3452
3453 # Extract the first word of "finger", so it can be a program name with args.
3454 set dummy finger; ac_word=$2
3455 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3456 echo "configure:3435: checking for $ac_word" >&5
3457 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   case "$FINGER" in
3461   /*)
3462   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3463   ;;
3464   ?:/*)
3465   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3466   ;;
3467   *)
3468   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3469   ac_dummy="$PATH:/usr/ucb"
3470   for ac_dir in $ac_dummy; do 
3471     test -z "$ac_dir" && ac_dir=.
3472     if test -f $ac_dir/$ac_word; then
3473       ac_cv_path_FINGER="$ac_dir/$ac_word"
3474       break
3475     fi
3476   done
3477   IFS="$ac_save_ifs"
3478   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3479   ;;
3480 esac
3481 fi
3482 FINGER="$ac_cv_path_FINGER"
3483 if test -n "$FINGER"; then
3484   echo "$ac_t""$FINGER" 1>&6
3485 else
3486   echo "$ac_t""no" 1>&6
3487 fi
3488
3489
3490 ol_link_perl=no
3491 if test $ol_enable_perl != no ; then
3492         # Extract the first word of "perl", so it can be a program name with args.
3493 set dummy perl; ac_word=$2
3494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3495 echo "configure:3474: checking for $ac_word" >&5
3496 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   case "$PERLBIN" in
3500   /*)
3501   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3502   ;;
3503   ?:/*)
3504   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3505   ;;
3506   *)
3507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3508   ac_dummy="$PATH"
3509   for ac_dir in $ac_dummy; do 
3510     test -z "$ac_dir" && ac_dir=.
3511     if test -f $ac_dir/$ac_word; then
3512       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3513       break
3514     fi
3515   done
3516   IFS="$ac_save_ifs"
3517   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3518   ;;
3519 esac
3520 fi
3521 PERLBIN="$ac_cv_path_PERLBIN"
3522 if test -n "$PERLBIN"; then
3523   echo "$ac_t""$PERLBIN" 1>&6
3524 else
3525   echo "$ac_t""no" 1>&6
3526 fi
3527
3528
3529         if test "no$PERLBIN" = "no" ; then
3530                 if test $ol_enable_perl = yes ; then
3531                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3532                 fi
3533
3534         else
3535                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3536                 if test x"$ol_with_perl_module" = "xstatic" ; then
3537                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3538                 else
3539                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3540                 fi
3541                                 ol_link_perl=yes
3542         fi
3543 fi
3544
3545 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3546 echo "configure:3525: checking how to run the C preprocessor" >&5
3547 # On Suns, sometimes $CPP names a directory.
3548 if test -n "$CPP" && test -d "$CPP"; then
3549   CPP=
3550 fi
3551 if test -z "$CPP"; then
3552 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555     # This must be in double quotes, not single quotes, because CPP may get
3556   # substituted into the Makefile and "${CC-cc}" will confuse make.
3557   CPP="${CC-cc} -E"
3558   # On the NeXT, cc -E runs the code through the compiler's parser,
3559   # not just through cpp.
3560   cat > conftest.$ac_ext <<EOF
3561 #line 3540 "configure"
3562 #include "confdefs.h"
3563 #include <assert.h>
3564 Syntax Error
3565 EOF
3566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3567 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3569 if test -z "$ac_err"; then
3570   :
3571 else
3572   echo "$ac_err" >&5
3573   echo "configure: failed program was:" >&5
3574   cat conftest.$ac_ext >&5
3575   rm -rf conftest*
3576   CPP="${CC-cc} -E -traditional-cpp"
3577   cat > conftest.$ac_ext <<EOF
3578 #line 3557 "configure"
3579 #include "confdefs.h"
3580 #include <assert.h>
3581 Syntax Error
3582 EOF
3583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3584 { (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3586 if test -z "$ac_err"; then
3587   :
3588 else
3589   echo "$ac_err" >&5
3590   echo "configure: failed program was:" >&5
3591   cat conftest.$ac_ext >&5
3592   rm -rf conftest*
3593   CPP="${CC-cc} -nologo -E"
3594   cat > conftest.$ac_ext <<EOF
3595 #line 3574 "configure"
3596 #include "confdefs.h"
3597 #include <assert.h>
3598 Syntax Error
3599 EOF
3600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3601 { (eval echo configure:3580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3603 if test -z "$ac_err"; then
3604   :
3605 else
3606   echo "$ac_err" >&5
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   CPP=/lib/cpp
3611 fi
3612 rm -f conftest*
3613 fi
3614 rm -f conftest*
3615 fi
3616 rm -f conftest*
3617   ac_cv_prog_CPP="$CPP"
3618 fi
3619   CPP="$ac_cv_prog_CPP"
3620 else
3621   ac_cv_prog_CPP="$CPP"
3622 fi
3623 echo "$ac_t""$CPP" 1>&6
3624
3625
3626 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3627         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3628
3629 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3630         echo "configure: warning: programs compiled here do run here..." 1>&2
3631         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3632
3633 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3634         echo "configure: warning: programs compiled here do not run here..." 1>&2
3635         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3636 fi
3637
3638 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3639 echo "configure:3618: checking for AIX" >&5
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3620 "configure"
3642 #include "confdefs.h"
3643 #ifdef _AIX
3644   yes
3645 #endif
3646
3647 EOF
3648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3649   egrep "yes" >/dev/null 2>&1; then
3650   rm -rf conftest*
3651   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3652 #define _ALL_SOURCE 1
3653 EOF
3654
3655 else
3656   rm -rf conftest*
3657   echo "$ac_t""no" 1>&6
3658 fi
3659 rm -f conftest*
3660
3661
3662 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3663 echo "configure:3642: checking for POSIXized ISC" >&5
3664 if test -d /etc/conf/kconfig.d &&
3665   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3666 then
3667   echo "$ac_t""yes" 1>&6
3668   ISC=yes # If later tests want to check for ISC.
3669   cat >> confdefs.h <<\EOF
3670 #define _POSIX_SOURCE 1
3671 EOF
3672
3673   if test "$GCC" = yes; then
3674     CC="$CC -posix"
3675   else
3676     CC="$CC -Xp"
3677   fi
3678 else
3679   echo "$ac_t""no" 1>&6
3680   ISC=
3681 fi
3682
3683 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3684 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3685 echo "configure:3664: checking for minix/config.h" >&5
3686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   cat > conftest.$ac_ext <<EOF
3690 #line 3669 "configure"
3691 #include "confdefs.h"
3692 #include <minix/config.h>
3693 EOF
3694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3695 { (eval echo configure:3674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3697 if test -z "$ac_err"; then
3698   rm -rf conftest*
3699   eval "ac_cv_header_$ac_safe=yes"
3700 else
3701   echo "$ac_err" >&5
3702   echo "configure: failed program was:" >&5
3703   cat conftest.$ac_ext >&5
3704   rm -rf conftest*
3705   eval "ac_cv_header_$ac_safe=no"
3706 fi
3707 rm -f conftest*
3708 fi
3709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3710   echo "$ac_t""yes" 1>&6
3711   MINIX=yes
3712 else
3713   echo "$ac_t""no" 1>&6
3714 MINIX=
3715 fi
3716
3717 if test "$MINIX" = yes; then
3718   cat >> confdefs.h <<\EOF
3719 #define _POSIX_SOURCE 1
3720 EOF
3721
3722   cat >> confdefs.h <<\EOF
3723 #define _POSIX_1_SOURCE 2
3724 EOF
3725
3726   cat >> confdefs.h <<\EOF
3727 #define _MINIX 1
3728 EOF
3729
3730 fi
3731
3732
3733 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3734 echo "configure:3713: checking for Cygwin environment" >&5
3735 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   cat > conftest.$ac_ext <<EOF
3739 #line 3718 "configure"
3740 #include "confdefs.h"
3741
3742 int main() {
3743
3744 #ifndef __CYGWIN__
3745 #define __CYGWIN__ __CYGWIN32__
3746 #endif
3747 return __CYGWIN__;
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_cygwin=yes
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_cygwin=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_cygwin" 1>&6
3763 CYGWIN=
3764 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3765 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3766 echo "configure:3745: checking for mingw32 environment" >&5
3767 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   cat > conftest.$ac_ext <<EOF
3771 #line 3750 "configure"
3772 #include "confdefs.h"
3773
3774 int main() {
3775 return __MINGW32__;
3776 ; return 0; }
3777 EOF
3778 if { (eval echo configure:3757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3779   rm -rf conftest*
3780   ac_cv_mingw32=yes
3781 else
3782   echo "configure: failed program was:" >&5
3783   cat conftest.$ac_ext >&5
3784   rm -rf conftest*
3785   ac_cv_mingw32=no
3786 fi
3787 rm -f conftest*
3788 fi
3789
3790 echo "$ac_t""$ac_cv_mingw32" 1>&6
3791 MINGW32=
3792 test "$ac_cv_mingw32" = yes && MINGW32=yes
3793 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3794 echo "configure:3773: checking for EMX OS/2 environment" >&5
3795 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   cat > conftest.$ac_ext <<EOF
3799 #line 3778 "configure"
3800 #include "confdefs.h"
3801
3802 int main() {
3803 return __EMX__;
3804 ; return 0; }
3805 EOF
3806 if { (eval echo configure:3785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3807   rm -rf conftest*
3808   ac_cv_emxos2=yes
3809 else
3810   echo "configure: failed program was:" >&5
3811   cat conftest.$ac_ext >&5
3812   rm -rf conftest*
3813   ac_cv_emxos2=no
3814 fi
3815 rm -f conftest*
3816 fi
3817
3818 echo "$ac_t""$ac_cv_emxos2" 1>&6
3819 EMXOS2=
3820 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3821
3822
3823
3824 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3825 echo "configure:3804: checking for executable suffix" >&5
3826 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3827   echo $ac_n "(cached) $ac_c" 1>&6
3828 else
3829   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3830   ac_cv_exeext=.exe
3831 else
3832   rm -f conftest*
3833   echo 'int main () { return 0; }' > conftest.$ac_ext
3834   ac_cv_exeext=
3835   if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3836     for file in conftest.*; do
3837       case $file in
3838       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3839       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3840       esac
3841     done
3842   else
3843     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3844   fi
3845   rm -f conftest*
3846   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3847 fi
3848 fi
3849
3850 EXEEXT=""
3851 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3852 echo "$ac_t""${ac_cv_exeext}" 1>&6
3853 ac_exeext=$EXEEXT
3854
3855 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3856 echo "configure:3835: checking for object suffix" >&5
3857 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   rm -f conftest*
3861 echo 'int i = 1;' > conftest.$ac_ext
3862 if { (eval echo configure:3841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3863   for ac_file in conftest.*; do
3864     case $ac_file in
3865     *.c) ;;
3866     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3867     esac
3868   done
3869 else
3870   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3871 fi
3872 rm -f conftest*
3873 fi
3874
3875 echo "$ac_t""$ac_cv_objext" 1>&6
3876 OBJEXT=$ac_cv_objext
3877 ac_objext=$ac_cv_objext
3878
3879
3880 cat >> confdefs.h <<EOF
3881 #define EXEEXT "${EXEEXT}"
3882 EOF
3883
3884
3885 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3886 echo "configure:3865: checking for be_app in -lbe" >&5
3887 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3889   echo $ac_n "(cached) $ac_c" 1>&6
3890 else
3891   ac_save_LIBS="$LIBS"
3892 LIBS="-lbe -lroot -lnet $LIBS"
3893 cat > conftest.$ac_ext <<EOF
3894 #line 3873 "configure"
3895 #include "confdefs.h"
3896 /* Override any gcc2 internal prototype to avoid an error.  */
3897 /* We use char because int might match the return type of a gcc2
3898     builtin and then its argument prototype would still apply.  */
3899 char be_app();
3900
3901 int main() {
3902 be_app()
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3906   rm -rf conftest*
3907   eval "ac_cv_lib_$ac_lib_var=yes"
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   eval "ac_cv_lib_$ac_lib_var=no"
3913 fi
3914 rm -f conftest*
3915 LIBS="$ac_save_LIBS"
3916
3917 fi
3918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3919   echo "$ac_t""yes" 1>&6
3920   LIBS="$LIBS -lbe -lroot -lnet"
3921 else
3922   echo "$ac_t""no" 1>&6
3923 :
3924 fi
3925
3926
3927
3928
3929
3930 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3931 echo "configure:3910: checking for ${CC-cc} option to accept ANSI C" >&5
3932 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3933   echo $ac_n "(cached) $ac_c" 1>&6
3934 else
3935   am_cv_prog_cc_stdc=no
3936 ac_save_CC="$CC"
3937 # Don't try gcc -ansi; that turns off useful extensions and
3938 # breaks some systems' header files.
3939 # AIX                   -qlanglvl=ansi
3940 # Ultrix and OSF/1      -std1
3941 # HP-UX 10.20 and later -Ae
3942 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3943 # SVR4                  -Xc -D__EXTENSIONS__
3944 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3945 do
3946   CC="$ac_save_CC $ac_arg"
3947   cat > conftest.$ac_ext <<EOF
3948 #line 3927 "configure"
3949 #include "confdefs.h"
3950 #include <stdarg.h>
3951 #include <stdio.h>
3952 #include <sys/types.h>
3953 #include <sys/stat.h>
3954 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3955 struct buf { int x; };
3956 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3957 static char *e (p, i)
3958      char **p;
3959      int i;
3960 {
3961   return p[i];
3962 }
3963 static char *f (char * (*g) (char **, int), char **p, ...)
3964 {
3965   char *s;
3966   va_list v;
3967   va_start (v,p);
3968   s = g (p, va_arg (v,int));
3969   va_end (v);
3970   return s;
3971 }
3972 int test (int i, double x);
3973 struct s1 {int (*f) (int a);};
3974 struct s2 {int (*f) (double a);};
3975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3976 int argc;
3977 char **argv;
3978
3979 int main() {
3980
3981 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3982
3983 ; return 0; }
3984 EOF
3985 if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3986   rm -rf conftest*
3987   am_cv_prog_cc_stdc="$ac_arg"; break
3988 else
3989   echo "configure: failed program was:" >&5
3990   cat conftest.$ac_ext >&5
3991 fi
3992 rm -f conftest*
3993 done
3994 CC="$ac_save_CC"
3995
3996 fi
3997
3998 if test -z "$am_cv_prog_cc_stdc"; then
3999   echo "$ac_t""none needed" 1>&6
4000 else
4001   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4002 fi
4003 case "x$am_cv_prog_cc_stdc" in
4004   x|xno) ;;
4005   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4006 esac
4007
4008 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4009         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4010 fi
4011
4012 # test for make depend flag
4013 OL_MKDEP=
4014 OL_MKDEP_FLAGS=
4015 if test -z "${MKDEP}"; then
4016         OL_MKDEP="${CC-cc}"
4017         if test -z "${MKDEP_FLAGS}"; then
4018                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4019 echo "configure:3998: checking for ${OL_MKDEP} depend flag" >&5
4020 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4021   echo $ac_n "(cached) $ac_c" 1>&6
4022 else
4023   
4024                         ol_cv_mkdep=no
4025                         for flag in "-M" "-xM"; do
4026                                 cat > conftest.c <<EOF
4027  noCode;
4028 EOF
4029                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4030                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4031                                 then
4032                                         if test ! -f conftest."${ac_object}" ; then
4033                                                 ol_cv_mkdep=$flag
4034                                                 OL_MKDEP_FLAGS="$flag"
4035                                                 break
4036                                         fi
4037                                 fi
4038                         done
4039                         rm -f conftest*
4040                 
4041 fi
4042
4043 echo "$ac_t""$ol_cv_mkdep" 1>&6
4044         else
4045                 cc_cv_mkdep=yes
4046                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4047         fi
4048 else
4049         cc_cv_mkdep=yes
4050         OL_MKDEP="${MKDEP}"
4051         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4052 fi
4053
4054
4055
4056 if test "${ol_cv_mkdep}" = no ; then
4057         # this will soon become an error
4058         echo "configure: warning: do not know how to generate dependencies" 1>&2
4059 fi
4060
4061 ol_link_modules=no
4062 if test $ol_enable_modules != no ; then
4063         for ac_hdr in ltdl.h
4064 do
4065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4067 echo "configure:4046: checking for $ac_hdr" >&5
4068 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4069   echo $ac_n "(cached) $ac_c" 1>&6
4070 else
4071   cat > conftest.$ac_ext <<EOF
4072 #line 4051 "configure"
4073 #include "confdefs.h"
4074 #include <$ac_hdr>
4075 EOF
4076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4077 { (eval echo configure:4056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4079 if test -z "$ac_err"; then
4080   rm -rf conftest*
4081   eval "ac_cv_header_$ac_safe=yes"
4082 else
4083   echo "$ac_err" >&5
4084   echo "configure: failed program was:" >&5
4085   cat conftest.$ac_ext >&5
4086   rm -rf conftest*
4087   eval "ac_cv_header_$ac_safe=no"
4088 fi
4089 rm -f conftest*
4090 fi
4091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4092   echo "$ac_t""yes" 1>&6
4093     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4094   cat >> confdefs.h <<EOF
4095 #define $ac_tr_hdr 1
4096 EOF
4097  
4098 else
4099   echo "$ac_t""no" 1>&6
4100 fi
4101 done
4102
4103
4104         if test $ac_cv_header_ltdl_h = no ; then
4105                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4106         fi
4107
4108         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4109 echo "configure:4088: checking for lt_dlinit in -lltdl" >&5
4110 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4112   echo $ac_n "(cached) $ac_c" 1>&6
4113 else
4114   ac_save_LIBS="$LIBS"
4115 LIBS="-lltdl  $LIBS"
4116 cat > conftest.$ac_ext <<EOF
4117 #line 4096 "configure"
4118 #include "confdefs.h"
4119 /* Override any gcc2 internal prototype to avoid an error.  */
4120 /* We use char because int might match the return type of a gcc2
4121     builtin and then its argument prototype would still apply.  */
4122 char lt_dlinit();
4123
4124 int main() {
4125 lt_dlinit()
4126 ; return 0; }
4127 EOF
4128 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4129   rm -rf conftest*
4130   eval "ac_cv_lib_$ac_lib_var=yes"
4131 else
4132   echo "configure: failed program was:" >&5
4133   cat conftest.$ac_ext >&5
4134   rm -rf conftest*
4135   eval "ac_cv_lib_$ac_lib_var=no"
4136 fi
4137 rm -f conftest*
4138 LIBS="$ac_save_LIBS"
4139
4140 fi
4141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4142   echo "$ac_t""yes" 1>&6
4143   
4144             MODULES_LIBS=-lltdl
4145             cat >> confdefs.h <<\EOF
4146 #define HAVE_LIBLTDL 1
4147 EOF
4148
4149         
4150 else
4151   echo "$ac_t""no" 1>&6
4152 fi
4153
4154
4155         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4156                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4157         fi
4158         ol_link_modules=yes
4159 else
4160         ol_with_bdb2_module=static
4161         ol_with_ldap_module=static
4162         ol_with_ldbm_module=static
4163         ol_with_passwd_module=static
4164         ol_with_perl_module=static
4165         ol_with_shell_module=static
4166         ol_with_tcl_module=static
4167 fi
4168
4169 # test for EBCDIC
4170 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4171 echo "configure:4150: checking for EBCDIC" >&5
4172 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4173   echo $ac_n "(cached) $ac_c" 1>&6
4174 else
4175   
4176         cat > conftest.$ac_ext <<EOF
4177 #line 4156 "configure"
4178 #include "confdefs.h"
4179
4180 #if !('M' == 0xd4)
4181 #include <__ASCII__/generate_error.h>
4182 #endif
4183
4184 EOF
4185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4186 { (eval echo configure:4165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4187 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4188 if test -z "$ac_err"; then
4189   rm -rf conftest*
4190   ol_cv_cpp_ebcdic=yes
4191 else
4192   echo "$ac_err" >&5
4193   echo "configure: failed program was:" >&5
4194   cat conftest.$ac_ext >&5
4195   rm -rf conftest*
4196   ol_cv_cpp_ebcdic=no
4197 fi
4198 rm -f conftest*
4199 fi
4200
4201 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4202 if test $ol_cv_cpp_ebcdic = yes ; then
4203         cat >> confdefs.h <<\EOF
4204 #define HAVE_EBCDIC 1
4205 EOF
4206
4207 fi
4208
4209 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4210 echo "configure:4189: checking for ANSI C header files" >&5
4211 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4212   echo $ac_n "(cached) $ac_c" 1>&6
4213 else
4214   cat > conftest.$ac_ext <<EOF
4215 #line 4194 "configure"
4216 #include "confdefs.h"
4217 #include <stdlib.h>
4218 #include <stdarg.h>
4219 #include <string.h>
4220 #include <float.h>
4221 EOF
4222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4223 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4225 if test -z "$ac_err"; then
4226   rm -rf conftest*
4227   ol_cv_header_stdc=yes
4228 else
4229   echo "$ac_err" >&5
4230   echo "configure: failed program was:" >&5
4231   cat conftest.$ac_ext >&5
4232   rm -rf conftest*
4233   ol_cv_header_stdc=no
4234 fi
4235 rm -f conftest*
4236
4237 if test $ol_cv_header_stdc = yes; then
4238   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4239 cat > conftest.$ac_ext <<EOF
4240 #line 4219 "configure"
4241 #include "confdefs.h"
4242 #include <string.h>
4243 EOF
4244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4245   egrep "memchr" >/dev/null 2>&1; then
4246   :
4247 else
4248   rm -rf conftest*
4249   ol_cv_header_stdc=no
4250 fi
4251 rm -f conftest*
4252
4253 fi
4254
4255 if test $ol_cv_header_stdc = yes; then
4256   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4257 cat > conftest.$ac_ext <<EOF
4258 #line 4237 "configure"
4259 #include "confdefs.h"
4260 #include <stdlib.h>
4261 EOF
4262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4263   egrep "free" >/dev/null 2>&1; then
4264   :
4265 else
4266   rm -rf conftest*
4267   ol_cv_header_stdc=no
4268 fi
4269 rm -f conftest*
4270
4271 fi
4272
4273 if test $ol_cv_header_stdc = yes; then
4274   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4275 if test "$cross_compiling" = yes; then
4276   :
4277 else
4278   cat > conftest.$ac_ext <<EOF
4279 #line 4258 "configure"
4280 #include "confdefs.h"
4281 #include <ctype.h>
4282 #ifndef HAVE_EBCDIC
4283 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4284 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4285 #else
4286 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4287                 || ('j' <= (c) && (c) <= 'r') \
4288                 || ('s' <= (c) && (c) <= 'z'))
4289 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4290 #endif
4291 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4292 int main () { int i; for (i = 0; i < 256; i++)
4293 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4294 exit (0); }
4295
4296 EOF
4297 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4298 then
4299   :
4300 else
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -fr conftest*
4304   ol_cv_header_stdc=no
4305 fi
4306 rm -fr conftest*
4307 fi
4308
4309 fi
4310 fi
4311
4312 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4313 if test $ol_cv_header_stdc = yes; then
4314   cat >> confdefs.h <<\EOF
4315 #define STDC_HEADERS 1
4316 EOF
4317
4318 fi
4319 ac_cv_header_stdc=disable
4320
4321
4322 if test $ol_cv_header_stdc != yes; then
4323         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4324 fi
4325
4326 ac_header_dirent=no
4327 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4328 do
4329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4330 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4331 echo "configure:4310: checking for $ac_hdr that defines DIR" >&5
4332 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4333   echo $ac_n "(cached) $ac_c" 1>&6
4334 else
4335   cat > conftest.$ac_ext <<EOF
4336 #line 4315 "configure"
4337 #include "confdefs.h"
4338 #include <sys/types.h>
4339 #include <$ac_hdr>
4340 int main() {
4341 DIR *dirp = 0;
4342 ; return 0; }
4343 EOF
4344 if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4345   rm -rf conftest*
4346   eval "ac_cv_header_dirent_$ac_safe=yes"
4347 else
4348   echo "configure: failed program was:" >&5
4349   cat conftest.$ac_ext >&5
4350   rm -rf conftest*
4351   eval "ac_cv_header_dirent_$ac_safe=no"
4352 fi
4353 rm -f conftest*
4354 fi
4355 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4356   echo "$ac_t""yes" 1>&6
4357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4358   cat >> confdefs.h <<EOF
4359 #define $ac_tr_hdr 1
4360 EOF
4361  ac_header_dirent=$ac_hdr; break
4362 else
4363   echo "$ac_t""no" 1>&6
4364 fi
4365 done
4366 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4367 if test $ac_header_dirent = dirent.h; then
4368 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4369 echo "configure:4348: checking for opendir in -ldir" >&5
4370 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4372   echo $ac_n "(cached) $ac_c" 1>&6
4373 else
4374   ac_save_LIBS="$LIBS"
4375 LIBS="-ldir  $LIBS"
4376 cat > conftest.$ac_ext <<EOF
4377 #line 4356 "configure"
4378 #include "confdefs.h"
4379 /* Override any gcc2 internal prototype to avoid an error.  */
4380 /* We use char because int might match the return type of a gcc2
4381     builtin and then its argument prototype would still apply.  */
4382 char opendir();
4383
4384 int main() {
4385 opendir()
4386 ; return 0; }
4387 EOF
4388 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4389   rm -rf conftest*
4390   eval "ac_cv_lib_$ac_lib_var=yes"
4391 else
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -rf conftest*
4395   eval "ac_cv_lib_$ac_lib_var=no"
4396 fi
4397 rm -f conftest*
4398 LIBS="$ac_save_LIBS"
4399
4400 fi
4401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4402   echo "$ac_t""yes" 1>&6
4403   LIBS="$LIBS -ldir"
4404 else
4405   echo "$ac_t""no" 1>&6
4406 fi
4407
4408 else
4409 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4410 echo "configure:4389: checking for opendir in -lx" >&5
4411 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   ac_save_LIBS="$LIBS"
4416 LIBS="-lx  $LIBS"
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4397 "configure"
4419 #include "confdefs.h"
4420 /* Override any gcc2 internal prototype to avoid an error.  */
4421 /* We use char because int might match the return type of a gcc2
4422     builtin and then its argument prototype would still apply.  */
4423 char opendir();
4424
4425 int main() {
4426 opendir()
4427 ; return 0; }
4428 EOF
4429 if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4430   rm -rf conftest*
4431   eval "ac_cv_lib_$ac_lib_var=yes"
4432 else
4433   echo "configure: failed program was:" >&5
4434   cat conftest.$ac_ext >&5
4435   rm -rf conftest*
4436   eval "ac_cv_lib_$ac_lib_var=no"
4437 fi
4438 rm -f conftest*
4439 LIBS="$ac_save_LIBS"
4440
4441 fi
4442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4443   echo "$ac_t""yes" 1>&6
4444   LIBS="$LIBS -lx"
4445 else
4446   echo "$ac_t""no" 1>&6
4447 fi
4448
4449 fi
4450
4451 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4452 echo "configure:4431: checking for sys/wait.h that is POSIX.1 compatible" >&5
4453 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4454   echo $ac_n "(cached) $ac_c" 1>&6
4455 else
4456   cat > conftest.$ac_ext <<EOF
4457 #line 4436 "configure"
4458 #include "confdefs.h"
4459 #include <sys/types.h>
4460 #include <sys/wait.h>
4461 #ifndef WEXITSTATUS
4462 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4463 #endif
4464 #ifndef WIFEXITED
4465 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4466 #endif
4467 int main() {
4468 int s;
4469 wait (&s);
4470 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4474   rm -rf conftest*
4475   ac_cv_header_sys_wait_h=yes
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   ac_cv_header_sys_wait_h=no
4481 fi
4482 rm -f conftest*
4483 fi
4484
4485 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4486 if test $ac_cv_header_sys_wait_h = yes; then
4487   cat >> confdefs.h <<\EOF
4488 #define HAVE_SYS_WAIT_H 1
4489 EOF
4490
4491 fi
4492
4493 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4494 echo "configure:4473: checking POSIX termios" >&5
4495 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4496   echo $ac_n "(cached) $ac_c" 1>&6
4497 else
4498   cat > conftest.$ac_ext <<EOF
4499 #line 4478 "configure"
4500 #include "confdefs.h"
4501 #include <sys/types.h>
4502 #include <unistd.h>
4503 #include <termios.h>
4504 int main() {
4505 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4506    tcgetattr(0, 0);
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   am_cv_sys_posix_termios=yes
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   am_cv_sys_posix_termios=no
4517 fi
4518 rm -f conftest*
4519 fi
4520
4521 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4522
4523
4524  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4525 echo "configure:4504: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4526 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4527   echo $ac_n "(cached) $ac_c" 1>&6
4528 else
4529   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4530
4531   gwinsz_in_termios_h=no
4532   if test $am_cv_sys_posix_termios = yes; then
4533     cat > conftest.$ac_ext <<EOF
4534 #line 4513 "configure"
4535 #include "confdefs.h"
4536 #include <sys/types.h>
4537 #     include <termios.h>
4538 #     ifdef TIOCGWINSZ
4539         yes
4540 #     endif
4541     
4542 EOF
4543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4544   egrep "yes" >/dev/null 2>&1; then
4545   rm -rf conftest*
4546   gwinsz_in_termios_h=yes
4547 fi
4548 rm -f conftest*
4549
4550   fi
4551
4552   if test $gwinsz_in_termios_h = no; then
4553     cat > conftest.$ac_ext <<EOF
4554 #line 4533 "configure"
4555 #include "confdefs.h"
4556 #include <sys/types.h>
4557 #     include <sys/ioctl.h>
4558 #     ifdef TIOCGWINSZ
4559         yes
4560 #     endif
4561     
4562 EOF
4563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4564   egrep "yes" >/dev/null 2>&1; then
4565   rm -rf conftest*
4566   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4567 fi
4568 rm -f conftest*
4569
4570   fi
4571   
4572 fi
4573
4574 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4575   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4576     cat >> confdefs.h <<\EOF
4577 #define GWINSZ_IN_SYS_IOCTL 1
4578 EOF
4579
4580   fi
4581
4582 if test $am_cv_sys_posix_termios = yes ; then
4583         cat >> confdefs.h <<\EOF
4584 #define HAVE_POSIX_TERMIOS 1
4585 EOF
4586
4587 fi
4588
4589 for ac_hdr in \
4590         arpa/inet.h             \
4591         arpa/nameser.h  \
4592         assert.h                \
4593         conio.h                 \
4594         crypt.h                 \
4595         direct.h                \
4596         errno.h                 \
4597         fcntl.h                 \
4598         filio.h                 \
4599         getopt.h                \
4600         grp.h                   \
4601         io.h                    \
4602         libutil.h               \
4603         limits.h                \
4604         locale.h                \
4605         netinet/tcp.h   \
4606         malloc.h                \
4607         memory.h                \
4608         psap.h                  \
4609         pwd.h                   \
4610         process.h               \
4611         resolv.h                \
4612         sgtty.h                 \
4613         shadow.h                \
4614         stddef.h                \
4615         string.h                \
4616         strings.h               \
4617         sysexits.h              \
4618         sys/file.h              \
4619         sys/filio.h             \
4620         sys/errno.h             \
4621         sys/ioctl.h             \
4622         sys/param.h             \
4623         sys/resource.h  \
4624         sys/select.h    \
4625         sys/socket.h    \
4626         sys/un.h        \
4627         sys/syslog.h    \
4628         sys/time.h              \
4629         sys/types.h             \
4630         syslog.h                \
4631         termios.h               \
4632         unistd.h                \
4633         winsock.h               \
4634
4635 do
4636 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4637 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4638 echo "configure:4616: checking for $ac_hdr" >&5
4639 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4640   echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642   cat > conftest.$ac_ext <<EOF
4643 #line 4621 "configure"
4644 #include "confdefs.h"
4645 #include <$ac_hdr>
4646 EOF
4647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4648 { (eval echo configure:4626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4650 if test -z "$ac_err"; then
4651   rm -rf conftest*
4652   eval "ac_cv_header_$ac_safe=yes"
4653 else
4654   echo "$ac_err" >&5
4655   echo "configure: failed program was:" >&5
4656   cat conftest.$ac_ext >&5
4657   rm -rf conftest*
4658   eval "ac_cv_header_$ac_safe=no"
4659 fi
4660 rm -f conftest*
4661 fi
4662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4663   echo "$ac_t""yes" 1>&6
4664     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4665   cat >> confdefs.h <<EOF
4666 #define $ac_tr_hdr 1
4667 EOF
4668  
4669 else
4670   echo "$ac_t""no" 1>&6
4671 fi
4672 done
4673
4674
4675
4676
4677 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4678 echo "configure:4656: checking for sigset in -lV3" >&5
4679 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4681   echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683   ac_save_LIBS="$LIBS"
4684 LIBS="-lV3  $LIBS"
4685 cat > conftest.$ac_ext <<EOF
4686 #line 4664 "configure"
4687 #include "confdefs.h"
4688 /* Override any gcc2 internal prototype to avoid an error.  */
4689 /* We use char because int might match the return type of a gcc2
4690     builtin and then its argument prototype would still apply.  */
4691 char sigset();
4692
4693 int main() {
4694 sigset()
4695 ; return 0; }
4696 EOF
4697 if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4698   rm -rf conftest*
4699   eval "ac_cv_lib_$ac_lib_var=yes"
4700 else
4701   echo "configure: failed program was:" >&5
4702   cat conftest.$ac_ext >&5
4703   rm -rf conftest*
4704   eval "ac_cv_lib_$ac_lib_var=no"
4705 fi
4706 rm -f conftest*
4707 LIBS="$ac_save_LIBS"
4708
4709 fi
4710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4711   echo "$ac_t""yes" 1>&6
4712     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4713     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4714   cat >> confdefs.h <<EOF
4715 #define $ac_tr_lib 1
4716 EOF
4717
4718   LIBS="-lV3 $LIBS"
4719
4720 else
4721   echo "$ac_t""no" 1>&6
4722 fi
4723
4724
4725 if test $ac_cv_header_winsock_h = yes; then
4726         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4727 echo "configure:4705: checking for winsock" >&5
4728 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4729   echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731   cat > conftest.$ac_ext <<EOF
4732 #line 4710 "configure"
4733 #include "confdefs.h"
4734 #include <winsock.h>
4735 int main() {
4736
4737                         socket(0,0,0);
4738                         select(0,NULL,NULL,NULL,NULL);
4739                         closesocket(0);
4740                         gethostname(NULL,0);
4741         
4742 ; return 0; }
4743 EOF
4744 if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4745   rm -rf conftest*
4746   ol_cv_winsock=yes
4747 else
4748   echo "configure: failed program was:" >&5
4749   cat conftest.$ac_ext >&5
4750   rm -rf conftest*
4751   ol_cv_winsock=no
4752 fi
4753 rm -f conftest*]
4754 fi
4755
4756 echo "$ac_t""$ol_cv_winsock" 1>&6
4757
4758         if test $ol_cv_winsock = yes ; then
4759                 cat >> confdefs.h <<\EOF
4760 #define HAVE_WINSOCK 1
4761 EOF
4762
4763                 ac_cv_func_socket=yes
4764                 ac_cv_func_select=yes
4765                 ac_cv_func_closesocket=yes
4766                 ac_cv_func_gethostname=yes
4767         fi
4768 fi
4769
4770
4771 echo $ac_n "checking for socket""... $ac_c" 1>&6
4772 echo "configure:4750: checking for socket" >&5
4773 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4774   echo $ac_n "(cached) $ac_c" 1>&6
4775 else
4776   cat > conftest.$ac_ext <<EOF
4777 #line 4755 "configure"
4778 #include "confdefs.h"
4779 /* System header to define __stub macros and hopefully few prototypes,
4780     which can conflict with char socket(); below.  */
4781 #include <assert.h>
4782 /* Override any gcc2 internal prototype to avoid an error.  */
4783 /* We use char because int might match the return type of a gcc2
4784     builtin and then its argument prototype would still apply.  */
4785 char socket();
4786 char (*f)();
4787
4788 int main() {
4789
4790 /* The GNU C library defines this for functions which it implements
4791     to always fail with ENOSYS.  Some functions are actually named
4792     something starting with __ and the normal name is an alias.  */
4793 #if defined (__stub_socket) || defined (__stub___socket)
4794 choke me
4795 #else
4796 f = socket;
4797 #endif
4798
4799 ; return 0; }
4800 EOF
4801 if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4802   rm -rf conftest*
4803   eval "ac_cv_func_socket=yes"
4804 else
4805   echo "configure: failed program was:" >&5
4806   cat conftest.$ac_ext >&5
4807   rm -rf conftest*
4808   eval "ac_cv_func_socket=no"
4809 fi
4810 rm -f conftest*
4811 fi
4812
4813 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4814   echo "$ac_t""yes" 1>&6
4815   :
4816 else
4817   echo "$ac_t""no" 1>&6
4818         
4819         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4820 echo "configure:4798: checking for main in -lsocket" >&5
4821 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4822 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   ac_save_LIBS="$LIBS"
4826 LIBS="-lsocket  $LIBS"
4827 cat > conftest.$ac_ext <<EOF
4828 #line 4806 "configure"
4829 #include "confdefs.h"
4830
4831 int main() {
4832 main()
4833 ; return 0; }
4834 EOF
4835 if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4836   rm -rf conftest*
4837   eval "ac_cv_lib_$ac_lib_var=yes"
4838 else
4839   echo "configure: failed program was:" >&5
4840   cat conftest.$ac_ext >&5
4841   rm -rf conftest*
4842   eval "ac_cv_lib_$ac_lib_var=no"
4843 fi
4844 rm -f conftest*
4845 LIBS="$ac_save_LIBS"
4846
4847 fi
4848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4849   echo "$ac_t""yes" 1>&6
4850     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4851     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4852   cat >> confdefs.h <<EOF
4853 #define $ac_tr_lib 1
4854 EOF
4855
4856   LIBS="-lsocket $LIBS"
4857
4858 else
4859   echo "$ac_t""no" 1>&6
4860 fi
4861
4862         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4863 echo "configure:4841: checking for main in -lnet" >&5
4864 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4865 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4866   echo $ac_n "(cached) $ac_c" 1>&6
4867 else
4868   ac_save_LIBS="$LIBS"
4869 LIBS="-lnet  $LIBS"
4870 cat > conftest.$ac_ext <<EOF
4871 #line 4849 "configure"
4872 #include "confdefs.h"
4873
4874 int main() {
4875 main()
4876 ; return 0; }
4877 EOF
4878 if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879   rm -rf conftest*
4880   eval "ac_cv_lib_$ac_lib_var=yes"
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   eval "ac_cv_lib_$ac_lib_var=no"
4886 fi
4887 rm -f conftest*
4888 LIBS="$ac_save_LIBS"
4889
4890 fi
4891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4892   echo "$ac_t""yes" 1>&6
4893     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4894     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4895   cat >> confdefs.h <<EOF
4896 #define $ac_tr_lib 1
4897 EOF
4898
4899   LIBS="-lnet $LIBS"
4900
4901 else
4902   echo "$ac_t""no" 1>&6
4903 fi
4904
4905         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4906 echo "configure:4884: checking for main in -lnsl_s" >&5
4907 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4908 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4909   echo $ac_n "(cached) $ac_c" 1>&6
4910 else
4911   ac_save_LIBS="$LIBS"
4912 LIBS="-lnsl_s  $LIBS"
4913 cat > conftest.$ac_ext <<EOF
4914 #line 4892 "configure"
4915 #include "confdefs.h"
4916
4917 int main() {
4918 main()
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   eval "ac_cv_lib_$ac_lib_var=yes"
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   eval "ac_cv_lib_$ac_lib_var=no"
4929 fi
4930 rm -f conftest*
4931 LIBS="$ac_save_LIBS"
4932
4933 fi
4934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4935   echo "$ac_t""yes" 1>&6
4936     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4937     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4938   cat >> confdefs.h <<EOF
4939 #define $ac_tr_lib 1
4940 EOF
4941
4942   LIBS="-lnsl_s $LIBS"
4943
4944 else
4945   echo "$ac_t""no" 1>&6
4946 fi
4947
4948         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4949 echo "configure:4927: checking for main in -lnsl" >&5
4950 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4952   echo $ac_n "(cached) $ac_c" 1>&6
4953 else
4954   ac_save_LIBS="$LIBS"
4955 LIBS="-lnsl  $LIBS"
4956 cat > conftest.$ac_ext <<EOF
4957 #line 4935 "configure"
4958 #include "confdefs.h"
4959
4960 int main() {
4961 main()
4962 ; return 0; }
4963 EOF
4964 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4965   rm -rf conftest*
4966   eval "ac_cv_lib_$ac_lib_var=yes"
4967 else
4968   echo "configure: failed program was:" >&5
4969   cat conftest.$ac_ext >&5
4970   rm -rf conftest*
4971   eval "ac_cv_lib_$ac_lib_var=no"
4972 fi
4973 rm -f conftest*
4974 LIBS="$ac_save_LIBS"
4975
4976 fi
4977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4978   echo "$ac_t""yes" 1>&6
4979     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4980     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4981   cat >> confdefs.h <<EOF
4982 #define $ac_tr_lib 1
4983 EOF
4984
4985   LIBS="-lnsl $LIBS"
4986
4987 else
4988   echo "$ac_t""no" 1>&6
4989 fi
4990
4991         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4992 echo "configure:4970: checking for socket in -linet" >&5
4993 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4994 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4995   echo $ac_n "(cached) $ac_c" 1>&6
4996 else
4997   ac_save_LIBS="$LIBS"
4998 LIBS="-linet  $LIBS"
4999 cat > conftest.$ac_ext <<EOF
5000 #line 4978 "configure"
5001 #include "confdefs.h"
5002 /* Override any gcc2 internal prototype to avoid an error.  */
5003 /* We use char because int might match the return type of a gcc2
5004     builtin and then its argument prototype would still apply.  */
5005 char socket();
5006
5007 int main() {
5008 socket()
5009 ; return 0; }
5010 EOF
5011 if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5012   rm -rf conftest*
5013   eval "ac_cv_lib_$ac_lib_var=yes"
5014 else
5015   echo "configure: failed program was:" >&5
5016   cat conftest.$ac_ext >&5
5017   rm -rf conftest*
5018   eval "ac_cv_lib_$ac_lib_var=no"
5019 fi
5020 rm -f conftest*
5021 LIBS="$ac_save_LIBS"
5022
5023 fi
5024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5025   echo "$ac_t""yes" 1>&6
5026     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5027     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5028   cat >> confdefs.h <<EOF
5029 #define $ac_tr_lib 1
5030 EOF
5031
5032   LIBS="-linet $LIBS"
5033
5034 else
5035   echo "$ac_t""no" 1>&6
5036 fi
5037
5038         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5039 echo "configure:5017: checking for main in -lgen" >&5
5040 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5042   echo $ac_n "(cached) $ac_c" 1>&6
5043 else
5044   ac_save_LIBS="$LIBS"
5045 LIBS="-lgen  $LIBS"
5046 cat > conftest.$ac_ext <<EOF
5047 #line 5025 "configure"
5048 #include "confdefs.h"
5049
5050 int main() {
5051 main()
5052 ; return 0; }
5053 EOF
5054 if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5055   rm -rf conftest*
5056   eval "ac_cv_lib_$ac_lib_var=yes"
5057 else
5058   echo "configure: failed program was:" >&5
5059   cat conftest.$ac_ext >&5
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=no"
5062 fi
5063 rm -f conftest*
5064 LIBS="$ac_save_LIBS"
5065
5066 fi
5067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5068   echo "$ac_t""yes" 1>&6
5069     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5071   cat >> confdefs.h <<EOF
5072 #define $ac_tr_lib 1
5073 EOF
5074
5075   LIBS="-lgen $LIBS"
5076
5077 else
5078   echo "$ac_t""no" 1>&6
5079 fi
5080
5081
5082 fi
5083
5084
5085 echo $ac_n "checking for select""... $ac_c" 1>&6
5086 echo "configure:5064: checking for select" >&5
5087 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090   cat > conftest.$ac_ext <<EOF
5091 #line 5069 "configure"
5092 #include "confdefs.h"
5093 /* System header to define __stub macros and hopefully few prototypes,
5094     which can conflict with char select(); below.  */
5095 #include <assert.h>
5096 /* Override any gcc2 internal prototype to avoid an error.  */
5097 /* We use char because int might match the return type of a gcc2
5098     builtin and then its argument prototype would still apply.  */
5099 char select();
5100 char (*f)();
5101
5102 int main() {
5103
5104 /* The GNU C library defines this for functions which it implements
5105     to always fail with ENOSYS.  Some functions are actually named
5106     something starting with __ and the normal name is an alias.  */
5107 #if defined (__stub_select) || defined (__stub___select)
5108 choke me
5109 #else
5110 f = select;
5111 #endif
5112
5113 ; return 0; }
5114 EOF
5115 if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5116   rm -rf conftest*
5117   eval "ac_cv_func_select=yes"
5118 else
5119   echo "configure: failed program was:" >&5
5120   cat conftest.$ac_ext >&5
5121   rm -rf conftest*
5122   eval "ac_cv_func_select=no"
5123 fi
5124 rm -f conftest*
5125 fi
5126
5127 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5128   echo "$ac_t""yes" 1>&6
5129   :
5130 else
5131   echo "$ac_t""no" 1>&6
5132 { echo "configure: error: select() required." 1>&2; exit 1; }
5133 fi
5134
5135
5136 if test "${ac_cv_header_winsock_h}" != yes; then
5137                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5138 echo "configure:5116: checking types of arguments for select()" >&5
5139  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5140   echo $ac_n "(cached) $ac_c" 1>&6
5141 else
5142    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5143   echo $ac_n "(cached) $ac_c" 1>&6
5144 else
5145     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5146   echo $ac_n "(cached) $ac_c" 1>&6
5147 else
5148      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5149      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5150       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5151        cat > conftest.$ac_ext <<EOF
5152 #line 5130 "configure"
5153 #include "confdefs.h"
5154 #ifdef HAVE_SYS_TYPES_H
5155 #include <sys/types.h>
5156 #endif
5157 #ifdef HAVE_SYS_TIME_H
5158 #include <sys/time.h>
5159 #endif
5160 #ifdef HAVE_SYS_SELECT_H
5161 #include <sys/select.h>
5162 #endif
5163 #ifdef HAVE_SYS_SOCKET_H
5164 #include <sys/socket.h>
5165 #endif
5166 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);
5167 int main() {
5168
5169 ; return 0; }
5170 EOF
5171 if { (eval echo configure:5149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5172   rm -rf conftest*
5173           ac_not_found=no ; break 3
5174 else
5175   echo "configure: failed program was:" >&5
5176   cat conftest.$ac_ext >&5
5177   rm -rf conftest*
5178   ac_not_found=yes
5179 fi
5180 rm -f conftest*
5181       done
5182      done
5183     done
5184    
5185 fi
5186   
5187 fi
5188  
5189 fi
5190  if test "$ac_not_found" = yes; then
5191   ac_cv_func_select_arg1=int 
5192   ac_cv_func_select_arg234='int *' 
5193   ac_cv_func_select_arg5='struct timeval *'
5194  fi
5195  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5196  cat >> confdefs.h <<EOF
5197 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5198 EOF
5199
5200  cat >> confdefs.h <<EOF
5201 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5202 EOF
5203
5204  cat >> confdefs.h <<EOF
5205 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5206 EOF
5207
5208
5209 fi
5210
5211
5212 for ac_hdr in regex.h 
5213 do
5214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5216 echo "configure:5194: checking for $ac_hdr" >&5
5217 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5218   echo $ac_n "(cached) $ac_c" 1>&6
5219 else
5220   cat > conftest.$ac_ext <<EOF
5221 #line 5199 "configure"
5222 #include "confdefs.h"
5223 #include <$ac_hdr>
5224 EOF
5225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5226 { (eval echo configure:5204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5228 if test -z "$ac_err"; then
5229   rm -rf conftest*
5230   eval "ac_cv_header_$ac_safe=yes"
5231 else
5232   echo "$ac_err" >&5
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235   rm -rf conftest*
5236   eval "ac_cv_header_$ac_safe=no"
5237 fi
5238 rm -f conftest*
5239 fi
5240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5241   echo "$ac_t""yes" 1>&6
5242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5243   cat >> confdefs.h <<EOF
5244 #define $ac_tr_hdr 1
5245 EOF
5246  
5247 else
5248   echo "$ac_t""no" 1>&6
5249 fi
5250 done
5251
5252 if test "$ac_cv_header_regex_h" != yes ; then
5253         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5254 fi
5255 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5256 echo "configure:5234: checking for regfree" >&5
5257 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5258   echo $ac_n "(cached) $ac_c" 1>&6
5259 else
5260   cat > conftest.$ac_ext <<EOF
5261 #line 5239 "configure"
5262 #include "confdefs.h"
5263 /* System header to define __stub macros and hopefully few prototypes,
5264     which can conflict with char regfree(); below.  */
5265 #include <assert.h>
5266 /* Override any gcc2 internal prototype to avoid an error.  */
5267 /* We use char because int might match the return type of a gcc2
5268     builtin and then its argument prototype would still apply.  */
5269 char regfree();
5270 char (*f)();
5271
5272 int main() {
5273
5274 /* The GNU C library defines this for functions which it implements
5275     to always fail with ENOSYS.  Some functions are actually named
5276     something starting with __ and the normal name is an alias.  */
5277 #if defined (__stub_regfree) || defined (__stub___regfree)
5278 choke me
5279 #else
5280 f = regfree;
5281 #endif
5282
5283 ; return 0; }
5284 EOF
5285 if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5286   rm -rf conftest*
5287   eval "ac_cv_func_regfree=yes"
5288 else
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   eval "ac_cv_func_regfree=no"
5293 fi
5294 rm -f conftest*
5295 fi
5296
5297 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5298   echo "$ac_t""yes" 1>&6
5299   :
5300 else
5301   echo "$ac_t""no" 1>&6
5302 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5303 fi
5304
5305
5306
5307 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5308 echo "configure:5286: checking for compatible POSIX regex" >&5
5309 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5310   echo $ac_n "(cached) $ac_c" 1>&6
5311 else
5312   
5313         if test "$cross_compiling" = yes; then
5314   ol_cv_c_posix_regex=cross
5315 else
5316   cat > conftest.$ac_ext <<EOF
5317 #line 5295 "configure"
5318 #include "confdefs.h"
5319
5320 #include <sys/types.h>
5321 #include <regex.h>
5322 static char *pattern, *string;
5323 main()
5324 {
5325         int rc;
5326         regex_t re;
5327
5328         pattern = "^A";
5329
5330         if(regcomp(&re, pattern, 0)) {
5331                 return -1;
5332         }
5333         
5334         string = "ALL MATCH";
5335         
5336         rc = regexec(&re, string, 0, (void*)0, 0);
5337
5338         regfree(&re);
5339
5340         return rc;
5341 }
5342 EOF
5343 if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5344 then
5345   ol_cv_c_posix_regex=yes
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349   rm -fr conftest*
5350   ol_cv_c_posix_regex=no
5351 fi
5352 rm -fr conftest*
5353 fi
5354
5355 fi
5356
5357 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5358
5359 if test "$ol_cv_c_posix_regex" = no ; then
5360         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5361 fi
5362
5363 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5364 echo "configure:5342: checking for res_search" >&5
5365 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5366   echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368   cat > conftest.$ac_ext <<EOF
5369 #line 5347 "configure"
5370 #include "confdefs.h"
5371 /* System header to define __stub macros and hopefully few prototypes,
5372     which can conflict with char res_search(); below.  */
5373 #include <assert.h>
5374 /* Override any gcc2 internal prototype to avoid an error.  */
5375 /* We use char because int might match the return type of a gcc2
5376     builtin and then its argument prototype would still apply.  */
5377 char res_search();
5378 char (*f)();
5379
5380 int main() {
5381
5382 /* The GNU C library defines this for functions which it implements
5383     to always fail with ENOSYS.  Some functions are actually named
5384     something starting with __ and the normal name is an alias.  */
5385 #if defined (__stub_res_search) || defined (__stub___res_search)
5386 choke me
5387 #else
5388 f = res_search;
5389 #endif
5390
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5394   rm -rf conftest*
5395   eval "ac_cv_func_res_search=yes"
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399   rm -rf conftest*
5400   eval "ac_cv_func_res_search=no"
5401 fi
5402 rm -f conftest*
5403 fi
5404
5405 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5406   echo "$ac_t""yes" 1>&6
5407   :
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411
5412 if test $ac_cv_func_res_search = no ; then 
5413         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5414 echo "configure:5392: checking for res_search in -lbind" >&5
5415 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5417   echo $ac_n "(cached) $ac_c" 1>&6
5418 else
5419   ac_save_LIBS="$LIBS"
5420 LIBS="-lbind  $LIBS"
5421 cat > conftest.$ac_ext <<EOF
5422 #line 5400 "configure"
5423 #include "confdefs.h"
5424 /* Override any gcc2 internal prototype to avoid an error.  */
5425 /* We use char because int might match the return type of a gcc2
5426     builtin and then its argument prototype would still apply.  */
5427 char res_search();
5428
5429 int main() {
5430 res_search()
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_lib_$ac_lib_var=no"
5441 fi
5442 rm -f conftest*
5443 LIBS="$ac_save_LIBS"
5444
5445 fi
5446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5447   echo "$ac_t""yes" 1>&6
5448     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5449     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5450   cat >> confdefs.h <<EOF
5451 #define $ac_tr_lib 1
5452 EOF
5453
5454   LIBS="-lbind $LIBS"
5455
5456 else
5457   echo "$ac_t""no" 1>&6
5458 fi
5459
5460         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5461 fi
5462
5463 if test $ac_cv_func_res_search = no ; then 
5464         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5465 echo "configure:5443: checking for __res_search in -lbind" >&5
5466 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5468   echo $ac_n "(cached) $ac_c" 1>&6
5469 else
5470   ac_save_LIBS="$LIBS"
5471 LIBS="-lbind  $LIBS"
5472 cat > conftest.$ac_ext <<EOF
5473 #line 5451 "configure"
5474 #include "confdefs.h"
5475 /* Override any gcc2 internal prototype to avoid an error.  */
5476 /* We use char because int might match the return type of a gcc2
5477     builtin and then its argument prototype would still apply.  */
5478 char __res_search();
5479
5480 int main() {
5481 __res_search()
5482 ; return 0; }
5483 EOF
5484 if { (eval echo configure:5462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5485   rm -rf conftest*
5486   eval "ac_cv_lib_$ac_lib_var=yes"
5487 else
5488   echo "configure: failed program was:" >&5
5489   cat conftest.$ac_ext >&5
5490   rm -rf conftest*
5491   eval "ac_cv_lib_$ac_lib_var=no"
5492 fi
5493 rm -f conftest*
5494 LIBS="$ac_save_LIBS"
5495
5496 fi
5497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5498   echo "$ac_t""yes" 1>&6
5499     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5500     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5501   cat >> confdefs.h <<EOF
5502 #define $ac_tr_lib 1
5503 EOF
5504
5505   LIBS="-lbind $LIBS"
5506
5507 else
5508   echo "$ac_t""no" 1>&6
5509 fi
5510
5511         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5512 fi
5513
5514 if test $ac_cv_func_res_search = no ; then 
5515         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5516 echo "configure:5494: checking for res_search in -lresolv" >&5
5517 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5518 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5519   echo $ac_n "(cached) $ac_c" 1>&6
5520 else
5521   ac_save_LIBS="$LIBS"
5522 LIBS="-lresolv  $LIBS"
5523 cat > conftest.$ac_ext <<EOF
5524 #line 5502 "configure"
5525 #include "confdefs.h"
5526 /* Override any gcc2 internal prototype to avoid an error.  */
5527 /* We use char because int might match the return type of a gcc2
5528     builtin and then its argument prototype would still apply.  */
5529 char res_search();
5530
5531 int main() {
5532 res_search()
5533 ; return 0; }
5534 EOF
5535 if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5536   rm -rf conftest*
5537   eval "ac_cv_lib_$ac_lib_var=yes"
5538 else
5539   echo "configure: failed program was:" >&5
5540   cat conftest.$ac_ext >&5
5541   rm -rf conftest*
5542   eval "ac_cv_lib_$ac_lib_var=no"
5543 fi
5544 rm -f conftest*
5545 LIBS="$ac_save_LIBS"
5546
5547 fi
5548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5549   echo "$ac_t""yes" 1>&6
5550     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5551     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5552   cat >> confdefs.h <<EOF
5553 #define $ac_tr_lib 1
5554 EOF
5555
5556   LIBS="-lresolv $LIBS"
5557
5558 else
5559   echo "$ac_t""no" 1>&6
5560 fi
5561
5562         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5563 fi
5564
5565 if test "$ac_cv_func_res_search" = yes ; then
5566         cat >> confdefs.h <<\EOF
5567 #define HAVE_RES_SEARCH 1
5568 EOF
5569
5570 elif test $ol_enable_dns = yes ; then
5571         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5572 elif test $ol_enable_dns != no ; then
5573         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5574 fi
5575
5576
5577 ol_link_isode=no
5578 if test $ol_enable_ldapd != no ; then
5579         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5580
5581                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5582 echo "configure:5560: checking for main in -lxtpp" >&5
5583 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5585   echo $ac_n "(cached) $ac_c" 1>&6
5586 else
5587   ac_save_LIBS="$LIBS"
5588 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5589 cat > conftest.$ac_ext <<EOF
5590 #line 5568 "configure"
5591 #include "confdefs.h"
5592
5593 int main() {
5594 main()
5595 ; return 0; }
5596 EOF
5597 if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5598   rm -rf conftest*
5599   eval "ac_cv_lib_$ac_lib_var=yes"
5600 else
5601   echo "configure: failed program was:" >&5
5602   cat conftest.$ac_ext >&5
5603   rm -rf conftest*
5604   eval "ac_cv_lib_$ac_lib_var=no"
5605 fi
5606 rm -f conftest*
5607 LIBS="$ac_save_LIBS"
5608
5609 fi
5610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5611   echo "$ac_t""yes" 1>&6
5612   
5613                 ol_link_isode=yes
5614                 cat >> confdefs.h <<\EOF
5615 #define HAVE_XTPP 1
5616 EOF
5617
5618                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5619                 
5620 else
5621   echo "$ac_t""no" 1>&6
5622 :
5623 fi
5624
5625         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5626 echo "configure:5604: checking for main in -ldsap" >&5
5627 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5629   echo $ac_n "(cached) $ac_c" 1>&6
5630 else
5631   ac_save_LIBS="$LIBS"
5632 LIBS="-ldsap -lisode $LIBS"
5633 cat > conftest.$ac_ext <<EOF
5634 #line 5612 "configure"
5635 #include "confdefs.h"
5636
5637 int main() {
5638 main()
5639 ; return 0; }
5640 EOF
5641 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5642   rm -rf conftest*
5643   eval "ac_cv_lib_$ac_lib_var=yes"
5644 else
5645   echo "configure: failed program was:" >&5
5646   cat conftest.$ac_ext >&5
5647   rm -rf conftest*
5648   eval "ac_cv_lib_$ac_lib_var=no"
5649 fi
5650 rm -f conftest*
5651 LIBS="$ac_save_LIBS"
5652
5653 fi
5654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5655   echo "$ac_t""yes" 1>&6
5656   
5657                 ol_link_isode=yes
5658                 cat >> confdefs.h <<\EOF
5659 #define HAVE_DSAP 1
5660 EOF
5661
5662                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5663                 
5664 else
5665   echo "$ac_t""no" 1>&6
5666 :
5667 fi
5668
5669         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5670 echo "configure:5648: checking for main in -lisode" >&5
5671 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5672 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   ac_save_LIBS="$LIBS"
5676 LIBS="-lisode  $LIBS"
5677 cat > conftest.$ac_ext <<EOF
5678 #line 5656 "configure"
5679 #include "confdefs.h"
5680
5681 int main() {
5682 main()
5683 ; return 0; }
5684 EOF
5685 if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5686   rm -rf conftest*
5687   eval "ac_cv_lib_$ac_lib_var=yes"
5688 else
5689   echo "configure: failed program was:" >&5
5690   cat conftest.$ac_ext >&5
5691   rm -rf conftest*
5692   eval "ac_cv_lib_$ac_lib_var=no"
5693 fi
5694 rm -f conftest*
5695 LIBS="$ac_save_LIBS"
5696
5697 fi
5698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5699   echo "$ac_t""yes" 1>&6
5700   
5701                 ol_link_isode=yes
5702                 cat >> confdefs.h <<\EOF
5703 #define HAVE_ISODE 1
5704 EOF
5705
5706                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5707                 
5708 else
5709   echo "$ac_t""no" 1>&6
5710 :
5711 fi
5712
5713 fi
5714
5715 if test $ol_link_isode != no; then
5716         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5717 echo "configure:5695: checking for main in -lpp" >&5
5718 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5720   echo $ac_n "(cached) $ac_c" 1>&6
5721 else
5722   ac_save_LIBS="$LIBS"
5723 LIBS="-lpp  $LIBS"
5724 cat > conftest.$ac_ext <<EOF
5725 #line 5703 "configure"
5726 #include "confdefs.h"
5727
5728 int main() {
5729 main()
5730 ; return 0; }
5731 EOF
5732 if { (eval echo configure:5710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5733   rm -rf conftest*
5734   eval "ac_cv_lib_$ac_lib_var=yes"
5735 else
5736   echo "configure: failed program was:" >&5
5737   cat conftest.$ac_ext >&5
5738   rm -rf conftest*
5739   eval "ac_cv_lib_$ac_lib_var=no"
5740 fi
5741 rm -f conftest*
5742 LIBS="$ac_save_LIBS"
5743
5744 fi
5745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5746   echo "$ac_t""yes" 1>&6
5747   
5748                 cat >> confdefs.h <<\EOF
5749 #define HAVE_PP 1
5750 EOF
5751
5752                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5753                 
5754 else
5755   echo "$ac_t""no" 1>&6
5756 :
5757 fi
5758
5759
5760         # Extract the first word of "pepsy", so it can be a program name with args.
5761 set dummy pepsy; ac_word=$2
5762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5763 echo "configure:5741: checking for $ac_word" >&5
5764 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5765   echo $ac_n "(cached) $ac_c" 1>&6
5766 else
5767   case "$PEPSY" in
5768   /*)
5769   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5770   ;;
5771   ?:/*)
5772   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5773   ;;
5774   *)
5775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5776   ac_dummy="$PATH"
5777   for ac_dir in $ac_dummy; do 
5778     test -z "$ac_dir" && ac_dir=.
5779     if test -f $ac_dir/$ac_word; then
5780       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5781       break
5782     fi
5783   done
5784   IFS="$ac_save_ifs"
5785   ;;
5786 esac
5787 fi
5788 PEPSY="$ac_cv_path_PEPSY"
5789 if test -n "$PEPSY"; then
5790   echo "$ac_t""$PEPSY" 1>&6
5791 else
5792   echo "$ac_t""no" 1>&6
5793 fi
5794
5795 fi
5796
5797 if test $ol_enable_quipu != no ; then
5798         for ac_hdr in quipu/commonarg.h
5799 do
5800 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5801 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5802 echo "configure:5780: checking for $ac_hdr" >&5
5803 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   cat > conftest.$ac_ext <<EOF
5807 #line 5785 "configure"
5808 #include "confdefs.h"
5809 #include <$ac_hdr>
5810 EOF
5811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5812 { (eval echo configure:5790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5814 if test -z "$ac_err"; then
5815   rm -rf conftest*
5816   eval "ac_cv_header_$ac_safe=yes"
5817 else
5818   echo "$ac_err" >&5
5819   echo "configure: failed program was:" >&5
5820   cat conftest.$ac_ext >&5
5821   rm -rf conftest*
5822   eval "ac_cv_header_$ac_safe=no"
5823 fi
5824 rm -f conftest*
5825 fi
5826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5827   echo "$ac_t""yes" 1>&6
5828     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5829   cat >> confdefs.h <<EOF
5830 #define $ac_tr_hdr 1
5831 EOF
5832  
5833 else
5834   echo "$ac_t""no" 1>&6
5835 fi
5836 done
5837
5838
5839         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5840                 BUILD_QUIPU=yes
5841         elif test $ol_enable_quipu = auto ; then
5842                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5843         else
5844                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5845         fi
5846 fi
5847
5848 ol_link_kerberos=no
5849
5850 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5851         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5852 do
5853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5855 echo "configure:5833: checking for $ac_hdr" >&5
5856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5857   echo $ac_n "(cached) $ac_c" 1>&6
5858 else
5859   cat > conftest.$ac_ext <<EOF
5860 #line 5838 "configure"
5861 #include "confdefs.h"
5862 #include <$ac_hdr>
5863 EOF
5864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5865 { (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5867 if test -z "$ac_err"; then
5868   rm -rf conftest*
5869   eval "ac_cv_header_$ac_safe=yes"
5870 else
5871   echo "$ac_err" >&5
5872   echo "configure: failed program was:" >&5
5873   cat conftest.$ac_ext >&5
5874   rm -rf conftest*
5875   eval "ac_cv_header_$ac_safe=no"
5876 fi
5877 rm -f conftest*
5878 fi
5879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5880   echo "$ac_t""yes" 1>&6
5881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5882   cat >> confdefs.h <<EOF
5883 #define $ac_tr_hdr 1
5884 EOF
5885  
5886 else
5887   echo "$ac_t""no" 1>&6
5888 fi
5889 done
5890
5891
5892         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5893                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5894 echo "configure:5872: checking for main in -lkrb4" >&5
5895 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5897   echo $ac_n "(cached) $ac_c" 1>&6
5898 else
5899   ac_save_LIBS="$LIBS"
5900 LIBS="-lkrb4 -lkrb5 -ldes425 -lcrypto -lcom_err $LIBS"
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5880 "configure"
5903 #include "confdefs.h"
5904
5905 int main() {
5906 main()
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_lib_$ac_lib_var=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_lib_$ac_lib_var=no"
5917 fi
5918 rm -f conftest*
5919 LIBS="$ac_save_LIBS"
5920
5921 fi
5922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5923   echo "$ac_t""yes" 1>&6
5924   have_k5=yes
5925 else
5926   echo "$ac_t""no" 1>&6
5927 have_k5=no
5928 fi
5929
5930
5931                 if test $have_k5 = yes ; then
5932                         ol_with_kerberos=found
5933                         ol_link_kerberos=yes
5934
5935                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425 -lcrypto -lcom_err"
5936
5937                         LIBS="$KRB_LIBS $LIBS"
5938
5939                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5940 echo "configure:5918: checking for des_debug in Kerberos libraries" >&5
5941 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5942   echo $ac_n "(cached) $ac_c" 1>&6
5943 else
5944   
5945                                                                 save_LIBS="$LIBS"
5946                                 LIBS="$KRB_LIBS $LIBS"
5947                                 cat > conftest.$ac_ext <<EOF
5948 #line 5926 "configure"
5949 #include "confdefs.h"
5950
5951 #include <kerberosIV/krb.h>
5952 #include <kerberosIV/des.h>
5953 extern int des_debug;
5954
5955 int main() {
5956
5957 des_debug = 1;
5958
5959 ; return 0; }
5960 EOF
5961 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5962   rm -rf conftest*
5963   ol_cv_var_des_debug=yes
5964 else
5965   echo "configure: failed program was:" >&5
5966   cat conftest.$ac_ext >&5
5967   rm -rf conftest*
5968   ol_cv_var_des_debug=no
5969 fi
5970 rm -f conftest*
5971                                                                 LIBS="$save_LIBS"
5972                         
5973 fi
5974
5975 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5976
5977                         if test $ol_cv_var_des_debug = yes ; then
5978                                 cat >> confdefs.h <<\EOF
5979 #define HAVE_DES_DEBUG 1
5980 EOF
5981
5982                         fi
5983
5984                         LIBS="$save_LIBS"
5985                 fi
5986         fi
5987 fi
5988
5989 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
5990         -o $ol_with_kerberos = kth ; then
5991
5992         for ac_hdr in krb.h des.h krb-archaeology.h 
5993 do
5994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5996 echo "configure:5974: checking for $ac_hdr" >&5
5997 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5998   echo $ac_n "(cached) $ac_c" 1>&6
5999 else
6000   cat > conftest.$ac_ext <<EOF
6001 #line 5979 "configure"
6002 #include "confdefs.h"
6003 #include <$ac_hdr>
6004 EOF
6005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6006 { (eval echo configure:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6008 if test -z "$ac_err"; then
6009   rm -rf conftest*
6010   eval "ac_cv_header_$ac_safe=yes"
6011 else
6012   echo "$ac_err" >&5
6013   echo "configure: failed program was:" >&5
6014   cat conftest.$ac_ext >&5
6015   rm -rf conftest*
6016   eval "ac_cv_header_$ac_safe=no"
6017 fi
6018 rm -f conftest*
6019 fi
6020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6021   echo "$ac_t""yes" 1>&6
6022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6023   cat >> confdefs.h <<EOF
6024 #define $ac_tr_hdr 1
6025 EOF
6026  
6027 else
6028   echo "$ac_t""no" 1>&6
6029 fi
6030 done
6031
6032
6033         if test $ac_cv_header_krb_h = yes ; then
6034                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6035 echo "configure:6013: checking for main in -lkrb" >&5
6036 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6038   echo $ac_n "(cached) $ac_c" 1>&6
6039 else
6040   ac_save_LIBS="$LIBS"
6041 LIBS="-lkrb -ldes $LIBS"
6042 cat > conftest.$ac_ext <<EOF
6043 #line 6021 "configure"
6044 #include "confdefs.h"
6045
6046 int main() {
6047 main()
6048 ; return 0; }
6049 EOF
6050 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6051   rm -rf conftest*
6052   eval "ac_cv_lib_$ac_lib_var=yes"
6053 else
6054   echo "configure: failed program was:" >&5
6055   cat conftest.$ac_ext >&5
6056   rm -rf conftest*
6057   eval "ac_cv_lib_$ac_lib_var=no"
6058 fi
6059 rm -f conftest*
6060 LIBS="$ac_save_LIBS"
6061
6062 fi
6063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6064   echo "$ac_t""yes" 1>&6
6065   have_k4=yes
6066 else
6067   echo "$ac_t""no" 1>&6
6068 have_k4=no
6069 fi
6070
6071
6072                 if test $have_k4 = yes ; then
6073                         ol_with_kerberos=found
6074                         ol_link_kerberos=yes
6075
6076                         KRB_LIBS="-lkrb -ldes"
6077
6078                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6079                                 cat >> confdefs.h <<\EOF
6080 #define HAVE_KTH_KERBEROS 1
6081 EOF
6082
6083                         fi
6084                 fi
6085         fi
6086 fi
6087
6088 if test $ol_link_kerberos = yes ; then
6089         cat >> confdefs.h <<\EOF
6090 #define HAVE_KERBEROS 1
6091 EOF
6092
6093
6094 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6095         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6096 fi
6097
6098 ol_link_tls=no
6099 if test $ol_with_tls != no ; then
6100         
6101         for ac_hdr in openssl/ssl.h ssl.h
6102 do
6103 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6104 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6105 echo "configure:6083: checking for $ac_hdr" >&5
6106 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6107   echo $ac_n "(cached) $ac_c" 1>&6
6108 else
6109   cat > conftest.$ac_ext <<EOF
6110 #line 6088 "configure"
6111 #include "confdefs.h"
6112 #include <$ac_hdr>
6113 EOF
6114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6115 { (eval echo configure:6093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6117 if test -z "$ac_err"; then
6118   rm -rf conftest*
6119   eval "ac_cv_header_$ac_safe=yes"
6120 else
6121   echo "$ac_err" >&5
6122   echo "configure: failed program was:" >&5
6123   cat conftest.$ac_ext >&5
6124   rm -rf conftest*
6125   eval "ac_cv_header_$ac_safe=no"
6126 fi
6127 rm -f conftest*
6128 fi
6129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6130   echo "$ac_t""yes" 1>&6
6131     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6132   cat >> confdefs.h <<EOF
6133 #define $ac_tr_hdr 1
6134 EOF
6135  
6136 else
6137   echo "$ac_t""no" 1>&6
6138 fi
6139 done
6140
6141         
6142         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6143                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6144 echo "configure:6122: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6145 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6147   echo $ac_n "(cached) $ac_c" 1>&6
6148 else
6149   ac_save_LIBS="$LIBS"
6150 LIBS="-lssl -lcrypto $LIBS"
6151 cat > conftest.$ac_ext <<EOF
6152 #line 6130 "configure"
6153 #include "confdefs.h"
6154 /* Override any gcc2 internal prototype to avoid an error.  */
6155 /* We use char because int might match the return type of a gcc2
6156     builtin and then its argument prototype would still apply.  */
6157 char SSLeay_add_ssl_algorithms();
6158
6159 int main() {
6160 SSLeay_add_ssl_algorithms()
6161 ; return 0; }
6162 EOF
6163 if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6164   rm -rf conftest*
6165   eval "ac_cv_lib_$ac_lib_var=yes"
6166 else
6167   echo "configure: failed program was:" >&5
6168   cat conftest.$ac_ext >&5
6169   rm -rf conftest*
6170   eval "ac_cv_lib_$ac_lib_var=no"
6171 fi
6172 rm -f conftest*
6173 LIBS="$ac_save_LIBS"
6174
6175 fi
6176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6177   echo "$ac_t""yes" 1>&6
6178   have_ssleay=yes
6179                         need_rsaref=no
6180 else
6181   echo "$ac_t""no" 1>&6
6182 have_ssleay=no
6183 fi
6184
6185                         
6186                 if test $have_ssleay = no ; then
6187                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6188 echo "configure:6166: checking for SSL_library_init in -lssl" >&5
6189 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6191   echo $ac_n "(cached) $ac_c" 1>&6
6192 else
6193   ac_save_LIBS="$LIBS"
6194 LIBS="-lssl -lcrypto $LIBS"
6195 cat > conftest.$ac_ext <<EOF
6196 #line 6174 "configure"
6197 #include "confdefs.h"
6198 /* Override any gcc2 internal prototype to avoid an error.  */
6199 /* We use char because int might match the return type of a gcc2
6200     builtin and then its argument prototype would still apply.  */
6201 char SSL_library_init();
6202
6203 int main() {
6204 SSL_library_init()
6205 ; return 0; }
6206 EOF
6207 if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6208   rm -rf conftest*
6209   eval "ac_cv_lib_$ac_lib_var=yes"
6210 else
6211   echo "configure: failed program was:" >&5
6212   cat conftest.$ac_ext >&5
6213   rm -rf conftest*
6214   eval "ac_cv_lib_$ac_lib_var=no"
6215 fi
6216 rm -f conftest*
6217 LIBS="$ac_save_LIBS"
6218
6219 fi
6220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6221   echo "$ac_t""yes" 1>&6
6222   have_ssleay=yes
6223                                 need_rsaref=no
6224 else
6225   echo "$ac_t""no" 1>&6
6226 have_ssleay=no
6227 fi
6228
6229                 fi
6230
6231                 if test $have_ssleay = no ; then
6232                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6233 echo "configure:6211: checking for ssl3_accept in -lssl" >&5
6234 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6236   echo $ac_n "(cached) $ac_c" 1>&6
6237 else
6238   ac_save_LIBS="$LIBS"
6239 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6240 cat > conftest.$ac_ext <<EOF
6241 #line 6219 "configure"
6242 #include "confdefs.h"
6243 /* Override any gcc2 internal prototype to avoid an error.  */
6244 /* We use char because int might match the return type of a gcc2
6245     builtin and then its argument prototype would still apply.  */
6246 char ssl3_accept();
6247
6248 int main() {
6249 ssl3_accept()
6250 ; return 0; }
6251 EOF
6252 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6253   rm -rf conftest*
6254   eval "ac_cv_lib_$ac_lib_var=yes"
6255 else
6256   echo "configure: failed program was:" >&5
6257   cat conftest.$ac_ext >&5
6258   rm -rf conftest*
6259   eval "ac_cv_lib_$ac_lib_var=no"
6260 fi
6261 rm -f conftest*
6262 LIBS="$ac_save_LIBS"
6263
6264 fi
6265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6266   echo "$ac_t""yes" 1>&6
6267   have_ssleay=yes
6268                                 need_rsaref=yes
6269 else
6270   echo "$ac_t""no" 1>&6
6271 have_ssleay=no
6272 fi
6273
6274                 fi
6275
6276                 if test $have_ssleay = yes ; then
6277                         ol_with_tls=found
6278                         ol_link_tls=yes
6279
6280                         cat >> confdefs.h <<\EOF
6281 #define HAVE_SSLEAY 1
6282 EOF
6283
6284
6285                         if test $need_rsaref = yes; then
6286                                 cat >> confdefs.h <<\EOF
6287 #define HAVE_RSAREF 1
6288 EOF
6289
6290
6291                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6292                         else
6293                                 TLS_LIBS="-lssl -lcrypto"
6294                         fi
6295                 fi
6296         fi
6297 fi
6298
6299 if test $ol_link_tls = yes ; then
6300         cat >> confdefs.h <<\EOF
6301 #define HAVE_TLS 1
6302 EOF
6303
6304 fi      
6305
6306 for ac_func in \
6307         ctime_r                 \
6308         gethostbyname_r gethostbyaddr_r \
6309
6310 do
6311 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6312 echo "configure:6290: checking for $ac_func" >&5
6313 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6314   echo $ac_n "(cached) $ac_c" 1>&6
6315 else
6316   cat > conftest.$ac_ext <<EOF
6317 #line 6295 "configure"
6318 #include "confdefs.h"
6319 /* System header to define __stub macros and hopefully few prototypes,
6320     which can conflict with char $ac_func(); below.  */
6321 #include <assert.h>
6322 /* Override any gcc2 internal prototype to avoid an error.  */
6323 /* We use char because int might match the return type of a gcc2
6324     builtin and then its argument prototype would still apply.  */
6325 char $ac_func();
6326 char (*f)();
6327
6328 int main() {
6329
6330 /* The GNU C library defines this for functions which it implements
6331     to always fail with ENOSYS.  Some functions are actually named
6332     something starting with __ and the normal name is an alias.  */
6333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6334 choke me
6335 #else
6336 f = $ac_func;
6337 #endif
6338
6339 ; return 0; }
6340 EOF
6341 if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6342   rm -rf conftest*
6343   eval "ac_cv_func_$ac_func=yes"
6344 else
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   eval "ac_cv_func_$ac_func=no"
6349 fi
6350 rm -f conftest*
6351 fi
6352
6353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6354   echo "$ac_t""yes" 1>&6
6355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6356   cat >> confdefs.h <<EOF
6357 #define $ac_tr_func 1
6358 EOF
6359  
6360 else
6361   echo "$ac_t""no" 1>&6
6362 fi
6363 done
6364
6365
6366 if test "$ac_cv_func_ctime_r" = no ; then
6367         ol_cv_func_ctime_r_nargs=0
6368 else
6369         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6370 echo "configure:6348: checking number of arguments of ctime_r" >&5
6371 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6372   echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6353 "configure"
6376 #include "confdefs.h"
6377 #include <time.h>
6378 int main() {
6379 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6380 ; return 0; }
6381 EOF
6382 if { (eval echo configure:6360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6383   rm -rf conftest*
6384   ol_cv_func_ctime_r_nargs3=yes
6385 else
6386   echo "configure: failed program was:" >&5
6387   cat conftest.$ac_ext >&5
6388   rm -rf conftest*
6389   ol_cv_func_ctime_r_nargs3=no
6390 fi
6391 rm -f conftest*
6392
6393         cat > conftest.$ac_ext <<EOF
6394 #line 6372 "configure"
6395 #include "confdefs.h"
6396 #include <time.h>
6397 int main() {
6398 time_t ti; char *buffer; ctime_r(&ti,buffer);
6399 ; return 0; }
6400 EOF
6401 if { (eval echo configure:6379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6402   rm -rf conftest*
6403   ol_cv_func_ctime_r_nargs2=yes
6404 else
6405   echo "configure: failed program was:" >&5
6406   cat conftest.$ac_ext >&5
6407   rm -rf conftest*
6408   ol_cv_func_ctime_r_nargs2=no
6409 fi
6410 rm -f conftest*
6411
6412         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6413                 $ol_cv_func_ctime_r_nargs2 = no ; then
6414
6415                 ol_cv_func_ctime_r_nargs=3
6416
6417         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6418                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6419
6420                 ol_cv_func_ctime_r_nargs=2
6421
6422         else
6423                 ol_cv_func_ctime_r_nargs=0
6424         fi
6425   
6426 fi
6427
6428 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6429
6430   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6431         cat >> confdefs.h <<EOF
6432 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6433 EOF
6434
6435   fi
6436
6437 fi
6438
6439 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6440         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6441 echo "configure:6419: checking number of arguments of gethostbyname_r" >&5
6442 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6443   echo $ac_n "(cached) $ac_c" 1>&6
6444 else
6445   cat > conftest.$ac_ext <<EOF
6446 #line 6424 "configure"
6447 #include "confdefs.h"
6448 #include <sys/types.h>
6449 #include <sys/socket.h>
6450 #include <netinet/in.h>
6451 #include <netdb.h>
6452 #define BUFSIZE (sizeof(struct hostent)+10)
6453 int main() {
6454 struct hostent hent; char buffer[BUFSIZE];
6455                 int bufsize=BUFSIZE;int h_errno;
6456                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6457                         buffer, bufsize, &h_errno);
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6461   rm -rf conftest*
6462   ol_cv_func_gethostbyname_r_nargs5=yes
6463 else
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   ol_cv_func_gethostbyname_r_nargs5=no
6468 fi
6469 rm -f conftest*
6470
6471         cat > conftest.$ac_ext <<EOF
6472 #line 6450 "configure"
6473 #include "confdefs.h"
6474 #include <sys/types.h>
6475 #include <sys/socket.h>
6476 #include <netinet/in.h>
6477 #include <netdb.h>
6478 #define BUFSIZE (sizeof(struct hostent)+10)
6479 int main() {
6480 struct hostent hent;struct hostent *rhent;
6481                 char buffer[BUFSIZE];
6482                 int bufsize=BUFSIZE;int h_errno;
6483                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6484                         &rhent, &h_errno);
6485 ; return 0; }
6486 EOF
6487 if { (eval echo configure:6465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6488   rm -rf conftest*
6489   ol_cv_func_gethostbyname_r_nargs6=yes
6490 else
6491   echo "configure: failed program was:" >&5
6492   cat conftest.$ac_ext >&5
6493   rm -rf conftest*
6494   ol_cv_func_gethostbyname_r_nargs6=no
6495 fi
6496 rm -f conftest*
6497
6498         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6499                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6500
6501                 ol_cv_func_gethostbyname_r_nargs=5
6502
6503         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6504                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6505
6506                 ol_cv_func_gethostbyname_r_nargs=6
6507
6508         else
6509                 ol_cv_func_gethostbyname_r_nargs=0
6510         fi
6511   
6512 fi
6513
6514 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6515   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6516         cat >> confdefs.h <<EOF
6517 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6518 EOF
6519
6520   fi
6521
6522 else
6523         ol_cv_func_gethostbyname_r_nargs=0
6524 fi
6525  
6526 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6527         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6528 echo "configure:6506: checking number of arguments of gethostbyaddr_r" >&5
6529 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6530   echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532   cat > conftest.$ac_ext <<EOF
6533 #line 6511 "configure"
6534 #include "confdefs.h"
6535 #include <sys/types.h>
6536 #include <sys/socket.h>
6537 #include <netinet/in.h>
6538 #include <netdb.h>
6539 #define BUFSIZE (sizeof(struct hostent)+10)
6540 int main() {
6541 struct hostent hent; char buffer[BUFSIZE]; 
6542             struct in_addr add;
6543             size_t alen=sizeof(struct in_addr);
6544             int bufsize=BUFSIZE;int h_errno;
6545                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6546                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6547 ; return 0; }
6548 EOF
6549 if { (eval echo configure:6527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6550   rm -rf conftest*
6551   ol_cv_func_gethostbyaddr_r_nargs7=yes
6552 else
6553   echo "configure: failed program was:" >&5
6554   cat conftest.$ac_ext >&5
6555   rm -rf conftest*
6556   ol_cv_func_gethostbyaddr_r_nargs7=no
6557 fi
6558 rm -f conftest*
6559
6560         cat > conftest.$ac_ext <<EOF
6561 #line 6539 "configure"
6562 #include "confdefs.h"
6563 #include <sys/types.h>
6564 #include <sys/socket.h>
6565 #include <netinet/in.h>
6566 #include <netdb.h>
6567 #define BUFSIZE (sizeof(struct hostent)+10)
6568 int main() {
6569 struct hostent hent;
6570                 struct hostent *rhent; char buffer[BUFSIZE]; 
6571                 struct in_addr add;
6572                 size_t alen=sizeof(struct in_addr);
6573                 int bufsize=BUFSIZE;int h_errno;
6574                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6575                         alen, AF_INET, &hent, buffer, bufsize, 
6576                         &rhent, &h_errno);
6577 ; return 0; }
6578 EOF
6579 if { (eval echo configure:6557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6580   rm -rf conftest*
6581   ol_cv_func_gethostbyaddr_r_nargs8=yes
6582 else
6583   echo "configure: failed program was:" >&5
6584   cat conftest.$ac_ext >&5
6585   rm -rf conftest*
6586   ol_cv_func_gethostbyaddr_r_nargs8=no
6587 fi
6588 rm -f conftest*
6589
6590         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6591                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6592
6593                 ol_cv_func_gethostbyaddr_r_nargs=7
6594
6595         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6596                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6597
6598                 ol_cv_func_gethostbyaddr_r_nargs=8
6599
6600         else
6601                 ol_cv_func_gethostbyaddr_r_nargs=0
6602         fi
6603   
6604 fi
6605
6606 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6607   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6608     cat >> confdefs.h <<EOF
6609 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6610 EOF
6611
6612   fi
6613
6614 else
6615         ol_cv_func_gethostbyaddr_r_nargs=0
6616 fi
6617
6618 if test "$ac_cv_func_ctime_r" = yes \
6619         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6620         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6621         -a "$ac_cv_func_gethostbyname_r" = yes \
6622         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6623         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6624         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6625         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6626         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6627         ; then
6628  
6629         cat >> confdefs.h <<\EOF
6630 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6631 EOF
6632
6633 fi
6634
6635 ol_link_threads=no
6636
6637 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6638         -o $ol_with_threads = nt ; then
6639
6640         
6641         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6642 echo "configure:6620: checking for NT Threads" >&5
6643 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6644   echo $ac_n "(cached) $ac_c" 1>&6
6645 else
6646   
6647                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6648 echo "configure:6626: checking for _beginthread" >&5
6649 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6650   echo $ac_n "(cached) $ac_c" 1>&6
6651 else
6652   cat > conftest.$ac_ext <<EOF
6653 #line 6631 "configure"
6654 #include "confdefs.h"
6655 /* System header to define __stub macros and hopefully few prototypes,
6656     which can conflict with char _beginthread(); below.  */
6657 #include <assert.h>
6658 /* Override any gcc2 internal prototype to avoid an error.  */
6659 /* We use char because int might match the return type of a gcc2
6660     builtin and then its argument prototype would still apply.  */
6661 char _beginthread();
6662 char (*f)();
6663
6664 int main() {
6665
6666 /* The GNU C library defines this for functions which it implements
6667     to always fail with ENOSYS.  Some functions are actually named
6668     something starting with __ and the normal name is an alias.  */
6669 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6670 choke me
6671 #else
6672 f = _beginthread;
6673 #endif
6674
6675 ; return 0; }
6676 EOF
6677 if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6678   rm -rf conftest*
6679   eval "ac_cv_func__beginthread=yes"
6680 else
6681   echo "configure: failed program was:" >&5
6682   cat conftest.$ac_ext >&5
6683   rm -rf conftest*
6684   eval "ac_cv_func__beginthread=no"
6685 fi
6686 rm -f conftest*
6687 fi
6688
6689 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6690   echo "$ac_t""yes" 1>&6
6691   ol_cv_nt_threads=yes
6692 else
6693   echo "$ac_t""no" 1>&6
6694 ol_cv_nt_threads=no
6695 fi
6696
6697         
6698 fi
6699
6700 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6701
6702         if test $ol_cv_nt_threads = yes ; then
6703                 cat >> confdefs.h <<\EOF
6704 #define HAVE_NT_THREADS 1
6705 EOF
6706
6707         fi
6708
6709
6710         if test "$ol_cv_nt_threads" = yes ; then
6711         ol_link_threads=nt
6712         ol_with_threads=found
6713         ol_with_yielding_select=yes
6714
6715                 cat >> confdefs.h <<\EOF
6716 #define HAVE_NT_SERVICE_MANAGER 1
6717 EOF
6718
6719                 cat >> confdefs.h <<\EOF
6720 #define HAVE_NT_EVENT_LOG 1
6721 EOF
6722
6723         fi
6724
6725         if test $ol_with_threads = nt ; then
6726                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6727         fi
6728 fi
6729
6730 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6731         -o $ol_with_threads = posix ; then
6732
6733         for ac_hdr in pthread.h
6734 do
6735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6737 echo "configure:6715: checking for $ac_hdr" >&5
6738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   cat > conftest.$ac_ext <<EOF
6742 #line 6720 "configure"
6743 #include "confdefs.h"
6744 #include <$ac_hdr>
6745 EOF
6746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6747 { (eval echo configure:6725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6749 if test -z "$ac_err"; then
6750   rm -rf conftest*
6751   eval "ac_cv_header_$ac_safe=yes"
6752 else
6753   echo "$ac_err" >&5
6754   echo "configure: failed program was:" >&5
6755   cat conftest.$ac_ext >&5
6756   rm -rf conftest*
6757   eval "ac_cv_header_$ac_safe=no"
6758 fi
6759 rm -f conftest*
6760 fi
6761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6762   echo "$ac_t""yes" 1>&6
6763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6764   cat >> confdefs.h <<EOF
6765 #define $ac_tr_hdr 1
6766 EOF
6767  
6768 else
6769   echo "$ac_t""no" 1>&6
6770 fi
6771 done
6772
6773
6774         if test $ac_cv_header_pthread_h = yes ; then
6775                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6776 echo "configure:6754: checking POSIX thread version" >&5
6777 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6778   echo $ac_n "(cached) $ac_c" 1>&6
6779 else
6780   
6781         cat > conftest.$ac_ext <<EOF
6782 #line 6760 "configure"
6783 #include "confdefs.h"
6784
6785 #               include <pthread.h>
6786                 /* this check could be improved */
6787 #               ifdef PTHREAD_ONCE_INIT
6788                         pthread_version_final;
6789 #               endif
6790         
6791 EOF
6792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6793   egrep "pthread_version_final" >/dev/null 2>&1; then
6794   rm -rf conftest*
6795   ol_pthread_final=yes
6796 else
6797   rm -rf conftest*
6798   ol_pthread_final=no
6799 fi
6800 rm -f conftest*
6801
6802
6803         cat > conftest.$ac_ext <<EOF
6804 #line 6782 "configure"
6805 #include "confdefs.h"
6806
6807 #               include <pthread.h>
6808                 /* this check could be improved */
6809 #               ifdef pthread_once_init
6810                         pthread_version_draft4;
6811 #               endif
6812         
6813 EOF
6814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6815   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6816   rm -rf conftest*
6817   ol_pthread_draft4=yes
6818 else
6819   rm -rf conftest*
6820   ol_pthread_draft4=no
6821 fi
6822 rm -f conftest*
6823
6824
6825         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6826                 ol_cv_pthread_version=final
6827         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6828                 ol_cv_pthread_version=draft4
6829         else
6830                 ol_cv_pthread_version=unknown
6831         fi
6832
6833 fi
6834
6835 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6836
6837
6838                 if test $ol_cv_pthread_version = final ; then
6839                         cat >> confdefs.h <<\EOF
6840 #define HAVE_PTHREADS_FINAL 1
6841 EOF
6842
6843                 elif test $ol_cv_pthread_version = draft4 ; then
6844                         cat >> confdefs.h <<\EOF
6845 #define HAVE_PTHREADS_D4 1
6846 EOF
6847
6848                 else
6849                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6850                 fi
6851
6852                 # consider threads found
6853                 ol_with_threads=found
6854
6855                 
6856         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6857 echo "configure:6835: checking for LinuxThreads pthread.h" >&5
6858 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861   cat > conftest.$ac_ext <<EOF
6862 #line 6840 "configure"
6863 #include "confdefs.h"
6864 #include <pthread.h>
6865 EOF
6866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6867   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6868   rm -rf conftest*
6869   ol_cv_header_linux_threads=yes
6870 else
6871   rm -rf conftest*
6872   ol_cv_header_linux_threads=no
6873 fi
6874 rm -f conftest*
6875
6876                 
6877 fi
6878
6879 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6880         if test $ol_cv_header_linux_threads = yes; then
6881                 cat >> confdefs.h <<\EOF
6882 #define HAVE_LINUX_THREADS 1
6883 EOF
6884
6885         fi
6886
6887                 
6888         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6889 echo "configure:6867: checking for GNU Pth pthread.h" >&5
6890 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6891   echo $ac_n "(cached) $ac_c" 1>&6
6892 else
6893   cat > conftest.$ac_ext <<EOF
6894 #line 6872 "configure"
6895 #include "confdefs.h"
6896 #include <pthread.h>
6897 #ifdef _POSIX_THREAD_IS_GNU_PTH
6898         __gnu_pth__;
6899 #endif
6900
6901 EOF
6902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6903   egrep "__gnu_pth__" >/dev/null 2>&1; then
6904   rm -rf conftest*
6905   ol_cv_header_gnu_pth_pthread_h=yes
6906 else
6907   rm -rf conftest*
6908   ol_cv_header_gnu_pth_pthread_h=no
6909 fi
6910 rm -f conftest*
6911
6912                 
6913 fi
6914
6915 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6916
6917
6918                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6919                         for ac_hdr in sched.h
6920 do
6921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6923 echo "configure:6901: checking for $ac_hdr" >&5
6924 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6925   echo $ac_n "(cached) $ac_c" 1>&6
6926 else
6927   cat > conftest.$ac_ext <<EOF
6928 #line 6906 "configure"
6929 #include "confdefs.h"
6930 #include <$ac_hdr>
6931 EOF
6932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6933 { (eval echo configure:6911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6935 if test -z "$ac_err"; then
6936   rm -rf conftest*
6937   eval "ac_cv_header_$ac_safe=yes"
6938 else
6939   echo "$ac_err" >&5
6940   echo "configure: failed program was:" >&5
6941   cat conftest.$ac_ext >&5
6942   rm -rf conftest*
6943   eval "ac_cv_header_$ac_safe=no"
6944 fi
6945 rm -f conftest*
6946 fi
6947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6948   echo "$ac_t""yes" 1>&6
6949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6950   cat >> confdefs.h <<EOF
6951 #define $ac_tr_hdr 1
6952 EOF
6953  
6954 else
6955   echo "$ac_t""no" 1>&6
6956 fi
6957 done
6958
6959                 fi
6960
6961                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6962                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6963 echo "configure:6941: checking for pthread_create in default libraries" >&5
6964 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6965   echo $ac_n "(cached) $ac_c" 1>&6
6966 else
6967   
6968                 if test "$cross_compiling" = yes; then
6969   cat > conftest.$ac_ext <<EOF
6970 #line 6948 "configure"
6971 #include "confdefs.h"
6972 /* pthread test headers */
6973 #include <pthread.h>
6974 #ifndef NULL
6975 #define NULL (void*)0
6976 #endif
6977
6978 static void *task(p)
6979         void *p;
6980 {
6981         return (void *) (p == NULL);
6982 }
6983
6984 int main() {
6985
6986         /* pthread test function */
6987         pthread_t t;
6988         int status;
6989
6990         /* make sure pthread_create() isn't just a stub */
6991 #if HAVE_PTHREADS_D4
6992         status = pthread_create(&t, pthread_attr_default, task, NULL);
6993 #else
6994         status = pthread_create(&t, NULL, task, NULL);
6995 #endif
6996
6997         if( status ) exit( status );
6998
6999         /* make sure pthread_detach() isn't just a stub */
7000 #if HAVE_PTHREADS_D4
7001         status = pthread_detach( &t );
7002 #else
7003         status = pthread_detach( t );
7004 #endif
7005
7006 #ifdef HAVE_LINUX_THREADS
7007         pthread_kill_other_threads_np();
7008 #endif
7009
7010         exit( status );
7011
7012 ; return 0; }
7013 EOF
7014 if { (eval echo configure:6992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7015   rm -rf conftest*
7016   ol_cv_pthread_create=yes
7017 else
7018   echo "configure: failed program was:" >&5
7019   cat conftest.$ac_ext >&5
7020   rm -rf conftest*
7021   ol_cv_pthread_create=no
7022 fi
7023 rm -f conftest*
7024 else
7025   cat > conftest.$ac_ext <<EOF
7026 #line 7004 "configure"
7027 #include "confdefs.h"
7028 /* pthread test headers */
7029 #include <pthread.h>
7030 #ifndef NULL
7031 #define NULL (void*)0
7032 #endif
7033
7034 static void *task(p)
7035         void *p;
7036 {
7037         return (void *) (p == NULL);
7038 }
7039
7040
7041 int main(argc, argv)
7042         int argc;
7043         char **argv;
7044 {
7045
7046         /* pthread test function */
7047         pthread_t t;
7048         int status;
7049
7050         /* make sure pthread_create() isn't just a stub */
7051 #if HAVE_PTHREADS_D4
7052         status = pthread_create(&t, pthread_attr_default, task, NULL);
7053 #else
7054         status = pthread_create(&t, NULL, task, NULL);
7055 #endif
7056
7057         if( status ) exit( status );
7058
7059         /* make sure pthread_detach() isn't just a stub */
7060 #if HAVE_PTHREADS_D4
7061         status = pthread_detach( &t );
7062 #else
7063         status = pthread_detach( t );
7064 #endif
7065
7066 #ifdef HAVE_LINUX_THREADS
7067         pthread_kill_other_threads_np();
7068 #endif
7069
7070         exit( status );
7071
7072 }
7073
7074 EOF
7075 if { (eval echo configure:7053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7076 then
7077   ol_cv_pthread_create=yes
7078 else
7079   echo "configure: failed program was:" >&5
7080   cat conftest.$ac_ext >&5
7081   rm -fr conftest*
7082   ol_cv_pthread_create=no
7083 fi
7084 rm -fr conftest*
7085 fi
7086
7087 fi
7088
7089 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7090
7091                 if test $ol_cv_pthread_create != no ; then
7092                         ol_link_threads=posix
7093                         ol_link_pthreads=""
7094                 fi
7095                 
7096                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7097 if test "$ol_link_threads" = no ; then
7098         # try -kthread
7099         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7100 echo "configure:7078: checking for pthread link with -kthread" >&5
7101 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7102   echo $ac_n "(cached) $ac_c" 1>&6
7103 else
7104   
7105                 # save the flags
7106                 ol_LIBS="$LIBS"
7107                 LIBS="-kthread $LIBS"
7108
7109                 if test "$cross_compiling" = yes; then
7110   cat > conftest.$ac_ext <<EOF
7111 #line 7089 "configure"
7112 #include "confdefs.h"
7113 /* pthread test headers */
7114 #include <pthread.h>
7115 #ifndef NULL
7116 #define NULL (void*)0
7117 #endif
7118
7119 static void *task(p)
7120         void *p;
7121 {
7122         return (void *) (p == NULL);
7123 }
7124
7125 int main() {
7126
7127         /* pthread test function */
7128         pthread_t t;
7129         int status;
7130
7131         /* make sure pthread_create() isn't just a stub */
7132 #if HAVE_PTHREADS_D4
7133         status = pthread_create(&t, pthread_attr_default, task, NULL);
7134 #else
7135         status = pthread_create(&t, NULL, task, NULL);
7136 #endif
7137
7138         if( status ) exit( status );
7139
7140         /* make sure pthread_detach() isn't just a stub */
7141 #if HAVE_PTHREADS_D4
7142         status = pthread_detach( &t );
7143 #else
7144         status = pthread_detach( t );
7145 #endif
7146
7147 #ifdef HAVE_LINUX_THREADS
7148         pthread_kill_other_threads_np();
7149 #endif
7150
7151         exit( status );
7152
7153 ; return 0; }
7154 EOF
7155 if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7156   rm -rf conftest*
7157   ol_cv_pthread_kthread=yes
7158 else
7159   echo "configure: failed program was:" >&5
7160   cat conftest.$ac_ext >&5
7161   rm -rf conftest*
7162   ol_cv_pthread_kthread=no
7163 fi
7164 rm -f conftest*
7165 else
7166   cat > conftest.$ac_ext <<EOF
7167 #line 7145 "configure"
7168 #include "confdefs.h"
7169 /* pthread test headers */
7170 #include <pthread.h>
7171 #ifndef NULL
7172 #define NULL (void*)0
7173 #endif
7174
7175 static void *task(p)
7176         void *p;
7177 {
7178         return (void *) (p == NULL);
7179 }
7180
7181
7182 int main(argc, argv)
7183         int argc;
7184         char **argv;
7185 {
7186
7187         /* pthread test function */
7188         pthread_t t;
7189         int status;
7190
7191         /* make sure pthread_create() isn't just a stub */
7192 #if HAVE_PTHREADS_D4
7193         status = pthread_create(&t, pthread_attr_default, task, NULL);
7194 #else
7195         status = pthread_create(&t, NULL, task, NULL);
7196 #endif
7197
7198         if( status ) exit( status );
7199
7200         /* make sure pthread_detach() isn't just a stub */
7201 #if HAVE_PTHREADS_D4
7202         status = pthread_detach( &t );
7203 #else
7204         status = pthread_detach( t );
7205 #endif
7206
7207 #ifdef HAVE_LINUX_THREADS
7208         pthread_kill_other_threads_np();
7209 #endif
7210
7211         exit( status );
7212
7213 }
7214
7215 EOF
7216 if { (eval echo configure:7194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7217 then
7218   ol_cv_pthread_kthread=yes
7219 else
7220   echo "configure: failed program was:" >&5
7221   cat conftest.$ac_ext >&5
7222   rm -fr conftest*
7223   ol_cv_pthread_kthread=no
7224 fi
7225 rm -fr conftest*
7226 fi
7227
7228
7229                 # restore the LIBS
7230                 LIBS="$ol_LIBS"
7231         
7232 fi
7233
7234 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7235
7236         if test $ol_cv_pthread_kthread = yes ; then
7237                 ol_link_pthreads="-kthread"
7238                 ol_link_threads=posix
7239         fi
7240 fi
7241
7242                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7243 if test "$ol_link_threads" = no ; then
7244         # try -pthread
7245         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7246 echo "configure:7224: checking for pthread link with -pthread" >&5
7247 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7248   echo $ac_n "(cached) $ac_c" 1>&6
7249 else
7250   
7251                 # save the flags
7252                 ol_LIBS="$LIBS"
7253                 LIBS="-pthread $LIBS"
7254
7255                 if test "$cross_compiling" = yes; then
7256   cat > conftest.$ac_ext <<EOF
7257 #line 7235 "configure"
7258 #include "confdefs.h"
7259 /* pthread test headers */
7260 #include <pthread.h>
7261 #ifndef NULL
7262 #define NULL (void*)0
7263 #endif
7264
7265 static void *task(p)
7266         void *p;
7267 {
7268         return (void *) (p == NULL);
7269 }
7270
7271 int main() {
7272
7273         /* pthread test function */
7274         pthread_t t;
7275         int status;
7276
7277         /* make sure pthread_create() isn't just a stub */
7278 #if HAVE_PTHREADS_D4
7279         status = pthread_create(&t, pthread_attr_default, task, NULL);
7280 #else
7281         status = pthread_create(&t, NULL, task, NULL);
7282 #endif
7283
7284         if( status ) exit( status );
7285
7286         /* make sure pthread_detach() isn't just a stub */
7287 #if HAVE_PTHREADS_D4
7288         status = pthread_detach( &t );
7289 #else
7290         status = pthread_detach( t );
7291 #endif
7292
7293 #ifdef HAVE_LINUX_THREADS
7294         pthread_kill_other_threads_np();
7295 #endif
7296
7297         exit( status );
7298
7299 ; return 0; }
7300 EOF
7301 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7302   rm -rf conftest*
7303   ol_cv_pthread_pthread=yes
7304 else
7305   echo "configure: failed program was:" >&5
7306   cat conftest.$ac_ext >&5
7307   rm -rf conftest*
7308   ol_cv_pthread_pthread=no
7309 fi
7310 rm -f conftest*
7311 else
7312   cat > conftest.$ac_ext <<EOF
7313 #line 7291 "configure"
7314 #include "confdefs.h"
7315 /* pthread test headers */
7316 #include <pthread.h>
7317 #ifndef NULL
7318 #define NULL (void*)0
7319 #endif
7320
7321 static void *task(p)
7322         void *p;
7323 {
7324         return (void *) (p == NULL);
7325 }
7326
7327
7328 int main(argc, argv)
7329         int argc;
7330         char **argv;
7331 {
7332
7333         /* pthread test function */
7334         pthread_t t;
7335         int status;
7336
7337         /* make sure pthread_create() isn't just a stub */
7338 #if HAVE_PTHREADS_D4
7339         status = pthread_create(&t, pthread_attr_default, task, NULL);
7340 #else
7341         status = pthread_create(&t, NULL, task, NULL);
7342 #endif
7343
7344         if( status ) exit( status );
7345
7346         /* make sure pthread_detach() isn't just a stub */
7347 #if HAVE_PTHREADS_D4
7348         status = pthread_detach( &t );
7349 #else
7350         status = pthread_detach( t );
7351 #endif
7352
7353 #ifdef HAVE_LINUX_THREADS
7354         pthread_kill_other_threads_np();
7355 #endif
7356
7357         exit( status );
7358
7359 }
7360
7361 EOF
7362 if { (eval echo configure:7340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7363 then
7364   ol_cv_pthread_pthread=yes
7365 else
7366   echo "configure: failed program was:" >&5
7367   cat conftest.$ac_ext >&5
7368   rm -fr conftest*
7369   ol_cv_pthread_pthread=no
7370 fi
7371 rm -fr conftest*
7372 fi
7373
7374
7375                 # restore the LIBS
7376                 LIBS="$ol_LIBS"
7377         
7378 fi
7379
7380 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7381
7382         if test $ol_cv_pthread_pthread = yes ; then
7383                 ol_link_pthreads="-pthread"
7384                 ol_link_threads=posix
7385         fi
7386 fi
7387
7388                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7389 if test "$ol_link_threads" = no ; then
7390         # try -pthreads
7391         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7392 echo "configure:7370: checking for pthread link with -pthreads" >&5
7393 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   
7397                 # save the flags
7398                 ol_LIBS="$LIBS"
7399                 LIBS="-pthreads $LIBS"
7400
7401                 if test "$cross_compiling" = yes; then
7402   cat > conftest.$ac_ext <<EOF
7403 #line 7381 "configure"
7404 #include "confdefs.h"
7405 /* pthread test headers */
7406 #include <pthread.h>
7407 #ifndef NULL
7408 #define NULL (void*)0
7409 #endif
7410
7411 static void *task(p)
7412         void *p;
7413 {
7414         return (void *) (p == NULL);
7415 }
7416
7417 int main() {
7418
7419         /* pthread test function */
7420         pthread_t t;
7421         int status;
7422
7423         /* make sure pthread_create() isn't just a stub */
7424 #if HAVE_PTHREADS_D4
7425         status = pthread_create(&t, pthread_attr_default, task, NULL);
7426 #else
7427         status = pthread_create(&t, NULL, task, NULL);
7428 #endif
7429
7430         if( status ) exit( status );
7431
7432         /* make sure pthread_detach() isn't just a stub */
7433 #if HAVE_PTHREADS_D4
7434         status = pthread_detach( &t );
7435 #else
7436         status = pthread_detach( t );
7437 #endif
7438
7439 #ifdef HAVE_LINUX_THREADS
7440         pthread_kill_other_threads_np();
7441 #endif
7442
7443         exit( status );
7444
7445 ; return 0; }
7446 EOF
7447 if { (eval echo configure:7425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7448   rm -rf conftest*
7449   ol_cv_pthread_pthreads=yes
7450 else
7451   echo "configure: failed program was:" >&5
7452   cat conftest.$ac_ext >&5
7453   rm -rf conftest*
7454   ol_cv_pthread_pthreads=no
7455 fi
7456 rm -f conftest*
7457 else
7458   cat > conftest.$ac_ext <<EOF
7459 #line 7437 "configure"
7460 #include "confdefs.h"
7461 /* pthread test headers */
7462 #include <pthread.h>
7463 #ifndef NULL
7464 #define NULL (void*)0
7465 #endif
7466
7467 static void *task(p)
7468         void *p;
7469 {
7470         return (void *) (p == NULL);
7471 }
7472
7473
7474 int main(argc, argv)
7475         int argc;
7476         char **argv;
7477 {
7478
7479         /* pthread test function */
7480         pthread_t t;
7481         int status;
7482
7483         /* make sure pthread_create() isn't just a stub */
7484 #if HAVE_PTHREADS_D4
7485         status = pthread_create(&t, pthread_attr_default, task, NULL);
7486 #else
7487         status = pthread_create(&t, NULL, task, NULL);
7488 #endif
7489
7490         if( status ) exit( status );
7491
7492         /* make sure pthread_detach() isn't just a stub */
7493 #if HAVE_PTHREADS_D4
7494         status = pthread_detach( &t );
7495 #else
7496         status = pthread_detach( t );
7497 #endif
7498
7499 #ifdef HAVE_LINUX_THREADS
7500         pthread_kill_other_threads_np();
7501 #endif
7502
7503         exit( status );
7504
7505 }
7506
7507 EOF
7508 if { (eval echo configure:7486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7509 then
7510   ol_cv_pthread_pthreads=yes
7511 else
7512   echo "configure: failed program was:" >&5
7513   cat conftest.$ac_ext >&5
7514   rm -fr conftest*
7515   ol_cv_pthread_pthreads=no
7516 fi
7517 rm -fr conftest*
7518 fi
7519
7520
7521                 # restore the LIBS
7522                 LIBS="$ol_LIBS"
7523         
7524 fi
7525
7526 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7527
7528         if test $ol_cv_pthread_pthreads = yes ; then
7529                 ol_link_pthreads="-pthreads"
7530                 ol_link_threads=posix
7531         fi
7532 fi
7533
7534                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7535 if test "$ol_link_threads" = no ; then
7536         # try -mthreads
7537         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7538 echo "configure:7516: checking for pthread link with -mthreads" >&5
7539 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7540   echo $ac_n "(cached) $ac_c" 1>&6
7541 else
7542   
7543                 # save the flags
7544                 ol_LIBS="$LIBS"
7545                 LIBS="-mthreads $LIBS"
7546
7547                 if test "$cross_compiling" = yes; then
7548   cat > conftest.$ac_ext <<EOF
7549 #line 7527 "configure"
7550 #include "confdefs.h"
7551 /* pthread test headers */
7552 #include <pthread.h>
7553 #ifndef NULL
7554 #define NULL (void*)0
7555 #endif
7556
7557 static void *task(p)
7558         void *p;
7559 {
7560         return (void *) (p == NULL);
7561 }
7562
7563 int main() {
7564
7565         /* pthread test function */
7566         pthread_t t;
7567         int status;
7568
7569         /* make sure pthread_create() isn't just a stub */
7570 #if HAVE_PTHREADS_D4
7571         status = pthread_create(&t, pthread_attr_default, task, NULL);
7572 #else
7573         status = pthread_create(&t, NULL, task, NULL);
7574 #endif
7575
7576         if( status ) exit( status );
7577
7578         /* make sure pthread_detach() isn't just a stub */
7579 #if HAVE_PTHREADS_D4
7580         status = pthread_detach( &t );
7581 #else
7582         status = pthread_detach( t );
7583 #endif
7584
7585 #ifdef HAVE_LINUX_THREADS
7586         pthread_kill_other_threads_np();
7587 #endif
7588
7589         exit( status );
7590
7591 ; return 0; }
7592 EOF
7593 if { (eval echo configure:7571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7594   rm -rf conftest*
7595   ol_cv_pthread_mthreads=yes
7596 else
7597   echo "configure: failed program was:" >&5
7598   cat conftest.$ac_ext >&5
7599   rm -rf conftest*
7600   ol_cv_pthread_mthreads=no
7601 fi
7602 rm -f conftest*
7603 else
7604   cat > conftest.$ac_ext <<EOF
7605 #line 7583 "configure"
7606 #include "confdefs.h"
7607 /* pthread test headers */
7608 #include <pthread.h>
7609 #ifndef NULL
7610 #define NULL (void*)0
7611 #endif
7612
7613 static void *task(p)
7614         void *p;
7615 {
7616         return (void *) (p == NULL);
7617 }
7618
7619
7620 int main(argc, argv)
7621         int argc;
7622         char **argv;
7623 {
7624
7625         /* pthread test function */
7626         pthread_t t;
7627         int status;
7628
7629         /* make sure pthread_create() isn't just a stub */
7630 #if HAVE_PTHREADS_D4
7631         status = pthread_create(&t, pthread_attr_default, task, NULL);
7632 #else
7633         status = pthread_create(&t, NULL, task, NULL);
7634 #endif
7635
7636         if( status ) exit( status );
7637
7638         /* make sure pthread_detach() isn't just a stub */
7639 #if HAVE_PTHREADS_D4
7640         status = pthread_detach( &t );
7641 #else
7642         status = pthread_detach( t );
7643 #endif
7644
7645 #ifdef HAVE_LINUX_THREADS
7646         pthread_kill_other_threads_np();
7647 #endif
7648
7649         exit( status );
7650
7651 }
7652
7653 EOF
7654 if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7655 then
7656   ol_cv_pthread_mthreads=yes
7657 else
7658   echo "configure: failed program was:" >&5
7659   cat conftest.$ac_ext >&5
7660   rm -fr conftest*
7661   ol_cv_pthread_mthreads=no
7662 fi
7663 rm -fr conftest*
7664 fi
7665
7666
7667                 # restore the LIBS
7668                 LIBS="$ol_LIBS"
7669         
7670 fi
7671
7672 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7673
7674         if test $ol_cv_pthread_mthreads = yes ; then
7675                 ol_link_pthreads="-mthreads"
7676                 ol_link_threads=posix
7677         fi
7678 fi
7679
7680                 # Pthread try link: -thread (ol_cv_pthread_thread)
7681 if test "$ol_link_threads" = no ; then
7682         # try -thread
7683         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7684 echo "configure:7662: checking for pthread link with -thread" >&5
7685 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7686   echo $ac_n "(cached) $ac_c" 1>&6
7687 else
7688   
7689                 # save the flags
7690                 ol_LIBS="$LIBS"
7691                 LIBS="-thread $LIBS"
7692
7693                 if test "$cross_compiling" = yes; then
7694   cat > conftest.$ac_ext <<EOF
7695 #line 7673 "configure"
7696 #include "confdefs.h"
7697 /* pthread test headers */
7698 #include <pthread.h>
7699 #ifndef NULL
7700 #define NULL (void*)0
7701 #endif
7702
7703 static void *task(p)
7704         void *p;
7705 {
7706         return (void *) (p == NULL);
7707 }
7708
7709 int main() {
7710
7711         /* pthread test function */
7712         pthread_t t;
7713         int status;
7714
7715         /* make sure pthread_create() isn't just a stub */
7716 #if HAVE_PTHREADS_D4
7717         status = pthread_create(&t, pthread_attr_default, task, NULL);
7718 #else
7719         status = pthread_create(&t, NULL, task, NULL);
7720 #endif
7721
7722         if( status ) exit( status );
7723
7724         /* make sure pthread_detach() isn't just a stub */
7725 #if HAVE_PTHREADS_D4
7726         status = pthread_detach( &t );
7727 #else
7728         status = pthread_detach( t );
7729 #endif
7730
7731 #ifdef HAVE_LINUX_THREADS
7732         pthread_kill_other_threads_np();
7733 #endif
7734
7735         exit( status );
7736
7737 ; return 0; }
7738 EOF
7739 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7740   rm -rf conftest*
7741   ol_cv_pthread_thread=yes
7742 else
7743   echo "configure: failed program was:" >&5
7744   cat conftest.$ac_ext >&5
7745   rm -rf conftest*
7746   ol_cv_pthread_thread=no
7747 fi
7748 rm -f conftest*
7749 else
7750   cat > conftest.$ac_ext <<EOF
7751 #line 7729 "configure"
7752 #include "confdefs.h"
7753 /* pthread test headers */
7754 #include <pthread.h>
7755 #ifndef NULL
7756 #define NULL (void*)0
7757 #endif
7758
7759 static void *task(p)
7760         void *p;
7761 {
7762         return (void *) (p == NULL);
7763 }
7764
7765
7766 int main(argc, argv)
7767         int argc;
7768         char **argv;
7769 {
7770
7771         /* pthread test function */
7772         pthread_t t;
7773         int status;
7774
7775         /* make sure pthread_create() isn't just a stub */
7776 #if HAVE_PTHREADS_D4
7777         status = pthread_create(&t, pthread_attr_default, task, NULL);
7778 #else
7779         status = pthread_create(&t, NULL, task, NULL);
7780 #endif
7781
7782         if( status ) exit( status );
7783
7784         /* make sure pthread_detach() isn't just a stub */
7785 #if HAVE_PTHREADS_D4
7786         status = pthread_detach( &t );
7787 #else
7788         status = pthread_detach( t );
7789 #endif
7790
7791 #ifdef HAVE_LINUX_THREADS
7792         pthread_kill_other_threads_np();
7793 #endif
7794
7795         exit( status );
7796
7797 }
7798
7799 EOF
7800 if { (eval echo configure:7778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7801 then
7802   ol_cv_pthread_thread=yes
7803 else
7804   echo "configure: failed program was:" >&5
7805   cat conftest.$ac_ext >&5
7806   rm -fr conftest*
7807   ol_cv_pthread_thread=no
7808 fi
7809 rm -fr conftest*
7810 fi
7811
7812
7813                 # restore the LIBS
7814                 LIBS="$ol_LIBS"
7815         
7816 fi
7817
7818 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7819
7820         if test $ol_cv_pthread_thread = yes ; then
7821                 ol_link_pthreads="-thread"
7822                 ol_link_threads=posix
7823         fi
7824 fi
7825
7826
7827                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7828 if test "$ol_link_threads" = no ; then
7829         # try -lpthread -lmach -lexc -lc_r
7830         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7831 echo "configure:7809: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7832 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7833   echo $ac_n "(cached) $ac_c" 1>&6
7834 else
7835   
7836                 # save the flags
7837                 ol_LIBS="$LIBS"
7838                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7839
7840                 if test "$cross_compiling" = yes; then
7841   cat > conftest.$ac_ext <<EOF
7842 #line 7820 "configure"
7843 #include "confdefs.h"
7844 /* pthread test headers */
7845 #include <pthread.h>
7846 #ifndef NULL
7847 #define NULL (void*)0
7848 #endif
7849
7850 static void *task(p)
7851         void *p;
7852 {
7853         return (void *) (p == NULL);
7854 }
7855
7856 int main() {
7857
7858         /* pthread test function */
7859         pthread_t t;
7860         int status;
7861
7862         /* make sure pthread_create() isn't just a stub */
7863 #if HAVE_PTHREADS_D4
7864         status = pthread_create(&t, pthread_attr_default, task, NULL);
7865 #else
7866         status = pthread_create(&t, NULL, task, NULL);
7867 #endif
7868
7869         if( status ) exit( status );
7870
7871         /* make sure pthread_detach() isn't just a stub */
7872 #if HAVE_PTHREADS_D4
7873         status = pthread_detach( &t );
7874 #else
7875         status = pthread_detach( t );
7876 #endif
7877
7878 #ifdef HAVE_LINUX_THREADS
7879         pthread_kill_other_threads_np();
7880 #endif
7881
7882         exit( status );
7883
7884 ; return 0; }
7885 EOF
7886 if { (eval echo configure:7864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7887   rm -rf conftest*
7888   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7889 else
7890   echo "configure: failed program was:" >&5
7891   cat conftest.$ac_ext >&5
7892   rm -rf conftest*
7893   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7894 fi
7895 rm -f conftest*
7896 else
7897   cat > conftest.$ac_ext <<EOF
7898 #line 7876 "configure"
7899 #include "confdefs.h"
7900 /* pthread test headers */
7901 #include <pthread.h>
7902 #ifndef NULL
7903 #define NULL (void*)0
7904 #endif
7905
7906 static void *task(p)
7907         void *p;
7908 {
7909         return (void *) (p == NULL);
7910 }
7911
7912
7913 int main(argc, argv)
7914         int argc;
7915         char **argv;
7916 {
7917
7918         /* pthread test function */
7919         pthread_t t;
7920         int status;
7921
7922         /* make sure pthread_create() isn't just a stub */
7923 #if HAVE_PTHREADS_D4
7924         status = pthread_create(&t, pthread_attr_default, task, NULL);
7925 #else
7926         status = pthread_create(&t, NULL, task, NULL);
7927 #endif
7928
7929         if( status ) exit( status );
7930
7931         /* make sure pthread_detach() isn't just a stub */
7932 #if HAVE_PTHREADS_D4
7933         status = pthread_detach( &t );
7934 #else
7935         status = pthread_detach( t );
7936 #endif
7937
7938 #ifdef HAVE_LINUX_THREADS
7939         pthread_kill_other_threads_np();
7940 #endif
7941
7942         exit( status );
7943
7944 }
7945
7946 EOF
7947 if { (eval echo configure:7925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7948 then
7949   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7950 else
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -fr conftest*
7954   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7955 fi
7956 rm -fr conftest*
7957 fi
7958
7959
7960                 # restore the LIBS
7961                 LIBS="$ol_LIBS"
7962         
7963 fi
7964
7965 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7966
7967         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7968                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7969                 ol_link_threads=posix
7970         fi
7971 fi
7972
7973                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7974 if test "$ol_link_threads" = no ; then
7975         # try -lpthread -lmach -lexc
7976         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7977 echo "configure:7955: checking for pthread link with -lpthread -lmach -lexc" >&5
7978 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7979   echo $ac_n "(cached) $ac_c" 1>&6
7980 else
7981   
7982                 # save the flags
7983                 ol_LIBS="$LIBS"
7984                 LIBS="-lpthread -lmach -lexc $LIBS"
7985
7986                 if test "$cross_compiling" = yes; then
7987   cat > conftest.$ac_ext <<EOF
7988 #line 7966 "configure"
7989 #include "confdefs.h"
7990 /* pthread test headers */
7991 #include <pthread.h>
7992 #ifndef NULL
7993 #define NULL (void*)0
7994 #endif
7995
7996 static void *task(p)
7997         void *p;
7998 {
7999         return (void *) (p == NULL);
8000 }
8001
8002 int main() {
8003
8004         /* pthread test function */
8005         pthread_t t;
8006         int status;
8007
8008         /* make sure pthread_create() isn't just a stub */
8009 #if HAVE_PTHREADS_D4
8010         status = pthread_create(&t, pthread_attr_default, task, NULL);
8011 #else
8012         status = pthread_create(&t, NULL, task, NULL);
8013 #endif
8014
8015         if( status ) exit( status );
8016
8017         /* make sure pthread_detach() isn't just a stub */
8018 #if HAVE_PTHREADS_D4
8019         status = pthread_detach( &t );
8020 #else
8021         status = pthread_detach( t );
8022 #endif
8023
8024 #ifdef HAVE_LINUX_THREADS
8025         pthread_kill_other_threads_np();
8026 #endif
8027
8028         exit( status );
8029
8030 ; return 0; }
8031 EOF
8032 if { (eval echo configure:8010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8033   rm -rf conftest*
8034   ol_cv_pthread_lpthread_lmach_lexc=yes
8035 else
8036   echo "configure: failed program was:" >&5
8037   cat conftest.$ac_ext >&5
8038   rm -rf conftest*
8039   ol_cv_pthread_lpthread_lmach_lexc=no
8040 fi
8041 rm -f conftest*
8042 else
8043   cat > conftest.$ac_ext <<EOF
8044 #line 8022 "configure"
8045 #include "confdefs.h"
8046 /* pthread test headers */
8047 #include <pthread.h>
8048 #ifndef NULL
8049 #define NULL (void*)0
8050 #endif
8051
8052 static void *task(p)
8053         void *p;
8054 {
8055         return (void *) (p == NULL);
8056 }
8057
8058
8059 int main(argc, argv)
8060         int argc;
8061         char **argv;
8062 {
8063
8064         /* pthread test function */
8065         pthread_t t;
8066         int status;
8067
8068         /* make sure pthread_create() isn't just a stub */
8069 #if HAVE_PTHREADS_D4
8070         status = pthread_create(&t, pthread_attr_default, task, NULL);
8071 #else
8072         status = pthread_create(&t, NULL, task, NULL);
8073 #endif
8074
8075         if( status ) exit( status );
8076
8077         /* make sure pthread_detach() isn't just a stub */
8078 #if HAVE_PTHREADS_D4
8079         status = pthread_detach( &t );
8080 #else
8081         status = pthread_detach( t );
8082 #endif
8083
8084 #ifdef HAVE_LINUX_THREADS
8085         pthread_kill_other_threads_np();
8086 #endif
8087
8088         exit( status );
8089
8090 }
8091
8092 EOF
8093 if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8094 then
8095   ol_cv_pthread_lpthread_lmach_lexc=yes
8096 else
8097   echo "configure: failed program was:" >&5
8098   cat conftest.$ac_ext >&5
8099   rm -fr conftest*
8100   ol_cv_pthread_lpthread_lmach_lexc=no
8101 fi
8102 rm -fr conftest*
8103 fi
8104
8105
8106                 # restore the LIBS
8107                 LIBS="$ol_LIBS"
8108         
8109 fi
8110
8111 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8112
8113         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8114                 ol_link_pthreads="-lpthread -lmach -lexc"
8115                 ol_link_threads=posix
8116         fi
8117 fi
8118
8119
8120                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8121 if test "$ol_link_threads" = no ; then
8122         # try -lpthread -Wl,-woff,85
8123         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8124 echo "configure:8102: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8125 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8126   echo $ac_n "(cached) $ac_c" 1>&6
8127 else
8128   
8129                 # save the flags
8130                 ol_LIBS="$LIBS"
8131                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8132
8133                 if test "$cross_compiling" = yes; then
8134   cat > conftest.$ac_ext <<EOF
8135 #line 8113 "configure"
8136 #include "confdefs.h"
8137 /* pthread test headers */
8138 #include <pthread.h>
8139 #ifndef NULL
8140 #define NULL (void*)0
8141 #endif
8142
8143 static void *task(p)
8144         void *p;
8145 {
8146         return (void *) (p == NULL);
8147 }
8148
8149 int main() {
8150
8151         /* pthread test function */
8152         pthread_t t;
8153         int status;
8154
8155         /* make sure pthread_create() isn't just a stub */
8156 #if HAVE_PTHREADS_D4
8157         status = pthread_create(&t, pthread_attr_default, task, NULL);
8158 #else
8159         status = pthread_create(&t, NULL, task, NULL);
8160 #endif
8161
8162         if( status ) exit( status );
8163
8164         /* make sure pthread_detach() isn't just a stub */
8165 #if HAVE_PTHREADS_D4
8166         status = pthread_detach( &t );
8167 #else
8168         status = pthread_detach( t );
8169 #endif
8170
8171 #ifdef HAVE_LINUX_THREADS
8172         pthread_kill_other_threads_np();
8173 #endif
8174
8175         exit( status );
8176
8177 ; return 0; }
8178 EOF
8179 if { (eval echo configure:8157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8180   rm -rf conftest*
8181   ol_cv_pthread_lib_lpthread_woff=yes
8182 else
8183   echo "configure: failed program was:" >&5
8184   cat conftest.$ac_ext >&5
8185   rm -rf conftest*
8186   ol_cv_pthread_lib_lpthread_woff=no
8187 fi
8188 rm -f conftest*
8189 else
8190   cat > conftest.$ac_ext <<EOF
8191 #line 8169 "configure"
8192 #include "confdefs.h"
8193 /* pthread test headers */
8194 #include <pthread.h>
8195 #ifndef NULL
8196 #define NULL (void*)0
8197 #endif
8198
8199 static void *task(p)
8200         void *p;
8201 {
8202         return (void *) (p == NULL);
8203 }
8204
8205
8206 int main(argc, argv)
8207         int argc;
8208         char **argv;
8209 {
8210
8211         /* pthread test function */
8212         pthread_t t;
8213         int status;
8214
8215         /* make sure pthread_create() isn't just a stub */
8216 #if HAVE_PTHREADS_D4
8217         status = pthread_create(&t, pthread_attr_default, task, NULL);
8218 #else
8219         status = pthread_create(&t, NULL, task, NULL);
8220 #endif
8221
8222         if( status ) exit( status );
8223
8224         /* make sure pthread_detach() isn't just a stub */
8225 #if HAVE_PTHREADS_D4
8226         status = pthread_detach( &t );
8227 #else
8228         status = pthread_detach( t );
8229 #endif
8230
8231 #ifdef HAVE_LINUX_THREADS
8232         pthread_kill_other_threads_np();
8233 #endif
8234
8235         exit( status );
8236
8237 }
8238
8239 EOF
8240 if { (eval echo configure:8218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8241 then
8242   ol_cv_pthread_lib_lpthread_woff=yes
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -fr conftest*
8247   ol_cv_pthread_lib_lpthread_woff=no
8248 fi
8249 rm -fr conftest*
8250 fi
8251
8252
8253                 # restore the LIBS
8254                 LIBS="$ol_LIBS"
8255         
8256 fi
8257
8258 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8259
8260         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8261                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8262                 ol_link_threads=posix
8263         fi
8264 fi
8265
8266
8267                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8268 if test "$ol_link_threads" = no ; then
8269         # try -lpthread
8270         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8271 echo "configure:8249: checking for pthread link with -lpthread" >&5
8272 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   
8276                 # save the flags
8277                 ol_LIBS="$LIBS"
8278                 LIBS="-lpthread $LIBS"
8279
8280                 if test "$cross_compiling" = yes; then
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8260 "configure"
8283 #include "confdefs.h"
8284 /* pthread test headers */
8285 #include <pthread.h>
8286 #ifndef NULL
8287 #define NULL (void*)0
8288 #endif
8289
8290 static void *task(p)
8291         void *p;
8292 {
8293         return (void *) (p == NULL);
8294 }
8295
8296 int main() {
8297
8298         /* pthread test function */
8299         pthread_t t;
8300         int status;
8301
8302         /* make sure pthread_create() isn't just a stub */
8303 #if HAVE_PTHREADS_D4
8304         status = pthread_create(&t, pthread_attr_default, task, NULL);
8305 #else
8306         status = pthread_create(&t, NULL, task, NULL);
8307 #endif
8308
8309         if( status ) exit( status );
8310
8311         /* make sure pthread_detach() isn't just a stub */
8312 #if HAVE_PTHREADS_D4
8313         status = pthread_detach( &t );
8314 #else
8315         status = pthread_detach( t );
8316 #endif
8317
8318 #ifdef HAVE_LINUX_THREADS
8319         pthread_kill_other_threads_np();
8320 #endif
8321
8322         exit( status );
8323
8324 ; return 0; }
8325 EOF
8326 if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8327   rm -rf conftest*
8328   ol_cv_pthread_lpthread=yes
8329 else
8330   echo "configure: failed program was:" >&5
8331   cat conftest.$ac_ext >&5
8332   rm -rf conftest*
8333   ol_cv_pthread_lpthread=no
8334 fi
8335 rm -f conftest*
8336 else
8337   cat > conftest.$ac_ext <<EOF
8338 #line 8316 "configure"
8339 #include "confdefs.h"
8340 /* pthread test headers */
8341 #include <pthread.h>
8342 #ifndef NULL
8343 #define NULL (void*)0
8344 #endif
8345
8346 static void *task(p)
8347         void *p;
8348 {
8349         return (void *) (p == NULL);
8350 }
8351
8352
8353 int main(argc, argv)
8354         int argc;
8355         char **argv;
8356 {
8357
8358         /* pthread test function */
8359         pthread_t t;
8360         int status;
8361
8362         /* make sure pthread_create() isn't just a stub */
8363 #if HAVE_PTHREADS_D4
8364         status = pthread_create(&t, pthread_attr_default, task, NULL);
8365 #else
8366         status = pthread_create(&t, NULL, task, NULL);
8367 #endif
8368
8369         if( status ) exit( status );
8370
8371         /* make sure pthread_detach() isn't just a stub */
8372 #if HAVE_PTHREADS_D4
8373         status = pthread_detach( &t );
8374 #else
8375         status = pthread_detach( t );
8376 #endif
8377
8378 #ifdef HAVE_LINUX_THREADS
8379         pthread_kill_other_threads_np();
8380 #endif
8381
8382         exit( status );
8383
8384 }
8385
8386 EOF
8387 if { (eval echo configure:8365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8388 then
8389   ol_cv_pthread_lpthread=yes
8390 else
8391   echo "configure: failed program was:" >&5
8392   cat conftest.$ac_ext >&5
8393   rm -fr conftest*
8394   ol_cv_pthread_lpthread=no
8395 fi
8396 rm -fr conftest*
8397 fi
8398
8399
8400                 # restore the LIBS
8401                 LIBS="$ol_LIBS"
8402         
8403 fi
8404
8405 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8406
8407         if test $ol_cv_pthread_lpthread = yes ; then
8408                 ol_link_pthreads="-lpthread"
8409                 ol_link_threads=posix
8410         fi
8411 fi
8412
8413                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8414 if test "$ol_link_threads" = no ; then
8415         # try -lc_r
8416         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8417 echo "configure:8395: checking for pthread link with -lc_r" >&5
8418 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8419   echo $ac_n "(cached) $ac_c" 1>&6
8420 else
8421   
8422                 # save the flags
8423                 ol_LIBS="$LIBS"
8424                 LIBS="-lc_r $LIBS"
8425
8426                 if test "$cross_compiling" = yes; then
8427   cat > conftest.$ac_ext <<EOF
8428 #line 8406 "configure"
8429 #include "confdefs.h"
8430 /* pthread test headers */
8431 #include <pthread.h>
8432 #ifndef NULL
8433 #define NULL (void*)0
8434 #endif
8435
8436 static void *task(p)
8437         void *p;
8438 {
8439         return (void *) (p == NULL);
8440 }
8441
8442 int main() {
8443
8444         /* pthread test function */
8445         pthread_t t;
8446         int status;
8447
8448         /* make sure pthread_create() isn't just a stub */
8449 #if HAVE_PTHREADS_D4
8450         status = pthread_create(&t, pthread_attr_default, task, NULL);
8451 #else
8452         status = pthread_create(&t, NULL, task, NULL);
8453 #endif
8454
8455         if( status ) exit( status );
8456
8457         /* make sure pthread_detach() isn't just a stub */
8458 #if HAVE_PTHREADS_D4
8459         status = pthread_detach( &t );
8460 #else
8461         status = pthread_detach( t );
8462 #endif
8463
8464 #ifdef HAVE_LINUX_THREADS
8465         pthread_kill_other_threads_np();
8466 #endif
8467
8468         exit( status );
8469
8470 ; return 0; }
8471 EOF
8472 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8473   rm -rf conftest*
8474   ol_cv_pthread_lc_r=yes
8475 else
8476   echo "configure: failed program was:" >&5
8477   cat conftest.$ac_ext >&5
8478   rm -rf conftest*
8479   ol_cv_pthread_lc_r=no
8480 fi
8481 rm -f conftest*
8482 else
8483   cat > conftest.$ac_ext <<EOF
8484 #line 8462 "configure"
8485 #include "confdefs.h"
8486 /* pthread test headers */
8487 #include <pthread.h>
8488 #ifndef NULL
8489 #define NULL (void*)0
8490 #endif
8491
8492 static void *task(p)
8493         void *p;
8494 {
8495         return (void *) (p == NULL);
8496 }
8497
8498
8499 int main(argc, argv)
8500         int argc;
8501         char **argv;
8502 {
8503
8504         /* pthread test function */
8505         pthread_t t;
8506         int status;
8507
8508         /* make sure pthread_create() isn't just a stub */
8509 #if HAVE_PTHREADS_D4
8510         status = pthread_create(&t, pthread_attr_default, task, NULL);
8511 #else
8512         status = pthread_create(&t, NULL, task, NULL);
8513 #endif
8514
8515         if( status ) exit( status );
8516
8517         /* make sure pthread_detach() isn't just a stub */
8518 #if HAVE_PTHREADS_D4
8519         status = pthread_detach( &t );
8520 #else
8521         status = pthread_detach( t );
8522 #endif
8523
8524 #ifdef HAVE_LINUX_THREADS
8525         pthread_kill_other_threads_np();
8526 #endif
8527
8528         exit( status );
8529
8530 }
8531
8532 EOF
8533 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8534 then
8535   ol_cv_pthread_lc_r=yes
8536 else
8537   echo "configure: failed program was:" >&5
8538   cat conftest.$ac_ext >&5
8539   rm -fr conftest*
8540   ol_cv_pthread_lc_r=no
8541 fi
8542 rm -fr conftest*
8543 fi
8544
8545
8546                 # restore the LIBS
8547                 LIBS="$ol_LIBS"
8548         
8549 fi
8550
8551 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8552
8553         if test $ol_cv_pthread_lc_r = yes ; then
8554                 ol_link_pthreads="-lc_r"
8555                 ol_link_threads=posix
8556         fi
8557 fi
8558
8559
8560                 # Pthread try link: -threads (ol_cv_pthread_threads)
8561 if test "$ol_link_threads" = no ; then
8562         # try -threads
8563         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8564 echo "configure:8542: checking for pthread link with -threads" >&5
8565 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8566   echo $ac_n "(cached) $ac_c" 1>&6
8567 else
8568   
8569                 # save the flags
8570                 ol_LIBS="$LIBS"
8571                 LIBS="-threads $LIBS"
8572
8573                 if test "$cross_compiling" = yes; then
8574   cat > conftest.$ac_ext <<EOF
8575 #line 8553 "configure"
8576 #include "confdefs.h"
8577 /* pthread test headers */
8578 #include <pthread.h>
8579 #ifndef NULL
8580 #define NULL (void*)0
8581 #endif
8582
8583 static void *task(p)
8584         void *p;
8585 {
8586         return (void *) (p == NULL);
8587 }
8588
8589 int main() {
8590
8591         /* pthread test function */
8592         pthread_t t;
8593         int status;
8594
8595         /* make sure pthread_create() isn't just a stub */
8596 #if HAVE_PTHREADS_D4
8597         status = pthread_create(&t, pthread_attr_default, task, NULL);
8598 #else
8599         status = pthread_create(&t, NULL, task, NULL);
8600 #endif
8601
8602         if( status ) exit( status );
8603
8604         /* make sure pthread_detach() isn't just a stub */
8605 #if HAVE_PTHREADS_D4
8606         status = pthread_detach( &t );
8607 #else
8608         status = pthread_detach( t );
8609 #endif
8610
8611 #ifdef HAVE_LINUX_THREADS
8612         pthread_kill_other_threads_np();
8613 #endif
8614
8615         exit( status );
8616
8617 ; return 0; }
8618 EOF
8619 if { (eval echo configure:8597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8620   rm -rf conftest*
8621   ol_cv_pthread_threads=yes
8622 else
8623   echo "configure: failed program was:" >&5
8624   cat conftest.$ac_ext >&5
8625   rm -rf conftest*
8626   ol_cv_pthread_threads=no
8627 fi
8628 rm -f conftest*
8629 else
8630   cat > conftest.$ac_ext <<EOF
8631 #line 8609 "configure"
8632 #include "confdefs.h"
8633 /* pthread test headers */
8634 #include <pthread.h>
8635 #ifndef NULL
8636 #define NULL (void*)0
8637 #endif
8638
8639 static void *task(p)
8640         void *p;
8641 {
8642         return (void *) (p == NULL);
8643 }
8644
8645
8646 int main(argc, argv)
8647         int argc;
8648         char **argv;
8649 {
8650
8651         /* pthread test function */
8652         pthread_t t;
8653         int status;
8654
8655         /* make sure pthread_create() isn't just a stub */
8656 #if HAVE_PTHREADS_D4
8657         status = pthread_create(&t, pthread_attr_default, task, NULL);
8658 #else
8659         status = pthread_create(&t, NULL, task, NULL);
8660 #endif
8661
8662         if( status ) exit( status );
8663
8664         /* make sure pthread_detach() isn't just a stub */
8665 #if HAVE_PTHREADS_D4
8666         status = pthread_detach( &t );
8667 #else
8668         status = pthread_detach( t );
8669 #endif
8670
8671 #ifdef HAVE_LINUX_THREADS
8672         pthread_kill_other_threads_np();
8673 #endif
8674
8675         exit( status );
8676
8677 }
8678
8679 EOF
8680 if { (eval echo configure:8658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8681 then
8682   ol_cv_pthread_threads=yes
8683 else
8684   echo "configure: failed program was:" >&5
8685   cat conftest.$ac_ext >&5
8686   rm -fr conftest*
8687   ol_cv_pthread_threads=no
8688 fi
8689 rm -fr conftest*
8690 fi
8691
8692
8693                 # restore the LIBS
8694                 LIBS="$ol_LIBS"
8695         
8696 fi
8697
8698 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8699
8700         if test $ol_cv_pthread_threads = yes ; then
8701                 ol_link_pthreads="-threads"
8702                 ol_link_threads=posix
8703         fi
8704 fi
8705
8706
8707                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8708 if test "$ol_link_threads" = no ; then
8709         # try -lpthreads -lmach -lexc -lc_r
8710         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8711 echo "configure:8689: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8712 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   
8716                 # save the flags
8717                 ol_LIBS="$LIBS"
8718                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8719
8720                 if test "$cross_compiling" = yes; then
8721   cat > conftest.$ac_ext <<EOF
8722 #line 8700 "configure"
8723 #include "confdefs.h"
8724 /* pthread test headers */
8725 #include <pthread.h>
8726 #ifndef NULL
8727 #define NULL (void*)0
8728 #endif
8729
8730 static void *task(p)
8731         void *p;
8732 {
8733         return (void *) (p == NULL);
8734 }
8735
8736 int main() {
8737
8738         /* pthread test function */
8739         pthread_t t;
8740         int status;
8741
8742         /* make sure pthread_create() isn't just a stub */
8743 #if HAVE_PTHREADS_D4
8744         status = pthread_create(&t, pthread_attr_default, task, NULL);
8745 #else
8746         status = pthread_create(&t, NULL, task, NULL);
8747 #endif
8748
8749         if( status ) exit( status );
8750
8751         /* make sure pthread_detach() isn't just a stub */
8752 #if HAVE_PTHREADS_D4
8753         status = pthread_detach( &t );
8754 #else
8755         status = pthread_detach( t );
8756 #endif
8757
8758 #ifdef HAVE_LINUX_THREADS
8759         pthread_kill_other_threads_np();
8760 #endif
8761
8762         exit( status );
8763
8764 ; return 0; }
8765 EOF
8766 if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8767   rm -rf conftest*
8768   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8769 else
8770   echo "configure: failed program was:" >&5
8771   cat conftest.$ac_ext >&5
8772   rm -rf conftest*
8773   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8774 fi
8775 rm -f conftest*
8776 else
8777   cat > conftest.$ac_ext <<EOF
8778 #line 8756 "configure"
8779 #include "confdefs.h"
8780 /* pthread test headers */
8781 #include <pthread.h>
8782 #ifndef NULL
8783 #define NULL (void*)0
8784 #endif
8785
8786 static void *task(p)
8787         void *p;
8788 {
8789         return (void *) (p == NULL);
8790 }
8791
8792
8793 int main(argc, argv)
8794         int argc;
8795         char **argv;
8796 {
8797
8798         /* pthread test function */
8799         pthread_t t;
8800         int status;
8801
8802         /* make sure pthread_create() isn't just a stub */
8803 #if HAVE_PTHREADS_D4
8804         status = pthread_create(&t, pthread_attr_default, task, NULL);
8805 #else
8806         status = pthread_create(&t, NULL, task, NULL);
8807 #endif
8808
8809         if( status ) exit( status );
8810
8811         /* make sure pthread_detach() isn't just a stub */
8812 #if HAVE_PTHREADS_D4
8813         status = pthread_detach( &t );
8814 #else
8815         status = pthread_detach( t );
8816 #endif
8817
8818 #ifdef HAVE_LINUX_THREADS
8819         pthread_kill_other_threads_np();
8820 #endif
8821
8822         exit( status );
8823
8824 }
8825
8826 EOF
8827 if { (eval echo configure:8805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8828 then
8829   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8830 else
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -fr conftest*
8834   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8835 fi
8836 rm -fr conftest*
8837 fi
8838
8839
8840                 # restore the LIBS
8841                 LIBS="$ol_LIBS"
8842         
8843 fi
8844
8845 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8846
8847         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8848                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8849                 ol_link_threads=posix
8850         fi
8851 fi
8852
8853                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8854 if test "$ol_link_threads" = no ; then
8855         # try -lpthreads -lmach -lexc
8856         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8857 echo "configure:8835: checking for pthread link with -lpthreads -lmach -lexc" >&5
8858 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   
8862                 # save the flags
8863                 ol_LIBS="$LIBS"
8864                 LIBS="-lpthreads -lmach -lexc $LIBS"
8865
8866                 if test "$cross_compiling" = yes; then
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8846 "configure"
8869 #include "confdefs.h"
8870 /* pthread test headers */
8871 #include <pthread.h>
8872 #ifndef NULL
8873 #define NULL (void*)0
8874 #endif
8875
8876 static void *task(p)
8877         void *p;
8878 {
8879         return (void *) (p == NULL);
8880 }
8881
8882 int main() {
8883
8884         /* pthread test function */
8885         pthread_t t;
8886         int status;
8887
8888         /* make sure pthread_create() isn't just a stub */
8889 #if HAVE_PTHREADS_D4
8890         status = pthread_create(&t, pthread_attr_default, task, NULL);
8891 #else
8892         status = pthread_create(&t, NULL, task, NULL);
8893 #endif
8894
8895         if( status ) exit( status );
8896
8897         /* make sure pthread_detach() isn't just a stub */
8898 #if HAVE_PTHREADS_D4
8899         status = pthread_detach( &t );
8900 #else
8901         status = pthread_detach( t );
8902 #endif
8903
8904 #ifdef HAVE_LINUX_THREADS
8905         pthread_kill_other_threads_np();
8906 #endif
8907
8908         exit( status );
8909
8910 ; return 0; }
8911 EOF
8912 if { (eval echo configure:8890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8913   rm -rf conftest*
8914   ol_cv_pthread_lpthreads_lmach_lexc=yes
8915 else
8916   echo "configure: failed program was:" >&5
8917   cat conftest.$ac_ext >&5
8918   rm -rf conftest*
8919   ol_cv_pthread_lpthreads_lmach_lexc=no
8920 fi
8921 rm -f conftest*
8922 else
8923   cat > conftest.$ac_ext <<EOF
8924 #line 8902 "configure"
8925 #include "confdefs.h"
8926 /* pthread test headers */
8927 #include <pthread.h>
8928 #ifndef NULL
8929 #define NULL (void*)0
8930 #endif
8931
8932 static void *task(p)
8933         void *p;
8934 {
8935         return (void *) (p == NULL);
8936 }
8937
8938
8939 int main(argc, argv)
8940         int argc;
8941         char **argv;
8942 {
8943
8944         /* pthread test function */
8945         pthread_t t;
8946         int status;
8947
8948         /* make sure pthread_create() isn't just a stub */
8949 #if HAVE_PTHREADS_D4
8950         status = pthread_create(&t, pthread_attr_default, task, NULL);
8951 #else
8952         status = pthread_create(&t, NULL, task, NULL);
8953 #endif
8954
8955         if( status ) exit( status );
8956
8957         /* make sure pthread_detach() isn't just a stub */
8958 #if HAVE_PTHREADS_D4
8959         status = pthread_detach( &t );
8960 #else
8961         status = pthread_detach( t );
8962 #endif
8963
8964 #ifdef HAVE_LINUX_THREADS
8965         pthread_kill_other_threads_np();
8966 #endif
8967
8968         exit( status );
8969
8970 }
8971
8972 EOF
8973 if { (eval echo configure:8951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8974 then
8975   ol_cv_pthread_lpthreads_lmach_lexc=yes
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -fr conftest*
8980   ol_cv_pthread_lpthreads_lmach_lexc=no
8981 fi
8982 rm -fr conftest*
8983 fi
8984
8985
8986                 # restore the LIBS
8987                 LIBS="$ol_LIBS"
8988         
8989 fi
8990
8991 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8992
8993         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8994                 ol_link_pthreads="-lpthreads -lmach -lexc"
8995                 ol_link_threads=posix
8996         fi
8997 fi
8998
8999                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9000 if test "$ol_link_threads" = no ; then
9001         # try -lpthreads -lexc
9002         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9003 echo "configure:8981: checking for pthread link with -lpthreads -lexc" >&5
9004 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9005   echo $ac_n "(cached) $ac_c" 1>&6
9006 else
9007   
9008                 # save the flags
9009                 ol_LIBS="$LIBS"
9010                 LIBS="-lpthreads -lexc $LIBS"
9011
9012                 if test "$cross_compiling" = yes; then
9013   cat > conftest.$ac_ext <<EOF
9014 #line 8992 "configure"
9015 #include "confdefs.h"
9016 /* pthread test headers */
9017 #include <pthread.h>
9018 #ifndef NULL
9019 #define NULL (void*)0
9020 #endif
9021
9022 static void *task(p)
9023         void *p;
9024 {
9025         return (void *) (p == NULL);
9026 }
9027
9028 int main() {
9029
9030         /* pthread test function */
9031         pthread_t t;
9032         int status;
9033
9034         /* make sure pthread_create() isn't just a stub */
9035 #if HAVE_PTHREADS_D4
9036         status = pthread_create(&t, pthread_attr_default, task, NULL);
9037 #else
9038         status = pthread_create(&t, NULL, task, NULL);
9039 #endif
9040
9041         if( status ) exit( status );
9042
9043         /* make sure pthread_detach() isn't just a stub */
9044 #if HAVE_PTHREADS_D4
9045         status = pthread_detach( &t );
9046 #else
9047         status = pthread_detach( t );
9048 #endif
9049
9050 #ifdef HAVE_LINUX_THREADS
9051         pthread_kill_other_threads_np();
9052 #endif
9053
9054         exit( status );
9055
9056 ; return 0; }
9057 EOF
9058 if { (eval echo configure:9036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9059   rm -rf conftest*
9060   ol_cv_pthread_lpthreads_lexc=yes
9061 else
9062   echo "configure: failed program was:" >&5
9063   cat conftest.$ac_ext >&5
9064   rm -rf conftest*
9065   ol_cv_pthread_lpthreads_lexc=no
9066 fi
9067 rm -f conftest*
9068 else
9069   cat > conftest.$ac_ext <<EOF
9070 #line 9048 "configure"
9071 #include "confdefs.h"
9072 /* pthread test headers */
9073 #include <pthread.h>
9074 #ifndef NULL
9075 #define NULL (void*)0
9076 #endif
9077
9078 static void *task(p)
9079         void *p;
9080 {
9081         return (void *) (p == NULL);
9082 }
9083
9084
9085 int main(argc, argv)
9086         int argc;
9087         char **argv;
9088 {
9089
9090         /* pthread test function */
9091         pthread_t t;
9092         int status;
9093
9094         /* make sure pthread_create() isn't just a stub */
9095 #if HAVE_PTHREADS_D4
9096         status = pthread_create(&t, pthread_attr_default, task, NULL);
9097 #else
9098         status = pthread_create(&t, NULL, task, NULL);
9099 #endif
9100
9101         if( status ) exit( status );
9102
9103         /* make sure pthread_detach() isn't just a stub */
9104 #if HAVE_PTHREADS_D4
9105         status = pthread_detach( &t );
9106 #else
9107         status = pthread_detach( t );
9108 #endif
9109
9110 #ifdef HAVE_LINUX_THREADS
9111         pthread_kill_other_threads_np();
9112 #endif
9113
9114         exit( status );
9115
9116 }
9117
9118 EOF
9119 if { (eval echo configure:9097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9120 then
9121   ol_cv_pthread_lpthreads_lexc=yes
9122 else
9123   echo "configure: failed program was:" >&5
9124   cat conftest.$ac_ext >&5
9125   rm -fr conftest*
9126   ol_cv_pthread_lpthreads_lexc=no
9127 fi
9128 rm -fr conftest*
9129 fi
9130
9131
9132                 # restore the LIBS
9133                 LIBS="$ol_LIBS"
9134         
9135 fi
9136
9137 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9138
9139         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9140                 ol_link_pthreads="-lpthreads -lexc"
9141                 ol_link_threads=posix
9142         fi
9143 fi
9144
9145
9146                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9147 if test "$ol_link_threads" = no ; then
9148         # try -lpthreads
9149         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9150 echo "configure:9128: checking for pthread link with -lpthreads" >&5
9151 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9152   echo $ac_n "(cached) $ac_c" 1>&6
9153 else
9154   
9155                 # save the flags
9156                 ol_LIBS="$LIBS"
9157                 LIBS="-lpthreads $LIBS"
9158
9159                 if test "$cross_compiling" = yes; then
9160   cat > conftest.$ac_ext <<EOF
9161 #line 9139 "configure"
9162 #include "confdefs.h"
9163 /* pthread test headers */
9164 #include <pthread.h>
9165 #ifndef NULL
9166 #define NULL (void*)0
9167 #endif
9168
9169 static void *task(p)
9170         void *p;
9171 {
9172         return (void *) (p == NULL);
9173 }
9174
9175 int main() {
9176
9177         /* pthread test function */
9178         pthread_t t;
9179         int status;
9180
9181         /* make sure pthread_create() isn't just a stub */
9182 #if HAVE_PTHREADS_D4
9183         status = pthread_create(&t, pthread_attr_default, task, NULL);
9184 #else
9185         status = pthread_create(&t, NULL, task, NULL);
9186 #endif
9187
9188         if( status ) exit( status );
9189
9190         /* make sure pthread_detach() isn't just a stub */
9191 #if HAVE_PTHREADS_D4
9192         status = pthread_detach( &t );
9193 #else
9194         status = pthread_detach( t );
9195 #endif
9196
9197 #ifdef HAVE_LINUX_THREADS
9198         pthread_kill_other_threads_np();
9199 #endif
9200
9201         exit( status );
9202
9203 ; return 0; }
9204 EOF
9205 if { (eval echo configure:9183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9206   rm -rf conftest*
9207   ol_cv_pthread_lib_lpthreads=yes
9208 else
9209   echo "configure: failed program was:" >&5
9210   cat conftest.$ac_ext >&5
9211   rm -rf conftest*
9212   ol_cv_pthread_lib_lpthreads=no
9213 fi
9214 rm -f conftest*
9215 else
9216   cat > conftest.$ac_ext <<EOF
9217 #line 9195 "configure"
9218 #include "confdefs.h"
9219 /* pthread test headers */
9220 #include <pthread.h>
9221 #ifndef NULL
9222 #define NULL (void*)0
9223 #endif
9224
9225 static void *task(p)
9226         void *p;
9227 {
9228         return (void *) (p == NULL);
9229 }
9230
9231
9232 int main(argc, argv)
9233         int argc;
9234         char **argv;
9235 {
9236
9237         /* pthread test function */
9238         pthread_t t;
9239         int status;
9240
9241         /* make sure pthread_create() isn't just a stub */
9242 #if HAVE_PTHREADS_D4
9243         status = pthread_create(&t, pthread_attr_default, task, NULL);
9244 #else
9245         status = pthread_create(&t, NULL, task, NULL);
9246 #endif
9247
9248         if( status ) exit( status );
9249
9250         /* make sure pthread_detach() isn't just a stub */
9251 #if HAVE_PTHREADS_D4
9252         status = pthread_detach( &t );
9253 #else
9254         status = pthread_detach( t );
9255 #endif
9256
9257 #ifdef HAVE_LINUX_THREADS
9258         pthread_kill_other_threads_np();
9259 #endif
9260
9261         exit( status );
9262
9263 }
9264
9265 EOF
9266 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9267 then
9268   ol_cv_pthread_lib_lpthreads=yes
9269 else
9270   echo "configure: failed program was:" >&5
9271   cat conftest.$ac_ext >&5
9272   rm -fr conftest*
9273   ol_cv_pthread_lib_lpthreads=no
9274 fi
9275 rm -fr conftest*
9276 fi
9277
9278
9279                 # restore the LIBS
9280                 LIBS="$ol_LIBS"
9281         
9282 fi
9283
9284 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9285
9286         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9287                 ol_link_pthreads="-lpthreads"
9288                 ol_link_threads=posix
9289         fi
9290 fi
9291
9292
9293                 if test $ol_link_threads != no ; then
9294                         cat >> confdefs.h <<\EOF
9295 #define HAVE_PTHREADS 1
9296 EOF
9297
9298
9299                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9300
9301                                                 save_CPPFLAGS="$CPPFLAGS"
9302                         save_LIBS="$LIBS"
9303                         LIBS="$LTHREAD_LIBS $LIBS"
9304
9305                                                                                                 for ac_func in sched_yield pthread_yield
9306 do
9307 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9308 echo "configure:9286: checking for $ac_func" >&5
9309 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9310   echo $ac_n "(cached) $ac_c" 1>&6
9311 else
9312   cat > conftest.$ac_ext <<EOF
9313 #line 9291 "configure"
9314 #include "confdefs.h"
9315 /* System header to define __stub macros and hopefully few prototypes,
9316     which can conflict with char $ac_func(); below.  */
9317 #include <assert.h>
9318 /* Override any gcc2 internal prototype to avoid an error.  */
9319 /* We use char because int might match the return type of a gcc2
9320     builtin and then its argument prototype would still apply.  */
9321 char $ac_func();
9322 char (*f)();
9323
9324 int main() {
9325
9326 /* The GNU C library defines this for functions which it implements
9327     to always fail with ENOSYS.  Some functions are actually named
9328     something starting with __ and the normal name is an alias.  */
9329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9330 choke me
9331 #else
9332 f = $ac_func;
9333 #endif
9334
9335 ; return 0; }
9336 EOF
9337 if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9338   rm -rf conftest*
9339   eval "ac_cv_func_$ac_func=yes"
9340 else
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -rf conftest*
9344   eval "ac_cv_func_$ac_func=no"
9345 fi
9346 rm -f conftest*
9347 fi
9348
9349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9350   echo "$ac_t""yes" 1>&6
9351     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9352   cat >> confdefs.h <<EOF
9353 #define $ac_tr_func 1
9354 EOF
9355  
9356 else
9357   echo "$ac_t""no" 1>&6
9358 fi
9359 done
9360
9361
9362                         if test $ac_cv_func_sched_yield = no -a \
9363                                 $ac_cv_func_pthread_yield = no ; then
9364                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9365 echo "configure:9343: checking for sched_yield in -lrt" >&5
9366 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9367 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9368   echo $ac_n "(cached) $ac_c" 1>&6
9369 else
9370   ac_save_LIBS="$LIBS"
9371 LIBS="-lrt  $LIBS"
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9351 "configure"
9374 #include "confdefs.h"
9375 /* Override any gcc2 internal prototype to avoid an error.  */
9376 /* We use char because int might match the return type of a gcc2
9377     builtin and then its argument prototype would still apply.  */
9378 char sched_yield();
9379
9380 int main() {
9381 sched_yield()
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=yes"
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_lib_$ac_lib_var=no"
9392 fi
9393 rm -f conftest*
9394 LIBS="$ac_save_LIBS"
9395
9396 fi
9397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9398   echo "$ac_t""yes" 1>&6
9399   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9400                                         cat >> confdefs.h <<\EOF
9401 #define HAVE_SCHED_YIELD 1
9402 EOF
9403
9404                                         ac_cv_func_sched_yield=yes
9405 else
9406   echo "$ac_t""no" 1>&6
9407 ac_cv_func_sched_yield=no
9408 fi
9409
9410                         fi
9411                         if test $ac_cv_func_sched_yield = no -a \
9412                                 $ac_cv_func_pthread_yield = no ; then
9413                                                                                                 for ac_func in thr_yield
9414 do
9415 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9416 echo "configure:9394: checking for $ac_func" >&5
9417 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9418   echo $ac_n "(cached) $ac_c" 1>&6
9419 else
9420   cat > conftest.$ac_ext <<EOF
9421 #line 9399 "configure"
9422 #include "confdefs.h"
9423 /* System header to define __stub macros and hopefully few prototypes,
9424     which can conflict with char $ac_func(); below.  */
9425 #include <assert.h>
9426 /* Override any gcc2 internal prototype to avoid an error.  */
9427 /* We use char because int might match the return type of a gcc2
9428     builtin and then its argument prototype would still apply.  */
9429 char $ac_func();
9430 char (*f)();
9431
9432 int main() {
9433
9434 /* The GNU C library defines this for functions which it implements
9435     to always fail with ENOSYS.  Some functions are actually named
9436     something starting with __ and the normal name is an alias.  */
9437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9438 choke me
9439 #else
9440 f = $ac_func;
9441 #endif
9442
9443 ; return 0; }
9444 EOF
9445 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9446   rm -rf conftest*
9447   eval "ac_cv_func_$ac_func=yes"
9448 else
9449   echo "configure: failed program was:" >&5
9450   cat conftest.$ac_ext >&5
9451   rm -rf conftest*
9452   eval "ac_cv_func_$ac_func=no"
9453 fi
9454 rm -f conftest*
9455 fi
9456
9457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9458   echo "$ac_t""yes" 1>&6
9459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9460   cat >> confdefs.h <<EOF
9461 #define $ac_tr_func 1
9462 EOF
9463  
9464 else
9465   echo "$ac_t""no" 1>&6
9466 fi
9467 done
9468
9469                         fi
9470                         if test $ac_cv_func_sched_yield = no -a \
9471                                 $ac_cv_func_pthread_yield = no -a \
9472                                 "$ac_cv_func_thr_yield" = no ; then
9473                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9474                         fi
9475
9476                                                 for ac_func in pthread_kill
9477 do
9478 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9479 echo "configure:9457: checking for $ac_func" >&5
9480 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   cat > conftest.$ac_ext <<EOF
9484 #line 9462 "configure"
9485 #include "confdefs.h"
9486 /* System header to define __stub macros and hopefully few prototypes,
9487     which can conflict with char $ac_func(); below.  */
9488 #include <assert.h>
9489 /* Override any gcc2 internal prototype to avoid an error.  */
9490 /* We use char because int might match the return type of a gcc2
9491     builtin and then its argument prototype would still apply.  */
9492 char $ac_func();
9493 char (*f)();
9494
9495 int main() {
9496
9497 /* The GNU C library defines this for functions which it implements
9498     to always fail with ENOSYS.  Some functions are actually named
9499     something starting with __ and the normal name is an alias.  */
9500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9501 choke me
9502 #else
9503 f = $ac_func;
9504 #endif
9505
9506 ; return 0; }
9507 EOF
9508 if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9509   rm -rf conftest*
9510   eval "ac_cv_func_$ac_func=yes"
9511 else
9512   echo "configure: failed program was:" >&5
9513   cat conftest.$ac_ext >&5
9514   rm -rf conftest*
9515   eval "ac_cv_func_$ac_func=no"
9516 fi
9517 rm -f conftest*
9518 fi
9519
9520 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9521   echo "$ac_t""yes" 1>&6
9522     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9523   cat >> confdefs.h <<EOF
9524 #define $ac_tr_func 1
9525 EOF
9526  
9527 else
9528   echo "$ac_t""no" 1>&6
9529 fi
9530 done
9531
9532
9533                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9534 echo "configure:9512: checking for pthread_detach with <pthread.h>" >&5
9535 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9536   echo $ac_n "(cached) $ac_c" 1>&6
9537 else
9538   
9539                                                                 cat > conftest.$ac_ext <<EOF
9540 #line 9518 "configure"
9541 #include "confdefs.h"
9542
9543 #include <pthread.h>
9544 #ifndef NULL
9545 #define NULL (void*)0
9546 #endif
9547
9548 int main() {
9549 pthread_detach(NULL);
9550 ; return 0; }
9551 EOF
9552 if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9553   rm -rf conftest*
9554   ol_cv_func_pthread_detach=yes
9555 else
9556   echo "configure: failed program was:" >&5
9557   cat conftest.$ac_ext >&5
9558   rm -rf conftest*
9559   ol_cv_func_pthread_detach=no
9560 fi
9561 rm -f conftest*
9562                         
9563 fi
9564
9565 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9566
9567                         if test $ol_cv_func_pthread_detach = no ; then
9568                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9569                         fi
9570
9571                         cat >> confdefs.h <<\EOF
9572 #define HAVE_PTHREAD_DETACH 1
9573 EOF
9574
9575
9576                                                 for ac_func in \
9577                                 pthread_setconcurrency \
9578                                 pthread_getconcurrency \
9579                                 thr_setconcurrency \
9580                                 thr_getconcurrency \
9581                         
9582 do
9583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9584 echo "configure:9562: checking for $ac_func" >&5
9585 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   cat > conftest.$ac_ext <<EOF
9589 #line 9567 "configure"
9590 #include "confdefs.h"
9591 /* System header to define __stub macros and hopefully few prototypes,
9592     which can conflict with char $ac_func(); below.  */
9593 #include <assert.h>
9594 /* Override any gcc2 internal prototype to avoid an error.  */
9595 /* We use char because int might match the return type of a gcc2
9596     builtin and then its argument prototype would still apply.  */
9597 char $ac_func();
9598 char (*f)();
9599
9600 int main() {
9601
9602 /* The GNU C library defines this for functions which it implements
9603     to always fail with ENOSYS.  Some functions are actually named
9604     something starting with __ and the normal name is an alias.  */
9605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9606 choke me
9607 #else
9608 f = $ac_func;
9609 #endif
9610
9611 ; return 0; }
9612 EOF
9613 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9614   rm -rf conftest*
9615   eval "ac_cv_func_$ac_func=yes"
9616 else
9617   echo "configure: failed program was:" >&5
9618   cat conftest.$ac_ext >&5
9619   rm -rf conftest*
9620   eval "ac_cv_func_$ac_func=no"
9621 fi
9622 rm -f conftest*
9623 fi
9624
9625 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9626   echo "$ac_t""yes" 1>&6
9627     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9628   cat >> confdefs.h <<EOF
9629 #define $ac_tr_func 1
9630 EOF
9631  
9632 else
9633   echo "$ac_t""no" 1>&6
9634 fi
9635 done
9636
9637
9638                         
9639         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9640 echo "configure:9618: checking for pthread_kill_other_threads_np" >&5
9641 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9642   echo $ac_n "(cached) $ac_c" 1>&6
9643 else
9644   cat > conftest.$ac_ext <<EOF
9645 #line 9623 "configure"
9646 #include "confdefs.h"
9647 /* System header to define __stub macros and hopefully few prototypes,
9648     which can conflict with char pthread_kill_other_threads_np(); below.  */
9649 #include <assert.h>
9650 /* Override any gcc2 internal prototype to avoid an error.  */
9651 /* We use char because int might match the return type of a gcc2
9652     builtin and then its argument prototype would still apply.  */
9653 char pthread_kill_other_threads_np();
9654 char (*f)();
9655
9656 int main() {
9657
9658 /* The GNU C library defines this for functions which it implements
9659     to always fail with ENOSYS.  Some functions are actually named
9660     something starting with __ and the normal name is an alias.  */
9661 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9662 choke me
9663 #else
9664 f = pthread_kill_other_threads_np;
9665 #endif
9666
9667 ; return 0; }
9668 EOF
9669 if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9670   rm -rf conftest*
9671   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9672 else
9673   echo "configure: failed program was:" >&5
9674   cat conftest.$ac_ext >&5
9675   rm -rf conftest*
9676   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9677 fi
9678 rm -f conftest*
9679 fi
9680
9681 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9682   echo "$ac_t""yes" 1>&6
9683   :
9684 else
9685   echo "$ac_t""no" 1>&6
9686 fi
9687
9688         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9689 echo "configure:9667: checking for LinuxThreads implementation" >&5
9690 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9691   echo $ac_n "(cached) $ac_c" 1>&6
9692 else
9693   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9694 fi
9695
9696 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9697
9698                         
9699         
9700         
9701         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9702 echo "configure:9680: checking for LinuxThreads consistency" >&5
9703 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9704   echo $ac_n "(cached) $ac_c" 1>&6
9705 else
9706   
9707                 if test $ol_cv_header_linux_threads = yes -a \
9708                         $ol_cv_sys_linux_threads = yes; then
9709                         ol_cv_linux_threads=yes
9710                 elif test $ol_cv_header_linux_threads = no -a \
9711                         $ol_cv_sys_linux_threads = no; then
9712                         ol_cv_linux_threads=no
9713                 else
9714                         ol_cv_linux_threads=error
9715                 fi
9716         
9717 fi
9718
9719 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9720
9721
9722                         if test $ol_cv_linux_threads = error; then
9723                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9724                         fi
9725
9726                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9727 echo "configure:9705: checking if pthread_create() works" >&5
9728 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9729   echo $ac_n "(cached) $ac_c" 1>&6
9730 else
9731   
9732                         if test "$cross_compiling" = yes; then
9733                                 ol_cv_pthread_create_works=yes
9734 else
9735   cat > conftest.$ac_ext <<EOF
9736 #line 9714 "configure"
9737 #include "confdefs.h"
9738 /* pthread test headers */
9739 #include <pthread.h>
9740 #ifndef NULL
9741 #define NULL (void*)0
9742 #endif
9743
9744 static void *task(p)
9745         void *p;
9746 {
9747         return (void *) (p == NULL);
9748 }
9749
9750
9751 int main(argc, argv)
9752         int argc;
9753         char **argv;
9754 {
9755
9756         /* pthread test function */
9757         pthread_t t;
9758         int status;
9759
9760         /* make sure pthread_create() isn't just a stub */
9761 #if HAVE_PTHREADS_D4
9762         status = pthread_create(&t, pthread_attr_default, task, NULL);
9763 #else
9764         status = pthread_create(&t, NULL, task, NULL);
9765 #endif
9766
9767         if( status ) exit( status );
9768
9769         /* make sure pthread_detach() isn't just a stub */
9770 #if HAVE_PTHREADS_D4
9771         status = pthread_detach( &t );
9772 #else
9773         status = pthread_detach( t );
9774 #endif
9775
9776 #ifdef HAVE_LINUX_THREADS
9777         pthread_kill_other_threads_np();
9778 #endif
9779
9780         exit( status );
9781
9782 }
9783
9784 EOF
9785 if { (eval echo configure:9763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9786 then
9787   ol_cv_pthread_create_works=yes
9788 else
9789   echo "configure: failed program was:" >&5
9790   cat conftest.$ac_ext >&5
9791   rm -fr conftest*
9792   ol_cv_pthread_create_works=no
9793 fi
9794 rm -fr conftest*
9795 fi
9796
9797 fi
9798
9799 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9800
9801                         if test $ol_cv_pthread_create_works = no ; then
9802                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9803                         fi
9804
9805                                                 if test $ol_with_yielding_select = auto ; then
9806                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9807 echo "configure:9785: checking if select yields when using pthreads" >&5
9808 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9809   echo $ac_n "(cached) $ac_c" 1>&6
9810 else
9811   
9812                                 if test "$cross_compiling" = yes; then
9813   ol_cv_pthread_select_yields=cross
9814 else
9815   cat > conftest.$ac_ext <<EOF
9816 #line 9794 "configure"
9817 #include "confdefs.h"
9818
9819 #include <sys/types.h>
9820 #include <sys/time.h>
9821 #include <unistd.h>
9822 #include <pthread.h>
9823 #ifndef NULL
9824 #define NULL (void*) 0
9825 #endif
9826
9827 static int fildes[2];
9828
9829 static void *task(p)
9830         void *p;
9831 {
9832         int i;
9833         struct timeval tv;
9834
9835         fd_set rfds;
9836
9837         tv.tv_sec=10;
9838         tv.tv_usec=0;
9839
9840         FD_ZERO(&rfds);
9841         FD_SET(fildes[0], &rfds);
9842
9843         /* we're not interested in any fds */
9844         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9845
9846         if(i < 0) {
9847                 perror("select");
9848                 exit(10);
9849         }
9850
9851         exit(0); /* if we exit here, the select blocked the whole process */
9852 }
9853
9854 int main(argc, argv)
9855         int argc;
9856         char **argv;
9857 {
9858         pthread_t t;
9859
9860         /* create a pipe to select */
9861         if(pipe(&fildes[0])) {
9862                 perror("select");
9863                 exit(1);
9864         }
9865
9866 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9867         (void) pthread_setconcurrency(2);
9868 #else
9869 #ifdef HAVE_THR_SETCONCURRENCY
9870         /* Set Solaris LWP concurrency to 2 */
9871         thr_setconcurrency(2);
9872 #endif
9873 #endif
9874
9875 #if HAVE_PTHREADS_D4
9876         pthread_create(&t, pthread_attr_default, task, NULL);
9877 #else
9878         pthread_create(&t, NULL, task, NULL);
9879 #endif
9880
9881 #if HAVE_SCHED_YIELD
9882         sched_yield();  /* make sure task runs first */
9883 #else
9884 #ifdef HAVE_PTHREAD_YIELD
9885         pthread_yield();        /* make sure task runs first */
9886 #endif
9887 #endif
9888
9889         exit(2);
9890 }
9891 EOF
9892 if { (eval echo configure:9870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9893 then
9894   ol_cv_pthread_select_yields=no
9895 else
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -fr conftest*
9899   ol_cv_pthread_select_yields=yes
9900 fi
9901 rm -fr conftest*
9902 fi
9903
9904 fi
9905
9906 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9907
9908                                 if test $ol_cv_pthread_select_yields = cross ; then
9909                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9910                                 fi
9911
9912                                 if test $ol_cv_pthread_select_yields = yes ; then
9913                                         ol_with_yielding_select=yes
9914                                 fi
9915                         fi
9916
9917                                                 CPPFLAGS="$save_CPPFLAGS"
9918                         LIBS="$save_LIBS"
9919                 else
9920                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9921                 fi
9922         fi
9923
9924         if test $ol_with_threads = posix ; then
9925                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9926         fi
9927 fi
9928
9929 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9930         -o $ol_with_threads = mach ; then
9931
9932                 for ac_hdr in mach/cthreads.h
9933 do
9934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9936 echo "configure:9914: checking for $ac_hdr" >&5
9937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9938   echo $ac_n "(cached) $ac_c" 1>&6
9939 else
9940   cat > conftest.$ac_ext <<EOF
9941 #line 9919 "configure"
9942 #include "confdefs.h"
9943 #include <$ac_hdr>
9944 EOF
9945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9946 { (eval echo configure:9924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9948 if test -z "$ac_err"; then
9949   rm -rf conftest*
9950   eval "ac_cv_header_$ac_safe=yes"
9951 else
9952   echo "$ac_err" >&5
9953   echo "configure: failed program was:" >&5
9954   cat conftest.$ac_ext >&5
9955   rm -rf conftest*
9956   eval "ac_cv_header_$ac_safe=no"
9957 fi
9958 rm -f conftest*
9959 fi
9960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9961   echo "$ac_t""yes" 1>&6
9962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9963   cat >> confdefs.h <<EOF
9964 #define $ac_tr_hdr 1
9965 EOF
9966  
9967 else
9968   echo "$ac_t""no" 1>&6
9969 fi
9970 done
9971
9972         if test $ac_cv_header_mach_cthreads_h = yes ; then
9973                 ol_with_threads=found
9974
9975                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9976 echo "configure:9954: checking for cthread_fork" >&5
9977 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9978   echo $ac_n "(cached) $ac_c" 1>&6
9979 else
9980   cat > conftest.$ac_ext <<EOF
9981 #line 9959 "configure"
9982 #include "confdefs.h"
9983 /* System header to define __stub macros and hopefully few prototypes,
9984     which can conflict with char cthread_fork(); below.  */
9985 #include <assert.h>
9986 /* Override any gcc2 internal prototype to avoid an error.  */
9987 /* We use char because int might match the return type of a gcc2
9988     builtin and then its argument prototype would still apply.  */
9989 char cthread_fork();
9990 char (*f)();
9991
9992 int main() {
9993
9994 /* The GNU C library defines this for functions which it implements
9995     to always fail with ENOSYS.  Some functions are actually named
9996     something starting with __ and the normal name is an alias.  */
9997 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9998 choke me
9999 #else
10000 f = cthread_fork;
10001 #endif
10002
10003 ; return 0; }
10004 EOF
10005 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10006   rm -rf conftest*
10007   eval "ac_cv_func_cthread_fork=yes"
10008 else
10009   echo "configure: failed program was:" >&5
10010   cat conftest.$ac_ext >&5
10011   rm -rf conftest*
10012   eval "ac_cv_func_cthread_fork=no"
10013 fi
10014 rm -f conftest*
10015 fi
10016
10017 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10018   echo "$ac_t""yes" 1>&6
10019   ol_link_threads=yes
10020 else
10021   echo "$ac_t""no" 1>&6
10022 fi
10023
10024
10025                 if test $ol_link_threads = no ; then
10026                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10027 echo "configure:10005: checking for cthread_fork with -all_load" >&5
10028 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10029   echo $ac_n "(cached) $ac_c" 1>&6
10030 else
10031   
10032                                                                 save_LIBS="$LIBS"
10033                                 LIBS="-all_load $LIBS"
10034                                 cat > conftest.$ac_ext <<EOF
10035 #line 10013 "configure"
10036 #include "confdefs.h"
10037 #include <mach/cthreads.h>
10038 int main() {
10039
10040                                         cthread_fork((void *)0, (void *)0);
10041                                         
10042 ; return 0; }
10043 EOF
10044 if { (eval echo configure:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10045   rm -rf conftest*
10046   ol_cv_cthread_all_load=yes
10047 else
10048   echo "configure: failed program was:" >&5
10049   cat conftest.$ac_ext >&5
10050   rm -rf conftest*
10051   ol_cv_cthread_all_load=no
10052 fi
10053 rm -f conftest*
10054                                                                 LIBS="$save_LIBS"
10055                         
10056 fi
10057
10058 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10059
10060                         if test $ol_cv_cthread_all_load = yes ; then
10061                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10062                                 ol_link_threads=mach
10063                         fi
10064                 fi
10065
10066                 if test $ol_link_threads != no ; then
10067                         : check for cthread specific functionality here
10068                         cat >> confdefs.h <<\EOF
10069 #define HAVE_MACH_CTHREADS 1
10070 EOF
10071
10072                 else
10073                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10074                 fi
10075         fi
10076
10077         if test $ol_with_threads = mach ; then
10078                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10079         fi
10080 fi
10081
10082 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10083         -o $ol_with_threads = pth ; then
10084
10085         for ac_hdr in pth.h
10086 do
10087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10089 echo "configure:10067: checking for $ac_hdr" >&5
10090 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10091   echo $ac_n "(cached) $ac_c" 1>&6
10092 else
10093   cat > conftest.$ac_ext <<EOF
10094 #line 10072 "configure"
10095 #include "confdefs.h"
10096 #include <$ac_hdr>
10097 EOF
10098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10099 { (eval echo configure:10077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10101 if test -z "$ac_err"; then
10102   rm -rf conftest*
10103   eval "ac_cv_header_$ac_safe=yes"
10104 else
10105   echo "$ac_err" >&5
10106   echo "configure: failed program was:" >&5
10107   cat conftest.$ac_ext >&5
10108   rm -rf conftest*
10109   eval "ac_cv_header_$ac_safe=no"
10110 fi
10111 rm -f conftest*
10112 fi
10113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10114   echo "$ac_t""yes" 1>&6
10115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10116   cat >> confdefs.h <<EOF
10117 #define $ac_tr_hdr 1
10118 EOF
10119  
10120 else
10121   echo "$ac_t""no" 1>&6
10122 fi
10123 done
10124
10125
10126         if test $ac_cv_header_pth_h = yes ; then
10127                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10128 echo "configure:10106: checking for pth_version in -lpth" >&5
10129 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10130 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10131   echo $ac_n "(cached) $ac_c" 1>&6
10132 else
10133   ac_save_LIBS="$LIBS"
10134 LIBS="-lpth  $LIBS"
10135 cat > conftest.$ac_ext <<EOF
10136 #line 10114 "configure"
10137 #include "confdefs.h"
10138 /* Override any gcc2 internal prototype to avoid an error.  */
10139 /* We use char because int might match the return type of a gcc2
10140     builtin and then its argument prototype would still apply.  */
10141 char pth_version();
10142
10143 int main() {
10144 pth_version()
10145 ; return 0; }
10146 EOF
10147 if { (eval echo configure:10125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10148   rm -rf conftest*
10149   eval "ac_cv_lib_$ac_lib_var=yes"
10150 else
10151   echo "configure: failed program was:" >&5
10152   cat conftest.$ac_ext >&5
10153   rm -rf conftest*
10154   eval "ac_cv_lib_$ac_lib_var=no"
10155 fi
10156 rm -f conftest*
10157 LIBS="$ac_save_LIBS"
10158
10159 fi
10160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10161   echo "$ac_t""yes" 1>&6
10162   have_pth=yes
10163 else
10164   echo "$ac_t""no" 1>&6
10165 have_pth=no
10166 fi
10167
10168
10169                 if test $have_pth = yes ; then
10170                         cat >> confdefs.h <<\EOF
10171 #define HAVE_GNU_PTH 1
10172 EOF
10173
10174                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10175                         ol_link_threads=pth
10176
10177                         if test $ol_with_yielding_select = auto ; then
10178                                 ol_with_yielding_select=yes
10179                         fi
10180                 fi
10181         fi
10182 fi
10183
10184 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10185         -o $ol_with_threads = lwp ; then
10186
10187                 for ac_hdr in thread.h synch.h
10188 do
10189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10191 echo "configure:10169: checking for $ac_hdr" >&5
10192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10193   echo $ac_n "(cached) $ac_c" 1>&6
10194 else
10195   cat > conftest.$ac_ext <<EOF
10196 #line 10174 "configure"
10197 #include "confdefs.h"
10198 #include <$ac_hdr>
10199 EOF
10200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10201 { (eval echo configure:10179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10203 if test -z "$ac_err"; then
10204   rm -rf conftest*
10205   eval "ac_cv_header_$ac_safe=yes"
10206 else
10207   echo "$ac_err" >&5
10208   echo "configure: failed program was:" >&5
10209   cat conftest.$ac_ext >&5
10210   rm -rf conftest*
10211   eval "ac_cv_header_$ac_safe=no"
10212 fi
10213 rm -f conftest*
10214 fi
10215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10216   echo "$ac_t""yes" 1>&6
10217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10218   cat >> confdefs.h <<EOF
10219 #define $ac_tr_hdr 1
10220 EOF
10221  
10222 else
10223   echo "$ac_t""no" 1>&6
10224 fi
10225 done
10226
10227         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10228                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10229 echo "configure:10207: checking for thr_create in -lthread" >&5
10230 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10232   echo $ac_n "(cached) $ac_c" 1>&6
10233 else
10234   ac_save_LIBS="$LIBS"
10235 LIBS="-lthread  $LIBS"
10236 cat > conftest.$ac_ext <<EOF
10237 #line 10215 "configure"
10238 #include "confdefs.h"
10239 /* Override any gcc2 internal prototype to avoid an error.  */
10240 /* We use char because int might match the return type of a gcc2
10241     builtin and then its argument prototype would still apply.  */
10242 char thr_create();
10243
10244 int main() {
10245 thr_create()
10246 ; return 0; }
10247 EOF
10248 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10249   rm -rf conftest*
10250   eval "ac_cv_lib_$ac_lib_var=yes"
10251 else
10252   echo "configure: failed program was:" >&5
10253   cat conftest.$ac_ext >&5
10254   rm -rf conftest*
10255   eval "ac_cv_lib_$ac_lib_var=no"
10256 fi
10257 rm -f conftest*
10258 LIBS="$ac_save_LIBS"
10259
10260 fi
10261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263   have_thr=yes
10264 else
10265   echo "$ac_t""no" 1>&6
10266 have_thr=no
10267 fi
10268
10269
10270                 if test $have_thr = yes ; then
10271                         cat >> confdefs.h <<\EOF
10272 #define HAVE_THR 1
10273 EOF
10274
10275                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10276                         ol_link_threads=thr
10277
10278                         if test $ol_with_yielding_select = auto ; then
10279                                 ol_with_yielding_select=yes
10280                         fi
10281
10282                                                 for ac_func in \
10283                                 thr_setconcurrency \
10284                                 thr_getconcurrency \
10285                         
10286 do
10287 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10288 echo "configure:10266: checking for $ac_func" >&5
10289 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   cat > conftest.$ac_ext <<EOF
10293 #line 10271 "configure"
10294 #include "confdefs.h"
10295 /* System header to define __stub macros and hopefully few prototypes,
10296     which can conflict with char $ac_func(); below.  */
10297 #include <assert.h>
10298 /* Override any gcc2 internal prototype to avoid an error.  */
10299 /* We use char because int might match the return type of a gcc2
10300     builtin and then its argument prototype would still apply.  */
10301 char $ac_func();
10302 char (*f)();
10303
10304 int main() {
10305
10306 /* The GNU C library defines this for functions which it implements
10307     to always fail with ENOSYS.  Some functions are actually named
10308     something starting with __ and the normal name is an alias.  */
10309 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10310 choke me
10311 #else
10312 f = $ac_func;
10313 #endif
10314
10315 ; return 0; }
10316 EOF
10317 if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10318   rm -rf conftest*
10319   eval "ac_cv_func_$ac_func=yes"
10320 else
10321   echo "configure: failed program was:" >&5
10322   cat conftest.$ac_ext >&5
10323   rm -rf conftest*
10324   eval "ac_cv_func_$ac_func=no"
10325 fi
10326 rm -f conftest*
10327 fi
10328
10329 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10330   echo "$ac_t""yes" 1>&6
10331     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10332   cat >> confdefs.h <<EOF
10333 #define $ac_tr_func 1
10334 EOF
10335  
10336 else
10337   echo "$ac_t""no" 1>&6
10338 fi
10339 done
10340
10341                 fi
10342         fi
10343
10344                 for ac_hdr in lwp/lwp.h
10345 do
10346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10348 echo "configure:10326: checking for $ac_hdr" >&5
10349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10350   echo $ac_n "(cached) $ac_c" 1>&6
10351 else
10352   cat > conftest.$ac_ext <<EOF
10353 #line 10331 "configure"
10354 #include "confdefs.h"
10355 #include <$ac_hdr>
10356 EOF
10357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10358 { (eval echo configure:10336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10360 if test -z "$ac_err"; then
10361   rm -rf conftest*
10362   eval "ac_cv_header_$ac_safe=yes"
10363 else
10364   echo "$ac_err" >&5
10365   echo "configure: failed program was:" >&5
10366   cat conftest.$ac_ext >&5
10367   rm -rf conftest*
10368   eval "ac_cv_header_$ac_safe=no"
10369 fi
10370 rm -f conftest*
10371 fi
10372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10373   echo "$ac_t""yes" 1>&6
10374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10375   cat >> confdefs.h <<EOF
10376 #define $ac_tr_hdr 1
10377 EOF
10378  
10379 else
10380   echo "$ac_t""no" 1>&6
10381 fi
10382 done
10383
10384         if test $ac_cv_header_lwp_lwp_h = yes ; then
10385                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10386 echo "configure:10364: checking for lwp_create in -llwp" >&5
10387 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10388 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10389   echo $ac_n "(cached) $ac_c" 1>&6
10390 else
10391   ac_save_LIBS="$LIBS"
10392 LIBS="-llwp  $LIBS"
10393 cat > conftest.$ac_ext <<EOF
10394 #line 10372 "configure"
10395 #include "confdefs.h"
10396 /* Override any gcc2 internal prototype to avoid an error.  */
10397 /* We use char because int might match the return type of a gcc2
10398     builtin and then its argument prototype would still apply.  */
10399 char lwp_create();
10400
10401 int main() {
10402 lwp_create()
10403 ; return 0; }
10404 EOF
10405 if { (eval echo configure:10383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10406   rm -rf conftest*
10407   eval "ac_cv_lib_$ac_lib_var=yes"
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   eval "ac_cv_lib_$ac_lib_var=no"
10413 fi
10414 rm -f conftest*
10415 LIBS="$ac_save_LIBS"
10416
10417 fi
10418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10419   echo "$ac_t""yes" 1>&6
10420   have_lwp=yes
10421 else
10422   echo "$ac_t""no" 1>&6
10423 have_lwp=no
10424 fi
10425
10426
10427                 if test $have_lwp = yes ; then
10428                         cat >> confdefs.h <<\EOF
10429 #define HAVE_LWP 1
10430 EOF
10431
10432                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10433                         ol_link_threads=lwp
10434
10435                         if test $ol_with_yielding_select = auto ; then
10436                                 ol_with_yielding_select=no
10437                         fi
10438                 fi
10439         fi
10440 fi
10441
10442 if test $ol_with_yielding_select = yes ; then
10443         cat >> confdefs.h <<\EOF
10444 #define HAVE_YIELDING_SELECT 1
10445 EOF
10446
10447 fi
10448
10449 if test $ol_with_threads = manual ; then
10450                 ol_link_threads=yes
10451
10452         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10453
10454         for ac_hdr in pthread.h sched.h
10455 do
10456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10458 echo "configure:10436: checking for $ac_hdr" >&5
10459 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10460   echo $ac_n "(cached) $ac_c" 1>&6
10461 else
10462   cat > conftest.$ac_ext <<EOF
10463 #line 10441 "configure"
10464 #include "confdefs.h"
10465 #include <$ac_hdr>
10466 EOF
10467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10468 { (eval echo configure:10446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10470 if test -z "$ac_err"; then
10471   rm -rf conftest*
10472   eval "ac_cv_header_$ac_safe=yes"
10473 else
10474   echo "$ac_err" >&5
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -rf conftest*
10478   eval "ac_cv_header_$ac_safe=no"
10479 fi
10480 rm -f conftest*
10481 fi
10482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10483   echo "$ac_t""yes" 1>&6
10484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10485   cat >> confdefs.h <<EOF
10486 #define $ac_tr_hdr 1
10487 EOF
10488  
10489 else
10490   echo "$ac_t""no" 1>&6
10491 fi
10492 done
10493
10494         for ac_func in sched_yield pthread_yield
10495 do
10496 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10497 echo "configure:10475: checking for $ac_func" >&5
10498 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10499   echo $ac_n "(cached) $ac_c" 1>&6
10500 else
10501   cat > conftest.$ac_ext <<EOF
10502 #line 10480 "configure"
10503 #include "confdefs.h"
10504 /* System header to define __stub macros and hopefully few prototypes,
10505     which can conflict with char $ac_func(); below.  */
10506 #include <assert.h>
10507 /* Override any gcc2 internal prototype to avoid an error.  */
10508 /* We use char because int might match the return type of a gcc2
10509     builtin and then its argument prototype would still apply.  */
10510 char $ac_func();
10511 char (*f)();
10512
10513 int main() {
10514
10515 /* The GNU C library defines this for functions which it implements
10516     to always fail with ENOSYS.  Some functions are actually named
10517     something starting with __ and the normal name is an alias.  */
10518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10519 choke me
10520 #else
10521 f = $ac_func;
10522 #endif
10523
10524 ; return 0; }
10525 EOF
10526 if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10527   rm -rf conftest*
10528   eval "ac_cv_func_$ac_func=yes"
10529 else
10530   echo "configure: failed program was:" >&5
10531   cat conftest.$ac_ext >&5
10532   rm -rf conftest*
10533   eval "ac_cv_func_$ac_func=no"
10534 fi
10535 rm -f conftest*
10536 fi
10537
10538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10539   echo "$ac_t""yes" 1>&6
10540     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10541   cat >> confdefs.h <<EOF
10542 #define $ac_tr_func 1
10543 EOF
10544  
10545 else
10546   echo "$ac_t""no" 1>&6
10547 fi
10548 done
10549
10550         
10551         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10552 echo "configure:10530: checking for LinuxThreads pthread.h" >&5
10553 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10554   echo $ac_n "(cached) $ac_c" 1>&6
10555 else
10556   cat > conftest.$ac_ext <<EOF
10557 #line 10535 "configure"
10558 #include "confdefs.h"
10559 #include <pthread.h>
10560 EOF
10561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10562   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10563   rm -rf conftest*
10564   ol_cv_header_linux_threads=yes
10565 else
10566   rm -rf conftest*
10567   ol_cv_header_linux_threads=no
10568 fi
10569 rm -f conftest*
10570
10571                 
10572 fi
10573
10574 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10575         if test $ol_cv_header_linux_threads = yes; then
10576                 cat >> confdefs.h <<\EOF
10577 #define HAVE_LINUX_THREADS 1
10578 EOF
10579
10580         fi
10581
10582
10583         for ac_hdr in mach/cthreads.h
10584 do
10585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10587 echo "configure:10565: checking for $ac_hdr" >&5
10588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   cat > conftest.$ac_ext <<EOF
10592 #line 10570 "configure"
10593 #include "confdefs.h"
10594 #include <$ac_hdr>
10595 EOF
10596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10597 { (eval echo configure:10575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10599 if test -z "$ac_err"; then
10600   rm -rf conftest*
10601   eval "ac_cv_header_$ac_safe=yes"
10602 else
10603   echo "$ac_err" >&5
10604   echo "configure: failed program was:" >&5
10605   cat conftest.$ac_ext >&5
10606   rm -rf conftest*
10607   eval "ac_cv_header_$ac_safe=no"
10608 fi
10609 rm -f conftest*
10610 fi
10611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10612   echo "$ac_t""yes" 1>&6
10613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10614   cat >> confdefs.h <<EOF
10615 #define $ac_tr_hdr 1
10616 EOF
10617  
10618 else
10619   echo "$ac_t""no" 1>&6
10620 fi
10621 done
10622
10623         for ac_hdr in lwp/lwp.h
10624 do
10625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10627 echo "configure:10605: checking for $ac_hdr" >&5
10628 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10629   echo $ac_n "(cached) $ac_c" 1>&6
10630 else
10631   cat > conftest.$ac_ext <<EOF
10632 #line 10610 "configure"
10633 #include "confdefs.h"
10634 #include <$ac_hdr>
10635 EOF
10636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10637 { (eval echo configure:10615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10639 if test -z "$ac_err"; then
10640   rm -rf conftest*
10641   eval "ac_cv_header_$ac_safe=yes"
10642 else
10643   echo "$ac_err" >&5
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -rf conftest*
10647   eval "ac_cv_header_$ac_safe=no"
10648 fi
10649 rm -f conftest*
10650 fi
10651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10652   echo "$ac_t""yes" 1>&6
10653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10654   cat >> confdefs.h <<EOF
10655 #define $ac_tr_hdr 1
10656 EOF
10657  
10658 else
10659   echo "$ac_t""no" 1>&6
10660 fi
10661 done
10662
10663         for ac_hdr in thread.h synch.h
10664 do
10665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10667 echo "configure:10645: checking for $ac_hdr" >&5
10668 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10669   echo $ac_n "(cached) $ac_c" 1>&6
10670 else
10671   cat > conftest.$ac_ext <<EOF
10672 #line 10650 "configure"
10673 #include "confdefs.h"
10674 #include <$ac_hdr>
10675 EOF
10676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10677 { (eval echo configure:10655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10679 if test -z "$ac_err"; then
10680   rm -rf conftest*
10681   eval "ac_cv_header_$ac_safe=yes"
10682 else
10683   echo "$ac_err" >&5
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -rf conftest*
10687   eval "ac_cv_header_$ac_safe=no"
10688 fi
10689 rm -f conftest*
10690 fi
10691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10692   echo "$ac_t""yes" 1>&6
10693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10694   cat >> confdefs.h <<EOF
10695 #define $ac_tr_hdr 1
10696 EOF
10697  
10698 else
10699   echo "$ac_t""no" 1>&6
10700 fi
10701 done
10702
10703 fi
10704
10705 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10706                         cat >> confdefs.h <<\EOF
10707 #define REENTRANT 1
10708 EOF
10709
10710         cat >> confdefs.h <<\EOF
10711 #define _REENTRANT 1
10712 EOF
10713
10714         cat >> confdefs.h <<\EOF
10715 #define THREAD_SAFE 1
10716 EOF
10717
10718         cat >> confdefs.h <<\EOF
10719 #define _THREAD_SAFE 1
10720 EOF
10721
10722         cat >> confdefs.h <<\EOF
10723 #define THREADSAFE 1
10724 EOF
10725
10726         cat >> confdefs.h <<\EOF
10727 #define _THREADSAFE 1
10728 EOF
10729
10730         cat >> confdefs.h <<\EOF
10731 #define _SGI_MP_SOURCE 1
10732 EOF
10733
10734
10735                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10736 echo "configure:10714: checking for thread specific errno" >&5
10737 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   
10741                 cat > conftest.$ac_ext <<EOF
10742 #line 10720 "configure"
10743 #include "confdefs.h"
10744 #include <errno.h>
10745 int main() {
10746 errno = 0;
10747 ; return 0; }
10748 EOF
10749 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10750   rm -rf conftest*
10751   ol_cv_errno_thread_specific=yes
10752 else
10753   echo "configure: failed program was:" >&5
10754   cat conftest.$ac_ext >&5
10755   rm -rf conftest*
10756   ol_cv_errno_thread_specific=no
10757 fi
10758 rm -f conftest*
10759         
10760 fi
10761
10762 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10763
10764                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10765 echo "configure:10743: checking for thread specific h_errno" >&5
10766 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10767   echo $ac_n "(cached) $ac_c" 1>&6
10768 else
10769   
10770                 cat > conftest.$ac_ext <<EOF
10771 #line 10749 "configure"
10772 #include "confdefs.h"
10773 #include <netdb.h>
10774 int main() {
10775 h_errno = 0;
10776 ; return 0; }
10777 EOF
10778 if { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10779   rm -rf conftest*
10780   ol_cv_h_errno_thread_specific=yes
10781 else
10782   echo "configure: failed program was:" >&5
10783   cat conftest.$ac_ext >&5
10784   rm -rf conftest*
10785   ol_cv_h_errno_thread_specific=no
10786 fi
10787 rm -f conftest*
10788         
10789 fi
10790
10791 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10792
10793         if test $ol_cv_errno_thread_specific != yes \
10794                 -o $ol_cv_h_errno_thread_specific != yes ; then
10795                 LIBS="$LTHREAD_LIBS $LIBS"
10796                 LTHREAD_LIBS=""
10797         fi
10798
10799 fi  
10800
10801 if test $ol_link_threads = no ; then
10802         if test $ol_with_threads = yes ; then
10803                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10804         fi
10805
10806         if test $ol_with_threads = auto ; then
10807                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10808                 ol_with_threads=no
10809         fi
10810
10811         cat >> confdefs.h <<\EOF
10812 #define NO_THREADS 1
10813 EOF
10814
10815         LTHREAD_LIBS=""
10816 fi
10817
10818 if test $ol_link_threads != no ; then
10819         cat >> confdefs.h <<\EOF
10820 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10821 EOF
10822
10823 fi
10824
10825
10826 ol_link_ldbm=no 
10827 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10828         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10829 echo "configure:10807: checking for DB2 library" >&5
10830 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10831   echo $ac_n "(cached) $ac_c" 1>&6
10832 else
10833         ol_LIBS="$LIBS"
10834         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10835 echo "configure:10813: checking for db_appexit in -ldb" >&5
10836 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10837 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   ac_save_LIBS="$LIBS"
10841 LIBS="-ldb  $LIBS"
10842 cat > conftest.$ac_ext <<EOF
10843 #line 10821 "configure"
10844 #include "confdefs.h"
10845 /* Override any gcc2 internal prototype to avoid an error.  */
10846 /* We use char because int might match the return type of a gcc2
10847     builtin and then its argument prototype would still apply.  */
10848 char db_appexit();
10849
10850 int main() {
10851 db_appexit()
10852 ; return 0; }
10853 EOF
10854 if { (eval echo configure:10832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10855   rm -rf conftest*
10856   eval "ac_cv_lib_$ac_lib_var=yes"
10857 else
10858   echo "configure: failed program was:" >&5
10859   cat conftest.$ac_ext >&5
10860   rm -rf conftest*
10861   eval "ac_cv_lib_$ac_lib_var=no"
10862 fi
10863 rm -f conftest*
10864 LIBS="$ac_save_LIBS"
10865
10866 fi
10867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10868   echo "$ac_t""yes" 1>&6
10869   ol_cv_lib_db2=-ldb
10870 else
10871   echo "$ac_t""no" 1>&6
10872 ol_cv_lib_db2=no
10873 fi
10874
10875         LIBS="$ol_LIBS"
10876
10877 fi
10878
10879 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10880
10881 for ac_hdr in db.h
10882 do
10883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10885 echo "configure:10863: checking for $ac_hdr" >&5
10886 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10887   echo $ac_n "(cached) $ac_c" 1>&6
10888 else
10889   cat > conftest.$ac_ext <<EOF
10890 #line 10868 "configure"
10891 #include "confdefs.h"
10892 #include <$ac_hdr>
10893 EOF
10894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10895 { (eval echo configure:10873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10897 if test -z "$ac_err"; then
10898   rm -rf conftest*
10899   eval "ac_cv_header_$ac_safe=yes"
10900 else
10901   echo "$ac_err" >&5
10902   echo "configure: failed program was:" >&5
10903   cat conftest.$ac_ext >&5
10904   rm -rf conftest*
10905   eval "ac_cv_header_$ac_safe=no"
10906 fi
10907 rm -f conftest*
10908 fi
10909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10910   echo "$ac_t""yes" 1>&6
10911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10912   cat >> confdefs.h <<EOF
10913 #define $ac_tr_hdr 1
10914 EOF
10915  
10916 else
10917   echo "$ac_t""no" 1>&6
10918 fi
10919 done
10920
10921 if test $ac_cv_header_db_h = yes ; then
10922         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10923 echo "configure:10901: checking if db.h is DB2" >&5
10924 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10925   echo $ac_n "(cached) $ac_c" 1>&6
10926 else
10927   
10928                 cat > conftest.$ac_ext <<EOF
10929 #line 10907 "configure"
10930 #include "confdefs.h"
10931
10932 #                       include <db.h>
10933                         /* this check could be improved */
10934 #                       ifdef DB_VERSION_MAJOR
10935 #                               if DB_VERSION_MAJOR == 2
10936                                         __db_version_2;
10937 #                               endif
10938 #                       endif
10939                 
10940 EOF
10941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10942   egrep "__db_version_2" >/dev/null 2>&1; then
10943   rm -rf conftest*
10944   ol_cv_header_db2=yes
10945 else
10946   rm -rf conftest*
10947   ol_cv_header_db2=no
10948 fi
10949 rm -f conftest*
10950
10951 fi
10952
10953 echo "$ac_t""$ol_cv_header_db2" 1>&6
10954 else
10955         ol_cv_header_db2=no
10956 fi
10957
10958
10959  
10960  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10961 echo "configure:10939: checking for Berkeley DB2" >&5
10962 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10963   echo $ac_n "(cached) $ac_c" 1>&6
10964 else
10965   
10966         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10967                 ol_cv_berkeley_db2=no
10968         else
10969                 ol_cv_berkeley_db2=yes
10970         fi
10971
10972 fi
10973
10974 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10975  if test $ol_cv_berkeley_db2 = yes ; then
10976         cat >> confdefs.h <<\EOF
10977 #define HAVE_BERKELEY_DB2 1
10978 EOF
10979
10980  fi
10981
10982
10983         if test $ol_cv_berkeley_db2 = yes ; then
10984                 ol_link_ldbm=db2
10985                 ol_with_ldbm_api=db2
10986
10987                 if test $ol_with_ldbm_type = hash ; then
10988                         cat >> confdefs.h <<\EOF
10989 #define LDBM_USE_DBHASH 1
10990 EOF
10991
10992                 else
10993                         cat >> confdefs.h <<\EOF
10994 #define LDBM_USE_DBBTREE 1
10995 EOF
10996
10997                 fi
10998
10999                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11000 echo "configure:10978: checking for DB_THREAD support" >&5
11001 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11002   echo $ac_n "(cached) $ac_c" 1>&6
11003 else
11004   
11005         ol_LIBS="$LIBS"
11006         if test $ol_cv_lib_db2 != yes ; then
11007                 LIBS="$ol_cv_lib_db2"
11008         fi
11009
11010         if test "$cross_compiling" = yes; then
11011   ol_cv_berkeley_db2_db_thread=cross
11012 else
11013   cat > conftest.$ac_ext <<EOF
11014 #line 10992 "configure"
11015 #include "confdefs.h"
11016
11017 #include <db.h>
11018 #ifndef NULL
11019 #define NULL ((void *)0)
11020 #endif
11021 main()
11022 {
11023         int rc;
11024         DB_ENV env;
11025         u_int32_t flags = DB_CREATE | DB_THREAD;
11026
11027         memset( &env, '\0', sizeof(env) );
11028
11029         rc = db_appinit( NULL, NULL, &env, flags );
11030
11031         if( rc == 0 ) {
11032                 db_appexit( &env );
11033         }
11034
11035         return rc;
11036 }
11037 EOF
11038 if { (eval echo configure:11016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11039 then
11040   ol_cv_berkeley_db2_db_thread=yes
11041 else
11042   echo "configure: failed program was:" >&5
11043   cat conftest.$ac_ext >&5
11044   rm -fr conftest*
11045   ol_cv_berkeley_db2_db_thread=no
11046 fi
11047 rm -fr conftest*
11048 fi
11049
11050
11051         LIBS="$ol_LIBS"
11052
11053         if test $ol_cv_berkeley_db2_db_thread != no ; then
11054                 cat >> confdefs.h <<\EOF
11055 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11056 EOF
11057
11058         fi
11059
11060 fi
11061
11062 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11063
11064                                                 if test $ol_cv_lib_db2 != yes ; then
11065                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11066                 fi
11067         fi
11068 fi
11069
11070 ol_link_bdb2=no
11071 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11072         if test $ol_cv_berkeley_db2_db_thread != no ; then
11073                 ol_link_bdb2=yes
11074         else
11075                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11076         fi
11077 fi
11078
11079 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11080         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11081 echo "configure:11059: checking for Berkeley DB library" >&5
11082 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11083   echo $ac_n "(cached) $ac_c" 1>&6
11084 else
11085   
11086         for ac_hdr in db1/db.h
11087 do
11088 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11089 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11090 echo "configure:11068: checking for $ac_hdr" >&5
11091 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11092   echo $ac_n "(cached) $ac_c" 1>&6
11093 else
11094   cat > conftest.$ac_ext <<EOF
11095 #line 11073 "configure"
11096 #include "confdefs.h"
11097 #include <$ac_hdr>
11098 EOF
11099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11100 { (eval echo configure:11078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11102 if test -z "$ac_err"; then
11103   rm -rf conftest*
11104   eval "ac_cv_header_$ac_safe=yes"
11105 else
11106   echo "$ac_err" >&5
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -rf conftest*
11110   eval "ac_cv_header_$ac_safe=no"
11111 fi
11112 rm -f conftest*
11113 fi
11114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11115   echo "$ac_t""yes" 1>&6
11116     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11117   cat >> confdefs.h <<EOF
11118 #define $ac_tr_hdr 1
11119 EOF
11120  
11121 else
11122   echo "$ac_t""no" 1>&6
11123 fi
11124 done
11125
11126         ol_LIBS="$LIBS"
11127         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11128 echo "configure:11106: checking for dbopen" >&5
11129 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11130   echo $ac_n "(cached) $ac_c" 1>&6
11131 else
11132   cat > conftest.$ac_ext <<EOF
11133 #line 11111 "configure"
11134 #include "confdefs.h"
11135 /* System header to define __stub macros and hopefully few prototypes,
11136     which can conflict with char dbopen(); below.  */
11137 #include <assert.h>
11138 /* Override any gcc2 internal prototype to avoid an error.  */
11139 /* We use char because int might match the return type of a gcc2
11140     builtin and then its argument prototype would still apply.  */
11141 char dbopen();
11142 char (*f)();
11143
11144 int main() {
11145
11146 /* The GNU C library defines this for functions which it implements
11147     to always fail with ENOSYS.  Some functions are actually named
11148     something starting with __ and the normal name is an alias.  */
11149 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11150 choke me
11151 #else
11152 f = dbopen;
11153 #endif
11154
11155 ; return 0; }
11156 EOF
11157 if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11158   rm -rf conftest*
11159   eval "ac_cv_func_dbopen=yes"
11160 else
11161   echo "configure: failed program was:" >&5
11162   cat conftest.$ac_ext >&5
11163   rm -rf conftest*
11164   eval "ac_cv_func_dbopen=no"
11165 fi
11166 rm -f conftest*
11167 fi
11168
11169 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11170   echo "$ac_t""yes" 1>&6
11171   ol_cv_lib_db=yes
11172 else
11173   echo "$ac_t""no" 1>&6
11174
11175                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11176 echo "configure:11154: checking for dbopen in -ldb1" >&5
11177 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11179   echo $ac_n "(cached) $ac_c" 1>&6
11180 else
11181   ac_save_LIBS="$LIBS"
11182 LIBS="-ldb1  $LIBS"
11183 cat > conftest.$ac_ext <<EOF
11184 #line 11162 "configure"
11185 #include "confdefs.h"
11186 /* Override any gcc2 internal prototype to avoid an error.  */
11187 /* We use char because int might match the return type of a gcc2
11188     builtin and then its argument prototype would still apply.  */
11189 char dbopen();
11190
11191 int main() {
11192 dbopen()
11193 ; return 0; }
11194 EOF
11195 if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11196   rm -rf conftest*
11197   eval "ac_cv_lib_$ac_lib_var=yes"
11198 else
11199   echo "configure: failed program was:" >&5
11200   cat conftest.$ac_ext >&5
11201   rm -rf conftest*
11202   eval "ac_cv_lib_$ac_lib_var=no"
11203 fi
11204 rm -f conftest*
11205 LIBS="$ac_save_LIBS"
11206
11207 fi
11208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11209   echo "$ac_t""yes" 1>&6
11210   ol_cv_lib_db=-ldb1
11211 else
11212   echo "$ac_t""no" 1>&6
11213
11214                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11215 echo "configure:11193: checking for dbopen in -ldb" >&5
11216 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11218   echo $ac_n "(cached) $ac_c" 1>&6
11219 else
11220   ac_save_LIBS="$LIBS"
11221 LIBS="-ldb  $LIBS"
11222 cat > conftest.$ac_ext <<EOF
11223 #line 11201 "configure"
11224 #include "confdefs.h"
11225 /* Override any gcc2 internal prototype to avoid an error.  */
11226 /* We use char because int might match the return type of a gcc2
11227     builtin and then its argument prototype would still apply.  */
11228 char dbopen();
11229
11230 int main() {
11231 dbopen()
11232 ; return 0; }
11233 EOF
11234 if { (eval echo configure:11212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11235   rm -rf conftest*
11236   eval "ac_cv_lib_$ac_lib_var=yes"
11237 else
11238   echo "configure: failed program was:" >&5
11239   cat conftest.$ac_ext >&5
11240   rm -rf conftest*
11241   eval "ac_cv_lib_$ac_lib_var=no"
11242 fi
11243 rm -f conftest*
11244 LIBS="$ac_save_LIBS"
11245
11246 fi
11247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249   ol_cv_lib_db=-ldb
11250 else
11251   echo "$ac_t""no" 1>&6
11252 ol_cv_lib_db=no
11253 fi
11254
11255                 
11256 fi
11257
11258         
11259 fi
11260
11261         LIBS="$ol_LIBS"
11262
11263 fi
11264
11265 echo "$ac_t""$ol_cv_lib_db" 1>&6
11266
11267
11268 for ac_hdr in db_185.h
11269 do
11270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11272 echo "configure:11250: checking for $ac_hdr" >&5
11273 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11274   echo $ac_n "(cached) $ac_c" 1>&6
11275 else
11276   cat > conftest.$ac_ext <<EOF
11277 #line 11255 "configure"
11278 #include "confdefs.h"
11279 #include <$ac_hdr>
11280 EOF
11281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11282 { (eval echo configure:11260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11284 if test -z "$ac_err"; then
11285   rm -rf conftest*
11286   eval "ac_cv_header_$ac_safe=yes"
11287 else
11288   echo "$ac_err" >&5
11289   echo "configure: failed program was:" >&5
11290   cat conftest.$ac_ext >&5
11291   rm -rf conftest*
11292   eval "ac_cv_header_$ac_safe=no"
11293 fi
11294 rm -f conftest*
11295 fi
11296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11297   echo "$ac_t""yes" 1>&6
11298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11299   cat >> confdefs.h <<EOF
11300 #define $ac_tr_hdr 1
11301 EOF
11302  
11303 else
11304   echo "$ac_t""no" 1>&6
11305 fi
11306 done
11307
11308 if test "$ol_cv_header_db2" = yes ; then
11309         
11310         ol_cv_header_db=$ac_cv_header_db_185_h
11311 else
11312         ol_cv_header_db=$ac_cv_header_db_h
11313 fi
11314
11315
11316  
11317  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11318 echo "configure:11296: checking for Berkeley DB" >&5
11319 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11320   echo $ac_n "(cached) $ac_c" 1>&6
11321 else
11322   
11323         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11324                 ol_cv_berkeley_db=no
11325         else
11326                 ol_cv_berkeley_db=yes
11327         fi
11328
11329 fi
11330
11331 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11332  if test $ol_cv_berkeley_db = yes ; then
11333         cat >> confdefs.h <<\EOF
11334 #define HAVE_BERKELEY_DB 1
11335 EOF
11336
11337  fi
11338
11339
11340         if test $ol_cv_berkeley_db = yes ; then
11341                 ol_link_ldbm=db
11342                 ol_with_ldbm_api=db
11343
11344                 if test $ol_with_ldbm_type = hash ; then
11345                         cat >> confdefs.h <<\EOF
11346 #define LDBM_USE_DBHASH 1
11347 EOF
11348
11349                 else
11350                         cat >> confdefs.h <<\EOF
11351 #define LDBM_USE_DBBTREE 1
11352 EOF
11353
11354                 fi
11355
11356                                                 if test $ol_cv_lib_db != yes ; then
11357                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11358                 fi
11359         fi
11360 fi
11361
11362 if test $ol_with_ldbm_api = manual ; then
11363                 ol_link_ldbm=yes
11364
11365         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11366
11367         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11368 do
11369 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11370 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11371 echo "configure:11349: checking for $ac_hdr" >&5
11372 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11373   echo $ac_n "(cached) $ac_c" 1>&6
11374 else
11375   cat > conftest.$ac_ext <<EOF
11376 #line 11354 "configure"
11377 #include "confdefs.h"
11378 #include <$ac_hdr>
11379 EOF
11380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11381 { (eval echo configure:11359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11383 if test -z "$ac_err"; then
11384   rm -rf conftest*
11385   eval "ac_cv_header_$ac_safe=yes"
11386 else
11387   echo "$ac_err" >&5
11388   echo "configure: failed program was:" >&5
11389   cat conftest.$ac_ext >&5
11390   rm -rf conftest*
11391   eval "ac_cv_header_$ac_safe=no"
11392 fi
11393 rm -f conftest*
11394 fi
11395 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11396   echo "$ac_t""yes" 1>&6
11397     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11398   cat >> confdefs.h <<EOF
11399 #define $ac_tr_hdr 1
11400 EOF
11401  
11402 else
11403   echo "$ac_t""no" 1>&6
11404 fi
11405 done
11406
11407 fi
11408
11409 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11410         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11411         ol_with_ldbm_api=none
11412 fi
11413
11414 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11415         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11416 echo "configure:11394: checking for MDBM library" >&5
11417 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11418   echo $ac_n "(cached) $ac_c" 1>&6
11419 else
11420         ol_LIBS="$LIBS"
11421         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11422 echo "configure:11400: checking for mdbm_set_chain" >&5
11423 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11424   echo $ac_n "(cached) $ac_c" 1>&6
11425 else
11426   cat > conftest.$ac_ext <<EOF
11427 #line 11405 "configure"
11428 #include "confdefs.h"
11429 /* System header to define __stub macros and hopefully few prototypes,
11430     which can conflict with char mdbm_set_chain(); below.  */
11431 #include <assert.h>
11432 /* Override any gcc2 internal prototype to avoid an error.  */
11433 /* We use char because int might match the return type of a gcc2
11434     builtin and then its argument prototype would still apply.  */
11435 char mdbm_set_chain();
11436 char (*f)();
11437
11438 int main() {
11439
11440 /* The GNU C library defines this for functions which it implements
11441     to always fail with ENOSYS.  Some functions are actually named
11442     something starting with __ and the normal name is an alias.  */
11443 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11444 choke me
11445 #else
11446 f = mdbm_set_chain;
11447 #endif
11448
11449 ; return 0; }
11450 EOF
11451 if { (eval echo configure:11429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11452   rm -rf conftest*
11453   eval "ac_cv_func_mdbm_set_chain=yes"
11454 else
11455   echo "configure: failed program was:" >&5
11456   cat conftest.$ac_ext >&5
11457   rm -rf conftest*
11458   eval "ac_cv_func_mdbm_set_chain=no"
11459 fi
11460 rm -f conftest*
11461 fi
11462
11463 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11464   echo "$ac_t""yes" 1>&6
11465   ol_cv_lib_mdbm=yes
11466 else
11467   echo "$ac_t""no" 1>&6
11468
11469                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11470 echo "configure:11448: checking for mdbm_set_chain in -lmdbm" >&5
11471 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11473   echo $ac_n "(cached) $ac_c" 1>&6
11474 else
11475   ac_save_LIBS="$LIBS"
11476 LIBS="-lmdbm  $LIBS"
11477 cat > conftest.$ac_ext <<EOF
11478 #line 11456 "configure"
11479 #include "confdefs.h"
11480 /* Override any gcc2 internal prototype to avoid an error.  */
11481 /* We use char because int might match the return type of a gcc2
11482     builtin and then its argument prototype would still apply.  */
11483 char mdbm_set_chain();
11484
11485 int main() {
11486 mdbm_set_chain()
11487 ; return 0; }
11488 EOF
11489 if { (eval echo configure:11467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11490   rm -rf conftest*
11491   eval "ac_cv_lib_$ac_lib_var=yes"
11492 else
11493   echo "configure: failed program was:" >&5
11494   cat conftest.$ac_ext >&5
11495   rm -rf conftest*
11496   eval "ac_cv_lib_$ac_lib_var=no"
11497 fi
11498 rm -f conftest*
11499 LIBS="$ac_save_LIBS"
11500
11501 fi
11502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11503   echo "$ac_t""yes" 1>&6
11504   ol_cv_lib_mdbm=-lmdbm
11505 else
11506   echo "$ac_t""no" 1>&6
11507 ol_cv_lib_mdbm=no
11508 fi
11509
11510         
11511 fi
11512
11513         LIBS="$ol_LIBS"
11514
11515 fi
11516
11517 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11518
11519
11520  for ac_hdr in mdbm.h
11521 do
11522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11524 echo "configure:11502: checking for $ac_hdr" >&5
11525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11526   echo $ac_n "(cached) $ac_c" 1>&6
11527 else
11528   cat > conftest.$ac_ext <<EOF
11529 #line 11507 "configure"
11530 #include "confdefs.h"
11531 #include <$ac_hdr>
11532 EOF
11533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11534 { (eval echo configure:11512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11536 if test -z "$ac_err"; then
11537   rm -rf conftest*
11538   eval "ac_cv_header_$ac_safe=yes"
11539 else
11540   echo "$ac_err" >&5
11541   echo "configure: failed program was:" >&5
11542   cat conftest.$ac_ext >&5
11543   rm -rf conftest*
11544   eval "ac_cv_header_$ac_safe=no"
11545 fi
11546 rm -f conftest*
11547 fi
11548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11549   echo "$ac_t""yes" 1>&6
11550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11551   cat >> confdefs.h <<EOF
11552 #define $ac_tr_hdr 1
11553 EOF
11554  
11555 else
11556   echo "$ac_t""no" 1>&6
11557 fi
11558 done
11559
11560  echo $ac_n "checking for db""... $ac_c" 1>&6
11561 echo "configure:11539: checking for db" >&5
11562 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11563   echo $ac_n "(cached) $ac_c" 1>&6
11564 else
11565   
11566         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11567                 ol_cv_mdbm=no
11568         else
11569                 ol_cv_mdbm=yes
11570         fi
11571
11572 fi
11573
11574 echo "$ac_t""$ol_cv_mdbm" 1>&6
11575  if test $ol_cv_mdbm = yes ; then
11576         cat >> confdefs.h <<\EOF
11577 #define HAVE_MDBM 1
11578 EOF
11579
11580  fi
11581
11582
11583         if test $ol_cv_mdbm = yes ; then
11584                 ol_link_ldbm=mdbm
11585                 ol_with_ldbm_api=mdbm
11586                 if test $ol_cv_lib_mdbm != yes ; then
11587                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11588                 fi
11589         fi
11590 fi
11591
11592 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11593         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11594 echo "configure:11572: checking for GDBM library" >&5
11595 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11596   echo $ac_n "(cached) $ac_c" 1>&6
11597 else
11598         ol_LIBS="$LIBS"
11599         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11600 echo "configure:11578: checking for gdbm_open" >&5
11601 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11602   echo $ac_n "(cached) $ac_c" 1>&6
11603 else
11604   cat > conftest.$ac_ext <<EOF
11605 #line 11583 "configure"
11606 #include "confdefs.h"
11607 /* System header to define __stub macros and hopefully few prototypes,
11608     which can conflict with char gdbm_open(); below.  */
11609 #include <assert.h>
11610 /* Override any gcc2 internal prototype to avoid an error.  */
11611 /* We use char because int might match the return type of a gcc2
11612     builtin and then its argument prototype would still apply.  */
11613 char gdbm_open();
11614 char (*f)();
11615
11616 int main() {
11617
11618 /* The GNU C library defines this for functions which it implements
11619     to always fail with ENOSYS.  Some functions are actually named
11620     something starting with __ and the normal name is an alias.  */
11621 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11622 choke me
11623 #else
11624 f = gdbm_open;
11625 #endif
11626
11627 ; return 0; }
11628 EOF
11629 if { (eval echo configure:11607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11630   rm -rf conftest*
11631   eval "ac_cv_func_gdbm_open=yes"
11632 else
11633   echo "configure: failed program was:" >&5
11634   cat conftest.$ac_ext >&5
11635   rm -rf conftest*
11636   eval "ac_cv_func_gdbm_open=no"
11637 fi
11638 rm -f conftest*
11639 fi
11640
11641 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11642   echo "$ac_t""yes" 1>&6
11643   ol_cv_lib_gdbm=yes
11644 else
11645   echo "$ac_t""no" 1>&6
11646
11647                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11648 echo "configure:11626: checking for gdbm_open in -lgdbm" >&5
11649 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11650 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11651   echo $ac_n "(cached) $ac_c" 1>&6
11652 else
11653   ac_save_LIBS="$LIBS"
11654 LIBS="-lgdbm  $LIBS"
11655 cat > conftest.$ac_ext <<EOF
11656 #line 11634 "configure"
11657 #include "confdefs.h"
11658 /* Override any gcc2 internal prototype to avoid an error.  */
11659 /* We use char because int might match the return type of a gcc2
11660     builtin and then its argument prototype would still apply.  */
11661 char gdbm_open();
11662
11663 int main() {
11664 gdbm_open()
11665 ; return 0; }
11666 EOF
11667 if { (eval echo configure:11645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11668   rm -rf conftest*
11669   eval "ac_cv_lib_$ac_lib_var=yes"
11670 else
11671   echo "configure: failed program was:" >&5
11672   cat conftest.$ac_ext >&5
11673   rm -rf conftest*
11674   eval "ac_cv_lib_$ac_lib_var=no"
11675 fi
11676 rm -f conftest*
11677 LIBS="$ac_save_LIBS"
11678
11679 fi
11680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11681   echo "$ac_t""yes" 1>&6
11682   ol_cv_lib_gdbm=-lgdbm
11683 else
11684   echo "$ac_t""no" 1>&6
11685 ol_cv_lib_gdbm=no
11686 fi
11687
11688         
11689 fi
11690
11691         LIBS="$ol_LIBS"
11692
11693 fi
11694
11695 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11696
11697
11698  for ac_hdr in gdbm.h
11699 do
11700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11702 echo "configure:11680: checking for $ac_hdr" >&5
11703 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11704   echo $ac_n "(cached) $ac_c" 1>&6
11705 else
11706   cat > conftest.$ac_ext <<EOF
11707 #line 11685 "configure"
11708 #include "confdefs.h"
11709 #include <$ac_hdr>
11710 EOF
11711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11712 { (eval echo configure:11690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11714 if test -z "$ac_err"; then
11715   rm -rf conftest*
11716   eval "ac_cv_header_$ac_safe=yes"
11717 else
11718   echo "$ac_err" >&5
11719   echo "configure: failed program was:" >&5
11720   cat conftest.$ac_ext >&5
11721   rm -rf conftest*
11722   eval "ac_cv_header_$ac_safe=no"
11723 fi
11724 rm -f conftest*
11725 fi
11726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11727   echo "$ac_t""yes" 1>&6
11728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11729   cat >> confdefs.h <<EOF
11730 #define $ac_tr_hdr 1
11731 EOF
11732  
11733 else
11734   echo "$ac_t""no" 1>&6
11735 fi
11736 done
11737
11738  echo $ac_n "checking for db""... $ac_c" 1>&6
11739 echo "configure:11717: checking for db" >&5
11740 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11741   echo $ac_n "(cached) $ac_c" 1>&6
11742 else
11743   
11744         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11745                 ol_cv_gdbm=no
11746         else
11747                 ol_cv_gdbm=yes
11748         fi
11749
11750 fi
11751
11752 echo "$ac_t""$ol_cv_gdbm" 1>&6
11753  if test $ol_cv_gdbm = yes ; then
11754         cat >> confdefs.h <<\EOF
11755 #define HAVE_GDBM 1
11756 EOF
11757
11758  fi
11759
11760
11761         if test $ol_cv_gdbm = yes ; then
11762                 ol_link_ldbm=gdbm
11763                 ol_with_ldbm_api=gdbm
11764
11765                 if test $ol_cv_lib_gdbm != yes ; then
11766                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11767                 fi
11768         fi
11769 fi
11770
11771 if test $ol_with_ldbm_api = auto ; then
11772         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11773 elif test $ol_with_ldbm_api = ndbm ; then
11774         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11775 echo "configure:11753: checking for NDBM library" >&5
11776 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11777   echo $ac_n "(cached) $ac_c" 1>&6
11778 else
11779         ol_LIBS="$LIBS"
11780         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11781 echo "configure:11759: checking for dbm_open" >&5
11782 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11783   echo $ac_n "(cached) $ac_c" 1>&6
11784 else
11785   cat > conftest.$ac_ext <<EOF
11786 #line 11764 "configure"
11787 #include "confdefs.h"
11788 /* System header to define __stub macros and hopefully few prototypes,
11789     which can conflict with char dbm_open(); below.  */
11790 #include <assert.h>
11791 /* Override any gcc2 internal prototype to avoid an error.  */
11792 /* We use char because int might match the return type of a gcc2
11793     builtin and then its argument prototype would still apply.  */
11794 char dbm_open();
11795 char (*f)();
11796
11797 int main() {
11798
11799 /* The GNU C library defines this for functions which it implements
11800     to always fail with ENOSYS.  Some functions are actually named
11801     something starting with __ and the normal name is an alias.  */
11802 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11803 choke me
11804 #else
11805 f = dbm_open;
11806 #endif
11807
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11811   rm -rf conftest*
11812   eval "ac_cv_func_dbm_open=yes"
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   eval "ac_cv_func_dbm_open=no"
11818 fi
11819 rm -f conftest*
11820 fi
11821
11822 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11823   echo "$ac_t""yes" 1>&6
11824   ol_cv_lib_ndbm=yes
11825 else
11826   echo "$ac_t""no" 1>&6
11827
11828                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11829 echo "configure:11807: checking for dbm_open in -lndbm" >&5
11830 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11832   echo $ac_n "(cached) $ac_c" 1>&6
11833 else
11834   ac_save_LIBS="$LIBS"
11835 LIBS="-lndbm  $LIBS"
11836 cat > conftest.$ac_ext <<EOF
11837 #line 11815 "configure"
11838 #include "confdefs.h"
11839 /* Override any gcc2 internal prototype to avoid an error.  */
11840 /* We use char because int might match the return type of a gcc2
11841     builtin and then its argument prototype would still apply.  */
11842 char dbm_open();
11843
11844 int main() {
11845 dbm_open()
11846 ; return 0; }
11847 EOF
11848 if { (eval echo configure:11826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11849   rm -rf conftest*
11850   eval "ac_cv_lib_$ac_lib_var=yes"
11851 else
11852   echo "configure: failed program was:" >&5
11853   cat conftest.$ac_ext >&5
11854   rm -rf conftest*
11855   eval "ac_cv_lib_$ac_lib_var=no"
11856 fi
11857 rm -f conftest*
11858 LIBS="$ac_save_LIBS"
11859
11860 fi
11861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11862   echo "$ac_t""yes" 1>&6
11863   ol_cv_lib_ndbm=-lndbm
11864 else
11865   echo "$ac_t""no" 1>&6
11866
11867                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11868 echo "configure:11846: checking for dbm_open in -ldbm" >&5
11869 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11870 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11871   echo $ac_n "(cached) $ac_c" 1>&6
11872 else
11873   ac_save_LIBS="$LIBS"
11874 LIBS="-ldbm  $LIBS"
11875 cat > conftest.$ac_ext <<EOF
11876 #line 11854 "configure"
11877 #include "confdefs.h"
11878 /* Override any gcc2 internal prototype to avoid an error.  */
11879 /* We use char because int might match the return type of a gcc2
11880     builtin and then its argument prototype would still apply.  */
11881 char dbm_open();
11882
11883 int main() {
11884 dbm_open()
11885 ; return 0; }
11886 EOF
11887 if { (eval echo configure:11865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11888   rm -rf conftest*
11889   eval "ac_cv_lib_$ac_lib_var=yes"
11890 else
11891   echo "configure: failed program was:" >&5
11892   cat conftest.$ac_ext >&5
11893   rm -rf conftest*
11894   eval "ac_cv_lib_$ac_lib_var=no"
11895 fi
11896 rm -f conftest*
11897 LIBS="$ac_save_LIBS"
11898
11899 fi
11900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11901   echo "$ac_t""yes" 1>&6
11902   ol_cv_lib_ndbm=-ldbm
11903 else
11904   echo "$ac_t""no" 1>&6
11905 ol_cv_lib_ndbm=no
11906 fi
11907                 
11908 fi
11909
11910         
11911 fi
11912
11913         LIBS="$ol_LIBS"
11914
11915 fi
11916
11917 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11918
11919
11920  for ac_hdr in ndbm.h
11921 do
11922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11924 echo "configure:11902: checking for $ac_hdr" >&5
11925 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11926   echo $ac_n "(cached) $ac_c" 1>&6
11927 else
11928   cat > conftest.$ac_ext <<EOF
11929 #line 11907 "configure"
11930 #include "confdefs.h"
11931 #include <$ac_hdr>
11932 EOF
11933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11934 { (eval echo configure:11912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11936 if test -z "$ac_err"; then
11937   rm -rf conftest*
11938   eval "ac_cv_header_$ac_safe=yes"
11939 else
11940   echo "$ac_err" >&5
11941   echo "configure: failed program was:" >&5
11942   cat conftest.$ac_ext >&5
11943   rm -rf conftest*
11944   eval "ac_cv_header_$ac_safe=no"
11945 fi
11946 rm -f conftest*
11947 fi
11948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11949   echo "$ac_t""yes" 1>&6
11950     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11951   cat >> confdefs.h <<EOF
11952 #define $ac_tr_hdr 1
11953 EOF
11954  
11955 else
11956   echo "$ac_t""no" 1>&6
11957 fi
11958 done
11959
11960  echo $ac_n "checking for db""... $ac_c" 1>&6
11961 echo "configure:11939: checking for db" >&5
11962 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11963   echo $ac_n "(cached) $ac_c" 1>&6
11964 else
11965   
11966         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11967                 ol_cv_ndbm=no
11968         else
11969                 ol_cv_ndbm=yes
11970         fi
11971
11972 fi
11973
11974 echo "$ac_t""$ol_cv_ndbm" 1>&6
11975  if test $ol_cv_ndbm = yes ; then
11976         cat >> confdefs.h <<\EOF
11977 #define HAVE_NDBM 1
11978 EOF
11979
11980  fi
11981
11982
11983         if test $ol_cv_ndbm = yes ; then
11984                 ol_link_ldbm=ndbm
11985                 ol_with_ldbm_api=ndbm
11986
11987                 if test $ol_cv_lib_ndbm != yes ; then
11988                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11989                 fi
11990         fi
11991 fi
11992
11993 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11994         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11995         if test $ol_enable_ldbm = yes ; then
11996                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11997         fi
11998
11999         echo "configure: warning: disabling LDBM" 1>&2
12000         ol_enable_ldbm=no
12001 fi
12002
12003 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12004         LINK_BINS_DYNAMIC="yes"
12005 else
12006         LINK_BINS_DYNAMIC="no"
12007 fi
12008
12009 if test $ol_enable_wrappers != no ; then
12010         for ac_hdr in tcpd.h
12011 do
12012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12014 echo "configure:11992: checking for $ac_hdr" >&5
12015 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12016   echo $ac_n "(cached) $ac_c" 1>&6
12017 else
12018   cat > conftest.$ac_ext <<EOF
12019 #line 11997 "configure"
12020 #include "confdefs.h"
12021 #include <$ac_hdr>
12022 EOF
12023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12024 { (eval echo configure:12002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12026 if test -z "$ac_err"; then
12027   rm -rf conftest*
12028   eval "ac_cv_header_$ac_safe=yes"
12029 else
12030   echo "$ac_err" >&5
12031   echo "configure: failed program was:" >&5
12032   cat conftest.$ac_ext >&5
12033   rm -rf conftest*
12034   eval "ac_cv_header_$ac_safe=no"
12035 fi
12036 rm -f conftest*
12037 fi
12038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12039   echo "$ac_t""yes" 1>&6
12040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12041   cat >> confdefs.h <<EOF
12042 #define $ac_tr_hdr 1
12043 EOF
12044  
12045 else
12046   echo "$ac_t""no" 1>&6
12047 fi
12048 done
12049
12050
12051         if test $ac_cv_header_tcpd_h != yes ; then
12052                 have_wrappers=no
12053         else
12054                 cat > conftest.$ac_ext <<EOF
12055 #line 12033 "configure"
12056 #include "confdefs.h"
12057
12058 int allow_severity = 0;
12059 int deny_severity  = 0;
12060                 
12061 int main() {
12062 hosts_access()
12063 ; return 0; }
12064 EOF
12065 if { (eval echo configure:12043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12066   rm -rf conftest*
12067   have_wrappers=yes
12068 else
12069   echo "configure: failed program was:" >&5
12070   cat conftest.$ac_ext >&5
12071   rm -rf conftest*
12072   have_wrappers=no
12073 fi
12074 rm -f conftest*
12075         fi
12076
12077         if test $have_wrappers = yes ; then
12078                 cat >> confdefs.h <<\EOF
12079 #define HAVE_TCPD 1
12080 EOF
12081
12082                 WRAP_LIBS="-lwrap"
12083
12084                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12085 echo "configure:12063: checking for main in -lnsl" >&5
12086 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12088   echo $ac_n "(cached) $ac_c" 1>&6
12089 else
12090   ac_save_LIBS="$LIBS"
12091 LIBS="-lnsl  $LIBS"
12092 cat > conftest.$ac_ext <<EOF
12093 #line 12071 "configure"
12094 #include "confdefs.h"
12095
12096 int main() {
12097 main()
12098 ; return 0; }
12099 EOF
12100 if { (eval echo configure:12078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12101   rm -rf conftest*
12102   eval "ac_cv_lib_$ac_lib_var=yes"
12103 else
12104   echo "configure: failed program was:" >&5
12105   cat conftest.$ac_ext >&5
12106   rm -rf conftest*
12107   eval "ac_cv_lib_$ac_lib_var=no"
12108 fi
12109 rm -f conftest*
12110 LIBS="$ac_save_LIBS"
12111
12112 fi
12113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12114   echo "$ac_t""yes" 1>&6
12115     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12116     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12117   cat >> confdefs.h <<EOF
12118 #define $ac_tr_lib 1
12119 EOF
12120
12121   LIBS="-lnsl $LIBS"
12122
12123 else
12124   echo "$ac_t""no" 1>&6
12125 fi
12126
12127         else
12128                 echo "configure: warning: could not find -lwrap" 1>&2
12129                 if test $ol_enable_wrappers = yes ; then
12130                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12131                 fi
12132
12133                 echo "configure: warning: disabling wrappers support" 1>&2
12134                 ol_enable_wrappers=no
12135                 WRAP_LIBS=""
12136         fi
12137 fi
12138
12139 if test $ol_enable_syslog != no ; then
12140         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12141 echo "configure:12119: checking for openlog" >&5
12142 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12143   echo $ac_n "(cached) $ac_c" 1>&6
12144 else
12145   cat > conftest.$ac_ext <<EOF
12146 #line 12124 "configure"
12147 #include "confdefs.h"
12148 /* System header to define __stub macros and hopefully few prototypes,
12149     which can conflict with char openlog(); below.  */
12150 #include <assert.h>
12151 /* Override any gcc2 internal prototype to avoid an error.  */
12152 /* We use char because int might match the return type of a gcc2
12153     builtin and then its argument prototype would still apply.  */
12154 char openlog();
12155 char (*f)();
12156
12157 int main() {
12158
12159 /* The GNU C library defines this for functions which it implements
12160     to always fail with ENOSYS.  Some functions are actually named
12161     something starting with __ and the normal name is an alias.  */
12162 #if defined (__stub_openlog) || defined (__stub___openlog)
12163 choke me
12164 #else
12165 f = openlog;
12166 #endif
12167
12168 ; return 0; }
12169 EOF
12170 if { (eval echo configure:12148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12171   rm -rf conftest*
12172   eval "ac_cv_func_openlog=yes"
12173 else
12174   echo "configure: failed program was:" >&5
12175   cat conftest.$ac_ext >&5
12176   rm -rf conftest*
12177   eval "ac_cv_func_openlog=no"
12178 fi
12179 rm -f conftest*
12180 fi
12181
12182 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12183   echo "$ac_t""yes" 1>&6
12184   :
12185 else
12186   echo "$ac_t""no" 1>&6
12187 fi
12188
12189         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12190                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12191         fi
12192         ol_enable_syslog=$ac_cv_func_openlog
12193 fi
12194
12195 if test $ol_enable_dmalloc != no ; then
12196         for ac_hdr in dmalloc.h
12197 do
12198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12200 echo "configure:12178: checking for $ac_hdr" >&5
12201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12202   echo $ac_n "(cached) $ac_c" 1>&6
12203 else
12204   cat > conftest.$ac_ext <<EOF
12205 #line 12183 "configure"
12206 #include "confdefs.h"
12207 #include <$ac_hdr>
12208 EOF
12209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12210 { (eval echo configure:12188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12212 if test -z "$ac_err"; then
12213   rm -rf conftest*
12214   eval "ac_cv_header_$ac_safe=yes"
12215 else
12216   echo "$ac_err" >&5
12217   echo "configure: failed program was:" >&5
12218   cat conftest.$ac_ext >&5
12219   rm -rf conftest*
12220   eval "ac_cv_header_$ac_safe=no"
12221 fi
12222 rm -f conftest*
12223 fi
12224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12225   echo "$ac_t""yes" 1>&6
12226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12227   cat >> confdefs.h <<EOF
12228 #define $ac_tr_hdr 1
12229 EOF
12230  
12231 else
12232   echo "$ac_t""no" 1>&6
12233 fi
12234 done
12235
12236         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12237 echo "configure:12215: checking for dmalloc_shutdown in -ldmalloc" >&5
12238 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12239 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12240   echo $ac_n "(cached) $ac_c" 1>&6
12241 else
12242   ac_save_LIBS="$LIBS"
12243 LIBS="-ldmalloc  $LIBS"
12244 cat > conftest.$ac_ext <<EOF
12245 #line 12223 "configure"
12246 #include "confdefs.h"
12247 /* Override any gcc2 internal prototype to avoid an error.  */
12248 /* We use char because int might match the return type of a gcc2
12249     builtin and then its argument prototype would still apply.  */
12250 char dmalloc_shutdown();
12251
12252 int main() {
12253 dmalloc_shutdown()
12254 ; return 0; }
12255 EOF
12256 if { (eval echo configure:12234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12257   rm -rf conftest*
12258   eval "ac_cv_lib_$ac_lib_var=yes"
12259 else
12260   echo "configure: failed program was:" >&5
12261   cat conftest.$ac_ext >&5
12262   rm -rf conftest*
12263   eval "ac_cv_lib_$ac_lib_var=no"
12264 fi
12265 rm -f conftest*
12266 LIBS="$ac_save_LIBS"
12267
12268 fi
12269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12270   echo "$ac_t""yes" 1>&6
12271     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12272     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12273   cat >> confdefs.h <<EOF
12274 #define $ac_tr_lib 1
12275 EOF
12276
12277   LIBS="-ldmalloc $LIBS"
12278
12279 else
12280   echo "$ac_t""no" 1>&6
12281 fi
12282
12283 fi
12284
12285 if test $ol_enable_tcl != no ; then
12286         for ac_hdr in tcl.h
12287 do
12288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12290 echo "configure:12268: checking for $ac_hdr" >&5
12291 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12292   echo $ac_n "(cached) $ac_c" 1>&6
12293 else
12294   cat > conftest.$ac_ext <<EOF
12295 #line 12273 "configure"
12296 #include "confdefs.h"
12297 #include <$ac_hdr>
12298 EOF
12299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12300 { (eval echo configure:12278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12302 if test -z "$ac_err"; then
12303   rm -rf conftest*
12304   eval "ac_cv_header_$ac_safe=yes"
12305 else
12306   echo "$ac_err" >&5
12307   echo "configure: failed program was:" >&5
12308   cat conftest.$ac_ext >&5
12309   rm -rf conftest*
12310   eval "ac_cv_header_$ac_safe=no"
12311 fi
12312 rm -f conftest*
12313 fi
12314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12315   echo "$ac_t""yes" 1>&6
12316     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12317   cat >> confdefs.h <<EOF
12318 #define $ac_tr_hdr 1
12319 EOF
12320  
12321 else
12322   echo "$ac_t""no" 1>&6
12323 fi
12324 done
12325
12326
12327         if test $ac_cv_header_tcl_h != yes ; then
12328                 have_tcl=no
12329         else
12330                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12331                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12332 echo "configure:12310: checking for main in -l$lib" >&5
12333 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12335   echo $ac_n "(cached) $ac_c" 1>&6
12336 else
12337   ac_save_LIBS="$LIBS"
12338 LIBS="-l$lib  $LIBS"
12339 cat > conftest.$ac_ext <<EOF
12340 #line 12318 "configure"
12341 #include "confdefs.h"
12342
12343 int main() {
12344 main()
12345 ; return 0; }
12346 EOF
12347 if { (eval echo configure:12325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12348   rm -rf conftest*
12349   eval "ac_cv_lib_$ac_lib_var=yes"
12350 else
12351   echo "configure: failed program was:" >&5
12352   cat conftest.$ac_ext >&5
12353   rm -rf conftest*
12354   eval "ac_cv_lib_$ac_lib_var=no"
12355 fi
12356 rm -f conftest*
12357 LIBS="$ac_save_LIBS"
12358
12359 fi
12360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12361   echo "$ac_t""yes" 1>&6
12362   have_tcl=yes
12363                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12364                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12365                            else
12366                                MOD_TCL_LIB="-l${lib}"
12367                            fi;break
12368 else
12369   echo "$ac_t""no" 1>&6
12370 have_tcl=no
12371 fi
12372
12373                 done
12374         fi
12375
12376         if test $have_tcl != yes ; then
12377                 echo "configure: warning: could not find -ltcl" 1>&2
12378                 if test $ol_enable_tcl = yes ; then
12379                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12380                 fi
12381
12382                 ol_enable_tcl=no
12383         fi
12384 fi
12385
12386 ol_link_termcap=no
12387 for ac_hdr in termcap.h ncurses.h
12388 do
12389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12391 echo "configure:12369: checking for $ac_hdr" >&5
12392 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12393   echo $ac_n "(cached) $ac_c" 1>&6
12394 else
12395   cat > conftest.$ac_ext <<EOF
12396 #line 12374 "configure"
12397 #include "confdefs.h"
12398 #include <$ac_hdr>
12399 EOF
12400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12401 { (eval echo configure:12379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12403 if test -z "$ac_err"; then
12404   rm -rf conftest*
12405   eval "ac_cv_header_$ac_safe=yes"
12406 else
12407   echo "$ac_err" >&5
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -rf conftest*
12411   eval "ac_cv_header_$ac_safe=no"
12412 fi
12413 rm -f conftest*
12414 fi
12415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12416   echo "$ac_t""yes" 1>&6
12417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12418   cat >> confdefs.h <<EOF
12419 #define $ac_tr_hdr 1
12420 EOF
12421  
12422 else
12423   echo "$ac_t""no" 1>&6
12424 fi
12425 done
12426
12427
12428 if test $ol_link_termcap = no ; then
12429         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12430 echo "configure:12408: checking for tputs in -ltermcap" >&5
12431 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12432 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12433   echo $ac_n "(cached) $ac_c" 1>&6
12434 else
12435   ac_save_LIBS="$LIBS"
12436 LIBS="-ltermcap  $LIBS"
12437 cat > conftest.$ac_ext <<EOF
12438 #line 12416 "configure"
12439 #include "confdefs.h"
12440 /* Override any gcc2 internal prototype to avoid an error.  */
12441 /* We use char because int might match the return type of a gcc2
12442     builtin and then its argument prototype would still apply.  */
12443 char tputs();
12444
12445 int main() {
12446 tputs()
12447 ; return 0; }
12448 EOF
12449 if { (eval echo configure:12427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12450   rm -rf conftest*
12451   eval "ac_cv_lib_$ac_lib_var=yes"
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -rf conftest*
12456   eval "ac_cv_lib_$ac_lib_var=no"
12457 fi
12458 rm -f conftest*
12459 LIBS="$ac_save_LIBS"
12460
12461 fi
12462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12463   echo "$ac_t""yes" 1>&6
12464   have_termcap=yes
12465 else
12466   echo "$ac_t""no" 1>&6
12467 have_termcap=no
12468 fi
12469
12470         if test $have_termcap = yes ; then
12471                 cat >> confdefs.h <<\EOF
12472 #define HAVE_TERMCAP 1
12473 EOF
12474
12475                 ol_link_termcap=yes
12476                 TERMCAP_LIBS=-ltermcap
12477         fi
12478 fi
12479
12480 if test $ol_link_termcap = no ; then
12481         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12482 echo "configure:12460: checking for initscr in -lncurses" >&5
12483 ac_lib_var=`echo ncurses'_'initscr | 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="-lncurses  $LIBS"
12489 cat > conftest.$ac_ext <<EOF
12490 #line 12468 "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 initscr();
12496
12497 int main() {
12498 initscr()
12499 ; return 0; }
12500 EOF
12501 if { (eval echo configure:12479: \"$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   have_ncurses=yes
12517 else
12518   echo "$ac_t""no" 1>&6
12519 have_ncurses=no
12520 fi
12521
12522         if test $have_ncurses = yes ; then
12523                 cat >> confdefs.h <<\EOF
12524 #define HAVE_NCURSES 1
12525 EOF
12526
12527                 ol_link_termcap=yes
12528                 TERMCAP_LIBS=-lncurses
12529         fi
12530 fi
12531
12532 if test $ol_link_termcap = no ; then
12533         cat >> confdefs.h <<\EOF
12534 #define NO_TERMCAP 1
12535 EOF
12536
12537         TERMCAP_LIBS=
12538 fi
12539
12540 ol_link_sasl=no
12541 if test $ol_with_cyrus_sasl != no ; then
12542         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12543 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12544 echo "configure:12522: checking for sasl.h" >&5
12545 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12546   echo $ac_n "(cached) $ac_c" 1>&6
12547 else
12548   cat > conftest.$ac_ext <<EOF
12549 #line 12527 "configure"
12550 #include "confdefs.h"
12551 #include <sasl.h>
12552 EOF
12553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12554 { (eval echo configure:12532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12556 if test -z "$ac_err"; then
12557   rm -rf conftest*
12558   eval "ac_cv_header_$ac_safe=yes"
12559 else
12560   echo "$ac_err" >&5
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   eval "ac_cv_header_$ac_safe=no"
12565 fi
12566 rm -f conftest*
12567 fi
12568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12569   echo "$ac_t""yes" 1>&6
12570   :
12571 else
12572   echo "$ac_t""no" 1>&6
12573 fi
12574
12575
12576         if test $ac_cv_header_sasl_h = yes ; then
12577                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12578 echo "configure:12556: checking for sasl_client_init in -lsasl" >&5
12579 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12580 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12581   echo $ac_n "(cached) $ac_c" 1>&6
12582 else
12583   ac_save_LIBS="$LIBS"
12584 LIBS="-lsasl  $LIBS"
12585 cat > conftest.$ac_ext <<EOF
12586 #line 12564 "configure"
12587 #include "confdefs.h"
12588 /* Override any gcc2 internal prototype to avoid an error.  */
12589 /* We use char because int might match the return type of a gcc2
12590     builtin and then its argument prototype would still apply.  */
12591 char sasl_client_init();
12592
12593 int main() {
12594 sasl_client_init()
12595 ; return 0; }
12596 EOF
12597 if { (eval echo configure:12575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12598   rm -rf conftest*
12599   eval "ac_cv_lib_$ac_lib_var=yes"
12600 else
12601   echo "configure: failed program was:" >&5
12602   cat conftest.$ac_ext >&5
12603   rm -rf conftest*
12604   eval "ac_cv_lib_$ac_lib_var=no"
12605 fi
12606 rm -f conftest*
12607 LIBS="$ac_save_LIBS"
12608
12609 fi
12610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12611   echo "$ac_t""yes" 1>&6
12612   have_cyrus_sasl=yes
12613 else
12614   echo "$ac_t""no" 1>&6
12615 have_cyrus_sasl=no
12616 fi
12617
12618
12619                 if test $have_cyrus_sasl != no ; then
12620                         SASL_LIBS="-lsasl"
12621                         cat >> confdefs.h <<\EOF
12622 #define HAVE_CYRUS_SASL 1
12623 EOF
12624
12625                         ol_link_sasl=yes
12626                 fi
12627         fi
12628
12629         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12630                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12631         fi
12632 fi
12633
12634 if test $cross_compiling != yes ; then
12635         dev=no
12636         if test -r /dev/urandom ; then
12637                 dev="/dev/urandom";
12638         elif test -r /idev/urandom ; then
12639                 dev="/idev/urandom";
12640         elif test -r /dev/srandom ; then
12641                 dev="/dev/srandom";
12642         elif test -r /dev/random ; then
12643                 dev="/dev/random";
12644         elif test -r /idev/random ; then
12645                 dev="/idev/random";
12646         fi
12647
12648         if test $dev != no ; then
12649                 cat >> confdefs.h <<EOF
12650 #define URANDOM_DEVICE "$dev"
12651 EOF
12652
12653         fi
12654 fi
12655
12656 ol_link_fetch=no
12657 if test $ol_with_fetch != no ; then
12658         ol=$LIBS
12659 LIBS="-lfetch -lcom_err $LIBS"
12660 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12661 echo "configure:12639: checking fetch(3) library" >&5
12662 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12663   echo $ac_n "(cached) $ac_c" 1>&6
12664 else
12665   
12666         cat > conftest.$ac_ext <<EOF
12667 #line 12645 "configure"
12668 #include "confdefs.h"
12669
12670 #include <sys/param.h>
12671 #include <stdio.h>
12672 #include <fetch.h>
12673 int main() {
12674 struct url *u = fetchParseURL("file:///"); 
12675 ; return 0; }
12676 EOF
12677 if { (eval echo configure:12655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12678   rm -rf conftest*
12679   ol_cv_lib_fetch=yes
12680 else
12681   echo "configure: failed program was:" >&5
12682   cat conftest.$ac_ext >&5
12683   rm -rf conftest*
12684   ol_cv_lib_fetch=no
12685 fi
12686 rm -f conftest*
12687 fi
12688
12689 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12690 LIBS=$ol_LIBS
12691 if test $ol_cv_lib_fetch != no ; then
12692         ol_link_fetch="-lfetch -lcom_err"
12693         cat >> confdefs.h <<\EOF
12694 #define HAVE_FETCH 1
12695 EOF
12696
12697 fi
12698
12699
12700         if test $ol_cv_lib_fetch != no ; then
12701                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12702                 ol_link_fetch=freebsd
12703
12704         elif test $ol_with_fetch != auto ; then
12705                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12706         fi 
12707 fi
12708
12709 ol_link_readline=no
12710 if test $ol_with_readline != no ; then
12711         for ac_hdr in readline/readline.h readline/history.h
12712 do
12713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12715 echo "configure:12693: checking for $ac_hdr" >&5
12716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12717   echo $ac_n "(cached) $ac_c" 1>&6
12718 else
12719   cat > conftest.$ac_ext <<EOF
12720 #line 12698 "configure"
12721 #include "confdefs.h"
12722 #include <$ac_hdr>
12723 EOF
12724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12725 { (eval echo configure:12703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12727 if test -z "$ac_err"; then
12728   rm -rf conftest*
12729   eval "ac_cv_header_$ac_safe=yes"
12730 else
12731   echo "$ac_err" >&5
12732   echo "configure: failed program was:" >&5
12733   cat conftest.$ac_ext >&5
12734   rm -rf conftest*
12735   eval "ac_cv_header_$ac_safe=no"
12736 fi
12737 rm -f conftest*
12738 fi
12739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12740   echo "$ac_t""yes" 1>&6
12741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12742   cat >> confdefs.h <<EOF
12743 #define $ac_tr_hdr 1
12744 EOF
12745  
12746 else
12747   echo "$ac_t""no" 1>&6
12748 fi
12749 done
12750
12751
12752         if test $ac_cv_header_readline_readline_h = yes ; then
12753                 save_LIBS="$LIBS"
12754                 LIBS="$TERMCAP_LIBS $LIBS"
12755                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12756 echo "configure:12734: checking for readline in -lreadline" >&5
12757 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12758 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12759   echo $ac_n "(cached) $ac_c" 1>&6
12760 else
12761   ac_save_LIBS="$LIBS"
12762 LIBS="-lreadline  $LIBS"
12763 cat > conftest.$ac_ext <<EOF
12764 #line 12742 "configure"
12765 #include "confdefs.h"
12766 /* Override any gcc2 internal prototype to avoid an error.  */
12767 /* We use char because int might match the return type of a gcc2
12768     builtin and then its argument prototype would still apply.  */
12769 char readline();
12770
12771 int main() {
12772 readline()
12773 ; return 0; }
12774 EOF
12775 if { (eval echo configure:12753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12776   rm -rf conftest*
12777   eval "ac_cv_lib_$ac_lib_var=yes"
12778 else
12779   echo "configure: failed program was:" >&5
12780   cat conftest.$ac_ext >&5
12781   rm -rf conftest*
12782   eval "ac_cv_lib_$ac_lib_var=no"
12783 fi
12784 rm -f conftest*
12785 LIBS="$ac_save_LIBS"
12786
12787 fi
12788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12789   echo "$ac_t""yes" 1>&6
12790   have_readline=yes
12791 else
12792   echo "$ac_t""no" 1>&6
12793 have_readline=no
12794 fi
12795
12796                 LIBS="$save_LIBS"
12797                         
12798                 if test $have_readline = yes ; then
12799                         ol_with_readline=found
12800                         ol_link_readline=yes
12801
12802                         READLINE_LIBS="-lreadline"
12803                 fi
12804         fi
12805 fi
12806
12807 if test $ol_link_readline = yes ; then
12808         cat >> confdefs.h <<\EOF
12809 #define HAVE_READLINE 1
12810 EOF
12811
12812 fi
12813
12814
12815 if test $ol_enable_crypt != no ; then
12816         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12817 echo "configure:12795: checking for crypt" >&5
12818 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12819   echo $ac_n "(cached) $ac_c" 1>&6
12820 else
12821   cat > conftest.$ac_ext <<EOF
12822 #line 12800 "configure"
12823 #include "confdefs.h"
12824 /* System header to define __stub macros and hopefully few prototypes,
12825     which can conflict with char crypt(); below.  */
12826 #include <assert.h>
12827 /* Override any gcc2 internal prototype to avoid an error.  */
12828 /* We use char because int might match the return type of a gcc2
12829     builtin and then its argument prototype would still apply.  */
12830 char crypt();
12831 char (*f)();
12832
12833 int main() {
12834
12835 /* The GNU C library defines this for functions which it implements
12836     to always fail with ENOSYS.  Some functions are actually named
12837     something starting with __ and the normal name is an alias.  */
12838 #if defined (__stub_crypt) || defined (__stub___crypt)
12839 choke me
12840 #else
12841 f = crypt;
12842 #endif
12843
12844 ; return 0; }
12845 EOF
12846 if { (eval echo configure:12824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12847   rm -rf conftest*
12848   eval "ac_cv_func_crypt=yes"
12849 else
12850   echo "configure: failed program was:" >&5
12851   cat conftest.$ac_ext >&5
12852   rm -rf conftest*
12853   eval "ac_cv_func_crypt=no"
12854 fi
12855 rm -f conftest*
12856 fi
12857
12858 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12859   echo "$ac_t""yes" 1>&6
12860   have_crypt=yes
12861 else
12862   echo "$ac_t""no" 1>&6
12863
12864                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12865 echo "configure:12843: checking for crypt in -lcrypt" >&5
12866 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12867 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12868   echo $ac_n "(cached) $ac_c" 1>&6
12869 else
12870   ac_save_LIBS="$LIBS"
12871 LIBS="-lcrypt  $LIBS"
12872 cat > conftest.$ac_ext <<EOF
12873 #line 12851 "configure"
12874 #include "confdefs.h"
12875 /* Override any gcc2 internal prototype to avoid an error.  */
12876 /* We use char because int might match the return type of a gcc2
12877     builtin and then its argument prototype would still apply.  */
12878 char crypt();
12879
12880 int main() {
12881 crypt()
12882 ; return 0; }
12883 EOF
12884 if { (eval echo configure:12862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12885   rm -rf conftest*
12886   eval "ac_cv_lib_$ac_lib_var=yes"
12887 else
12888   echo "configure: failed program was:" >&5
12889   cat conftest.$ac_ext >&5
12890   rm -rf conftest*
12891   eval "ac_cv_lib_$ac_lib_var=no"
12892 fi
12893 rm -f conftest*
12894 LIBS="$ac_save_LIBS"
12895
12896 fi
12897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12898   echo "$ac_t""yes" 1>&6
12899   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12900                         have_crypt=yes
12901 else
12902   echo "$ac_t""no" 1>&6
12903 have_crypt=no
12904 fi
12905
12906 fi
12907
12908
12909         if test $have_crypt = yes ; then
12910                 cat >> confdefs.h <<\EOF
12911 #define HAVE_CRYPT 1
12912 EOF
12913
12914         else
12915                 echo "configure: warning: could not find crypt" 1>&2
12916                 if test $ol_enable_crypt = yes ; then
12917                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12918                 fi
12919
12920                 echo "configure: warning: disabling crypt support" 1>&2
12921                 ol_enable_crypt=no
12922         fi
12923 fi
12924
12925 if test $ol_enable_proctitle != no ; then
12926         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12927 echo "configure:12905: checking for setproctitle" >&5
12928 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12929   echo $ac_n "(cached) $ac_c" 1>&6
12930 else
12931   cat > conftest.$ac_ext <<EOF
12932 #line 12910 "configure"
12933 #include "confdefs.h"
12934 /* System header to define __stub macros and hopefully few prototypes,
12935     which can conflict with char setproctitle(); below.  */
12936 #include <assert.h>
12937 /* Override any gcc2 internal prototype to avoid an error.  */
12938 /* We use char because int might match the return type of a gcc2
12939     builtin and then its argument prototype would still apply.  */
12940 char setproctitle();
12941 char (*f)();
12942
12943 int main() {
12944
12945 /* The GNU C library defines this for functions which it implements
12946     to always fail with ENOSYS.  Some functions are actually named
12947     something starting with __ and the normal name is an alias.  */
12948 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12949 choke me
12950 #else
12951 f = setproctitle;
12952 #endif
12953
12954 ; return 0; }
12955 EOF
12956 if { (eval echo configure:12934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12957   rm -rf conftest*
12958   eval "ac_cv_func_setproctitle=yes"
12959 else
12960   echo "configure: failed program was:" >&5
12961   cat conftest.$ac_ext >&5
12962   rm -rf conftest*
12963   eval "ac_cv_func_setproctitle=no"
12964 fi
12965 rm -f conftest*
12966 fi
12967
12968 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12969   echo "$ac_t""yes" 1>&6
12970   have_setproctitle=yes
12971 else
12972   echo "$ac_t""no" 1>&6
12973
12974                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12975 echo "configure:12953: checking for setproctitle in -lutil" >&5
12976 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12978   echo $ac_n "(cached) $ac_c" 1>&6
12979 else
12980   ac_save_LIBS="$LIBS"
12981 LIBS="-lutil  $LIBS"
12982 cat > conftest.$ac_ext <<EOF
12983 #line 12961 "configure"
12984 #include "confdefs.h"
12985 /* Override any gcc2 internal prototype to avoid an error.  */
12986 /* We use char because int might match the return type of a gcc2
12987     builtin and then its argument prototype would still apply.  */
12988 char setproctitle();
12989
12990 int main() {
12991 setproctitle()
12992 ; return 0; }
12993 EOF
12994 if { (eval echo configure:12972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12995   rm -rf conftest*
12996   eval "ac_cv_lib_$ac_lib_var=yes"
12997 else
12998   echo "configure: failed program was:" >&5
12999   cat conftest.$ac_ext >&5
13000   rm -rf conftest*
13001   eval "ac_cv_lib_$ac_lib_var=no"
13002 fi
13003 rm -f conftest*
13004 LIBS="$ac_save_LIBS"
13005
13006 fi
13007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13008   echo "$ac_t""yes" 1>&6
13009   have_setproctitle=yes
13010                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13011 else
13012   echo "$ac_t""no" 1>&6
13013 have_setproctitle=no
13014                         LIBOBJS="$LIBOBJS setproctitle.o"
13015                         LIBSRCS="$LIBSRCS setproctitle.c"
13016 fi
13017
13018 fi
13019
13020
13021         if test $have_setproctitle = yes ; then
13022                 cat >> confdefs.h <<\EOF
13023 #define HAVE_SETPROCTITLE 1
13024 EOF
13025
13026         fi
13027 fi
13028
13029 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13030 echo "configure:13008: checking for ANSI C header files" >&5
13031 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13032   echo $ac_n "(cached) $ac_c" 1>&6
13033 else
13034   cat > conftest.$ac_ext <<EOF
13035 #line 13013 "configure"
13036 #include "confdefs.h"
13037 #include <stdlib.h>
13038 #include <stdarg.h>
13039 #include <string.h>
13040 #include <float.h>
13041 EOF
13042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13043 { (eval echo configure:13021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13045 if test -z "$ac_err"; then
13046   rm -rf conftest*
13047   ac_cv_header_stdc=yes
13048 else
13049   echo "$ac_err" >&5
13050   echo "configure: failed program was:" >&5
13051   cat conftest.$ac_ext >&5
13052   rm -rf conftest*
13053   ac_cv_header_stdc=no
13054 fi
13055 rm -f conftest*
13056
13057 if test $ac_cv_header_stdc = yes; then
13058   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13059 cat > conftest.$ac_ext <<EOF
13060 #line 13038 "configure"
13061 #include "confdefs.h"
13062 #include <string.h>
13063 EOF
13064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13065   egrep "memchr" >/dev/null 2>&1; then
13066   :
13067 else
13068   rm -rf conftest*
13069   ac_cv_header_stdc=no
13070 fi
13071 rm -f conftest*
13072
13073 fi
13074
13075 if test $ac_cv_header_stdc = yes; then
13076   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13077 cat > conftest.$ac_ext <<EOF
13078 #line 13056 "configure"
13079 #include "confdefs.h"
13080 #include <stdlib.h>
13081 EOF
13082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13083   egrep "free" >/dev/null 2>&1; then
13084   :
13085 else
13086   rm -rf conftest*
13087   ac_cv_header_stdc=no
13088 fi
13089 rm -f conftest*
13090
13091 fi
13092
13093 if test $ac_cv_header_stdc = yes; then
13094   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13095 if test "$cross_compiling" = yes; then
13096   :
13097 else
13098   cat > conftest.$ac_ext <<EOF
13099 #line 13077 "configure"
13100 #include "confdefs.h"
13101 #include <ctype.h>
13102 #if ((' ' & 0x0FF) == 0x020)
13103 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13104 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13105 #else
13106 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13107  || ('j' <= (c) && (c) <= 'r') \
13108  || ('s' <= (c) && (c) <= 'z'))
13109 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13110 #endif
13111 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13112 int main () { int i; for (i = 0; i < 256; i++)
13113 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13114 exit (0); }
13115
13116 EOF
13117 if { (eval echo configure:13095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13118 then
13119   :
13120 else
13121   echo "configure: failed program was:" >&5
13122   cat conftest.$ac_ext >&5
13123   rm -fr conftest*
13124   ac_cv_header_stdc=no
13125 fi
13126 rm -fr conftest*
13127 fi
13128
13129 fi
13130 fi
13131
13132 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13133 if test $ac_cv_header_stdc = yes; then
13134   cat >> confdefs.h <<\EOF
13135 #define STDC_HEADERS 1
13136 EOF
13137
13138 fi
13139
13140 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13141 echo "configure:13119: checking for mode_t" >&5
13142 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13143   echo $ac_n "(cached) $ac_c" 1>&6
13144 else
13145   cat > conftest.$ac_ext <<EOF
13146 #line 13124 "configure"
13147 #include "confdefs.h"
13148 #include <sys/types.h>
13149 #if STDC_HEADERS
13150 #include <stdlib.h>
13151 #include <stddef.h>
13152 #endif
13153
13154 EOF
13155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13156   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13157   rm -rf conftest*
13158   eval "ac_cv_type_mode_t=yes"
13159 else
13160   rm -rf conftest*
13161   eval "ac_cv_type_mode_t=no"
13162 fi
13163 rm -f conftest*
13164
13165 fi
13166 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13167   echo "$ac_t""yes" 1>&6
13168 else
13169   echo "$ac_t""no" 1>&6
13170   cat >> confdefs.h <<EOF
13171 #define mode_t int
13172 EOF
13173
13174 fi
13175
13176 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13177 echo "configure:13155: checking for off_t" >&5
13178 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13179   echo $ac_n "(cached) $ac_c" 1>&6
13180 else
13181   cat > conftest.$ac_ext <<EOF
13182 #line 13160 "configure"
13183 #include "confdefs.h"
13184 #include <sys/types.h>
13185 #if STDC_HEADERS
13186 #include <stdlib.h>
13187 #include <stddef.h>
13188 #endif
13189
13190 EOF
13191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13192   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13193   rm -rf conftest*
13194   eval "ac_cv_type_off_t=yes"
13195 else
13196   rm -rf conftest*
13197   eval "ac_cv_type_off_t=no"
13198 fi
13199 rm -f conftest*
13200
13201 fi
13202 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13203   echo "$ac_t""yes" 1>&6
13204 else
13205   echo "$ac_t""no" 1>&6
13206   cat >> confdefs.h <<EOF
13207 #define off_t long
13208 EOF
13209
13210 fi
13211
13212 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13213 echo "configure:13191: checking for pid_t" >&5
13214 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13215   echo $ac_n "(cached) $ac_c" 1>&6
13216 else
13217   cat > conftest.$ac_ext <<EOF
13218 #line 13196 "configure"
13219 #include "confdefs.h"
13220 #include <sys/types.h>
13221 #if STDC_HEADERS
13222 #include <stdlib.h>
13223 #include <stddef.h>
13224 #endif
13225
13226 EOF
13227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13228   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13229   rm -rf conftest*
13230   eval "ac_cv_type_pid_t=yes"
13231 else
13232   rm -rf conftest*
13233   eval "ac_cv_type_pid_t=no"
13234 fi
13235 rm -f conftest*
13236
13237 fi
13238 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13239   echo "$ac_t""yes" 1>&6
13240 else
13241   echo "$ac_t""no" 1>&6
13242   cat >> confdefs.h <<EOF
13243 #define pid_t int
13244 EOF
13245
13246 fi
13247
13248 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13249 echo "configure:13227: checking for ptrdiff_t" >&5
13250 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13251   echo $ac_n "(cached) $ac_c" 1>&6
13252 else
13253   cat > conftest.$ac_ext <<EOF
13254 #line 13232 "configure"
13255 #include "confdefs.h"
13256 #include <stddef.h>
13257 int main() {
13258 ptrdiff_t p
13259 ; return 0; }
13260 EOF
13261 if { (eval echo configure:13239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13262   rm -rf conftest*
13263   am_cv_type_ptrdiff_t=yes
13264 else
13265   echo "configure: failed program was:" >&5
13266   cat conftest.$ac_ext >&5
13267   rm -rf conftest*
13268   am_cv_type_ptrdiff_t=no
13269 fi
13270 rm -f conftest*
13271 fi
13272
13273 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13274    if test $am_cv_type_ptrdiff_t = yes; then
13275      cat >> confdefs.h <<\EOF
13276 #define HAVE_PTRDIFF_T 1
13277 EOF
13278
13279    fi
13280
13281 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13282 echo "configure:13260: checking return type of signal handlers" >&5
13283 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13284   echo $ac_n "(cached) $ac_c" 1>&6
13285 else
13286   cat > conftest.$ac_ext <<EOF
13287 #line 13265 "configure"
13288 #include "confdefs.h"
13289 #include <sys/types.h>
13290 #include <signal.h>
13291 #ifdef signal
13292 #undef signal
13293 #endif
13294 #ifdef __cplusplus
13295 extern "C" void (*signal (int, void (*)(int)))(int);
13296 #else
13297 void (*signal ()) ();
13298 #endif
13299
13300 int main() {
13301 int i;
13302 ; return 0; }
13303 EOF
13304 if { (eval echo configure:13282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13305   rm -rf conftest*
13306   ac_cv_type_signal=void
13307 else
13308   echo "configure: failed program was:" >&5
13309   cat conftest.$ac_ext >&5
13310   rm -rf conftest*
13311   ac_cv_type_signal=int
13312 fi
13313 rm -f conftest*
13314 fi
13315
13316 echo "$ac_t""$ac_cv_type_signal" 1>&6
13317 cat >> confdefs.h <<EOF
13318 #define RETSIGTYPE $ac_cv_type_signal
13319 EOF
13320
13321
13322 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13323 echo "configure:13301: checking for size_t" >&5
13324 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13325   echo $ac_n "(cached) $ac_c" 1>&6
13326 else
13327   cat > conftest.$ac_ext <<EOF
13328 #line 13306 "configure"
13329 #include "confdefs.h"
13330 #include <sys/types.h>
13331 #if STDC_HEADERS
13332 #include <stdlib.h>
13333 #include <stddef.h>
13334 #endif
13335
13336 EOF
13337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13338   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13339   rm -rf conftest*
13340   eval "ac_cv_type_size_t=yes"
13341 else
13342   rm -rf conftest*
13343   eval "ac_cv_type_size_t=no"
13344 fi
13345 rm -f conftest*
13346
13347 fi
13348 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13349   echo "$ac_t""yes" 1>&6
13350 else
13351   echo "$ac_t""no" 1>&6
13352   cat >> confdefs.h <<EOF
13353 #define size_t unsigned
13354 EOF
13355
13356 fi
13357
13358
13359 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13360 echo "configure:13338: checking for ssize_t" >&5
13361 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13362   echo $ac_n "(cached) $ac_c" 1>&6
13363 else
13364   cat > conftest.$ac_ext <<EOF
13365 #line 13343 "configure"
13366 #include "confdefs.h"
13367 #include <sys/types.h>
13368 #if STDC_HEADERS
13369 #include <stdlib.h>
13370 #include <stddef.h>
13371 #endif
13372
13373 EOF
13374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13375   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13376   rm -rf conftest*
13377   eval "ac_cv_type_ssize_t=yes"
13378 else
13379   rm -rf conftest*
13380   eval "ac_cv_type_ssize_t=no"
13381 fi
13382 rm -f conftest*
13383
13384 fi
13385 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13386   echo "$ac_t""yes" 1>&6
13387 else
13388   echo "$ac_t""no" 1>&6
13389   cat >> confdefs.h <<EOF
13390 #define ssize_t signed int
13391 EOF
13392
13393 fi
13394
13395 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13396 echo "configure:13374: checking for caddr_t" >&5
13397 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13398   echo $ac_n "(cached) $ac_c" 1>&6
13399 else
13400   cat > conftest.$ac_ext <<EOF
13401 #line 13379 "configure"
13402 #include "confdefs.h"
13403 #include <sys/types.h>
13404 #if STDC_HEADERS
13405 #include <stdlib.h>
13406 #include <stddef.h>
13407 #endif
13408
13409 EOF
13410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13411   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13412   rm -rf conftest*
13413   eval "ac_cv_type_caddr_t=yes"
13414 else
13415   rm -rf conftest*
13416   eval "ac_cv_type_caddr_t=no"
13417 fi
13418 rm -f conftest*
13419
13420 fi
13421 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13422   echo "$ac_t""yes" 1>&6
13423 else
13424   echo "$ac_t""no" 1>&6
13425   cat >> confdefs.h <<EOF
13426 #define caddr_t char *
13427 EOF
13428
13429 fi
13430
13431
13432 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13433 echo "configure:13411: checking for socklen_t" >&5
13434 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13435   echo $ac_n "(cached) $ac_c" 1>&6
13436 else
13437   cat > conftest.$ac_ext <<EOF
13438 #line 13416 "configure"
13439 #include "confdefs.h"
13440
13441 #ifdef HAVE_SYS_TYPES_H
13442 #include <sys/types.h>
13443 #endif
13444 #ifdef HAVE_SYS_SOCKET_H
13445 #include <sys/socket.h>
13446 #endif
13447
13448 int main() {
13449 socklen_t len;
13450 ; return 0; }
13451 EOF
13452 if { (eval echo configure:13430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13453   rm -rf conftest*
13454   ol_cv_type_socklen_t=yes
13455 else
13456   echo "configure: failed program was:" >&5
13457   cat conftest.$ac_ext >&5
13458   rm -rf conftest*
13459   ol_cv_type_socklen_t=no
13460 fi
13461 rm -f conftest*
13462 fi
13463
13464 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13465   if test $ol_cv_type_socklen_t = no; then
13466     cat >> confdefs.h <<\EOF
13467 #define socklen_t int
13468 EOF
13469
13470   fi
13471  
13472 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13473 echo "configure:13451: checking for member st_blksize in aggregate type struct stat" >&5
13474 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13475   echo $ac_n "(cached) $ac_c" 1>&6
13476 else
13477   cat > conftest.$ac_ext <<EOF
13478 #line 13456 "configure"
13479 #include "confdefs.h"
13480 #include <sys/types.h>
13481 #include <sys/stat.h>
13482 int main() {
13483 struct stat foo; foo.st_blksize;
13484 ; return 0; }
13485 EOF
13486 if { (eval echo configure:13464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13487   rm -rf conftest*
13488   ac_cv_c_struct_member_st_blksize=yes
13489 else
13490   echo "configure: failed program was:" >&5
13491   cat conftest.$ac_ext >&5
13492   rm -rf conftest*
13493   ac_cv_c_struct_member_st_blksize=no
13494 fi
13495 rm -f conftest*
13496 fi
13497
13498 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13499 st_blksize="$ac_cv_c_struct_member_st_blksize"
13500 if test $ac_cv_c_struct_member_st_blksize = yes; then
13501   cat >> confdefs.h <<\EOF
13502 #define HAVE_ST_BLKSIZE 1
13503 EOF
13504
13505 fi
13506
13507 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13508 echo "configure:13486: checking whether time.h and sys/time.h may both be included" >&5
13509 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13510   echo $ac_n "(cached) $ac_c" 1>&6
13511 else
13512   cat > conftest.$ac_ext <<EOF
13513 #line 13491 "configure"
13514 #include "confdefs.h"
13515 #include <sys/types.h>
13516 #include <sys/time.h>
13517 #include <time.h>
13518 int main() {
13519 struct tm *tp;
13520 ; return 0; }
13521 EOF
13522 if { (eval echo configure:13500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13523   rm -rf conftest*
13524   ac_cv_header_time=yes
13525 else
13526   echo "configure: failed program was:" >&5
13527   cat conftest.$ac_ext >&5
13528   rm -rf conftest*
13529   ac_cv_header_time=no
13530 fi
13531 rm -f conftest*
13532 fi
13533
13534 echo "$ac_t""$ac_cv_header_time" 1>&6
13535 if test $ac_cv_header_time = yes; then
13536   cat >> confdefs.h <<\EOF
13537 #define TIME_WITH_SYS_TIME 1
13538 EOF
13539
13540 fi
13541
13542 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13543 echo "configure:13521: checking whether struct tm is in sys/time.h or time.h" >&5
13544 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13545   echo $ac_n "(cached) $ac_c" 1>&6
13546 else
13547   cat > conftest.$ac_ext <<EOF
13548 #line 13526 "configure"
13549 #include "confdefs.h"
13550 #include <sys/types.h>
13551 #include <time.h>
13552 int main() {
13553 struct tm *tp; tp->tm_sec;
13554 ; return 0; }
13555 EOF
13556 if { (eval echo configure:13534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13557   rm -rf conftest*
13558   ac_cv_struct_tm=time.h
13559 else
13560   echo "configure: failed program was:" >&5
13561   cat conftest.$ac_ext >&5
13562   rm -rf conftest*
13563   ac_cv_struct_tm=sys/time.h
13564 fi
13565 rm -f conftest*
13566 fi
13567
13568 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13569 if test $ac_cv_struct_tm = sys/time.h; then
13570   cat >> confdefs.h <<\EOF
13571 #define TM_IN_SYS_TIME 1
13572 EOF
13573
13574 fi
13575
13576 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13577 echo "configure:13555: checking for uid_t in sys/types.h" >&5
13578 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13579   echo $ac_n "(cached) $ac_c" 1>&6
13580 else
13581   cat > conftest.$ac_ext <<EOF
13582 #line 13560 "configure"
13583 #include "confdefs.h"
13584 #include <sys/types.h>
13585 EOF
13586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13587   egrep "uid_t" >/dev/null 2>&1; then
13588   rm -rf conftest*
13589   ac_cv_type_uid_t=yes
13590 else
13591   rm -rf conftest*
13592   ac_cv_type_uid_t=no
13593 fi
13594 rm -f conftest*
13595
13596 fi
13597
13598 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13599 if test $ac_cv_type_uid_t = no; then
13600   cat >> confdefs.h <<\EOF
13601 #define uid_t int
13602 EOF
13603
13604   cat >> confdefs.h <<\EOF
13605 #define gid_t int
13606 EOF
13607
13608 fi
13609
13610 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13611 echo "configure:13589: checking for sig_atomic_t" >&5
13612 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13613   echo $ac_n "(cached) $ac_c" 1>&6
13614 else
13615   cat > conftest.$ac_ext <<EOF
13616 #line 13594 "configure"
13617 #include "confdefs.h"
13618 #include <signal.h>
13619 int main() {
13620 sig_atomic_t atomic;
13621 ; return 0; }
13622 EOF
13623 if { (eval echo configure:13601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13624   rm -rf conftest*
13625   ol_cv_type_sig_atomic_t=yes
13626 else
13627   echo "configure: failed program was:" >&5
13628   cat conftest.$ac_ext >&5
13629   rm -rf conftest*
13630   ol_cv_type_sig_atomic_t=no
13631 fi
13632 rm -f conftest*
13633 fi
13634
13635 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13636   if test $ol_cv_type_sig_atomic_t = no; then
13637     cat >> confdefs.h <<\EOF
13638 #define sig_atomic_t int
13639 EOF
13640
13641   fi
13642  
13643
13644
13645 # test for pw_gecos in struct passwd
13646 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13647 echo "configure:13625: checking struct passwd for pw_gecos" >&5
13648 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13649   echo $ac_n "(cached) $ac_c" 1>&6
13650 else
13651   
13652         cat > conftest.$ac_ext <<EOF
13653 #line 13631 "configure"
13654 #include "confdefs.h"
13655 #include <pwd.h>
13656 int main() {
13657
13658         struct passwd pwd;
13659         pwd.pw_gecos = pwd.pw_name;
13660
13661 ; return 0; }
13662 EOF
13663 if { (eval echo configure:13641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13664   rm -rf conftest*
13665   ol_cv_struct_passwd_pw_gecos=yes
13666 else
13667   echo "configure: failed program was:" >&5
13668   cat conftest.$ac_ext >&5
13669   rm -rf conftest*
13670   ol_cv_struct_passwd_pw_gecos=no
13671 fi
13672 rm -f conftest*
13673 fi
13674
13675 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13676 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13677         cat >> confdefs.h <<\EOF
13678 #define HAVE_PW_GECOS 1
13679 EOF
13680
13681 fi
13682
13683 # test for pw_passwd in struct passwd
13684 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13685 echo "configure:13663: checking struct passwd for pw_passwd" >&5
13686 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13687   echo $ac_n "(cached) $ac_c" 1>&6
13688 else
13689   
13690         cat > conftest.$ac_ext <<EOF
13691 #line 13669 "configure"
13692 #include "confdefs.h"
13693 #include <pwd.h>
13694 int main() {
13695
13696         struct passwd pwd;
13697         pwd.pw_passwd = pwd.pw_name;
13698
13699 ; return 0; }
13700 EOF
13701 if { (eval echo configure:13679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13702   rm -rf conftest*
13703   ol_cv_struct_passwd_pw_passwd=yes
13704 else
13705   echo "configure: failed program was:" >&5
13706   cat conftest.$ac_ext >&5
13707   rm -rf conftest*
13708   ol_cv_struct_passwd_pw_passwd=no
13709 fi
13710 rm -f conftest*
13711 fi
13712
13713 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13714 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13715         cat >> confdefs.h <<\EOF
13716 #define HAVE_PW_PASSWD 1
13717 EOF
13718
13719 fi
13720
13721
13722 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13723 echo "configure:13701: checking if toupper() requires islower()" >&5
13724 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13725   echo $ac_n "(cached) $ac_c" 1>&6
13726 else
13727   
13728         if test "$cross_compiling" = yes; then
13729   ol_cv_c_upper_lower=safe
13730 else
13731   cat > conftest.$ac_ext <<EOF
13732 #line 13710 "configure"
13733 #include "confdefs.h"
13734
13735 #include <ctype.h>
13736 main()
13737 {
13738         if ('C' == toupper('C'))
13739                 exit(0);
13740         else
13741                 exit(1);
13742 }
13743 EOF
13744 if { (eval echo configure:13722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13745 then
13746   ol_cv_c_upper_lower=no
13747 else
13748   echo "configure: failed program was:" >&5
13749   cat conftest.$ac_ext >&5
13750   rm -fr conftest*
13751   ol_cv_c_upper_lower=yes
13752 fi
13753 rm -fr conftest*
13754 fi
13755
13756 fi
13757
13758 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13759 if test $ol_cv_c_upper_lower != no ; then
13760         cat >> confdefs.h <<\EOF
13761 #define C_UPPER_LOWER 1
13762 EOF
13763
13764 fi
13765
13766 echo $ac_n "checking for working const""... $ac_c" 1>&6
13767 echo "configure:13745: checking for working const" >&5
13768 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13769   echo $ac_n "(cached) $ac_c" 1>&6
13770 else
13771   cat > conftest.$ac_ext <<EOF
13772 #line 13750 "configure"
13773 #include "confdefs.h"
13774
13775 int main() {
13776
13777 /* Ultrix mips cc rejects this.  */
13778 typedef int charset[2]; const charset x;
13779 /* SunOS 4.1.1 cc rejects this.  */
13780 char const *const *ccp;
13781 char **p;
13782 /* NEC SVR4.0.2 mips cc rejects this.  */
13783 struct point {int x, y;};
13784 static struct point const zero = {0,0};
13785 /* AIX XL C 1.02.0.0 rejects this.
13786    It does not let you subtract one const X* pointer from another in an arm
13787    of an if-expression whose if-part is not a constant expression */
13788 const char *g = "string";
13789 ccp = &g + (g ? g-g : 0);
13790 /* HPUX 7.0 cc rejects these. */
13791 ++ccp;
13792 p = (char**) ccp;
13793 ccp = (char const *const *) p;
13794 { /* SCO 3.2v4 cc rejects this.  */
13795   char *t;
13796   char const *s = 0 ? (char *) 0 : (char const *) 0;
13797
13798   *t++ = 0;
13799 }
13800 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13801   int x[] = {25, 17};
13802   const int *foo = &x[0];
13803   ++foo;
13804 }
13805 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13806   typedef const int *iptr;
13807   iptr p = 0;
13808   ++p;
13809 }
13810 { /* AIX XL C 1.02.0.0 rejects this saying
13811      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13812   struct s { int j; const int *ap[3]; };
13813   struct s *b; b->j = 5;
13814 }
13815 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13816   const int foo = 10;
13817 }
13818
13819 ; return 0; }
13820 EOF
13821 if { (eval echo configure:13799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13822   rm -rf conftest*
13823   ac_cv_c_const=yes
13824 else
13825   echo "configure: failed program was:" >&5
13826   cat conftest.$ac_ext >&5
13827   rm -rf conftest*
13828   ac_cv_c_const=no
13829 fi
13830 rm -f conftest*
13831 fi
13832
13833 echo "$ac_t""$ac_cv_c_const" 1>&6
13834 if test $ac_cv_c_const = no; then
13835   cat >> confdefs.h <<\EOF
13836 #define const 
13837 EOF
13838
13839 fi
13840
13841 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13842 echo "configure:13820: checking if compiler understands volatile" >&5
13843 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13844   echo $ac_n "(cached) $ac_c" 1>&6
13845 else
13846   cat > conftest.$ac_ext <<EOF
13847 #line 13825 "configure"
13848 #include "confdefs.h"
13849 int x, y, z;
13850 int main() {
13851 volatile int a; int * volatile b = x ? &y : &z;
13852       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13853       *b = 0;
13854 ; return 0; }
13855 EOF
13856 if { (eval echo configure:13834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13857   rm -rf conftest*
13858   ol_cv_c_volatile=yes
13859 else
13860   echo "configure: failed program was:" >&5
13861   cat conftest.$ac_ext >&5
13862   rm -rf conftest*
13863   ol_cv_c_volatile=no
13864 fi
13865 rm -f conftest*
13866 fi
13867
13868 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13869   if test $ol_cv_c_volatile = yes; then
13870     : 
13871   else
13872     cat >> confdefs.h <<\EOF
13873 #define volatile 
13874 EOF
13875
13876   fi
13877  
13878
13879 if test $cross_compiling = yes ; then
13880         cat >> confdefs.h <<\EOF
13881 #define CROSS_COMPILING 1
13882 EOF
13883
13884 else
13885         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13886 echo "configure:13864: checking whether byte ordering is bigendian" >&5
13887 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13888   echo $ac_n "(cached) $ac_c" 1>&6
13889 else
13890   ac_cv_c_bigendian=unknown
13891 # See if sys/param.h defines the BYTE_ORDER macro.
13892 cat > conftest.$ac_ext <<EOF
13893 #line 13871 "configure"
13894 #include "confdefs.h"
13895 #include <sys/types.h>
13896 #include <sys/param.h>
13897 int main() {
13898
13899 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13900  bogus endian macros
13901 #endif
13902 ; return 0; }
13903 EOF
13904 if { (eval echo configure:13882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13905   rm -rf conftest*
13906   # It does; now see whether it defined to BIG_ENDIAN or not.
13907 cat > conftest.$ac_ext <<EOF
13908 #line 13886 "configure"
13909 #include "confdefs.h"
13910 #include <sys/types.h>
13911 #include <sys/param.h>
13912 int main() {
13913
13914 #if BYTE_ORDER != BIG_ENDIAN
13915  not big endian
13916 #endif
13917 ; return 0; }
13918 EOF
13919 if { (eval echo configure:13897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13920   rm -rf conftest*
13921   ac_cv_c_bigendian=yes
13922 else
13923   echo "configure: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   rm -rf conftest*
13926   ac_cv_c_bigendian=no
13927 fi
13928 rm -f conftest*
13929 else
13930   echo "configure: failed program was:" >&5
13931   cat conftest.$ac_ext >&5
13932 fi
13933 rm -f conftest*
13934 if test $ac_cv_c_bigendian = unknown; then
13935 if test "$cross_compiling" = yes; then
13936     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13937 else
13938   cat > conftest.$ac_ext <<EOF
13939 #line 13917 "configure"
13940 #include "confdefs.h"
13941 main () {
13942   /* Are we little or big endian?  From Harbison&Steele.  */
13943   union
13944   {
13945     long l;
13946     char c[sizeof (long)];
13947   } u;
13948   u.l = 1;
13949   exit (u.c[sizeof (long) - 1] == 1);
13950 }
13951 EOF
13952 if { (eval echo configure:13930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13953 then
13954   ac_cv_c_bigendian=no
13955 else
13956   echo "configure: failed program was:" >&5
13957   cat conftest.$ac_ext >&5
13958   rm -fr conftest*
13959   ac_cv_c_bigendian=yes
13960 fi
13961 rm -fr conftest*
13962 fi
13963
13964 fi
13965 fi
13966
13967 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13968 if test $ac_cv_c_bigendian = yes; then
13969   cat >> confdefs.h <<\EOF
13970 #define WORDS_BIGENDIAN 1
13971 EOF
13972
13973 fi
13974
13975 fi
13976
13977 echo $ac_n "checking size of short""... $ac_c" 1>&6
13978 echo "configure:13956: checking size of short" >&5 
13979 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13980   echo $ac_n "(cached) $ac_c" 1>&6
13981 else
13982   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13962 "configure"
13985 #include "confdefs.h"
13986 #include "confdefs.h" 
13987 #include <sys/types.h> 
13988  
13989
13990 int main() {
13991 switch (0) case 0: case (sizeof (short) == $ac_size):;
13992 ; return 0; }
13993 EOF
13994 if { (eval echo configure:13972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13995   rm -rf conftest*
13996   ac_cv_sizeof_short=$ac_size
13997 else
13998   echo "configure: failed program was:" >&5
13999   cat conftest.$ac_ext >&5
14000 fi
14001 rm -f conftest* 
14002   if test x$ac_cv_sizeof_short != x ; then break; fi 
14003 done 
14004
14005 fi
14006  
14007 if test x$ac_cv_sizeof_short = x ; then 
14008   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14009 fi 
14010 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14011 cat >> confdefs.h <<EOF
14012 #define SIZEOF_SHORT $ac_cv_sizeof_short
14013 EOF
14014  
14015  
14016 echo $ac_n "checking size of int""... $ac_c" 1>&6
14017 echo "configure:13995: checking size of int" >&5 
14018 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14019   echo $ac_n "(cached) $ac_c" 1>&6
14020 else
14021   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14022   cat > conftest.$ac_ext <<EOF
14023 #line 14001 "configure"
14024 #include "confdefs.h"
14025 #include "confdefs.h" 
14026 #include <sys/types.h> 
14027  
14028
14029 int main() {
14030 switch (0) case 0: case (sizeof (int) == $ac_size):;
14031 ; return 0; }
14032 EOF
14033 if { (eval echo configure:14011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14034   rm -rf conftest*
14035   ac_cv_sizeof_int=$ac_size
14036 else
14037   echo "configure: failed program was:" >&5
14038   cat conftest.$ac_ext >&5
14039 fi
14040 rm -f conftest* 
14041   if test x$ac_cv_sizeof_int != x ; then break; fi 
14042 done 
14043
14044 fi
14045  
14046 if test x$ac_cv_sizeof_int = x ; then 
14047   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14048 fi 
14049 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14050 cat >> confdefs.h <<EOF
14051 #define SIZEOF_INT $ac_cv_sizeof_int
14052 EOF
14053  
14054  
14055 echo $ac_n "checking size of long""... $ac_c" 1>&6
14056 echo "configure:14034: checking size of long" >&5 
14057 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14058   echo $ac_n "(cached) $ac_c" 1>&6
14059 else
14060   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14061   cat > conftest.$ac_ext <<EOF
14062 #line 14040 "configure"
14063 #include "confdefs.h"
14064 #include "confdefs.h" 
14065 #include <sys/types.h> 
14066  
14067
14068 int main() {
14069 switch (0) case 0: case (sizeof (long) == $ac_size):;
14070 ; return 0; }
14071 EOF
14072 if { (eval echo configure:14050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14073   rm -rf conftest*
14074   ac_cv_sizeof_long=$ac_size
14075 else
14076   echo "configure: failed program was:" >&5
14077   cat conftest.$ac_ext >&5
14078 fi
14079 rm -f conftest* 
14080   if test x$ac_cv_sizeof_long != x ; then break; fi 
14081 done 
14082
14083 fi
14084  
14085 if test x$ac_cv_sizeof_long = x ; then 
14086   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14087 fi 
14088 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14089 cat >> confdefs.h <<EOF
14090 #define SIZEOF_LONG $ac_cv_sizeof_long
14091 EOF
14092  
14093
14094
14095 if test "$ac_cv_sizeof_int" -lt 4 ; then
14096         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14097
14098         cat >> confdefs.h <<\EOF
14099 #define LBER_INT_T long
14100 EOF
14101
14102 else
14103         cat >> confdefs.h <<\EOF
14104 #define LBER_INT_T int
14105 EOF
14106
14107 fi
14108
14109 cat >> confdefs.h <<\EOF
14110 #define LBER_LEN_T long
14111 EOF
14112
14113 cat >> confdefs.h <<\EOF
14114 #define LBER_SOCKET_T int
14115 EOF
14116
14117 cat >> confdefs.h <<\EOF
14118 #define LBER_TAG_T long
14119 EOF
14120
14121
14122 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14123 echo "configure:14101: checking for 8-bit clean memcmp" >&5
14124 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14125   echo $ac_n "(cached) $ac_c" 1>&6
14126 else
14127   if test "$cross_compiling" = yes; then
14128   ac_cv_func_memcmp_clean=no
14129 else
14130   cat > conftest.$ac_ext <<EOF
14131 #line 14109 "configure"
14132 #include "confdefs.h"
14133
14134 main()
14135 {
14136   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14137   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14138 }
14139
14140 EOF
14141 if { (eval echo configure:14119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14142 then
14143   ac_cv_func_memcmp_clean=yes
14144 else
14145   echo "configure: failed program was:" >&5
14146   cat conftest.$ac_ext >&5
14147   rm -fr conftest*
14148   ac_cv_func_memcmp_clean=no
14149 fi
14150 rm -fr conftest*
14151 fi
14152
14153 fi
14154
14155 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14156 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14157
14158 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14159 echo "configure:14137: checking for strftime" >&5
14160 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14161   echo $ac_n "(cached) $ac_c" 1>&6
14162 else
14163   cat > conftest.$ac_ext <<EOF
14164 #line 14142 "configure"
14165 #include "confdefs.h"
14166 /* System header to define __stub macros and hopefully few prototypes,
14167     which can conflict with char strftime(); below.  */
14168 #include <assert.h>
14169 /* Override any gcc2 internal prototype to avoid an error.  */
14170 /* We use char because int might match the return type of a gcc2
14171     builtin and then its argument prototype would still apply.  */
14172 char strftime();
14173 char (*f)();
14174
14175 int main() {
14176
14177 /* The GNU C library defines this for functions which it implements
14178     to always fail with ENOSYS.  Some functions are actually named
14179     something starting with __ and the normal name is an alias.  */
14180 #if defined (__stub_strftime) || defined (__stub___strftime)
14181 choke me
14182 #else
14183 f = strftime;
14184 #endif
14185
14186 ; return 0; }
14187 EOF
14188 if { (eval echo configure:14166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14189   rm -rf conftest*
14190   eval "ac_cv_func_strftime=yes"
14191 else
14192   echo "configure: failed program was:" >&5
14193   cat conftest.$ac_ext >&5
14194   rm -rf conftest*
14195   eval "ac_cv_func_strftime=no"
14196 fi
14197 rm -f conftest*
14198 fi
14199
14200 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14201   echo "$ac_t""yes" 1>&6
14202   cat >> confdefs.h <<\EOF
14203 #define HAVE_STRFTIME 1
14204 EOF
14205
14206 else
14207   echo "$ac_t""no" 1>&6
14208 # strftime is in -lintl on SCO UNIX.
14209 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14210 echo "configure:14188: checking for strftime in -lintl" >&5
14211 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14213   echo $ac_n "(cached) $ac_c" 1>&6
14214 else
14215   ac_save_LIBS="$LIBS"
14216 LIBS="-lintl  $LIBS"
14217 cat > conftest.$ac_ext <<EOF
14218 #line 14196 "configure"
14219 #include "confdefs.h"
14220 /* Override any gcc2 internal prototype to avoid an error.  */
14221 /* We use char because int might match the return type of a gcc2
14222     builtin and then its argument prototype would still apply.  */
14223 char strftime();
14224
14225 int main() {
14226 strftime()
14227 ; return 0; }
14228 EOF
14229 if { (eval echo configure:14207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14230   rm -rf conftest*
14231   eval "ac_cv_lib_$ac_lib_var=yes"
14232 else
14233   echo "configure: failed program was:" >&5
14234   cat conftest.$ac_ext >&5
14235   rm -rf conftest*
14236   eval "ac_cv_lib_$ac_lib_var=no"
14237 fi
14238 rm -f conftest*
14239 LIBS="$ac_save_LIBS"
14240
14241 fi
14242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14243   echo "$ac_t""yes" 1>&6
14244   cat >> confdefs.h <<\EOF
14245 #define HAVE_STRFTIME 1
14246 EOF
14247
14248 LIBS="-lintl $LIBS"
14249 else
14250   echo "$ac_t""no" 1>&6
14251 fi
14252
14253 fi
14254
14255
14256 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14257 echo "configure:14235: checking for inet_aton()" >&5
14258 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14259   echo $ac_n "(cached) $ac_c" 1>&6
14260 else
14261   cat > conftest.$ac_ext <<EOF
14262 #line 14240 "configure"
14263 #include "confdefs.h"
14264
14265 #ifdef HAVE_SYS_TYPES_H
14266 #       include <sys/types.h>
14267 #endif
14268 #ifdef HAVE_SYS_SOCKET_H
14269 #       include <sys/socket.h>
14270 #       ifdef HAVE_SYS_SELECT_H
14271 #               include <sys/select.h>
14272 #       endif
14273 #       include <netinet/in.h>
14274 #       ifdef HAVE_ARPA_INET_H
14275 #               include <arpa/inet.h>
14276 #       endif
14277 #endif
14278
14279 int main() {
14280 struct in_addr in;
14281 int rc = inet_aton( "255.255.255.255", &in );
14282 ; return 0; }
14283 EOF
14284 if { (eval echo configure:14262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14285   rm -rf conftest*
14286   ol_cv_func_inet_aton=yes
14287 else
14288   echo "configure: failed program was:" >&5
14289   cat conftest.$ac_ext >&5
14290   rm -rf conftest*
14291   ol_cv_func_inet_aton=no
14292 fi
14293 rm -f conftest*
14294 fi
14295
14296 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14297   if test $ol_cv_func_inet_aton != no; then
14298     cat >> confdefs.h <<\EOF
14299 #define HAVE_INET_ATON 1
14300 EOF
14301
14302   fi
14303  
14304
14305 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14306 echo "configure:14284: checking for _spawnlp" >&5
14307 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14308   echo $ac_n "(cached) $ac_c" 1>&6
14309 else
14310   cat > conftest.$ac_ext <<EOF
14311 #line 14289 "configure"
14312 #include "confdefs.h"
14313 /* System header to define __stub macros and hopefully few prototypes,
14314     which can conflict with char _spawnlp(); below.  */
14315 #include <assert.h>
14316 /* Override any gcc2 internal prototype to avoid an error.  */
14317 /* We use char because int might match the return type of a gcc2
14318     builtin and then its argument prototype would still apply.  */
14319 char _spawnlp();
14320 char (*f)();
14321
14322 int main() {
14323
14324 /* The GNU C library defines this for functions which it implements
14325     to always fail with ENOSYS.  Some functions are actually named
14326     something starting with __ and the normal name is an alias.  */
14327 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14328 choke me
14329 #else
14330 f = _spawnlp;
14331 #endif
14332
14333 ; return 0; }
14334 EOF
14335 if { (eval echo configure:14313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14336   rm -rf conftest*
14337   eval "ac_cv_func__spawnlp=yes"
14338 else
14339   echo "configure: failed program was:" >&5
14340   cat conftest.$ac_ext >&5
14341   rm -rf conftest*
14342   eval "ac_cv_func__spawnlp=no"
14343 fi
14344 rm -f conftest*
14345 fi
14346
14347 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14348   echo "$ac_t""yes" 1>&6
14349   cat >> confdefs.h <<\EOF
14350 #define HAVE_SPAWNLP 1
14351 EOF
14352
14353 else
14354   echo "$ac_t""no" 1>&6
14355 fi
14356
14357
14358 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14359 echo "configure:14337: checking for _snprintf" >&5
14360 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14361   echo $ac_n "(cached) $ac_c" 1>&6
14362 else
14363   cat > conftest.$ac_ext <<EOF
14364 #line 14342 "configure"
14365 #include "confdefs.h"
14366 /* System header to define __stub macros and hopefully few prototypes,
14367     which can conflict with char _snprintf(); below.  */
14368 #include <assert.h>
14369 /* Override any gcc2 internal prototype to avoid an error.  */
14370 /* We use char because int might match the return type of a gcc2
14371     builtin and then its argument prototype would still apply.  */
14372 char _snprintf();
14373 char (*f)();
14374
14375 int main() {
14376
14377 /* The GNU C library defines this for functions which it implements
14378     to always fail with ENOSYS.  Some functions are actually named
14379     something starting with __ and the normal name is an alias.  */
14380 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14381 choke me
14382 #else
14383 f = _snprintf;
14384 #endif
14385
14386 ; return 0; }
14387 EOF
14388 if { (eval echo configure:14366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14389   rm -rf conftest*
14390   eval "ac_cv_func__snprintf=yes"
14391 else
14392   echo "configure: failed program was:" >&5
14393   cat conftest.$ac_ext >&5
14394   rm -rf conftest*
14395   eval "ac_cv_func__snprintf=no"
14396 fi
14397 rm -f conftest*
14398 fi
14399
14400 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14401   echo "$ac_t""yes" 1>&6
14402   ac_cv_func_snprintf=yes
14403         cat >> confdefs.h <<\EOF
14404 #define snprintf _snprintf
14405 EOF
14406
14407
14408 else
14409   echo "$ac_t""no" 1>&6
14410 fi
14411
14412
14413 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14414 echo "configure:14392: checking for _vsnprintf" >&5
14415 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14416   echo $ac_n "(cached) $ac_c" 1>&6
14417 else
14418   cat > conftest.$ac_ext <<EOF
14419 #line 14397 "configure"
14420 #include "confdefs.h"
14421 /* System header to define __stub macros and hopefully few prototypes,
14422     which can conflict with char _vsnprintf(); below.  */
14423 #include <assert.h>
14424 /* Override any gcc2 internal prototype to avoid an error.  */
14425 /* We use char because int might match the return type of a gcc2
14426     builtin and then its argument prototype would still apply.  */
14427 char _vsnprintf();
14428 char (*f)();
14429
14430 int main() {
14431
14432 /* The GNU C library defines this for functions which it implements
14433     to always fail with ENOSYS.  Some functions are actually named
14434     something starting with __ and the normal name is an alias.  */
14435 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14436 choke me
14437 #else
14438 f = _vsnprintf;
14439 #endif
14440
14441 ; return 0; }
14442 EOF
14443 if { (eval echo configure:14421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14444   rm -rf conftest*
14445   eval "ac_cv_func__vsnprintf=yes"
14446 else
14447   echo "configure: failed program was:" >&5
14448   cat conftest.$ac_ext >&5
14449   rm -rf conftest*
14450   eval "ac_cv_func__vsnprintf=no"
14451 fi
14452 rm -f conftest*
14453 fi
14454
14455 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14456   echo "$ac_t""yes" 1>&6
14457   ac_cv_func_vsnprintf=yes
14458         cat >> confdefs.h <<\EOF
14459 #define vsnprintf _vsnprintf
14460 EOF
14461
14462
14463 else
14464   echo "$ac_t""no" 1>&6
14465 fi
14466
14467
14468 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14469 echo "configure:14447: checking for vprintf" >&5
14470 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14471   echo $ac_n "(cached) $ac_c" 1>&6
14472 else
14473   cat > conftest.$ac_ext <<EOF
14474 #line 14452 "configure"
14475 #include "confdefs.h"
14476 /* System header to define __stub macros and hopefully few prototypes,
14477     which can conflict with char vprintf(); below.  */
14478 #include <assert.h>
14479 /* Override any gcc2 internal prototype to avoid an error.  */
14480 /* We use char because int might match the return type of a gcc2
14481     builtin and then its argument prototype would still apply.  */
14482 char vprintf();
14483 char (*f)();
14484
14485 int main() {
14486
14487 /* The GNU C library defines this for functions which it implements
14488     to always fail with ENOSYS.  Some functions are actually named
14489     something starting with __ and the normal name is an alias.  */
14490 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14491 choke me
14492 #else
14493 f = vprintf;
14494 #endif
14495
14496 ; return 0; }
14497 EOF
14498 if { (eval echo configure:14476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14499   rm -rf conftest*
14500   eval "ac_cv_func_vprintf=yes"
14501 else
14502   echo "configure: failed program was:" >&5
14503   cat conftest.$ac_ext >&5
14504   rm -rf conftest*
14505   eval "ac_cv_func_vprintf=no"
14506 fi
14507 rm -f conftest*
14508 fi
14509
14510 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14511   echo "$ac_t""yes" 1>&6
14512   cat >> confdefs.h <<\EOF
14513 #define HAVE_VPRINTF 1
14514 EOF
14515
14516 else
14517   echo "$ac_t""no" 1>&6
14518 fi
14519
14520 if test "$ac_cv_func_vprintf" != yes; then
14521 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14522 echo "configure:14500: checking for _doprnt" >&5
14523 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14524   echo $ac_n "(cached) $ac_c" 1>&6
14525 else
14526   cat > conftest.$ac_ext <<EOF
14527 #line 14505 "configure"
14528 #include "confdefs.h"
14529 /* System header to define __stub macros and hopefully few prototypes,
14530     which can conflict with char _doprnt(); below.  */
14531 #include <assert.h>
14532 /* Override any gcc2 internal prototype to avoid an error.  */
14533 /* We use char because int might match the return type of a gcc2
14534     builtin and then its argument prototype would still apply.  */
14535 char _doprnt();
14536 char (*f)();
14537
14538 int main() {
14539
14540 /* The GNU C library defines this for functions which it implements
14541     to always fail with ENOSYS.  Some functions are actually named
14542     something starting with __ and the normal name is an alias.  */
14543 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14544 choke me
14545 #else
14546 f = _doprnt;
14547 #endif
14548
14549 ; return 0; }
14550 EOF
14551 if { (eval echo configure:14529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14552   rm -rf conftest*
14553   eval "ac_cv_func__doprnt=yes"
14554 else
14555   echo "configure: failed program was:" >&5
14556   cat conftest.$ac_ext >&5
14557   rm -rf conftest*
14558   eval "ac_cv_func__doprnt=no"
14559 fi
14560 rm -f conftest*
14561 fi
14562
14563 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14564   echo "$ac_t""yes" 1>&6
14565   cat >> confdefs.h <<\EOF
14566 #define HAVE_DOPRNT 1
14567 EOF
14568
14569 else
14570   echo "$ac_t""no" 1>&6
14571 fi
14572
14573 fi
14574
14575
14576 if test $ac_cv_func_vprintf = yes ; then
14577                 for ac_func in vsnprintf vsprintf
14578 do
14579 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14580 echo "configure:14558: checking for $ac_func" >&5
14581 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14582   echo $ac_n "(cached) $ac_c" 1>&6
14583 else
14584   cat > conftest.$ac_ext <<EOF
14585 #line 14563 "configure"
14586 #include "confdefs.h"
14587 /* System header to define __stub macros and hopefully few prototypes,
14588     which can conflict with char $ac_func(); below.  */
14589 #include <assert.h>
14590 /* Override any gcc2 internal prototype to avoid an error.  */
14591 /* We use char because int might match the return type of a gcc2
14592     builtin and then its argument prototype would still apply.  */
14593 char $ac_func();
14594 char (*f)();
14595
14596 int main() {
14597
14598 /* The GNU C library defines this for functions which it implements
14599     to always fail with ENOSYS.  Some functions are actually named
14600     something starting with __ and the normal name is an alias.  */
14601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14602 choke me
14603 #else
14604 f = $ac_func;
14605 #endif
14606
14607 ; return 0; }
14608 EOF
14609 if { (eval echo configure:14587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14610   rm -rf conftest*
14611   eval "ac_cv_func_$ac_func=yes"
14612 else
14613   echo "configure: failed program was:" >&5
14614   cat conftest.$ac_ext >&5
14615   rm -rf conftest*
14616   eval "ac_cv_func_$ac_func=no"
14617 fi
14618 rm -f conftest*
14619 fi
14620
14621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14622   echo "$ac_t""yes" 1>&6
14623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14624   cat >> confdefs.h <<EOF
14625 #define $ac_tr_func 1
14626 EOF
14627  
14628 else
14629   echo "$ac_t""no" 1>&6
14630 fi
14631 done
14632
14633 fi
14634
14635 for ac_func in \
14636         bcopy                   \
14637         closesocket             \
14638         endgrent                \
14639         endpwent                \
14640         flock                   \
14641         getdtablesize   \
14642         getgrgid                \
14643         gethostname             \
14644         getpass                 \
14645         getpwuid                \
14646         getpwnam                \
14647         getspnam                \
14648         gettimeofday    \
14649         initgroups              \
14650         lockf                   \
14651         memcpy                  \
14652         memmove                 \
14653         mkstemp                 \
14654         pipe                    \
14655         read                    \
14656         recv                    \
14657         recvfrom                \
14658         setpwfile               \
14659         setgid                  \
14660         setegid                 \
14661         setsid                  \
14662         setuid                  \
14663         seteuid                 \
14664         sigaction               \
14665         signal                  \
14666         sigset                  \
14667         snprintf                \
14668         strdup                  \
14669         strerror                \
14670         strpbrk                 \
14671         strrchr                 \
14672         strsep                  \
14673         strstr                  \
14674         strtol                  \
14675         strtoul                 \
14676         strspn                  \
14677         sysconf                 \
14678         waitpid                 \
14679         wait4                   \
14680         write                   \
14681         send                    \
14682         sendto                  \
14683
14684 do
14685 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14686 echo "configure:14664: checking for $ac_func" >&5
14687 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14688   echo $ac_n "(cached) $ac_c" 1>&6
14689 else
14690   cat > conftest.$ac_ext <<EOF
14691 #line 14669 "configure"
14692 #include "confdefs.h"
14693 /* System header to define __stub macros and hopefully few prototypes,
14694     which can conflict with char $ac_func(); below.  */
14695 #include <assert.h>
14696 /* Override any gcc2 internal prototype to avoid an error.  */
14697 /* We use char because int might match the return type of a gcc2
14698     builtin and then its argument prototype would still apply.  */
14699 char $ac_func();
14700 char (*f)();
14701
14702 int main() {
14703
14704 /* The GNU C library defines this for functions which it implements
14705     to always fail with ENOSYS.  Some functions are actually named
14706     something starting with __ and the normal name is an alias.  */
14707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14708 choke me
14709 #else
14710 f = $ac_func;
14711 #endif
14712
14713 ; return 0; }
14714 EOF
14715 if { (eval echo configure:14693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14716   rm -rf conftest*
14717   eval "ac_cv_func_$ac_func=yes"
14718 else
14719   echo "configure: failed program was:" >&5
14720   cat conftest.$ac_ext >&5
14721   rm -rf conftest*
14722   eval "ac_cv_func_$ac_func=no"
14723 fi
14724 rm -f conftest*
14725 fi
14726
14727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14728   echo "$ac_t""yes" 1>&6
14729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14730   cat >> confdefs.h <<EOF
14731 #define $ac_tr_func 1
14732 EOF
14733  
14734 else
14735   echo "$ac_t""no" 1>&6
14736 fi
14737 done
14738
14739
14740 for ac_func in getopt tempnam
14741 do
14742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14743 echo "configure:14721: checking for $ac_func" >&5
14744 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14745   echo $ac_n "(cached) $ac_c" 1>&6
14746 else
14747   cat > conftest.$ac_ext <<EOF
14748 #line 14726 "configure"
14749 #include "confdefs.h"
14750 /* System header to define __stub macros and hopefully few prototypes,
14751     which can conflict with char $ac_func(); below.  */
14752 #include <assert.h>
14753 /* Override any gcc2 internal prototype to avoid an error.  */
14754 /* We use char because int might match the return type of a gcc2
14755     builtin and then its argument prototype would still apply.  */
14756 char $ac_func();
14757 char (*f)();
14758
14759 int main() {
14760
14761 /* The GNU C library defines this for functions which it implements
14762     to always fail with ENOSYS.  Some functions are actually named
14763     something starting with __ and the normal name is an alias.  */
14764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14765 choke me
14766 #else
14767 f = $ac_func;
14768 #endif
14769
14770 ; return 0; }
14771 EOF
14772 if { (eval echo configure:14750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14773   rm -rf conftest*
14774   eval "ac_cv_func_$ac_func=yes"
14775 else
14776   echo "configure: failed program was:" >&5
14777   cat conftest.$ac_ext >&5
14778   rm -rf conftest*
14779   eval "ac_cv_func_$ac_func=no"
14780 fi
14781 rm -f conftest*
14782 fi
14783
14784 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14785   echo "$ac_t""yes" 1>&6
14786     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14787   cat >> confdefs.h <<EOF
14788 #define $ac_tr_func 1
14789 EOF
14790  
14791 else
14792   echo "$ac_t""no" 1>&6
14793 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14794 fi
14795 done
14796
14797
14798
14799 if test "$ac_cv_func_getopt" != yes; then
14800     LIBSRCS="$LIBSRCS getopt.c"
14801 fi
14802
14803 if test "$ac_cv_func_tempnam" != yes; then
14804     LIBSRCS="$LIBSRCS tempnam.c"
14805 fi
14806
14807 # Check Configuration
14808 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14809 echo "configure:14787: checking declaration of sys_errlist" >&5
14810 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14811   echo $ac_n "(cached) $ac_c" 1>&6
14812 else
14813   
14814         cat > conftest.$ac_ext <<EOF
14815 #line 14793 "configure"
14816 #include "confdefs.h"
14817
14818 #include <stdio.h>
14819 #include <sys/types.h>
14820 #include <errno.h>
14821 #ifdef WINNT
14822 #include <stdlib.h>
14823 #endif 
14824 int main() {
14825 char *c = (char *) *sys_errlist
14826 ; return 0; }
14827 EOF
14828 if { (eval echo configure:14806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14829   rm -rf conftest*
14830   ol_cv_dcl_sys_errlist=yes
14831         ol_cv_have_sys_errlist=yes
14832 else
14833   echo "configure: failed program was:" >&5
14834   cat conftest.$ac_ext >&5
14835   rm -rf conftest*
14836   ol_cv_dcl_sys_errlist=no
14837 fi
14838 rm -f conftest*
14839 fi
14840
14841 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14842 #
14843 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14844 if test $ol_cv_dcl_sys_errlist = no ; then
14845         cat >> confdefs.h <<\EOF
14846 #define DECL_SYS_ERRLIST 1
14847 EOF
14848
14849
14850         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14851 echo "configure:14829: checking existence of sys_errlist" >&5
14852 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14853   echo $ac_n "(cached) $ac_c" 1>&6
14854 else
14855   
14856                 cat > conftest.$ac_ext <<EOF
14857 #line 14835 "configure"
14858 #include "confdefs.h"
14859 #include <errno.h>
14860 int main() {
14861 char *c = (char *) *sys_errlist
14862 ; return 0; }
14863 EOF
14864 if { (eval echo configure:14842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14865   rm -rf conftest*
14866   ol_cv_have_sys_errlist=yes
14867 else
14868   echo "configure: failed program was:" >&5
14869   cat conftest.$ac_ext >&5
14870   rm -rf conftest*
14871   ol_cv_have_sys_errlist=no
14872 fi
14873 rm -f conftest*
14874 fi
14875
14876 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14877 fi
14878 if test $ol_cv_have_sys_errlist = yes ; then
14879         cat >> confdefs.h <<\EOF
14880 #define HAVE_SYS_ERRLIST 1
14881 EOF
14882
14883 fi
14884
14885
14886
14887 if test "$ol_enable_debug" != no ; then
14888         cat >> confdefs.h <<\EOF
14889 #define LDAP_DEBUG 1
14890 EOF
14891
14892 fi
14893 if test "$ol_enable_syslog" = yes ; then
14894         cat >> confdefs.h <<\EOF
14895 #define LDAP_SYSLOG 1
14896 EOF
14897
14898 fi
14899 if test "$ol_enable_libui" = yes ; then
14900         cat >> confdefs.h <<\EOF
14901 #define LDAP_LIBUI 1
14902 EOF
14903
14904 fi
14905 if test "$ol_enable_cache" = no ; then
14906         cat >> confdefs.h <<\EOF
14907 #define LDAP_NOCACHE 1
14908 EOF
14909
14910 fi
14911 if test "$ol_enable_dns" != no ; then
14912         cat >> confdefs.h <<\EOF
14913 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14914 EOF
14915
14916 fi
14917 if test "$ol_enable_proctitle" != no ; then
14918         cat >> confdefs.h <<\EOF
14919 #define LDAP_PROCTITLE 1
14920 EOF
14921
14922 fi
14923 if test "$ol_enable_referrals" != no ; then
14924         cat >> confdefs.h <<\EOF
14925 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14926 EOF
14927
14928 fi
14929 if test "$ol_enable_cldap" != no ; then
14930         cat >> confdefs.h <<\EOF
14931 #define LDAP_CONNECTIONLESS 1
14932 EOF
14933
14934 fi
14935 if test "$ol_enable_ldapi" != no ; then
14936         cat >> confdefs.h <<\EOF
14937 #define LDAP_PF_LOCAL 1
14938 EOF
14939
14940 fi
14941 if test "$ol_enable_crypt" != no ; then
14942         cat >> confdefs.h <<\EOF
14943 #define SLAPD_CRYPT 1
14944 EOF
14945
14946 fi
14947 if test "$ol_enable_cleartext" != no ; then
14948         cat >> confdefs.h <<\EOF
14949 #define SLAPD_CLEARTEXT 1
14950 EOF
14951
14952 fi
14953 if test "$ol_enable_multimaster" != no ; then
14954         cat >> confdefs.h <<\EOF
14955 #define SLAPD_MULTIMASTER 1
14956 EOF
14957
14958 fi
14959 if test "$ol_enable_phonetic" != no ; then
14960         cat >> confdefs.h <<\EOF
14961 #define SLAPD_PHONETIC 1
14962 EOF
14963
14964 fi
14965 if test "$ol_enable_rlookups" != no ; then
14966         cat >> confdefs.h <<\EOF
14967 #define SLAPD_RLOOKUPS 1
14968 EOF
14969
14970 fi
14971 if test "$ol_enable_aci" != no ; then
14972         cat >> confdefs.h <<\EOF
14973 #define SLAPD_ACI_ENABLED 1
14974 EOF
14975
14976 fi
14977 if test "$ol_enable_discreteaci" != no ; then
14978         cat >> confdefs.h <<\EOF
14979 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14980 EOF
14981
14982 fi
14983
14984 if test "$ol_link_modules" != no ; then
14985         cat >> confdefs.h <<\EOF
14986 #define SLAPD_MODULES 1
14987 EOF
14988
14989         BUILD_SLAPD=yes
14990         SLAPD_MODULES_LDFLAGS="-dlopen self"
14991 fi
14992
14993 if test "$ol_link_bdb2" != no ; then
14994         cat >> confdefs.h <<\EOF
14995 #define SLAPD_BDB2 1
14996 EOF
14997
14998         BUILD_SLAPD=yes
14999         BUILD_BDB2=yes
15000         if test "$ol_with_bdb2_module" != static ; then
15001                 cat >> confdefs.h <<\EOF
15002 #define SLAPD_BDB2_DYNAMIC 1
15003 EOF
15004
15005                 BUILD_BDB2=mod
15006                 BUILD_BDB2_DYNAMIC=shared
15007                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15008         fi
15009 fi
15010
15011 if test "$ol_enable_ldap" != no ; then
15012         cat >> confdefs.h <<\EOF
15013 #define SLAPD_LDAP 1
15014 EOF
15015
15016         BUILD_SLAPD=yes
15017         BUILD_LDAP=yes
15018         if test "$ol_with_ldap_module" != static ; then
15019                 cat >> confdefs.h <<\EOF
15020 #define SLAPD_LDAP_DYNAMIC 1
15021 EOF
15022
15023                 BUILD_LDAP=mod
15024                 BUILD_LDAP_DYNAMIC=shared
15025                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15026         fi
15027 fi
15028
15029 if test "$ol_link_ldbm" != no ; then
15030         cat >> confdefs.h <<\EOF
15031 #define SLAPD_LDBM 1
15032 EOF
15033
15034         BUILD_SLAPD=yes
15035         BUILD_LDBM=yes
15036         if test "$ol_with_ldbm_module" != static ; then
15037                 cat >> confdefs.h <<\EOF
15038 #define SLAPD_LDBM_DYNAMIC 1
15039 EOF
15040
15041                 BUILD_LDBM=mod
15042                 BUILD_LDBM_DYNAMIC=shared
15043                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15044         fi
15045 fi
15046
15047 if test "$ol_enable_passwd" != no ; then
15048         cat >> confdefs.h <<\EOF
15049 #define SLAPD_PASSWD 1
15050 EOF
15051
15052         BUILD_SLAPD=yes
15053         BUILD_PASSWD=yes
15054         if test "$ol_with_passwd_module" != static ; then
15055                 cat >> confdefs.h <<\EOF
15056 #define SLAPD_PASSWD_DYNAMIC 1
15057 EOF
15058
15059                 BUILD_PASSWD=mod
15060                 BUILD_PASSWD_DYNAMIC=shared
15061                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15062         fi
15063 fi
15064
15065 if test "$ol_link_perl" != no ; then
15066         cat >> confdefs.h <<\EOF
15067 #define SLAPD_PERL 1
15068 EOF
15069
15070         BUILD_SLAPD=yes
15071         BUILD_PERL=yes
15072         if test "$ol_with_perl_module" != static ; then
15073                 cat >> confdefs.h <<\EOF
15074 #define SLAPD_PERL_DYNAMIC 1
15075 EOF
15076
15077                 BUILD_PERL=mod
15078                 BUILD_PERL_DYNAMIC=shared
15079                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15080         fi
15081 fi
15082
15083 if test "$ol_enable_shell" != no ; then
15084         cat >> confdefs.h <<\EOF
15085 #define SLAPD_SHELL 1
15086 EOF
15087
15088         BUILD_SLAPD=yes
15089         BUILD_SHELL=yes
15090         if test "$ol_with_shell_module" != static ; then
15091                 cat >> confdefs.h <<\EOF
15092 #define SLAPD_SHELL_DYNAMIC 1
15093 EOF
15094
15095                 BUILD_SHELL=mod
15096                 BUILD_SHELL_DYNAMIC=shared
15097                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15098         fi
15099 fi
15100
15101 if test "$ol_enable_tcl" != no ; then
15102         cat >> confdefs.h <<\EOF
15103 #define SLAPD_TCL 1
15104 EOF
15105
15106         BUILD_SLAPD=yes
15107         BUILD_TCL=yes
15108         if test "$ol_with_tcl_module" != static; then
15109                 cat >> confdefs.h <<\EOF
15110 #define SLAPD_TCL_DYNAMIC 1
15111 EOF
15112
15113                 BUILD_TCL=mod
15114                 BUILD_TCL_DYNAMIC=shared
15115                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15116         fi
15117 fi
15118
15119 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15120         $BUILD_SLAPD = yes ; then
15121         BUILD_SLURPD=yes
15122 fi
15123
15124 if test "$ol_link_isode" != no ; then
15125         BUILD_LDAPD=yes
15126 fi
15127
15128
15129 if test "$LINK_BINS_DYNAMIC" = yes; then
15130     LIB_LINKAGE=DYN
15131     LT_LIB_LINKAGE=shared
15132 else
15133     LIB_LINKAGE=STAT
15134     LT_LIB_LINKAGE=static
15135 fi
15136
15137 if test "$ac_cv_mingw32" = yes ; then
15138     PLAT=NT
15139     DYN_EXT=dll
15140 else
15141     PLAT=UNIX
15142     DYN_EXT=so
15143 fi
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154   
15155   
15156   
15157   
15158   
15159   
15160   
15161   
15162   
15163   
15164   
15165   
15166   
15167   
15168   
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199 trap '' 1 2 15
15200
15201 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15202
15203 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15204 # Let make expand exec_prefix.
15205 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15206
15207 # Any assignment to VPATH causes Sun make to only execute
15208 # the first set of double-colon rules, so remove it if not needed.
15209 # If there is a colon in the path, we need to keep it.
15210 if test "x$srcdir" = x.; then
15211   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15212 fi
15213
15214 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15215
15216 DEFS=-DHAVE_CONFIG_H
15217
15218 # Without the "./", some shells look in PATH for config.status.
15219 : ${CONFIG_STATUS=./config.status}
15220
15221 echo creating $CONFIG_STATUS
15222 rm -f $CONFIG_STATUS
15223 cat > $CONFIG_STATUS <<EOF
15224 #! /bin/sh
15225 # Generated automatically by configure.
15226 # Run this file to recreate the current configuration.
15227 # This directory was configured as follows,
15228 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15229 #
15230 # $0 $ac_configure_args
15231 #
15232 # Compiler output produced by configure, useful for debugging
15233 # configure, is in ./config.log if it exists.
15234
15235 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15236 for ac_option
15237 do
15238   case "\$ac_option" in
15239   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15240     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15241     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15242   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15243     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15244     exit 0 ;;
15245   -help | --help | --hel | --he | --h)
15246     echo "\$ac_cs_usage"; exit 0 ;;
15247   *) echo "\$ac_cs_usage"; exit 1 ;;
15248   esac
15249 done
15250
15251 ac_given_srcdir=$srcdir
15252 ac_given_INSTALL="$INSTALL"
15253
15254 trap 'rm -fr `echo "\
15255 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15256 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15257 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15258 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15259 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15260 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15261 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15262 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15263 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15264 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15265 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15266 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15267 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15268 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15269 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15270 include/Makefile:build/top.mk:include/Makefile.in \
15271 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15272 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15273 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15274 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15275 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15276 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15277 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15278 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15279 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15280 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15281 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15282 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15283 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15284 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15285 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15286 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15287 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15288 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15289 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15290 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15291 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15292 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15293 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15294 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15295 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15296 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15297  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15298 EOF
15299 cat >> $CONFIG_STATUS <<EOF
15300
15301 # Protect against being on the right side of a sed subst in config.status.
15302 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15303  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15304 $ac_vpsub
15305 $extrasub
15306 s%@SHELL@%$SHELL%g
15307 s%@CFLAGS@%$CFLAGS%g
15308 s%@CPPFLAGS@%$CPPFLAGS%g
15309 s%@CXXFLAGS@%$CXXFLAGS%g
15310 s%@FFLAGS@%$FFLAGS%g
15311 s%@DEFS@%$DEFS%g
15312 s%@LDFLAGS@%$LDFLAGS%g
15313 s%@LIBS@%$LIBS%g
15314 s%@exec_prefix@%$exec_prefix%g
15315 s%@prefix@%$prefix%g
15316 s%@program_transform_name@%$program_transform_name%g
15317 s%@bindir@%$bindir%g
15318 s%@sbindir@%$sbindir%g
15319 s%@libexecdir@%$libexecdir%g
15320 s%@datadir@%$datadir%g
15321 s%@sysconfdir@%$sysconfdir%g
15322 s%@sharedstatedir@%$sharedstatedir%g
15323 s%@localstatedir@%$localstatedir%g
15324 s%@libdir@%$libdir%g
15325 s%@includedir@%$includedir%g
15326 s%@oldincludedir@%$oldincludedir%g
15327 s%@infodir@%$infodir%g
15328 s%@mandir@%$mandir%g
15329 s%@host@%$host%g
15330 s%@host_alias@%$host_alias%g
15331 s%@host_cpu@%$host_cpu%g
15332 s%@host_vendor@%$host_vendor%g
15333 s%@host_os@%$host_os%g
15334 s%@target@%$target%g
15335 s%@target_alias@%$target_alias%g
15336 s%@target_cpu@%$target_cpu%g
15337 s%@target_vendor@%$target_vendor%g
15338 s%@target_os@%$target_os%g
15339 s%@build@%$build%g
15340 s%@build_alias@%$build_alias%g
15341 s%@build_cpu@%$build_cpu%g
15342 s%@build_vendor@%$build_vendor%g
15343 s%@build_os@%$build_os%g
15344 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15345 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15346 s%@INSTALL_DATA@%$INSTALL_DATA%g
15347 s%@PACKAGE@%$PACKAGE%g
15348 s%@VERSION@%$VERSION%g
15349 s%@ACLOCAL@%$ACLOCAL%g
15350 s%@AUTOCONF@%$AUTOCONF%g
15351 s%@AUTOMAKE@%$AUTOMAKE%g
15352 s%@AUTOHEADER@%$AUTOHEADER%g
15353 s%@MAKEINFO@%$MAKEINFO%g
15354 s%@install_sh@%$install_sh%g
15355 s%@AMTAR@%$AMTAR%g
15356 s%@AWK@%$AWK%g
15357 s%@AMTARFLAGS@%$AMTARFLAGS%g
15358 s%@SET_MAKE@%$SET_MAKE%g
15359 s%@top_builddir@%$top_builddir%g
15360 s%@ldap_subdir@%$ldap_subdir%g
15361 s%@CC@%$CC%g
15362 s%@RANLIB@%$RANLIB%g
15363 s%@LD@%$LD%g
15364 s%@NM@%$NM%g
15365 s%@LN_S@%$LN_S%g
15366 s%@DLLTOOL@%$DLLTOOL%g
15367 s%@AS@%$AS%g
15368 s%@OBJDUMP@%$OBJDUMP%g
15369 s%@LIBTOOL@%$LIBTOOL%g
15370 s%@LN_H@%$LN_H%g
15371 s%@SENDMAIL@%$SENDMAIL%g
15372 s%@EDITOR@%$EDITOR%g
15373 s%@FINGER@%$FINGER%g
15374 s%@PERLBIN@%$PERLBIN%g
15375 s%@CPP@%$CPP%g
15376 s%@EXEEXT@%$EXEEXT%g
15377 s%@OBJEXT@%$OBJEXT%g
15378 s%@OL_MKDEP@%$OL_MKDEP%g
15379 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15380 s%@PEPSY@%$PEPSY%g
15381 s%@LIBOBJS@%$LIBOBJS%g
15382 s%@LIBSRCS@%$LIBSRCS%g
15383 s%@PLAT@%$PLAT%g
15384 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15385 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15386 s%@DYN_EXT@%$DYN_EXT%g
15387 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15388 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15389 s%@BUILD_BDB2@%$BUILD_BDB2%g
15390 s%@BUILD_LDAP@%$BUILD_LDAP%g
15391 s%@BUILD_LDBM@%$BUILD_LDBM%g
15392 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15393 s%@BUILD_PERL@%$BUILD_PERL%g
15394 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15395 s%@BUILD_SHELL@%$BUILD_SHELL%g
15396 s%@BUILD_TCL@%$BUILD_TCL%g
15397 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15398 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15399 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15400 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15401 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15402 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15403 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15404 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15405 s%@LDAP_LIBS@%$LDAP_LIBS%g
15406 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15407 s%@LDIF_LIBS@%$LDIF_LIBS%g
15408 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15409 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15410 s%@LDBM_LIBS@%$LDBM_LIBS%g
15411 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15412 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15413 s%@WRAP_LIBS@%$WRAP_LIBS%g
15414 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15415 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15416 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15417 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15418 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15419 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15420 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15421 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15422 s%@KRB_LIBS@%$KRB_LIBS%g
15423 s%@READLINE_LIBS@%$READLINE_LIBS%g
15424 s%@SASL_LIBS@%$SASL_LIBS%g
15425 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15426 s%@TLS_LIBS@%$TLS_LIBS%g
15427 s%@MODULES_LIBS@%$MODULES_LIBS%g
15428
15429 CEOF
15430 EOF
15431
15432 cat >> $CONFIG_STATUS <<\EOF
15433
15434 # Split the substitutions into bite-sized pieces for seds with
15435 # small command number limits, like on Digital OSF/1 and HP-UX.
15436 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15437 ac_file=1 # Number of current file.
15438 ac_beg=1 # First line for current file.
15439 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15440 ac_more_lines=:
15441 ac_sed_cmds=""
15442 while $ac_more_lines; do
15443   if test $ac_beg -gt 1; then
15444     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15445   else
15446     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15447   fi
15448   if test ! -s conftest.s$ac_file; then
15449     ac_more_lines=false
15450     rm -f conftest.s$ac_file
15451   else
15452     if test -z "$ac_sed_cmds"; then
15453       ac_sed_cmds="sed -f conftest.s$ac_file"
15454     else
15455       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15456     fi
15457     ac_file=`expr $ac_file + 1`
15458     ac_beg=$ac_end
15459     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15460   fi
15461 done
15462 if test -z "$ac_sed_cmds"; then
15463   ac_sed_cmds=cat
15464 fi
15465 EOF
15466
15467 cat >> $CONFIG_STATUS <<EOF
15468
15469 CONFIG_FILES=\${CONFIG_FILES-"\
15470 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15471 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15472 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15473 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15474 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15475 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15476 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15477 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15478 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15479 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15480 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15481 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15482 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15483 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15484 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15485 include/Makefile:build/top.mk:include/Makefile.in \
15486 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15487 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15488 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15489 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15490 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15491 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15492 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15493 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15494 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15495 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15496 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15497 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15498 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15499 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15500 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15501 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15502 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15503 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15504 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15505 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15506 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15507 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15508 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15509 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15510 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15511 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15512 "}
15513 EOF
15514 cat >> $CONFIG_STATUS <<\EOF
15515 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15516   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15517   case "$ac_file" in
15518   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15519        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15520   *) ac_file_in="${ac_file}.in" ;;
15521   esac
15522
15523   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15524
15525   # Remove last slash and all that follows it.  Not all systems have dirname.
15526   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15527   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15528     # The file is in a subdirectory.
15529     test ! -d "$ac_dir" && mkdir "$ac_dir"
15530     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15531     # A "../" for each directory in $ac_dir_suffix.
15532     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15533   else
15534     ac_dir_suffix= ac_dots=
15535   fi
15536
15537   case "$ac_given_srcdir" in
15538   .)  srcdir=.
15539       if test -z "$ac_dots"; then top_srcdir=.
15540       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15541   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15542   *) # Relative path.
15543     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15544     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15545   esac
15546
15547   case "$ac_given_INSTALL" in
15548   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15549   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15550   esac
15551
15552   echo creating "$ac_file"
15553   rm -f "$ac_file"
15554   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15555   case "$ac_file" in
15556   *[Mm]akefile*) ac_comsub="1i\\
15557 # $configure_input" ;;
15558   *) ac_comsub= ;;
15559   esac
15560
15561   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15562   sed -e "$ac_comsub
15563 s%@configure_input@%$configure_input%g
15564 s%@srcdir@%$srcdir%g
15565 s%@top_srcdir@%$top_srcdir%g
15566 s%@INSTALL@%$INSTALL%g
15567 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15568 fi; done
15569 rm -f conftest.s*
15570
15571 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15572 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15573 #
15574 # ac_d sets the value in "#define NAME VALUE" lines.
15575 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15576 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15577 ac_dC='\3'
15578 ac_dD='%g'
15579 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15580 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15581 ac_uB='\([      ]\)%\1#\2define\3'
15582 ac_uC=' '
15583 ac_uD='\4%g'
15584 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15585 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15586 ac_eB='$%\1#\2define\3'
15587 ac_eC=' '
15588 ac_eD='%g'
15589
15590 if test "${CONFIG_HEADERS+set}" != set; then
15591 EOF
15592 cat >> $CONFIG_STATUS <<EOF
15593   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15594 EOF
15595 cat >> $CONFIG_STATUS <<\EOF
15596 fi
15597 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15598   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15599   case "$ac_file" in
15600   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15601        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15602   *) ac_file_in="${ac_file}.in" ;;
15603   esac
15604
15605   echo creating $ac_file
15606
15607   rm -f conftest.frag conftest.in conftest.out
15608   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15609   cat $ac_file_inputs > conftest.in
15610
15611 EOF
15612
15613 # Transform confdefs.h into a sed script conftest.vals that substitutes
15614 # the proper values into config.h.in to produce config.h.  And first:
15615 # Protect against being on the right side of a sed subst in config.status.
15616 # Protect against being in an unquoted here document in config.status.
15617 rm -f conftest.vals
15618 cat > conftest.hdr <<\EOF
15619 s/[\\&%]/\\&/g
15620 s%[\\$`]%\\&%g
15621 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15622 s%ac_d%ac_u%gp
15623 s%ac_u%ac_e%gp
15624 EOF
15625 sed -n -f conftest.hdr confdefs.h > conftest.vals
15626 rm -f conftest.hdr
15627
15628 # This sed command replaces #undef with comments.  This is necessary, for
15629 # example, in the case of _POSIX_SOURCE, which is predefined and required
15630 # on some systems where configure will not decide to define it.
15631 cat >> conftest.vals <<\EOF
15632 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15633 EOF
15634
15635 # Break up conftest.vals because some shells have a limit on
15636 # the size of here documents, and old seds have small limits too.
15637
15638 rm -f conftest.tail
15639 while :
15640 do
15641   ac_lines=`grep -c . conftest.vals`
15642   # grep -c gives empty output for an empty file on some AIX systems.
15643   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15644   # Write a limited-size here document to conftest.frag.
15645   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15646   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15647   echo 'CEOF
15648   sed -f conftest.frag conftest.in > conftest.out
15649   rm -f conftest.in
15650   mv conftest.out conftest.in
15651 ' >> $CONFIG_STATUS
15652   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15653   rm -f conftest.vals
15654   mv conftest.tail conftest.vals
15655 done
15656 rm -f conftest.vals
15657
15658 cat >> $CONFIG_STATUS <<\EOF
15659   rm -f conftest.frag conftest.h
15660   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15661   cat conftest.in >> conftest.h
15662   rm -f conftest.in
15663   if cmp -s $ac_file conftest.h 2>/dev/null; then
15664     echo "$ac_file is unchanged"
15665     rm -f conftest.h
15666   else
15667     # Remove last slash and all that follows it.  Not all systems have dirname.
15668       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15669       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15670       # The file is in a subdirectory.
15671       test ! -d "$ac_dir" && mkdir "$ac_dir"
15672     fi
15673     rm -f $ac_file
15674     mv conftest.h $ac_file
15675   fi
15676 fi; done
15677
15678 EOF
15679 cat >> $CONFIG_STATUS <<EOF
15680
15681 EOF
15682 cat >> $CONFIG_STATUS <<\EOF
15683
15684 date > stamp-h
15685 echo Please \"make depend\" to build dependencies
15686
15687 exit 0
15688 EOF
15689 chmod +x $CONFIG_STATUS
15690 rm -fr confdefs* $ac_clean_files
15691 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15692