]> git.sur5r.net Git - openldap/blob - configure
format changes
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.318 2000/07/13 20:54:45 kurt Exp  
4
5 # Copyright 1998-2000 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-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
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-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap          enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support (auto)"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
47 ac_help="$ac_help
48   --enable-x-compile      enable cross compiling (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 support (auto)"
55 ac_help="$ac_help
56   --with-readline         with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads          with 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 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd          enable building slapd (yes)"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords (yes)"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords (auto)"
71 ac_help="$ac_help
72     --enable-kpasswd      enable kerberos password verification (no)"
73 ac_help="$ac_help
74     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
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-rlookups     enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci          enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-wrappers     enable tcp wrapper support (no)"
87 ac_help="$ac_help
88     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
89 ac_help="$ac_help
90     --enable-dnssrv       enable dnssrv backend (no)"
91 ac_help="$ac_help
92     --with-dnssrv-module  module type (static)"
93 ac_help="$ac_help
94     --enable-ldap         enable ldap backend (no)"
95 ac_help="$ac_help
96     --with-ldap-module    module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend (yes)"
99 ac_help="$ac_help
100     --with-ldbm-api       with LDBM API (auto)"
101 ac_help="$ac_help
102     --with-ldbm-module    module type (static)"
103 ac_help="$ac_help
104     --with-ldbm-type      use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd       enable passwd backend (no)"
107 ac_help="$ac_help
108     --with-passwd-module  module type (static)"
109 ac_help="$ac_help
110     --enable-perl         enable perl backend (no)"
111 ac_help="$ac_help
112     --with-perl-module    module type (static)"
113 ac_help="$ac_help
114     --enable-shell        enable shell backend (no)"
115 ac_help="$ac_help
116     --with-shell-module   module type (static)"
117 ac_help="$ac_help
118     --enable-sql          enable sql backend (no)"
119 ac_help="$ac_help
120     --with-sql-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
644 # set unset (borrowed from autoconf 2.14a)
645 if (unset FOO) >/dev/null 2>&1; then
646   ol_unset=unset
647 else
648   ol_unset=false
649 fi
650 # unset CDPATH
651 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
652
653 ac_aux_dir=
654 for ac_dir in build $srcdir/build; do
655   if test -f $ac_dir/install-sh; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/install-sh -c"
658     break
659   elif test -f $ac_dir/install.sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install.sh -c"
662     break
663   elif test -f $ac_dir/shtool; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/shtool install -c"
666     break
667   fi
668 done
669 if test -z "$ac_aux_dir"; then
670   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
671 fi
672 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
673 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
674 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
675
676 OL_VERSION=`cat $ac_aux_dir/version`
677 if test -z "$OL_VERSION"; then
678         { echo "configure: error: could not determine version" 1>&2; exit 1; }
679 fi
680
681 echo "Configuring OpenLDAP $OL_VERSION ..."
682
683
684 echo $ac_n "checking host system type""... $ac_c" 1>&6
685 echo "configure:686: checking host system type" >&5
686 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
687
688 # Make sure we can run config.sub.
689   if $ac_config_sub sun4 >/dev/null 2>&1; then :
690     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
691   fi
692
693   ac_cv_host_alias=$host
694   case "$ac_cv_host_alias" in
695   NONE)
696     case $nonopt in
697     NONE)
698       if ac_cv_host_alias=`$ac_config_guess`; then :
699       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
700       fi ;;
701     *) ac_cv_host_alias=$nonopt ;;
702     esac ;;
703   esac
704
705   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
706   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 else
710   echo $ac_n "(cached) $ac_c" 1>&6
711 fi
712
713 echo "$ac_t""$ac_cv_host" 1>&6
714
715 host=$ac_cv_host
716 host_alias=$ac_cv_host_alias
717 host_cpu=$ac_cv_host_cpu
718 host_vendor=$ac_cv_host_vendor
719 host_os=$ac_cv_host_os
720
721
722
723
724
725 echo $ac_n "checking target system type""... $ac_c" 1>&6
726 echo "configure:727: checking target system type" >&5
727 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
728
729 # Make sure we can run config.sub.
730   if $ac_config_sub sun4 >/dev/null 2>&1; then :
731     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
732   fi
733
734   ac_cv_target_alias=$target
735   case "$ac_cv_target_alias" in
736   NONE)
737     case $nonopt in
738     NONE)
739       ac_cv_target_alias=$host_alias ;;
740
741     *) ac_cv_target_alias=$nonopt ;;
742     esac ;;
743   esac
744
745   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
746   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749 else
750   echo $ac_n "(cached) $ac_c" 1>&6
751 fi
752
753 echo "$ac_t""$ac_cv_target" 1>&6
754
755 target=$ac_cv_target
756 target_alias=$ac_cv_target_alias
757 target_cpu=$ac_cv_target_cpu
758 target_vendor=$ac_cv_target_vendor
759 target_os=$ac_cv_target_os
760
761
762
763
764
765 echo $ac_n "checking build system type""... $ac_c" 1>&6
766 echo "configure:767: checking build system type" >&5
767 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
768
769 # Make sure we can run config.sub.
770   if $ac_config_sub sun4 >/dev/null 2>&1; then :
771     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
772   fi
773
774   ac_cv_build_alias=$build
775   case "$ac_cv_build_alias" in
776   NONE)
777     case $nonopt in
778     NONE)
779       ac_cv_build_alias=$host_alias ;;
780
781     *) ac_cv_build_alias=$nonopt ;;
782     esac ;;
783   esac
784
785   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
786   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
787   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
788   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
789 else
790   echo $ac_n "(cached) $ac_c" 1>&6
791 fi
792
793 echo "$ac_t""$ac_cv_build" 1>&6
794
795 build=$ac_cv_build
796 build_alias=$ac_cv_build_alias
797 build_cpu=$ac_cv_build_cpu
798 build_vendor=$ac_cv_build_vendor
799 build_os=$ac_cv_build_os
800
801
802
803
804
805 # Do some error checking and defaulting for the host and target type.
806 # The inputs are:
807 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
808 #
809 # The rules are:
810 # 1. You are not allowed to specify --host, --target, and nonopt at the
811 #    same time.
812 # 2. Host defaults to nonopt.
813 # 3. If nonopt is not specified, then host defaults to the current host,
814 #    as determined by config.guess.
815 # 4. Target and build default to nonopt.
816 # 5. If nonopt is not specified, then target and build default to host.
817
818 # The aliases save the names the user supplied, while $host etc.
819 # will get canonicalized.
820 case $host---$target---$nonopt in
821 NONE---*---* | *---NONE---* | *---*---NONE) ;;
822 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
823 esac
824
825 test "$host_alias" != "$target_alias" &&
826   test "$program_prefix$program_suffix$program_transform_name" = \
827     NONENONEs,x,x, &&
828   program_prefix=${target_alias}-
829
830
831 # Find a good install program.  We prefer a C program (faster),
832 # so one script is as good as another.  But avoid the broken or
833 # incompatible versions:
834 # SysV /etc/install, /usr/sbin/install
835 # SunOS /usr/etc/install
836 # IRIX /sbin/install
837 # AIX /bin/install
838 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
839 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
840 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
841 # ./install, which can be erroneously created by make from ./install.sh.
842 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
843 echo "configure:844: checking for a BSD compatible install" >&5
844 if test -z "$INSTALL"; then
845 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
846   echo $ac_n "(cached) $ac_c" 1>&6
847 else
848     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
849   for ac_dir in $PATH; do
850     # Account for people who put trailing slashes in PATH elements.
851     case "$ac_dir/" in
852     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
853     *)
854       # OSF1 and SCO ODT 3.0 have their own names for install.
855       # Don't use installbsd from OSF since it installs stuff as root
856       # by default.
857       for ac_prog in ginstall scoinst install; do
858         if test -f $ac_dir/$ac_prog; then
859           if test $ac_prog = install &&
860             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
861             # AIX install.  It has an incompatible calling convention.
862             :
863           elif test $ac_prog = install &&
864             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # program-specific install script used by HP pwplus--don't use.
866             :
867           else
868             ac_cv_path_install="$ac_dir/$ac_prog -c"
869             break 2
870           fi
871         fi
872       done
873       ;;
874     esac
875   done
876   IFS="$ac_save_IFS"
877
878 fi
879   if test "${ac_cv_path_install+set}" = set; then
880     INSTALL="$ac_cv_path_install"
881   else
882     # As a last resort, use the slow shell script.  We don't cache a
883     # path for INSTALL within a source directory, because that will
884     # break other packages using the cache if that directory is
885     # removed, or if the path is relative.
886     INSTALL="$ac_install_sh"
887   fi
888 fi
889 echo "$ac_t""$INSTALL" 1>&6
890
891 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
892 # It thinks the first close brace ends the variable substitution.
893 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
894
895 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
896
897 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
898
899 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
900 echo "configure:901: checking whether build environment is sane" >&5
901 # Just in case
902 sleep 1
903 echo timestamp > conftestfile
904 # Do `set' in a subshell so we don't clobber the current shell's
905 # arguments.  Must try -L first in case configure is actually a
906 # symlink; some systems play weird games with the mod time of symlinks
907 # (eg FreeBSD returns the mod time of the symlink's containing
908 # directory).
909 if (
910    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
911    if test "$*" = "X"; then
912       # -L didn't work.
913       set X `ls -t $srcdir/configure conftestfile`
914    fi
915    if test "$*" != "X $srcdir/configure conftestfile" \
916       && test "$*" != "X conftestfile $srcdir/configure"; then
917
918       # If neither matched, then we have a broken ls.  This can happen
919       # if, for instance, CONFIG_SHELL is bash and it inherits a
920       # broken ls alias from the environment.  This has actually
921       # happened.  Such a system could not be considered "sane".
922       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
923 alias in your environment" 1>&2; exit 1; }
924    fi
925
926    test "$2" = conftestfile
927    )
928 then
929    # Ok.
930    :
931 else
932    { echo "configure: error: newly created file is older than distributed files!
933 Check your system clock" 1>&2; exit 1; }
934 fi
935 rm -f conftest*
936 echo "$ac_t""yes" 1>&6
937 if test "$program_transform_name" = s,x,x,; then
938   program_transform_name=
939 else
940   # Double any \ or $.  echo might interpret backslashes.
941   cat <<\EOF_SED > conftestsed
942 s,\\,\\\\,g; s,\$,$$,g
943 EOF_SED
944   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
945   rm -f conftestsed
946 fi
947 test "$program_prefix" != NONE &&
948   program_transform_name="s,^,${program_prefix},;$program_transform_name"
949 # Use a double $ so make ignores it.
950 test "$program_suffix" != NONE &&
951   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
952
953 # sed with no file args requires a program.
954 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
955
956 for ac_prog in mawk gawk nawk awk
957 do
958 # Extract the first word of "$ac_prog", so it can be a program name with args.
959 set dummy $ac_prog; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
963   echo $ac_n "(cached) $ac_c" 1>&6
964 else
965   if test -n "$AWK"; then
966   ac_cv_prog_AWK="$AWK" # Let the user override the test.
967 else
968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
969   ac_dummy="$PATH"
970   for ac_dir in $ac_dummy; do
971     test -z "$ac_dir" && ac_dir=.
972     if test -f $ac_dir/$ac_word; then
973       ac_cv_prog_AWK="$ac_prog"
974       break
975     fi
976   done
977   IFS="$ac_save_ifs"
978 fi
979 fi
980 AWK="$ac_cv_prog_AWK"
981 if test -n "$AWK"; then
982   echo "$ac_t""$AWK" 1>&6
983 else
984   echo "$ac_t""no" 1>&6
985 fi
986
987 test -n "$AWK" && break
988 done
989
990 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
991 echo "configure:992: checking whether ${MAKE-make} sets \${MAKE}" >&5
992 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
993 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
994   echo $ac_n "(cached) $ac_c" 1>&6
995 else
996   cat > conftestmake <<\EOF
997 all:
998         @echo 'ac_maketemp="${MAKE}"'
999 EOF
1000 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1001 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1002 if test -n "$ac_maketemp"; then
1003   eval ac_cv_prog_make_${ac_make}_set=yes
1004 else
1005   eval ac_cv_prog_make_${ac_make}_set=no
1006 fi
1007 rm -f conftestmake
1008 fi
1009 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1010   echo "$ac_t""yes" 1>&6
1011   SET_MAKE=
1012 else
1013   echo "$ac_t""no" 1>&6
1014   SET_MAKE="MAKE=${MAKE-make}"
1015 fi
1016
1017
1018
1019 PACKAGE=OpenLDAP
1020
1021 VERSION=$OL_VERSION
1022
1023 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1024   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1025 fi
1026
1027
1028
1029 missing_dir=`cd $ac_aux_dir && pwd`
1030 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1031 echo "configure:1032: checking for working aclocal" >&5
1032 # Run test in a subshell; some versions of sh will print an error if
1033 # an executable is not found, even if stderr is redirected.
1034 # Redirect stdin to placate older versions of autoconf.  Sigh.
1035 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1036    ACLOCAL=aclocal
1037    echo "$ac_t""found" 1>&6
1038 else
1039    ACLOCAL="$missing_dir/missing aclocal"
1040    echo "$ac_t""missing" 1>&6
1041 fi
1042
1043 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1044 echo "configure:1045: checking for working autoconf" >&5
1045 # Run test in a subshell; some versions of sh will print an error if
1046 # an executable is not found, even if stderr is redirected.
1047 # Redirect stdin to placate older versions of autoconf.  Sigh.
1048 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1049    AUTOCONF=autoconf
1050    echo "$ac_t""found" 1>&6
1051 else
1052    AUTOCONF="$missing_dir/missing autoconf"
1053    echo "$ac_t""missing" 1>&6
1054 fi
1055
1056 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1057 echo "configure:1058: checking for working automake" >&5
1058 # Run test in a subshell; some versions of sh will print an error if
1059 # an executable is not found, even if stderr is redirected.
1060 # Redirect stdin to placate older versions of autoconf.  Sigh.
1061 if (automake --version) < /dev/null > /dev/null 2>&1; then
1062    AUTOMAKE=automake
1063    echo "$ac_t""found" 1>&6
1064 else
1065    AUTOMAKE="$missing_dir/missing automake"
1066    echo "$ac_t""missing" 1>&6
1067 fi
1068
1069 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1070 echo "configure:1071: checking for working autoheader" >&5
1071 # Run test in a subshell; some versions of sh will print an error if
1072 # an executable is not found, even if stderr is redirected.
1073 # Redirect stdin to placate older versions of autoconf.  Sigh.
1074 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1075    AUTOHEADER=autoheader
1076    echo "$ac_t""found" 1>&6
1077 else
1078    AUTOHEADER="$missing_dir/missing autoheader"
1079    echo "$ac_t""missing" 1>&6
1080 fi
1081
1082 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1083 echo "configure:1084: checking for working makeinfo" >&5
1084 # Run test in a subshell; some versions of sh will print an error if
1085 # an executable is not found, even if stderr is redirected.
1086 # Redirect stdin to placate older versions of autoconf.  Sigh.
1087 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1088    MAKEINFO=makeinfo
1089    echo "$ac_t""found" 1>&6
1090 else
1091    MAKEINFO="$missing_dir/missing makeinfo"
1092    echo "$ac_t""missing" 1>&6
1093 fi
1094
1095 install_sh="$missing_dir/install-sh"
1096 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1097
1098 for ac_prog in gnutar gtar tar
1099 do
1100 # Extract the first word of "$ac_prog", so it can be a program name with args.
1101 set dummy $ac_prog; ac_word=$2
1102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1103 echo "configure:1104: checking for $ac_word" >&5
1104 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1105   echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107   if test -n "$AMTAR"; then
1108   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1109 else
1110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1111   ac_dummy="$PATH"
1112   for ac_dir in $ac_dummy; do
1113     test -z "$ac_dir" && ac_dir=.
1114     if test -f $ac_dir/$ac_word; then
1115       ac_cv_prog_AMTAR="$ac_prog"
1116       break
1117     fi
1118   done
1119   IFS="$ac_save_ifs"
1120 fi
1121 fi
1122 AMTAR="$ac_cv_prog_AMTAR"
1123 if test -n "$AMTAR"; then
1124   echo "$ac_t""$AMTAR" 1>&6
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128
1129 test -n "$AMTAR" && break
1130 done
1131
1132
1133 AMTARFLAGS=
1134 if test -n "$AMTAR"; then
1135   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1136         AMTARFLAGS=o
1137   fi
1138 fi
1139
1140
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_PACKAGE "$PACKAGE"
1144 EOF
1145
1146 cat >> confdefs.h <<EOF
1147 #define OPENLDAP_VERSION "$VERSION"
1148 EOF
1149
1150
1151
1152
1153 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1154 echo "configure:1155: checking configure arguments" >&5
1155
1156
1157 top_builddir=`pwd`
1158
1159 ldap_subdir="/openldap"
1160
1161 # Check whether --with-subdir or --without-subdir was given.
1162 if test "${with_subdir+set}" = set; then
1163   withval="$with_subdir"
1164   case "$withval" in
1165         no) ldap_subdir=""
1166                 ;;
1167         yes)
1168                 ;;
1169         /*|\\*)
1170                 ldap_subdir="$withval"
1171                 ;;
1172         *)
1173                 ldap_subdir="/$withval"
1174                 ;;
1175 esac
1176
1177 fi
1178
1179
1180 # OpenLDAP --enable-debug
1181         # Check whether --enable-debug or --disable-debug was given.
1182 if test "${enable_debug+set}" = set; then
1183   enableval="$enable_debug"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1193         fi
1194         ol_enable_debug="$ol_arg"
1195
1196 else
1197         ol_enable_debug="yes"
1198 fi
1199 # end --enable-debug
1200 # OpenLDAP --enable-syslog
1201         # Check whether --enable-syslog or --disable-syslog was given.
1202 if test "${enable_syslog+set}" = set; then
1203   enableval="$enable_syslog"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1213         fi
1214         ol_enable_syslog="$ol_arg"
1215
1216 else
1217         ol_enable_syslog="auto"
1218 fi
1219 # end --enable-syslog
1220 # OpenLDAP --enable-proctitle
1221         # Check whether --enable-proctitle or --disable-proctitle was given.
1222 if test "${enable_proctitle+set}" = set; then
1223   enableval="$enable_proctitle"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1233         fi
1234         ol_enable_proctitle="$ol_arg"
1235
1236 else
1237         ol_enable_proctitle="yes"
1238 fi
1239 # end --enable-proctitle
1240 # OpenLDAP --enable-cache
1241         # Check whether --enable-cache or --disable-cache was given.
1242 if test "${enable_cache+set}" = set; then
1243   enableval="$enable_cache"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1253         fi
1254         ol_enable_cache="$ol_arg"
1255
1256 else
1257         ol_enable_cache="yes"
1258 fi
1259 # end --enable-cache
1260 # OpenLDAP --enable-referrals
1261         # Check whether --enable-referrals or --disable-referrals was given.
1262 if test "${enable_referrals+set}" = set; then
1263   enableval="$enable_referrals"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no ; do
1267                 if test "$enableval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1273         fi
1274         ol_enable_referrals="$ol_arg"
1275
1276 else
1277         ol_enable_referrals="yes"
1278 fi
1279 # end --enable-referrals
1280 # OpenLDAP --enable-kbind
1281         # Check whether --enable-kbind or --disable-kbind was given.
1282 if test "${enable_kbind+set}" = set; then
1283   enableval="$enable_kbind"
1284   
1285         ol_arg=invalid
1286         for ol_val in auto yes no ; do
1287                 if test "$enableval" = "$ol_val" ; then
1288                         ol_arg="$ol_val"
1289                 fi
1290         done
1291         if test "$ol_arg" = "invalid" ; then
1292                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1293         fi
1294         ol_enable_kbind="$ol_arg"
1295
1296 else
1297         ol_enable_kbind="auto"
1298 fi
1299 # end --enable-kbind
1300 # OpenLDAP --enable-cldap
1301         # Check whether --enable-cldap or --disable-cldap was given.
1302 if test "${enable_cldap+set}" = set; then
1303   enableval="$enable_cldap"
1304   
1305         ol_arg=invalid
1306         for ol_val in auto yes no ; do
1307                 if test "$enableval" = "$ol_val" ; then
1308                         ol_arg="$ol_val"
1309                 fi
1310         done
1311         if test "$ol_arg" = "invalid" ; then
1312                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1313         fi
1314         ol_enable_cldap="$ol_arg"
1315
1316 else
1317         ol_enable_cldap="no"
1318 fi
1319 # end --enable-cldap
1320 # OpenLDAP --enable-ipv6
1321         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1322 if test "${enable_ipv6+set}" = set; then
1323   enableval="$enable_ipv6"
1324   
1325         ol_arg=invalid
1326         for ol_val in auto yes no ; do
1327                 if test "$enableval" = "$ol_val" ; then
1328                         ol_arg="$ol_val"
1329                 fi
1330         done
1331         if test "$ol_arg" = "invalid" ; then
1332                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1333         fi
1334         ol_enable_ipv6="$ol_arg"
1335
1336 else
1337         ol_enable_ipv6="auto"
1338 fi
1339 # end --enable-ipv6
1340 # OpenLDAP --enable-local
1341         # Check whether --enable-local or --disable-local was given.
1342 if test "${enable_local+set}" = set; then
1343   enableval="$enable_local"
1344   
1345         ol_arg=invalid
1346         for ol_val in auto yes no ; do
1347                 if test "$enableval" = "$ol_val" ; then
1348                         ol_arg="$ol_val"
1349                 fi
1350         done
1351         if test "$ol_arg" = "invalid" ; then
1352                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1353         fi
1354         ol_enable_local="$ol_arg"
1355
1356 else
1357         ol_enable_local="auto"
1358 fi
1359 # end --enable-local
1360 # OpenLDAP --enable-x_compile
1361         # Check whether --enable-x_compile or --disable-x_compile was given.
1362 if test "${enable_x_compile+set}" = set; then
1363   enableval="$enable_x_compile"
1364   
1365         ol_arg=invalid
1366         for ol_val in yes no ; do
1367                 if test "$enableval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1373         fi
1374         ol_enable_x_compile="$ol_arg"
1375
1376 else
1377         ol_enable_x_compile="no"
1378 fi
1379 # end --enable-x_compile
1380
1381
1382 # OpenLDAP --with-cyrus_sasl
1383         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1384 if test "${with_cyrus_sasl+set}" = set; then
1385   withval="$with_cyrus_sasl"
1386   
1387         ol_arg=invalid
1388         for ol_val in auto yes no  ; do
1389                 if test "$withval" = "$ol_val" ; then
1390                         ol_arg="$ol_val"
1391                 fi
1392         done
1393         if test "$ol_arg" = "invalid" ; then
1394                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1395         fi
1396         ol_with_cyrus_sasl="$ol_arg"
1397
1398 else
1399         ol_with_cyrus_sasl="auto"
1400 fi
1401 # end --with-cyrus_sasl
1402
1403 # OpenLDAP --with-fetch
1404         # Check whether --with-fetch or --without-fetch was given.
1405 if test "${with_fetch+set}" = set; then
1406   withval="$with_fetch"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no  ; do
1410                 if test "$withval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1416         fi
1417         ol_with_fetch="$ol_arg"
1418
1419 else
1420         ol_with_fetch="auto"
1421 fi
1422 # end --with-fetch
1423
1424 # OpenLDAP --with-kerberos
1425         # Check whether --with-kerberos or --without-kerberos was given.
1426 if test "${with_kerberos+set}" = set; then
1427   withval="$with_kerberos"
1428   
1429         ol_arg=invalid
1430         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1431                 if test "$withval" = "$ol_val" ; then
1432                         ol_arg="$ol_val"
1433                 fi
1434         done
1435         if test "$ol_arg" = "invalid" ; then
1436                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1437         fi
1438         ol_with_kerberos="$ol_arg"
1439
1440 else
1441         ol_with_kerberos="auto"
1442 fi
1443 # end --with-kerberos
1444
1445 # OpenLDAP --with-readline
1446         # Check whether --with-readline or --without-readline was given.
1447 if test "${with_readline+set}" = set; then
1448   withval="$with_readline"
1449   
1450         ol_arg=invalid
1451         for ol_val in auto yes no  ; do
1452                 if test "$withval" = "$ol_val" ; then
1453                         ol_arg="$ol_val"
1454                 fi
1455         done
1456         if test "$ol_arg" = "invalid" ; then
1457                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1458         fi
1459         ol_with_readline="$ol_arg"
1460
1461 else
1462         ol_with_readline="auto"
1463 fi
1464 # end --with-readline
1465
1466 # OpenLDAP --with-threads
1467         # Check whether --with-threads or --without-threads was given.
1468 if test "${with_threads+set}" = set; then
1469   withval="$with_threads"
1470   
1471         ol_arg=invalid
1472         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1473                 if test "$withval" = "$ol_val" ; then
1474                         ol_arg="$ol_val"
1475                 fi
1476         done
1477         if test "$ol_arg" = "invalid" ; then
1478                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1479         fi
1480         ol_with_threads="$ol_arg"
1481
1482 else
1483         ol_with_threads="auto"
1484 fi
1485 # end --with-threads
1486
1487 # OpenLDAP --with-tls
1488         # Check whether --with-tls or --without-tls was given.
1489 if test "${with_tls+set}" = set; then
1490   withval="$with_tls"
1491   
1492         ol_arg=invalid
1493         for ol_val in auto ssleay openssl yes no  ; do
1494                 if test "$withval" = "$ol_val" ; then
1495                         ol_arg="$ol_val"
1496                 fi
1497         done
1498         if test "$ol_arg" = "invalid" ; then
1499                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1500         fi
1501         ol_with_tls="$ol_arg"
1502
1503 else
1504         ol_with_tls="auto"
1505 fi
1506 # end --with-tls
1507
1508 # OpenLDAP --with-yielding_select
1509         # Check whether --with-yielding_select or --without-yielding_select was given.
1510 if test "${with_yielding_select+set}" = set; then
1511   withval="$with_yielding_select"
1512   
1513         ol_arg=invalid
1514         for ol_val in auto yes no manual  ; do
1515                 if test "$withval" = "$ol_val" ; then
1516                         ol_arg="$ol_val"
1517                 fi
1518         done
1519         if test "$ol_arg" = "invalid" ; then
1520                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1521         fi
1522         ol_with_yielding_select="$ol_arg"
1523
1524 else
1525         ol_with_yielding_select="auto"
1526 fi
1527 # end --with-yielding_select
1528
1529
1530
1531 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1532 if test "${with_xxslapdoptions+set}" = set; then
1533   withval="$with_xxslapdoptions"
1534   :
1535 fi
1536
1537 # OpenLDAP --enable-slapd
1538         # Check whether --enable-slapd or --disable-slapd was given.
1539 if test "${enable_slapd+set}" = set; then
1540   enableval="$enable_slapd"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no ; do
1544                 if test "$enableval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1550         fi
1551         ol_enable_slapd="$ol_arg"
1552
1553 else
1554         ol_enable_slapd="yes"
1555 fi
1556 # end --enable-slapd
1557 # OpenLDAP --enable-cleartext
1558         # Check whether --enable-cleartext or --disable-cleartext was given.
1559 if test "${enable_cleartext+set}" = set; then
1560   enableval="$enable_cleartext"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no ; do
1564                 if test "$enableval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1570         fi
1571         ol_enable_cleartext="$ol_arg"
1572
1573 else
1574         ol_enable_cleartext="yes"
1575 fi
1576 # end --enable-cleartext
1577 # OpenLDAP --enable-crypt
1578         # Check whether --enable-crypt or --disable-crypt was given.
1579 if test "${enable_crypt+set}" = set; then
1580   enableval="$enable_crypt"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto yes no ; do
1584                 if test "$enableval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1590         fi
1591         ol_enable_crypt="$ol_arg"
1592
1593 else
1594         ol_enable_crypt="auto"
1595 fi
1596 # end --enable-crypt
1597 # OpenLDAP --enable-kpasswd
1598         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1599 if test "${enable_kpasswd+set}" = set; then
1600   enableval="$enable_kpasswd"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no ; do
1604                 if test "$enableval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1610         fi
1611         ol_enable_kpasswd="$ol_arg"
1612
1613 else
1614         ol_enable_kpasswd="no"
1615 fi
1616 # end --enable-kpasswd
1617 # OpenLDAP --enable-spasswd
1618         # Check whether --enable-spasswd or --disable-spasswd was given.
1619 if test "${enable_spasswd+set}" = set; then
1620   enableval="$enable_spasswd"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no ; do
1624                 if test "$enableval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1630         fi
1631         ol_enable_spasswd="$ol_arg"
1632
1633 else
1634         ol_enable_spasswd="no"
1635 fi
1636 # end --enable-spasswd
1637 # OpenLDAP --enable-modules
1638         # Check whether --enable-modules or --disable-modules was given.
1639 if test "${enable_modules+set}" = set; then
1640   enableval="$enable_modules"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto yes no ; do
1644                 if test "$enableval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1650         fi
1651         ol_enable_modules="$ol_arg"
1652
1653 else
1654         ol_enable_modules="no"
1655 fi
1656 # end --enable-modules
1657 # OpenLDAP --enable-multimaster
1658         # Check whether --enable-multimaster or --disable-multimaster was given.
1659 if test "${enable_multimaster+set}" = set; then
1660   enableval="$enable_multimaster"
1661   
1662         ol_arg=invalid
1663         for ol_val in auto yes no ; do
1664                 if test "$enableval" = "$ol_val" ; then
1665                         ol_arg="$ol_val"
1666                 fi
1667         done
1668         if test "$ol_arg" = "invalid" ; then
1669                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1670         fi
1671         ol_enable_multimaster="$ol_arg"
1672
1673 else
1674         ol_enable_multimaster="no"
1675 fi
1676 # end --enable-multimaster
1677 # OpenLDAP --enable-phonetic
1678         # Check whether --enable-phonetic or --disable-phonetic was given.
1679 if test "${enable_phonetic+set}" = set; then
1680   enableval="$enable_phonetic"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto yes no ; do
1684                 if test "$enableval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1690         fi
1691         ol_enable_phonetic="$ol_arg"
1692
1693 else
1694         ol_enable_phonetic="no"
1695 fi
1696 # end --enable-phonetic
1697 # OpenLDAP --enable-rlookups
1698         # Check whether --enable-rlookups or --disable-rlookups was given.
1699 if test "${enable_rlookups+set}" = set; then
1700   enableval="$enable_rlookups"
1701   
1702         ol_arg=invalid
1703         for ol_val in auto yes no ; do
1704                 if test "$enableval" = "$ol_val" ; then
1705                         ol_arg="$ol_val"
1706                 fi
1707         done
1708         if test "$ol_arg" = "invalid" ; then
1709                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1710         fi
1711         ol_enable_rlookups="$ol_arg"
1712
1713 else
1714         ol_enable_rlookups="auto"
1715 fi
1716 # end --enable-rlookups
1717 # OpenLDAP --enable-aci
1718         # Check whether --enable-aci or --disable-aci was given.
1719 if test "${enable_aci+set}" = set; then
1720   enableval="$enable_aci"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1730         fi
1731         ol_enable_aci="$ol_arg"
1732
1733 else
1734         ol_enable_aci="no"
1735 fi
1736 # end --enable-aci
1737 # OpenLDAP --enable-wrappers
1738         # Check whether --enable-wrappers or --disable-wrappers was given.
1739 if test "${enable_wrappers+set}" = set; then
1740   enableval="$enable_wrappers"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1750         fi
1751         ol_enable_wrappers="$ol_arg"
1752
1753 else
1754         ol_enable_wrappers="no"
1755 fi
1756 # end --enable-wrappers
1757 # OpenLDAP --enable-dynamic
1758         # Check whether --enable-dynamic or --disable-dynamic was given.
1759 if test "${enable_dynamic+set}" = set; then
1760   enableval="$enable_dynamic"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1770         fi
1771         ol_enable_dynamic="$ol_arg"
1772
1773 else
1774         ol_enable_dynamic="no"
1775 fi
1776 # end --enable-dynamic
1777
1778 # OpenLDAP --enable-dnssrv
1779         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1780 if test "${enable_dnssrv+set}" = set; then
1781   enableval="$enable_dnssrv"
1782   
1783         ol_arg=invalid
1784         for ol_val in auto yes no ; do
1785                 if test "$enableval" = "$ol_val" ; then
1786                         ol_arg="$ol_val"
1787                 fi
1788         done
1789         if test "$ol_arg" = "invalid" ; then
1790                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1791         fi
1792         ol_enable_dnssrv="$ol_arg"
1793
1794 else
1795         ol_enable_dnssrv="no"
1796 fi
1797 # end --enable-dnssrv
1798 # OpenLDAP --with-dnssrv_module
1799         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1800 if test "${with_dnssrv_module+set}" = set; then
1801   withval="$with_dnssrv_module"
1802   
1803         ol_arg=invalid
1804         for ol_val in static dynamic ; do
1805                 if test "$withval" = "$ol_val" ; then
1806                         ol_arg="$ol_val"
1807                 fi
1808         done
1809         if test "$ol_arg" = "invalid" ; then
1810                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1811         fi
1812         ol_with_dnssrv_module="$ol_arg"
1813
1814 else
1815         ol_with_dnssrv_module="static"
1816 fi
1817 # end --with-dnssrv_module
1818
1819 # OpenLDAP --enable-ldap
1820         # Check whether --enable-ldap or --disable-ldap was given.
1821 if test "${enable_ldap+set}" = set; then
1822   enableval="$enable_ldap"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1832         fi
1833         ol_enable_ldap="$ol_arg"
1834
1835 else
1836         ol_enable_ldap="no"
1837 fi
1838 # end --enable-ldap
1839 # OpenLDAP --with-ldap_module
1840         # Check whether --with-ldap_module or --without-ldap_module was given.
1841 if test "${with_ldap_module+set}" = set; then
1842   withval="$with_ldap_module"
1843   
1844         ol_arg=invalid
1845         for ol_val in static dynamic ; do
1846                 if test "$withval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1852         fi
1853         ol_with_ldap_module="$ol_arg"
1854
1855 else
1856         ol_with_ldap_module="static"
1857 fi
1858 # end --with-ldap_module
1859
1860 # OpenLDAP --enable-ldbm
1861         # Check whether --enable-ldbm or --disable-ldbm was given.
1862 if test "${enable_ldbm+set}" = set; then
1863   enableval="$enable_ldbm"
1864   
1865         ol_arg=invalid
1866         for ol_val in auto yes no ; do
1867                 if test "$enableval" = "$ol_val" ; then
1868                         ol_arg="$ol_val"
1869                 fi
1870         done
1871         if test "$ol_arg" = "invalid" ; then
1872                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1873         fi
1874         ol_enable_ldbm="$ol_arg"
1875
1876 else
1877         ol_enable_ldbm="yes"
1878 fi
1879 # end --enable-ldbm
1880 # OpenLDAP --with-ldbm_api
1881         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1882 if test "${with_ldbm_api+set}" = set; then
1883   withval="$with_ldbm_api"
1884   
1885         ol_arg=invalid
1886         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1887                 if test "$withval" = "$ol_val" ; then
1888                         ol_arg="$ol_val"
1889                 fi
1890         done
1891         if test "$ol_arg" = "invalid" ; then
1892                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1893         fi
1894         ol_with_ldbm_api="$ol_arg"
1895
1896 else
1897         ol_with_ldbm_api="auto"
1898 fi
1899 # end --with-ldbm_api
1900
1901 # OpenLDAP --with-ldbm_module
1902         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1903 if test "${with_ldbm_module+set}" = set; then
1904   withval="$with_ldbm_module"
1905   
1906         ol_arg=invalid
1907         for ol_val in static dynamic ; do
1908                 if test "$withval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1914         fi
1915         ol_with_ldbm_module="$ol_arg"
1916
1917 else
1918         ol_with_ldbm_module="static"
1919 fi
1920 # end --with-ldbm_module
1921
1922 # OpenLDAP --with-ldbm_type
1923         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1924 if test "${with_ldbm_type+set}" = set; then
1925   withval="$with_ldbm_type"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto btree hash ; do
1929                 if test "$withval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1935         fi
1936         ol_with_ldbm_type="$ol_arg"
1937
1938 else
1939         ol_with_ldbm_type="auto"
1940 fi
1941 # end --with-ldbm_type
1942
1943 # OpenLDAP --enable-passwd
1944         # Check whether --enable-passwd or --disable-passwd was given.
1945 if test "${enable_passwd+set}" = set; then
1946   enableval="$enable_passwd"
1947   
1948         ol_arg=invalid
1949         for ol_val in auto yes no ; do
1950                 if test "$enableval" = "$ol_val" ; then
1951                         ol_arg="$ol_val"
1952                 fi
1953         done
1954         if test "$ol_arg" = "invalid" ; then
1955                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1956         fi
1957         ol_enable_passwd="$ol_arg"
1958
1959 else
1960         ol_enable_passwd="no"
1961 fi
1962 # end --enable-passwd
1963 # OpenLDAP --with-passwd_module
1964         # Check whether --with-passwd_module or --without-passwd_module was given.
1965 if test "${with_passwd_module+set}" = set; then
1966   withval="$with_passwd_module"
1967   
1968         ol_arg=invalid
1969         for ol_val in static dynamic ; do
1970                 if test "$withval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1976         fi
1977         ol_with_passwd_module="$ol_arg"
1978
1979 else
1980         ol_with_passwd_module="static"
1981 fi
1982 # end --with-passwd_module
1983
1984 # OpenLDAP --enable-perl
1985         # Check whether --enable-perl or --disable-perl was given.
1986 if test "${enable_perl+set}" = set; then
1987   enableval="$enable_perl"
1988   
1989         ol_arg=invalid
1990         for ol_val in auto yes no ; do
1991                 if test "$enableval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1997         fi
1998         ol_enable_perl="$ol_arg"
1999
2000 else
2001         ol_enable_perl="no"
2002 fi
2003 # end --enable-perl
2004 # OpenLDAP --with-perl_module
2005         # Check whether --with-perl_module or --without-perl_module was given.
2006 if test "${with_perl_module+set}" = set; then
2007   withval="$with_perl_module"
2008   
2009         ol_arg=invalid
2010         for ol_val in static dynamic ; do
2011                 if test "$withval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2017         fi
2018         ol_with_perl_module="$ol_arg"
2019
2020 else
2021         ol_with_perl_module="static"
2022 fi
2023 # end --with-perl_module
2024
2025 # OpenLDAP --enable-shell
2026         # Check whether --enable-shell or --disable-shell was given.
2027 if test "${enable_shell+set}" = set; then
2028   enableval="$enable_shell"
2029   
2030         ol_arg=invalid
2031         for ol_val in auto yes no ; do
2032                 if test "$enableval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2038         fi
2039         ol_enable_shell="$ol_arg"
2040
2041 else
2042         ol_enable_shell="no"
2043 fi
2044 # end --enable-shell
2045 # OpenLDAP --with-shell_module
2046         # Check whether --with-shell_module or --without-shell_module was given.
2047 if test "${with_shell_module+set}" = set; then
2048   withval="$with_shell_module"
2049   
2050         ol_arg=invalid
2051         for ol_val in static dynamic ; do
2052                 if test "$withval" = "$ol_val" ; then
2053                         ol_arg="$ol_val"
2054                 fi
2055         done
2056         if test "$ol_arg" = "invalid" ; then
2057                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2058         fi
2059         ol_with_shell_module="$ol_arg"
2060
2061 else
2062         ol_with_shell_module="static"
2063 fi
2064 # end --with-shell_module
2065
2066 # OpenLDAP --enable-sql
2067         # Check whether --enable-sql or --disable-sql was given.
2068 if test "${enable_sql+set}" = set; then
2069   enableval="$enable_sql"
2070   
2071         ol_arg=invalid
2072         for ol_val in auto yes no ; do
2073                 if test "$enableval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2079         fi
2080         ol_enable_sql="$ol_arg"
2081
2082 else
2083         ol_enable_sql="no"
2084 fi
2085 # end --enable-sql
2086 # OpenLDAP --with-sql_module
2087         # Check whether --with-sql_module or --without-sql_module was given.
2088 if test "${with_sql_module+set}" = set; then
2089   withval="$with_sql_module"
2090   
2091         ol_arg=invalid
2092         for ol_val in static dynamic ; do
2093                 if test "$withval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2099         fi
2100         ol_with_sql_module="$ol_arg"
2101
2102 else
2103         ol_with_sql_module="static"
2104 fi
2105 # end --with-sql_module
2106
2107 # OpenLDAP --enable-tcl
2108         # Check whether --enable-tcl or --disable-tcl was given.
2109 if test "${enable_tcl+set}" = set; then
2110   enableval="$enable_tcl"
2111   
2112         ol_arg=invalid
2113         for ol_val in auto yes no ; do
2114                 if test "$enableval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2120         fi
2121         ol_enable_tcl="$ol_arg"
2122
2123 else
2124         ol_enable_tcl="no"
2125 fi
2126 # end --enable-tcl
2127 # OpenLDAP --with-tcl_module
2128         # Check whether --with-tcl_module or --without-tcl_module was given.
2129 if test "${with_tcl_module+set}" = set; then
2130   withval="$with_tcl_module"
2131   
2132         ol_arg=invalid
2133         for ol_val in static dynamic ; do
2134                 if test "$withval" = "$ol_val" ; then
2135                         ol_arg="$ol_val"
2136                 fi
2137         done
2138         if test "$ol_arg" = "invalid" ; then
2139                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2140         fi
2141         ol_with_tcl_module="$ol_arg"
2142
2143 else
2144         ol_with_tcl_module="static"
2145 fi
2146 # end --with-tcl_module
2147
2148
2149 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2150 if test "${with_xxslurpdoptions+set}" = set; then
2151   withval="$with_xxslurpdoptions"
2152   :
2153 fi
2154
2155 # OpenLDAP --enable-slurpd
2156         # Check whether --enable-slurpd or --disable-slurpd was given.
2157 if test "${enable_slurpd+set}" = set; then
2158   enableval="$enable_slurpd"
2159   
2160         ol_arg=invalid
2161         for ol_val in auto yes no ; do
2162                 if test "$enableval" = "$ol_val" ; then
2163                         ol_arg="$ol_val"
2164                 fi
2165         done
2166         if test "$ol_arg" = "invalid" ; then
2167                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2168         fi
2169         ol_enable_slurpd="$ol_arg"
2170
2171 else
2172         ol_enable_slurpd="auto"
2173 fi
2174 # end --enable-slurpd
2175
2176 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2177 if test "${with_xxliboptions+set}" = set; then
2178   withval="$with_xxliboptions"
2179   :
2180 fi
2181
2182 # Check whether --enable-static or --disable-static was given.
2183 if test "${enable_static+set}" = set; then
2184   enableval="$enable_static"
2185   p=${PACKAGE-default}
2186 case "$enableval" in
2187 yes) enable_static=yes ;;
2188 no) enable_static=no ;;
2189 *)
2190   enable_static=no
2191   # Look at the argument we got.  We use all the common list separators.
2192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2193   for pkg in $enableval; do
2194     if test "X$pkg" = "X$p"; then
2195       enable_static=yes
2196     fi
2197   done
2198   IFS="$ac_save_ifs"
2199   ;;
2200 esac
2201 else
2202   enable_static=yes
2203 fi
2204
2205 # Check whether --enable-shared or --disable-shared was given.
2206 if test "${enable_shared+set}" = set; then
2207   enableval="$enable_shared"
2208   p=${PACKAGE-default}
2209 case "$enableval" in
2210 yes) enable_shared=yes ;;
2211 no) enable_shared=no ;;
2212 *)
2213   enable_shared=no
2214   # Look at the argument we got.  We use all the common list separators.
2215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2216   for pkg in $enableval; do
2217     if test "X$pkg" = "X$p"; then
2218       enable_shared=yes
2219     fi
2220   done
2221   IFS="$ac_save_ifs"
2222   ;;
2223 esac
2224 else
2225   enable_shared=yes
2226 fi
2227
2228
2229
2230 # validate options
2231 if test $ol_enable_slapd = no ; then
2232                 if test $ol_enable_dnssrv = yes ; then
2233                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2234         fi
2235         if test $ol_enable_ldap = yes ; then
2236                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2237         fi
2238         if test $ol_enable_ldbm = yes ; then
2239                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2240         fi
2241         if test $ol_enable_passwd = yes ; then
2242                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2243         fi
2244         if test $ol_enable_perl = yes ; then
2245                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2246         fi
2247         if test $ol_enable_shell = yes ; then
2248                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2249         fi
2250         if test $ol_enable_tcl = yes ; then
2251                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2252         fi
2253         if test $ol_enable_sql = yes ; then
2254                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2255         fi
2256         if test $ol_enable_modules = yes ; then
2257                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2258         fi
2259         if test $ol_enable_multimaster = yes ; then
2260                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2261         fi
2262         if test $ol_enable_wrappers = yes ; then
2263                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2264         fi
2265         if test $ol_enable_phonetic = yes ; then
2266                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2267         fi
2268         if test $ol_enable_rlookups = yes ; then
2269                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2270         fi
2271         if test $ol_enable_aci = yes ; then
2272                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2273         fi
2274         if test $ol_with_ldbm_api != auto ; then
2275                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2276         fi
2277         if test $ol_with_ldbm_type != auto ; then
2278                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2279         fi
2280         if test $ol_with_dnssrv_module != static ; then
2281                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2282         fi
2283         if test $ol_with_ldap_module != static ; then
2284                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2285         fi
2286         if test $ol_with_ldbm_module != static ; then
2287                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2288         fi
2289         if test $ol_with_passwd_module != static ; then
2290                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2291         fi
2292         if test $ol_with_perl_module != static ; then
2293                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2294         fi
2295         if test $ol_with_shell_module != static ; then
2296                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2297         fi
2298         if test $ol_with_tcl_module != static ; then
2299                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2300         fi
2301         if test $ol_with_sql_module != static ; then
2302                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2303         fi
2304         if test $ol_enable_slurpd = yes ; then
2305                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2306         fi
2307
2308         # force settings to no
2309         ol_enable_dnssrv=no
2310         ol_enable_ldap=no
2311         ol_enable_ldbm=no
2312         ol_enable_passwd=no
2313         ol_enable_perl=no
2314         ol_enable_shell=no
2315         ol_enable_tcl=no
2316         ol_enable_sql=no
2317
2318         ol_enable_modules=no
2319         ol_enable_multimaster=no
2320         ol_enable_phonetic=no
2321         ol_enable_rlookups=no
2322         ol_enable_aci=no
2323         ol_enable_wrappers=no
2324         ol_enable_dynamic=no
2325
2326         ol_with_ldbm_api=no
2327         ol_with_ldbm_type=no
2328
2329         ol_with_dnssrv_module=static
2330         ol_with_ldap_module=static
2331         ol_with_ldbm_module=static
2332         ol_with_passwd_module=static
2333         ol_with_perl_module=static
2334         ol_with_shell_module=static
2335         ol_with_tcl_module=static
2336         ol_with_sql_module=static
2337
2338         ol_enable_slurpd=no
2339
2340 elif test $ol_enable_ldbm = no ; then
2341         
2342         if test $ol_with_ldbm_api != auto ; then
2343                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2344         fi
2345
2346         if test $ol_with_ldbm_type != auto ; then
2347                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2348         fi
2349
2350         if test $ol_with_ldbm_module != static ; then
2351                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2352         fi
2353
2354         if test $ol_enable_modules != yes -a \
2355                 $ol_enable_dnssrv = no -a \
2356                 $ol_enable_ldap = no -a \
2357                 $ol_enable_passwd = no -a \
2358                 $ol_enable_perl = no -a \
2359                 $ol_enable_shell = no -a \
2360                 $ol_enable_sql = no -a \
2361                 $ol_enable_tcl = no ; then
2362                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2363         fi
2364
2365         ol_with_ldbm_api=no
2366         ol_with_ldbm_type=no
2367         ol_with_ldbm_module=static
2368
2369 else
2370                 if test $ol_with_ldbm_api = gdbm -a \
2371                 $ol_with_ldbm_type = btree ; then
2372                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2373         fi
2374         if test $ol_with_ldbm_api = mdbm -a \
2375                 $ol_with_ldbm_type = btree ; then
2376                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2377         fi
2378         if test $ol_with_ldbm_api = ndbm -a \
2379                 $ol_with_ldbm_type = btree ; then
2380                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2381         fi
2382 fi
2383
2384 if test $ol_enable_slurpd = yes ; then
2385                 if test $ol_with_threads = no ; then
2386                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2387         fi
2388 fi
2389
2390 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2391         if test $ol_with_kerberos = no ; then
2392                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2393         fi
2394 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2395         if test $ol_with_kerberos != auto ; then
2396                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2397         else
2398                 ol_with_kerberos=no
2399         fi
2400 fi
2401
2402 if test $ol_enable_spasswd = yes ; then
2403         if test $ol_with_cyrus_sasl = no ; then
2404                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2405         fi
2406         ol_link_spasswd=yes
2407 fi
2408
2409 echo "$ac_t""done" 1>&6
2410
2411 LDAP_LIBS=
2412 LDIF_LIBS=
2413 LDBM_LIBS=
2414 LTHREAD_LIBS=
2415 LUTIL_LIBS=
2416
2417 SLAPD_LIBS=
2418 SLURPD_LIBS=
2419
2420 BUILD_SLAPD=no
2421 BUILD_SLURPD=no
2422
2423 BUILD_THREAD=no
2424
2425 BUILD_DNSSRV=no
2426 BUILD_LDAP=no
2427 BUILD_LDBM=no
2428 BUILD_PASSWD=no
2429 BUILD_PERL=no
2430 BUILD_SHELL=no
2431 BUILD_SQL=no
2432 BUILD_TCL=no
2433
2434 BUILD_DNSSRV_DYNAMIC=static
2435 BUILD_LDAP_DYNAMIC=static
2436 BUILD_LDBM_DYNAMIC=static
2437 BUILD_PASSWD_DYNAMIC=static
2438 BUILD_PERL_DYNAMIC=static
2439 BUILD_SHELL_DYNAMIC=static
2440 BUILD_TCL_DYNAMIC=static
2441 BUILD_SQL_DYNAMIC=static
2442
2443 SLAPD_MODULES_LDFLAGS=
2444 SLAPD_MODULES_CPPFLAGS=
2445 SLAPD_MODULES_LIST=
2446
2447 SLAPD_PERL_LDFLAGS=
2448 MOD_PERL_LDFLAGS=
2449 PERL_CPPFLAGS=
2450
2451 SLAPD_SQL_LDFLAGS=
2452 SLAPD_SQL_LIBS=
2453 SLAPD_SQL_INCLUDES=
2454
2455 MOD_TCL_LIB=
2456 KRB4_LIBS=
2457 KRB5_LIBS=
2458 READLINE_LIBS=
2459 SASL_LIBS=
2460 TERMCAP_LIBS=
2461 TLS_LIBS=
2462 MODULES_LIBS=
2463 AUTH_LIBS=
2464
2465
2466
2467 cat >> confdefs.h <<\EOF
2468 #define HAVE_MKVERSION 1
2469 EOF
2470
2471
2472
2473
2474 ol_aix_threads=no
2475 case "$target" in
2476 *-*-aix*)       if test -z "$CC" ; then
2477                 case "$ol_with_threads" in
2478                 auto | yes |  posix) ol_aix_threads=yes ;;
2479                 esac
2480         fi
2481 ;;
2482 esac
2483
2484 if test $ol_aix_threads = yes ; then
2485         if test -z "${CC}" ; then
2486                 for ac_prog in cc_r xlc_r cc
2487 do
2488 # Extract the first word of "$ac_prog", so it can be a program name with args.
2489 set dummy $ac_prog; ac_word=$2
2490 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2491 echo "configure:2492: checking for $ac_word" >&5
2492 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2493   echo $ac_n "(cached) $ac_c" 1>&6
2494 else
2495   if test -n "$CC"; then
2496   ac_cv_prog_CC="$CC" # Let the user override the test.
2497 else
2498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2499   ac_dummy="$PATH"
2500   for ac_dir in $ac_dummy; do
2501     test -z "$ac_dir" && ac_dir=.
2502     if test -f $ac_dir/$ac_word; then
2503       ac_cv_prog_CC="$ac_prog"
2504       break
2505     fi
2506   done
2507   IFS="$ac_save_ifs"
2508 fi
2509 fi
2510 CC="$ac_cv_prog_CC"
2511 if test -n "$CC"; then
2512   echo "$ac_t""$CC" 1>&6
2513 else
2514   echo "$ac_t""no" 1>&6
2515 fi
2516
2517 test -n "$CC" && break
2518 done
2519
2520
2521                 if test "$CC" = cc ; then
2522                                                 if test $ol_with_threads != auto ; then
2523                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2524                         else
2525                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2526                         fi
2527                         ol_with_threads=no
2528                 fi
2529         fi
2530
2531         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2532                 ol_with_threads=posix
2533                 ol_cv_pthread_create=yes
2534         fi
2535 fi
2536
2537 if test -z "${CC}"; then
2538         for ac_prog in cc
2539 do
2540 # Extract the first word of "$ac_prog", so it can be a program name with args.
2541 set dummy $ac_prog; ac_word=$2
2542 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2543 echo "configure:2544: checking for $ac_word" >&5
2544 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   if test -n "$CC"; then
2548   ac_cv_prog_CC="$CC" # Let the user override the test.
2549 else
2550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2551   ac_dummy="$PATH"
2552   for ac_dir in $ac_dummy; do
2553     test -z "$ac_dir" && ac_dir=.
2554     if test -f $ac_dir/$ac_word; then
2555       ac_cv_prog_CC="$ac_prog"
2556       break
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560 fi
2561 fi
2562 CC="$ac_cv_prog_CC"
2563 if test -n "$CC"; then
2564   echo "$ac_t""$CC" 1>&6
2565 else
2566   echo "$ac_t""no" 1>&6
2567 fi
2568
2569 test -n "$CC" && break
2570 done
2571
2572 fi
2573
2574
2575
2576
2577 # Check whether --enable-fast-install or --disable-fast-install was given.
2578 if test "${enable_fast_install+set}" = set; then
2579   enableval="$enable_fast_install"
2580   p=${PACKAGE-default}
2581 case "$enableval" in
2582 yes) enable_fast_install=yes ;;
2583 no) enable_fast_install=no ;;
2584 *)
2585   enable_fast_install=no
2586   # Look at the argument we got.  We use all the common list separators.
2587   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2588   for pkg in $enableval; do
2589     if test "X$pkg" = "X$p"; then
2590       enable_fast_install=yes
2591     fi
2592   done
2593   IFS="$ac_save_ifs"
2594   ;;
2595 esac
2596 else
2597   enable_fast_install=yes
2598 fi
2599
2600 # Extract the first word of "ranlib", so it can be a program name with args.
2601 set dummy ranlib; ac_word=$2
2602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2603 echo "configure:2604: checking for $ac_word" >&5
2604 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2605   echo $ac_n "(cached) $ac_c" 1>&6
2606 else
2607   if test -n "$RANLIB"; then
2608   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2609 else
2610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2611   ac_dummy="$PATH"
2612   for ac_dir in $ac_dummy; do
2613     test -z "$ac_dir" && ac_dir=.
2614     if test -f $ac_dir/$ac_word; then
2615       ac_cv_prog_RANLIB="ranlib"
2616       break
2617     fi
2618   done
2619   IFS="$ac_save_ifs"
2620   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2621 fi
2622 fi
2623 RANLIB="$ac_cv_prog_RANLIB"
2624 if test -n "$RANLIB"; then
2625   echo "$ac_t""$RANLIB" 1>&6
2626 else
2627   echo "$ac_t""no" 1>&6
2628 fi
2629
2630 # Extract the first word of "gcc", so it can be a program name with args.
2631 set dummy gcc; ac_word=$2
2632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2633 echo "configure:2634: checking for $ac_word" >&5
2634 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2635   echo $ac_n "(cached) $ac_c" 1>&6
2636 else
2637   if test -n "$CC"; then
2638   ac_cv_prog_CC="$CC" # Let the user override the test.
2639 else
2640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2641   ac_dummy="$PATH"
2642   for ac_dir in $ac_dummy; do
2643     test -z "$ac_dir" && ac_dir=.
2644     if test -f $ac_dir/$ac_word; then
2645       ac_cv_prog_CC="gcc"
2646       break
2647     fi
2648   done
2649   IFS="$ac_save_ifs"
2650 fi
2651 fi
2652 CC="$ac_cv_prog_CC"
2653 if test -n "$CC"; then
2654   echo "$ac_t""$CC" 1>&6
2655 else
2656   echo "$ac_t""no" 1>&6
2657 fi
2658
2659 if test -z "$CC"; then
2660   # Extract the first word of "cc", so it can be a program name with args.
2661 set dummy cc; ac_word=$2
2662 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2663 echo "configure:2664: checking for $ac_word" >&5
2664 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667   if test -n "$CC"; then
2668   ac_cv_prog_CC="$CC" # Let the user override the test.
2669 else
2670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2671   ac_prog_rejected=no
2672   ac_dummy="$PATH"
2673   for ac_dir in $ac_dummy; do
2674     test -z "$ac_dir" && ac_dir=.
2675     if test -f $ac_dir/$ac_word; then
2676       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2677         ac_prog_rejected=yes
2678         continue
2679       fi
2680       ac_cv_prog_CC="cc"
2681       break
2682     fi
2683   done
2684   IFS="$ac_save_ifs"
2685 if test $ac_prog_rejected = yes; then
2686   # We found a bogon in the path, so make sure we never use it.
2687   set dummy $ac_cv_prog_CC
2688   shift
2689   if test $# -gt 0; then
2690     # We chose a different compiler from the bogus one.
2691     # However, it has the same basename, so the bogon will be chosen
2692     # first if we set CC to just the basename; use the full file name.
2693     shift
2694     set dummy "$ac_dir/$ac_word" "$@"
2695     shift
2696     ac_cv_prog_CC="$@"
2697   fi
2698 fi
2699 fi
2700 fi
2701 CC="$ac_cv_prog_CC"
2702 if test -n "$CC"; then
2703   echo "$ac_t""$CC" 1>&6
2704 else
2705   echo "$ac_t""no" 1>&6
2706 fi
2707
2708   if test -z "$CC"; then
2709     case "`uname -s`" in
2710     *win32* | *WIN32* | *CYGWIN*)
2711       # Extract the first word of "cl", so it can be a program name with args.
2712 set dummy cl; ac_word=$2
2713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2714 echo "configure:2715: checking for $ac_word" >&5
2715 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2716   echo $ac_n "(cached) $ac_c" 1>&6
2717 else
2718   if test -n "$CC"; then
2719   ac_cv_prog_CC="$CC" # Let the user override the test.
2720 else
2721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2722   ac_dummy="$PATH"
2723   for ac_dir in $ac_dummy; do
2724     test -z "$ac_dir" && ac_dir=.
2725     if test -f $ac_dir/$ac_word; then
2726       ac_cv_prog_CC="cl"
2727       break
2728     fi
2729   done
2730   IFS="$ac_save_ifs"
2731 fi
2732 fi
2733 CC="$ac_cv_prog_CC"
2734 if test -n "$CC"; then
2735   echo "$ac_t""$CC" 1>&6
2736 else
2737   echo "$ac_t""no" 1>&6
2738 fi
2739  ;;
2740     esac
2741   fi
2742   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2743 fi
2744
2745 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2746 echo "configure:2747: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2747
2748 ac_ext=c
2749 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2752 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2753 cross_compiling=$ac_cv_prog_cc_cross
2754
2755 cat > conftest.$ac_ext << EOF
2756
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759
2760 main(){return(0);}
2761 EOF
2762 if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2763   ac_cv_prog_cc_works=yes
2764   # If we can't run a trivial program, we are probably using a cross compiler.
2765   if (./conftest; exit) 2>/dev/null; then
2766     ac_cv_prog_cc_cross=no
2767   else
2768     ac_cv_prog_cc_cross=yes
2769   fi
2770 else
2771   echo "configure: failed program was:" >&5
2772   cat conftest.$ac_ext >&5
2773   ac_cv_prog_cc_works=no
2774 fi
2775 rm -fr conftest*
2776 ac_ext=c
2777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2778 ac_cpp='$CPP $CPPFLAGS'
2779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2780 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2781 cross_compiling=$ac_cv_prog_cc_cross
2782
2783 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2784 if test $ac_cv_prog_cc_works = no; then
2785   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2786 fi
2787 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2788 echo "configure:2789: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2789 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2790 cross_compiling=$ac_cv_prog_cc_cross
2791
2792 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2793 echo "configure:2794: checking whether we are using GNU C" >&5
2794 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2795   echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797   cat > conftest.c <<EOF
2798 #ifdef __GNUC__
2799   yes;
2800 #endif
2801 EOF
2802 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2803   ac_cv_prog_gcc=yes
2804 else
2805   ac_cv_prog_gcc=no
2806 fi
2807 fi
2808
2809 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2810
2811 if test $ac_cv_prog_gcc = yes; then
2812   GCC=yes
2813 else
2814   GCC=
2815 fi
2816
2817 ac_test_CFLAGS="${CFLAGS+set}"
2818 ac_save_CFLAGS="$CFLAGS"
2819 CFLAGS=
2820 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2821 echo "configure:2822: checking whether ${CC-cc} accepts -g" >&5
2822 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   echo 'void f(){}' > conftest.c
2826 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2827   ac_cv_prog_cc_g=yes
2828 else
2829   ac_cv_prog_cc_g=no
2830 fi
2831 rm -f conftest*
2832
2833 fi
2834
2835 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2836 if test "$ac_test_CFLAGS" = set; then
2837   CFLAGS="$ac_save_CFLAGS"
2838 elif test $ac_cv_prog_cc_g = yes; then
2839   if test "$GCC" = yes; then
2840     CFLAGS="-g -O2"
2841   else
2842     CFLAGS="-g"
2843   fi
2844 else
2845   if test "$GCC" = yes; then
2846     CFLAGS="-O2"
2847   else
2848     CFLAGS=
2849   fi
2850 fi
2851
2852 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2853 if test "${with_gnu_ld+set}" = set; then
2854   withval="$with_gnu_ld"
2855   test "$withval" = no || with_gnu_ld=yes
2856 else
2857   with_gnu_ld=no
2858 fi
2859
2860 ac_prog=ld
2861 if test "$ac_cv_prog_gcc" = yes; then
2862   # Check if gcc -print-prog-name=ld gives a path.
2863   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2864 echo "configure:2865: checking for ld used by GCC" >&5
2865   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2866   case "$ac_prog" in
2867     # Accept absolute paths.
2868     [\\/]* | [A-Za-z]:[\\/]*)
2869       re_direlt='/[^/][^/]*/\.\./'
2870       # Canonicalize the path of ld
2871       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2872       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2873         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2874       done
2875       test -z "$LD" && LD="$ac_prog"
2876       ;;
2877   "")
2878     # If it fails, then pretend we aren't using GCC.
2879     ac_prog=ld
2880     ;;
2881   *)
2882     # If it is relative, then search for the first ld in PATH.
2883     with_gnu_ld=unknown
2884     ;;
2885   esac
2886 elif test "$with_gnu_ld" = yes; then
2887   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2888 echo "configure:2889: checking for GNU ld" >&5
2889 else
2890   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2891 echo "configure:2892: checking for non-GNU ld" >&5
2892 fi
2893 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2894   echo $ac_n "(cached) $ac_c" 1>&6
2895 else
2896   if test -z "$LD"; then
2897   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2898   for ac_dir in $PATH; do
2899     test -z "$ac_dir" && ac_dir=.
2900     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2901       ac_cv_path_LD="$ac_dir/$ac_prog"
2902       # Check to see if the program is GNU ld.  I'd rather use --version,
2903       # but apparently some GNU ld's only accept -v.
2904       # Break only if it was the GNU/non-GNU ld that we prefer.
2905       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2906         test "$with_gnu_ld" != no && break
2907       else
2908         test "$with_gnu_ld" != yes && break
2909       fi
2910     fi
2911   done
2912   IFS="$ac_save_ifs"
2913 else
2914   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2915 fi
2916 fi
2917
2918 LD="$ac_cv_path_LD"
2919 if test -n "$LD"; then
2920   echo "$ac_t""$LD" 1>&6
2921 else
2922   echo "$ac_t""no" 1>&6
2923 fi
2924 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2925 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2926 echo "configure:2927: checking if the linker ($LD) is GNU ld" >&5
2927 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2928   echo $ac_n "(cached) $ac_c" 1>&6
2929 else
2930   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2931 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2932   ac_cv_prog_gnu_ld=yes
2933 else
2934   ac_cv_prog_gnu_ld=no
2935 fi
2936 fi
2937
2938 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2939
2940
2941 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2942 echo "configure:2943: checking for BSD-compatible nm" >&5
2943 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946   if test -n "$NM"; then
2947   # Let the user override the test.
2948   ac_cv_path_NM="$NM"
2949 else
2950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2951   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2952     test -z "$ac_dir" && ac_dir=.
2953     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2954       # Check to see if the nm accepts a BSD-compat flag.
2955       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2956       #   nm: unknown option "B" ignored
2957       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2958         ac_cv_path_NM="$ac_dir/nm -B"
2959         break
2960       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2961         ac_cv_path_NM="$ac_dir/nm -p"
2962         break
2963       else
2964         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2965         continue # so that we can try to find one that supports BSD flags
2966       fi
2967     fi
2968   done
2969   IFS="$ac_save_ifs"
2970   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2971 fi
2972 fi
2973
2974 NM="$ac_cv_path_NM"
2975 echo "$ac_t""$NM" 1>&6
2976
2977 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2978 echo "configure:2979: checking whether ln -s works" >&5
2979 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2980   echo $ac_n "(cached) $ac_c" 1>&6
2981 else
2982   rm -f conftestdata
2983 if ln -s X conftestdata 2>/dev/null
2984 then
2985   rm -f conftestdata
2986   ac_cv_prog_LN_S="ln -s"
2987 else
2988   ac_cv_prog_LN_S=ln
2989 fi
2990 fi
2991 LN_S="$ac_cv_prog_LN_S"
2992 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2993   echo "$ac_t""yes" 1>&6
2994 else
2995   echo "$ac_t""no" 1>&6
2996 fi
2997
2998 if test $host != $build; then
2999   ac_tool_prefix=${host_alias}-
3000 else
3001   ac_tool_prefix=
3002 fi
3003
3004
3005 case "$target" in
3006 NONE) lt_target="$host" ;;
3007 *) lt_target="$target" ;;
3008 esac
3009
3010 # Check for any special flags to pass to ltconfig.
3011 libtool_flags="--cache-file=$cache_file"
3012 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3013 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3014 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3015 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3016 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3017 libtool_flags="$libtool_flags --enable-dlopen"
3018 libtool_flags="$libtool_flags --enable-win32-dll"
3019 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3020 if test "${enable_libtool_lock+set}" = set; then
3021   enableval="$enable_libtool_lock"
3022   :
3023 fi
3024
3025 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3026 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3027
3028 # Some flags need to be propagated to the compiler or linker for good
3029 # libtool support.
3030 case "$lt_target" in
3031 *-*-irix6*)
3032   # Find out which ABI we are using.
3033   echo '#line 3034 "configure"' > conftest.$ac_ext
3034   if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3035     case "`/usr/bin/file conftest.o`" in
3036     *32-bit*)
3037       LD="${LD-ld} -32"
3038       ;;
3039     *N32*)
3040       LD="${LD-ld} -n32"
3041       ;;
3042     *64-bit*)
3043       LD="${LD-ld} -64"
3044       ;;
3045     esac
3046   fi
3047   rm -rf conftest*
3048   ;;
3049
3050 *-*-sco3.2v5*)
3051   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3052   SAVE_CFLAGS="$CFLAGS"
3053   CFLAGS="$CFLAGS -belf"
3054   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3055 echo "configure:3056: checking whether the C compiler needs -belf" >&5
3056 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   cat > conftest.$ac_ext <<EOF
3060 #line 3061 "configure"
3061 #include "confdefs.h"
3062
3063 int main() {
3064
3065 ; return 0; }
3066 EOF
3067 if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3068   rm -rf conftest*
3069   lt_cv_cc_needs_belf=yes
3070 else
3071   echo "configure: failed program was:" >&5
3072   cat conftest.$ac_ext >&5
3073   rm -rf conftest*
3074   lt_cv_cc_needs_belf=no
3075 fi
3076 rm -f conftest*
3077 fi
3078
3079 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3080   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3081     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3082     CFLAGS="$SAVE_CFLAGS"
3083   fi
3084   ;;
3085
3086 *-*-cygwin* | *-*-mingw*)
3087   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3088 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3090 echo "configure:3091: checking for $ac_word" >&5
3091 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094   if test -n "$DLLTOOL"; then
3095   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3096 else
3097   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3098   ac_dummy="$PATH"
3099   for ac_dir in $ac_dummy; do
3100     test -z "$ac_dir" && ac_dir=.
3101     if test -f $ac_dir/$ac_word; then
3102       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3103       break
3104     fi
3105   done
3106   IFS="$ac_save_ifs"
3107 fi
3108 fi
3109 DLLTOOL="$ac_cv_prog_DLLTOOL"
3110 if test -n "$DLLTOOL"; then
3111   echo "$ac_t""$DLLTOOL" 1>&6
3112 else
3113   echo "$ac_t""no" 1>&6
3114 fi
3115
3116
3117 if test -z "$ac_cv_prog_DLLTOOL"; then
3118 if test -n "$ac_tool_prefix"; then
3119   # Extract the first word of "dlltool", so it can be a program name with args.
3120 set dummy dlltool; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$DLLTOOL"; then
3127   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_DLLTOOL="dlltool"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3140 fi
3141 fi
3142 DLLTOOL="$ac_cv_prog_DLLTOOL"
3143 if test -n "$DLLTOOL"; then
3144   echo "$ac_t""$DLLTOOL" 1>&6
3145 else
3146   echo "$ac_t""no" 1>&6
3147 fi
3148
3149 else
3150   DLLTOOL="false"
3151 fi
3152 fi
3153
3154   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3155 set dummy ${ac_tool_prefix}as; ac_word=$2
3156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_word" >&5
3158 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   if test -n "$AS"; then
3162   ac_cv_prog_AS="$AS" # Let the user override the test.
3163 else
3164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3165   ac_dummy="$PATH"
3166   for ac_dir in $ac_dummy; do
3167     test -z "$ac_dir" && ac_dir=.
3168     if test -f $ac_dir/$ac_word; then
3169       ac_cv_prog_AS="${ac_tool_prefix}as"
3170       break
3171     fi
3172   done
3173   IFS="$ac_save_ifs"
3174 fi
3175 fi
3176 AS="$ac_cv_prog_AS"
3177 if test -n "$AS"; then
3178   echo "$ac_t""$AS" 1>&6
3179 else
3180   echo "$ac_t""no" 1>&6
3181 fi
3182
3183
3184 if test -z "$ac_cv_prog_AS"; then
3185 if test -n "$ac_tool_prefix"; then
3186   # Extract the first word of "as", so it can be a program name with args.
3187 set dummy as; ac_word=$2
3188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3189 echo "configure:3190: checking for $ac_word" >&5
3190 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3191   echo $ac_n "(cached) $ac_c" 1>&6
3192 else
3193   if test -n "$AS"; then
3194   ac_cv_prog_AS="$AS" # Let the user override the test.
3195 else
3196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3197   ac_dummy="$PATH"
3198   for ac_dir in $ac_dummy; do
3199     test -z "$ac_dir" && ac_dir=.
3200     if test -f $ac_dir/$ac_word; then
3201       ac_cv_prog_AS="as"
3202       break
3203     fi
3204   done
3205   IFS="$ac_save_ifs"
3206   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3207 fi
3208 fi
3209 AS="$ac_cv_prog_AS"
3210 if test -n "$AS"; then
3211   echo "$ac_t""$AS" 1>&6
3212 else
3213   echo "$ac_t""no" 1>&6
3214 fi
3215
3216 else
3217   AS="false"
3218 fi
3219 fi
3220
3221   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3222 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3224 echo "configure:3225: checking for $ac_word" >&5
3225 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   if test -n "$OBJDUMP"; then
3229   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3230 else
3231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3232   ac_dummy="$PATH"
3233   for ac_dir in $ac_dummy; do
3234     test -z "$ac_dir" && ac_dir=.
3235     if test -f $ac_dir/$ac_word; then
3236       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3237       break
3238     fi
3239   done
3240   IFS="$ac_save_ifs"
3241 fi
3242 fi
3243 OBJDUMP="$ac_cv_prog_OBJDUMP"
3244 if test -n "$OBJDUMP"; then
3245   echo "$ac_t""$OBJDUMP" 1>&6
3246 else
3247   echo "$ac_t""no" 1>&6
3248 fi
3249
3250
3251 if test -z "$ac_cv_prog_OBJDUMP"; then
3252 if test -n "$ac_tool_prefix"; then
3253   # Extract the first word of "objdump", so it can be a program name with args.
3254 set dummy objdump; ac_word=$2
3255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3256 echo "configure:3257: checking for $ac_word" >&5
3257 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3258   echo $ac_n "(cached) $ac_c" 1>&6
3259 else
3260   if test -n "$OBJDUMP"; then
3261   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3262 else
3263   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3264   ac_dummy="$PATH"
3265   for ac_dir in $ac_dummy; do
3266     test -z "$ac_dir" && ac_dir=.
3267     if test -f $ac_dir/$ac_word; then
3268       ac_cv_prog_OBJDUMP="objdump"
3269       break
3270     fi
3271   done
3272   IFS="$ac_save_ifs"
3273   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3274 fi
3275 fi
3276 OBJDUMP="$ac_cv_prog_OBJDUMP"
3277 if test -n "$OBJDUMP"; then
3278   echo "$ac_t""$OBJDUMP" 1>&6
3279 else
3280   echo "$ac_t""no" 1>&6
3281 fi
3282
3283 else
3284   OBJDUMP="false"
3285 fi
3286 fi
3287
3288   ;;
3289
3290 esac
3291
3292
3293 # Save cache, so that ltconfig can load it
3294
3295
3296 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3297 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3298 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3299 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3300 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3301 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3302 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3303 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3304
3305 # Reload cache, that may have been modified by ltconfig
3306
3307
3308 # This can be used to rebuild libtool when needed
3309 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3310
3311 # Always use our own libtool.
3312 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3313
3314 # Redirect the config.log output again, so that the ltconfig log is not
3315 # clobbered by the next message.
3316 exec 5>>./config.log
3317
3318
3319 for ac_prog in mawk gawk nawk awk
3320 do
3321 # Extract the first word of "$ac_prog", so it can be a program name with args.
3322 set dummy $ac_prog; ac_word=$2
3323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3324 echo "configure:3325: checking for $ac_word" >&5
3325 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   if test -n "$AWK"; then
3329   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3330 else
3331   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3332   ac_dummy="$PATH"
3333   for ac_dir in $ac_dummy; do
3334     test -z "$ac_dir" && ac_dir=.
3335     if test -f $ac_dir/$ac_word; then
3336       ac_cv_prog_AWK="$ac_prog"
3337       break
3338     fi
3339   done
3340   IFS="$ac_save_ifs"
3341 fi
3342 fi
3343 AWK="$ac_cv_prog_AWK"
3344 if test -n "$AWK"; then
3345   echo "$ac_t""$AWK" 1>&6
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349
3350 test -n "$AWK" && break
3351 done
3352
3353 # test for ln hardlink support
3354 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3355 echo "configure:3356: checking whether ln works" >&5
3356 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   rm -f conftest.src conftest.dst
3360 echo "conftest" > conftest.src
3361 if ln conftest.src conftest.dst 2>/dev/null
3362 then
3363   ol_cv_prog_LN_H="ln"
3364 else
3365   ol_cv_prog_LN_H="cp"
3366 fi
3367 rm -f conftest.src conftest.dst
3368
3369 fi
3370 LN_H="$ol_cv_prog_LN_H"
3371 if test "$ol_cv_prog_LN_H" = "ln"; then
3372         echo "$ac_t""yes" 1>&6
3373 else
3374         echo "$ac_t""no" 1>&6
3375 fi
3376
3377 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3378 echo "configure:3379: checking whether ln -s works" >&5
3379 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   rm -f conftestdata
3383 if ln -s X conftestdata 2>/dev/null
3384 then
3385   rm -f conftestdata
3386   ac_cv_prog_LN_S="ln -s"
3387 else
3388   ac_cv_prog_LN_S=ln
3389 fi
3390 fi
3391 LN_S="$ac_cv_prog_LN_S"
3392 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3393   echo "$ac_t""yes" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398
3399 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3400         LN_S="$LN_H"
3401 fi
3402
3403 # Extract the first word of "sendmail", so it can be a program name with args.
3404 set dummy sendmail; ac_word=$2
3405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_word" >&5
3407 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   case "$SENDMAIL" in
3411   /*)
3412   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3413   ;;
3414   ?:/*)
3415   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3416   ;;
3417   *)
3418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3419   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3420   for ac_dir in $ac_dummy; do 
3421     test -z "$ac_dir" && ac_dir=.
3422     if test -f $ac_dir/$ac_word; then
3423       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3424       break
3425     fi
3426   done
3427   IFS="$ac_save_ifs"
3428   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3429   ;;
3430 esac
3431 fi
3432 SENDMAIL="$ac_cv_path_SENDMAIL"
3433 if test -n "$SENDMAIL"; then
3434   echo "$ac_t""$SENDMAIL" 1>&6
3435 else
3436   echo "$ac_t""no" 1>&6
3437 fi
3438
3439 # Extract the first word of "vi", so it can be a program name with args.
3440 set dummy vi; ac_word=$2
3441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3442 echo "configure:3443: checking for $ac_word" >&5
3443 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3444   echo $ac_n "(cached) $ac_c" 1>&6
3445 else
3446   case "$EDITOR" in
3447   /*)
3448   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3449   ;;
3450   ?:/*)
3451   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3452   ;;
3453   *)
3454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3455   ac_dummy="$PATH:/usr/ucb"
3456   for ac_dir in $ac_dummy; do 
3457     test -z "$ac_dir" && ac_dir=.
3458     if test -f $ac_dir/$ac_word; then
3459       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3460       break
3461     fi
3462   done
3463   IFS="$ac_save_ifs"
3464   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3465   ;;
3466 esac
3467 fi
3468 EDITOR="$ac_cv_path_EDITOR"
3469 if test -n "$EDITOR"; then
3470   echo "$ac_t""$EDITOR" 1>&6
3471 else
3472   echo "$ac_t""no" 1>&6
3473 fi
3474
3475 # Extract the first word of "finger", so it can be a program name with args.
3476 set dummy finger; ac_word=$2
3477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3478 echo "configure:3479: checking for $ac_word" >&5
3479 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   case "$FINGER" in
3483   /*)
3484   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3485   ;;
3486   ?:/*)
3487   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3488   ;;
3489   *)
3490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3491   ac_dummy="$PATH:/usr/ucb"
3492   for ac_dir in $ac_dummy; do 
3493     test -z "$ac_dir" && ac_dir=.
3494     if test -f $ac_dir/$ac_word; then
3495       ac_cv_path_FINGER="$ac_dir/$ac_word"
3496       break
3497     fi
3498   done
3499   IFS="$ac_save_ifs"
3500   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3501   ;;
3502 esac
3503 fi
3504 FINGER="$ac_cv_path_FINGER"
3505 if test -n "$FINGER"; then
3506   echo "$ac_t""$FINGER" 1>&6
3507 else
3508   echo "$ac_t""no" 1>&6
3509 fi
3510
3511
3512 ol_link_perl=no
3513 if test $ol_enable_perl != no ; then
3514         # Extract the first word of "perl", so it can be a program name with args.
3515 set dummy perl; ac_word=$2
3516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3517 echo "configure:3518: checking for $ac_word" >&5
3518 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3519   echo $ac_n "(cached) $ac_c" 1>&6
3520 else
3521   case "$PERLBIN" in
3522   /*)
3523   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3524   ;;
3525   ?:/*)
3526   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3527   ;;
3528   *)
3529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3530   ac_dummy="$PATH"
3531   for ac_dir in $ac_dummy; do 
3532     test -z "$ac_dir" && ac_dir=.
3533     if test -f $ac_dir/$ac_word; then
3534       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3535       break
3536     fi
3537   done
3538   IFS="$ac_save_ifs"
3539   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3540   ;;
3541 esac
3542 fi
3543 PERLBIN="$ac_cv_path_PERLBIN"
3544 if test -n "$PERLBIN"; then
3545   echo "$ac_t""$PERLBIN" 1>&6
3546 else
3547   echo "$ac_t""no" 1>&6
3548 fi
3549
3550
3551         if test "no$PERLBIN" = "no" ; then
3552                 if test $ol_enable_perl = yes ; then
3553                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3554                 fi
3555
3556         else
3557                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3558                 if test x"$ol_with_perl_module" = "xstatic" ; then
3559                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3560                 else
3561                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3562                 fi
3563                                 ol_link_perl=yes
3564         fi
3565 fi
3566
3567 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3568 echo "configure:3569: checking how to run the C preprocessor" >&5
3569 # On Suns, sometimes $CPP names a directory.
3570 if test -n "$CPP" && test -d "$CPP"; then
3571   CPP=
3572 fi
3573 if test -z "$CPP"; then
3574 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577     # This must be in double quotes, not single quotes, because CPP may get
3578   # substituted into the Makefile and "${CC-cc}" will confuse make.
3579   CPP="${CC-cc} -E"
3580   # On the NeXT, cc -E runs the code through the compiler's parser,
3581   # not just through cpp.
3582   cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <assert.h>
3586 Syntax Error
3587 EOF
3588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3589 { (eval echo configure:3590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3591 if test -z "$ac_err"; then
3592   :
3593 else
3594   echo "$ac_err" >&5
3595   echo "configure: failed program was:" >&5
3596   cat conftest.$ac_ext >&5
3597   rm -rf conftest*
3598   CPP="${CC-cc} -E -traditional-cpp"
3599   cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602 #include <assert.h>
3603 Syntax Error
3604 EOF
3605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3606 { (eval echo configure:3607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3608 if test -z "$ac_err"; then
3609   :
3610 else
3611   echo "$ac_err" >&5
3612   echo "configure: failed program was:" >&5
3613   cat conftest.$ac_ext >&5
3614   rm -rf conftest*
3615   CPP="${CC-cc} -nologo -E"
3616   cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3619 #include <assert.h>
3620 Syntax Error
3621 EOF
3622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3623 { (eval echo configure:3624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3625 if test -z "$ac_err"; then
3626   :
3627 else
3628   echo "$ac_err" >&5
3629   echo "configure: failed program was:" >&5
3630   cat conftest.$ac_ext >&5
3631   rm -rf conftest*
3632   CPP=/lib/cpp
3633 fi
3634 rm -f conftest*
3635 fi
3636 rm -f conftest*
3637 fi
3638 rm -f conftest*
3639   ac_cv_prog_CPP="$CPP"
3640 fi
3641   CPP="$ac_cv_prog_CPP"
3642 else
3643   ac_cv_prog_CPP="$CPP"
3644 fi
3645 echo "$ac_t""$CPP" 1>&6
3646
3647
3648 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3649         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3650
3651 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3652         echo "configure: warning: programs compiled here do run here..." 1>&2
3653         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3654
3655 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3656         echo "configure: warning: programs compiled here do not run here..." 1>&2
3657         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3658 fi
3659
3660 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3661 echo "configure:3662: checking for AIX" >&5
3662 cat > conftest.$ac_ext <<EOF
3663 #line 3664 "configure"
3664 #include "confdefs.h"
3665 #ifdef _AIX
3666   yes
3667 #endif
3668
3669 EOF
3670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3671   egrep "yes" >/dev/null 2>&1; then
3672   rm -rf conftest*
3673   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3674 #define _ALL_SOURCE 1
3675 EOF
3676
3677 else
3678   rm -rf conftest*
3679   echo "$ac_t""no" 1>&6
3680 fi
3681 rm -f conftest*
3682
3683
3684 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3685 echo "configure:3686: checking for POSIXized ISC" >&5
3686 if test -d /etc/conf/kconfig.d &&
3687   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3688 then
3689   echo "$ac_t""yes" 1>&6
3690   ISC=yes # If later tests want to check for ISC.
3691   cat >> confdefs.h <<\EOF
3692 #define _POSIX_SOURCE 1
3693 EOF
3694
3695   if test "$GCC" = yes; then
3696     CC="$CC -posix"
3697   else
3698     CC="$CC -Xp"
3699   fi
3700 else
3701   echo "$ac_t""no" 1>&6
3702   ISC=
3703 fi
3704
3705 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3706 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3707 echo "configure:3708: checking for minix/config.h" >&5
3708 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3709   echo $ac_n "(cached) $ac_c" 1>&6
3710 else
3711   cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 #include <minix/config.h>
3715 EOF
3716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3717 { (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3719 if test -z "$ac_err"; then
3720   rm -rf conftest*
3721   eval "ac_cv_header_$ac_safe=yes"
3722 else
3723   echo "$ac_err" >&5
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -rf conftest*
3727   eval "ac_cv_header_$ac_safe=no"
3728 fi
3729 rm -f conftest*
3730 fi
3731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3732   echo "$ac_t""yes" 1>&6
3733   MINIX=yes
3734 else
3735   echo "$ac_t""no" 1>&6
3736 MINIX=
3737 fi
3738
3739 if test "$MINIX" = yes; then
3740   cat >> confdefs.h <<\EOF
3741 #define _POSIX_SOURCE 1
3742 EOF
3743
3744   cat >> confdefs.h <<\EOF
3745 #define _POSIX_1_SOURCE 2
3746 EOF
3747
3748   cat >> confdefs.h <<\EOF
3749 #define _MINIX 1
3750 EOF
3751
3752 fi
3753
3754
3755 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3756 echo "configure:3757: checking for Cygwin environment" >&5
3757 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763
3764 int main() {
3765
3766 #ifndef __CYGWIN__
3767 #define __CYGWIN__ __CYGWIN32__
3768 #endif
3769 return __CYGWIN__;
3770 ; return 0; }
3771 EOF
3772 if { (eval echo configure:3773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3773   rm -rf conftest*
3774   ac_cv_cygwin=yes
3775 else
3776   echo "configure: failed program was:" >&5
3777   cat conftest.$ac_ext >&5
3778   rm -rf conftest*
3779   ac_cv_cygwin=no
3780 fi
3781 rm -f conftest*
3782 fi
3783
3784 echo "$ac_t""$ac_cv_cygwin" 1>&6
3785 CYGWIN=
3786 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3787 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3788 echo "configure:3789: checking for mingw32 environment" >&5
3789 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795
3796 int main() {
3797 return __MINGW32__;
3798 ; return 0; }
3799 EOF
3800 if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3801   rm -rf conftest*
3802   ac_cv_mingw32=yes
3803 else
3804   echo "configure: failed program was:" >&5
3805   cat conftest.$ac_ext >&5
3806   rm -rf conftest*
3807   ac_cv_mingw32=no
3808 fi
3809 rm -f conftest*
3810 fi
3811
3812 echo "$ac_t""$ac_cv_mingw32" 1>&6
3813 MINGW32=
3814 test "$ac_cv_mingw32" = yes && MINGW32=yes
3815 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3816 echo "configure:3817: checking for EMX OS/2 environment" >&5
3817 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3818   echo $ac_n "(cached) $ac_c" 1>&6
3819 else
3820   cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823
3824 int main() {
3825 return __EMX__;
3826 ; return 0; }
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3829   rm -rf conftest*
3830   ac_cv_emxos2=yes
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -rf conftest*
3835   ac_cv_emxos2=no
3836 fi
3837 rm -f conftest*
3838 fi
3839
3840 echo "$ac_t""$ac_cv_emxos2" 1>&6
3841 EMXOS2=
3842 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3843
3844
3845
3846 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3847 echo "configure:3848: checking for executable suffix" >&5
3848 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3852   ac_cv_exeext=.exe
3853 else
3854   rm -f conftest*
3855   echo 'int main () { return 0; }' > conftest.$ac_ext
3856   ac_cv_exeext=
3857   if { (eval echo configure:3858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3858     for file in conftest.*; do
3859       case $file in
3860       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3861       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3862       esac
3863     done
3864   else
3865     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3866   fi
3867   rm -f conftest*
3868   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3869 fi
3870 fi
3871
3872 EXEEXT=""
3873 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3874 echo "$ac_t""${ac_cv_exeext}" 1>&6
3875 ac_exeext=$EXEEXT
3876
3877 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3878 echo "configure:3879: checking for object suffix" >&5
3879 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   rm -f conftest*
3883 echo 'int i = 1;' > conftest.$ac_ext
3884 if { (eval echo configure:3885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3885   for ac_file in conftest.*; do
3886     case $ac_file in
3887     *.c) ;;
3888     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3889     esac
3890   done
3891 else
3892   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3893 fi
3894 rm -f conftest*
3895 fi
3896
3897 echo "$ac_t""$ac_cv_objext" 1>&6
3898 OBJEXT=$ac_cv_objext
3899 ac_objext=$ac_cv_objext
3900
3901
3902 cat >> confdefs.h <<EOF
3903 #define EXEEXT "${EXEEXT}"
3904 EOF
3905
3906
3907 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3908 echo "configure:3909: checking for be_app in -lbe" >&5
3909 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3910 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   ac_save_LIBS="$LIBS"
3914 LIBS="-lbe -lroot -lnet $LIBS"
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 /* Override any gcc2 internal prototype to avoid an error.  */
3919 /* We use char because int might match the return type of a gcc2
3920     builtin and then its argument prototype would still apply.  */
3921 char be_app();
3922
3923 int main() {
3924 be_app()
3925 ; return 0; }
3926 EOF
3927 if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928   rm -rf conftest*
3929   eval "ac_cv_lib_$ac_lib_var=yes"
3930 else
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -rf conftest*
3934   eval "ac_cv_lib_$ac_lib_var=no"
3935 fi
3936 rm -f conftest*
3937 LIBS="$ac_save_LIBS"
3938
3939 fi
3940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3941   echo "$ac_t""yes" 1>&6
3942   LIBS="$LIBS -lbe -lroot -lnet"
3943 else
3944   echo "$ac_t""no" 1>&6
3945 :
3946 fi
3947
3948
3949
3950
3951
3952 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3953 echo "configure:3954: checking for ${CC-cc} option to accept ANSI C" >&5
3954 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   am_cv_prog_cc_stdc=no
3958 ac_save_CC="$CC"
3959 # Don't try gcc -ansi; that turns off useful extensions and
3960 # breaks some systems' header files.
3961 # AIX                   -qlanglvl=ansi
3962 # Ultrix and OSF/1      -std1
3963 # HP-UX 10.20 and later -Ae
3964 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3965 # SVR4                  -Xc -D__EXTENSIONS__
3966 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3967 do
3968   CC="$ac_save_CC $ac_arg"
3969   cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 #include <stdarg.h>
3973 #include <stdio.h>
3974 #include <sys/types.h>
3975 #include <sys/stat.h>
3976 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3977 struct buf { int x; };
3978 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3979 static char *e (p, i)
3980      char **p;
3981      int i;
3982 {
3983   return p[i];
3984 }
3985 static char *f (char * (*g) (char **, int), char **p, ...)
3986 {
3987   char *s;
3988   va_list v;
3989   va_start (v,p);
3990   s = g (p, va_arg (v,int));
3991   va_end (v);
3992   return s;
3993 }
3994 int test (int i, double x);
3995 struct s1 {int (*f) (int a);};
3996 struct s2 {int (*f) (double a);};
3997 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3998 int argc;
3999 char **argv;
4000
4001 int main() {
4002
4003 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4004
4005 ; return 0; }
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4008   rm -rf conftest*
4009   am_cv_prog_cc_stdc="$ac_arg"; break
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013 fi
4014 rm -f conftest*
4015 done
4016 CC="$ac_save_CC"
4017
4018 fi
4019
4020 if test -z "$am_cv_prog_cc_stdc"; then
4021   echo "$ac_t""none needed" 1>&6
4022 else
4023   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4024 fi
4025 case "x$am_cv_prog_cc_stdc" in
4026   x|xno) ;;
4027   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4028 esac
4029
4030 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4031         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4032 fi
4033
4034 # test for make depend flag
4035 OL_MKDEP=
4036 OL_MKDEP_FLAGS=
4037 if test -z "${MKDEP}"; then
4038         OL_MKDEP="${CC-cc}"
4039         if test -z "${MKDEP_FLAGS}"; then
4040                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4041 echo "configure:4042: checking for ${OL_MKDEP} depend flag" >&5
4042 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4043   echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045   
4046                         ol_cv_mkdep=no
4047                         for flag in "-M" "-xM"; do
4048                                 cat > conftest.c <<EOF
4049  noCode;
4050 EOF
4051                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4052                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4053                                 then
4054                                         if test ! -f conftest."${ac_object}" ; then
4055                                                 ol_cv_mkdep=$flag
4056                                                 OL_MKDEP_FLAGS="$flag"
4057                                                 break
4058                                         fi
4059                                 fi
4060                         done
4061                         rm -f conftest*
4062                 
4063 fi
4064
4065 echo "$ac_t""$ol_cv_mkdep" 1>&6
4066         else
4067                 cc_cv_mkdep=yes
4068                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4069         fi
4070 else
4071         cc_cv_mkdep=yes
4072         OL_MKDEP="${MKDEP}"
4073         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4074 fi
4075
4076
4077
4078 if test "${ol_cv_mkdep}" = no ; then
4079         # this will soon become an error
4080         echo "configure: warning: do not know how to generate dependencies" 1>&2
4081 fi
4082
4083 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4084 echo "configure:4085: checking for afopen in -ls" >&5
4085 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4086 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   ac_save_LIBS="$LIBS"
4090 LIBS="-ls  $LIBS"
4091 cat > conftest.$ac_ext <<EOF
4092 #line 4093 "configure"
4093 #include "confdefs.h"
4094 /* Override any gcc2 internal prototype to avoid an error.  */
4095 /* We use char because int might match the return type of a gcc2
4096     builtin and then its argument prototype would still apply.  */
4097 char afopen();
4098
4099 int main() {
4100 afopen()
4101 ; return 0; }
4102 EOF
4103 if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4104   rm -rf conftest*
4105   eval "ac_cv_lib_$ac_lib_var=yes"
4106 else
4107   echo "configure: failed program was:" >&5
4108   cat conftest.$ac_ext >&5
4109   rm -rf conftest*
4110   eval "ac_cv_lib_$ac_lib_var=no"
4111 fi
4112 rm -f conftest*
4113 LIBS="$ac_save_LIBS"
4114
4115 fi
4116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4117   echo "$ac_t""yes" 1>&6
4118   
4119         AUTH_LIBS=-ls
4120         cat >> confdefs.h <<\EOF
4121 #define HAVE_AIX_SECURITY 1
4122 EOF
4123
4124
4125 else
4126   echo "$ac_t""no" 1>&6
4127 fi
4128
4129
4130
4131 for ac_func in getaddrinfo 
4132 do
4133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4134 echo "configure:4135: checking for $ac_func" >&5
4135 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4136   echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138   cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 /* System header to define __stub macros and hopefully few prototypes,
4142     which can conflict with char $ac_func(); below.  */
4143 #include <assert.h>
4144 /* Override any gcc2 internal prototype to avoid an error.  */
4145 /* We use char because int might match the return type of a gcc2
4146     builtin and then its argument prototype would still apply.  */
4147 char $ac_func();
4148 char (*f)();
4149
4150 int main() {
4151
4152 /* The GNU C library defines this for functions which it implements
4153     to always fail with ENOSYS.  Some functions are actually named
4154     something starting with __ and the normal name is an alias.  */
4155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4156 choke me
4157 #else
4158 f = $ac_func;
4159 #endif
4160
4161 ; return 0; }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4164   rm -rf conftest*
4165   eval "ac_cv_func_$ac_func=yes"
4166 else
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   eval "ac_cv_func_$ac_func=no"
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4178   cat >> confdefs.h <<EOF
4179 #define $ac_tr_func 1
4180 EOF
4181  
4182 else
4183   echo "$ac_t""no" 1>&6
4184 fi
4185 done
4186
4187
4188 if test $ac_cv_func_getaddrinfo = no ; then
4189         if test $ol_enable_ipv6 = yes ; then
4190                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4191         fi
4192         ol_enable_ipv6=no
4193 fi
4194
4195 if test $ol_enable_local != no ; then
4196         for ac_hdr in sys/un.h 
4197 do
4198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4200 echo "configure:4201: checking for $ac_hdr" >&5
4201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4202   echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204   cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 #include <$ac_hdr>
4208 EOF
4209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4210 { (eval echo configure:4211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4212 if test -z "$ac_err"; then
4213   rm -rf conftest*
4214   eval "ac_cv_header_$ac_safe=yes"
4215 else
4216   echo "$ac_err" >&5
4217   echo "configure: failed program was:" >&5
4218   cat conftest.$ac_ext >&5
4219   rm -rf conftest*
4220   eval "ac_cv_header_$ac_safe=no"
4221 fi
4222 rm -f conftest*
4223 fi
4224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4225   echo "$ac_t""yes" 1>&6
4226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4227   cat >> confdefs.h <<EOF
4228 #define $ac_tr_hdr 1
4229 EOF
4230  
4231 else
4232   echo "$ac_t""no" 1>&6
4233 fi
4234 done
4235
4236
4237         if test $ol_enable_local = auto ; then
4238                 ol_enable_local=$ac_cv_header_sys_un_h
4239         elif test $ac_cv_header_sys_un_h = no ; then
4240                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4241         fi
4242 fi
4243
4244 ol_link_modules=no
4245 if test $ol_enable_modules != no ; then
4246         for ac_hdr in ltdl.h
4247 do
4248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4250 echo "configure:4251: checking for $ac_hdr" >&5
4251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4252   echo $ac_n "(cached) $ac_c" 1>&6
4253 else
4254   cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 #include <$ac_hdr>
4258 EOF
4259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4260 { (eval echo configure:4261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4262 if test -z "$ac_err"; then
4263   rm -rf conftest*
4264   eval "ac_cv_header_$ac_safe=yes"
4265 else
4266   echo "$ac_err" >&5
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   eval "ac_cv_header_$ac_safe=no"
4271 fi
4272 rm -f conftest*
4273 fi
4274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4275   echo "$ac_t""yes" 1>&6
4276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4277   cat >> confdefs.h <<EOF
4278 #define $ac_tr_hdr 1
4279 EOF
4280  
4281 else
4282   echo "$ac_t""no" 1>&6
4283 fi
4284 done
4285
4286
4287         if test $ac_cv_header_ltdl_h = no ; then
4288                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4289         fi
4290
4291         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4292 echo "configure:4293: checking for lt_dlinit in -lltdl" >&5
4293 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4295   echo $ac_n "(cached) $ac_c" 1>&6
4296 else
4297   ac_save_LIBS="$LIBS"
4298 LIBS="-lltdl  $LIBS"
4299 cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302 /* Override any gcc2 internal prototype to avoid an error.  */
4303 /* We use char because int might match the return type of a gcc2
4304     builtin and then its argument prototype would still apply.  */
4305 char lt_dlinit();
4306
4307 int main() {
4308 lt_dlinit()
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4312   rm -rf conftest*
4313   eval "ac_cv_lib_$ac_lib_var=yes"
4314 else
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -rf conftest*
4318   eval "ac_cv_lib_$ac_lib_var=no"
4319 fi
4320 rm -f conftest*
4321 LIBS="$ac_save_LIBS"
4322
4323 fi
4324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4325   echo "$ac_t""yes" 1>&6
4326   
4327             MODULES_LIBS=-lltdl
4328             cat >> confdefs.h <<\EOF
4329 #define HAVE_LIBLTDL 1
4330 EOF
4331
4332         
4333 else
4334   echo "$ac_t""no" 1>&6
4335 fi
4336
4337
4338         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4339                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4340         fi
4341         ol_link_modules=yes
4342 else
4343         ol_with_dnssrv_module=static
4344         ol_with_ldap_module=static
4345         ol_with_ldbm_module=static
4346         ol_with_passwd_module=static
4347         ol_with_perl_module=static
4348         ol_with_shell_module=static
4349         ol_with_tcl_module=static
4350         ol_with_sql_module=static
4351 fi
4352
4353 # test for EBCDIC
4354 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4355 echo "configure:4356: checking for EBCDIC" >&5
4356 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   
4360         cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363
4364 #if !('M' == 0xd4)
4365 #include <__ASCII__/generate_error.h>
4366 #endif
4367
4368 EOF
4369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4370 { (eval echo configure:4371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4372 if test -z "$ac_err"; then
4373   rm -rf conftest*
4374   ol_cv_cpp_ebcdic=yes
4375 else
4376   echo "$ac_err" >&5
4377   echo "configure: failed program was:" >&5
4378   cat conftest.$ac_ext >&5
4379   rm -rf conftest*
4380   ol_cv_cpp_ebcdic=no
4381 fi
4382 rm -f conftest*
4383 fi
4384
4385 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4386 if test $ol_cv_cpp_ebcdic = yes ; then
4387         cat >> confdefs.h <<\EOF
4388 #define HAVE_EBCDIC 1
4389 EOF
4390
4391 fi
4392
4393 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4394 echo "configure:4395: checking for ANSI C header files" >&5
4395 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4396   echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398   cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 #include <stdlib.h>
4402 #include <stdarg.h>
4403 #include <string.h>
4404 #include <float.h>
4405 EOF
4406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4407 { (eval echo configure:4408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4409 if test -z "$ac_err"; then
4410   rm -rf conftest*
4411   ol_cv_header_stdc=yes
4412 else
4413   echo "$ac_err" >&5
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   ol_cv_header_stdc=no
4418 fi
4419 rm -f conftest*
4420
4421 if test $ol_cv_header_stdc = yes; then
4422   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4423 cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 #include <string.h>
4427 EOF
4428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4429   egrep "memchr" >/dev/null 2>&1; then
4430   :
4431 else
4432   rm -rf conftest*
4433   ol_cv_header_stdc=no
4434 fi
4435 rm -f conftest*
4436
4437 fi
4438
4439 if test $ol_cv_header_stdc = yes; then
4440   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4441 cat > conftest.$ac_ext <<EOF
4442 #line 4443 "configure"
4443 #include "confdefs.h"
4444 #include <stdlib.h>
4445 EOF
4446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4447   egrep "free" >/dev/null 2>&1; then
4448   :
4449 else
4450   rm -rf conftest*
4451   ol_cv_header_stdc=no
4452 fi
4453 rm -f conftest*
4454
4455 fi
4456
4457 if test $ol_cv_header_stdc = yes; then
4458   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4459 if test "$cross_compiling" = yes; then
4460   :
4461 else
4462   cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465 #include <ctype.h>
4466 #ifndef HAVE_EBCDIC
4467 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4468 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4469 #else
4470 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4471                 || ('j' <= (c) && (c) <= 'r') \
4472                 || ('s' <= (c) && (c) <= 'z'))
4473 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4474 #endif
4475 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4476 int main () { int i; for (i = 0; i < 256; i++)
4477 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4478 exit (0); }
4479
4480 EOF
4481 if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4482 then
4483   :
4484 else
4485   echo "configure: failed program was:" >&5
4486   cat conftest.$ac_ext >&5
4487   rm -fr conftest*
4488   ol_cv_header_stdc=no
4489 fi
4490 rm -fr conftest*
4491 fi
4492
4493 fi
4494 fi
4495
4496 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4497 if test $ol_cv_header_stdc = yes; then
4498   cat >> confdefs.h <<\EOF
4499 #define STDC_HEADERS 1
4500 EOF
4501
4502 fi
4503 ac_cv_header_stdc=disable
4504
4505
4506 if test $ol_cv_header_stdc != yes; then
4507         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4508 fi
4509
4510 ac_header_dirent=no
4511 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4512 do
4513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4514 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4515 echo "configure:4516: checking for $ac_hdr that defines DIR" >&5
4516 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 #include <sys/types.h>
4523 #include <$ac_hdr>
4524 int main() {
4525 DIR *dirp = 0;
4526 ; return 0; }
4527 EOF
4528 if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4529   rm -rf conftest*
4530   eval "ac_cv_header_dirent_$ac_safe=yes"
4531 else
4532   echo "configure: failed program was:" >&5
4533   cat conftest.$ac_ext >&5
4534   rm -rf conftest*
4535   eval "ac_cv_header_dirent_$ac_safe=no"
4536 fi
4537 rm -f conftest*
4538 fi
4539 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4540   echo "$ac_t""yes" 1>&6
4541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4542   cat >> confdefs.h <<EOF
4543 #define $ac_tr_hdr 1
4544 EOF
4545  ac_header_dirent=$ac_hdr; break
4546 else
4547   echo "$ac_t""no" 1>&6
4548 fi
4549 done
4550 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4551 if test $ac_header_dirent = dirent.h; then
4552 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4553 echo "configure:4554: checking for opendir in -ldir" >&5
4554 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   ac_save_LIBS="$LIBS"
4559 LIBS="-ldir  $LIBS"
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 /* Override any gcc2 internal prototype to avoid an error.  */
4564 /* We use char because int might match the return type of a gcc2
4565     builtin and then its argument prototype would still apply.  */
4566 char opendir();
4567
4568 int main() {
4569 opendir()
4570 ; return 0; }
4571 EOF
4572 if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4573   rm -rf conftest*
4574   eval "ac_cv_lib_$ac_lib_var=yes"
4575 else
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578   rm -rf conftest*
4579   eval "ac_cv_lib_$ac_lib_var=no"
4580 fi
4581 rm -f conftest*
4582 LIBS="$ac_save_LIBS"
4583
4584 fi
4585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4586   echo "$ac_t""yes" 1>&6
4587   LIBS="$LIBS -ldir"
4588 else
4589   echo "$ac_t""no" 1>&6
4590 fi
4591
4592 else
4593 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4594 echo "configure:4595: checking for opendir in -lx" >&5
4595 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   ac_save_LIBS="$LIBS"
4600 LIBS="-lx  $LIBS"
4601 cat > conftest.$ac_ext <<EOF
4602 #line 4603 "configure"
4603 #include "confdefs.h"
4604 /* Override any gcc2 internal prototype to avoid an error.  */
4605 /* We use char because int might match the return type of a gcc2
4606     builtin and then its argument prototype would still apply.  */
4607 char opendir();
4608
4609 int main() {
4610 opendir()
4611 ; return 0; }
4612 EOF
4613 if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4614   rm -rf conftest*
4615   eval "ac_cv_lib_$ac_lib_var=yes"
4616 else
4617   echo "configure: failed program was:" >&5
4618   cat conftest.$ac_ext >&5
4619   rm -rf conftest*
4620   eval "ac_cv_lib_$ac_lib_var=no"
4621 fi
4622 rm -f conftest*
4623 LIBS="$ac_save_LIBS"
4624
4625 fi
4626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4627   echo "$ac_t""yes" 1>&6
4628   LIBS="$LIBS -lx"
4629 else
4630   echo "$ac_t""no" 1>&6
4631 fi
4632
4633 fi
4634
4635 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4636 echo "configure:4637: checking for sys/wait.h that is POSIX.1 compatible" >&5
4637 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 #include <sys/types.h>
4644 #include <sys/wait.h>
4645 #ifndef WEXITSTATUS
4646 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4647 #endif
4648 #ifndef WIFEXITED
4649 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4650 #endif
4651 int main() {
4652 int s;
4653 wait (&s);
4654 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4655 ; return 0; }
4656 EOF
4657 if { (eval echo configure:4658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4658   rm -rf conftest*
4659   ac_cv_header_sys_wait_h=yes
4660 else
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663   rm -rf conftest*
4664   ac_cv_header_sys_wait_h=no
4665 fi
4666 rm -f conftest*
4667 fi
4668
4669 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4670 if test $ac_cv_header_sys_wait_h = yes; then
4671   cat >> confdefs.h <<\EOF
4672 #define HAVE_SYS_WAIT_H 1
4673 EOF
4674
4675 fi
4676
4677 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4678 echo "configure:4679: checking POSIX termios" >&5
4679 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <sys/types.h>
4686 #include <unistd.h>
4687 #include <termios.h>
4688 int main() {
4689 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4690    tcgetattr(0, 0);
4691 ; return 0; }
4692 EOF
4693 if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4694   rm -rf conftest*
4695   am_cv_sys_posix_termios=yes
4696 else
4697   echo "configure: failed program was:" >&5
4698   cat conftest.$ac_ext >&5
4699   rm -rf conftest*
4700   am_cv_sys_posix_termios=no
4701 fi
4702 rm -f conftest*
4703 fi
4704
4705 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4706
4707
4708  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4709 echo "configure:4710: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4710 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4711   echo $ac_n "(cached) $ac_c" 1>&6
4712 else
4713   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4714
4715   gwinsz_in_termios_h=no
4716   if test $am_cv_sys_posix_termios = yes; then
4717     cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 #include <sys/types.h>
4721 #     include <termios.h>
4722 #     ifdef TIOCGWINSZ
4723         yes
4724 #     endif
4725     
4726 EOF
4727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4728   egrep "yes" >/dev/null 2>&1; then
4729   rm -rf conftest*
4730   gwinsz_in_termios_h=yes
4731 fi
4732 rm -f conftest*
4733
4734   fi
4735
4736   if test $gwinsz_in_termios_h = no; then
4737     cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 #include <sys/types.h>
4741 #     include <sys/ioctl.h>
4742 #     ifdef TIOCGWINSZ
4743         yes
4744 #     endif
4745     
4746 EOF
4747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4748   egrep "yes" >/dev/null 2>&1; then
4749   rm -rf conftest*
4750   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4751 fi
4752 rm -f conftest*
4753
4754   fi
4755   
4756 fi
4757
4758 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4759   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4760     cat >> confdefs.h <<\EOF
4761 #define GWINSZ_IN_SYS_IOCTL 1
4762 EOF
4763
4764   fi
4765
4766 if test $am_cv_sys_posix_termios = yes ; then
4767         cat >> confdefs.h <<\EOF
4768 #define HAVE_POSIX_TERMIOS 1
4769 EOF
4770
4771 fi
4772
4773 for ac_hdr in \
4774         arpa/inet.h             \
4775         arpa/nameser.h  \
4776         assert.h                \
4777         conio.h                 \
4778         crypt.h                 \
4779         direct.h                \
4780         errno.h                 \
4781         fcntl.h                 \
4782         filio.h                 \
4783         getopt.h                \
4784         grp.h                   \
4785         io.h                    \
4786         libutil.h               \
4787         limits.h                \
4788         locale.h                \
4789         netinet/tcp.h   \
4790         malloc.h                \
4791         memory.h                \
4792         psap.h                  \
4793         pwd.h                   \
4794         process.h               \
4795         resolv.h                \
4796         sgtty.h                 \
4797         shadow.h                \
4798         stddef.h                \
4799         string.h                \
4800         strings.h               \
4801         sysexits.h              \
4802         sys/file.h              \
4803         sys/filio.h             \
4804         sys/errno.h             \
4805         sys/ioctl.h             \
4806         sys/param.h             \
4807         sys/resource.h  \
4808         sys/select.h    \
4809         sys/socket.h    \
4810         sys/syslog.h    \
4811         sys/time.h              \
4812         sys/types.h             \
4813         syslog.h                \
4814         termios.h               \
4815         unistd.h                \
4816         winsock.h               \
4817
4818 do
4819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4821 echo "configure:4822: checking for $ac_hdr" >&5
4822 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 #include <$ac_hdr>
4829 EOF
4830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4831 { (eval echo configure:4832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4833 if test -z "$ac_err"; then
4834   rm -rf conftest*
4835   eval "ac_cv_header_$ac_safe=yes"
4836 else
4837   echo "$ac_err" >&5
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   eval "ac_cv_header_$ac_safe=no"
4842 fi
4843 rm -f conftest*
4844 fi
4845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4846   echo "$ac_t""yes" 1>&6
4847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4848   cat >> confdefs.h <<EOF
4849 #define $ac_tr_hdr 1
4850 EOF
4851  
4852 else
4853   echo "$ac_t""no" 1>&6
4854 fi
4855 done
4856
4857
4858
4859
4860 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4861 echo "configure:4862: checking for sigset in -lV3" >&5
4862 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4863 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4864   echo $ac_n "(cached) $ac_c" 1>&6
4865 else
4866   ac_save_LIBS="$LIBS"
4867 LIBS="-lV3  $LIBS"
4868 cat > conftest.$ac_ext <<EOF
4869 #line 4870 "configure"
4870 #include "confdefs.h"
4871 /* Override any gcc2 internal prototype to avoid an error.  */
4872 /* We use char because int might match the return type of a gcc2
4873     builtin and then its argument prototype would still apply.  */
4874 char sigset();
4875
4876 int main() {
4877 sigset()
4878 ; return 0; }
4879 EOF
4880 if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4881   rm -rf conftest*
4882   eval "ac_cv_lib_$ac_lib_var=yes"
4883 else
4884   echo "configure: failed program was:" >&5
4885   cat conftest.$ac_ext >&5
4886   rm -rf conftest*
4887   eval "ac_cv_lib_$ac_lib_var=no"
4888 fi
4889 rm -f conftest*
4890 LIBS="$ac_save_LIBS"
4891
4892 fi
4893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4894   echo "$ac_t""yes" 1>&6
4895     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4896     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4897   cat >> confdefs.h <<EOF
4898 #define $ac_tr_lib 1
4899 EOF
4900
4901   LIBS="-lV3 $LIBS"
4902
4903 else
4904   echo "$ac_t""no" 1>&6
4905 fi
4906
4907
4908 if test $ac_cv_header_winsock_h = yes; then
4909         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4910 echo "configure:4911: checking for winsock" >&5
4911 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4912   echo $ac_n "(cached) $ac_c" 1>&6
4913 else
4914   cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 #include <winsock.h>
4918 int main() {
4919
4920                         socket(0,0,0);
4921                         select(0,NULL,NULL,NULL,NULL);
4922                         closesocket(0);
4923                         gethostname(NULL,0);
4924         
4925 ; return 0; }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928   rm -rf conftest*
4929   ol_cv_winsock=yes
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -rf conftest*
4934   ol_cv_winsock=no
4935 fi
4936 rm -f conftest*]
4937 fi
4938
4939 echo "$ac_t""$ol_cv_winsock" 1>&6
4940
4941         if test $ol_cv_winsock = yes ; then
4942                 cat >> confdefs.h <<\EOF
4943 #define HAVE_WINSOCK 1
4944 EOF
4945
4946                 ac_cv_func_socket=yes
4947                 ac_cv_func_select=yes
4948                 ac_cv_func_closesocket=yes
4949                 ac_cv_func_gethostname=yes
4950         fi
4951 fi
4952
4953
4954 echo $ac_n "checking for socket""... $ac_c" 1>&6
4955 echo "configure:4956: checking for socket" >&5
4956 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   cat > conftest.$ac_ext <<EOF
4960 #line 4961 "configure"
4961 #include "confdefs.h"
4962 /* System header to define __stub macros and hopefully few prototypes,
4963     which can conflict with char socket(); below.  */
4964 #include <assert.h>
4965 /* Override any gcc2 internal prototype to avoid an error.  */
4966 /* We use char because int might match the return type of a gcc2
4967     builtin and then its argument prototype would still apply.  */
4968 char socket();
4969 char (*f)();
4970
4971 int main() {
4972
4973 /* The GNU C library defines this for functions which it implements
4974     to always fail with ENOSYS.  Some functions are actually named
4975     something starting with __ and the normal name is an alias.  */
4976 #if defined (__stub_socket) || defined (__stub___socket)
4977 choke me
4978 #else
4979 f = socket;
4980 #endif
4981
4982 ; return 0; }
4983 EOF
4984 if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985   rm -rf conftest*
4986   eval "ac_cv_func_socket=yes"
4987 else
4988   echo "configure: failed program was:" >&5
4989   cat conftest.$ac_ext >&5
4990   rm -rf conftest*
4991   eval "ac_cv_func_socket=no"
4992 fi
4993 rm -f conftest*
4994 fi
4995
4996 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4997   echo "$ac_t""yes" 1>&6
4998   :
4999 else
5000   echo "$ac_t""no" 1>&6
5001         
5002         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5003 echo "configure:5004: checking for main in -lsocket" >&5
5004 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5006   echo $ac_n "(cached) $ac_c" 1>&6
5007 else
5008   ac_save_LIBS="$LIBS"
5009 LIBS="-lsocket  $LIBS"
5010 cat > conftest.$ac_ext <<EOF
5011 #line 5012 "configure"
5012 #include "confdefs.h"
5013
5014 int main() {
5015 main()
5016 ; return 0; }
5017 EOF
5018 if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5019   rm -rf conftest*
5020   eval "ac_cv_lib_$ac_lib_var=yes"
5021 else
5022   echo "configure: failed program was:" >&5
5023   cat conftest.$ac_ext >&5
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=no"
5026 fi
5027 rm -f conftest*
5028 LIBS="$ac_save_LIBS"
5029
5030 fi
5031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5032   echo "$ac_t""yes" 1>&6
5033     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5035   cat >> confdefs.h <<EOF
5036 #define $ac_tr_lib 1
5037 EOF
5038
5039   LIBS="-lsocket $LIBS"
5040
5041 else
5042   echo "$ac_t""no" 1>&6
5043 fi
5044
5045         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5046 echo "configure:5047: checking for main in -lnet" >&5
5047 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5049   echo $ac_n "(cached) $ac_c" 1>&6
5050 else
5051   ac_save_LIBS="$LIBS"
5052 LIBS="-lnet  $LIBS"
5053 cat > conftest.$ac_ext <<EOF
5054 #line 5055 "configure"
5055 #include "confdefs.h"
5056
5057 int main() {
5058 main()
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5062   rm -rf conftest*
5063   eval "ac_cv_lib_$ac_lib_var=yes"
5064 else
5065   echo "configure: failed program was:" >&5
5066   cat conftest.$ac_ext >&5
5067   rm -rf conftest*
5068   eval "ac_cv_lib_$ac_lib_var=no"
5069 fi
5070 rm -f conftest*
5071 LIBS="$ac_save_LIBS"
5072
5073 fi
5074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5075   echo "$ac_t""yes" 1>&6
5076     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5077     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5078   cat >> confdefs.h <<EOF
5079 #define $ac_tr_lib 1
5080 EOF
5081
5082   LIBS="-lnet $LIBS"
5083
5084 else
5085   echo "$ac_t""no" 1>&6
5086 fi
5087
5088         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5089 echo "configure:5090: checking for main in -lnsl_s" >&5
5090 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094   ac_save_LIBS="$LIBS"
5095 LIBS="-lnsl_s  $LIBS"
5096 cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099
5100 int main() {
5101 main()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5121   cat >> confdefs.h <<EOF
5122 #define $ac_tr_lib 1
5123 EOF
5124
5125   LIBS="-lnsl_s $LIBS"
5126
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130
5131         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5132 echo "configure:5133: checking for main in -lnsl" >&5
5133 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137   ac_save_LIBS="$LIBS"
5138 LIBS="-lnsl  $LIBS"
5139 cat > conftest.$ac_ext <<EOF
5140 #line 5141 "configure"
5141 #include "confdefs.h"
5142
5143 int main() {
5144 main()
5145 ; return 0; }
5146 EOF
5147 if { (eval echo configure:5148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5148   rm -rf conftest*
5149   eval "ac_cv_lib_$ac_lib_var=yes"
5150 else
5151   echo "configure: failed program was:" >&5
5152   cat conftest.$ac_ext >&5
5153   rm -rf conftest*
5154   eval "ac_cv_lib_$ac_lib_var=no"
5155 fi
5156 rm -f conftest*
5157 LIBS="$ac_save_LIBS"
5158
5159 fi
5160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5161   echo "$ac_t""yes" 1>&6
5162     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5163     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5164   cat >> confdefs.h <<EOF
5165 #define $ac_tr_lib 1
5166 EOF
5167
5168   LIBS="-lnsl $LIBS"
5169
5170 else
5171   echo "$ac_t""no" 1>&6
5172 fi
5173
5174         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5175 echo "configure:5176: checking for socket in -linet" >&5
5176 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5178   echo $ac_n "(cached) $ac_c" 1>&6
5179 else
5180   ac_save_LIBS="$LIBS"
5181 LIBS="-linet  $LIBS"
5182 cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 /* Override any gcc2 internal prototype to avoid an error.  */
5186 /* We use char because int might match the return type of a gcc2
5187     builtin and then its argument prototype would still apply.  */
5188 char socket();
5189
5190 int main() {
5191 socket()
5192 ; return 0; }
5193 EOF
5194 if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=yes"
5197 else
5198   echo "configure: failed program was:" >&5
5199   cat conftest.$ac_ext >&5
5200   rm -rf conftest*
5201   eval "ac_cv_lib_$ac_lib_var=no"
5202 fi
5203 rm -f conftest*
5204 LIBS="$ac_save_LIBS"
5205
5206 fi
5207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5208   echo "$ac_t""yes" 1>&6
5209     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5211   cat >> confdefs.h <<EOF
5212 #define $ac_tr_lib 1
5213 EOF
5214
5215   LIBS="-linet $LIBS"
5216
5217 else
5218   echo "$ac_t""no" 1>&6
5219 fi
5220
5221         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5222 echo "configure:5223: checking for main in -lgen" >&5
5223 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5224 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   ac_save_LIBS="$LIBS"
5228 LIBS="-lgen  $LIBS"
5229 cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232
5233 int main() {
5234 main()
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_lib_$ac_lib_var=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_lib_$ac_lib_var=no"
5245 fi
5246 rm -f conftest*
5247 LIBS="$ac_save_LIBS"
5248
5249 fi
5250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5251   echo "$ac_t""yes" 1>&6
5252     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5253     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5254   cat >> confdefs.h <<EOF
5255 #define $ac_tr_lib 1
5256 EOF
5257
5258   LIBS="-lgen $LIBS"
5259
5260 else
5261   echo "$ac_t""no" 1>&6
5262 fi
5263
5264
5265 fi
5266
5267
5268 echo $ac_n "checking for select""... $ac_c" 1>&6
5269 echo "configure:5270: checking for select" >&5
5270 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5271   echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273   cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 /* System header to define __stub macros and hopefully few prototypes,
5277     which can conflict with char select(); below.  */
5278 #include <assert.h>
5279 /* Override any gcc2 internal prototype to avoid an error.  */
5280 /* We use char because int might match the return type of a gcc2
5281     builtin and then its argument prototype would still apply.  */
5282 char select();
5283 char (*f)();
5284
5285 int main() {
5286
5287 /* The GNU C library defines this for functions which it implements
5288     to always fail with ENOSYS.  Some functions are actually named
5289     something starting with __ and the normal name is an alias.  */
5290 #if defined (__stub_select) || defined (__stub___select)
5291 choke me
5292 #else
5293 f = select;
5294 #endif
5295
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5299   rm -rf conftest*
5300   eval "ac_cv_func_select=yes"
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304   rm -rf conftest*
5305   eval "ac_cv_func_select=no"
5306 fi
5307 rm -f conftest*
5308 fi
5309
5310 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5311   echo "$ac_t""yes" 1>&6
5312   :
5313 else
5314   echo "$ac_t""no" 1>&6
5315 { echo "configure: error: select() required." 1>&2; exit 1; }
5316 fi
5317
5318
5319 if test "${ac_cv_header_winsock_h}" != yes; then
5320                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5321 echo "configure:5322: checking types of arguments for select()" >&5
5322  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5323   echo $ac_n "(cached) $ac_c" 1>&6
5324 else
5325    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5329   echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5332      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5333       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5334        cat > conftest.$ac_ext <<EOF
5335 #line 5336 "configure"
5336 #include "confdefs.h"
5337 #ifdef HAVE_SYS_TYPES_H
5338 #include <sys/types.h>
5339 #endif
5340 #ifdef HAVE_SYS_TIME_H
5341 #include <sys/time.h>
5342 #endif
5343 #ifdef HAVE_SYS_SELECT_H
5344 #include <sys/select.h>
5345 #endif
5346 #ifdef HAVE_SYS_SOCKET_H
5347 #include <sys/socket.h>
5348 #endif
5349 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);
5350 int main() {
5351
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5355   rm -rf conftest*
5356           ac_not_found=no ; break 3
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   ac_not_found=yes
5362 fi
5363 rm -f conftest*
5364       done
5365      done
5366     done
5367    
5368 fi
5369   
5370 fi
5371  
5372 fi
5373  if test "$ac_not_found" = yes; then
5374   ac_cv_func_select_arg1=int 
5375   ac_cv_func_select_arg234='int *' 
5376   ac_cv_func_select_arg5='struct timeval *'
5377  fi
5378  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5379  cat >> confdefs.h <<EOF
5380 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5381 EOF
5382
5383  cat >> confdefs.h <<EOF
5384 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5385 EOF
5386
5387  cat >> confdefs.h <<EOF
5388 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5389 EOF
5390
5391
5392 fi
5393
5394
5395 for ac_hdr in regex.h 
5396 do
5397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5399 echo "configure:5400: checking for $ac_hdr" >&5
5400 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 #include <$ac_hdr>
5407 EOF
5408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5409 { (eval echo configure:5410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5411 if test -z "$ac_err"; then
5412   rm -rf conftest*
5413   eval "ac_cv_header_$ac_safe=yes"
5414 else
5415   echo "$ac_err" >&5
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_header_$ac_safe=no"
5420 fi
5421 rm -f conftest*
5422 fi
5423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5424   echo "$ac_t""yes" 1>&6
5425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5426   cat >> confdefs.h <<EOF
5427 #define $ac_tr_hdr 1
5428 EOF
5429  
5430 else
5431   echo "$ac_t""no" 1>&6
5432 fi
5433 done
5434
5435 if test "$ac_cv_header_regex_h" != yes ; then
5436         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5437 fi
5438 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5439 echo "configure:5440: checking for regfree" >&5
5440 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5441   echo $ac_n "(cached) $ac_c" 1>&6
5442 else
5443   cat > conftest.$ac_ext <<EOF
5444 #line 5445 "configure"
5445 #include "confdefs.h"
5446 /* System header to define __stub macros and hopefully few prototypes,
5447     which can conflict with char regfree(); below.  */
5448 #include <assert.h>
5449 /* Override any gcc2 internal prototype to avoid an error.  */
5450 /* We use char because int might match the return type of a gcc2
5451     builtin and then its argument prototype would still apply.  */
5452 char regfree();
5453 char (*f)();
5454
5455 int main() {
5456
5457 /* The GNU C library defines this for functions which it implements
5458     to always fail with ENOSYS.  Some functions are actually named
5459     something starting with __ and the normal name is an alias.  */
5460 #if defined (__stub_regfree) || defined (__stub___regfree)
5461 choke me
5462 #else
5463 f = regfree;
5464 #endif
5465
5466 ; return 0; }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469   rm -rf conftest*
5470   eval "ac_cv_func_regfree=yes"
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -rf conftest*
5475   eval "ac_cv_func_regfree=no"
5476 fi
5477 rm -f conftest*
5478 fi
5479
5480 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5481   echo "$ac_t""yes" 1>&6
5482   :
5483 else
5484   echo "$ac_t""no" 1>&6
5485 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5486 fi
5487
5488
5489
5490 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5491 echo "configure:5492: checking for compatible POSIX regex" >&5
5492 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5493   echo $ac_n "(cached) $ac_c" 1>&6
5494 else
5495   
5496         if test "$cross_compiling" = yes; then
5497   ol_cv_c_posix_regex=cross
5498 else
5499   cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502
5503 #include <sys/types.h>
5504 #include <regex.h>
5505 static char *pattern, *string;
5506 main()
5507 {
5508         int rc;
5509         regex_t re;
5510
5511         pattern = "^A";
5512
5513         if(regcomp(&re, pattern, 0)) {
5514                 return -1;
5515         }
5516         
5517         string = "ALL MATCH";
5518         
5519         rc = regexec(&re, string, 0, (void*)0, 0);
5520
5521         regfree(&re);
5522
5523         return rc;
5524 }
5525 EOF
5526 if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5527 then
5528   ol_cv_c_posix_regex=yes
5529 else
5530   echo "configure: failed program was:" >&5
5531   cat conftest.$ac_ext >&5
5532   rm -fr conftest*
5533   ol_cv_c_posix_regex=no
5534 fi
5535 rm -fr conftest*
5536 fi
5537
5538 fi
5539
5540 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5541
5542 if test "$ol_cv_c_posix_regex" = no ; then
5543         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5544 fi
5545
5546 ol_link_dnssrv=no
5547 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5548 echo "configure:5549: checking for res_query" >&5
5549 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5550   echo $ac_n "(cached) $ac_c" 1>&6
5551 else
5552   cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 /* System header to define __stub macros and hopefully few prototypes,
5556     which can conflict with char res_query(); below.  */
5557 #include <assert.h>
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 /* We use char because int might match the return type of a gcc2
5560     builtin and then its argument prototype would still apply.  */
5561 char res_query();
5562 char (*f)();
5563
5564 int main() {
5565
5566 /* The GNU C library defines this for functions which it implements
5567     to always fail with ENOSYS.  Some functions are actually named
5568     something starting with __ and the normal name is an alias.  */
5569 #if defined (__stub_res_query) || defined (__stub___res_query)
5570 choke me
5571 #else
5572 f = res_query;
5573 #endif
5574
5575 ; return 0; }
5576 EOF
5577 if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5578   rm -rf conftest*
5579   eval "ac_cv_func_res_query=yes"
5580 else
5581   echo "configure: failed program was:" >&5
5582   cat conftest.$ac_ext >&5
5583   rm -rf conftest*
5584   eval "ac_cv_func_res_query=no"
5585 fi
5586 rm -f conftest*
5587 fi
5588
5589 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5590   echo "$ac_t""yes" 1>&6
5591   :
5592 else
5593   echo "$ac_t""no" 1>&6
5594 fi
5595
5596 if test $ac_cv_func_res_query = no ; then 
5597         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5598 echo "configure:5599: checking for res_query in -lbind" >&5
5599 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5600 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5601   echo $ac_n "(cached) $ac_c" 1>&6
5602 else
5603   ac_save_LIBS="$LIBS"
5604 LIBS="-lbind  $LIBS"
5605 cat > conftest.$ac_ext <<EOF
5606 #line 5607 "configure"
5607 #include "confdefs.h"
5608 /* Override any gcc2 internal prototype to avoid an error.  */
5609 /* We use char because int might match the return type of a gcc2
5610     builtin and then its argument prototype would still apply.  */
5611 char res_query();
5612
5613 int main() {
5614 res_query()
5615 ; return 0; }
5616 EOF
5617 if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5618   rm -rf conftest*
5619   eval "ac_cv_lib_$ac_lib_var=yes"
5620 else
5621   echo "configure: failed program was:" >&5
5622   cat conftest.$ac_ext >&5
5623   rm -rf conftest*
5624   eval "ac_cv_lib_$ac_lib_var=no"
5625 fi
5626 rm -f conftest*
5627 LIBS="$ac_save_LIBS"
5628
5629 fi
5630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5631   echo "$ac_t""yes" 1>&6
5632     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5633     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5634   cat >> confdefs.h <<EOF
5635 #define $ac_tr_lib 1
5636 EOF
5637
5638   LIBS="-lbind $LIBS"
5639
5640 else
5641   echo "$ac_t""no" 1>&6
5642 fi
5643
5644         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5645 fi
5646
5647 if test $ac_cv_func_res_query = no ; then 
5648         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5649 echo "configure:5650: checking for __res_query in -lbind" >&5
5650 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5652   echo $ac_n "(cached) $ac_c" 1>&6
5653 else
5654   ac_save_LIBS="$LIBS"
5655 LIBS="-lbind  $LIBS"
5656 cat > conftest.$ac_ext <<EOF
5657 #line 5658 "configure"
5658 #include "confdefs.h"
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 /* We use char because int might match the return type of a gcc2
5661     builtin and then its argument prototype would still apply.  */
5662 char __res_query();
5663
5664 int main() {
5665 __res_query()
5666 ; return 0; }
5667 EOF
5668 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5669   rm -rf conftest*
5670   eval "ac_cv_lib_$ac_lib_var=yes"
5671 else
5672   echo "configure: failed program was:" >&5
5673   cat conftest.$ac_ext >&5
5674   rm -rf conftest*
5675   eval "ac_cv_lib_$ac_lib_var=no"
5676 fi
5677 rm -f conftest*
5678 LIBS="$ac_save_LIBS"
5679
5680 fi
5681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5682   echo "$ac_t""yes" 1>&6
5683     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5684     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5685   cat >> confdefs.h <<EOF
5686 #define $ac_tr_lib 1
5687 EOF
5688
5689   LIBS="-lbind $LIBS"
5690
5691 else
5692   echo "$ac_t""no" 1>&6
5693 fi
5694
5695         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5696 fi
5697
5698 if test $ac_cv_func_res_query = no ; then 
5699         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5700 echo "configure:5701: checking for res_query in -lresolv" >&5
5701 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5703   echo $ac_n "(cached) $ac_c" 1>&6
5704 else
5705   ac_save_LIBS="$LIBS"
5706 LIBS="-lresolv  $LIBS"
5707 cat > conftest.$ac_ext <<EOF
5708 #line 5709 "configure"
5709 #include "confdefs.h"
5710 /* Override any gcc2 internal prototype to avoid an error.  */
5711 /* We use char because int might match the return type of a gcc2
5712     builtin and then its argument prototype would still apply.  */
5713 char res_query();
5714
5715 int main() {
5716 res_query()
5717 ; return 0; }
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5720   rm -rf conftest*
5721   eval "ac_cv_lib_$ac_lib_var=yes"
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -rf conftest*
5726   eval "ac_cv_lib_$ac_lib_var=no"
5727 fi
5728 rm -f conftest*
5729 LIBS="$ac_save_LIBS"
5730
5731 fi
5732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5735     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5736   cat >> confdefs.h <<EOF
5737 #define $ac_tr_lib 1
5738 EOF
5739
5740   LIBS="-lresolv $LIBS"
5741
5742 else
5743   echo "$ac_t""no" 1>&6
5744 fi
5745
5746         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5747 fi
5748
5749 if test "$ac_cv_func_res_query" = yes ; then
5750         cat >> confdefs.h <<\EOF
5751 #define HAVE_RES_QUERY 1
5752 EOF
5753
5754
5755         if test $ol_enable_dnssrv != no ; then
5756                 ol_link_dnssrv=yes
5757         fi
5758 fi
5759
5760 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5761         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5762 fi
5763
5764 ol_link_kbind=no
5765 ol_link_kpasswd=no
5766 ol_link_krb5=no
5767 ol_link_krb4=no
5768
5769 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5770         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5771
5772         for ac_hdr in krb5.h
5773 do
5774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5776 echo "configure:5777: checking for $ac_hdr" >&5
5777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5778   echo $ac_n "(cached) $ac_c" 1>&6
5779 else
5780   cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5783 #include <$ac_hdr>
5784 EOF
5785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5786 { (eval echo configure:5787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5788 if test -z "$ac_err"; then
5789   rm -rf conftest*
5790   eval "ac_cv_header_$ac_safe=yes"
5791 else
5792   echo "$ac_err" >&5
5793   echo "configure: failed program was:" >&5
5794   cat conftest.$ac_ext >&5
5795   rm -rf conftest*
5796   eval "ac_cv_header_$ac_safe=no"
5797 fi
5798 rm -f conftest*
5799 fi
5800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5801   echo "$ac_t""yes" 1>&6
5802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5803   cat >> confdefs.h <<EOF
5804 #define $ac_tr_hdr 1
5805 EOF
5806  
5807 else
5808   echo "$ac_t""no" 1>&6
5809 fi
5810 done
5811
5812
5813         if test $ac_cv_header_krb5_h = yes ; then
5814                                 for ac_hdr in heim_err.h
5815 do
5816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5818 echo "configure:5819: checking for $ac_hdr" >&5
5819 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5820   echo $ac_n "(cached) $ac_c" 1>&6
5821 else
5822   cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825 #include <$ac_hdr>
5826 EOF
5827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5828 { (eval echo configure:5829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5830 if test -z "$ac_err"; then
5831   rm -rf conftest*
5832   eval "ac_cv_header_$ac_safe=yes"
5833 else
5834   echo "$ac_err" >&5
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   eval "ac_cv_header_$ac_safe=no"
5839 fi
5840 rm -f conftest*
5841 fi
5842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5843   echo "$ac_t""yes" 1>&6
5844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5845   cat >> confdefs.h <<EOF
5846 #define $ac_tr_hdr 1
5847 EOF
5848  
5849 else
5850   echo "$ac_t""no" 1>&6
5851 fi
5852 done
5853
5854                 if test $ac_cv_header_heim_err_h = yes ; then
5855                         krb5_impl=heimdal
5856                 else
5857                         krb5_impl=mit
5858                 fi
5859
5860                 if test $krb5_impl = mit; then
5861                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5862 echo "configure:5863: checking for main in -lkrb5" >&5
5863 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5865   echo $ac_n "(cached) $ac_c" 1>&6
5866 else
5867   ac_save_LIBS="$LIBS"
5868 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5869 cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872
5873 int main() {
5874 main()
5875 ; return 0; }
5876 EOF
5877 if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5878   rm -rf conftest*
5879   eval "ac_cv_lib_$ac_lib_var=yes"
5880 else
5881   echo "configure: failed program was:" >&5
5882   cat conftest.$ac_ext >&5
5883   rm -rf conftest*
5884   eval "ac_cv_lib_$ac_lib_var=no"
5885 fi
5886 rm -f conftest*
5887 LIBS="$ac_save_LIBS"
5888
5889 fi
5890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5891   echo "$ac_t""yes" 1>&6
5892   have_krb5=yes
5893                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5894 else
5895   echo "$ac_t""no" 1>&6
5896 have_krb5=no
5897 fi
5898
5899
5900                 elif test $krb5_impl = heimdal; then
5901                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5902 echo "configure:5903: checking for main in -lkrb5" >&5
5903 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5905   echo $ac_n "(cached) $ac_c" 1>&6
5906 else
5907   ac_save_LIBS="$LIBS"
5908 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912
5913 int main() {
5914 main()
5915 ; return 0; }
5916 EOF
5917 if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5918   rm -rf conftest*
5919   eval "ac_cv_lib_$ac_lib_var=yes"
5920 else
5921   echo "configure: failed program was:" >&5
5922   cat conftest.$ac_ext >&5
5923   rm -rf conftest*
5924   eval "ac_cv_lib_$ac_lib_var=no"
5925 fi
5926 rm -f conftest*
5927 LIBS="$ac_save_LIBS"
5928
5929 fi
5930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5931   echo "$ac_t""yes" 1>&6
5932   have_krb5=yes
5933                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5934 else
5935   echo "$ac_t""no" 1>&6
5936 have_krb5=no
5937 fi
5938
5939
5940                         cat >> confdefs.h <<\EOF
5941 #define HAVE_HEIMDAL_KERBEROS 1
5942 EOF
5943
5944                 else
5945                         have_krb5=no
5946                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5947                 fi
5948
5949                 if test $have_krb5 = yes ; then
5950                         ol_link_krb5=yes
5951
5952                         cat >> confdefs.h <<\EOF
5953 #define HAVE_KRB5 1
5954 EOF
5955
5956
5957                         if test $ol_enable_kpasswd != no ; then
5958                                 ol_link_kpasswd=yes;
5959                         fi
5960
5961                         if test $ol_with_kerberos = k5only ; then
5962                                 ol_with_kerberos=found
5963                         fi
5964
5965                 elif test $ol_with_kerberos != auto ; then
5966                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5967                 fi
5968
5969         fi
5970 fi
5971
5972 if test $ol_link_krb5 = yes -a \
5973         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5974
5975         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5976 do
5977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5979 echo "configure:5980: checking for $ac_hdr" >&5
5980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5981   echo $ac_n "(cached) $ac_c" 1>&6
5982 else
5983   cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 #include <$ac_hdr>
5987 EOF
5988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5989 { (eval echo configure:5990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5991 if test -z "$ac_err"; then
5992   rm -rf conftest*
5993   eval "ac_cv_header_$ac_safe=yes"
5994 else
5995   echo "$ac_err" >&5
5996   echo "configure: failed program was:" >&5
5997   cat conftest.$ac_ext >&5
5998   rm -rf conftest*
5999   eval "ac_cv_header_$ac_safe=no"
6000 fi
6001 rm -f conftest*
6002 fi
6003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6004   echo "$ac_t""yes" 1>&6
6005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6006   cat >> confdefs.h <<EOF
6007 #define $ac_tr_hdr 1
6008 EOF
6009  
6010 else
6011   echo "$ac_t""no" 1>&6
6012 fi
6013 done
6014
6015
6016         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6017                 if test $krb5_impl = mit; then
6018                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6019 echo "configure:6020: checking for main in -lkrb4" >&5
6020 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6022   echo $ac_n "(cached) $ac_c" 1>&6
6023 else
6024   ac_save_LIBS="$LIBS"
6025 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6026 cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029
6030 int main() {
6031 main()
6032 ; return 0; }
6033 EOF
6034 if { (eval echo configure:6035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6035   rm -rf conftest*
6036   eval "ac_cv_lib_$ac_lib_var=yes"
6037 else
6038   echo "configure: failed program was:" >&5
6039   cat conftest.$ac_ext >&5
6040   rm -rf conftest*
6041   eval "ac_cv_lib_$ac_lib_var=no"
6042 fi
6043 rm -f conftest*
6044 LIBS="$ac_save_LIBS"
6045
6046 fi
6047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6048   echo "$ac_t""yes" 1>&6
6049   have_k425=yes
6050                                 KRB4_LIBS="-lkrb4 -ldes425"
6051 else
6052   echo "$ac_t""no" 1>&6
6053 have_k425=no
6054 fi
6055
6056
6057                 elif test $krb5_impl = heimdal; then
6058                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6059 echo "configure:6060: checking for main in -lkrb4" >&5
6060 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6062   echo $ac_n "(cached) $ac_c" 1>&6
6063 else
6064   ac_save_LIBS="$LIBS"
6065 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6066 cat > conftest.$ac_ext <<EOF
6067 #line 6068 "configure"
6068 #include "confdefs.h"
6069
6070 int main() {
6071 main()
6072 ; return 0; }
6073 EOF
6074 if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6075   rm -rf conftest*
6076   eval "ac_cv_lib_$ac_lib_var=yes"
6077 else
6078   echo "configure: failed program was:" >&5
6079   cat conftest.$ac_ext >&5
6080   rm -rf conftest*
6081   eval "ac_cv_lib_$ac_lib_var=no"
6082 fi
6083 rm -f conftest*
6084 LIBS="$ac_save_LIBS"
6085
6086 fi
6087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6088   echo "$ac_t""yes" 1>&6
6089   have_k425=yes
6090                                 KRB4_LIBS="-lkrb4"
6091 else
6092   echo "$ac_t""no" 1>&6
6093 have_k425=no
6094 fi
6095
6096
6097                 else
6098                         have_425=no
6099                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6100                 fi
6101
6102                 if test $have_k425 = yes ; then
6103                         ol_with_kerberos=found
6104                         ol_link_krb4=yes
6105
6106                         cat >> confdefs.h <<\EOF
6107 #define HAVE_KRB425 1
6108 EOF
6109
6110                         cat >> confdefs.h <<\EOF
6111 #define HAVE_KRB4 1
6112 EOF
6113
6114
6115                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6116 echo "configure:6117: checking for des_debug in Kerberos libraries" >&5
6117 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6118   echo $ac_n "(cached) $ac_c" 1>&6
6119 else
6120   
6121                                                                 save_LIBS="$LIBS"
6122                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6123                                 cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126
6127 #include <kerberosIV/krb.h>
6128 #include <kerberosIV/des.h>
6129 extern int des_debug;
6130
6131 int main() {
6132
6133 des_debug = 1;
6134
6135 ; return 0; }
6136 EOF
6137 if { (eval echo configure:6138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6138   rm -rf conftest*
6139   ol_cv_var_des_debug=yes
6140 else
6141   echo "configure: failed program was:" >&5
6142   cat conftest.$ac_ext >&5
6143   rm -rf conftest*
6144   ol_cv_var_des_debug=no
6145 fi
6146 rm -f conftest*
6147                                                                 LIBS="$save_LIBS"
6148                         
6149 fi
6150
6151 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6152
6153                         if test $ol_cv_var_des_debug = yes ; then
6154                                 cat >> confdefs.h <<\EOF
6155 #define HAVE_DES_DEBUG 1
6156 EOF
6157
6158                         fi
6159
6160                         LIBS="$save_LIBS"
6161                 fi
6162         fi
6163 fi
6164
6165 if test $ol_link_krb5 = yes ; then
6166         ol_with_kerberos=found
6167 fi
6168
6169 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6170         -o $ol_with_kerberos = kth ; then
6171
6172         for ac_hdr in krb.h des.h krb-archaeology.h 
6173 do
6174 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6175 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6176 echo "configure:6177: checking for $ac_hdr" >&5
6177 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6178   echo $ac_n "(cached) $ac_c" 1>&6
6179 else
6180   cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183 #include <$ac_hdr>
6184 EOF
6185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6186 { (eval echo configure:6187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6187 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6188 if test -z "$ac_err"; then
6189   rm -rf conftest*
6190   eval "ac_cv_header_$ac_safe=yes"
6191 else
6192   echo "$ac_err" >&5
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   eval "ac_cv_header_$ac_safe=no"
6197 fi
6198 rm -f conftest*
6199 fi
6200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6201   echo "$ac_t""yes" 1>&6
6202     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6203   cat >> confdefs.h <<EOF
6204 #define $ac_tr_hdr 1
6205 EOF
6206  
6207 else
6208   echo "$ac_t""no" 1>&6
6209 fi
6210 done
6211
6212
6213         if test $ac_cv_header_krb_h = yes ; then
6214                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6215 echo "configure:6216: checking for main in -lkrb" >&5
6216 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6218   echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220   ac_save_LIBS="$LIBS"
6221 LIBS="-lkrb -ldes $LIBS"
6222 cat > conftest.$ac_ext <<EOF
6223 #line 6224 "configure"
6224 #include "confdefs.h"
6225
6226 int main() {
6227 main()
6228 ; return 0; }
6229 EOF
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231   rm -rf conftest*
6232   eval "ac_cv_lib_$ac_lib_var=yes"
6233 else
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -rf conftest*
6237   eval "ac_cv_lib_$ac_lib_var=no"
6238 fi
6239 rm -f conftest*
6240 LIBS="$ac_save_LIBS"
6241
6242 fi
6243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6244   echo "$ac_t""yes" 1>&6
6245   have_k4=yes
6246 else
6247   echo "$ac_t""no" 1>&6
6248 have_k4=no
6249 fi
6250
6251
6252                 if test $have_k4 = yes ; then
6253                         ol_with_kerberos=found
6254                         ol_link_krb4=yes
6255
6256                         cat >> confdefs.h <<\EOF
6257 #define HAVE_KRB4 1
6258 EOF
6259
6260
6261                         KRB4_LIBS="-lkrb -ldes"
6262
6263                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6264                                 cat >> confdefs.h <<\EOF
6265 #define HAVE_KTH_KERBEROS 1
6266 EOF
6267
6268                         fi
6269                 fi
6270         fi
6271 fi
6272
6273 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6274         ol_link_kpasswd=yes;
6275 fi
6276
6277 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6278         cat >> confdefs.h <<\EOF
6279 #define HAVE_KERBEROS 1
6280 EOF
6281
6282
6283 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6284         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6285 fi
6286
6287 ol_link_tls=no
6288 if test $ol_with_tls != no ; then
6289         for ac_hdr in openssl/ssl.h ssl.h
6290 do
6291 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6292 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6293 echo "configure:6294: checking for $ac_hdr" >&5
6294 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6295   echo $ac_n "(cached) $ac_c" 1>&6
6296 else
6297   cat > conftest.$ac_ext <<EOF
6298 #line 6299 "configure"
6299 #include "confdefs.h"
6300 #include <$ac_hdr>
6301 EOF
6302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6303 { (eval echo configure:6304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6305 if test -z "$ac_err"; then
6306   rm -rf conftest*
6307   eval "ac_cv_header_$ac_safe=yes"
6308 else
6309   echo "$ac_err" >&5
6310   echo "configure: failed program was:" >&5
6311   cat conftest.$ac_ext >&5
6312   rm -rf conftest*
6313   eval "ac_cv_header_$ac_safe=no"
6314 fi
6315 rm -f conftest*
6316 fi
6317 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6318   echo "$ac_t""yes" 1>&6
6319     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6320   cat >> confdefs.h <<EOF
6321 #define $ac_tr_hdr 1
6322 EOF
6323  
6324 else
6325   echo "$ac_t""no" 1>&6
6326 fi
6327 done
6328
6329         
6330         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6331                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6332 echo "configure:6333: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6333 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6335   echo $ac_n "(cached) $ac_c" 1>&6
6336 else
6337   ac_save_LIBS="$LIBS"
6338 LIBS="-lssl -lcrypto $LIBS"
6339 cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 /* Override any gcc2 internal prototype to avoid an error.  */
6343 /* We use char because int might match the return type of a gcc2
6344     builtin and then its argument prototype would still apply.  */
6345 char SSLeay_add_ssl_algorithms();
6346
6347 int main() {
6348 SSLeay_add_ssl_algorithms()
6349 ; return 0; }
6350 EOF
6351 if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6352   rm -rf conftest*
6353   eval "ac_cv_lib_$ac_lib_var=yes"
6354 else
6355   echo "configure: failed program was:" >&5
6356   cat conftest.$ac_ext >&5
6357   rm -rf conftest*
6358   eval "ac_cv_lib_$ac_lib_var=no"
6359 fi
6360 rm -f conftest*
6361 LIBS="$ac_save_LIBS"
6362
6363 fi
6364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6365   echo "$ac_t""yes" 1>&6
6366   have_ssleay=yes
6367                         need_rsaref=no
6368 else
6369   echo "$ac_t""no" 1>&6
6370 have_ssleay=no
6371 fi
6372
6373                         
6374                 if test $have_ssleay = no ; then
6375                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6376 echo "configure:6377: checking for SSL_library_init in -lssl" >&5
6377 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6379   echo $ac_n "(cached) $ac_c" 1>&6
6380 else
6381   ac_save_LIBS="$LIBS"
6382 LIBS="-lssl -lcrypto $LIBS"
6383 cat > conftest.$ac_ext <<EOF
6384 #line 6385 "configure"
6385 #include "confdefs.h"
6386 /* Override any gcc2 internal prototype to avoid an error.  */
6387 /* We use char because int might match the return type of a gcc2
6388     builtin and then its argument prototype would still apply.  */
6389 char SSL_library_init();
6390
6391 int main() {
6392 SSL_library_init()
6393 ; return 0; }
6394 EOF
6395 if { (eval echo configure:6396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6396   rm -rf conftest*
6397   eval "ac_cv_lib_$ac_lib_var=yes"
6398 else
6399   echo "configure: failed program was:" >&5
6400   cat conftest.$ac_ext >&5
6401   rm -rf conftest*
6402   eval "ac_cv_lib_$ac_lib_var=no"
6403 fi
6404 rm -f conftest*
6405 LIBS="$ac_save_LIBS"
6406
6407 fi
6408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6409   echo "$ac_t""yes" 1>&6
6410   have_ssleay=yes
6411                                 need_rsaref=no
6412 else
6413   echo "$ac_t""no" 1>&6
6414 have_ssleay=no
6415 fi
6416
6417                 fi
6418
6419                 if test $have_ssleay = no ; then
6420                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6421 echo "configure:6422: checking for ssl3_accept in -lssl" >&5
6422 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6424   echo $ac_n "(cached) $ac_c" 1>&6
6425 else
6426   ac_save_LIBS="$LIBS"
6427 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6428 cat > conftest.$ac_ext <<EOF
6429 #line 6430 "configure"
6430 #include "confdefs.h"
6431 /* Override any gcc2 internal prototype to avoid an error.  */
6432 /* We use char because int might match the return type of a gcc2
6433     builtin and then its argument prototype would still apply.  */
6434 char ssl3_accept();
6435
6436 int main() {
6437 ssl3_accept()
6438 ; return 0; }
6439 EOF
6440 if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6441   rm -rf conftest*
6442   eval "ac_cv_lib_$ac_lib_var=yes"
6443 else
6444   echo "configure: failed program was:" >&5
6445   cat conftest.$ac_ext >&5
6446   rm -rf conftest*
6447   eval "ac_cv_lib_$ac_lib_var=no"
6448 fi
6449 rm -f conftest*
6450 LIBS="$ac_save_LIBS"
6451
6452 fi
6453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6454   echo "$ac_t""yes" 1>&6
6455   have_ssleay=yes
6456                                 need_rsaref=yes
6457 else
6458   echo "$ac_t""no" 1>&6
6459 have_ssleay=no
6460 fi
6461
6462                 fi
6463
6464                 if test $have_ssleay = yes ; then
6465                         ol_with_tls=found
6466                         ol_link_tls=yes
6467
6468                         cat >> confdefs.h <<\EOF
6469 #define HAVE_SSLEAY 1
6470 EOF
6471
6472
6473                         if test $need_rsaref = yes; then
6474                                 cat >> confdefs.h <<\EOF
6475 #define HAVE_RSAREF 1
6476 EOF
6477
6478
6479                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6480                         else
6481                                 TLS_LIBS="-lssl -lcrypto"
6482                         fi
6483                 fi
6484         fi
6485
6486 else
6487         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6488 fi
6489
6490 if test $ol_link_tls = yes ; then
6491         cat >> confdefs.h <<\EOF
6492 #define HAVE_TLS 1
6493 EOF
6494
6495
6496 elif test $ol_with_tls = auto ; then
6497         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6498         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6499
6500 elif test $ol_with_tls != no ; then
6501         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6502 fi
6503
6504 for ac_func in \
6505         ctime_r                 \
6506         gethostbyname_r gethostbyaddr_r \
6507
6508 do
6509 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6510 echo "configure:6511: checking for $ac_func" >&5
6511 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6512   echo $ac_n "(cached) $ac_c" 1>&6
6513 else
6514   cat > conftest.$ac_ext <<EOF
6515 #line 6516 "configure"
6516 #include "confdefs.h"
6517 /* System header to define __stub macros and hopefully few prototypes,
6518     which can conflict with char $ac_func(); below.  */
6519 #include <assert.h>
6520 /* Override any gcc2 internal prototype to avoid an error.  */
6521 /* We use char because int might match the return type of a gcc2
6522     builtin and then its argument prototype would still apply.  */
6523 char $ac_func();
6524 char (*f)();
6525
6526 int main() {
6527
6528 /* The GNU C library defines this for functions which it implements
6529     to always fail with ENOSYS.  Some functions are actually named
6530     something starting with __ and the normal name is an alias.  */
6531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6532 choke me
6533 #else
6534 f = $ac_func;
6535 #endif
6536
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   eval "ac_cv_func_$ac_func=yes"
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_func_$ac_func=no"
6547 fi
6548 rm -f conftest*
6549 fi
6550
6551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6552   echo "$ac_t""yes" 1>&6
6553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6554   cat >> confdefs.h <<EOF
6555 #define $ac_tr_func 1
6556 EOF
6557  
6558 else
6559   echo "$ac_t""no" 1>&6
6560 fi
6561 done
6562
6563
6564 if test "$ac_cv_func_ctime_r" = no ; then
6565         ol_cv_func_ctime_r_nargs=0
6566 else
6567         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6568 echo "configure:6569: checking number of arguments of ctime_r" >&5
6569 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6570   echo $ac_n "(cached) $ac_c" 1>&6
6571 else
6572   cat > conftest.$ac_ext <<EOF
6573 #line 6574 "configure"
6574 #include "confdefs.h"
6575 #include <time.h>
6576 int main() {
6577 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6578 ; return 0; }
6579 EOF
6580 if { (eval echo configure:6581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6581   rm -rf conftest*
6582   ol_cv_func_ctime_r_nargs3=yes
6583 else
6584   echo "configure: failed program was:" >&5
6585   cat conftest.$ac_ext >&5
6586   rm -rf conftest*
6587   ol_cv_func_ctime_r_nargs3=no
6588 fi
6589 rm -f conftest*
6590
6591         cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 #include <time.h>
6595 int main() {
6596 time_t ti; char *buffer; ctime_r(&ti,buffer);
6597 ; return 0; }
6598 EOF
6599 if { (eval echo configure:6600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6600   rm -rf conftest*
6601   ol_cv_func_ctime_r_nargs2=yes
6602 else
6603   echo "configure: failed program was:" >&5
6604   cat conftest.$ac_ext >&5
6605   rm -rf conftest*
6606   ol_cv_func_ctime_r_nargs2=no
6607 fi
6608 rm -f conftest*
6609
6610         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6611                 $ol_cv_func_ctime_r_nargs2 = no ; then
6612
6613                 ol_cv_func_ctime_r_nargs=3
6614
6615         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6616                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6617
6618                 ol_cv_func_ctime_r_nargs=2
6619
6620         else
6621                 ol_cv_func_ctime_r_nargs=0
6622         fi
6623   
6624 fi
6625
6626 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6627
6628   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6629         cat >> confdefs.h <<EOF
6630 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6631 EOF
6632
6633   fi
6634
6635 fi
6636
6637 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6638         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6639 echo "configure:6640: checking number of arguments of gethostbyname_r" >&5
6640 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6641   echo $ac_n "(cached) $ac_c" 1>&6
6642 else
6643   cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 #include <sys/types.h>
6647 #include <sys/socket.h>
6648 #include <netinet/in.h>
6649 #include <netdb.h>
6650 #define BUFSIZE (sizeof(struct hostent)+10)
6651 int main() {
6652 struct hostent hent; char buffer[BUFSIZE];
6653                 int bufsize=BUFSIZE;int h_errno;
6654                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6655                         buffer, bufsize, &h_errno);
6656 ; return 0; }
6657 EOF
6658 if { (eval echo configure:6659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6659   rm -rf conftest*
6660   ol_cv_func_gethostbyname_r_nargs5=yes
6661 else
6662   echo "configure: failed program was:" >&5
6663   cat conftest.$ac_ext >&5
6664   rm -rf conftest*
6665   ol_cv_func_gethostbyname_r_nargs5=no
6666 fi
6667 rm -f conftest*
6668
6669         cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 #include <sys/types.h>
6673 #include <sys/socket.h>
6674 #include <netinet/in.h>
6675 #include <netdb.h>
6676 #define BUFSIZE (sizeof(struct hostent)+10)
6677 int main() {
6678 struct hostent hent;struct hostent *rhent;
6679                 char buffer[BUFSIZE];
6680                 int bufsize=BUFSIZE;int h_errno;
6681                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6682                         &rhent, &h_errno);
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6686   rm -rf conftest*
6687   ol_cv_func_gethostbyname_r_nargs6=yes
6688 else
6689   echo "configure: failed program was:" >&5
6690   cat conftest.$ac_ext >&5
6691   rm -rf conftest*
6692   ol_cv_func_gethostbyname_r_nargs6=no
6693 fi
6694 rm -f conftest*
6695
6696         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6697                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6698
6699                 ol_cv_func_gethostbyname_r_nargs=5
6700
6701         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6702                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6703
6704                 ol_cv_func_gethostbyname_r_nargs=6
6705
6706         else
6707                 ol_cv_func_gethostbyname_r_nargs=0
6708         fi
6709   
6710 fi
6711
6712 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6713   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6714         cat >> confdefs.h <<EOF
6715 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6716 EOF
6717
6718   fi
6719
6720 else
6721         ol_cv_func_gethostbyname_r_nargs=0
6722 fi
6723  
6724 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6725         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6726 echo "configure:6727: checking number of arguments of gethostbyaddr_r" >&5
6727 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6728   echo $ac_n "(cached) $ac_c" 1>&6
6729 else
6730   cat > conftest.$ac_ext <<EOF
6731 #line 6732 "configure"
6732 #include "confdefs.h"
6733 #include <sys/types.h>
6734 #include <sys/socket.h>
6735 #include <netinet/in.h>
6736 #include <netdb.h>
6737 #define BUFSIZE (sizeof(struct hostent)+10)
6738 int main() {
6739 struct hostent hent; char buffer[BUFSIZE]; 
6740             struct in_addr add;
6741             size_t alen=sizeof(struct in_addr);
6742             int bufsize=BUFSIZE;int h_errno;
6743                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6744                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6745 ; return 0; }
6746 EOF
6747 if { (eval echo configure:6748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6748   rm -rf conftest*
6749   ol_cv_func_gethostbyaddr_r_nargs7=yes
6750 else
6751   echo "configure: failed program was:" >&5
6752   cat conftest.$ac_ext >&5
6753   rm -rf conftest*
6754   ol_cv_func_gethostbyaddr_r_nargs7=no
6755 fi
6756 rm -f conftest*
6757
6758         cat > conftest.$ac_ext <<EOF
6759 #line 6760 "configure"
6760 #include "confdefs.h"
6761 #include <sys/types.h>
6762 #include <sys/socket.h>
6763 #include <netinet/in.h>
6764 #include <netdb.h>
6765 #define BUFSIZE (sizeof(struct hostent)+10)
6766 int main() {
6767 struct hostent hent;
6768                 struct hostent *rhent; char buffer[BUFSIZE]; 
6769                 struct in_addr add;
6770                 size_t alen=sizeof(struct in_addr);
6771                 int bufsize=BUFSIZE;int h_errno;
6772                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6773                         alen, AF_INET, &hent, buffer, bufsize, 
6774                         &rhent, &h_errno);
6775 ; return 0; }
6776 EOF
6777 if { (eval echo configure:6778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6778   rm -rf conftest*
6779   ol_cv_func_gethostbyaddr_r_nargs8=yes
6780 else
6781   echo "configure: failed program was:" >&5
6782   cat conftest.$ac_ext >&5
6783   rm -rf conftest*
6784   ol_cv_func_gethostbyaddr_r_nargs8=no
6785 fi
6786 rm -f conftest*
6787
6788         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6789                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6790
6791                 ol_cv_func_gethostbyaddr_r_nargs=7
6792
6793         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6794                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6795
6796                 ol_cv_func_gethostbyaddr_r_nargs=8
6797
6798         else
6799                 ol_cv_func_gethostbyaddr_r_nargs=0
6800         fi
6801   
6802 fi
6803
6804 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6805   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6806     cat >> confdefs.h <<EOF
6807 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6808 EOF
6809
6810   fi
6811
6812 else
6813         ol_cv_func_gethostbyaddr_r_nargs=0
6814 fi
6815
6816 if test "$ac_cv_func_ctime_r" = yes \
6817         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6818         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6819         -a "$ac_cv_func_gethostbyname_r" = yes \
6820         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6821         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6822         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6823         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6824         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6825         ; then
6826  
6827         cat >> confdefs.h <<\EOF
6828 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6829 EOF
6830
6831 fi
6832
6833 ol_link_threads=no
6834
6835 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6836         -o $ol_with_threads = nt ; then
6837
6838         
6839         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6840 echo "configure:6841: checking for NT Threads" >&5
6841 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   
6845                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6846 echo "configure:6847: checking for _beginthread" >&5
6847 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6848   echo $ac_n "(cached) $ac_c" 1>&6
6849 else
6850   cat > conftest.$ac_ext <<EOF
6851 #line 6852 "configure"
6852 #include "confdefs.h"
6853 /* System header to define __stub macros and hopefully few prototypes,
6854     which can conflict with char _beginthread(); below.  */
6855 #include <assert.h>
6856 /* Override any gcc2 internal prototype to avoid an error.  */
6857 /* We use char because int might match the return type of a gcc2
6858     builtin and then its argument prototype would still apply.  */
6859 char _beginthread();
6860 char (*f)();
6861
6862 int main() {
6863
6864 /* The GNU C library defines this for functions which it implements
6865     to always fail with ENOSYS.  Some functions are actually named
6866     something starting with __ and the normal name is an alias.  */
6867 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6868 choke me
6869 #else
6870 f = _beginthread;
6871 #endif
6872
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6876   rm -rf conftest*
6877   eval "ac_cv_func__beginthread=yes"
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   eval "ac_cv_func__beginthread=no"
6883 fi
6884 rm -f conftest*
6885 fi
6886
6887 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6888   echo "$ac_t""yes" 1>&6
6889   ol_cv_nt_threads=yes
6890 else
6891   echo "$ac_t""no" 1>&6
6892 ol_cv_nt_threads=no
6893 fi
6894
6895         
6896 fi
6897
6898 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6899
6900         if test $ol_cv_nt_threads = yes ; then
6901                 cat >> confdefs.h <<\EOF
6902 #define HAVE_NT_THREADS 1
6903 EOF
6904
6905         fi
6906
6907
6908         if test "$ol_cv_nt_threads" = yes ; then
6909         ol_link_threads=nt
6910         ol_with_threads=found
6911         ol_with_yielding_select=yes
6912
6913                 cat >> confdefs.h <<\EOF
6914 #define HAVE_NT_SERVICE_MANAGER 1
6915 EOF
6916
6917                 cat >> confdefs.h <<\EOF
6918 #define HAVE_NT_EVENT_LOG 1
6919 EOF
6920
6921         fi
6922
6923         if test $ol_with_threads = nt ; then
6924                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6925         fi
6926 fi
6927
6928 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6929         -o $ol_with_threads = posix ; then
6930
6931         for ac_hdr in pthread.h
6932 do
6933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6935 echo "configure:6936: checking for $ac_hdr" >&5
6936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6937   echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939   cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942 #include <$ac_hdr>
6943 EOF
6944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6945 { (eval echo configure:6946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6947 if test -z "$ac_err"; then
6948   rm -rf conftest*
6949   eval "ac_cv_header_$ac_safe=yes"
6950 else
6951   echo "$ac_err" >&5
6952   echo "configure: failed program was:" >&5
6953   cat conftest.$ac_ext >&5
6954   rm -rf conftest*
6955   eval "ac_cv_header_$ac_safe=no"
6956 fi
6957 rm -f conftest*
6958 fi
6959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6960   echo "$ac_t""yes" 1>&6
6961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6962   cat >> confdefs.h <<EOF
6963 #define $ac_tr_hdr 1
6964 EOF
6965  
6966 else
6967   echo "$ac_t""no" 1>&6
6968 fi
6969 done
6970
6971
6972         if test $ac_cv_header_pthread_h = yes ; then
6973                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6974 echo "configure:6975: checking POSIX thread version" >&5
6975 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6976   echo $ac_n "(cached) $ac_c" 1>&6
6977 else
6978   
6979         cat > conftest.$ac_ext <<EOF
6980 #line 6981 "configure"
6981 #include "confdefs.h"
6982
6983 #               include <pthread.h>
6984                 /* this check could be improved */
6985 #               ifdef PTHREAD_ONCE_INIT
6986                         pthread_version_final;
6987 #               endif
6988         
6989 EOF
6990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6991   egrep "pthread_version_final" >/dev/null 2>&1; then
6992   rm -rf conftest*
6993   ol_pthread_final=yes
6994 else
6995   rm -rf conftest*
6996   ol_pthread_final=no
6997 fi
6998 rm -f conftest*
6999
7000
7001         cat > conftest.$ac_ext <<EOF
7002 #line 7003 "configure"
7003 #include "confdefs.h"
7004
7005 #               include <pthread.h>
7006                 /* this check could be improved */
7007 #               ifdef pthread_once_init
7008                         pthread_version_draft4;
7009 #               endif
7010         
7011 EOF
7012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7013   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7014   rm -rf conftest*
7015   ol_pthread_draft4=yes
7016 else
7017   rm -rf conftest*
7018   ol_pthread_draft4=no
7019 fi
7020 rm -f conftest*
7021
7022
7023         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7024                 ol_cv_pthread_version=final
7025         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7026                 ol_cv_pthread_version=draft4
7027         else
7028                 ol_cv_pthread_version=unknown
7029         fi
7030
7031 fi
7032
7033 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7034
7035
7036                 if test $ol_cv_pthread_version = final ; then
7037                         cat >> confdefs.h <<\EOF
7038 #define HAVE_PTHREADS_FINAL 1
7039 EOF
7040
7041                 elif test $ol_cv_pthread_version = draft4 ; then
7042                         cat >> confdefs.h <<\EOF
7043 #define HAVE_PTHREADS_D4 1
7044 EOF
7045
7046                 else
7047                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7048                 fi
7049
7050                 # consider threads found
7051                 ol_with_threads=found
7052
7053                 
7054         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7055 echo "configure:7056: checking for LinuxThreads pthread.h" >&5
7056 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7057   echo $ac_n "(cached) $ac_c" 1>&6
7058 else
7059   cat > conftest.$ac_ext <<EOF
7060 #line 7061 "configure"
7061 #include "confdefs.h"
7062 #include <pthread.h>
7063 EOF
7064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7065   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7066   rm -rf conftest*
7067   ol_cv_header_linux_threads=yes
7068 else
7069   rm -rf conftest*
7070   ol_cv_header_linux_threads=no
7071 fi
7072 rm -f conftest*
7073
7074                 
7075 fi
7076
7077 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7078         if test $ol_cv_header_linux_threads = yes; then
7079                 cat >> confdefs.h <<\EOF
7080 #define HAVE_LINUX_THREADS 1
7081 EOF
7082
7083         fi
7084
7085                 
7086         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7087 echo "configure:7088: checking for GNU Pth pthread.h" >&5
7088 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7089   echo $ac_n "(cached) $ac_c" 1>&6
7090 else
7091   cat > conftest.$ac_ext <<EOF
7092 #line 7093 "configure"
7093 #include "confdefs.h"
7094 #include <pthread.h>
7095 #ifdef _POSIX_THREAD_IS_GNU_PTH
7096         __gnu_pth__;
7097 #endif
7098
7099 EOF
7100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7101   egrep "__gnu_pth__" >/dev/null 2>&1; then
7102   rm -rf conftest*
7103   ol_cv_header_gnu_pth_pthread_h=yes
7104 else
7105   rm -rf conftest*
7106   ol_cv_header_gnu_pth_pthread_h=no
7107 fi
7108 rm -f conftest*
7109
7110                 
7111 fi
7112
7113 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7114
7115
7116                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7117                         for ac_hdr in sched.h
7118 do
7119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7121 echo "configure:7122: checking for $ac_hdr" >&5
7122 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7123   echo $ac_n "(cached) $ac_c" 1>&6
7124 else
7125   cat > conftest.$ac_ext <<EOF
7126 #line 7127 "configure"
7127 #include "confdefs.h"
7128 #include <$ac_hdr>
7129 EOF
7130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7131 { (eval echo configure:7132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7133 if test -z "$ac_err"; then
7134   rm -rf conftest*
7135   eval "ac_cv_header_$ac_safe=yes"
7136 else
7137   echo "$ac_err" >&5
7138   echo "configure: failed program was:" >&5
7139   cat conftest.$ac_ext >&5
7140   rm -rf conftest*
7141   eval "ac_cv_header_$ac_safe=no"
7142 fi
7143 rm -f conftest*
7144 fi
7145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7146   echo "$ac_t""yes" 1>&6
7147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7148   cat >> confdefs.h <<EOF
7149 #define $ac_tr_hdr 1
7150 EOF
7151  
7152 else
7153   echo "$ac_t""no" 1>&6
7154 fi
7155 done
7156
7157                 fi
7158
7159                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7160                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7161 echo "configure:7162: checking for pthread_create in default libraries" >&5
7162 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7163   echo $ac_n "(cached) $ac_c" 1>&6
7164 else
7165   
7166                 if test "$cross_compiling" = yes; then
7167   cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170 /* pthread test headers */
7171 #include <pthread.h>
7172 #ifndef NULL
7173 #define NULL (void*)0
7174 #endif
7175
7176 static void *task(p)
7177         void *p;
7178 {
7179         return (void *) (p == NULL);
7180 }
7181
7182 int main() {
7183
7184         /* pthread test function */
7185         pthread_t t;
7186         int status;
7187 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7188         /* This system (e.g. AIX) defaults detached; must override */
7189         pthread_attr_t attr;
7190
7191         status = pthread_attr_init(&attr);
7192         if( status ) exit( status );
7193
7194         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7195         if( status ) exit( status );
7196
7197 #define ATTR    &attr
7198 #else
7199 #if HAVE_PTHREADS_D4
7200 #define ATTR    pthread_attr_default
7201 #else
7202 #define ATTR    NULL
7203 #endif
7204 #endif
7205         /* make sure pthread_create() isn't just a stub */
7206         status = pthread_create(&t, ATTR, task, NULL);
7207         if( status ) exit( status );
7208
7209         /* make sure pthread_detach() isn't just a stub */
7210 #if HAVE_PTHREADS_D4
7211         status = pthread_detach( &t );
7212 #else
7213         status = pthread_detach( t );
7214 #endif
7215
7216 #ifdef HAVE_LINUX_THREADS
7217         pthread_kill_other_threads_np();
7218 #endif
7219
7220         exit( status );
7221
7222 ; return 0; }
7223 EOF
7224 if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7225   rm -rf conftest*
7226   ol_cv_pthread_create=yes
7227 else
7228   echo "configure: failed program was:" >&5
7229   cat conftest.$ac_ext >&5
7230   rm -rf conftest*
7231   ol_cv_pthread_create=no
7232 fi
7233 rm -f conftest*
7234 else
7235   cat > conftest.$ac_ext <<EOF
7236 #line 7237 "configure"
7237 #include "confdefs.h"
7238 /* pthread test headers */
7239 #include <pthread.h>
7240 #ifndef NULL
7241 #define NULL (void*)0
7242 #endif
7243
7244 static void *task(p)
7245         void *p;
7246 {
7247         return (void *) (p == NULL);
7248 }
7249
7250
7251 int main(argc, argv)
7252         int argc;
7253         char **argv;
7254 {
7255
7256         /* pthread test function */
7257         pthread_t t;
7258         int status;
7259 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7260         /* This system (e.g. AIX) defaults detached; must override */
7261         pthread_attr_t attr;
7262
7263         status = pthread_attr_init(&attr);
7264         if( status ) exit( status );
7265
7266         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7267         if( status ) exit( status );
7268
7269 #define ATTR    &attr
7270 #else
7271 #if HAVE_PTHREADS_D4
7272 #define ATTR    pthread_attr_default
7273 #else
7274 #define ATTR    NULL
7275 #endif
7276 #endif
7277         /* make sure pthread_create() isn't just a stub */
7278         status = pthread_create(&t, ATTR, task, NULL);
7279         if( status ) exit( status );
7280
7281         /* make sure pthread_detach() isn't just a stub */
7282 #if HAVE_PTHREADS_D4
7283         status = pthread_detach( &t );
7284 #else
7285         status = pthread_detach( t );
7286 #endif
7287
7288 #ifdef HAVE_LINUX_THREADS
7289         pthread_kill_other_threads_np();
7290 #endif
7291
7292         exit( status );
7293
7294 }
7295
7296 EOF
7297 if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7298 then
7299   ol_cv_pthread_create=yes
7300 else
7301   echo "configure: failed program was:" >&5
7302   cat conftest.$ac_ext >&5
7303   rm -fr conftest*
7304   ol_cv_pthread_create=no
7305 fi
7306 rm -fr conftest*
7307 fi
7308
7309 fi
7310
7311 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7312
7313                 if test $ol_cv_pthread_create != no ; then
7314                         ol_link_threads=posix
7315                         ol_link_pthreads=""
7316                 fi
7317                 
7318                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7319 if test "$ol_link_threads" = no ; then
7320         # try -kthread
7321         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7322 echo "configure:7323: checking for pthread link with -kthread" >&5
7323 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7324   echo $ac_n "(cached) $ac_c" 1>&6
7325 else
7326   
7327                 # save the flags
7328                 ol_LIBS="$LIBS"
7329                 LIBS="-kthread $LIBS"
7330
7331                 if test "$cross_compiling" = yes; then
7332   cat > conftest.$ac_ext <<EOF
7333 #line 7334 "configure"
7334 #include "confdefs.h"
7335 /* pthread test headers */
7336 #include <pthread.h>
7337 #ifndef NULL
7338 #define NULL (void*)0
7339 #endif
7340
7341 static void *task(p)
7342         void *p;
7343 {
7344         return (void *) (p == NULL);
7345 }
7346
7347 int main() {
7348
7349         /* pthread test function */
7350         pthread_t t;
7351         int status;
7352 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7353         /* This system (e.g. AIX) defaults detached; must override */
7354         pthread_attr_t attr;
7355
7356         status = pthread_attr_init(&attr);
7357         if( status ) exit( status );
7358
7359         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7360         if( status ) exit( status );
7361
7362 #define ATTR    &attr
7363 #else
7364 #if HAVE_PTHREADS_D4
7365 #define ATTR    pthread_attr_default
7366 #else
7367 #define ATTR    NULL
7368 #endif
7369 #endif
7370         /* make sure pthread_create() isn't just a stub */
7371         status = pthread_create(&t, ATTR, task, NULL);
7372         if( status ) exit( status );
7373
7374         /* make sure pthread_detach() isn't just a stub */
7375 #if HAVE_PTHREADS_D4
7376         status = pthread_detach( &t );
7377 #else
7378         status = pthread_detach( t );
7379 #endif
7380
7381 #ifdef HAVE_LINUX_THREADS
7382         pthread_kill_other_threads_np();
7383 #endif
7384
7385         exit( status );
7386
7387 ; return 0; }
7388 EOF
7389 if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7390   rm -rf conftest*
7391   ol_cv_pthread_kthread=yes
7392 else
7393   echo "configure: failed program was:" >&5
7394   cat conftest.$ac_ext >&5
7395   rm -rf conftest*
7396   ol_cv_pthread_kthread=no
7397 fi
7398 rm -f conftest*
7399 else
7400   cat > conftest.$ac_ext <<EOF
7401 #line 7402 "configure"
7402 #include "confdefs.h"
7403 /* pthread test headers */
7404 #include <pthread.h>
7405 #ifndef NULL
7406 #define NULL (void*)0
7407 #endif
7408
7409 static void *task(p)
7410         void *p;
7411 {
7412         return (void *) (p == NULL);
7413 }
7414
7415
7416 int main(argc, argv)
7417         int argc;
7418         char **argv;
7419 {
7420
7421         /* pthread test function */
7422         pthread_t t;
7423         int status;
7424 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7425         /* This system (e.g. AIX) defaults detached; must override */
7426         pthread_attr_t attr;
7427
7428         status = pthread_attr_init(&attr);
7429         if( status ) exit( status );
7430
7431         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7432         if( status ) exit( status );
7433
7434 #define ATTR    &attr
7435 #else
7436 #if HAVE_PTHREADS_D4
7437 #define ATTR    pthread_attr_default
7438 #else
7439 #define ATTR    NULL
7440 #endif
7441 #endif
7442         /* make sure pthread_create() isn't just a stub */
7443         status = pthread_create(&t, ATTR, task, NULL);
7444         if( status ) exit( status );
7445
7446         /* make sure pthread_detach() isn't just a stub */
7447 #if HAVE_PTHREADS_D4
7448         status = pthread_detach( &t );
7449 #else
7450         status = pthread_detach( t );
7451 #endif
7452
7453 #ifdef HAVE_LINUX_THREADS
7454         pthread_kill_other_threads_np();
7455 #endif
7456
7457         exit( status );
7458
7459 }
7460
7461 EOF
7462 if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7463 then
7464   ol_cv_pthread_kthread=yes
7465 else
7466   echo "configure: failed program was:" >&5
7467   cat conftest.$ac_ext >&5
7468   rm -fr conftest*
7469   ol_cv_pthread_kthread=no
7470 fi
7471 rm -fr conftest*
7472 fi
7473
7474
7475                 # restore the LIBS
7476                 LIBS="$ol_LIBS"
7477         
7478 fi
7479
7480 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7481
7482         if test $ol_cv_pthread_kthread = yes ; then
7483                 ol_link_pthreads="-kthread"
7484                 ol_link_threads=posix
7485         fi
7486 fi
7487
7488                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7489 if test "$ol_link_threads" = no ; then
7490         # try -pthread
7491         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7492 echo "configure:7493: checking for pthread link with -pthread" >&5
7493 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7494   echo $ac_n "(cached) $ac_c" 1>&6
7495 else
7496   
7497                 # save the flags
7498                 ol_LIBS="$LIBS"
7499                 LIBS="-pthread $LIBS"
7500
7501                 if test "$cross_compiling" = yes; then
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 /* pthread test headers */
7506 #include <pthread.h>
7507 #ifndef NULL
7508 #define NULL (void*)0
7509 #endif
7510
7511 static void *task(p)
7512         void *p;
7513 {
7514         return (void *) (p == NULL);
7515 }
7516
7517 int main() {
7518
7519         /* pthread test function */
7520         pthread_t t;
7521         int status;
7522 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7523         /* This system (e.g. AIX) defaults detached; must override */
7524         pthread_attr_t attr;
7525
7526         status = pthread_attr_init(&attr);
7527         if( status ) exit( status );
7528
7529         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7530         if( status ) exit( status );
7531
7532 #define ATTR    &attr
7533 #else
7534 #if HAVE_PTHREADS_D4
7535 #define ATTR    pthread_attr_default
7536 #else
7537 #define ATTR    NULL
7538 #endif
7539 #endif
7540         /* make sure pthread_create() isn't just a stub */
7541         status = pthread_create(&t, ATTR, task, NULL);
7542         if( status ) exit( status );
7543
7544         /* make sure pthread_detach() isn't just a stub */
7545 #if HAVE_PTHREADS_D4
7546         status = pthread_detach( &t );
7547 #else
7548         status = pthread_detach( t );
7549 #endif
7550
7551 #ifdef HAVE_LINUX_THREADS
7552         pthread_kill_other_threads_np();
7553 #endif
7554
7555         exit( status );
7556
7557 ; return 0; }
7558 EOF
7559 if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7560   rm -rf conftest*
7561   ol_cv_pthread_pthread=yes
7562 else
7563   echo "configure: failed program was:" >&5
7564   cat conftest.$ac_ext >&5
7565   rm -rf conftest*
7566   ol_cv_pthread_pthread=no
7567 fi
7568 rm -f conftest*
7569 else
7570   cat > conftest.$ac_ext <<EOF
7571 #line 7572 "configure"
7572 #include "confdefs.h"
7573 /* pthread test headers */
7574 #include <pthread.h>
7575 #ifndef NULL
7576 #define NULL (void*)0
7577 #endif
7578
7579 static void *task(p)
7580         void *p;
7581 {
7582         return (void *) (p == NULL);
7583 }
7584
7585
7586 int main(argc, argv)
7587         int argc;
7588         char **argv;
7589 {
7590
7591         /* pthread test function */
7592         pthread_t t;
7593         int status;
7594 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7595         /* This system (e.g. AIX) defaults detached; must override */
7596         pthread_attr_t attr;
7597
7598         status = pthread_attr_init(&attr);
7599         if( status ) exit( status );
7600
7601         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7602         if( status ) exit( status );
7603
7604 #define ATTR    &attr
7605 #else
7606 #if HAVE_PTHREADS_D4
7607 #define ATTR    pthread_attr_default
7608 #else
7609 #define ATTR    NULL
7610 #endif
7611 #endif
7612         /* make sure pthread_create() isn't just a stub */
7613         status = pthread_create(&t, ATTR, task, NULL);
7614         if( status ) exit( status );
7615
7616         /* make sure pthread_detach() isn't just a stub */
7617 #if HAVE_PTHREADS_D4
7618         status = pthread_detach( &t );
7619 #else
7620         status = pthread_detach( t );
7621 #endif
7622
7623 #ifdef HAVE_LINUX_THREADS
7624         pthread_kill_other_threads_np();
7625 #endif
7626
7627         exit( status );
7628
7629 }
7630
7631 EOF
7632 if { (eval echo configure:7633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7633 then
7634   ol_cv_pthread_pthread=yes
7635 else
7636   echo "configure: failed program was:" >&5
7637   cat conftest.$ac_ext >&5
7638   rm -fr conftest*
7639   ol_cv_pthread_pthread=no
7640 fi
7641 rm -fr conftest*
7642 fi
7643
7644
7645                 # restore the LIBS
7646                 LIBS="$ol_LIBS"
7647         
7648 fi
7649
7650 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7651
7652         if test $ol_cv_pthread_pthread = yes ; then
7653                 ol_link_pthreads="-pthread"
7654                 ol_link_threads=posix
7655         fi
7656 fi
7657
7658                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7659 if test "$ol_link_threads" = no ; then
7660         # try -pthreads
7661         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7662 echo "configure:7663: checking for pthread link with -pthreads" >&5
7663 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7664   echo $ac_n "(cached) $ac_c" 1>&6
7665 else
7666   
7667                 # save the flags
7668                 ol_LIBS="$LIBS"
7669                 LIBS="-pthreads $LIBS"
7670
7671                 if test "$cross_compiling" = yes; then
7672   cat > conftest.$ac_ext <<EOF
7673 #line 7674 "configure"
7674 #include "confdefs.h"
7675 /* pthread test headers */
7676 #include <pthread.h>
7677 #ifndef NULL
7678 #define NULL (void*)0
7679 #endif
7680
7681 static void *task(p)
7682         void *p;
7683 {
7684         return (void *) (p == NULL);
7685 }
7686
7687 int main() {
7688
7689         /* pthread test function */
7690         pthread_t t;
7691         int status;
7692 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7693         /* This system (e.g. AIX) defaults detached; must override */
7694         pthread_attr_t attr;
7695
7696         status = pthread_attr_init(&attr);
7697         if( status ) exit( status );
7698
7699         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7700         if( status ) exit( status );
7701
7702 #define ATTR    &attr
7703 #else
7704 #if HAVE_PTHREADS_D4
7705 #define ATTR    pthread_attr_default
7706 #else
7707 #define ATTR    NULL
7708 #endif
7709 #endif
7710         /* make sure pthread_create() isn't just a stub */
7711         status = pthread_create(&t, ATTR, task, NULL);
7712         if( status ) exit( status );
7713
7714         /* make sure pthread_detach() isn't just a stub */
7715 #if HAVE_PTHREADS_D4
7716         status = pthread_detach( &t );
7717 #else
7718         status = pthread_detach( t );
7719 #endif
7720
7721 #ifdef HAVE_LINUX_THREADS
7722         pthread_kill_other_threads_np();
7723 #endif
7724
7725         exit( status );
7726
7727 ; return 0; }
7728 EOF
7729 if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7730   rm -rf conftest*
7731   ol_cv_pthread_pthreads=yes
7732 else
7733   echo "configure: failed program was:" >&5
7734   cat conftest.$ac_ext >&5
7735   rm -rf conftest*
7736   ol_cv_pthread_pthreads=no
7737 fi
7738 rm -f conftest*
7739 else
7740   cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 /* pthread test headers */
7744 #include <pthread.h>
7745 #ifndef NULL
7746 #define NULL (void*)0
7747 #endif
7748
7749 static void *task(p)
7750         void *p;
7751 {
7752         return (void *) (p == NULL);
7753 }
7754
7755
7756 int main(argc, argv)
7757         int argc;
7758         char **argv;
7759 {
7760
7761         /* pthread test function */
7762         pthread_t t;
7763         int status;
7764 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7765         /* This system (e.g. AIX) defaults detached; must override */
7766         pthread_attr_t attr;
7767
7768         status = pthread_attr_init(&attr);
7769         if( status ) exit( status );
7770
7771         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7772         if( status ) exit( status );
7773
7774 #define ATTR    &attr
7775 #else
7776 #if HAVE_PTHREADS_D4
7777 #define ATTR    pthread_attr_default
7778 #else
7779 #define ATTR    NULL
7780 #endif
7781 #endif
7782         /* make sure pthread_create() isn't just a stub */
7783         status = pthread_create(&t, ATTR, task, NULL);
7784         if( status ) exit( status );
7785
7786         /* make sure pthread_detach() isn't just a stub */
7787 #if HAVE_PTHREADS_D4
7788         status = pthread_detach( &t );
7789 #else
7790         status = pthread_detach( t );
7791 #endif
7792
7793 #ifdef HAVE_LINUX_THREADS
7794         pthread_kill_other_threads_np();
7795 #endif
7796
7797         exit( status );
7798
7799 }
7800
7801 EOF
7802 if { (eval echo configure:7803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7803 then
7804   ol_cv_pthread_pthreads=yes
7805 else
7806   echo "configure: failed program was:" >&5
7807   cat conftest.$ac_ext >&5
7808   rm -fr conftest*
7809   ol_cv_pthread_pthreads=no
7810 fi
7811 rm -fr conftest*
7812 fi
7813
7814
7815                 # restore the LIBS
7816                 LIBS="$ol_LIBS"
7817         
7818 fi
7819
7820 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7821
7822         if test $ol_cv_pthread_pthreads = yes ; then
7823                 ol_link_pthreads="-pthreads"
7824                 ol_link_threads=posix
7825         fi
7826 fi
7827
7828                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7829 if test "$ol_link_threads" = no ; then
7830         # try -mthreads
7831         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7832 echo "configure:7833: checking for pthread link with -mthreads" >&5
7833 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7834   echo $ac_n "(cached) $ac_c" 1>&6
7835 else
7836   
7837                 # save the flags
7838                 ol_LIBS="$LIBS"
7839                 LIBS="-mthreads $LIBS"
7840
7841                 if test "$cross_compiling" = yes; then
7842   cat > conftest.$ac_ext <<EOF
7843 #line 7844 "configure"
7844 #include "confdefs.h"
7845 /* pthread test headers */
7846 #include <pthread.h>
7847 #ifndef NULL
7848 #define NULL (void*)0
7849 #endif
7850
7851 static void *task(p)
7852         void *p;
7853 {
7854         return (void *) (p == NULL);
7855 }
7856
7857 int main() {
7858
7859         /* pthread test function */
7860         pthread_t t;
7861         int status;
7862 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7863         /* This system (e.g. AIX) defaults detached; must override */
7864         pthread_attr_t attr;
7865
7866         status = pthread_attr_init(&attr);
7867         if( status ) exit( status );
7868
7869         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7870         if( status ) exit( status );
7871
7872 #define ATTR    &attr
7873 #else
7874 #if HAVE_PTHREADS_D4
7875 #define ATTR    pthread_attr_default
7876 #else
7877 #define ATTR    NULL
7878 #endif
7879 #endif
7880         /* make sure pthread_create() isn't just a stub */
7881         status = pthread_create(&t, ATTR, task, NULL);
7882         if( status ) exit( status );
7883
7884         /* make sure pthread_detach() isn't just a stub */
7885 #if HAVE_PTHREADS_D4
7886         status = pthread_detach( &t );
7887 #else
7888         status = pthread_detach( t );
7889 #endif
7890
7891 #ifdef HAVE_LINUX_THREADS
7892         pthread_kill_other_threads_np();
7893 #endif
7894
7895         exit( status );
7896
7897 ; return 0; }
7898 EOF
7899 if { (eval echo configure:7900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7900   rm -rf conftest*
7901   ol_cv_pthread_mthreads=yes
7902 else
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -rf conftest*
7906   ol_cv_pthread_mthreads=no
7907 fi
7908 rm -f conftest*
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 /* pthread test headers */
7914 #include <pthread.h>
7915 #ifndef NULL
7916 #define NULL (void*)0
7917 #endif
7918
7919 static void *task(p)
7920         void *p;
7921 {
7922         return (void *) (p == NULL);
7923 }
7924
7925
7926 int main(argc, argv)
7927         int argc;
7928         char **argv;
7929 {
7930
7931         /* pthread test function */
7932         pthread_t t;
7933         int status;
7934 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7935         /* This system (e.g. AIX) defaults detached; must override */
7936         pthread_attr_t attr;
7937
7938         status = pthread_attr_init(&attr);
7939         if( status ) exit( status );
7940
7941         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7942         if( status ) exit( status );
7943
7944 #define ATTR    &attr
7945 #else
7946 #if HAVE_PTHREADS_D4
7947 #define ATTR    pthread_attr_default
7948 #else
7949 #define ATTR    NULL
7950 #endif
7951 #endif
7952         /* make sure pthread_create() isn't just a stub */
7953         status = pthread_create(&t, ATTR, task, NULL);
7954         if( status ) exit( status );
7955
7956         /* make sure pthread_detach() isn't just a stub */
7957 #if HAVE_PTHREADS_D4
7958         status = pthread_detach( &t );
7959 #else
7960         status = pthread_detach( t );
7961 #endif
7962
7963 #ifdef HAVE_LINUX_THREADS
7964         pthread_kill_other_threads_np();
7965 #endif
7966
7967         exit( status );
7968
7969 }
7970
7971 EOF
7972 if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7973 then
7974   ol_cv_pthread_mthreads=yes
7975 else
7976   echo "configure: failed program was:" >&5
7977   cat conftest.$ac_ext >&5
7978   rm -fr conftest*
7979   ol_cv_pthread_mthreads=no
7980 fi
7981 rm -fr conftest*
7982 fi
7983
7984
7985                 # restore the LIBS
7986                 LIBS="$ol_LIBS"
7987         
7988 fi
7989
7990 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7991
7992         if test $ol_cv_pthread_mthreads = yes ; then
7993                 ol_link_pthreads="-mthreads"
7994                 ol_link_threads=posix
7995         fi
7996 fi
7997
7998                 # Pthread try link: -thread (ol_cv_pthread_thread)
7999 if test "$ol_link_threads" = no ; then
8000         # try -thread
8001         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8002 echo "configure:8003: checking for pthread link with -thread" >&5
8003 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8004   echo $ac_n "(cached) $ac_c" 1>&6
8005 else
8006   
8007                 # save the flags
8008                 ol_LIBS="$LIBS"
8009                 LIBS="-thread $LIBS"
8010
8011                 if test "$cross_compiling" = yes; then
8012   cat > conftest.$ac_ext <<EOF
8013 #line 8014 "configure"
8014 #include "confdefs.h"
8015 /* pthread test headers */
8016 #include <pthread.h>
8017 #ifndef NULL
8018 #define NULL (void*)0
8019 #endif
8020
8021 static void *task(p)
8022         void *p;
8023 {
8024         return (void *) (p == NULL);
8025 }
8026
8027 int main() {
8028
8029         /* pthread test function */
8030         pthread_t t;
8031         int status;
8032 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8033         /* This system (e.g. AIX) defaults detached; must override */
8034         pthread_attr_t attr;
8035
8036         status = pthread_attr_init(&attr);
8037         if( status ) exit( status );
8038
8039         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8040         if( status ) exit( status );
8041
8042 #define ATTR    &attr
8043 #else
8044 #if HAVE_PTHREADS_D4
8045 #define ATTR    pthread_attr_default
8046 #else
8047 #define ATTR    NULL
8048 #endif
8049 #endif
8050         /* make sure pthread_create() isn't just a stub */
8051         status = pthread_create(&t, ATTR, task, NULL);
8052         if( status ) exit( status );
8053
8054         /* make sure pthread_detach() isn't just a stub */
8055 #if HAVE_PTHREADS_D4
8056         status = pthread_detach( &t );
8057 #else
8058         status = pthread_detach( t );
8059 #endif
8060
8061 #ifdef HAVE_LINUX_THREADS
8062         pthread_kill_other_threads_np();
8063 #endif
8064
8065         exit( status );
8066
8067 ; return 0; }
8068 EOF
8069 if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8070   rm -rf conftest*
8071   ol_cv_pthread_thread=yes
8072 else
8073   echo "configure: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   rm -rf conftest*
8076   ol_cv_pthread_thread=no
8077 fi
8078 rm -f conftest*
8079 else
8080   cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 /* pthread test headers */
8084 #include <pthread.h>
8085 #ifndef NULL
8086 #define NULL (void*)0
8087 #endif
8088
8089 static void *task(p)
8090         void *p;
8091 {
8092         return (void *) (p == NULL);
8093 }
8094
8095
8096 int main(argc, argv)
8097         int argc;
8098         char **argv;
8099 {
8100
8101         /* pthread test function */
8102         pthread_t t;
8103         int status;
8104 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8105         /* This system (e.g. AIX) defaults detached; must override */
8106         pthread_attr_t attr;
8107
8108         status = pthread_attr_init(&attr);
8109         if( status ) exit( status );
8110
8111         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8112         if( status ) exit( status );
8113
8114 #define ATTR    &attr
8115 #else
8116 #if HAVE_PTHREADS_D4
8117 #define ATTR    pthread_attr_default
8118 #else
8119 #define ATTR    NULL
8120 #endif
8121 #endif
8122         /* make sure pthread_create() isn't just a stub */
8123         status = pthread_create(&t, ATTR, task, NULL);
8124         if( status ) exit( status );
8125
8126         /* make sure pthread_detach() isn't just a stub */
8127 #if HAVE_PTHREADS_D4
8128         status = pthread_detach( &t );
8129 #else
8130         status = pthread_detach( t );
8131 #endif
8132
8133 #ifdef HAVE_LINUX_THREADS
8134         pthread_kill_other_threads_np();
8135 #endif
8136
8137         exit( status );
8138
8139 }
8140
8141 EOF
8142 if { (eval echo configure:8143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8143 then
8144   ol_cv_pthread_thread=yes
8145 else
8146   echo "configure: failed program was:" >&5
8147   cat conftest.$ac_ext >&5
8148   rm -fr conftest*
8149   ol_cv_pthread_thread=no
8150 fi
8151 rm -fr conftest*
8152 fi
8153
8154
8155                 # restore the LIBS
8156                 LIBS="$ol_LIBS"
8157         
8158 fi
8159
8160 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8161
8162         if test $ol_cv_pthread_thread = yes ; then
8163                 ol_link_pthreads="-thread"
8164                 ol_link_threads=posix
8165         fi
8166 fi
8167
8168
8169                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8170 if test "$ol_link_threads" = no ; then
8171         # try -lpthread -lmach -lexc -lc_r
8172         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8173 echo "configure:8174: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8174 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   
8178                 # save the flags
8179                 ol_LIBS="$LIBS"
8180                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8181
8182                 if test "$cross_compiling" = yes; then
8183   cat > conftest.$ac_ext <<EOF
8184 #line 8185 "configure"
8185 #include "confdefs.h"
8186 /* pthread test headers */
8187 #include <pthread.h>
8188 #ifndef NULL
8189 #define NULL (void*)0
8190 #endif
8191
8192 static void *task(p)
8193         void *p;
8194 {
8195         return (void *) (p == NULL);
8196 }
8197
8198 int main() {
8199
8200         /* pthread test function */
8201         pthread_t t;
8202         int status;
8203 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8204         /* This system (e.g. AIX) defaults detached; must override */
8205         pthread_attr_t attr;
8206
8207         status = pthread_attr_init(&attr);
8208         if( status ) exit( status );
8209
8210         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8211         if( status ) exit( status );
8212
8213 #define ATTR    &attr
8214 #else
8215 #if HAVE_PTHREADS_D4
8216 #define ATTR    pthread_attr_default
8217 #else
8218 #define ATTR    NULL
8219 #endif
8220 #endif
8221         /* make sure pthread_create() isn't just a stub */
8222         status = pthread_create(&t, ATTR, task, NULL);
8223         if( status ) exit( status );
8224
8225         /* make sure pthread_detach() isn't just a stub */
8226 #if HAVE_PTHREADS_D4
8227         status = pthread_detach( &t );
8228 #else
8229         status = pthread_detach( t );
8230 #endif
8231
8232 #ifdef HAVE_LINUX_THREADS
8233         pthread_kill_other_threads_np();
8234 #endif
8235
8236         exit( status );
8237
8238 ; return 0; }
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8241   rm -rf conftest*
8242   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -rf conftest*
8247   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8248 fi
8249 rm -f conftest*
8250 else
8251   cat > conftest.$ac_ext <<EOF
8252 #line 8253 "configure"
8253 #include "confdefs.h"
8254 /* pthread test headers */
8255 #include <pthread.h>
8256 #ifndef NULL
8257 #define NULL (void*)0
8258 #endif
8259
8260 static void *task(p)
8261         void *p;
8262 {
8263         return (void *) (p == NULL);
8264 }
8265
8266
8267 int main(argc, argv)
8268         int argc;
8269         char **argv;
8270 {
8271
8272         /* pthread test function */
8273         pthread_t t;
8274         int status;
8275 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8276         /* This system (e.g. AIX) defaults detached; must override */
8277         pthread_attr_t attr;
8278
8279         status = pthread_attr_init(&attr);
8280         if( status ) exit( status );
8281
8282         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8283         if( status ) exit( status );
8284
8285 #define ATTR    &attr
8286 #else
8287 #if HAVE_PTHREADS_D4
8288 #define ATTR    pthread_attr_default
8289 #else
8290 #define ATTR    NULL
8291 #endif
8292 #endif
8293         /* make sure pthread_create() isn't just a stub */
8294         status = pthread_create(&t, ATTR, task, NULL);
8295         if( status ) exit( status );
8296
8297         /* make sure pthread_detach() isn't just a stub */
8298 #if HAVE_PTHREADS_D4
8299         status = pthread_detach( &t );
8300 #else
8301         status = pthread_detach( t );
8302 #endif
8303
8304 #ifdef HAVE_LINUX_THREADS
8305         pthread_kill_other_threads_np();
8306 #endif
8307
8308         exit( status );
8309
8310 }
8311
8312 EOF
8313 if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8314 then
8315   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8316 else
8317   echo "configure: failed program was:" >&5
8318   cat conftest.$ac_ext >&5
8319   rm -fr conftest*
8320   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8321 fi
8322 rm -fr conftest*
8323 fi
8324
8325
8326                 # restore the LIBS
8327                 LIBS="$ol_LIBS"
8328         
8329 fi
8330
8331 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8332
8333         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8334                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8335                 ol_link_threads=posix
8336         fi
8337 fi
8338
8339                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8340 if test "$ol_link_threads" = no ; then
8341         # try -lpthread -lmach -lexc
8342         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8343 echo "configure:8344: checking for pthread link with -lpthread -lmach -lexc" >&5
8344 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   
8348                 # save the flags
8349                 ol_LIBS="$LIBS"
8350                 LIBS="-lpthread -lmach -lexc $LIBS"
8351
8352                 if test "$cross_compiling" = yes; then
8353   cat > conftest.$ac_ext <<EOF
8354 #line 8355 "configure"
8355 #include "confdefs.h"
8356 /* pthread test headers */
8357 #include <pthread.h>
8358 #ifndef NULL
8359 #define NULL (void*)0
8360 #endif
8361
8362 static void *task(p)
8363         void *p;
8364 {
8365         return (void *) (p == NULL);
8366 }
8367
8368 int main() {
8369
8370         /* pthread test function */
8371         pthread_t t;
8372         int status;
8373 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8374         /* This system (e.g. AIX) defaults detached; must override */
8375         pthread_attr_t attr;
8376
8377         status = pthread_attr_init(&attr);
8378         if( status ) exit( status );
8379
8380         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8381         if( status ) exit( status );
8382
8383 #define ATTR    &attr
8384 #else
8385 #if HAVE_PTHREADS_D4
8386 #define ATTR    pthread_attr_default
8387 #else
8388 #define ATTR    NULL
8389 #endif
8390 #endif
8391         /* make sure pthread_create() isn't just a stub */
8392         status = pthread_create(&t, ATTR, task, NULL);
8393         if( status ) exit( status );
8394
8395         /* make sure pthread_detach() isn't just a stub */
8396 #if HAVE_PTHREADS_D4
8397         status = pthread_detach( &t );
8398 #else
8399         status = pthread_detach( t );
8400 #endif
8401
8402 #ifdef HAVE_LINUX_THREADS
8403         pthread_kill_other_threads_np();
8404 #endif
8405
8406         exit( status );
8407
8408 ; return 0; }
8409 EOF
8410 if { (eval echo configure:8411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8411   rm -rf conftest*
8412   ol_cv_pthread_lpthread_lmach_lexc=yes
8413 else
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -rf conftest*
8417   ol_cv_pthread_lpthread_lmach_lexc=no
8418 fi
8419 rm -f conftest*
8420 else
8421   cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* pthread test headers */
8425 #include <pthread.h>
8426 #ifndef NULL
8427 #define NULL (void*)0
8428 #endif
8429
8430 static void *task(p)
8431         void *p;
8432 {
8433         return (void *) (p == NULL);
8434 }
8435
8436
8437 int main(argc, argv)
8438         int argc;
8439         char **argv;
8440 {
8441
8442         /* pthread test function */
8443         pthread_t t;
8444         int status;
8445 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8446         /* This system (e.g. AIX) defaults detached; must override */
8447         pthread_attr_t attr;
8448
8449         status = pthread_attr_init(&attr);
8450         if( status ) exit( status );
8451
8452         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8453         if( status ) exit( status );
8454
8455 #define ATTR    &attr
8456 #else
8457 #if HAVE_PTHREADS_D4
8458 #define ATTR    pthread_attr_default
8459 #else
8460 #define ATTR    NULL
8461 #endif
8462 #endif
8463         /* make sure pthread_create() isn't just a stub */
8464         status = pthread_create(&t, ATTR, task, NULL);
8465         if( status ) exit( status );
8466
8467         /* make sure pthread_detach() isn't just a stub */
8468 #if HAVE_PTHREADS_D4
8469         status = pthread_detach( &t );
8470 #else
8471         status = pthread_detach( t );
8472 #endif
8473
8474 #ifdef HAVE_LINUX_THREADS
8475         pthread_kill_other_threads_np();
8476 #endif
8477
8478         exit( status );
8479
8480 }
8481
8482 EOF
8483 if { (eval echo configure:8484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8484 then
8485   ol_cv_pthread_lpthread_lmach_lexc=yes
8486 else
8487   echo "configure: failed program was:" >&5
8488   cat conftest.$ac_ext >&5
8489   rm -fr conftest*
8490   ol_cv_pthread_lpthread_lmach_lexc=no
8491 fi
8492 rm -fr conftest*
8493 fi
8494
8495
8496                 # restore the LIBS
8497                 LIBS="$ol_LIBS"
8498         
8499 fi
8500
8501 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8502
8503         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8504                 ol_link_pthreads="-lpthread -lmach -lexc"
8505                 ol_link_threads=posix
8506         fi
8507 fi
8508
8509
8510                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8511 if test "$ol_link_threads" = no ; then
8512         # try -lpthread -Wl,-woff,85
8513         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8514 echo "configure:8515: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8515 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8516   echo $ac_n "(cached) $ac_c" 1>&6
8517 else
8518   
8519                 # save the flags
8520                 ol_LIBS="$LIBS"
8521                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8522
8523                 if test "$cross_compiling" = yes; then
8524   cat > conftest.$ac_ext <<EOF
8525 #line 8526 "configure"
8526 #include "confdefs.h"
8527 /* pthread test headers */
8528 #include <pthread.h>
8529 #ifndef NULL
8530 #define NULL (void*)0
8531 #endif
8532
8533 static void *task(p)
8534         void *p;
8535 {
8536         return (void *) (p == NULL);
8537 }
8538
8539 int main() {
8540
8541         /* pthread test function */
8542         pthread_t t;
8543         int status;
8544 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8545         /* This system (e.g. AIX) defaults detached; must override */
8546         pthread_attr_t attr;
8547
8548         status = pthread_attr_init(&attr);
8549         if( status ) exit( status );
8550
8551         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8552         if( status ) exit( status );
8553
8554 #define ATTR    &attr
8555 #else
8556 #if HAVE_PTHREADS_D4
8557 #define ATTR    pthread_attr_default
8558 #else
8559 #define ATTR    NULL
8560 #endif
8561 #endif
8562         /* make sure pthread_create() isn't just a stub */
8563         status = pthread_create(&t, ATTR, task, NULL);
8564         if( status ) exit( status );
8565
8566         /* make sure pthread_detach() isn't just a stub */
8567 #if HAVE_PTHREADS_D4
8568         status = pthread_detach( &t );
8569 #else
8570         status = pthread_detach( t );
8571 #endif
8572
8573 #ifdef HAVE_LINUX_THREADS
8574         pthread_kill_other_threads_np();
8575 #endif
8576
8577         exit( status );
8578
8579 ; return 0; }
8580 EOF
8581 if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8582   rm -rf conftest*
8583   ol_cv_pthread_lib_lpthread_woff=yes
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -rf conftest*
8588   ol_cv_pthread_lib_lpthread_woff=no
8589 fi
8590 rm -f conftest*
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 /* pthread test headers */
8596 #include <pthread.h>
8597 #ifndef NULL
8598 #define NULL (void*)0
8599 #endif
8600
8601 static void *task(p)
8602         void *p;
8603 {
8604         return (void *) (p == NULL);
8605 }
8606
8607
8608 int main(argc, argv)
8609         int argc;
8610         char **argv;
8611 {
8612
8613         /* pthread test function */
8614         pthread_t t;
8615         int status;
8616 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8617         /* This system (e.g. AIX) defaults detached; must override */
8618         pthread_attr_t attr;
8619
8620         status = pthread_attr_init(&attr);
8621         if( status ) exit( status );
8622
8623         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8624         if( status ) exit( status );
8625
8626 #define ATTR    &attr
8627 #else
8628 #if HAVE_PTHREADS_D4
8629 #define ATTR    pthread_attr_default
8630 #else
8631 #define ATTR    NULL
8632 #endif
8633 #endif
8634         /* make sure pthread_create() isn't just a stub */
8635         status = pthread_create(&t, ATTR, task, NULL);
8636         if( status ) exit( status );
8637
8638         /* make sure pthread_detach() isn't just a stub */
8639 #if HAVE_PTHREADS_D4
8640         status = pthread_detach( &t );
8641 #else
8642         status = pthread_detach( t );
8643 #endif
8644
8645 #ifdef HAVE_LINUX_THREADS
8646         pthread_kill_other_threads_np();
8647 #endif
8648
8649         exit( status );
8650
8651 }
8652
8653 EOF
8654 if { (eval echo configure:8655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8655 then
8656   ol_cv_pthread_lib_lpthread_woff=yes
8657 else
8658   echo "configure: failed program was:" >&5
8659   cat conftest.$ac_ext >&5
8660   rm -fr conftest*
8661   ol_cv_pthread_lib_lpthread_woff=no
8662 fi
8663 rm -fr conftest*
8664 fi
8665
8666
8667                 # restore the LIBS
8668                 LIBS="$ol_LIBS"
8669         
8670 fi
8671
8672 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8673
8674         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8675                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8676                 ol_link_threads=posix
8677         fi
8678 fi
8679
8680
8681                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8682 if test "$ol_link_threads" = no ; then
8683         # try -lpthread
8684         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8685 echo "configure:8686: checking for pthread link with -lpthread" >&5
8686 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8687   echo $ac_n "(cached) $ac_c" 1>&6
8688 else
8689   
8690                 # save the flags
8691                 ol_LIBS="$LIBS"
8692                 LIBS="-lpthread $LIBS"
8693
8694                 if test "$cross_compiling" = yes; then
8695   cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 /* pthread test headers */
8699 #include <pthread.h>
8700 #ifndef NULL
8701 #define NULL (void*)0
8702 #endif
8703
8704 static void *task(p)
8705         void *p;
8706 {
8707         return (void *) (p == NULL);
8708 }
8709
8710 int main() {
8711
8712         /* pthread test function */
8713         pthread_t t;
8714         int status;
8715 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8716         /* This system (e.g. AIX) defaults detached; must override */
8717         pthread_attr_t attr;
8718
8719         status = pthread_attr_init(&attr);
8720         if( status ) exit( status );
8721
8722         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8723         if( status ) exit( status );
8724
8725 #define ATTR    &attr
8726 #else
8727 #if HAVE_PTHREADS_D4
8728 #define ATTR    pthread_attr_default
8729 #else
8730 #define ATTR    NULL
8731 #endif
8732 #endif
8733         /* make sure pthread_create() isn't just a stub */
8734         status = pthread_create(&t, ATTR, task, NULL);
8735         if( status ) exit( status );
8736
8737         /* make sure pthread_detach() isn't just a stub */
8738 #if HAVE_PTHREADS_D4
8739         status = pthread_detach( &t );
8740 #else
8741         status = pthread_detach( t );
8742 #endif
8743
8744 #ifdef HAVE_LINUX_THREADS
8745         pthread_kill_other_threads_np();
8746 #endif
8747
8748         exit( status );
8749
8750 ; return 0; }
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8753   rm -rf conftest*
8754   ol_cv_pthread_lpthread=yes
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -rf conftest*
8759   ol_cv_pthread_lpthread=no
8760 fi
8761 rm -f conftest*
8762 else
8763   cat > conftest.$ac_ext <<EOF
8764 #line 8765 "configure"
8765 #include "confdefs.h"
8766 /* pthread test headers */
8767 #include <pthread.h>
8768 #ifndef NULL
8769 #define NULL (void*)0
8770 #endif
8771
8772 static void *task(p)
8773         void *p;
8774 {
8775         return (void *) (p == NULL);
8776 }
8777
8778
8779 int main(argc, argv)
8780         int argc;
8781         char **argv;
8782 {
8783
8784         /* pthread test function */
8785         pthread_t t;
8786         int status;
8787 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8788         /* This system (e.g. AIX) defaults detached; must override */
8789         pthread_attr_t attr;
8790
8791         status = pthread_attr_init(&attr);
8792         if( status ) exit( status );
8793
8794         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8795         if( status ) exit( status );
8796
8797 #define ATTR    &attr
8798 #else
8799 #if HAVE_PTHREADS_D4
8800 #define ATTR    pthread_attr_default
8801 #else
8802 #define ATTR    NULL
8803 #endif
8804 #endif
8805         /* make sure pthread_create() isn't just a stub */
8806         status = pthread_create(&t, ATTR, task, NULL);
8807         if( status ) exit( status );
8808
8809         /* make sure pthread_detach() isn't just a stub */
8810 #if HAVE_PTHREADS_D4
8811         status = pthread_detach( &t );
8812 #else
8813         status = pthread_detach( t );
8814 #endif
8815
8816 #ifdef HAVE_LINUX_THREADS
8817         pthread_kill_other_threads_np();
8818 #endif
8819
8820         exit( status );
8821
8822 }
8823
8824 EOF
8825 if { (eval echo configure:8826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8826 then
8827   ol_cv_pthread_lpthread=yes
8828 else
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -fr conftest*
8832   ol_cv_pthread_lpthread=no
8833 fi
8834 rm -fr conftest*
8835 fi
8836
8837
8838                 # restore the LIBS
8839                 LIBS="$ol_LIBS"
8840         
8841 fi
8842
8843 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8844
8845         if test $ol_cv_pthread_lpthread = yes ; then
8846                 ol_link_pthreads="-lpthread"
8847                 ol_link_threads=posix
8848         fi
8849 fi
8850
8851                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8852 if test "$ol_link_threads" = no ; then
8853         # try -lc_r
8854         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8855 echo "configure:8856: checking for pthread link with -lc_r" >&5
8856 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8857   echo $ac_n "(cached) $ac_c" 1>&6
8858 else
8859   
8860                 # save the flags
8861                 ol_LIBS="$LIBS"
8862                 LIBS="-lc_r $LIBS"
8863
8864                 if test "$cross_compiling" = yes; then
8865   cat > conftest.$ac_ext <<EOF
8866 #line 8867 "configure"
8867 #include "confdefs.h"
8868 /* pthread test headers */
8869 #include <pthread.h>
8870 #ifndef NULL
8871 #define NULL (void*)0
8872 #endif
8873
8874 static void *task(p)
8875         void *p;
8876 {
8877         return (void *) (p == NULL);
8878 }
8879
8880 int main() {
8881
8882         /* pthread test function */
8883         pthread_t t;
8884         int status;
8885 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8886         /* This system (e.g. AIX) defaults detached; must override */
8887         pthread_attr_t attr;
8888
8889         status = pthread_attr_init(&attr);
8890         if( status ) exit( status );
8891
8892         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8893         if( status ) exit( status );
8894
8895 #define ATTR    &attr
8896 #else
8897 #if HAVE_PTHREADS_D4
8898 #define ATTR    pthread_attr_default
8899 #else
8900 #define ATTR    NULL
8901 #endif
8902 #endif
8903         /* make sure pthread_create() isn't just a stub */
8904         status = pthread_create(&t, ATTR, task, NULL);
8905         if( status ) exit( status );
8906
8907         /* make sure pthread_detach() isn't just a stub */
8908 #if HAVE_PTHREADS_D4
8909         status = pthread_detach( &t );
8910 #else
8911         status = pthread_detach( t );
8912 #endif
8913
8914 #ifdef HAVE_LINUX_THREADS
8915         pthread_kill_other_threads_np();
8916 #endif
8917
8918         exit( status );
8919
8920 ; return 0; }
8921 EOF
8922 if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8923   rm -rf conftest*
8924   ol_cv_pthread_lc_r=yes
8925 else
8926   echo "configure: failed program was:" >&5
8927   cat conftest.$ac_ext >&5
8928   rm -rf conftest*
8929   ol_cv_pthread_lc_r=no
8930 fi
8931 rm -f conftest*
8932 else
8933   cat > conftest.$ac_ext <<EOF
8934 #line 8935 "configure"
8935 #include "confdefs.h"
8936 /* pthread test headers */
8937 #include <pthread.h>
8938 #ifndef NULL
8939 #define NULL (void*)0
8940 #endif
8941
8942 static void *task(p)
8943         void *p;
8944 {
8945         return (void *) (p == NULL);
8946 }
8947
8948
8949 int main(argc, argv)
8950         int argc;
8951         char **argv;
8952 {
8953
8954         /* pthread test function */
8955         pthread_t t;
8956         int status;
8957 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8958         /* This system (e.g. AIX) defaults detached; must override */
8959         pthread_attr_t attr;
8960
8961         status = pthread_attr_init(&attr);
8962         if( status ) exit( status );
8963
8964         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8965         if( status ) exit( status );
8966
8967 #define ATTR    &attr
8968 #else
8969 #if HAVE_PTHREADS_D4
8970 #define ATTR    pthread_attr_default
8971 #else
8972 #define ATTR    NULL
8973 #endif
8974 #endif
8975         /* make sure pthread_create() isn't just a stub */
8976         status = pthread_create(&t, ATTR, task, NULL);
8977         if( status ) exit( status );
8978
8979         /* make sure pthread_detach() isn't just a stub */
8980 #if HAVE_PTHREADS_D4
8981         status = pthread_detach( &t );
8982 #else
8983         status = pthread_detach( t );
8984 #endif
8985
8986 #ifdef HAVE_LINUX_THREADS
8987         pthread_kill_other_threads_np();
8988 #endif
8989
8990         exit( status );
8991
8992 }
8993
8994 EOF
8995 if { (eval echo configure:8996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8996 then
8997   ol_cv_pthread_lc_r=yes
8998 else
8999   echo "configure: failed program was:" >&5
9000   cat conftest.$ac_ext >&5
9001   rm -fr conftest*
9002   ol_cv_pthread_lc_r=no
9003 fi
9004 rm -fr conftest*
9005 fi
9006
9007
9008                 # restore the LIBS
9009                 LIBS="$ol_LIBS"
9010         
9011 fi
9012
9013 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9014
9015         if test $ol_cv_pthread_lc_r = yes ; then
9016                 ol_link_pthreads="-lc_r"
9017                 ol_link_threads=posix
9018         fi
9019 fi
9020
9021
9022                 # Pthread try link: -threads (ol_cv_pthread_threads)
9023 if test "$ol_link_threads" = no ; then
9024         # try -threads
9025         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9026 echo "configure:9027: checking for pthread link with -threads" >&5
9027 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9028   echo $ac_n "(cached) $ac_c" 1>&6
9029 else
9030   
9031                 # save the flags
9032                 ol_LIBS="$LIBS"
9033                 LIBS="-threads $LIBS"
9034
9035                 if test "$cross_compiling" = yes; then
9036   cat > conftest.$ac_ext <<EOF
9037 #line 9038 "configure"
9038 #include "confdefs.h"
9039 /* pthread test headers */
9040 #include <pthread.h>
9041 #ifndef NULL
9042 #define NULL (void*)0
9043 #endif
9044
9045 static void *task(p)
9046         void *p;
9047 {
9048         return (void *) (p == NULL);
9049 }
9050
9051 int main() {
9052
9053         /* pthread test function */
9054         pthread_t t;
9055         int status;
9056 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9057         /* This system (e.g. AIX) defaults detached; must override */
9058         pthread_attr_t attr;
9059
9060         status = pthread_attr_init(&attr);
9061         if( status ) exit( status );
9062
9063         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9064         if( status ) exit( status );
9065
9066 #define ATTR    &attr
9067 #else
9068 #if HAVE_PTHREADS_D4
9069 #define ATTR    pthread_attr_default
9070 #else
9071 #define ATTR    NULL
9072 #endif
9073 #endif
9074         /* make sure pthread_create() isn't just a stub */
9075         status = pthread_create(&t, ATTR, task, NULL);
9076         if( status ) exit( status );
9077
9078         /* make sure pthread_detach() isn't just a stub */
9079 #if HAVE_PTHREADS_D4
9080         status = pthread_detach( &t );
9081 #else
9082         status = pthread_detach( t );
9083 #endif
9084
9085 #ifdef HAVE_LINUX_THREADS
9086         pthread_kill_other_threads_np();
9087 #endif
9088
9089         exit( status );
9090
9091 ; return 0; }
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9094   rm -rf conftest*
9095   ol_cv_pthread_threads=yes
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -rf conftest*
9100   ol_cv_pthread_threads=no
9101 fi
9102 rm -f conftest*
9103 else
9104   cat > conftest.$ac_ext <<EOF
9105 #line 9106 "configure"
9106 #include "confdefs.h"
9107 /* pthread test headers */
9108 #include <pthread.h>
9109 #ifndef NULL
9110 #define NULL (void*)0
9111 #endif
9112
9113 static void *task(p)
9114         void *p;
9115 {
9116         return (void *) (p == NULL);
9117 }
9118
9119
9120 int main(argc, argv)
9121         int argc;
9122         char **argv;
9123 {
9124
9125         /* pthread test function */
9126         pthread_t t;
9127         int status;
9128 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9129         /* This system (e.g. AIX) defaults detached; must override */
9130         pthread_attr_t attr;
9131
9132         status = pthread_attr_init(&attr);
9133         if( status ) exit( status );
9134
9135         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9136         if( status ) exit( status );
9137
9138 #define ATTR    &attr
9139 #else
9140 #if HAVE_PTHREADS_D4
9141 #define ATTR    pthread_attr_default
9142 #else
9143 #define ATTR    NULL
9144 #endif
9145 #endif
9146         /* make sure pthread_create() isn't just a stub */
9147         status = pthread_create(&t, ATTR, task, NULL);
9148         if( status ) exit( status );
9149
9150         /* make sure pthread_detach() isn't just a stub */
9151 #if HAVE_PTHREADS_D4
9152         status = pthread_detach( &t );
9153 #else
9154         status = pthread_detach( t );
9155 #endif
9156
9157 #ifdef HAVE_LINUX_THREADS
9158         pthread_kill_other_threads_np();
9159 #endif
9160
9161         exit( status );
9162
9163 }
9164
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9167 then
9168   ol_cv_pthread_threads=yes
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -fr conftest*
9173   ol_cv_pthread_threads=no
9174 fi
9175 rm -fr conftest*
9176 fi
9177
9178
9179                 # restore the LIBS
9180                 LIBS="$ol_LIBS"
9181         
9182 fi
9183
9184 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9185
9186         if test $ol_cv_pthread_threads = yes ; then
9187                 ol_link_pthreads="-threads"
9188                 ol_link_threads=posix
9189         fi
9190 fi
9191
9192
9193                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9194 if test "$ol_link_threads" = no ; then
9195         # try -lpthreads -lmach -lexc -lc_r
9196         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9197 echo "configure:9198: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9198 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9199   echo $ac_n "(cached) $ac_c" 1>&6
9200 else
9201   
9202                 # save the flags
9203                 ol_LIBS="$LIBS"
9204                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9205
9206                 if test "$cross_compiling" = yes; then
9207   cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 /* pthread test headers */
9211 #include <pthread.h>
9212 #ifndef NULL
9213 #define NULL (void*)0
9214 #endif
9215
9216 static void *task(p)
9217         void *p;
9218 {
9219         return (void *) (p == NULL);
9220 }
9221
9222 int main() {
9223
9224         /* pthread test function */
9225         pthread_t t;
9226         int status;
9227 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9228         /* This system (e.g. AIX) defaults detached; must override */
9229         pthread_attr_t attr;
9230
9231         status = pthread_attr_init(&attr);
9232         if( status ) exit( status );
9233
9234         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9235         if( status ) exit( status );
9236
9237 #define ATTR    &attr
9238 #else
9239 #if HAVE_PTHREADS_D4
9240 #define ATTR    pthread_attr_default
9241 #else
9242 #define ATTR    NULL
9243 #endif
9244 #endif
9245         /* make sure pthread_create() isn't just a stub */
9246         status = pthread_create(&t, ATTR, task, NULL);
9247         if( status ) exit( status );
9248
9249         /* make sure pthread_detach() isn't just a stub */
9250 #if HAVE_PTHREADS_D4
9251         status = pthread_detach( &t );
9252 #else
9253         status = pthread_detach( t );
9254 #endif
9255
9256 #ifdef HAVE_LINUX_THREADS
9257         pthread_kill_other_threads_np();
9258 #endif
9259
9260         exit( status );
9261
9262 ; return 0; }
9263 EOF
9264 if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9265   rm -rf conftest*
9266   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9267 else
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -rf conftest*
9271   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9272 fi
9273 rm -f conftest*
9274 else
9275   cat > conftest.$ac_ext <<EOF
9276 #line 9277 "configure"
9277 #include "confdefs.h"
9278 /* pthread test headers */
9279 #include <pthread.h>
9280 #ifndef NULL
9281 #define NULL (void*)0
9282 #endif
9283
9284 static void *task(p)
9285         void *p;
9286 {
9287         return (void *) (p == NULL);
9288 }
9289
9290
9291 int main(argc, argv)
9292         int argc;
9293         char **argv;
9294 {
9295
9296         /* pthread test function */
9297         pthread_t t;
9298         int status;
9299 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9300         /* This system (e.g. AIX) defaults detached; must override */
9301         pthread_attr_t attr;
9302
9303         status = pthread_attr_init(&attr);
9304         if( status ) exit( status );
9305
9306         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9307         if( status ) exit( status );
9308
9309 #define ATTR    &attr
9310 #else
9311 #if HAVE_PTHREADS_D4
9312 #define ATTR    pthread_attr_default
9313 #else
9314 #define ATTR    NULL
9315 #endif
9316 #endif
9317         /* make sure pthread_create() isn't just a stub */
9318         status = pthread_create(&t, ATTR, task, NULL);
9319         if( status ) exit( status );
9320
9321         /* make sure pthread_detach() isn't just a stub */
9322 #if HAVE_PTHREADS_D4
9323         status = pthread_detach( &t );
9324 #else
9325         status = pthread_detach( t );
9326 #endif
9327
9328 #ifdef HAVE_LINUX_THREADS
9329         pthread_kill_other_threads_np();
9330 #endif
9331
9332         exit( status );
9333
9334 }
9335
9336 EOF
9337 if { (eval echo configure:9338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9338 then
9339   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9340 else
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -fr conftest*
9344   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9345 fi
9346 rm -fr conftest*
9347 fi
9348
9349
9350                 # restore the LIBS
9351                 LIBS="$ol_LIBS"
9352         
9353 fi
9354
9355 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9356
9357         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9358                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9359                 ol_link_threads=posix
9360         fi
9361 fi
9362
9363                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9364 if test "$ol_link_threads" = no ; then
9365         # try -lpthreads -lmach -lexc
9366         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9367 echo "configure:9368: checking for pthread link with -lpthreads -lmach -lexc" >&5
9368 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9369   echo $ac_n "(cached) $ac_c" 1>&6
9370 else
9371   
9372                 # save the flags
9373                 ol_LIBS="$LIBS"
9374                 LIBS="-lpthreads -lmach -lexc $LIBS"
9375
9376                 if test "$cross_compiling" = yes; then
9377   cat > conftest.$ac_ext <<EOF
9378 #line 9379 "configure"
9379 #include "confdefs.h"
9380 /* pthread test headers */
9381 #include <pthread.h>
9382 #ifndef NULL
9383 #define NULL (void*)0
9384 #endif
9385
9386 static void *task(p)
9387         void *p;
9388 {
9389         return (void *) (p == NULL);
9390 }
9391
9392 int main() {
9393
9394         /* pthread test function */
9395         pthread_t t;
9396         int status;
9397 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9398         /* This system (e.g. AIX) defaults detached; must override */
9399         pthread_attr_t attr;
9400
9401         status = pthread_attr_init(&attr);
9402         if( status ) exit( status );
9403
9404         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9405         if( status ) exit( status );
9406
9407 #define ATTR    &attr
9408 #else
9409 #if HAVE_PTHREADS_D4
9410 #define ATTR    pthread_attr_default
9411 #else
9412 #define ATTR    NULL
9413 #endif
9414 #endif
9415         /* make sure pthread_create() isn't just a stub */
9416         status = pthread_create(&t, ATTR, task, NULL);
9417         if( status ) exit( status );
9418
9419         /* make sure pthread_detach() isn't just a stub */
9420 #if HAVE_PTHREADS_D4
9421         status = pthread_detach( &t );
9422 #else
9423         status = pthread_detach( t );
9424 #endif
9425
9426 #ifdef HAVE_LINUX_THREADS
9427         pthread_kill_other_threads_np();
9428 #endif
9429
9430         exit( status );
9431
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435   rm -rf conftest*
9436   ol_cv_pthread_lpthreads_lmach_lexc=yes
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -rf conftest*
9441   ol_cv_pthread_lpthreads_lmach_lexc=no
9442 fi
9443 rm -f conftest*
9444 else
9445   cat > conftest.$ac_ext <<EOF
9446 #line 9447 "configure"
9447 #include "confdefs.h"
9448 /* pthread test headers */
9449 #include <pthread.h>
9450 #ifndef NULL
9451 #define NULL (void*)0
9452 #endif
9453
9454 static void *task(p)
9455         void *p;
9456 {
9457         return (void *) (p == NULL);
9458 }
9459
9460
9461 int main(argc, argv)
9462         int argc;
9463         char **argv;
9464 {
9465
9466         /* pthread test function */
9467         pthread_t t;
9468         int status;
9469 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9470         /* This system (e.g. AIX) defaults detached; must override */
9471         pthread_attr_t attr;
9472
9473         status = pthread_attr_init(&attr);
9474         if( status ) exit( status );
9475
9476         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9477         if( status ) exit( status );
9478
9479 #define ATTR    &attr
9480 #else
9481 #if HAVE_PTHREADS_D4
9482 #define ATTR    pthread_attr_default
9483 #else
9484 #define ATTR    NULL
9485 #endif
9486 #endif
9487         /* make sure pthread_create() isn't just a stub */
9488         status = pthread_create(&t, ATTR, task, NULL);
9489         if( status ) exit( status );
9490
9491         /* make sure pthread_detach() isn't just a stub */
9492 #if HAVE_PTHREADS_D4
9493         status = pthread_detach( &t );
9494 #else
9495         status = pthread_detach( t );
9496 #endif
9497
9498 #ifdef HAVE_LINUX_THREADS
9499         pthread_kill_other_threads_np();
9500 #endif
9501
9502         exit( status );
9503
9504 }
9505
9506 EOF
9507 if { (eval echo configure:9508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9508 then
9509   ol_cv_pthread_lpthreads_lmach_lexc=yes
9510 else
9511   echo "configure: failed program was:" >&5
9512   cat conftest.$ac_ext >&5
9513   rm -fr conftest*
9514   ol_cv_pthread_lpthreads_lmach_lexc=no
9515 fi
9516 rm -fr conftest*
9517 fi
9518
9519
9520                 # restore the LIBS
9521                 LIBS="$ol_LIBS"
9522         
9523 fi
9524
9525 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9526
9527         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9528                 ol_link_pthreads="-lpthreads -lmach -lexc"
9529                 ol_link_threads=posix
9530         fi
9531 fi
9532
9533                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9534 if test "$ol_link_threads" = no ; then
9535         # try -lpthreads -lexc
9536         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9537 echo "configure:9538: checking for pthread link with -lpthreads -lexc" >&5
9538 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9539   echo $ac_n "(cached) $ac_c" 1>&6
9540 else
9541   
9542                 # save the flags
9543                 ol_LIBS="$LIBS"
9544                 LIBS="-lpthreads -lexc $LIBS"
9545
9546                 if test "$cross_compiling" = yes; then
9547   cat > conftest.$ac_ext <<EOF
9548 #line 9549 "configure"
9549 #include "confdefs.h"
9550 /* pthread test headers */
9551 #include <pthread.h>
9552 #ifndef NULL
9553 #define NULL (void*)0
9554 #endif
9555
9556 static void *task(p)
9557         void *p;
9558 {
9559         return (void *) (p == NULL);
9560 }
9561
9562 int main() {
9563
9564         /* pthread test function */
9565         pthread_t t;
9566         int status;
9567 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9568         /* This system (e.g. AIX) defaults detached; must override */
9569         pthread_attr_t attr;
9570
9571         status = pthread_attr_init(&attr);
9572         if( status ) exit( status );
9573
9574         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9575         if( status ) exit( status );
9576
9577 #define ATTR    &attr
9578 #else
9579 #if HAVE_PTHREADS_D4
9580 #define ATTR    pthread_attr_default
9581 #else
9582 #define ATTR    NULL
9583 #endif
9584 #endif
9585         /* make sure pthread_create() isn't just a stub */
9586         status = pthread_create(&t, ATTR, task, NULL);
9587         if( status ) exit( status );
9588
9589         /* make sure pthread_detach() isn't just a stub */
9590 #if HAVE_PTHREADS_D4
9591         status = pthread_detach( &t );
9592 #else
9593         status = pthread_detach( t );
9594 #endif
9595
9596 #ifdef HAVE_LINUX_THREADS
9597         pthread_kill_other_threads_np();
9598 #endif
9599
9600         exit( status );
9601
9602 ; return 0; }
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9605   rm -rf conftest*
9606   ol_cv_pthread_lpthreads_lexc=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -rf conftest*
9611   ol_cv_pthread_lpthreads_lexc=no
9612 fi
9613 rm -f conftest*
9614 else
9615   cat > conftest.$ac_ext <<EOF
9616 #line 9617 "configure"
9617 #include "confdefs.h"
9618 /* pthread test headers */
9619 #include <pthread.h>
9620 #ifndef NULL
9621 #define NULL (void*)0
9622 #endif
9623
9624 static void *task(p)
9625         void *p;
9626 {
9627         return (void *) (p == NULL);
9628 }
9629
9630
9631 int main(argc, argv)
9632         int argc;
9633         char **argv;
9634 {
9635
9636         /* pthread test function */
9637         pthread_t t;
9638         int status;
9639 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9640         /* This system (e.g. AIX) defaults detached; must override */
9641         pthread_attr_t attr;
9642
9643         status = pthread_attr_init(&attr);
9644         if( status ) exit( status );
9645
9646         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9647         if( status ) exit( status );
9648
9649 #define ATTR    &attr
9650 #else
9651 #if HAVE_PTHREADS_D4
9652 #define ATTR    pthread_attr_default
9653 #else
9654 #define ATTR    NULL
9655 #endif
9656 #endif
9657         /* make sure pthread_create() isn't just a stub */
9658         status = pthread_create(&t, ATTR, task, NULL);
9659         if( status ) exit( status );
9660
9661         /* make sure pthread_detach() isn't just a stub */
9662 #if HAVE_PTHREADS_D4
9663         status = pthread_detach( &t );
9664 #else
9665         status = pthread_detach( t );
9666 #endif
9667
9668 #ifdef HAVE_LINUX_THREADS
9669         pthread_kill_other_threads_np();
9670 #endif
9671
9672         exit( status );
9673
9674 }
9675
9676 EOF
9677 if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9678 then
9679   ol_cv_pthread_lpthreads_lexc=yes
9680 else
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -fr conftest*
9684   ol_cv_pthread_lpthreads_lexc=no
9685 fi
9686 rm -fr conftest*
9687 fi
9688
9689
9690                 # restore the LIBS
9691                 LIBS="$ol_LIBS"
9692         
9693 fi
9694
9695 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9696
9697         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9698                 ol_link_pthreads="-lpthreads -lexc"
9699                 ol_link_threads=posix
9700         fi
9701 fi
9702
9703
9704                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9705 if test "$ol_link_threads" = no ; then
9706         # try -lpthreads
9707         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9708 echo "configure:9709: checking for pthread link with -lpthreads" >&5
9709 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9710   echo $ac_n "(cached) $ac_c" 1>&6
9711 else
9712   
9713                 # save the flags
9714                 ol_LIBS="$LIBS"
9715                 LIBS="-lpthreads $LIBS"
9716
9717                 if test "$cross_compiling" = yes; then
9718   cat > conftest.$ac_ext <<EOF
9719 #line 9720 "configure"
9720 #include "confdefs.h"
9721 /* pthread test headers */
9722 #include <pthread.h>
9723 #ifndef NULL
9724 #define NULL (void*)0
9725 #endif
9726
9727 static void *task(p)
9728         void *p;
9729 {
9730         return (void *) (p == NULL);
9731 }
9732
9733 int main() {
9734
9735         /* pthread test function */
9736         pthread_t t;
9737         int status;
9738 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9739         /* This system (e.g. AIX) defaults detached; must override */
9740         pthread_attr_t attr;
9741
9742         status = pthread_attr_init(&attr);
9743         if( status ) exit( status );
9744
9745         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9746         if( status ) exit( status );
9747
9748 #define ATTR    &attr
9749 #else
9750 #if HAVE_PTHREADS_D4
9751 #define ATTR    pthread_attr_default
9752 #else
9753 #define ATTR    NULL
9754 #endif
9755 #endif
9756         /* make sure pthread_create() isn't just a stub */
9757         status = pthread_create(&t, ATTR, task, NULL);
9758         if( status ) exit( status );
9759
9760         /* make sure pthread_detach() isn't just a stub */
9761 #if HAVE_PTHREADS_D4
9762         status = pthread_detach( &t );
9763 #else
9764         status = pthread_detach( t );
9765 #endif
9766
9767 #ifdef HAVE_LINUX_THREADS
9768         pthread_kill_other_threads_np();
9769 #endif
9770
9771         exit( status );
9772
9773 ; return 0; }
9774 EOF
9775 if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9776   rm -rf conftest*
9777   ol_cv_pthread_lib_lpthreads=yes
9778 else
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781   rm -rf conftest*
9782   ol_cv_pthread_lib_lpthreads=no
9783 fi
9784 rm -f conftest*
9785 else
9786   cat > conftest.$ac_ext <<EOF
9787 #line 9788 "configure"
9788 #include "confdefs.h"
9789 /* pthread test headers */
9790 #include <pthread.h>
9791 #ifndef NULL
9792 #define NULL (void*)0
9793 #endif
9794
9795 static void *task(p)
9796         void *p;
9797 {
9798         return (void *) (p == NULL);
9799 }
9800
9801
9802 int main(argc, argv)
9803         int argc;
9804         char **argv;
9805 {
9806
9807         /* pthread test function */
9808         pthread_t t;
9809         int status;
9810 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9811         /* This system (e.g. AIX) defaults detached; must override */
9812         pthread_attr_t attr;
9813
9814         status = pthread_attr_init(&attr);
9815         if( status ) exit( status );
9816
9817         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9818         if( status ) exit( status );
9819
9820 #define ATTR    &attr
9821 #else
9822 #if HAVE_PTHREADS_D4
9823 #define ATTR    pthread_attr_default
9824 #else
9825 #define ATTR    NULL
9826 #endif
9827 #endif
9828         /* make sure pthread_create() isn't just a stub */
9829         status = pthread_create(&t, ATTR, task, NULL);
9830         if( status ) exit( status );
9831
9832         /* make sure pthread_detach() isn't just a stub */
9833 #if HAVE_PTHREADS_D4
9834         status = pthread_detach( &t );
9835 #else
9836         status = pthread_detach( t );
9837 #endif
9838
9839 #ifdef HAVE_LINUX_THREADS
9840         pthread_kill_other_threads_np();
9841 #endif
9842
9843         exit( status );
9844
9845 }
9846
9847 EOF
9848 if { (eval echo configure:9849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9849 then
9850   ol_cv_pthread_lib_lpthreads=yes
9851 else
9852   echo "configure: failed program was:" >&5
9853   cat conftest.$ac_ext >&5
9854   rm -fr conftest*
9855   ol_cv_pthread_lib_lpthreads=no
9856 fi
9857 rm -fr conftest*
9858 fi
9859
9860
9861                 # restore the LIBS
9862                 LIBS="$ol_LIBS"
9863         
9864 fi
9865
9866 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9867
9868         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9869                 ol_link_pthreads="-lpthreads"
9870                 ol_link_threads=posix
9871         fi
9872 fi
9873
9874
9875                 if test $ol_link_threads != no ; then
9876                         cat >> confdefs.h <<\EOF
9877 #define HAVE_PTHREADS 1
9878 EOF
9879
9880
9881                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9882
9883                                                 save_CPPFLAGS="$CPPFLAGS"
9884                         save_LIBS="$LIBS"
9885                         LIBS="$LTHREAD_LIBS $LIBS"
9886
9887                                                                                                 for ac_func in sched_yield pthread_yield
9888 do
9889 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9890 echo "configure:9891: checking for $ac_func" >&5
9891 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9892   echo $ac_n "(cached) $ac_c" 1>&6
9893 else
9894   cat > conftest.$ac_ext <<EOF
9895 #line 9896 "configure"
9896 #include "confdefs.h"
9897 /* System header to define __stub macros and hopefully few prototypes,
9898     which can conflict with char $ac_func(); below.  */
9899 #include <assert.h>
9900 /* Override any gcc2 internal prototype to avoid an error.  */
9901 /* We use char because int might match the return type of a gcc2
9902     builtin and then its argument prototype would still apply.  */
9903 char $ac_func();
9904 char (*f)();
9905
9906 int main() {
9907
9908 /* The GNU C library defines this for functions which it implements
9909     to always fail with ENOSYS.  Some functions are actually named
9910     something starting with __ and the normal name is an alias.  */
9911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9912 choke me
9913 #else
9914 f = $ac_func;
9915 #endif
9916
9917 ; return 0; }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9920   rm -rf conftest*
9921   eval "ac_cv_func_$ac_func=yes"
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -rf conftest*
9926   eval "ac_cv_func_$ac_func=no"
9927 fi
9928 rm -f conftest*
9929 fi
9930
9931 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9932   echo "$ac_t""yes" 1>&6
9933     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9934   cat >> confdefs.h <<EOF
9935 #define $ac_tr_func 1
9936 EOF
9937  
9938 else
9939   echo "$ac_t""no" 1>&6
9940 fi
9941 done
9942
9943
9944                         if test $ac_cv_func_sched_yield = no -a \
9945                                 $ac_cv_func_pthread_yield = no ; then
9946                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9947 echo "configure:9948: checking for sched_yield in -lrt" >&5
9948 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9949 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9950   echo $ac_n "(cached) $ac_c" 1>&6
9951 else
9952   ac_save_LIBS="$LIBS"
9953 LIBS="-lrt  $LIBS"
9954 cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957 /* Override any gcc2 internal prototype to avoid an error.  */
9958 /* We use char because int might match the return type of a gcc2
9959     builtin and then its argument prototype would still apply.  */
9960 char sched_yield();
9961
9962 int main() {
9963 sched_yield()
9964 ; return 0; }
9965 EOF
9966 if { (eval echo configure:9967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9967   rm -rf conftest*
9968   eval "ac_cv_lib_$ac_lib_var=yes"
9969 else
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972   rm -rf conftest*
9973   eval "ac_cv_lib_$ac_lib_var=no"
9974 fi
9975 rm -f conftest*
9976 LIBS="$ac_save_LIBS"
9977
9978 fi
9979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9980   echo "$ac_t""yes" 1>&6
9981   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9982                                         cat >> confdefs.h <<\EOF
9983 #define HAVE_SCHED_YIELD 1
9984 EOF
9985
9986                                         ac_cv_func_sched_yield=yes
9987 else
9988   echo "$ac_t""no" 1>&6
9989 ac_cv_func_sched_yield=no
9990 fi
9991
9992                         fi
9993                         if test $ac_cv_func_sched_yield = no -a \
9994                                 $ac_cv_func_pthread_yield = no ; then
9995                                                                                                 for ac_func in thr_yield
9996 do
9997 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9998 echo "configure:9999: checking for $ac_func" >&5
9999 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10000   echo $ac_n "(cached) $ac_c" 1>&6
10001 else
10002   cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005 /* System header to define __stub macros and hopefully few prototypes,
10006     which can conflict with char $ac_func(); below.  */
10007 #include <assert.h>
10008 /* Override any gcc2 internal prototype to avoid an error.  */
10009 /* We use char because int might match the return type of a gcc2
10010     builtin and then its argument prototype would still apply.  */
10011 char $ac_func();
10012 char (*f)();
10013
10014 int main() {
10015
10016 /* The GNU C library defines this for functions which it implements
10017     to always fail with ENOSYS.  Some functions are actually named
10018     something starting with __ and the normal name is an alias.  */
10019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10020 choke me
10021 #else
10022 f = $ac_func;
10023 #endif
10024
10025 ; return 0; }
10026 EOF
10027 if { (eval echo configure:10028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10028   rm -rf conftest*
10029   eval "ac_cv_func_$ac_func=yes"
10030 else
10031   echo "configure: failed program was:" >&5
10032   cat conftest.$ac_ext >&5
10033   rm -rf conftest*
10034   eval "ac_cv_func_$ac_func=no"
10035 fi
10036 rm -f conftest*
10037 fi
10038
10039 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10040   echo "$ac_t""yes" 1>&6
10041     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10042   cat >> confdefs.h <<EOF
10043 #define $ac_tr_func 1
10044 EOF
10045  
10046 else
10047   echo "$ac_t""no" 1>&6
10048 fi
10049 done
10050
10051                         fi
10052                         if test $ac_cv_func_sched_yield = no -a \
10053                                 $ac_cv_func_pthread_yield = no -a \
10054                                 "$ac_cv_func_thr_yield" = no ; then
10055                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10056                         fi
10057
10058                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10059 do
10060 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10061 echo "configure:10062: checking for $ac_func" >&5
10062 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10063   echo $ac_n "(cached) $ac_c" 1>&6
10064 else
10065   cat > conftest.$ac_ext <<EOF
10066 #line 10067 "configure"
10067 #include "confdefs.h"
10068 /* System header to define __stub macros and hopefully few prototypes,
10069     which can conflict with char $ac_func(); below.  */
10070 #include <assert.h>
10071 /* Override any gcc2 internal prototype to avoid an error.  */
10072 /* We use char because int might match the return type of a gcc2
10073     builtin and then its argument prototype would still apply.  */
10074 char $ac_func();
10075 char (*f)();
10076
10077 int main() {
10078
10079 /* The GNU C library defines this for functions which it implements
10080     to always fail with ENOSYS.  Some functions are actually named
10081     something starting with __ and the normal name is an alias.  */
10082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10083 choke me
10084 #else
10085 f = $ac_func;
10086 #endif
10087
10088 ; return 0; }
10089 EOF
10090 if { (eval echo configure:10091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10091   rm -rf conftest*
10092   eval "ac_cv_func_$ac_func=yes"
10093 else
10094   echo "configure: failed program was:" >&5
10095   cat conftest.$ac_ext >&5
10096   rm -rf conftest*
10097   eval "ac_cv_func_$ac_func=no"
10098 fi
10099 rm -f conftest*
10100 fi
10101
10102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10103   echo "$ac_t""yes" 1>&6
10104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10105   cat >> confdefs.h <<EOF
10106 #define $ac_tr_func 1
10107 EOF
10108  
10109 else
10110   echo "$ac_t""no" 1>&6
10111 fi
10112 done
10113
10114
10115                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10116 echo "configure:10117: checking for pthread_detach with <pthread.h>" >&5
10117 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10118   echo $ac_n "(cached) $ac_c" 1>&6
10119 else
10120   
10121                                                                 cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124
10125 #include <pthread.h>
10126 #ifndef NULL
10127 #define NULL (void*)0
10128 #endif
10129
10130 int main() {
10131 pthread_detach(NULL);
10132 ; return 0; }
10133 EOF
10134 if { (eval echo configure:10135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10135   rm -rf conftest*
10136   ol_cv_func_pthread_detach=yes
10137 else
10138   echo "configure: failed program was:" >&5
10139   cat conftest.$ac_ext >&5
10140   rm -rf conftest*
10141   ol_cv_func_pthread_detach=no
10142 fi
10143 rm -f conftest*
10144                         
10145 fi
10146
10147 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10148
10149                         if test $ol_cv_func_pthread_detach = no ; then
10150                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10151                         fi
10152
10153                         cat >> confdefs.h <<\EOF
10154 #define HAVE_PTHREAD_DETACH 1
10155 EOF
10156
10157
10158                                                 for ac_func in \
10159                                 pthread_setconcurrency \
10160                                 pthread_getconcurrency \
10161                                 thr_setconcurrency \
10162                                 thr_getconcurrency \
10163                         
10164 do
10165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10166 echo "configure:10167: checking for $ac_func" >&5
10167 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10168   echo $ac_n "(cached) $ac_c" 1>&6
10169 else
10170   cat > conftest.$ac_ext <<EOF
10171 #line 10172 "configure"
10172 #include "confdefs.h"
10173 /* System header to define __stub macros and hopefully few prototypes,
10174     which can conflict with char $ac_func(); below.  */
10175 #include <assert.h>
10176 /* Override any gcc2 internal prototype to avoid an error.  */
10177 /* We use char because int might match the return type of a gcc2
10178     builtin and then its argument prototype would still apply.  */
10179 char $ac_func();
10180 char (*f)();
10181
10182 int main() {
10183
10184 /* The GNU C library defines this for functions which it implements
10185     to always fail with ENOSYS.  Some functions are actually named
10186     something starting with __ and the normal name is an alias.  */
10187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10188 choke me
10189 #else
10190 f = $ac_func;
10191 #endif
10192
10193 ; return 0; }
10194 EOF
10195 if { (eval echo configure:10196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10196   rm -rf conftest*
10197   eval "ac_cv_func_$ac_func=yes"
10198 else
10199   echo "configure: failed program was:" >&5
10200   cat conftest.$ac_ext >&5
10201   rm -rf conftest*
10202   eval "ac_cv_func_$ac_func=no"
10203 fi
10204 rm -f conftest*
10205 fi
10206
10207 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10208   echo "$ac_t""yes" 1>&6
10209     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10210   cat >> confdefs.h <<EOF
10211 #define $ac_tr_func 1
10212 EOF
10213  
10214 else
10215   echo "$ac_t""no" 1>&6
10216 fi
10217 done
10218
10219
10220                         
10221         for ac_func in pthread_kill_other_threads_np
10222 do
10223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10224 echo "configure:10225: checking for $ac_func" >&5
10225 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10226   echo $ac_n "(cached) $ac_c" 1>&6
10227 else
10228   cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231 /* System header to define __stub macros and hopefully few prototypes,
10232     which can conflict with char $ac_func(); below.  */
10233 #include <assert.h>
10234 /* Override any gcc2 internal prototype to avoid an error.  */
10235 /* We use char because int might match the return type of a gcc2
10236     builtin and then its argument prototype would still apply.  */
10237 char $ac_func();
10238 char (*f)();
10239
10240 int main() {
10241
10242 /* The GNU C library defines this for functions which it implements
10243     to always fail with ENOSYS.  Some functions are actually named
10244     something starting with __ and the normal name is an alias.  */
10245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10246 choke me
10247 #else
10248 f = $ac_func;
10249 #endif
10250
10251 ; return 0; }
10252 EOF
10253 if { (eval echo configure:10254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10254   rm -rf conftest*
10255   eval "ac_cv_func_$ac_func=yes"
10256 else
10257   echo "configure: failed program was:" >&5
10258   cat conftest.$ac_ext >&5
10259   rm -rf conftest*
10260   eval "ac_cv_func_$ac_func=no"
10261 fi
10262 rm -f conftest*
10263 fi
10264
10265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10266   echo "$ac_t""yes" 1>&6
10267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10268   cat >> confdefs.h <<EOF
10269 #define $ac_tr_func 1
10270 EOF
10271  
10272 else
10273   echo "$ac_t""no" 1>&6
10274 fi
10275 done
10276
10277         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10278 echo "configure:10279: checking for LinuxThreads implementation" >&5
10279 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10280   echo $ac_n "(cached) $ac_c" 1>&6
10281 else
10282   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10283 fi
10284
10285 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10286
10287                         
10288         
10289         
10290         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10291 echo "configure:10292: checking for LinuxThreads consistency" >&5
10292 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10293   echo $ac_n "(cached) $ac_c" 1>&6
10294 else
10295   
10296                 if test $ol_cv_header_linux_threads = yes -a \
10297                         $ol_cv_sys_linux_threads = yes; then
10298                         ol_cv_linux_threads=yes
10299                 elif test $ol_cv_header_linux_threads = no -a \
10300                         $ol_cv_sys_linux_threads = no; then
10301                         ol_cv_linux_threads=no
10302                 else
10303                         ol_cv_linux_threads=error
10304                 fi
10305         
10306 fi
10307
10308 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10309
10310
10311                         if test $ol_cv_linux_threads = error; then
10312                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10313                         fi
10314
10315                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10316 echo "configure:10317: checking if pthread_create() works" >&5
10317 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   
10321                         if test "$cross_compiling" = yes; then
10322                                 ol_cv_pthread_create_works=yes
10323 else
10324   cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 /* pthread test headers */
10328 #include <pthread.h>
10329 #ifndef NULL
10330 #define NULL (void*)0
10331 #endif
10332
10333 static void *task(p)
10334         void *p;
10335 {
10336         return (void *) (p == NULL);
10337 }
10338
10339
10340 int main(argc, argv)
10341         int argc;
10342         char **argv;
10343 {
10344
10345         /* pthread test function */
10346         pthread_t t;
10347         int status;
10348 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10349         /* This system (e.g. AIX) defaults detached; must override */
10350         pthread_attr_t attr;
10351
10352         status = pthread_attr_init(&attr);
10353         if( status ) exit( status );
10354
10355         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10356         if( status ) exit( status );
10357
10358 #define ATTR    &attr
10359 #else
10360 #if HAVE_PTHREADS_D4
10361 #define ATTR    pthread_attr_default
10362 #else
10363 #define ATTR    NULL
10364 #endif
10365 #endif
10366         /* make sure pthread_create() isn't just a stub */
10367         status = pthread_create(&t, ATTR, task, NULL);
10368         if( status ) exit( status );
10369
10370         /* make sure pthread_detach() isn't just a stub */
10371 #if HAVE_PTHREADS_D4
10372         status = pthread_detach( &t );
10373 #else
10374         status = pthread_detach( t );
10375 #endif
10376
10377 #ifdef HAVE_LINUX_THREADS
10378         pthread_kill_other_threads_np();
10379 #endif
10380
10381         exit( status );
10382
10383 }
10384
10385 EOF
10386 if { (eval echo configure:10387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10387 then
10388   ol_cv_pthread_create_works=yes
10389 else
10390   echo "configure: failed program was:" >&5
10391   cat conftest.$ac_ext >&5
10392   rm -fr conftest*
10393   ol_cv_pthread_create_works=no
10394 fi
10395 rm -fr conftest*
10396 fi
10397
10398 fi
10399
10400 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10401
10402                         if test $ol_cv_pthread_create_works = no ; then
10403                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10404                         fi
10405
10406                                                 if test $ol_with_yielding_select = auto ; then
10407                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10408 echo "configure:10409: checking if select yields when using pthreads" >&5
10409 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   
10413                                 if test "$cross_compiling" = yes; then
10414   ol_cv_pthread_select_yields=cross
10415 else
10416   cat > conftest.$ac_ext <<EOF
10417 #line 10418 "configure"
10418 #include "confdefs.h"
10419
10420 #include <sys/types.h>
10421 #include <sys/time.h>
10422 #include <unistd.h>
10423 #include <pthread.h>
10424 #ifndef NULL
10425 #define NULL (void*) 0
10426 #endif
10427
10428 static int fildes[2];
10429
10430 static void *task(p)
10431         void *p;
10432 {
10433         int i;
10434         struct timeval tv;
10435
10436         fd_set rfds;
10437
10438         tv.tv_sec=10;
10439         tv.tv_usec=0;
10440
10441         FD_ZERO(&rfds);
10442         FD_SET(fildes[0], &rfds);
10443
10444         /* we're not interested in any fds */
10445         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10446
10447         if(i < 0) {
10448                 perror("select");
10449                 exit(10);
10450         }
10451
10452         exit(0); /* if we exit here, the select blocked the whole process */
10453 }
10454
10455 int main(argc, argv)
10456         int argc;
10457         char **argv;
10458 {
10459         pthread_t t;
10460
10461         /* create a pipe to select */
10462         if(pipe(&fildes[0])) {
10463                 perror("select");
10464                 exit(1);
10465         }
10466
10467 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10468         (void) pthread_setconcurrency(2);
10469 #else
10470 #ifdef HAVE_THR_SETCONCURRENCY
10471         /* Set Solaris LWP concurrency to 2 */
10472         thr_setconcurrency(2);
10473 #endif
10474 #endif
10475
10476 #if HAVE_PTHREADS_D4
10477         pthread_create(&t, pthread_attr_default, task, NULL);
10478 #else
10479         pthread_create(&t, NULL, task, NULL);
10480 #endif
10481
10482 #if HAVE_SCHED_YIELD
10483         sched_yield();  /* make sure task runs first */
10484 #else
10485 #ifdef HAVE_PTHREAD_YIELD
10486         pthread_yield();        /* make sure task runs first */
10487 #endif
10488 #endif
10489
10490         exit(2);
10491 }
10492 EOF
10493 if { (eval echo configure:10494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10494 then
10495   ol_cv_pthread_select_yields=no
10496 else
10497   echo "configure: failed program was:" >&5
10498   cat conftest.$ac_ext >&5
10499   rm -fr conftest*
10500   ol_cv_pthread_select_yields=yes
10501 fi
10502 rm -fr conftest*
10503 fi
10504
10505 fi
10506
10507 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10508
10509                                 if test $ol_cv_pthread_select_yields = cross ; then
10510                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10511                                 fi
10512
10513                                 if test $ol_cv_pthread_select_yields = yes ; then
10514                                         ol_with_yielding_select=yes
10515                                 fi
10516                         fi
10517
10518                                                 CPPFLAGS="$save_CPPFLAGS"
10519                         LIBS="$save_LIBS"
10520                 else
10521                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10522                 fi
10523         fi
10524
10525         if test $ol_with_threads = posix ; then
10526                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10527         fi
10528 fi
10529
10530 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10531         -o $ol_with_threads = mach ; then
10532
10533                 for ac_hdr in mach/cthreads.h
10534 do
10535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10537 echo "configure:10538: checking for $ac_hdr" >&5
10538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10539   echo $ac_n "(cached) $ac_c" 1>&6
10540 else
10541   cat > conftest.$ac_ext <<EOF
10542 #line 10543 "configure"
10543 #include "confdefs.h"
10544 #include <$ac_hdr>
10545 EOF
10546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10547 { (eval echo configure:10548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10549 if test -z "$ac_err"; then
10550   rm -rf conftest*
10551   eval "ac_cv_header_$ac_safe=yes"
10552 else
10553   echo "$ac_err" >&5
10554   echo "configure: failed program was:" >&5
10555   cat conftest.$ac_ext >&5
10556   rm -rf conftest*
10557   eval "ac_cv_header_$ac_safe=no"
10558 fi
10559 rm -f conftest*
10560 fi
10561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10562   echo "$ac_t""yes" 1>&6
10563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10564   cat >> confdefs.h <<EOF
10565 #define $ac_tr_hdr 1
10566 EOF
10567  
10568 else
10569   echo "$ac_t""no" 1>&6
10570 fi
10571 done
10572
10573         if test $ac_cv_header_mach_cthreads_h = yes ; then
10574                 ol_with_threads=found
10575
10576                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10577 echo "configure:10578: checking for cthread_fork" >&5
10578 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10579   echo $ac_n "(cached) $ac_c" 1>&6
10580 else
10581   cat > conftest.$ac_ext <<EOF
10582 #line 10583 "configure"
10583 #include "confdefs.h"
10584 /* System header to define __stub macros and hopefully few prototypes,
10585     which can conflict with char cthread_fork(); below.  */
10586 #include <assert.h>
10587 /* Override any gcc2 internal prototype to avoid an error.  */
10588 /* We use char because int might match the return type of a gcc2
10589     builtin and then its argument prototype would still apply.  */
10590 char cthread_fork();
10591 char (*f)();
10592
10593 int main() {
10594
10595 /* The GNU C library defines this for functions which it implements
10596     to always fail with ENOSYS.  Some functions are actually named
10597     something starting with __ and the normal name is an alias.  */
10598 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10599 choke me
10600 #else
10601 f = cthread_fork;
10602 #endif
10603
10604 ; return 0; }
10605 EOF
10606 if { (eval echo configure:10607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10607   rm -rf conftest*
10608   eval "ac_cv_func_cthread_fork=yes"
10609 else
10610   echo "configure: failed program was:" >&5
10611   cat conftest.$ac_ext >&5
10612   rm -rf conftest*
10613   eval "ac_cv_func_cthread_fork=no"
10614 fi
10615 rm -f conftest*
10616 fi
10617
10618 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10619   echo "$ac_t""yes" 1>&6
10620   ol_link_threads=yes
10621 else
10622   echo "$ac_t""no" 1>&6
10623 fi
10624
10625
10626                 if test $ol_link_threads = no ; then
10627                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10628 echo "configure:10629: checking for cthread_fork with -all_load" >&5
10629 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10630   echo $ac_n "(cached) $ac_c" 1>&6
10631 else
10632   
10633                                                                 save_LIBS="$LIBS"
10634                                 LIBS="-all_load $LIBS"
10635                                 cat > conftest.$ac_ext <<EOF
10636 #line 10637 "configure"
10637 #include "confdefs.h"
10638 #include <mach/cthreads.h>
10639 int main() {
10640
10641                                         cthread_fork((void *)0, (void *)0);
10642                                         
10643 ; return 0; }
10644 EOF
10645 if { (eval echo configure:10646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10646   rm -rf conftest*
10647   ol_cv_cthread_all_load=yes
10648 else
10649   echo "configure: failed program was:" >&5
10650   cat conftest.$ac_ext >&5
10651   rm -rf conftest*
10652   ol_cv_cthread_all_load=no
10653 fi
10654 rm -f conftest*
10655                                                                 LIBS="$save_LIBS"
10656                         
10657 fi
10658
10659 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10660
10661                         if test $ol_cv_cthread_all_load = yes ; then
10662                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10663                                 ol_link_threads=mach
10664                         fi
10665                 fi
10666
10667                 if test $ol_link_threads != no ; then
10668                         : check for cthread specific functionality here
10669                         cat >> confdefs.h <<\EOF
10670 #define HAVE_MACH_CTHREADS 1
10671 EOF
10672
10673                 else
10674                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10675                 fi
10676         fi
10677
10678         if test $ol_with_threads = mach ; then
10679                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10680         fi
10681 fi
10682
10683 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10684         -o $ol_with_threads = pth ; then
10685
10686         for ac_hdr in pth.h
10687 do
10688 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10689 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10690 echo "configure:10691: checking for $ac_hdr" >&5
10691 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10692   echo $ac_n "(cached) $ac_c" 1>&6
10693 else
10694   cat > conftest.$ac_ext <<EOF
10695 #line 10696 "configure"
10696 #include "confdefs.h"
10697 #include <$ac_hdr>
10698 EOF
10699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10700 { (eval echo configure:10701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10702 if test -z "$ac_err"; then
10703   rm -rf conftest*
10704   eval "ac_cv_header_$ac_safe=yes"
10705 else
10706   echo "$ac_err" >&5
10707   echo "configure: failed program was:" >&5
10708   cat conftest.$ac_ext >&5
10709   rm -rf conftest*
10710   eval "ac_cv_header_$ac_safe=no"
10711 fi
10712 rm -f conftest*
10713 fi
10714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10715   echo "$ac_t""yes" 1>&6
10716     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10717   cat >> confdefs.h <<EOF
10718 #define $ac_tr_hdr 1
10719 EOF
10720  
10721 else
10722   echo "$ac_t""no" 1>&6
10723 fi
10724 done
10725
10726
10727         if test $ac_cv_header_pth_h = yes ; then
10728                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10729 echo "configure:10730: checking for pth_version in -lpth" >&5
10730 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10732   echo $ac_n "(cached) $ac_c" 1>&6
10733 else
10734   ac_save_LIBS="$LIBS"
10735 LIBS="-lpth  $LIBS"
10736 cat > conftest.$ac_ext <<EOF
10737 #line 10738 "configure"
10738 #include "confdefs.h"
10739 /* Override any gcc2 internal prototype to avoid an error.  */
10740 /* We use char because int might match the return type of a gcc2
10741     builtin and then its argument prototype would still apply.  */
10742 char pth_version();
10743
10744 int main() {
10745 pth_version()
10746 ; return 0; }
10747 EOF
10748 if { (eval echo configure:10749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10749   rm -rf conftest*
10750   eval "ac_cv_lib_$ac_lib_var=yes"
10751 else
10752   echo "configure: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   rm -rf conftest*
10755   eval "ac_cv_lib_$ac_lib_var=no"
10756 fi
10757 rm -f conftest*
10758 LIBS="$ac_save_LIBS"
10759
10760 fi
10761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10762   echo "$ac_t""yes" 1>&6
10763   have_pth=yes
10764 else
10765   echo "$ac_t""no" 1>&6
10766 have_pth=no
10767 fi
10768
10769
10770                 if test $have_pth = yes ; then
10771                         cat >> confdefs.h <<\EOF
10772 #define HAVE_GNU_PTH 1
10773 EOF
10774
10775                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10776                         ol_link_threads=pth
10777
10778                         if test $ol_with_yielding_select = auto ; then
10779                                 ol_with_yielding_select=yes
10780                         fi
10781                 fi
10782         fi
10783 fi
10784
10785 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10786         -o $ol_with_threads = lwp ; then
10787
10788                 for ac_hdr in thread.h synch.h
10789 do
10790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10792 echo "configure:10793: checking for $ac_hdr" >&5
10793 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10794   echo $ac_n "(cached) $ac_c" 1>&6
10795 else
10796   cat > conftest.$ac_ext <<EOF
10797 #line 10798 "configure"
10798 #include "confdefs.h"
10799 #include <$ac_hdr>
10800 EOF
10801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10802 { (eval echo configure:10803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10804 if test -z "$ac_err"; then
10805   rm -rf conftest*
10806   eval "ac_cv_header_$ac_safe=yes"
10807 else
10808   echo "$ac_err" >&5
10809   echo "configure: failed program was:" >&5
10810   cat conftest.$ac_ext >&5
10811   rm -rf conftest*
10812   eval "ac_cv_header_$ac_safe=no"
10813 fi
10814 rm -f conftest*
10815 fi
10816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10817   echo "$ac_t""yes" 1>&6
10818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10819   cat >> confdefs.h <<EOF
10820 #define $ac_tr_hdr 1
10821 EOF
10822  
10823 else
10824   echo "$ac_t""no" 1>&6
10825 fi
10826 done
10827
10828         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10829                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10830 echo "configure:10831: checking for thr_create in -lthread" >&5
10831 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10832 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10833   echo $ac_n "(cached) $ac_c" 1>&6
10834 else
10835   ac_save_LIBS="$LIBS"
10836 LIBS="-lthread  $LIBS"
10837 cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840 /* Override any gcc2 internal prototype to avoid an error.  */
10841 /* We use char because int might match the return type of a gcc2
10842     builtin and then its argument prototype would still apply.  */
10843 char thr_create();
10844
10845 int main() {
10846 thr_create()
10847 ; return 0; }
10848 EOF
10849 if { (eval echo configure:10850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10850   rm -rf conftest*
10851   eval "ac_cv_lib_$ac_lib_var=yes"
10852 else
10853   echo "configure: failed program was:" >&5
10854   cat conftest.$ac_ext >&5
10855   rm -rf conftest*
10856   eval "ac_cv_lib_$ac_lib_var=no"
10857 fi
10858 rm -f conftest*
10859 LIBS="$ac_save_LIBS"
10860
10861 fi
10862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10863   echo "$ac_t""yes" 1>&6
10864   have_thr=yes
10865 else
10866   echo "$ac_t""no" 1>&6
10867 have_thr=no
10868 fi
10869
10870
10871                 if test $have_thr = yes ; then
10872                         cat >> confdefs.h <<\EOF
10873 #define HAVE_THR 1
10874 EOF
10875
10876                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10877                         ol_link_threads=thr
10878
10879                         if test $ol_with_yielding_select = auto ; then
10880                                 ol_with_yielding_select=yes
10881                         fi
10882
10883                                                 for ac_func in \
10884                                 thr_setconcurrency \
10885                                 thr_getconcurrency \
10886                         
10887 do
10888 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10889 echo "configure:10890: checking for $ac_func" >&5
10890 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10891   echo $ac_n "(cached) $ac_c" 1>&6
10892 else
10893   cat > conftest.$ac_ext <<EOF
10894 #line 10895 "configure"
10895 #include "confdefs.h"
10896 /* System header to define __stub macros and hopefully few prototypes,
10897     which can conflict with char $ac_func(); below.  */
10898 #include <assert.h>
10899 /* Override any gcc2 internal prototype to avoid an error.  */
10900 /* We use char because int might match the return type of a gcc2
10901     builtin and then its argument prototype would still apply.  */
10902 char $ac_func();
10903 char (*f)();
10904
10905 int main() {
10906
10907 /* The GNU C library defines this for functions which it implements
10908     to always fail with ENOSYS.  Some functions are actually named
10909     something starting with __ and the normal name is an alias.  */
10910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10911 choke me
10912 #else
10913 f = $ac_func;
10914 #endif
10915
10916 ; return 0; }
10917 EOF
10918 if { (eval echo configure:10919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10919   rm -rf conftest*
10920   eval "ac_cv_func_$ac_func=yes"
10921 else
10922   echo "configure: failed program was:" >&5
10923   cat conftest.$ac_ext >&5
10924   rm -rf conftest*
10925   eval "ac_cv_func_$ac_func=no"
10926 fi
10927 rm -f conftest*
10928 fi
10929
10930 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10931   echo "$ac_t""yes" 1>&6
10932     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10933   cat >> confdefs.h <<EOF
10934 #define $ac_tr_func 1
10935 EOF
10936  
10937 else
10938   echo "$ac_t""no" 1>&6
10939 fi
10940 done
10941
10942                 fi
10943         fi
10944
10945                 for ac_hdr in lwp/lwp.h
10946 do
10947 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10949 echo "configure:10950: checking for $ac_hdr" >&5
10950 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10951   echo $ac_n "(cached) $ac_c" 1>&6
10952 else
10953   cat > conftest.$ac_ext <<EOF
10954 #line 10955 "configure"
10955 #include "confdefs.h"
10956 #include <$ac_hdr>
10957 EOF
10958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10959 { (eval echo configure:10960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10961 if test -z "$ac_err"; then
10962   rm -rf conftest*
10963   eval "ac_cv_header_$ac_safe=yes"
10964 else
10965   echo "$ac_err" >&5
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -rf conftest*
10969   eval "ac_cv_header_$ac_safe=no"
10970 fi
10971 rm -f conftest*
10972 fi
10973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10974   echo "$ac_t""yes" 1>&6
10975     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10976   cat >> confdefs.h <<EOF
10977 #define $ac_tr_hdr 1
10978 EOF
10979  
10980 else
10981   echo "$ac_t""no" 1>&6
10982 fi
10983 done
10984
10985         if test $ac_cv_header_lwp_lwp_h = yes ; then
10986                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10987 echo "configure:10988: checking for lwp_create in -llwp" >&5
10988 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10990   echo $ac_n "(cached) $ac_c" 1>&6
10991 else
10992   ac_save_LIBS="$LIBS"
10993 LIBS="-llwp  $LIBS"
10994 cat > conftest.$ac_ext <<EOF
10995 #line 10996 "configure"
10996 #include "confdefs.h"
10997 /* Override any gcc2 internal prototype to avoid an error.  */
10998 /* We use char because int might match the return type of a gcc2
10999     builtin and then its argument prototype would still apply.  */
11000 char lwp_create();
11001
11002 int main() {
11003 lwp_create()
11004 ; return 0; }
11005 EOF
11006 if { (eval echo configure:11007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=yes"
11009 else
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -rf conftest*
11013   eval "ac_cv_lib_$ac_lib_var=no"
11014 fi
11015 rm -f conftest*
11016 LIBS="$ac_save_LIBS"
11017
11018 fi
11019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11020   echo "$ac_t""yes" 1>&6
11021   have_lwp=yes
11022 else
11023   echo "$ac_t""no" 1>&6
11024 have_lwp=no
11025 fi
11026
11027
11028                 if test $have_lwp = yes ; then
11029                         cat >> confdefs.h <<\EOF
11030 #define HAVE_LWP 1
11031 EOF
11032
11033                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11034                         ol_link_threads=lwp
11035
11036                         if test $ol_with_yielding_select = auto ; then
11037                                 ol_with_yielding_select=no
11038                         fi
11039                 fi
11040         fi
11041 fi
11042
11043 if test $ol_with_yielding_select = yes ; then
11044         cat >> confdefs.h <<\EOF
11045 #define HAVE_YIELDING_SELECT 1
11046 EOF
11047
11048 fi
11049
11050 if test $ol_with_threads = manual ; then
11051                 ol_link_threads=yes
11052
11053         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11054
11055         for ac_hdr in pthread.h sched.h
11056 do
11057 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11058 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11059 echo "configure:11060: checking for $ac_hdr" >&5
11060 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11061   echo $ac_n "(cached) $ac_c" 1>&6
11062 else
11063   cat > conftest.$ac_ext <<EOF
11064 #line 11065 "configure"
11065 #include "confdefs.h"
11066 #include <$ac_hdr>
11067 EOF
11068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11069 { (eval echo configure:11070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11071 if test -z "$ac_err"; then
11072   rm -rf conftest*
11073   eval "ac_cv_header_$ac_safe=yes"
11074 else
11075   echo "$ac_err" >&5
11076   echo "configure: failed program was:" >&5
11077   cat conftest.$ac_ext >&5
11078   rm -rf conftest*
11079   eval "ac_cv_header_$ac_safe=no"
11080 fi
11081 rm -f conftest*
11082 fi
11083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11084   echo "$ac_t""yes" 1>&6
11085     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11086   cat >> confdefs.h <<EOF
11087 #define $ac_tr_hdr 1
11088 EOF
11089  
11090 else
11091   echo "$ac_t""no" 1>&6
11092 fi
11093 done
11094
11095         for ac_func in sched_yield pthread_yield
11096 do
11097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11098 echo "configure:11099: checking for $ac_func" >&5
11099 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11100   echo $ac_n "(cached) $ac_c" 1>&6
11101 else
11102   cat > conftest.$ac_ext <<EOF
11103 #line 11104 "configure"
11104 #include "confdefs.h"
11105 /* System header to define __stub macros and hopefully few prototypes,
11106     which can conflict with char $ac_func(); below.  */
11107 #include <assert.h>
11108 /* Override any gcc2 internal prototype to avoid an error.  */
11109 /* We use char because int might match the return type of a gcc2
11110     builtin and then its argument prototype would still apply.  */
11111 char $ac_func();
11112 char (*f)();
11113
11114 int main() {
11115
11116 /* The GNU C library defines this for functions which it implements
11117     to always fail with ENOSYS.  Some functions are actually named
11118     something starting with __ and the normal name is an alias.  */
11119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11120 choke me
11121 #else
11122 f = $ac_func;
11123 #endif
11124
11125 ; return 0; }
11126 EOF
11127 if { (eval echo configure:11128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11128   rm -rf conftest*
11129   eval "ac_cv_func_$ac_func=yes"
11130 else
11131   echo "configure: failed program was:" >&5
11132   cat conftest.$ac_ext >&5
11133   rm -rf conftest*
11134   eval "ac_cv_func_$ac_func=no"
11135 fi
11136 rm -f conftest*
11137 fi
11138
11139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11142   cat >> confdefs.h <<EOF
11143 #define $ac_tr_func 1
11144 EOF
11145  
11146 else
11147   echo "$ac_t""no" 1>&6
11148 fi
11149 done
11150
11151         
11152         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11153 echo "configure:11154: checking for LinuxThreads pthread.h" >&5
11154 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11155   echo $ac_n "(cached) $ac_c" 1>&6
11156 else
11157   cat > conftest.$ac_ext <<EOF
11158 #line 11159 "configure"
11159 #include "confdefs.h"
11160 #include <pthread.h>
11161 EOF
11162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11163   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11164   rm -rf conftest*
11165   ol_cv_header_linux_threads=yes
11166 else
11167   rm -rf conftest*
11168   ol_cv_header_linux_threads=no
11169 fi
11170 rm -f conftest*
11171
11172                 
11173 fi
11174
11175 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11176         if test $ol_cv_header_linux_threads = yes; then
11177                 cat >> confdefs.h <<\EOF
11178 #define HAVE_LINUX_THREADS 1
11179 EOF
11180
11181         fi
11182
11183
11184         for ac_hdr in mach/cthreads.h
11185 do
11186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11188 echo "configure:11189: checking for $ac_hdr" >&5
11189 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11190   echo $ac_n "(cached) $ac_c" 1>&6
11191 else
11192   cat > conftest.$ac_ext <<EOF
11193 #line 11194 "configure"
11194 #include "confdefs.h"
11195 #include <$ac_hdr>
11196 EOF
11197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11198 { (eval echo configure:11199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11200 if test -z "$ac_err"; then
11201   rm -rf conftest*
11202   eval "ac_cv_header_$ac_safe=yes"
11203 else
11204   echo "$ac_err" >&5
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -rf conftest*
11208   eval "ac_cv_header_$ac_safe=no"
11209 fi
11210 rm -f conftest*
11211 fi
11212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11213   echo "$ac_t""yes" 1>&6
11214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11215   cat >> confdefs.h <<EOF
11216 #define $ac_tr_hdr 1
11217 EOF
11218  
11219 else
11220   echo "$ac_t""no" 1>&6
11221 fi
11222 done
11223
11224         for ac_hdr in lwp/lwp.h
11225 do
11226 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11227 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11228 echo "configure:11229: checking for $ac_hdr" >&5
11229 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11230   echo $ac_n "(cached) $ac_c" 1>&6
11231 else
11232   cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 #include <$ac_hdr>
11236 EOF
11237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11238 { (eval echo configure:11239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11240 if test -z "$ac_err"; then
11241   rm -rf conftest*
11242   eval "ac_cv_header_$ac_safe=yes"
11243 else
11244   echo "$ac_err" >&5
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   eval "ac_cv_header_$ac_safe=no"
11249 fi
11250 rm -f conftest*
11251 fi
11252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11253   echo "$ac_t""yes" 1>&6
11254     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11255   cat >> confdefs.h <<EOF
11256 #define $ac_tr_hdr 1
11257 EOF
11258  
11259 else
11260   echo "$ac_t""no" 1>&6
11261 fi
11262 done
11263
11264         for ac_hdr in thread.h synch.h
11265 do
11266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11268 echo "configure:11269: checking for $ac_hdr" >&5
11269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11270   echo $ac_n "(cached) $ac_c" 1>&6
11271 else
11272   cat > conftest.$ac_ext <<EOF
11273 #line 11274 "configure"
11274 #include "confdefs.h"
11275 #include <$ac_hdr>
11276 EOF
11277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11278 { (eval echo configure:11279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11280 if test -z "$ac_err"; then
11281   rm -rf conftest*
11282   eval "ac_cv_header_$ac_safe=yes"
11283 else
11284   echo "$ac_err" >&5
11285   echo "configure: failed program was:" >&5
11286   cat conftest.$ac_ext >&5
11287   rm -rf conftest*
11288   eval "ac_cv_header_$ac_safe=no"
11289 fi
11290 rm -f conftest*
11291 fi
11292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11295   cat >> confdefs.h <<EOF
11296 #define $ac_tr_hdr 1
11297 EOF
11298  
11299 else
11300   echo "$ac_t""no" 1>&6
11301 fi
11302 done
11303
11304 fi
11305
11306 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11307                         cat >> confdefs.h <<\EOF
11308 #define REENTRANT 1
11309 EOF
11310
11311         cat >> confdefs.h <<\EOF
11312 #define _REENTRANT 1
11313 EOF
11314
11315         cat >> confdefs.h <<\EOF
11316 #define THREAD_SAFE 1
11317 EOF
11318
11319         cat >> confdefs.h <<\EOF
11320 #define _THREAD_SAFE 1
11321 EOF
11322
11323         cat >> confdefs.h <<\EOF
11324 #define THREADSAFE 1
11325 EOF
11326
11327         cat >> confdefs.h <<\EOF
11328 #define _THREADSAFE 1
11329 EOF
11330
11331         cat >> confdefs.h <<\EOF
11332 #define _SGI_MP_SOURCE 1
11333 EOF
11334
11335
11336                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11337 echo "configure:11338: checking for thread specific errno" >&5
11338 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   
11342                 cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 #include <errno.h>
11346 int main() {
11347 errno = 0;
11348 ; return 0; }
11349 EOF
11350 if { (eval echo configure:11351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11351   rm -rf conftest*
11352   ol_cv_errno_thread_specific=yes
11353 else
11354   echo "configure: failed program was:" >&5
11355   cat conftest.$ac_ext >&5
11356   rm -rf conftest*
11357   ol_cv_errno_thread_specific=no
11358 fi
11359 rm -f conftest*
11360         
11361 fi
11362
11363 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11364
11365                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11366 echo "configure:11367: checking for thread specific h_errno" >&5
11367 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11368   echo $ac_n "(cached) $ac_c" 1>&6
11369 else
11370   
11371                 cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 #include <netdb.h>
11375 int main() {
11376 h_errno = 0;
11377 ; return 0; }
11378 EOF
11379 if { (eval echo configure:11380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11380   rm -rf conftest*
11381   ol_cv_h_errno_thread_specific=yes
11382 else
11383   echo "configure: failed program was:" >&5
11384   cat conftest.$ac_ext >&5
11385   rm -rf conftest*
11386   ol_cv_h_errno_thread_specific=no
11387 fi
11388 rm -f conftest*
11389         
11390 fi
11391
11392 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11393
11394         if test $ol_cv_errno_thread_specific != yes \
11395                 -o $ol_cv_h_errno_thread_specific != yes ; then
11396                 LIBS="$LTHREAD_LIBS $LIBS"
11397                 LTHREAD_LIBS=""
11398         fi
11399
11400 fi  
11401
11402 if test $ol_link_threads = no ; then
11403         if test $ol_with_threads = yes ; then
11404                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11405         fi
11406
11407         if test $ol_with_threads = auto ; then
11408                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11409                 ol_with_threads=no
11410         fi
11411
11412         cat >> confdefs.h <<\EOF
11413 #define NO_THREADS 1
11414 EOF
11415
11416         LTHREAD_LIBS=""
11417 fi
11418
11419 if test $ol_link_threads != no ; then
11420         cat >> confdefs.h <<\EOF
11421 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11422 EOF
11423
11424 fi
11425
11426 ol_link_ldbm=no 
11427
11428 if test $ol_with_ldbm_api = auto \
11429         -o $ol_with_ldbm_api = berkeley \
11430         -o $ol_with_ldbm_api = bcompat ; then
11431
11432         if test $ol_with_ldbm_api = bcompat; then \
11433                 ol_cv_berkeley_db=no
11434 for ac_hdr in db_185.h db.h
11435 do
11436 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11437 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11438 echo "configure:11439: checking for $ac_hdr" >&5
11439 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11440   echo $ac_n "(cached) $ac_c" 1>&6
11441 else
11442   cat > conftest.$ac_ext <<EOF
11443 #line 11444 "configure"
11444 #include "confdefs.h"
11445 #include <$ac_hdr>
11446 EOF
11447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11448 { (eval echo configure:11449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11450 if test -z "$ac_err"; then
11451   rm -rf conftest*
11452   eval "ac_cv_header_$ac_safe=yes"
11453 else
11454   echo "$ac_err" >&5
11455   echo "configure: failed program was:" >&5
11456   cat conftest.$ac_ext >&5
11457   rm -rf conftest*
11458   eval "ac_cv_header_$ac_safe=no"
11459 fi
11460 rm -f conftest*
11461 fi
11462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11463   echo "$ac_t""yes" 1>&6
11464     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11465   cat >> confdefs.h <<EOF
11466 #define $ac_tr_hdr 1
11467 EOF
11468  
11469 else
11470   echo "$ac_t""no" 1>&6
11471 fi
11472 done
11473
11474 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11475         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11476 echo "configure:11477: checking if Berkeley DB header compatibility" >&5
11477 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11478   echo $ac_n "(cached) $ac_c" 1>&6
11479 else
11480   
11481                 cat > conftest.$ac_ext <<EOF
11482 #line 11483 "configure"
11483 #include "confdefs.h"
11484
11485 #if HAVE_DB_185_H
11486 #       include <db_185.h>
11487 #else
11488 #       include <db.h>
11489 #endif
11490
11491  /* this check could be improved */
11492 #ifndef DB_VERSION_MAJOR
11493 #       define DB_VERSION_MAJOR 1
11494 #endif
11495
11496 #if DB_VERSION_MAJOR == 1 
11497         __db_version_1
11498 #endif
11499
11500 EOF
11501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11502   egrep "__db_version_1" >/dev/null 2>&1; then
11503   rm -rf conftest*
11504   ol_cv_header_db1=yes
11505 else
11506   rm -rf conftest*
11507   ol_cv_header_db1=no
11508 fi
11509 rm -f conftest*
11510
11511 fi
11512
11513 echo "$ac_t""$ol_cv_header_db1" 1>&6
11514
11515         if test ol_cv_header_db1=yes ; then
11516                 ol_cv_lib_db=no
11517 if test $ol_cv_lib_db = no ; then
11518         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11519 echo "configure:11520: checking for Berkeley DB link (default)" >&5
11520 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11521   echo $ac_n "(cached) $ac_c" 1>&6
11522 else
11523   
11524         ol_DB_LIB=
11525         ol_LIBS=$LIBS
11526         LIBS="$ol_DB_LIB $LIBS"
11527
11528         cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531
11532 #ifdef HAVE_DB_185_H
11533 # include <db_185.h>
11534 #else
11535 # include <db.h>
11536 #endif
11537
11538 #ifndef DB_VERSION_MAJOR
11539 # define DB_VERSION_MAJOR 1
11540 #endif
11541
11542 #ifndef NULL
11543 #define NULL ((void*)0)
11544 #endif
11545
11546 int main() {
11547
11548 #if DB_VERSION_MAJOR > 2
11549         db_env_create( NULL, 0 );
11550 #elif DB_VERSION_MAJOR > 1
11551         db_appexit( NULL );
11552 #else
11553         (void) dbopen( NULL, 0, 0, 0, NULL);
11554 #endif
11555
11556 ; return 0; }
11557 EOF
11558 if { (eval echo configure:11559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11559   rm -rf conftest*
11560   ol_cv_db_none=yes
11561 else
11562   echo "configure: failed program was:" >&5
11563   cat conftest.$ac_ext >&5
11564   rm -rf conftest*
11565   ol_cv_db_none=no
11566 fi
11567 rm -f conftest*
11568
11569         LIBS="$ol_LIBS"
11570
11571 fi
11572
11573 echo "$ac_t""$ol_cv_db_none" 1>&6
11574
11575         if test $ol_cv_db_none = yes ; then
11576                 ol_cv_lib_db=yes
11577         fi
11578 fi
11579
11580 if test $ol_cv_lib_db = no ; then
11581         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11582 echo "configure:11583: checking for Berkeley DB link (-ldb)" >&5
11583 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   
11587         ol_DB_LIB=-ldb
11588         ol_LIBS=$LIBS
11589         LIBS="$ol_DB_LIB $LIBS"
11590
11591         cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594
11595 #ifdef HAVE_DB_185_H
11596 # include <db_185.h>
11597 #else
11598 # include <db.h>
11599 #endif
11600
11601 #ifndef DB_VERSION_MAJOR
11602 # define DB_VERSION_MAJOR 1
11603 #endif
11604
11605 #ifndef NULL
11606 #define NULL ((void*)0)
11607 #endif
11608
11609 int main() {
11610
11611 #if DB_VERSION_MAJOR > 2
11612         db_env_create( NULL, 0 );
11613 #elif DB_VERSION_MAJOR > 1
11614         db_appexit( NULL );
11615 #else
11616         (void) dbopen( NULL, 0, 0, 0, NULL);
11617 #endif
11618
11619 ; return 0; }
11620 EOF
11621 if { (eval echo configure:11622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11622   rm -rf conftest*
11623   ol_cv_db_db=yes
11624 else
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   ol_cv_db_db=no
11629 fi
11630 rm -f conftest*
11631
11632         LIBS="$ol_LIBS"
11633
11634 fi
11635
11636 echo "$ac_t""$ol_cv_db_db" 1>&6
11637
11638         if test $ol_cv_db_db = yes ; then
11639                 ol_cv_lib_db=-ldb
11640         fi
11641 fi
11642
11643 if test $ol_cv_lib_db = no ; then
11644         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11645 echo "configure:11646: checking for Berkeley DB link (-ldb3)" >&5
11646 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11647   echo $ac_n "(cached) $ac_c" 1>&6
11648 else
11649   
11650         ol_DB_LIB=-ldb3
11651         ol_LIBS=$LIBS
11652         LIBS="$ol_DB_LIB $LIBS"
11653
11654         cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657
11658 #ifdef HAVE_DB_185_H
11659 # include <db_185.h>
11660 #else
11661 # include <db.h>
11662 #endif
11663
11664 #ifndef DB_VERSION_MAJOR
11665 # define DB_VERSION_MAJOR 1
11666 #endif
11667
11668 #ifndef NULL
11669 #define NULL ((void*)0)
11670 #endif
11671
11672 int main() {
11673
11674 #if DB_VERSION_MAJOR > 2
11675         db_env_create( NULL, 0 );
11676 #elif DB_VERSION_MAJOR > 1
11677         db_appexit( NULL );
11678 #else
11679         (void) dbopen( NULL, 0, 0, 0, NULL);
11680 #endif
11681
11682 ; return 0; }
11683 EOF
11684 if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11685   rm -rf conftest*
11686   ol_cv_db_db3=yes
11687 else
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   ol_cv_db_db3=no
11692 fi
11693 rm -f conftest*
11694
11695         LIBS="$ol_LIBS"
11696
11697 fi
11698
11699 echo "$ac_t""$ol_cv_db_db3" 1>&6
11700
11701         if test $ol_cv_db_db3 = yes ; then
11702                 ol_cv_lib_db=-ldb3
11703         fi
11704 fi
11705
11706 if test $ol_cv_lib_db = no ; then
11707         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11708 echo "configure:11709: checking for Berkeley DB link (-ldb2)" >&5
11709 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11710   echo $ac_n "(cached) $ac_c" 1>&6
11711 else
11712   
11713         ol_DB_LIB=-ldb2
11714         ol_LIBS=$LIBS
11715         LIBS="$ol_DB_LIB $LIBS"
11716
11717         cat > conftest.$ac_ext <<EOF
11718 #line 11719 "configure"
11719 #include "confdefs.h"
11720
11721 #ifdef HAVE_DB_185_H
11722 # include <db_185.h>
11723 #else
11724 # include <db.h>
11725 #endif
11726
11727 #ifndef DB_VERSION_MAJOR
11728 # define DB_VERSION_MAJOR 1
11729 #endif
11730
11731 #ifndef NULL
11732 #define NULL ((void*)0)
11733 #endif
11734
11735 int main() {
11736
11737 #if DB_VERSION_MAJOR > 2
11738         db_env_create( NULL, 0 );
11739 #elif DB_VERSION_MAJOR > 1
11740         db_appexit( NULL );
11741 #else
11742         (void) dbopen( NULL, 0, 0, 0, NULL);
11743 #endif
11744
11745 ; return 0; }
11746 EOF
11747 if { (eval echo configure:11748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11748   rm -rf conftest*
11749   ol_cv_db_db2=yes
11750 else
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   ol_cv_db_db2=no
11755 fi
11756 rm -f conftest*
11757
11758         LIBS="$ol_LIBS"
11759
11760 fi
11761
11762 echo "$ac_t""$ol_cv_db_db2" 1>&6
11763
11764         if test $ol_cv_db_db2 = yes ; then
11765                 ol_cv_lib_db=-ldb2
11766         fi
11767 fi
11768
11769 if test $ol_cv_lib_db = no ; then
11770         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11771 echo "configure:11772: checking for Berkeley DB link (-ldb1)" >&5
11772 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   
11776         ol_DB_LIB=-ldb1
11777         ol_LIBS=$LIBS
11778         LIBS="$ol_DB_LIB $LIBS"
11779
11780         cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783
11784 #ifdef HAVE_DB_185_H
11785 # include <db_185.h>
11786 #else
11787 # include <db.h>
11788 #endif
11789
11790 #ifndef DB_VERSION_MAJOR
11791 # define DB_VERSION_MAJOR 1
11792 #endif
11793
11794 #ifndef NULL
11795 #define NULL ((void*)0)
11796 #endif
11797
11798 int main() {
11799
11800 #if DB_VERSION_MAJOR > 2
11801         db_env_create( NULL, 0 );
11802 #elif DB_VERSION_MAJOR > 1
11803         db_appexit( NULL );
11804 #else
11805         (void) dbopen( NULL, 0, 0, 0, NULL);
11806 #endif
11807
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11811   rm -rf conftest*
11812   ol_cv_db_db1=yes
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   ol_cv_db_db1=no
11818 fi
11819 rm -f conftest*
11820
11821         LIBS="$ol_LIBS"
11822
11823 fi
11824
11825 echo "$ac_t""$ol_cv_db_db1" 1>&6
11826
11827         if test $ol_cv_db_db1 = yes ; then
11828                 ol_cv_lib_db=-ldb1
11829         fi
11830 fi
11831
11832
11833                 if test "$ol_cv_lib_db" != no ; then
11834                         ol_cv_berkeley_db=yes
11835                 fi
11836         fi
11837 fi
11838
11839         else
11840                 ol_cv_berkeley_db=no
11841 for ac_hdr in db.h
11842 do
11843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11845 echo "configure:11846: checking for $ac_hdr" >&5
11846 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11847   echo $ac_n "(cached) $ac_c" 1>&6
11848 else
11849   cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852 #include <$ac_hdr>
11853 EOF
11854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11855 { (eval echo configure:11856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11857 if test -z "$ac_err"; then
11858   rm -rf conftest*
11859   eval "ac_cv_header_$ac_safe=yes"
11860 else
11861   echo "$ac_err" >&5
11862   echo "configure: failed program was:" >&5
11863   cat conftest.$ac_ext >&5
11864   rm -rf conftest*
11865   eval "ac_cv_header_$ac_safe=no"
11866 fi
11867 rm -f conftest*
11868 fi
11869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11870   echo "$ac_t""yes" 1>&6
11871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11872   cat >> confdefs.h <<EOF
11873 #define $ac_tr_hdr 1
11874 EOF
11875  
11876 else
11877   echo "$ac_t""no" 1>&6
11878 fi
11879 done
11880
11881 if test $ac_cv_header_db_h = yes; then
11882         ol_cv_lib_db=no
11883 if test $ol_cv_lib_db = no ; then
11884         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11885 echo "configure:11886: checking for Berkeley DB link (default)" >&5
11886 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11887   echo $ac_n "(cached) $ac_c" 1>&6
11888 else
11889   
11890         ol_DB_LIB=
11891         ol_LIBS=$LIBS
11892         LIBS="$ol_DB_LIB $LIBS"
11893
11894         cat > conftest.$ac_ext <<EOF
11895 #line 11896 "configure"
11896 #include "confdefs.h"
11897
11898 #ifdef HAVE_DB_185_H
11899 # include <db_185.h>
11900 #else
11901 # include <db.h>
11902 #endif
11903
11904 #ifndef DB_VERSION_MAJOR
11905 # define DB_VERSION_MAJOR 1
11906 #endif
11907
11908 #ifndef NULL
11909 #define NULL ((void*)0)
11910 #endif
11911
11912 int main() {
11913
11914 #if DB_VERSION_MAJOR > 2
11915         db_env_create( NULL, 0 );
11916 #elif DB_VERSION_MAJOR > 1
11917         db_appexit( NULL );
11918 #else
11919         (void) dbopen( NULL, 0, 0, 0, NULL);
11920 #endif
11921
11922 ; return 0; }
11923 EOF
11924 if { (eval echo configure:11925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11925   rm -rf conftest*
11926   ol_cv_db_none=yes
11927 else
11928   echo "configure: failed program was:" >&5
11929   cat conftest.$ac_ext >&5
11930   rm -rf conftest*
11931   ol_cv_db_none=no
11932 fi
11933 rm -f conftest*
11934
11935         LIBS="$ol_LIBS"
11936
11937 fi
11938
11939 echo "$ac_t""$ol_cv_db_none" 1>&6
11940
11941         if test $ol_cv_db_none = yes ; then
11942                 ol_cv_lib_db=yes
11943         fi
11944 fi
11945
11946 if test $ol_cv_lib_db = no ; then
11947         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11948 echo "configure:11949: checking for Berkeley DB link (-ldb)" >&5
11949 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11950   echo $ac_n "(cached) $ac_c" 1>&6
11951 else
11952   
11953         ol_DB_LIB=-ldb
11954         ol_LIBS=$LIBS
11955         LIBS="$ol_DB_LIB $LIBS"
11956
11957         cat > conftest.$ac_ext <<EOF
11958 #line 11959 "configure"
11959 #include "confdefs.h"
11960
11961 #ifdef HAVE_DB_185_H
11962 # include <db_185.h>
11963 #else
11964 # include <db.h>
11965 #endif
11966
11967 #ifndef DB_VERSION_MAJOR
11968 # define DB_VERSION_MAJOR 1
11969 #endif
11970
11971 #ifndef NULL
11972 #define NULL ((void*)0)
11973 #endif
11974
11975 int main() {
11976
11977 #if DB_VERSION_MAJOR > 2
11978         db_env_create( NULL, 0 );
11979 #elif DB_VERSION_MAJOR > 1
11980         db_appexit( NULL );
11981 #else
11982         (void) dbopen( NULL, 0, 0, 0, NULL);
11983 #endif
11984
11985 ; return 0; }
11986 EOF
11987 if { (eval echo configure:11988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11988   rm -rf conftest*
11989   ol_cv_db_db=yes
11990 else
11991   echo "configure: failed program was:" >&5
11992   cat conftest.$ac_ext >&5
11993   rm -rf conftest*
11994   ol_cv_db_db=no
11995 fi
11996 rm -f conftest*
11997
11998         LIBS="$ol_LIBS"
11999
12000 fi
12001
12002 echo "$ac_t""$ol_cv_db_db" 1>&6
12003
12004         if test $ol_cv_db_db = yes ; then
12005                 ol_cv_lib_db=-ldb
12006         fi
12007 fi
12008
12009 if test $ol_cv_lib_db = no ; then
12010         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12011 echo "configure:12012: checking for Berkeley DB link (-ldb3)" >&5
12012 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12013   echo $ac_n "(cached) $ac_c" 1>&6
12014 else
12015   
12016         ol_DB_LIB=-ldb3
12017         ol_LIBS=$LIBS
12018         LIBS="$ol_DB_LIB $LIBS"
12019
12020         cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023
12024 #ifdef HAVE_DB_185_H
12025 # include <db_185.h>
12026 #else
12027 # include <db.h>
12028 #endif
12029
12030 #ifndef DB_VERSION_MAJOR
12031 # define DB_VERSION_MAJOR 1
12032 #endif
12033
12034 #ifndef NULL
12035 #define NULL ((void*)0)
12036 #endif
12037
12038 int main() {
12039
12040 #if DB_VERSION_MAJOR > 2
12041         db_env_create( NULL, 0 );
12042 #elif DB_VERSION_MAJOR > 1
12043         db_appexit( NULL );
12044 #else
12045         (void) dbopen( NULL, 0, 0, 0, NULL);
12046 #endif
12047
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   ol_cv_db_db3=yes
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   ol_cv_db_db3=no
12058 fi
12059 rm -f conftest*
12060
12061         LIBS="$ol_LIBS"
12062
12063 fi
12064
12065 echo "$ac_t""$ol_cv_db_db3" 1>&6
12066
12067         if test $ol_cv_db_db3 = yes ; then
12068                 ol_cv_lib_db=-ldb3
12069         fi
12070 fi
12071
12072 if test $ol_cv_lib_db = no ; then
12073         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12074 echo "configure:12075: checking for Berkeley DB link (-ldb2)" >&5
12075 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12076   echo $ac_n "(cached) $ac_c" 1>&6
12077 else
12078   
12079         ol_DB_LIB=-ldb2
12080         ol_LIBS=$LIBS
12081         LIBS="$ol_DB_LIB $LIBS"
12082
12083         cat > conftest.$ac_ext <<EOF
12084 #line 12085 "configure"
12085 #include "confdefs.h"
12086
12087 #ifdef HAVE_DB_185_H
12088 # include <db_185.h>
12089 #else
12090 # include <db.h>
12091 #endif
12092
12093 #ifndef DB_VERSION_MAJOR
12094 # define DB_VERSION_MAJOR 1
12095 #endif
12096
12097 #ifndef NULL
12098 #define NULL ((void*)0)
12099 #endif
12100
12101 int main() {
12102
12103 #if DB_VERSION_MAJOR > 2
12104         db_env_create( NULL, 0 );
12105 #elif DB_VERSION_MAJOR > 1
12106         db_appexit( NULL );
12107 #else
12108         (void) dbopen( NULL, 0, 0, 0, NULL);
12109 #endif
12110
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   ol_cv_db_db2=yes
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   ol_cv_db_db2=no
12121 fi
12122 rm -f conftest*
12123
12124         LIBS="$ol_LIBS"
12125
12126 fi
12127
12128 echo "$ac_t""$ol_cv_db_db2" 1>&6
12129
12130         if test $ol_cv_db_db2 = yes ; then
12131                 ol_cv_lib_db=-ldb2
12132         fi
12133 fi
12134
12135 if test $ol_cv_lib_db = no ; then
12136         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12137 echo "configure:12138: checking for Berkeley DB link (-ldb1)" >&5
12138 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141   
12142         ol_DB_LIB=-ldb1
12143         ol_LIBS=$LIBS
12144         LIBS="$ol_DB_LIB $LIBS"
12145
12146         cat > conftest.$ac_ext <<EOF
12147 #line 12148 "configure"
12148 #include "confdefs.h"
12149
12150 #ifdef HAVE_DB_185_H
12151 # include <db_185.h>
12152 #else
12153 # include <db.h>
12154 #endif
12155
12156 #ifndef DB_VERSION_MAJOR
12157 # define DB_VERSION_MAJOR 1
12158 #endif
12159
12160 #ifndef NULL
12161 #define NULL ((void*)0)
12162 #endif
12163
12164 int main() {
12165
12166 #if DB_VERSION_MAJOR > 2
12167         db_env_create( NULL, 0 );
12168 #elif DB_VERSION_MAJOR > 1
12169         db_appexit( NULL );
12170 #else
12171         (void) dbopen( NULL, 0, 0, 0, NULL);
12172 #endif
12173
12174 ; return 0; }
12175 EOF
12176 if { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12177   rm -rf conftest*
12178   ol_cv_db_db1=yes
12179 else
12180   echo "configure: failed program was:" >&5
12181   cat conftest.$ac_ext >&5
12182   rm -rf conftest*
12183   ol_cv_db_db1=no
12184 fi
12185 rm -f conftest*
12186
12187         LIBS="$ol_LIBS"
12188
12189 fi
12190
12191 echo "$ac_t""$ol_cv_db_db1" 1>&6
12192
12193         if test $ol_cv_db_db1 = yes ; then
12194                 ol_cv_lib_db=-ldb1
12195         fi
12196 fi
12197
12198
12199         if test "$ol_cv_lib_db" != no ; then
12200                 ol_cv_berkeley_db=yes
12201                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12202 echo "configure:12203: checking for Berkeley DB thread support" >&5
12203 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12204   echo $ac_n "(cached) $ac_c" 1>&6
12205 else
12206   
12207         ol_LIBS="$LIBS"
12208         if test $ol_cv_lib_db != yes ; then
12209                 LIBS="$ol_cv_lib_db"
12210         fi
12211
12212         if test "$cross_compiling" = yes; then
12213   ol_cv_berkeley_db_thread=cross
12214 else
12215   cat > conftest.$ac_ext <<EOF
12216 #line 12217 "configure"
12217 #include "confdefs.h"
12218
12219 #ifdef HAVE_DB_185_H
12220         choke me;
12221 #else
12222 #include <db.h>
12223 #endif
12224 #ifndef NULL
12225 #define NULL ((void *)0)
12226 #endif
12227 main()
12228 {
12229         int rc;
12230         u_int32_t flags = DB_CREATE | DB_THREAD;
12231
12232
12233 #if DB_VERSION_MAJOR > 2
12234         DB_ENV *env = NULL;
12235
12236         rc = db_env_create( &env, 0 );
12237
12238         if( rc == 0 ) {
12239                 rc = env->open( env, NULL, NULL, flags, 0 );
12240         }
12241
12242 #else
12243         DB_ENV env;
12244         memset( &env, '\0', sizeof(env) );
12245
12246         rc = db_appinit( NULL, NULL, &env, flags );
12247
12248         if( rc == 0 ) {
12249                 db_appexit( &env );
12250         }
12251 #endif
12252
12253         return rc;
12254 }
12255 EOF
12256 if { (eval echo configure:12257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12257 then
12258   ol_cv_berkeley_db_thread=yes
12259 else
12260   echo "configure: failed program was:" >&5
12261   cat conftest.$ac_ext >&5
12262   rm -fr conftest*
12263   ol_cv_berkeley_db_thread=no
12264 fi
12265 rm -fr conftest*
12266 fi
12267
12268
12269         LIBS="$ol_LIBS"
12270
12271         if test $ol_cv_berkeley_db_thread != no ; then
12272                 cat >> confdefs.h <<\EOF
12273 #define HAVE_BERKELEY_DB_THREAD 1
12274 EOF
12275
12276         fi
12277
12278 fi
12279
12280 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12281         fi
12282 fi
12283
12284         fi
12285
12286         if test $ol_cv_berkeley_db != no ; then
12287                 cat >> confdefs.h <<\EOF
12288 #define HAVE_BERKELEY_DB 1
12289 EOF
12290
12291
12292                 ol_link_ldbm=berkeley
12293                 ol_with_ldbm_api=db
12294
12295                 if test $ol_with_ldbm_type = hash ; then
12296                         cat >> confdefs.h <<\EOF
12297 #define LDBM_USE_DBHASH 1
12298 EOF
12299
12300                 else
12301                         cat >> confdefs.h <<\EOF
12302 #define LDBM_USE_DBBTREE 1
12303 EOF
12304
12305                 fi
12306
12307                                                 if test $ol_cv_lib_db != yes ; then
12308                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12309                 fi
12310         fi
12311 fi
12312
12313 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12314         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12315         ol_with_ldbm_api=none
12316 fi
12317
12318 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12319         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12320 echo "configure:12321: checking for MDBM library" >&5
12321 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12322   echo $ac_n "(cached) $ac_c" 1>&6
12323 else
12324         ol_LIBS="$LIBS"
12325         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12326 echo "configure:12327: checking for mdbm_set_chain" >&5
12327 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12328   echo $ac_n "(cached) $ac_c" 1>&6
12329 else
12330   cat > conftest.$ac_ext <<EOF
12331 #line 12332 "configure"
12332 #include "confdefs.h"
12333 /* System header to define __stub macros and hopefully few prototypes,
12334     which can conflict with char mdbm_set_chain(); below.  */
12335 #include <assert.h>
12336 /* Override any gcc2 internal prototype to avoid an error.  */
12337 /* We use char because int might match the return type of a gcc2
12338     builtin and then its argument prototype would still apply.  */
12339 char mdbm_set_chain();
12340 char (*f)();
12341
12342 int main() {
12343
12344 /* The GNU C library defines this for functions which it implements
12345     to always fail with ENOSYS.  Some functions are actually named
12346     something starting with __ and the normal name is an alias.  */
12347 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12348 choke me
12349 #else
12350 f = mdbm_set_chain;
12351 #endif
12352
12353 ; return 0; }
12354 EOF
12355 if { (eval echo configure:12356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12356   rm -rf conftest*
12357   eval "ac_cv_func_mdbm_set_chain=yes"
12358 else
12359   echo "configure: failed program was:" >&5
12360   cat conftest.$ac_ext >&5
12361   rm -rf conftest*
12362   eval "ac_cv_func_mdbm_set_chain=no"
12363 fi
12364 rm -f conftest*
12365 fi
12366
12367 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12368   echo "$ac_t""yes" 1>&6
12369   ol_cv_lib_mdbm=yes
12370 else
12371   echo "$ac_t""no" 1>&6
12372
12373                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12374 echo "configure:12375: checking for mdbm_set_chain in -lmdbm" >&5
12375 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12377   echo $ac_n "(cached) $ac_c" 1>&6
12378 else
12379   ac_save_LIBS="$LIBS"
12380 LIBS="-lmdbm  $LIBS"
12381 cat > conftest.$ac_ext <<EOF
12382 #line 12383 "configure"
12383 #include "confdefs.h"
12384 /* Override any gcc2 internal prototype to avoid an error.  */
12385 /* We use char because int might match the return type of a gcc2
12386     builtin and then its argument prototype would still apply.  */
12387 char mdbm_set_chain();
12388
12389 int main() {
12390 mdbm_set_chain()
12391 ; return 0; }
12392 EOF
12393 if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12394   rm -rf conftest*
12395   eval "ac_cv_lib_$ac_lib_var=yes"
12396 else
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -rf conftest*
12400   eval "ac_cv_lib_$ac_lib_var=no"
12401 fi
12402 rm -f conftest*
12403 LIBS="$ac_save_LIBS"
12404
12405 fi
12406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12407   echo "$ac_t""yes" 1>&6
12408   ol_cv_lib_mdbm=-lmdbm
12409 else
12410   echo "$ac_t""no" 1>&6
12411 ol_cv_lib_mdbm=no
12412 fi
12413
12414         
12415 fi
12416
12417         LIBS="$ol_LIBS"
12418
12419 fi
12420
12421 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12422
12423
12424  for ac_hdr in mdbm.h
12425 do
12426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12427 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12428 echo "configure:12429: checking for $ac_hdr" >&5
12429 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12430   echo $ac_n "(cached) $ac_c" 1>&6
12431 else
12432   cat > conftest.$ac_ext <<EOF
12433 #line 12434 "configure"
12434 #include "confdefs.h"
12435 #include <$ac_hdr>
12436 EOF
12437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12438 { (eval echo configure:12439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12440 if test -z "$ac_err"; then
12441   rm -rf conftest*
12442   eval "ac_cv_header_$ac_safe=yes"
12443 else
12444   echo "$ac_err" >&5
12445   echo "configure: failed program was:" >&5
12446   cat conftest.$ac_ext >&5
12447   rm -rf conftest*
12448   eval "ac_cv_header_$ac_safe=no"
12449 fi
12450 rm -f conftest*
12451 fi
12452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12453   echo "$ac_t""yes" 1>&6
12454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12455   cat >> confdefs.h <<EOF
12456 #define $ac_tr_hdr 1
12457 EOF
12458  
12459 else
12460   echo "$ac_t""no" 1>&6
12461 fi
12462 done
12463
12464  echo $ac_n "checking for db""... $ac_c" 1>&6
12465 echo "configure:12466: checking for db" >&5
12466 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12467   echo $ac_n "(cached) $ac_c" 1>&6
12468 else
12469   
12470         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12471                 ol_cv_mdbm=no
12472         else
12473                 ol_cv_mdbm=yes
12474         fi
12475
12476 fi
12477
12478 echo "$ac_t""$ol_cv_mdbm" 1>&6
12479  if test $ol_cv_mdbm = yes ; then
12480         cat >> confdefs.h <<\EOF
12481 #define HAVE_MDBM 1
12482 EOF
12483
12484  fi
12485
12486
12487         if test $ol_cv_mdbm = yes ; then
12488                 ol_link_ldbm=mdbm
12489                 ol_with_ldbm_api=mdbm
12490                 if test $ol_cv_lib_mdbm != yes ; then
12491                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12492                 fi
12493         fi
12494 fi
12495
12496 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12497         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12498 echo "configure:12499: checking for GDBM library" >&5
12499 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12500   echo $ac_n "(cached) $ac_c" 1>&6
12501 else
12502         ol_LIBS="$LIBS"
12503         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12504 echo "configure:12505: checking for gdbm_open" >&5
12505 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12506   echo $ac_n "(cached) $ac_c" 1>&6
12507 else
12508   cat > conftest.$ac_ext <<EOF
12509 #line 12510 "configure"
12510 #include "confdefs.h"
12511 /* System header to define __stub macros and hopefully few prototypes,
12512     which can conflict with char gdbm_open(); below.  */
12513 #include <assert.h>
12514 /* Override any gcc2 internal prototype to avoid an error.  */
12515 /* We use char because int might match the return type of a gcc2
12516     builtin and then its argument prototype would still apply.  */
12517 char gdbm_open();
12518 char (*f)();
12519
12520 int main() {
12521
12522 /* The GNU C library defines this for functions which it implements
12523     to always fail with ENOSYS.  Some functions are actually named
12524     something starting with __ and the normal name is an alias.  */
12525 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12526 choke me
12527 #else
12528 f = gdbm_open;
12529 #endif
12530
12531 ; return 0; }
12532 EOF
12533 if { (eval echo configure:12534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12534   rm -rf conftest*
12535   eval "ac_cv_func_gdbm_open=yes"
12536 else
12537   echo "configure: failed program was:" >&5
12538   cat conftest.$ac_ext >&5
12539   rm -rf conftest*
12540   eval "ac_cv_func_gdbm_open=no"
12541 fi
12542 rm -f conftest*
12543 fi
12544
12545 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12546   echo "$ac_t""yes" 1>&6
12547   ol_cv_lib_gdbm=yes
12548 else
12549   echo "$ac_t""no" 1>&6
12550
12551                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12552 echo "configure:12553: checking for gdbm_open in -lgdbm" >&5
12553 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12555   echo $ac_n "(cached) $ac_c" 1>&6
12556 else
12557   ac_save_LIBS="$LIBS"
12558 LIBS="-lgdbm  $LIBS"
12559 cat > conftest.$ac_ext <<EOF
12560 #line 12561 "configure"
12561 #include "confdefs.h"
12562 /* Override any gcc2 internal prototype to avoid an error.  */
12563 /* We use char because int might match the return type of a gcc2
12564     builtin and then its argument prototype would still apply.  */
12565 char gdbm_open();
12566
12567 int main() {
12568 gdbm_open()
12569 ; return 0; }
12570 EOF
12571 if { (eval echo configure:12572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12572   rm -rf conftest*
12573   eval "ac_cv_lib_$ac_lib_var=yes"
12574 else
12575   echo "configure: failed program was:" >&5
12576   cat conftest.$ac_ext >&5
12577   rm -rf conftest*
12578   eval "ac_cv_lib_$ac_lib_var=no"
12579 fi
12580 rm -f conftest*
12581 LIBS="$ac_save_LIBS"
12582
12583 fi
12584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12585   echo "$ac_t""yes" 1>&6
12586   ol_cv_lib_gdbm=-lgdbm
12587 else
12588   echo "$ac_t""no" 1>&6
12589 ol_cv_lib_gdbm=no
12590 fi
12591
12592         
12593 fi
12594
12595         LIBS="$ol_LIBS"
12596
12597 fi
12598
12599 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12600
12601
12602  for ac_hdr in gdbm.h
12603 do
12604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12606 echo "configure:12607: checking for $ac_hdr" >&5
12607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12608   echo $ac_n "(cached) $ac_c" 1>&6
12609 else
12610   cat > conftest.$ac_ext <<EOF
12611 #line 12612 "configure"
12612 #include "confdefs.h"
12613 #include <$ac_hdr>
12614 EOF
12615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12616 { (eval echo configure:12617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12618 if test -z "$ac_err"; then
12619   rm -rf conftest*
12620   eval "ac_cv_header_$ac_safe=yes"
12621 else
12622   echo "$ac_err" >&5
12623   echo "configure: failed program was:" >&5
12624   cat conftest.$ac_ext >&5
12625   rm -rf conftest*
12626   eval "ac_cv_header_$ac_safe=no"
12627 fi
12628 rm -f conftest*
12629 fi
12630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12631   echo "$ac_t""yes" 1>&6
12632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12633   cat >> confdefs.h <<EOF
12634 #define $ac_tr_hdr 1
12635 EOF
12636  
12637 else
12638   echo "$ac_t""no" 1>&6
12639 fi
12640 done
12641
12642  echo $ac_n "checking for db""... $ac_c" 1>&6
12643 echo "configure:12644: checking for db" >&5
12644 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12645   echo $ac_n "(cached) $ac_c" 1>&6
12646 else
12647   
12648         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12649                 ol_cv_gdbm=no
12650         else
12651                 ol_cv_gdbm=yes
12652         fi
12653
12654 fi
12655
12656 echo "$ac_t""$ol_cv_gdbm" 1>&6
12657  if test $ol_cv_gdbm = yes ; then
12658         cat >> confdefs.h <<\EOF
12659 #define HAVE_GDBM 1
12660 EOF
12661
12662  fi
12663
12664
12665         if test $ol_cv_gdbm = yes ; then
12666                 ol_link_ldbm=gdbm
12667                 ol_with_ldbm_api=gdbm
12668
12669                 if test $ol_cv_lib_gdbm != yes ; then
12670                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12671                 fi
12672         fi
12673 fi
12674
12675 if test $ol_with_ldbm_api = ndbm ; then
12676         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12677 echo "configure:12678: checking for NDBM library" >&5
12678 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12679   echo $ac_n "(cached) $ac_c" 1>&6
12680 else
12681         ol_LIBS="$LIBS"
12682         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12683 echo "configure:12684: checking for dbm_open" >&5
12684 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12685   echo $ac_n "(cached) $ac_c" 1>&6
12686 else
12687   cat > conftest.$ac_ext <<EOF
12688 #line 12689 "configure"
12689 #include "confdefs.h"
12690 /* System header to define __stub macros and hopefully few prototypes,
12691     which can conflict with char dbm_open(); below.  */
12692 #include <assert.h>
12693 /* Override any gcc2 internal prototype to avoid an error.  */
12694 /* We use char because int might match the return type of a gcc2
12695     builtin and then its argument prototype would still apply.  */
12696 char dbm_open();
12697 char (*f)();
12698
12699 int main() {
12700
12701 /* The GNU C library defines this for functions which it implements
12702     to always fail with ENOSYS.  Some functions are actually named
12703     something starting with __ and the normal name is an alias.  */
12704 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12705 choke me
12706 #else
12707 f = dbm_open;
12708 #endif
12709
12710 ; return 0; }
12711 EOF
12712 if { (eval echo configure:12713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12713   rm -rf conftest*
12714   eval "ac_cv_func_dbm_open=yes"
12715 else
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -rf conftest*
12719   eval "ac_cv_func_dbm_open=no"
12720 fi
12721 rm -f conftest*
12722 fi
12723
12724 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12725   echo "$ac_t""yes" 1>&6
12726   ol_cv_lib_ndbm=yes
12727 else
12728   echo "$ac_t""no" 1>&6
12729
12730                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12731 echo "configure:12732: checking for dbm_open in -lndbm" >&5
12732 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12734   echo $ac_n "(cached) $ac_c" 1>&6
12735 else
12736   ac_save_LIBS="$LIBS"
12737 LIBS="-lndbm  $LIBS"
12738 cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 /* Override any gcc2 internal prototype to avoid an error.  */
12742 /* We use char because int might match the return type of a gcc2
12743     builtin and then its argument prototype would still apply.  */
12744 char dbm_open();
12745
12746 int main() {
12747 dbm_open()
12748 ; return 0; }
12749 EOF
12750 if { (eval echo configure:12751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12751   rm -rf conftest*
12752   eval "ac_cv_lib_$ac_lib_var=yes"
12753 else
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -rf conftest*
12757   eval "ac_cv_lib_$ac_lib_var=no"
12758 fi
12759 rm -f conftest*
12760 LIBS="$ac_save_LIBS"
12761
12762 fi
12763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12764   echo "$ac_t""yes" 1>&6
12765   ol_cv_lib_ndbm=-lndbm
12766 else
12767   echo "$ac_t""no" 1>&6
12768
12769                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12770 echo "configure:12771: checking for dbm_open in -ldbm" >&5
12771 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12772 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12773   echo $ac_n "(cached) $ac_c" 1>&6
12774 else
12775   ac_save_LIBS="$LIBS"
12776 LIBS="-ldbm  $LIBS"
12777 cat > conftest.$ac_ext <<EOF
12778 #line 12779 "configure"
12779 #include "confdefs.h"
12780 /* Override any gcc2 internal prototype to avoid an error.  */
12781 /* We use char because int might match the return type of a gcc2
12782     builtin and then its argument prototype would still apply.  */
12783 char dbm_open();
12784
12785 int main() {
12786 dbm_open()
12787 ; return 0; }
12788 EOF
12789 if { (eval echo configure:12790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12790   rm -rf conftest*
12791   eval "ac_cv_lib_$ac_lib_var=yes"
12792 else
12793   echo "configure: failed program was:" >&5
12794   cat conftest.$ac_ext >&5
12795   rm -rf conftest*
12796   eval "ac_cv_lib_$ac_lib_var=no"
12797 fi
12798 rm -f conftest*
12799 LIBS="$ac_save_LIBS"
12800
12801 fi
12802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12803   echo "$ac_t""yes" 1>&6
12804   ol_cv_lib_ndbm=-ldbm
12805 else
12806   echo "$ac_t""no" 1>&6
12807 ol_cv_lib_ndbm=no
12808 fi
12809                 
12810 fi
12811
12812         
12813 fi
12814
12815         LIBS="$ol_LIBS"
12816
12817 fi
12818
12819 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12820
12821
12822  for ac_hdr in ndbm.h
12823 do
12824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12826 echo "configure:12827: checking for $ac_hdr" >&5
12827 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12828   echo $ac_n "(cached) $ac_c" 1>&6
12829 else
12830   cat > conftest.$ac_ext <<EOF
12831 #line 12832 "configure"
12832 #include "confdefs.h"
12833 #include <$ac_hdr>
12834 EOF
12835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12836 { (eval echo configure:12837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12838 if test -z "$ac_err"; then
12839   rm -rf conftest*
12840   eval "ac_cv_header_$ac_safe=yes"
12841 else
12842   echo "$ac_err" >&5
12843   echo "configure: failed program was:" >&5
12844   cat conftest.$ac_ext >&5
12845   rm -rf conftest*
12846   eval "ac_cv_header_$ac_safe=no"
12847 fi
12848 rm -f conftest*
12849 fi
12850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12851   echo "$ac_t""yes" 1>&6
12852     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12853   cat >> confdefs.h <<EOF
12854 #define $ac_tr_hdr 1
12855 EOF
12856  
12857 else
12858   echo "$ac_t""no" 1>&6
12859 fi
12860 done
12861
12862  echo $ac_n "checking for db""... $ac_c" 1>&6
12863 echo "configure:12864: checking for db" >&5
12864 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12865   echo $ac_n "(cached) $ac_c" 1>&6
12866 else
12867   
12868         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12869                 ol_cv_ndbm=no
12870         else
12871                 ol_cv_ndbm=yes
12872         fi
12873
12874 fi
12875
12876 echo "$ac_t""$ol_cv_ndbm" 1>&6
12877  if test $ol_cv_ndbm = yes ; then
12878         cat >> confdefs.h <<\EOF
12879 #define HAVE_NDBM 1
12880 EOF
12881
12882  fi
12883
12884
12885         if test $ol_cv_ndbm = yes ; then
12886                 ol_link_ldbm=ndbm
12887                 ol_with_ldbm_api=ndbm
12888
12889                 if test $ol_cv_lib_ndbm != yes ; then
12890                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12891                 fi
12892         fi
12893 fi
12894
12895 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12896         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12897         if test $ol_enable_ldbm = yes ; then
12898                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12899         fi
12900
12901         echo "configure: warning: disabling LDBM" 1>&2
12902         ol_enable_ldbm=no
12903 fi
12904
12905 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12906         LINK_BINS_DYNAMIC="yes"
12907 else
12908         LINK_BINS_DYNAMIC="no"
12909 fi
12910
12911 if test $ol_enable_wrappers != no ; then
12912         for ac_hdr in tcpd.h
12913 do
12914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12916 echo "configure:12917: checking for $ac_hdr" >&5
12917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12918   echo $ac_n "(cached) $ac_c" 1>&6
12919 else
12920   cat > conftest.$ac_ext <<EOF
12921 #line 12922 "configure"
12922 #include "confdefs.h"
12923 #include <$ac_hdr>
12924 EOF
12925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12926 { (eval echo configure:12927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12928 if test -z "$ac_err"; then
12929   rm -rf conftest*
12930   eval "ac_cv_header_$ac_safe=yes"
12931 else
12932   echo "$ac_err" >&5
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -rf conftest*
12936   eval "ac_cv_header_$ac_safe=no"
12937 fi
12938 rm -f conftest*
12939 fi
12940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12941   echo "$ac_t""yes" 1>&6
12942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12943   cat >> confdefs.h <<EOF
12944 #define $ac_tr_hdr 1
12945 EOF
12946  
12947 else
12948   echo "$ac_t""no" 1>&6
12949 fi
12950 done
12951
12952
12953         if test $ac_cv_header_tcpd_h != yes ; then
12954                 have_wrappers=no
12955         else
12956                 cat > conftest.$ac_ext <<EOF
12957 #line 12958 "configure"
12958 #include "confdefs.h"
12959
12960 int allow_severity = 0;
12961 int deny_severity  = 0;
12962                 
12963 int main() {
12964 hosts_access()
12965 ; return 0; }
12966 EOF
12967 if { (eval echo configure:12968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12968   rm -rf conftest*
12969   have_wrappers=yes
12970 else
12971   echo "configure: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   rm -rf conftest*
12974   have_wrappers=no
12975 fi
12976 rm -f conftest*
12977         fi
12978
12979         if test $have_wrappers = yes ; then
12980                 cat >> confdefs.h <<\EOF
12981 #define HAVE_TCPD 1
12982 EOF
12983
12984                 WRAP_LIBS="-lwrap"
12985
12986                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12987 echo "configure:12988: checking for main in -lnsl" >&5
12988 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12990   echo $ac_n "(cached) $ac_c" 1>&6
12991 else
12992   ac_save_LIBS="$LIBS"
12993 LIBS="-lnsl  $LIBS"
12994 cat > conftest.$ac_ext <<EOF
12995 #line 12996 "configure"
12996 #include "confdefs.h"
12997
12998 int main() {
12999 main()
13000 ; return 0; }
13001 EOF
13002 if { (eval echo configure:13003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13003   rm -rf conftest*
13004   eval "ac_cv_lib_$ac_lib_var=yes"
13005 else
13006   echo "configure: failed program was:" >&5
13007   cat conftest.$ac_ext >&5
13008   rm -rf conftest*
13009   eval "ac_cv_lib_$ac_lib_var=no"
13010 fi
13011 rm -f conftest*
13012 LIBS="$ac_save_LIBS"
13013
13014 fi
13015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13016   echo "$ac_t""yes" 1>&6
13017     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13019   cat >> confdefs.h <<EOF
13020 #define $ac_tr_lib 1
13021 EOF
13022
13023   LIBS="-lnsl $LIBS"
13024
13025 else
13026   echo "$ac_t""no" 1>&6
13027 fi
13028
13029         else
13030                 echo "configure: warning: could not find -lwrap" 1>&2
13031                 if test $ol_enable_wrappers = yes ; then
13032                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13033                 fi
13034
13035                 echo "configure: warning: disabling wrappers support" 1>&2
13036                 ol_enable_wrappers=no
13037                 WRAP_LIBS=""
13038         fi
13039 fi
13040
13041 if test $ol_enable_syslog != no ; then
13042         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13043 echo "configure:13044: checking for openlog" >&5
13044 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13045   echo $ac_n "(cached) $ac_c" 1>&6
13046 else
13047   cat > conftest.$ac_ext <<EOF
13048 #line 13049 "configure"
13049 #include "confdefs.h"
13050 /* System header to define __stub macros and hopefully few prototypes,
13051     which can conflict with char openlog(); below.  */
13052 #include <assert.h>
13053 /* Override any gcc2 internal prototype to avoid an error.  */
13054 /* We use char because int might match the return type of a gcc2
13055     builtin and then its argument prototype would still apply.  */
13056 char openlog();
13057 char (*f)();
13058
13059 int main() {
13060
13061 /* The GNU C library defines this for functions which it implements
13062     to always fail with ENOSYS.  Some functions are actually named
13063     something starting with __ and the normal name is an alias.  */
13064 #if defined (__stub_openlog) || defined (__stub___openlog)
13065 choke me
13066 #else
13067 f = openlog;
13068 #endif
13069
13070 ; return 0; }
13071 EOF
13072 if { (eval echo configure:13073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13073   rm -rf conftest*
13074   eval "ac_cv_func_openlog=yes"
13075 else
13076   echo "configure: failed program was:" >&5
13077   cat conftest.$ac_ext >&5
13078   rm -rf conftest*
13079   eval "ac_cv_func_openlog=no"
13080 fi
13081 rm -f conftest*
13082 fi
13083
13084 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13085   echo "$ac_t""yes" 1>&6
13086   :
13087 else
13088   echo "$ac_t""no" 1>&6
13089 fi
13090
13091         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13092                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13093         fi
13094         ol_enable_syslog=$ac_cv_func_openlog
13095 fi
13096
13097 if test $ol_enable_tcl != no ; then
13098         for ac_hdr in tcl.h
13099 do
13100 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13101 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13102 echo "configure:13103: checking for $ac_hdr" >&5
13103 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13104   echo $ac_n "(cached) $ac_c" 1>&6
13105 else
13106   cat > conftest.$ac_ext <<EOF
13107 #line 13108 "configure"
13108 #include "confdefs.h"
13109 #include <$ac_hdr>
13110 EOF
13111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13112 { (eval echo configure:13113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13114 if test -z "$ac_err"; then
13115   rm -rf conftest*
13116   eval "ac_cv_header_$ac_safe=yes"
13117 else
13118   echo "$ac_err" >&5
13119   echo "configure: failed program was:" >&5
13120   cat conftest.$ac_ext >&5
13121   rm -rf conftest*
13122   eval "ac_cv_header_$ac_safe=no"
13123 fi
13124 rm -f conftest*
13125 fi
13126 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13127   echo "$ac_t""yes" 1>&6
13128     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13129   cat >> confdefs.h <<EOF
13130 #define $ac_tr_hdr 1
13131 EOF
13132  
13133 else
13134   echo "$ac_t""no" 1>&6
13135 fi
13136 done
13137
13138
13139         if test $ac_cv_header_tcl_h != yes ; then
13140                 have_tcl=no
13141         else
13142                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13143                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13144 echo "configure:13145: checking for main in -l$lib" >&5
13145 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13147   echo $ac_n "(cached) $ac_c" 1>&6
13148 else
13149   ac_save_LIBS="$LIBS"
13150 LIBS="-l$lib  $LIBS"
13151 cat > conftest.$ac_ext <<EOF
13152 #line 13153 "configure"
13153 #include "confdefs.h"
13154
13155 int main() {
13156 main()
13157 ; return 0; }
13158 EOF
13159 if { (eval echo configure:13160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13160   rm -rf conftest*
13161   eval "ac_cv_lib_$ac_lib_var=yes"
13162 else
13163   echo "configure: failed program was:" >&5
13164   cat conftest.$ac_ext >&5
13165   rm -rf conftest*
13166   eval "ac_cv_lib_$ac_lib_var=no"
13167 fi
13168 rm -f conftest*
13169 LIBS="$ac_save_LIBS"
13170
13171 fi
13172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13173   echo "$ac_t""yes" 1>&6
13174   have_tcl=yes
13175                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13176                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13177                            else
13178                                MOD_TCL_LIB="-l${lib}"
13179                            fi;break
13180 else
13181   echo "$ac_t""no" 1>&6
13182 have_tcl=no
13183 fi
13184
13185                 done
13186         fi
13187
13188         if test $have_tcl != yes ; then
13189                 echo "configure: warning: could not find -ltcl" 1>&2
13190                 if test $ol_enable_tcl = yes ; then
13191                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13192                 fi
13193
13194                 ol_enable_tcl=no
13195         fi
13196 fi
13197
13198 ol_link_termcap=no
13199 for ac_hdr in termcap.h ncurses.h
13200 do
13201 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13202 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13203 echo "configure:13204: checking for $ac_hdr" >&5
13204 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13205   echo $ac_n "(cached) $ac_c" 1>&6
13206 else
13207   cat > conftest.$ac_ext <<EOF
13208 #line 13209 "configure"
13209 #include "confdefs.h"
13210 #include <$ac_hdr>
13211 EOF
13212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13213 { (eval echo configure:13214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13215 if test -z "$ac_err"; then
13216   rm -rf conftest*
13217   eval "ac_cv_header_$ac_safe=yes"
13218 else
13219   echo "$ac_err" >&5
13220   echo "configure: failed program was:" >&5
13221   cat conftest.$ac_ext >&5
13222   rm -rf conftest*
13223   eval "ac_cv_header_$ac_safe=no"
13224 fi
13225 rm -f conftest*
13226 fi
13227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13228   echo "$ac_t""yes" 1>&6
13229     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13230   cat >> confdefs.h <<EOF
13231 #define $ac_tr_hdr 1
13232 EOF
13233  
13234 else
13235   echo "$ac_t""no" 1>&6
13236 fi
13237 done
13238
13239
13240 if test $ol_link_termcap = no ; then
13241         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13242 echo "configure:13243: checking for tputs in -ltermcap" >&5
13243 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13245   echo $ac_n "(cached) $ac_c" 1>&6
13246 else
13247   ac_save_LIBS="$LIBS"
13248 LIBS="-ltermcap  $LIBS"
13249 cat > conftest.$ac_ext <<EOF
13250 #line 13251 "configure"
13251 #include "confdefs.h"
13252 /* Override any gcc2 internal prototype to avoid an error.  */
13253 /* We use char because int might match the return type of a gcc2
13254     builtin and then its argument prototype would still apply.  */
13255 char tputs();
13256
13257 int main() {
13258 tputs()
13259 ; return 0; }
13260 EOF
13261 if { (eval echo configure:13262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13262   rm -rf conftest*
13263   eval "ac_cv_lib_$ac_lib_var=yes"
13264 else
13265   echo "configure: failed program was:" >&5
13266   cat conftest.$ac_ext >&5
13267   rm -rf conftest*
13268   eval "ac_cv_lib_$ac_lib_var=no"
13269 fi
13270 rm -f conftest*
13271 LIBS="$ac_save_LIBS"
13272
13273 fi
13274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13275   echo "$ac_t""yes" 1>&6
13276   have_termcap=yes
13277 else
13278   echo "$ac_t""no" 1>&6
13279 have_termcap=no
13280 fi
13281
13282         if test $have_termcap = yes ; then
13283                 cat >> confdefs.h <<\EOF
13284 #define HAVE_TERMCAP 1
13285 EOF
13286
13287                 ol_link_termcap=yes
13288                 TERMCAP_LIBS=-ltermcap
13289         fi
13290 fi
13291
13292 if test $ol_link_termcap = no ; then
13293         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13294 echo "configure:13295: checking for initscr in -lncurses" >&5
13295 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13297   echo $ac_n "(cached) $ac_c" 1>&6
13298 else
13299   ac_save_LIBS="$LIBS"
13300 LIBS="-lncurses  $LIBS"
13301 cat > conftest.$ac_ext <<EOF
13302 #line 13303 "configure"
13303 #include "confdefs.h"
13304 /* Override any gcc2 internal prototype to avoid an error.  */
13305 /* We use char because int might match the return type of a gcc2
13306     builtin and then its argument prototype would still apply.  */
13307 char initscr();
13308
13309 int main() {
13310 initscr()
13311 ; return 0; }
13312 EOF
13313 if { (eval echo configure:13314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13314   rm -rf conftest*
13315   eval "ac_cv_lib_$ac_lib_var=yes"
13316 else
13317   echo "configure: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   rm -rf conftest*
13320   eval "ac_cv_lib_$ac_lib_var=no"
13321 fi
13322 rm -f conftest*
13323 LIBS="$ac_save_LIBS"
13324
13325 fi
13326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13327   echo "$ac_t""yes" 1>&6
13328   have_ncurses=yes
13329 else
13330   echo "$ac_t""no" 1>&6
13331 have_ncurses=no
13332 fi
13333
13334         if test $have_ncurses = yes ; then
13335                 cat >> confdefs.h <<\EOF
13336 #define HAVE_NCURSES 1
13337 EOF
13338
13339                 ol_link_termcap=yes
13340                 TERMCAP_LIBS=-lncurses
13341         fi
13342 fi
13343
13344 if test $ol_link_termcap = no ; then
13345         cat >> confdefs.h <<\EOF
13346 #define NO_TERMCAP 1
13347 EOF
13348
13349         TERMCAP_LIBS=
13350 fi
13351
13352 ol_link_sasl=no
13353 ol_link_spasswd=no
13354 if test $ol_with_cyrus_sasl != no ; then
13355         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13356 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13357 echo "configure:13358: checking for sasl.h" >&5
13358 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13359   echo $ac_n "(cached) $ac_c" 1>&6
13360 else
13361   cat > conftest.$ac_ext <<EOF
13362 #line 13363 "configure"
13363 #include "confdefs.h"
13364 #include <sasl.h>
13365 EOF
13366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13367 { (eval echo configure:13368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13369 if test -z "$ac_err"; then
13370   rm -rf conftest*
13371   eval "ac_cv_header_$ac_safe=yes"
13372 else
13373   echo "$ac_err" >&5
13374   echo "configure: failed program was:" >&5
13375   cat conftest.$ac_ext >&5
13376   rm -rf conftest*
13377   eval "ac_cv_header_$ac_safe=no"
13378 fi
13379 rm -f conftest*
13380 fi
13381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13382   echo "$ac_t""yes" 1>&6
13383   :
13384 else
13385   echo "$ac_t""no" 1>&6
13386 fi
13387
13388
13389         if test $ac_cv_header_sasl_h = yes ; then
13390                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13391 echo "configure:13392: checking for sasl_client_init in -lsasl" >&5
13392 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13394   echo $ac_n "(cached) $ac_c" 1>&6
13395 else
13396   ac_save_LIBS="$LIBS"
13397 LIBS="-lsasl  $LIBS"
13398 cat > conftest.$ac_ext <<EOF
13399 #line 13400 "configure"
13400 #include "confdefs.h"
13401 /* Override any gcc2 internal prototype to avoid an error.  */
13402 /* We use char because int might match the return type of a gcc2
13403     builtin and then its argument prototype would still apply.  */
13404 char sasl_client_init();
13405
13406 int main() {
13407 sasl_client_init()
13408 ; return 0; }
13409 EOF
13410 if { (eval echo configure:13411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13411   rm -rf conftest*
13412   eval "ac_cv_lib_$ac_lib_var=yes"
13413 else
13414   echo "configure: failed program was:" >&5
13415   cat conftest.$ac_ext >&5
13416   rm -rf conftest*
13417   eval "ac_cv_lib_$ac_lib_var=no"
13418 fi
13419 rm -f conftest*
13420 LIBS="$ac_save_LIBS"
13421
13422 fi
13423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13424   echo "$ac_t""yes" 1>&6
13425   have_cyrus_sasl=yes
13426 else
13427   echo "$ac_t""no" 1>&6
13428 have_cyrus_sasl=no
13429 fi
13430
13431
13432                 if test $have_cyrus_sasl != no ; then
13433                         SASL_LIBS="-lsasl"
13434                         cat >> confdefs.h <<\EOF
13435 #define HAVE_CYRUS_SASL 1
13436 EOF
13437
13438                         ol_link_sasl=yes
13439                 fi
13440         fi
13441
13442         if test $ol_link_sasl = no ; then
13443                 if test $ol_with_cyrus_sasl != auto ; then
13444                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13445                 else
13446                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13447                         echo "configure: warning: SASL authentication not supported!" 1>&2
13448                         if test $ol_link_tls = no ; then
13449                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13450                         fi
13451                 fi
13452         fi
13453 else
13454         echo "configure: warning: SASL authentication not supported!" 1>&2
13455         if test $ol_link_tls = no ; then
13456                 echo "configure: warning: Strong authentication not supported!" 1>&2
13457         fi
13458 fi
13459
13460 if test $cross_compiling != yes ; then
13461         dev=no
13462         if test -r /dev/urandom ; then
13463                 dev="/dev/urandom";
13464         elif test -r /idev/urandom ; then
13465                 dev="/idev/urandom";
13466         elif test -r /dev/srandom ; then
13467                 dev="/dev/srandom";
13468         elif test -r /dev/random ; then
13469                 dev="/dev/random";
13470         elif test -r /idev/random ; then
13471                 dev="/idev/random";
13472         fi
13473
13474         if test $dev != no ; then
13475                 cat >> confdefs.h <<EOF
13476 #define URANDOM_DEVICE "$dev"
13477 EOF
13478
13479         fi
13480 fi
13481
13482 ol_link_fetch=no
13483 if test $ol_with_fetch != no ; then
13484         ol_LIBS=$LIBS
13485 LIBS="-lfetch -lcom_err $LIBS"
13486 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13487 echo "configure:13488: checking fetch(3) library" >&5
13488 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13489   echo $ac_n "(cached) $ac_c" 1>&6
13490 else
13491   
13492         cat > conftest.$ac_ext <<EOF
13493 #line 13494 "configure"
13494 #include "confdefs.h"
13495
13496 #include <sys/param.h>
13497 #include <stdio.h>
13498 #include <fetch.h>
13499 int main() {
13500 struct url *u = fetchParseURL("file:///"); 
13501 ; return 0; }
13502 EOF
13503 if { (eval echo configure:13504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13504   rm -rf conftest*
13505   ol_cv_lib_fetch=yes
13506 else
13507   echo "configure: failed program was:" >&5
13508   cat conftest.$ac_ext >&5
13509   rm -rf conftest*
13510   ol_cv_lib_fetch=no
13511 fi
13512 rm -f conftest*
13513 fi
13514
13515 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13516 LIBS=$ol_LIBS
13517 if test $ol_cv_lib_fetch != no ; then
13518         ol_link_fetch="-lfetch -lcom_err"
13519         cat >> confdefs.h <<\EOF
13520 #define HAVE_FETCH 1
13521 EOF
13522
13523 fi
13524
13525
13526         if test $ol_cv_lib_fetch != no ; then
13527                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13528                 ol_link_fetch=freebsd
13529
13530         elif test $ol_with_fetch != auto ; then
13531                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13532         fi 
13533 fi
13534
13535 ol_link_readline=no
13536 if test $ol_with_readline != no ; then
13537         for ac_hdr in readline/readline.h readline/history.h
13538 do
13539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13541 echo "configure:13542: checking for $ac_hdr" >&5
13542 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13543   echo $ac_n "(cached) $ac_c" 1>&6
13544 else
13545   cat > conftest.$ac_ext <<EOF
13546 #line 13547 "configure"
13547 #include "confdefs.h"
13548 #include <$ac_hdr>
13549 EOF
13550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13551 { (eval echo configure:13552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13553 if test -z "$ac_err"; then
13554   rm -rf conftest*
13555   eval "ac_cv_header_$ac_safe=yes"
13556 else
13557   echo "$ac_err" >&5
13558   echo "configure: failed program was:" >&5
13559   cat conftest.$ac_ext >&5
13560   rm -rf conftest*
13561   eval "ac_cv_header_$ac_safe=no"
13562 fi
13563 rm -f conftest*
13564 fi
13565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13566   echo "$ac_t""yes" 1>&6
13567     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13568   cat >> confdefs.h <<EOF
13569 #define $ac_tr_hdr 1
13570 EOF
13571  
13572 else
13573   echo "$ac_t""no" 1>&6
13574 fi
13575 done
13576
13577
13578         if test $ac_cv_header_readline_readline_h = yes ; then
13579                 save_LIBS="$LIBS"
13580                 LIBS="$TERMCAP_LIBS $LIBS"
13581                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13582 echo "configure:13583: checking for readline in -lreadline" >&5
13583 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13585   echo $ac_n "(cached) $ac_c" 1>&6
13586 else
13587   ac_save_LIBS="$LIBS"
13588 LIBS="-lreadline  $LIBS"
13589 cat > conftest.$ac_ext <<EOF
13590 #line 13591 "configure"
13591 #include "confdefs.h"
13592 /* Override any gcc2 internal prototype to avoid an error.  */
13593 /* We use char because int might match the return type of a gcc2
13594     builtin and then its argument prototype would still apply.  */
13595 char readline();
13596
13597 int main() {
13598 readline()
13599 ; return 0; }
13600 EOF
13601 if { (eval echo configure:13602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13602   rm -rf conftest*
13603   eval "ac_cv_lib_$ac_lib_var=yes"
13604 else
13605   echo "configure: failed program was:" >&5
13606   cat conftest.$ac_ext >&5
13607   rm -rf conftest*
13608   eval "ac_cv_lib_$ac_lib_var=no"
13609 fi
13610 rm -f conftest*
13611 LIBS="$ac_save_LIBS"
13612
13613 fi
13614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13615   echo "$ac_t""yes" 1>&6
13616   have_readline=yes
13617 else
13618   echo "$ac_t""no" 1>&6
13619 have_readline=no
13620 fi
13621
13622                 LIBS="$save_LIBS"
13623                         
13624                 if test $have_readline = yes ; then
13625                         ol_with_readline=found
13626                         ol_link_readline=yes
13627
13628                         READLINE_LIBS="-lreadline"
13629                 fi
13630         fi
13631 fi
13632
13633 if test $ol_link_readline = yes ; then
13634         cat >> confdefs.h <<\EOF
13635 #define HAVE_READLINE 1
13636 EOF
13637
13638 fi
13639
13640
13641 if test $ol_enable_crypt != no ; then
13642         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13643 echo "configure:13644: checking for crypt" >&5
13644 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13645   echo $ac_n "(cached) $ac_c" 1>&6
13646 else
13647   cat > conftest.$ac_ext <<EOF
13648 #line 13649 "configure"
13649 #include "confdefs.h"
13650 /* System header to define __stub macros and hopefully few prototypes,
13651     which can conflict with char crypt(); below.  */
13652 #include <assert.h>
13653 /* Override any gcc2 internal prototype to avoid an error.  */
13654 /* We use char because int might match the return type of a gcc2
13655     builtin and then its argument prototype would still apply.  */
13656 char crypt();
13657 char (*f)();
13658
13659 int main() {
13660
13661 /* The GNU C library defines this for functions which it implements
13662     to always fail with ENOSYS.  Some functions are actually named
13663     something starting with __ and the normal name is an alias.  */
13664 #if defined (__stub_crypt) || defined (__stub___crypt)
13665 choke me
13666 #else
13667 f = crypt;
13668 #endif
13669
13670 ; return 0; }
13671 EOF
13672 if { (eval echo configure:13673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13673   rm -rf conftest*
13674   eval "ac_cv_func_crypt=yes"
13675 else
13676   echo "configure: failed program was:" >&5
13677   cat conftest.$ac_ext >&5
13678   rm -rf conftest*
13679   eval "ac_cv_func_crypt=no"
13680 fi
13681 rm -f conftest*
13682 fi
13683
13684 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13685   echo "$ac_t""yes" 1>&6
13686   have_crypt=yes
13687 else
13688   echo "$ac_t""no" 1>&6
13689
13690                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13691 echo "configure:13692: checking for crypt in -lcrypt" >&5
13692 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13693 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13694   echo $ac_n "(cached) $ac_c" 1>&6
13695 else
13696   ac_save_LIBS="$LIBS"
13697 LIBS="-lcrypt  $LIBS"
13698 cat > conftest.$ac_ext <<EOF
13699 #line 13700 "configure"
13700 #include "confdefs.h"
13701 /* Override any gcc2 internal prototype to avoid an error.  */
13702 /* We use char because int might match the return type of a gcc2
13703     builtin and then its argument prototype would still apply.  */
13704 char crypt();
13705
13706 int main() {
13707 crypt()
13708 ; return 0; }
13709 EOF
13710 if { (eval echo configure:13711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13711   rm -rf conftest*
13712   eval "ac_cv_lib_$ac_lib_var=yes"
13713 else
13714   echo "configure: failed program was:" >&5
13715   cat conftest.$ac_ext >&5
13716   rm -rf conftest*
13717   eval "ac_cv_lib_$ac_lib_var=no"
13718 fi
13719 rm -f conftest*
13720 LIBS="$ac_save_LIBS"
13721
13722 fi
13723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13724   echo "$ac_t""yes" 1>&6
13725   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13726                         have_crypt=yes
13727 else
13728   echo "$ac_t""no" 1>&6
13729 have_crypt=no
13730 fi
13731
13732 fi
13733
13734
13735         if test $have_crypt = yes ; then
13736                 cat >> confdefs.h <<\EOF
13737 #define HAVE_CRYPT 1
13738 EOF
13739
13740         else
13741                 echo "configure: warning: could not find crypt" 1>&2
13742                 if test $ol_enable_crypt = yes ; then
13743                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13744                 fi
13745
13746                 echo "configure: warning: disabling crypt support" 1>&2
13747                 ol_enable_crypt=no
13748         fi
13749 fi
13750
13751 if test $ol_enable_proctitle != no ; then
13752         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13753 echo "configure:13754: checking for setproctitle" >&5
13754 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13755   echo $ac_n "(cached) $ac_c" 1>&6
13756 else
13757   cat > conftest.$ac_ext <<EOF
13758 #line 13759 "configure"
13759 #include "confdefs.h"
13760 /* System header to define __stub macros and hopefully few prototypes,
13761     which can conflict with char setproctitle(); below.  */
13762 #include <assert.h>
13763 /* Override any gcc2 internal prototype to avoid an error.  */
13764 /* We use char because int might match the return type of a gcc2
13765     builtin and then its argument prototype would still apply.  */
13766 char setproctitle();
13767 char (*f)();
13768
13769 int main() {
13770
13771 /* The GNU C library defines this for functions which it implements
13772     to always fail with ENOSYS.  Some functions are actually named
13773     something starting with __ and the normal name is an alias.  */
13774 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13775 choke me
13776 #else
13777 f = setproctitle;
13778 #endif
13779
13780 ; return 0; }
13781 EOF
13782 if { (eval echo configure:13783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13783   rm -rf conftest*
13784   eval "ac_cv_func_setproctitle=yes"
13785 else
13786   echo "configure: failed program was:" >&5
13787   cat conftest.$ac_ext >&5
13788   rm -rf conftest*
13789   eval "ac_cv_func_setproctitle=no"
13790 fi
13791 rm -f conftest*
13792 fi
13793
13794 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13795   echo "$ac_t""yes" 1>&6
13796   have_setproctitle=yes
13797 else
13798   echo "$ac_t""no" 1>&6
13799
13800                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13801 echo "configure:13802: checking for setproctitle in -lutil" >&5
13802 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13804   echo $ac_n "(cached) $ac_c" 1>&6
13805 else
13806   ac_save_LIBS="$LIBS"
13807 LIBS="-lutil  $LIBS"
13808 cat > conftest.$ac_ext <<EOF
13809 #line 13810 "configure"
13810 #include "confdefs.h"
13811 /* Override any gcc2 internal prototype to avoid an error.  */
13812 /* We use char because int might match the return type of a gcc2
13813     builtin and then its argument prototype would still apply.  */
13814 char setproctitle();
13815
13816 int main() {
13817 setproctitle()
13818 ; return 0; }
13819 EOF
13820 if { (eval echo configure:13821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13821   rm -rf conftest*
13822   eval "ac_cv_lib_$ac_lib_var=yes"
13823 else
13824   echo "configure: failed program was:" >&5
13825   cat conftest.$ac_ext >&5
13826   rm -rf conftest*
13827   eval "ac_cv_lib_$ac_lib_var=no"
13828 fi
13829 rm -f conftest*
13830 LIBS="$ac_save_LIBS"
13831
13832 fi
13833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13834   echo "$ac_t""yes" 1>&6
13835   have_setproctitle=yes
13836                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13837 else
13838   echo "$ac_t""no" 1>&6
13839 have_setproctitle=no
13840                         LIBOBJS="$LIBOBJS setproctitle.o"
13841                         LIBSRCS="$LIBSRCS setproctitle.c"
13842 fi
13843
13844 fi
13845
13846
13847         if test $have_setproctitle = yes ; then
13848                 cat >> confdefs.h <<\EOF
13849 #define HAVE_SETPROCTITLE 1
13850 EOF
13851
13852         fi
13853 fi
13854
13855 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13856 echo "configure:13857: checking for ANSI C header files" >&5
13857 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13858   echo $ac_n "(cached) $ac_c" 1>&6
13859 else
13860   cat > conftest.$ac_ext <<EOF
13861 #line 13862 "configure"
13862 #include "confdefs.h"
13863 #include <stdlib.h>
13864 #include <stdarg.h>
13865 #include <string.h>
13866 #include <float.h>
13867 EOF
13868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13869 { (eval echo configure:13870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13871 if test -z "$ac_err"; then
13872   rm -rf conftest*
13873   ac_cv_header_stdc=yes
13874 else
13875   echo "$ac_err" >&5
13876   echo "configure: failed program was:" >&5
13877   cat conftest.$ac_ext >&5
13878   rm -rf conftest*
13879   ac_cv_header_stdc=no
13880 fi
13881 rm -f conftest*
13882
13883 if test $ac_cv_header_stdc = yes; then
13884   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13885 cat > conftest.$ac_ext <<EOF
13886 #line 13887 "configure"
13887 #include "confdefs.h"
13888 #include <string.h>
13889 EOF
13890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13891   egrep "memchr" >/dev/null 2>&1; then
13892   :
13893 else
13894   rm -rf conftest*
13895   ac_cv_header_stdc=no
13896 fi
13897 rm -f conftest*
13898
13899 fi
13900
13901 if test $ac_cv_header_stdc = yes; then
13902   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13903 cat > conftest.$ac_ext <<EOF
13904 #line 13905 "configure"
13905 #include "confdefs.h"
13906 #include <stdlib.h>
13907 EOF
13908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13909   egrep "free" >/dev/null 2>&1; then
13910   :
13911 else
13912   rm -rf conftest*
13913   ac_cv_header_stdc=no
13914 fi
13915 rm -f conftest*
13916
13917 fi
13918
13919 if test $ac_cv_header_stdc = yes; then
13920   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13921 if test "$cross_compiling" = yes; then
13922   :
13923 else
13924   cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 #include <ctype.h>
13928 #if ((' ' & 0x0FF) == 0x020)
13929 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13930 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13931 #else
13932 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13933  || ('j' <= (c) && (c) <= 'r') \
13934  || ('s' <= (c) && (c) <= 'z'))
13935 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13936 #endif
13937 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13938 int main () { int i; for (i = 0; i < 256; i++)
13939 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13940 exit (0); }
13941
13942 EOF
13943 if { (eval echo configure:13944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13944 then
13945   :
13946 else
13947   echo "configure: failed program was:" >&5
13948   cat conftest.$ac_ext >&5
13949   rm -fr conftest*
13950   ac_cv_header_stdc=no
13951 fi
13952 rm -fr conftest*
13953 fi
13954
13955 fi
13956 fi
13957
13958 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13959 if test $ac_cv_header_stdc = yes; then
13960   cat >> confdefs.h <<\EOF
13961 #define STDC_HEADERS 1
13962 EOF
13963
13964 fi
13965
13966 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13967 echo "configure:13968: checking for mode_t" >&5
13968 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13969   echo $ac_n "(cached) $ac_c" 1>&6
13970 else
13971   cat > conftest.$ac_ext <<EOF
13972 #line 13973 "configure"
13973 #include "confdefs.h"
13974 #include <sys/types.h>
13975 #if STDC_HEADERS
13976 #include <stdlib.h>
13977 #include <stddef.h>
13978 #endif
13979
13980 EOF
13981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13982   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13983   rm -rf conftest*
13984   eval "ac_cv_type_mode_t=yes"
13985 else
13986   rm -rf conftest*
13987   eval "ac_cv_type_mode_t=no"
13988 fi
13989 rm -f conftest*
13990
13991 fi
13992 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13993   echo "$ac_t""yes" 1>&6
13994 else
13995   echo "$ac_t""no" 1>&6
13996   cat >> confdefs.h <<EOF
13997 #define mode_t int
13998 EOF
13999
14000 fi
14001
14002 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14003 echo "configure:14004: checking for off_t" >&5
14004 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14005   echo $ac_n "(cached) $ac_c" 1>&6
14006 else
14007   cat > conftest.$ac_ext <<EOF
14008 #line 14009 "configure"
14009 #include "confdefs.h"
14010 #include <sys/types.h>
14011 #if STDC_HEADERS
14012 #include <stdlib.h>
14013 #include <stddef.h>
14014 #endif
14015
14016 EOF
14017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14018   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14019   rm -rf conftest*
14020   eval "ac_cv_type_off_t=yes"
14021 else
14022   rm -rf conftest*
14023   eval "ac_cv_type_off_t=no"
14024 fi
14025 rm -f conftest*
14026
14027 fi
14028 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14029   echo "$ac_t""yes" 1>&6
14030 else
14031   echo "$ac_t""no" 1>&6
14032   cat >> confdefs.h <<EOF
14033 #define off_t long
14034 EOF
14035
14036 fi
14037
14038 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14039 echo "configure:14040: checking for pid_t" >&5
14040 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14041   echo $ac_n "(cached) $ac_c" 1>&6
14042 else
14043   cat > conftest.$ac_ext <<EOF
14044 #line 14045 "configure"
14045 #include "confdefs.h"
14046 #include <sys/types.h>
14047 #if STDC_HEADERS
14048 #include <stdlib.h>
14049 #include <stddef.h>
14050 #endif
14051
14052 EOF
14053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14054   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14055   rm -rf conftest*
14056   eval "ac_cv_type_pid_t=yes"
14057 else
14058   rm -rf conftest*
14059   eval "ac_cv_type_pid_t=no"
14060 fi
14061 rm -f conftest*
14062
14063 fi
14064 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14065   echo "$ac_t""yes" 1>&6
14066 else
14067   echo "$ac_t""no" 1>&6
14068   cat >> confdefs.h <<EOF
14069 #define pid_t int
14070 EOF
14071
14072 fi
14073
14074 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14075 echo "configure:14076: checking for ptrdiff_t" >&5
14076 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14077   echo $ac_n "(cached) $ac_c" 1>&6
14078 else
14079   cat > conftest.$ac_ext <<EOF
14080 #line 14081 "configure"
14081 #include "confdefs.h"
14082 #include <stddef.h>
14083 int main() {
14084 ptrdiff_t p
14085 ; return 0; }
14086 EOF
14087 if { (eval echo configure:14088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14088   rm -rf conftest*
14089   am_cv_type_ptrdiff_t=yes
14090 else
14091   echo "configure: failed program was:" >&5
14092   cat conftest.$ac_ext >&5
14093   rm -rf conftest*
14094   am_cv_type_ptrdiff_t=no
14095 fi
14096 rm -f conftest*
14097 fi
14098
14099 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14100    if test $am_cv_type_ptrdiff_t = yes; then
14101      cat >> confdefs.h <<\EOF
14102 #define HAVE_PTRDIFF_T 1
14103 EOF
14104
14105    fi
14106
14107 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14108 echo "configure:14109: checking return type of signal handlers" >&5
14109 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14110   echo $ac_n "(cached) $ac_c" 1>&6
14111 else
14112   cat > conftest.$ac_ext <<EOF
14113 #line 14114 "configure"
14114 #include "confdefs.h"
14115 #include <sys/types.h>
14116 #include <signal.h>
14117 #ifdef signal
14118 #undef signal
14119 #endif
14120 #ifdef __cplusplus
14121 extern "C" void (*signal (int, void (*)(int)))(int);
14122 #else
14123 void (*signal ()) ();
14124 #endif
14125
14126 int main() {
14127 int i;
14128 ; return 0; }
14129 EOF
14130 if { (eval echo configure:14131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14131   rm -rf conftest*
14132   ac_cv_type_signal=void
14133 else
14134   echo "configure: failed program was:" >&5
14135   cat conftest.$ac_ext >&5
14136   rm -rf conftest*
14137   ac_cv_type_signal=int
14138 fi
14139 rm -f conftest*
14140 fi
14141
14142 echo "$ac_t""$ac_cv_type_signal" 1>&6
14143 cat >> confdefs.h <<EOF
14144 #define RETSIGTYPE $ac_cv_type_signal
14145 EOF
14146
14147
14148 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14149 echo "configure:14150: checking for size_t" >&5
14150 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14151   echo $ac_n "(cached) $ac_c" 1>&6
14152 else
14153   cat > conftest.$ac_ext <<EOF
14154 #line 14155 "configure"
14155 #include "confdefs.h"
14156 #include <sys/types.h>
14157 #if STDC_HEADERS
14158 #include <stdlib.h>
14159 #include <stddef.h>
14160 #endif
14161
14162 EOF
14163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14164   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14165   rm -rf conftest*
14166   eval "ac_cv_type_size_t=yes"
14167 else
14168   rm -rf conftest*
14169   eval "ac_cv_type_size_t=no"
14170 fi
14171 rm -f conftest*
14172
14173 fi
14174 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14175   echo "$ac_t""yes" 1>&6
14176 else
14177   echo "$ac_t""no" 1>&6
14178   cat >> confdefs.h <<EOF
14179 #define size_t unsigned
14180 EOF
14181
14182 fi
14183
14184
14185 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14186 echo "configure:14187: checking for ssize_t" >&5
14187 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14188   echo $ac_n "(cached) $ac_c" 1>&6
14189 else
14190   cat > conftest.$ac_ext <<EOF
14191 #line 14192 "configure"
14192 #include "confdefs.h"
14193 #include <sys/types.h>
14194 #if STDC_HEADERS
14195 #include <stdlib.h>
14196 #include <stddef.h>
14197 #endif
14198
14199 EOF
14200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14201   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14202   rm -rf conftest*
14203   eval "ac_cv_type_ssize_t=yes"
14204 else
14205   rm -rf conftest*
14206   eval "ac_cv_type_ssize_t=no"
14207 fi
14208 rm -f conftest*
14209
14210 fi
14211 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14212   echo "$ac_t""yes" 1>&6
14213 else
14214   echo "$ac_t""no" 1>&6
14215   cat >> confdefs.h <<EOF
14216 #define ssize_t signed int
14217 EOF
14218
14219 fi
14220
14221 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14222 echo "configure:14223: checking for caddr_t" >&5
14223 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14224   echo $ac_n "(cached) $ac_c" 1>&6
14225 else
14226   cat > conftest.$ac_ext <<EOF
14227 #line 14228 "configure"
14228 #include "confdefs.h"
14229 #include <sys/types.h>
14230 #if STDC_HEADERS
14231 #include <stdlib.h>
14232 #include <stddef.h>
14233 #endif
14234
14235 EOF
14236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14237   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14238   rm -rf conftest*
14239   eval "ac_cv_type_caddr_t=yes"
14240 else
14241   rm -rf conftest*
14242   eval "ac_cv_type_caddr_t=no"
14243 fi
14244 rm -f conftest*
14245
14246 fi
14247 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14248   echo "$ac_t""yes" 1>&6
14249 else
14250   echo "$ac_t""no" 1>&6
14251   cat >> confdefs.h <<EOF
14252 #define caddr_t char *
14253 EOF
14254
14255 fi
14256
14257
14258 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14259 echo "configure:14260: checking for socklen_t" >&5
14260 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14261   echo $ac_n "(cached) $ac_c" 1>&6
14262 else
14263   cat > conftest.$ac_ext <<EOF
14264 #line 14265 "configure"
14265 #include "confdefs.h"
14266
14267 #ifdef HAVE_SYS_TYPES_H
14268 #include <sys/types.h>
14269 #endif
14270 #ifdef HAVE_SYS_SOCKET_H
14271 #include <sys/socket.h>
14272 #endif
14273
14274 int main() {
14275 socklen_t len;
14276 ; return 0; }
14277 EOF
14278 if { (eval echo configure:14279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14279   rm -rf conftest*
14280   ol_cv_type_socklen_t=yes
14281 else
14282   echo "configure: failed program was:" >&5
14283   cat conftest.$ac_ext >&5
14284   rm -rf conftest*
14285   ol_cv_type_socklen_t=no
14286 fi
14287 rm -f conftest*
14288 fi
14289
14290 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14291   if test $ol_cv_type_socklen_t = no; then
14292     cat >> confdefs.h <<\EOF
14293 #define socklen_t int
14294 EOF
14295
14296   fi
14297  
14298 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14299 echo "configure:14300: checking for member st_blksize in aggregate type struct stat" >&5
14300 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14301   echo $ac_n "(cached) $ac_c" 1>&6
14302 else
14303   cat > conftest.$ac_ext <<EOF
14304 #line 14305 "configure"
14305 #include "confdefs.h"
14306 #include <sys/types.h>
14307 #include <sys/stat.h>
14308 int main() {
14309 struct stat foo; foo.st_blksize;
14310 ; return 0; }
14311 EOF
14312 if { (eval echo configure:14313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14313   rm -rf conftest*
14314   ac_cv_c_struct_member_st_blksize=yes
14315 else
14316   echo "configure: failed program was:" >&5
14317   cat conftest.$ac_ext >&5
14318   rm -rf conftest*
14319   ac_cv_c_struct_member_st_blksize=no
14320 fi
14321 rm -f conftest*
14322 fi
14323
14324 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14325 st_blksize="$ac_cv_c_struct_member_st_blksize"
14326 if test $ac_cv_c_struct_member_st_blksize = yes; then
14327   cat >> confdefs.h <<\EOF
14328 #define HAVE_ST_BLKSIZE 1
14329 EOF
14330
14331 fi
14332
14333 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14334 echo "configure:14335: checking whether time.h and sys/time.h may both be included" >&5
14335 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14336   echo $ac_n "(cached) $ac_c" 1>&6
14337 else
14338   cat > conftest.$ac_ext <<EOF
14339 #line 14340 "configure"
14340 #include "confdefs.h"
14341 #include <sys/types.h>
14342 #include <sys/time.h>
14343 #include <time.h>
14344 int main() {
14345 struct tm *tp;
14346 ; return 0; }
14347 EOF
14348 if { (eval echo configure:14349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14349   rm -rf conftest*
14350   ac_cv_header_time=yes
14351 else
14352   echo "configure: failed program was:" >&5
14353   cat conftest.$ac_ext >&5
14354   rm -rf conftest*
14355   ac_cv_header_time=no
14356 fi
14357 rm -f conftest*
14358 fi
14359
14360 echo "$ac_t""$ac_cv_header_time" 1>&6
14361 if test $ac_cv_header_time = yes; then
14362   cat >> confdefs.h <<\EOF
14363 #define TIME_WITH_SYS_TIME 1
14364 EOF
14365
14366 fi
14367
14368 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14369 echo "configure:14370: checking whether struct tm is in sys/time.h or time.h" >&5
14370 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14371   echo $ac_n "(cached) $ac_c" 1>&6
14372 else
14373   cat > conftest.$ac_ext <<EOF
14374 #line 14375 "configure"
14375 #include "confdefs.h"
14376 #include <sys/types.h>
14377 #include <time.h>
14378 int main() {
14379 struct tm *tp; tp->tm_sec;
14380 ; return 0; }
14381 EOF
14382 if { (eval echo configure:14383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14383   rm -rf conftest*
14384   ac_cv_struct_tm=time.h
14385 else
14386   echo "configure: failed program was:" >&5
14387   cat conftest.$ac_ext >&5
14388   rm -rf conftest*
14389   ac_cv_struct_tm=sys/time.h
14390 fi
14391 rm -f conftest*
14392 fi
14393
14394 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14395 if test $ac_cv_struct_tm = sys/time.h; then
14396   cat >> confdefs.h <<\EOF
14397 #define TM_IN_SYS_TIME 1
14398 EOF
14399
14400 fi
14401
14402 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14403 echo "configure:14404: checking for uid_t in sys/types.h" >&5
14404 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14405   echo $ac_n "(cached) $ac_c" 1>&6
14406 else
14407   cat > conftest.$ac_ext <<EOF
14408 #line 14409 "configure"
14409 #include "confdefs.h"
14410 #include <sys/types.h>
14411 EOF
14412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14413   egrep "uid_t" >/dev/null 2>&1; then
14414   rm -rf conftest*
14415   ac_cv_type_uid_t=yes
14416 else
14417   rm -rf conftest*
14418   ac_cv_type_uid_t=no
14419 fi
14420 rm -f conftest*
14421
14422 fi
14423
14424 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14425 if test $ac_cv_type_uid_t = no; then
14426   cat >> confdefs.h <<\EOF
14427 #define uid_t int
14428 EOF
14429
14430   cat >> confdefs.h <<\EOF
14431 #define gid_t int
14432 EOF
14433
14434 fi
14435
14436 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14437 echo "configure:14438: checking for sig_atomic_t" >&5
14438 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14439   echo $ac_n "(cached) $ac_c" 1>&6
14440 else
14441   cat > conftest.$ac_ext <<EOF
14442 #line 14443 "configure"
14443 #include "confdefs.h"
14444 #include <signal.h>
14445 int main() {
14446 sig_atomic_t atomic;
14447 ; return 0; }
14448 EOF
14449 if { (eval echo configure:14450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14450   rm -rf conftest*
14451   ol_cv_type_sig_atomic_t=yes
14452 else
14453   echo "configure: failed program was:" >&5
14454   cat conftest.$ac_ext >&5
14455   rm -rf conftest*
14456   ol_cv_type_sig_atomic_t=no
14457 fi
14458 rm -f conftest*
14459 fi
14460
14461 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14462   if test $ol_cv_type_sig_atomic_t = no; then
14463     cat >> confdefs.h <<\EOF
14464 #define sig_atomic_t int
14465 EOF
14466
14467   fi
14468  
14469
14470
14471 # test for pw_gecos in struct passwd
14472 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14473 echo "configure:14474: checking struct passwd for pw_gecos" >&5
14474 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14475   echo $ac_n "(cached) $ac_c" 1>&6
14476 else
14477   
14478         cat > conftest.$ac_ext <<EOF
14479 #line 14480 "configure"
14480 #include "confdefs.h"
14481 #include <pwd.h>
14482 int main() {
14483
14484         struct passwd pwd;
14485         pwd.pw_gecos = pwd.pw_name;
14486
14487 ; return 0; }
14488 EOF
14489 if { (eval echo configure:14490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14490   rm -rf conftest*
14491   ol_cv_struct_passwd_pw_gecos=yes
14492 else
14493   echo "configure: failed program was:" >&5
14494   cat conftest.$ac_ext >&5
14495   rm -rf conftest*
14496   ol_cv_struct_passwd_pw_gecos=no
14497 fi
14498 rm -f conftest*
14499 fi
14500
14501 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14502 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14503         cat >> confdefs.h <<\EOF
14504 #define HAVE_PW_GECOS 1
14505 EOF
14506
14507 fi
14508
14509 # test for pw_passwd in struct passwd
14510 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14511 echo "configure:14512: checking struct passwd for pw_passwd" >&5
14512 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14513   echo $ac_n "(cached) $ac_c" 1>&6
14514 else
14515   
14516         cat > conftest.$ac_ext <<EOF
14517 #line 14518 "configure"
14518 #include "confdefs.h"
14519 #include <pwd.h>
14520 int main() {
14521
14522         struct passwd pwd;
14523         pwd.pw_passwd = pwd.pw_name;
14524
14525 ; return 0; }
14526 EOF
14527 if { (eval echo configure:14528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14528   rm -rf conftest*
14529   ol_cv_struct_passwd_pw_passwd=yes
14530 else
14531   echo "configure: failed program was:" >&5
14532   cat conftest.$ac_ext >&5
14533   rm -rf conftest*
14534   ol_cv_struct_passwd_pw_passwd=no
14535 fi
14536 rm -f conftest*
14537 fi
14538
14539 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14540 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14541         cat >> confdefs.h <<\EOF
14542 #define HAVE_PW_PASSWD 1
14543 EOF
14544
14545 fi
14546
14547
14548 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14549 echo "configure:14550: checking if toupper() requires islower()" >&5
14550 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14551   echo $ac_n "(cached) $ac_c" 1>&6
14552 else
14553   
14554         if test "$cross_compiling" = yes; then
14555   ol_cv_c_upper_lower=safe
14556 else
14557   cat > conftest.$ac_ext <<EOF
14558 #line 14559 "configure"
14559 #include "confdefs.h"
14560
14561 #include <ctype.h>
14562 main()
14563 {
14564         if ('C' == toupper('C'))
14565                 exit(0);
14566         else
14567                 exit(1);
14568 }
14569 EOF
14570 if { (eval echo configure:14571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14571 then
14572   ol_cv_c_upper_lower=no
14573 else
14574   echo "configure: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   rm -fr conftest*
14577   ol_cv_c_upper_lower=yes
14578 fi
14579 rm -fr conftest*
14580 fi
14581
14582 fi
14583
14584 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14585 if test $ol_cv_c_upper_lower != no ; then
14586         cat >> confdefs.h <<\EOF
14587 #define C_UPPER_LOWER 1
14588 EOF
14589
14590 fi
14591
14592 echo $ac_n "checking for working const""... $ac_c" 1>&6
14593 echo "configure:14594: checking for working const" >&5
14594 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14595   echo $ac_n "(cached) $ac_c" 1>&6
14596 else
14597   cat > conftest.$ac_ext <<EOF
14598 #line 14599 "configure"
14599 #include "confdefs.h"
14600
14601 int main() {
14602
14603 /* Ultrix mips cc rejects this.  */
14604 typedef int charset[2]; const charset x;
14605 /* SunOS 4.1.1 cc rejects this.  */
14606 char const *const *ccp;
14607 char **p;
14608 /* NEC SVR4.0.2 mips cc rejects this.  */
14609 struct point {int x, y;};
14610 static struct point const zero = {0,0};
14611 /* AIX XL C 1.02.0.0 rejects this.
14612    It does not let you subtract one const X* pointer from another in an arm
14613    of an if-expression whose if-part is not a constant expression */
14614 const char *g = "string";
14615 ccp = &g + (g ? g-g : 0);
14616 /* HPUX 7.0 cc rejects these. */
14617 ++ccp;
14618 p = (char**) ccp;
14619 ccp = (char const *const *) p;
14620 { /* SCO 3.2v4 cc rejects this.  */
14621   char *t;
14622   char const *s = 0 ? (char *) 0 : (char const *) 0;
14623
14624   *t++ = 0;
14625 }
14626 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14627   int x[] = {25, 17};
14628   const int *foo = &x[0];
14629   ++foo;
14630 }
14631 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14632   typedef const int *iptr;
14633   iptr p = 0;
14634   ++p;
14635 }
14636 { /* AIX XL C 1.02.0.0 rejects this saying
14637      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14638   struct s { int j; const int *ap[3]; };
14639   struct s *b; b->j = 5;
14640 }
14641 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14642   const int foo = 10;
14643 }
14644
14645 ; return 0; }
14646 EOF
14647 if { (eval echo configure:14648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14648   rm -rf conftest*
14649   ac_cv_c_const=yes
14650 else
14651   echo "configure: failed program was:" >&5
14652   cat conftest.$ac_ext >&5
14653   rm -rf conftest*
14654   ac_cv_c_const=no
14655 fi
14656 rm -f conftest*
14657 fi
14658
14659 echo "$ac_t""$ac_cv_c_const" 1>&6
14660 if test $ac_cv_c_const = no; then
14661   cat >> confdefs.h <<\EOF
14662 #define const 
14663 EOF
14664
14665 fi
14666
14667 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14668 echo "configure:14669: checking if compiler understands volatile" >&5
14669 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14670   echo $ac_n "(cached) $ac_c" 1>&6
14671 else
14672   cat > conftest.$ac_ext <<EOF
14673 #line 14674 "configure"
14674 #include "confdefs.h"
14675 int x, y, z;
14676 int main() {
14677 volatile int a; int * volatile b = x ? &y : &z;
14678       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14679       *b = 0;
14680 ; return 0; }
14681 EOF
14682 if { (eval echo configure:14683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14683   rm -rf conftest*
14684   ol_cv_c_volatile=yes
14685 else
14686   echo "configure: failed program was:" >&5
14687   cat conftest.$ac_ext >&5
14688   rm -rf conftest*
14689   ol_cv_c_volatile=no
14690 fi
14691 rm -f conftest*
14692 fi
14693
14694 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14695   if test $ol_cv_c_volatile = yes; then
14696     : 
14697   else
14698     cat >> confdefs.h <<\EOF
14699 #define volatile 
14700 EOF
14701
14702   fi
14703  
14704
14705 if test $cross_compiling = yes ; then
14706         cat >> confdefs.h <<\EOF
14707 #define CROSS_COMPILING 1
14708 EOF
14709
14710 else
14711         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14712 echo "configure:14713: checking whether byte ordering is bigendian" >&5
14713 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14714   echo $ac_n "(cached) $ac_c" 1>&6
14715 else
14716   ac_cv_c_bigendian=unknown
14717 # See if sys/param.h defines the BYTE_ORDER macro.
14718 cat > conftest.$ac_ext <<EOF
14719 #line 14720 "configure"
14720 #include "confdefs.h"
14721 #include <sys/types.h>
14722 #include <sys/param.h>
14723 int main() {
14724
14725 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14726  bogus endian macros
14727 #endif
14728 ; return 0; }
14729 EOF
14730 if { (eval echo configure:14731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14731   rm -rf conftest*
14732   # It does; now see whether it defined to BIG_ENDIAN or not.
14733 cat > conftest.$ac_ext <<EOF
14734 #line 14735 "configure"
14735 #include "confdefs.h"
14736 #include <sys/types.h>
14737 #include <sys/param.h>
14738 int main() {
14739
14740 #if BYTE_ORDER != BIG_ENDIAN
14741  not big endian
14742 #endif
14743 ; return 0; }
14744 EOF
14745 if { (eval echo configure:14746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14746   rm -rf conftest*
14747   ac_cv_c_bigendian=yes
14748 else
14749   echo "configure: failed program was:" >&5
14750   cat conftest.$ac_ext >&5
14751   rm -rf conftest*
14752   ac_cv_c_bigendian=no
14753 fi
14754 rm -f conftest*
14755 else
14756   echo "configure: failed program was:" >&5
14757   cat conftest.$ac_ext >&5
14758 fi
14759 rm -f conftest*
14760 if test $ac_cv_c_bigendian = unknown; then
14761 if test "$cross_compiling" = yes; then
14762     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14763 else
14764   cat > conftest.$ac_ext <<EOF
14765 #line 14766 "configure"
14766 #include "confdefs.h"
14767 main () {
14768   /* Are we little or big endian?  From Harbison&Steele.  */
14769   union
14770   {
14771     long l;
14772     char c[sizeof (long)];
14773   } u;
14774   u.l = 1;
14775   exit (u.c[sizeof (long) - 1] == 1);
14776 }
14777 EOF
14778 if { (eval echo configure:14779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14779 then
14780   ac_cv_c_bigendian=no
14781 else
14782   echo "configure: failed program was:" >&5
14783   cat conftest.$ac_ext >&5
14784   rm -fr conftest*
14785   ac_cv_c_bigendian=yes
14786 fi
14787 rm -fr conftest*
14788 fi
14789
14790 fi
14791 fi
14792
14793 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14794 if test $ac_cv_c_bigendian = yes; then
14795   cat >> confdefs.h <<\EOF
14796 #define WORDS_BIGENDIAN 1
14797 EOF
14798
14799 fi
14800
14801 fi
14802
14803 echo $ac_n "checking size of short""... $ac_c" 1>&6
14804 echo "configure:14805: checking size of short" >&5 
14805 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14806   echo $ac_n "(cached) $ac_c" 1>&6
14807 else
14808   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14809   cat > conftest.$ac_ext <<EOF
14810 #line 14811 "configure"
14811 #include "confdefs.h"
14812 #include "confdefs.h" 
14813 #include <sys/types.h> 
14814  
14815
14816 int main() {
14817 switch (0) case 0: case (sizeof (short) == $ac_size):;
14818 ; return 0; }
14819 EOF
14820 if { (eval echo configure:14821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14821   rm -rf conftest*
14822   ac_cv_sizeof_short=$ac_size
14823 else
14824   echo "configure: failed program was:" >&5
14825   cat conftest.$ac_ext >&5
14826 fi
14827 rm -f conftest* 
14828   if test x$ac_cv_sizeof_short != x ; then break; fi 
14829 done 
14830
14831 fi
14832  
14833 if test x$ac_cv_sizeof_short = x ; then 
14834   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14835 fi 
14836 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14837 cat >> confdefs.h <<EOF
14838 #define SIZEOF_SHORT $ac_cv_sizeof_short
14839 EOF
14840  
14841  
14842 echo $ac_n "checking size of int""... $ac_c" 1>&6
14843 echo "configure:14844: checking size of int" >&5 
14844 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14845   echo $ac_n "(cached) $ac_c" 1>&6
14846 else
14847   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14848   cat > conftest.$ac_ext <<EOF
14849 #line 14850 "configure"
14850 #include "confdefs.h"
14851 #include "confdefs.h" 
14852 #include <sys/types.h> 
14853  
14854
14855 int main() {
14856 switch (0) case 0: case (sizeof (int) == $ac_size):;
14857 ; return 0; }
14858 EOF
14859 if { (eval echo configure:14860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14860   rm -rf conftest*
14861   ac_cv_sizeof_int=$ac_size
14862 else
14863   echo "configure: failed program was:" >&5
14864   cat conftest.$ac_ext >&5
14865 fi
14866 rm -f conftest* 
14867   if test x$ac_cv_sizeof_int != x ; then break; fi 
14868 done 
14869
14870 fi
14871  
14872 if test x$ac_cv_sizeof_int = x ; then 
14873   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14874 fi 
14875 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14876 cat >> confdefs.h <<EOF
14877 #define SIZEOF_INT $ac_cv_sizeof_int
14878 EOF
14879  
14880  
14881 echo $ac_n "checking size of long""... $ac_c" 1>&6
14882 echo "configure:14883: checking size of long" >&5 
14883 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14884   echo $ac_n "(cached) $ac_c" 1>&6
14885 else
14886   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14887   cat > conftest.$ac_ext <<EOF
14888 #line 14889 "configure"
14889 #include "confdefs.h"
14890 #include "confdefs.h" 
14891 #include <sys/types.h> 
14892  
14893
14894 int main() {
14895 switch (0) case 0: case (sizeof (long) == $ac_size):;
14896 ; return 0; }
14897 EOF
14898 if { (eval echo configure:14899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14899   rm -rf conftest*
14900   ac_cv_sizeof_long=$ac_size
14901 else
14902   echo "configure: failed program was:" >&5
14903   cat conftest.$ac_ext >&5
14904 fi
14905 rm -f conftest* 
14906   if test x$ac_cv_sizeof_long != x ; then break; fi 
14907 done 
14908
14909 fi
14910  
14911 if test x$ac_cv_sizeof_long = x ; then 
14912   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14913 fi 
14914 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14915 cat >> confdefs.h <<EOF
14916 #define SIZEOF_LONG $ac_cv_sizeof_long
14917 EOF
14918  
14919
14920
14921 if test "$ac_cv_sizeof_int" -lt 4 ; then
14922         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14923
14924         cat >> confdefs.h <<\EOF
14925 #define LBER_INT_T long
14926 EOF
14927
14928 else
14929         cat >> confdefs.h <<\EOF
14930 #define LBER_INT_T int
14931 EOF
14932
14933 fi
14934
14935 cat >> confdefs.h <<\EOF
14936 #define LBER_LEN_T long
14937 EOF
14938
14939 cat >> confdefs.h <<\EOF
14940 #define LBER_SOCKET_T int
14941 EOF
14942
14943 cat >> confdefs.h <<\EOF
14944 #define LBER_TAG_T long
14945 EOF
14946
14947
14948 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14949 echo "configure:14950: checking for 8-bit clean memcmp" >&5
14950 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14951   echo $ac_n "(cached) $ac_c" 1>&6
14952 else
14953   if test "$cross_compiling" = yes; then
14954   ac_cv_func_memcmp_clean=no
14955 else
14956   cat > conftest.$ac_ext <<EOF
14957 #line 14958 "configure"
14958 #include "confdefs.h"
14959
14960 main()
14961 {
14962   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14963   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14964 }
14965
14966 EOF
14967 if { (eval echo configure:14968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14968 then
14969   ac_cv_func_memcmp_clean=yes
14970 else
14971   echo "configure: failed program was:" >&5
14972   cat conftest.$ac_ext >&5
14973   rm -fr conftest*
14974   ac_cv_func_memcmp_clean=no
14975 fi
14976 rm -fr conftest*
14977 fi
14978
14979 fi
14980
14981 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14982 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14983
14984 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14985 echo "configure:14986: checking for strftime" >&5
14986 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14987   echo $ac_n "(cached) $ac_c" 1>&6
14988 else
14989   cat > conftest.$ac_ext <<EOF
14990 #line 14991 "configure"
14991 #include "confdefs.h"
14992 /* System header to define __stub macros and hopefully few prototypes,
14993     which can conflict with char strftime(); below.  */
14994 #include <assert.h>
14995 /* Override any gcc2 internal prototype to avoid an error.  */
14996 /* We use char because int might match the return type of a gcc2
14997     builtin and then its argument prototype would still apply.  */
14998 char strftime();
14999 char (*f)();
15000
15001 int main() {
15002
15003 /* The GNU C library defines this for functions which it implements
15004     to always fail with ENOSYS.  Some functions are actually named
15005     something starting with __ and the normal name is an alias.  */
15006 #if defined (__stub_strftime) || defined (__stub___strftime)
15007 choke me
15008 #else
15009 f = strftime;
15010 #endif
15011
15012 ; return 0; }
15013 EOF
15014 if { (eval echo configure:15015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15015   rm -rf conftest*
15016   eval "ac_cv_func_strftime=yes"
15017 else
15018   echo "configure: failed program was:" >&5
15019   cat conftest.$ac_ext >&5
15020   rm -rf conftest*
15021   eval "ac_cv_func_strftime=no"
15022 fi
15023 rm -f conftest*
15024 fi
15025
15026 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15027   echo "$ac_t""yes" 1>&6
15028   cat >> confdefs.h <<\EOF
15029 #define HAVE_STRFTIME 1
15030 EOF
15031
15032 else
15033   echo "$ac_t""no" 1>&6
15034 # strftime is in -lintl on SCO UNIX.
15035 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15036 echo "configure:15037: checking for strftime in -lintl" >&5
15037 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15039   echo $ac_n "(cached) $ac_c" 1>&6
15040 else
15041   ac_save_LIBS="$LIBS"
15042 LIBS="-lintl  $LIBS"
15043 cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* Override any gcc2 internal prototype to avoid an error.  */
15047 /* We use char because int might match the return type of a gcc2
15048     builtin and then its argument prototype would still apply.  */
15049 char strftime();
15050
15051 int main() {
15052 strftime()
15053 ; return 0; }
15054 EOF
15055 if { (eval echo configure:15056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15056   rm -rf conftest*
15057   eval "ac_cv_lib_$ac_lib_var=yes"
15058 else
15059   echo "configure: failed program was:" >&5
15060   cat conftest.$ac_ext >&5
15061   rm -rf conftest*
15062   eval "ac_cv_lib_$ac_lib_var=no"
15063 fi
15064 rm -f conftest*
15065 LIBS="$ac_save_LIBS"
15066
15067 fi
15068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15069   echo "$ac_t""yes" 1>&6
15070   cat >> confdefs.h <<\EOF
15071 #define HAVE_STRFTIME 1
15072 EOF
15073
15074 LIBS="-lintl $LIBS"
15075 else
15076   echo "$ac_t""no" 1>&6
15077 fi
15078
15079 fi
15080
15081
15082 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15083 echo "configure:15084: checking for inet_aton()" >&5
15084 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15085   echo $ac_n "(cached) $ac_c" 1>&6
15086 else
15087   cat > conftest.$ac_ext <<EOF
15088 #line 15089 "configure"
15089 #include "confdefs.h"
15090
15091 #ifdef HAVE_SYS_TYPES_H
15092 #       include <sys/types.h>
15093 #endif
15094 #ifdef HAVE_SYS_SOCKET_H
15095 #       include <sys/socket.h>
15096 #       ifdef HAVE_SYS_SELECT_H
15097 #               include <sys/select.h>
15098 #       endif
15099 #       include <netinet/in.h>
15100 #       ifdef HAVE_ARPA_INET_H
15101 #               include <arpa/inet.h>
15102 #       endif
15103 #endif
15104
15105 int main() {
15106 struct in_addr in;
15107 int rc = inet_aton( "255.255.255.255", &in );
15108 ; return 0; }
15109 EOF
15110 if { (eval echo configure:15111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15111   rm -rf conftest*
15112   ol_cv_func_inet_aton=yes
15113 else
15114   echo "configure: failed program was:" >&5
15115   cat conftest.$ac_ext >&5
15116   rm -rf conftest*
15117   ol_cv_func_inet_aton=no
15118 fi
15119 rm -f conftest*
15120 fi
15121
15122 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15123   if test $ol_cv_func_inet_aton != no; then
15124     cat >> confdefs.h <<\EOF
15125 #define HAVE_INET_ATON 1
15126 EOF
15127
15128   fi
15129  
15130
15131 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15132 echo "configure:15133: checking for _spawnlp" >&5
15133 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15134   echo $ac_n "(cached) $ac_c" 1>&6
15135 else
15136   cat > conftest.$ac_ext <<EOF
15137 #line 15138 "configure"
15138 #include "confdefs.h"
15139 /* System header to define __stub macros and hopefully few prototypes,
15140     which can conflict with char _spawnlp(); below.  */
15141 #include <assert.h>
15142 /* Override any gcc2 internal prototype to avoid an error.  */
15143 /* We use char because int might match the return type of a gcc2
15144     builtin and then its argument prototype would still apply.  */
15145 char _spawnlp();
15146 char (*f)();
15147
15148 int main() {
15149
15150 /* The GNU C library defines this for functions which it implements
15151     to always fail with ENOSYS.  Some functions are actually named
15152     something starting with __ and the normal name is an alias.  */
15153 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15154 choke me
15155 #else
15156 f = _spawnlp;
15157 #endif
15158
15159 ; return 0; }
15160 EOF
15161 if { (eval echo configure:15162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15162   rm -rf conftest*
15163   eval "ac_cv_func__spawnlp=yes"
15164 else
15165   echo "configure: failed program was:" >&5
15166   cat conftest.$ac_ext >&5
15167   rm -rf conftest*
15168   eval "ac_cv_func__spawnlp=no"
15169 fi
15170 rm -f conftest*
15171 fi
15172
15173 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15174   echo "$ac_t""yes" 1>&6
15175   cat >> confdefs.h <<\EOF
15176 #define HAVE_SPAWNLP 1
15177 EOF
15178
15179 else
15180   echo "$ac_t""no" 1>&6
15181 fi
15182
15183
15184 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15185 echo "configure:15186: checking for _snprintf" >&5
15186 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15187   echo $ac_n "(cached) $ac_c" 1>&6
15188 else
15189   cat > conftest.$ac_ext <<EOF
15190 #line 15191 "configure"
15191 #include "confdefs.h"
15192 /* System header to define __stub macros and hopefully few prototypes,
15193     which can conflict with char _snprintf(); below.  */
15194 #include <assert.h>
15195 /* Override any gcc2 internal prototype to avoid an error.  */
15196 /* We use char because int might match the return type of a gcc2
15197     builtin and then its argument prototype would still apply.  */
15198 char _snprintf();
15199 char (*f)();
15200
15201 int main() {
15202
15203 /* The GNU C library defines this for functions which it implements
15204     to always fail with ENOSYS.  Some functions are actually named
15205     something starting with __ and the normal name is an alias.  */
15206 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15207 choke me
15208 #else
15209 f = _snprintf;
15210 #endif
15211
15212 ; return 0; }
15213 EOF
15214 if { (eval echo configure:15215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15215   rm -rf conftest*
15216   eval "ac_cv_func__snprintf=yes"
15217 else
15218   echo "configure: failed program was:" >&5
15219   cat conftest.$ac_ext >&5
15220   rm -rf conftest*
15221   eval "ac_cv_func__snprintf=no"
15222 fi
15223 rm -f conftest*
15224 fi
15225
15226 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15227   echo "$ac_t""yes" 1>&6
15228   ac_cv_func_snprintf=yes
15229         cat >> confdefs.h <<\EOF
15230 #define snprintf _snprintf
15231 EOF
15232
15233
15234 else
15235   echo "$ac_t""no" 1>&6
15236 fi
15237
15238
15239 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15240 echo "configure:15241: checking for _vsnprintf" >&5
15241 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15242   echo $ac_n "(cached) $ac_c" 1>&6
15243 else
15244   cat > conftest.$ac_ext <<EOF
15245 #line 15246 "configure"
15246 #include "confdefs.h"
15247 /* System header to define __stub macros and hopefully few prototypes,
15248     which can conflict with char _vsnprintf(); below.  */
15249 #include <assert.h>
15250 /* Override any gcc2 internal prototype to avoid an error.  */
15251 /* We use char because int might match the return type of a gcc2
15252     builtin and then its argument prototype would still apply.  */
15253 char _vsnprintf();
15254 char (*f)();
15255
15256 int main() {
15257
15258 /* The GNU C library defines this for functions which it implements
15259     to always fail with ENOSYS.  Some functions are actually named
15260     something starting with __ and the normal name is an alias.  */
15261 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15262 choke me
15263 #else
15264 f = _vsnprintf;
15265 #endif
15266
15267 ; return 0; }
15268 EOF
15269 if { (eval echo configure:15270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15270   rm -rf conftest*
15271   eval "ac_cv_func__vsnprintf=yes"
15272 else
15273   echo "configure: failed program was:" >&5
15274   cat conftest.$ac_ext >&5
15275   rm -rf conftest*
15276   eval "ac_cv_func__vsnprintf=no"
15277 fi
15278 rm -f conftest*
15279 fi
15280
15281 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15282   echo "$ac_t""yes" 1>&6
15283   ac_cv_func_vsnprintf=yes
15284         cat >> confdefs.h <<\EOF
15285 #define vsnprintf _vsnprintf
15286 EOF
15287
15288
15289 else
15290   echo "$ac_t""no" 1>&6
15291 fi
15292
15293
15294 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15295 echo "configure:15296: checking for vprintf" >&5
15296 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15297   echo $ac_n "(cached) $ac_c" 1>&6
15298 else
15299   cat > conftest.$ac_ext <<EOF
15300 #line 15301 "configure"
15301 #include "confdefs.h"
15302 /* System header to define __stub macros and hopefully few prototypes,
15303     which can conflict with char vprintf(); below.  */
15304 #include <assert.h>
15305 /* Override any gcc2 internal prototype to avoid an error.  */
15306 /* We use char because int might match the return type of a gcc2
15307     builtin and then its argument prototype would still apply.  */
15308 char vprintf();
15309 char (*f)();
15310
15311 int main() {
15312
15313 /* The GNU C library defines this for functions which it implements
15314     to always fail with ENOSYS.  Some functions are actually named
15315     something starting with __ and the normal name is an alias.  */
15316 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15317 choke me
15318 #else
15319 f = vprintf;
15320 #endif
15321
15322 ; return 0; }
15323 EOF
15324 if { (eval echo configure:15325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15325   rm -rf conftest*
15326   eval "ac_cv_func_vprintf=yes"
15327 else
15328   echo "configure: failed program was:" >&5
15329   cat conftest.$ac_ext >&5
15330   rm -rf conftest*
15331   eval "ac_cv_func_vprintf=no"
15332 fi
15333 rm -f conftest*
15334 fi
15335
15336 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15337   echo "$ac_t""yes" 1>&6
15338   cat >> confdefs.h <<\EOF
15339 #define HAVE_VPRINTF 1
15340 EOF
15341
15342 else
15343   echo "$ac_t""no" 1>&6
15344 fi
15345
15346 if test "$ac_cv_func_vprintf" != yes; then
15347 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15348 echo "configure:15349: checking for _doprnt" >&5
15349 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15350   echo $ac_n "(cached) $ac_c" 1>&6
15351 else
15352   cat > conftest.$ac_ext <<EOF
15353 #line 15354 "configure"
15354 #include "confdefs.h"
15355 /* System header to define __stub macros and hopefully few prototypes,
15356     which can conflict with char _doprnt(); below.  */
15357 #include <assert.h>
15358 /* Override any gcc2 internal prototype to avoid an error.  */
15359 /* We use char because int might match the return type of a gcc2
15360     builtin and then its argument prototype would still apply.  */
15361 char _doprnt();
15362 char (*f)();
15363
15364 int main() {
15365
15366 /* The GNU C library defines this for functions which it implements
15367     to always fail with ENOSYS.  Some functions are actually named
15368     something starting with __ and the normal name is an alias.  */
15369 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15370 choke me
15371 #else
15372 f = _doprnt;
15373 #endif
15374
15375 ; return 0; }
15376 EOF
15377 if { (eval echo configure:15378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15378   rm -rf conftest*
15379   eval "ac_cv_func__doprnt=yes"
15380 else
15381   echo "configure: failed program was:" >&5
15382   cat conftest.$ac_ext >&5
15383   rm -rf conftest*
15384   eval "ac_cv_func__doprnt=no"
15385 fi
15386 rm -f conftest*
15387 fi
15388
15389 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15390   echo "$ac_t""yes" 1>&6
15391   cat >> confdefs.h <<\EOF
15392 #define HAVE_DOPRNT 1
15393 EOF
15394
15395 else
15396   echo "$ac_t""no" 1>&6
15397 fi
15398
15399 fi
15400
15401
15402 if test $ac_cv_func_vprintf = yes ; then
15403                 for ac_func in vsnprintf vsprintf
15404 do
15405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15406 echo "configure:15407: checking for $ac_func" >&5
15407 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15408   echo $ac_n "(cached) $ac_c" 1>&6
15409 else
15410   cat > conftest.$ac_ext <<EOF
15411 #line 15412 "configure"
15412 #include "confdefs.h"
15413 /* System header to define __stub macros and hopefully few prototypes,
15414     which can conflict with char $ac_func(); below.  */
15415 #include <assert.h>
15416 /* Override any gcc2 internal prototype to avoid an error.  */
15417 /* We use char because int might match the return type of a gcc2
15418     builtin and then its argument prototype would still apply.  */
15419 char $ac_func();
15420 char (*f)();
15421
15422 int main() {
15423
15424 /* The GNU C library defines this for functions which it implements
15425     to always fail with ENOSYS.  Some functions are actually named
15426     something starting with __ and the normal name is an alias.  */
15427 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15428 choke me
15429 #else
15430 f = $ac_func;
15431 #endif
15432
15433 ; return 0; }
15434 EOF
15435 if { (eval echo configure:15436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15436   rm -rf conftest*
15437   eval "ac_cv_func_$ac_func=yes"
15438 else
15439   echo "configure: failed program was:" >&5
15440   cat conftest.$ac_ext >&5
15441   rm -rf conftest*
15442   eval "ac_cv_func_$ac_func=no"
15443 fi
15444 rm -f conftest*
15445 fi
15446
15447 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15448   echo "$ac_t""yes" 1>&6
15449     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15450   cat >> confdefs.h <<EOF
15451 #define $ac_tr_func 1
15452 EOF
15453  
15454 else
15455   echo "$ac_t""no" 1>&6
15456 fi
15457 done
15458
15459 fi
15460
15461 for ac_func in \
15462         bcopy                   \
15463         closesocket             \
15464         chroot                  \
15465         endgrent                \
15466         endpwent                \
15467         flock                   \
15468         getdtablesize   \
15469         getgrgid                \
15470         gethostname             \
15471         getpass                 \
15472         getpassphrase   \
15473         getpwuid                \
15474         getpwnam                \
15475         getspnam                \
15476         gettimeofday    \
15477         initgroups              \
15478         lockf                   \
15479         memcpy                  \
15480         memmove                 \
15481         mkstemp                 \
15482         pipe                    \
15483         read                    \
15484         recv                    \
15485         recvfrom                \
15486         setpwfile               \
15487         setgid                  \
15488         setegid                 \
15489         setsid                  \
15490         setuid                  \
15491         seteuid                 \
15492         sigaction               \
15493         signal                  \
15494         sigset                  \
15495         snprintf                \
15496         strdup                  \
15497         strerror                \
15498         strpbrk                 \
15499         strrchr                 \
15500         strsep                  \
15501         strstr                  \
15502         strtol                  \
15503         strtoul                 \
15504         strspn                  \
15505         sysconf                 \
15506         waitpid                 \
15507         wait4                   \
15508         write                   \
15509         send                    \
15510         sendto                  \
15511
15512 do
15513 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15514 echo "configure:15515: checking for $ac_func" >&5
15515 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15516   echo $ac_n "(cached) $ac_c" 1>&6
15517 else
15518   cat > conftest.$ac_ext <<EOF
15519 #line 15520 "configure"
15520 #include "confdefs.h"
15521 /* System header to define __stub macros and hopefully few prototypes,
15522     which can conflict with char $ac_func(); below.  */
15523 #include <assert.h>
15524 /* Override any gcc2 internal prototype to avoid an error.  */
15525 /* We use char because int might match the return type of a gcc2
15526     builtin and then its argument prototype would still apply.  */
15527 char $ac_func();
15528 char (*f)();
15529
15530 int main() {
15531
15532 /* The GNU C library defines this for functions which it implements
15533     to always fail with ENOSYS.  Some functions are actually named
15534     something starting with __ and the normal name is an alias.  */
15535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15536 choke me
15537 #else
15538 f = $ac_func;
15539 #endif
15540
15541 ; return 0; }
15542 EOF
15543 if { (eval echo configure:15544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15544   rm -rf conftest*
15545   eval "ac_cv_func_$ac_func=yes"
15546 else
15547   echo "configure: failed program was:" >&5
15548   cat conftest.$ac_ext >&5
15549   rm -rf conftest*
15550   eval "ac_cv_func_$ac_func=no"
15551 fi
15552 rm -f conftest*
15553 fi
15554
15555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15556   echo "$ac_t""yes" 1>&6
15557     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15558   cat >> confdefs.h <<EOF
15559 #define $ac_tr_func 1
15560 EOF
15561  
15562 else
15563   echo "$ac_t""no" 1>&6
15564 fi
15565 done
15566
15567
15568 for ac_func in getopt tempnam
15569 do
15570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15571 echo "configure:15572: checking for $ac_func" >&5
15572 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15573   echo $ac_n "(cached) $ac_c" 1>&6
15574 else
15575   cat > conftest.$ac_ext <<EOF
15576 #line 15577 "configure"
15577 #include "confdefs.h"
15578 /* System header to define __stub macros and hopefully few prototypes,
15579     which can conflict with char $ac_func(); below.  */
15580 #include <assert.h>
15581 /* Override any gcc2 internal prototype to avoid an error.  */
15582 /* We use char because int might match the return type of a gcc2
15583     builtin and then its argument prototype would still apply.  */
15584 char $ac_func();
15585 char (*f)();
15586
15587 int main() {
15588
15589 /* The GNU C library defines this for functions which it implements
15590     to always fail with ENOSYS.  Some functions are actually named
15591     something starting with __ and the normal name is an alias.  */
15592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15593 choke me
15594 #else
15595 f = $ac_func;
15596 #endif
15597
15598 ; return 0; }
15599 EOF
15600 if { (eval echo configure:15601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15601   rm -rf conftest*
15602   eval "ac_cv_func_$ac_func=yes"
15603 else
15604   echo "configure: failed program was:" >&5
15605   cat conftest.$ac_ext >&5
15606   rm -rf conftest*
15607   eval "ac_cv_func_$ac_func=no"
15608 fi
15609 rm -f conftest*
15610 fi
15611
15612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15613   echo "$ac_t""yes" 1>&6
15614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15615   cat >> confdefs.h <<EOF
15616 #define $ac_tr_func 1
15617 EOF
15618  
15619 else
15620   echo "$ac_t""no" 1>&6
15621 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15622 fi
15623 done
15624
15625
15626
15627 if test "$ac_cv_func_getopt" != yes; then
15628     LIBSRCS="$LIBSRCS getopt.c"
15629 fi
15630
15631 if test "$ac_cv_func_tempnam" != yes; then
15632     LIBSRCS="$LIBSRCS tempnam.c"
15633 fi
15634
15635 # Check Configuration
15636 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15637 echo "configure:15638: checking declaration of sys_errlist" >&5
15638 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15639   echo $ac_n "(cached) $ac_c" 1>&6
15640 else
15641   
15642         cat > conftest.$ac_ext <<EOF
15643 #line 15644 "configure"
15644 #include "confdefs.h"
15645
15646 #include <stdio.h>
15647 #include <sys/types.h>
15648 #include <errno.h>
15649 #ifdef WINNT
15650 #include <stdlib.h>
15651 #endif 
15652 int main() {
15653 char *c = (char *) *sys_errlist
15654 ; return 0; }
15655 EOF
15656 if { (eval echo configure:15657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15657   rm -rf conftest*
15658   ol_cv_dcl_sys_errlist=yes
15659         ol_cv_have_sys_errlist=yes
15660 else
15661   echo "configure: failed program was:" >&5
15662   cat conftest.$ac_ext >&5
15663   rm -rf conftest*
15664   ol_cv_dcl_sys_errlist=no
15665 fi
15666 rm -f conftest*
15667 fi
15668
15669 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15670 #
15671 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15672 if test $ol_cv_dcl_sys_errlist = no ; then
15673         cat >> confdefs.h <<\EOF
15674 #define DECL_SYS_ERRLIST 1
15675 EOF
15676
15677
15678         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15679 echo "configure:15680: checking existence of sys_errlist" >&5
15680 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15681   echo $ac_n "(cached) $ac_c" 1>&6
15682 else
15683   
15684                 cat > conftest.$ac_ext <<EOF
15685 #line 15686 "configure"
15686 #include "confdefs.h"
15687 #include <errno.h>
15688 int main() {
15689 char *c = (char *) *sys_errlist
15690 ; return 0; }
15691 EOF
15692 if { (eval echo configure:15693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15693   rm -rf conftest*
15694   ol_cv_have_sys_errlist=yes
15695 else
15696   echo "configure: failed program was:" >&5
15697   cat conftest.$ac_ext >&5
15698   rm -rf conftest*
15699   ol_cv_have_sys_errlist=no
15700 fi
15701 rm -f conftest*
15702 fi
15703
15704 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15705 fi
15706 if test $ol_cv_have_sys_errlist = yes ; then
15707         cat >> confdefs.h <<\EOF
15708 #define HAVE_SYS_ERRLIST 1
15709 EOF
15710
15711 fi
15712
15713
15714
15715 if test "$ol_enable_debug" != no ; then
15716         cat >> confdefs.h <<\EOF
15717 #define LDAP_DEBUG 1
15718 EOF
15719
15720 fi
15721 if test "$ol_enable_syslog" = yes ; then
15722         cat >> confdefs.h <<\EOF
15723 #define LDAP_SYSLOG 1
15724 EOF
15725
15726 fi
15727 if test "$ol_enable_libui" = yes ; then
15728         cat >> confdefs.h <<\EOF
15729 #define LDAP_LIBUI 1
15730 EOF
15731
15732 fi
15733 if test "$ol_enable_cache" = no ; then
15734         cat >> confdefs.h <<\EOF
15735 #define LDAP_NOCACHE 1
15736 EOF
15737
15738 fi
15739 if test "$ol_link_kbind" != no ; then
15740         cat >> confdefs.h <<\EOF
15741 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15742 EOF
15743
15744 fi
15745 if test "$ol_enable_proctitle" != no ; then
15746         cat >> confdefs.h <<\EOF
15747 #define LDAP_PROCTITLE 1
15748 EOF
15749
15750 fi
15751 if test "$ol_enable_referrals" != no ; then
15752         cat >> confdefs.h <<\EOF
15753 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15754 EOF
15755
15756 fi
15757 if test "$ol_enable_cldap" != no ; then
15758         cat >> confdefs.h <<\EOF
15759 #define LDAP_CONNECTIONLESS 1
15760 EOF
15761
15762 fi
15763 if test "$ol_enable_local" != no; then
15764         cat >> confdefs.h <<\EOF
15765 #define LDAP_PF_LOCAL 1
15766 EOF
15767
15768 fi
15769 if test "$ol_enable_ipv6" != no; then
15770         cat >> confdefs.h <<\EOF
15771 #define LDAP_PF_INET6 1
15772 EOF
15773
15774 fi
15775 if test "$ol_enable_cleartext" != no ; then
15776         cat >> confdefs.h <<\EOF
15777 #define SLAPD_CLEARTEXT 1
15778 EOF
15779
15780 fi
15781 if test "$ol_enable_crypt" != no ; then
15782         cat >> confdefs.h <<\EOF
15783 #define SLAPD_CRYPT 1
15784 EOF
15785
15786 fi
15787 if test "$ol_link_kpasswd" != no ; then
15788         cat >> confdefs.h <<\EOF
15789 #define SLAPD_KPASSWD 1
15790 EOF
15791
15792 fi
15793 if test "$ol_link_spasswd" != no ; then
15794         cat >> confdefs.h <<\EOF
15795 #define SLAPD_SPASSWD 1
15796 EOF
15797
15798 fi
15799 if test "$ol_enable_multimaster" != no ; then
15800         cat >> confdefs.h <<\EOF
15801 #define SLAPD_MULTIMASTER 1
15802 EOF
15803
15804 fi
15805 if test "$ol_enable_phonetic" != no ; then
15806         cat >> confdefs.h <<\EOF
15807 #define SLAPD_PHONETIC 1
15808 EOF
15809
15810 fi
15811 if test "$ol_enable_rlookups" != no ; then
15812         cat >> confdefs.h <<\EOF
15813 #define SLAPD_RLOOKUPS 1
15814 EOF
15815
15816 fi
15817 if test "$ol_enable_aci" != no ; then
15818         cat >> confdefs.h <<\EOF
15819 #define SLAPD_ACI_ENABLED 1
15820 EOF
15821
15822 fi
15823
15824 if test "$ol_link_modules" != no ; then
15825         cat >> confdefs.h <<\EOF
15826 #define SLAPD_MODULES 1
15827 EOF
15828
15829         BUILD_SLAPD=yes
15830         SLAPD_MODULES_LDFLAGS="-dlopen self"
15831 fi
15832
15833 if test "$ol_link_dnssrv" != no ; then
15834         cat >> confdefs.h <<\EOF
15835 #define SLAPD_DNSSRV 1
15836 EOF
15837
15838         BUILD_SLAPD=yes
15839         BUILD_DNSSRV=yes
15840         if test "$ol_with_dnssrv_module" != static ; then
15841                 cat >> confdefs.h <<\EOF
15842 #define SLAPD_DNSSRV_DYNAMIC 1
15843 EOF
15844
15845                 BUILD_DNSSRV=mod
15846                 BUILD_DNSSRV_DYNAMIC=shared
15847                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15848         fi
15849 fi
15850
15851 if test "$ol_enable_ldap" != no ; then
15852         cat >> confdefs.h <<\EOF
15853 #define SLAPD_LDAP 1
15854 EOF
15855
15856         BUILD_SLAPD=yes
15857         BUILD_LDAP=yes
15858         if test "$ol_with_ldap_module" != static ; then
15859                 cat >> confdefs.h <<\EOF
15860 #define SLAPD_LDAP_DYNAMIC 1
15861 EOF
15862
15863                 BUILD_LDAP=mod
15864                 BUILD_LDAP_DYNAMIC=shared
15865                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15866         fi
15867 fi
15868
15869 if test "$ol_link_ldbm" != no ; then
15870         cat >> confdefs.h <<\EOF
15871 #define SLAPD_LDBM 1
15872 EOF
15873
15874         BUILD_SLAPD=yes
15875         BUILD_LDBM=yes
15876         if test "$ol_with_ldbm_module" != static ; then
15877                 cat >> confdefs.h <<\EOF
15878 #define SLAPD_LDBM_DYNAMIC 1
15879 EOF
15880
15881                 BUILD_LDBM=mod
15882                 BUILD_LDBM_DYNAMIC=shared
15883                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15884         fi
15885 fi
15886
15887 if test "$ol_enable_passwd" != no ; then
15888         cat >> confdefs.h <<\EOF
15889 #define SLAPD_PASSWD 1
15890 EOF
15891
15892         BUILD_SLAPD=yes
15893         BUILD_PASSWD=yes
15894         if test "$ol_with_passwd_module" != static ; then
15895                 cat >> confdefs.h <<\EOF
15896 #define SLAPD_PASSWD_DYNAMIC 1
15897 EOF
15898
15899                 BUILD_PASSWD=mod
15900                 BUILD_PASSWD_DYNAMIC=shared
15901                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15902         fi
15903 fi
15904
15905 if test "$ol_link_perl" != no ; then
15906         cat >> confdefs.h <<\EOF
15907 #define SLAPD_PERL 1
15908 EOF
15909
15910         BUILD_SLAPD=yes
15911         BUILD_PERL=yes
15912         if test "$ol_with_perl_module" != static ; then
15913                 cat >> confdefs.h <<\EOF
15914 #define SLAPD_PERL_DYNAMIC 1
15915 EOF
15916
15917                 BUILD_PERL=mod
15918                 BUILD_PERL_DYNAMIC=shared
15919                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15920         fi
15921 fi
15922
15923 if test "$ol_enable_shell" != no ; then
15924         cat >> confdefs.h <<\EOF
15925 #define SLAPD_SHELL 1
15926 EOF
15927
15928         BUILD_SLAPD=yes
15929         BUILD_SHELL=yes
15930         if test "$ol_with_shell_module" != static ; then
15931                 cat >> confdefs.h <<\EOF
15932 #define SLAPD_SHELL_DYNAMIC 1
15933 EOF
15934
15935                 BUILD_SHELL=mod
15936                 BUILD_SHELL_DYNAMIC=shared
15937                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15938         fi
15939 fi
15940
15941 if test "$ol_enable_tcl" != no ; then
15942         cat >> confdefs.h <<\EOF
15943 #define SLAPD_TCL 1
15944 EOF
15945
15946         BUILD_SLAPD=yes
15947         BUILD_TCL=yes
15948         if test "$ol_with_tcl_module" != static; then
15949                 cat >> confdefs.h <<\EOF
15950 #define SLAPD_TCL_DYNAMIC 1
15951 EOF
15952
15953                 BUILD_TCL=mod
15954                 BUILD_TCL_DYNAMIC=shared
15955                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15956         fi
15957 fi
15958
15959 if test "$ol_enable_sql" != no ; then
15960         cat >> confdefs.h <<\EOF
15961 #define SLAPD_SQL 1
15962 EOF
15963
15964         BUILD_SLAPD=yes
15965         BUILD_SQL=yes
15966         SLAPD_SQL_LIBS=-liodbc
15967         if test "$ol_with_sql_module" != static; then
15968                 cat >> confdefs.h <<\EOF
15969 #define SLAPD_SQL_DYNAMIC 1
15970 EOF
15971
15972                 BUILD_SQL=mod
15973                 BUILD_SQL_DYNAMIC=shared
15974                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15975         fi
15976 fi
15977
15978 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15979         $BUILD_SLAPD = yes ; then
15980         BUILD_SLURPD=yes
15981 fi
15982
15983
15984 if test "$LINK_BINS_DYNAMIC" = yes; then
15985     LIB_LINKAGE=DYN
15986     LT_LIB_LINKAGE=shared
15987 else
15988     LIB_LINKAGE=STAT
15989     LT_LIB_LINKAGE=static
15990 fi
15991
15992 if test "$ac_cv_mingw32" = yes ; then
15993     PLAT=NT
15994     DYN_EXT=dll
15995 else
15996     PLAT=UNIX
15997     DYN_EXT=so
15998 fi
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008   
16009   
16010   
16011   
16012   
16013   
16014   
16015   
16016   
16017   
16018   
16019   
16020   
16021   
16022   
16023   
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059 trap '' 1 2 15
16060
16061 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16062
16063 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16064 # Let make expand exec_prefix.
16065 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16066
16067 # Any assignment to VPATH causes Sun make to only execute
16068 # the first set of double-colon rules, so remove it if not needed.
16069 # If there is a colon in the path, we need to keep it.
16070 if test "x$srcdir" = x.; then
16071   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16072 fi
16073
16074 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16075
16076 DEFS=-DHAVE_CONFIG_H
16077
16078 # Without the "./", some shells look in PATH for config.status.
16079 : ${CONFIG_STATUS=./config.status}
16080
16081 echo creating $CONFIG_STATUS
16082 rm -f $CONFIG_STATUS
16083 cat > $CONFIG_STATUS <<EOF
16084 #! /bin/sh
16085 # Generated automatically by configure.
16086 # Run this file to recreate the current configuration.
16087 # This directory was configured as follows,
16088 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16089 #
16090 # $0 $ac_configure_args
16091 #
16092 # Compiler output produced by configure, useful for debugging
16093 # configure, is in ./config.log if it exists.
16094
16095 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16096 for ac_option
16097 do
16098   case "\$ac_option" in
16099   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16100     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16101     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16102   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16103     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16104     exit 0 ;;
16105   -help | --help | --hel | --he | --h)
16106     echo "\$ac_cs_usage"; exit 0 ;;
16107   *) echo "\$ac_cs_usage"; exit 1 ;;
16108   esac
16109 done
16110
16111 ac_given_srcdir=$srcdir
16112 ac_given_INSTALL="$INSTALL"
16113
16114 trap 'rm -fr `echo "\
16115 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16116 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16117 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16118 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16119 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16120 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16121 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16122 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16123 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16124 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16125 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16126 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16127 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16128 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16129 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16130 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16131 include/Makefile:build/top.mk:include/Makefile.in \
16132 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16133 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16134 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16135 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16136 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16137 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16138 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16139 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16140 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16141 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16142 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16143 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16144 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16145 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16146 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16147 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16148 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16149 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16150 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16151 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16152 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16153 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16154 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16155 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16156 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16157 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16158 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16159  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16160 EOF
16161 cat >> $CONFIG_STATUS <<EOF
16162
16163 # Protect against being on the right side of a sed subst in config.status.
16164 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16165  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16166 $ac_vpsub
16167 $extrasub
16168 s%@SHELL@%$SHELL%g
16169 s%@CFLAGS@%$CFLAGS%g
16170 s%@CPPFLAGS@%$CPPFLAGS%g
16171 s%@CXXFLAGS@%$CXXFLAGS%g
16172 s%@FFLAGS@%$FFLAGS%g
16173 s%@DEFS@%$DEFS%g
16174 s%@LDFLAGS@%$LDFLAGS%g
16175 s%@LIBS@%$LIBS%g
16176 s%@exec_prefix@%$exec_prefix%g
16177 s%@prefix@%$prefix%g
16178 s%@program_transform_name@%$program_transform_name%g
16179 s%@bindir@%$bindir%g
16180 s%@sbindir@%$sbindir%g
16181 s%@libexecdir@%$libexecdir%g
16182 s%@datadir@%$datadir%g
16183 s%@sysconfdir@%$sysconfdir%g
16184 s%@sharedstatedir@%$sharedstatedir%g
16185 s%@localstatedir@%$localstatedir%g
16186 s%@libdir@%$libdir%g
16187 s%@includedir@%$includedir%g
16188 s%@oldincludedir@%$oldincludedir%g
16189 s%@infodir@%$infodir%g
16190 s%@mandir@%$mandir%g
16191 s%@host@%$host%g
16192 s%@host_alias@%$host_alias%g
16193 s%@host_cpu@%$host_cpu%g
16194 s%@host_vendor@%$host_vendor%g
16195 s%@host_os@%$host_os%g
16196 s%@target@%$target%g
16197 s%@target_alias@%$target_alias%g
16198 s%@target_cpu@%$target_cpu%g
16199 s%@target_vendor@%$target_vendor%g
16200 s%@target_os@%$target_os%g
16201 s%@build@%$build%g
16202 s%@build_alias@%$build_alias%g
16203 s%@build_cpu@%$build_cpu%g
16204 s%@build_vendor@%$build_vendor%g
16205 s%@build_os@%$build_os%g
16206 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16207 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16208 s%@INSTALL_DATA@%$INSTALL_DATA%g
16209 s%@PACKAGE@%$PACKAGE%g
16210 s%@VERSION@%$VERSION%g
16211 s%@ACLOCAL@%$ACLOCAL%g
16212 s%@AUTOCONF@%$AUTOCONF%g
16213 s%@AUTOMAKE@%$AUTOMAKE%g
16214 s%@AUTOHEADER@%$AUTOHEADER%g
16215 s%@MAKEINFO@%$MAKEINFO%g
16216 s%@install_sh@%$install_sh%g
16217 s%@AMTAR@%$AMTAR%g
16218 s%@AWK@%$AWK%g
16219 s%@AMTARFLAGS@%$AMTARFLAGS%g
16220 s%@SET_MAKE@%$SET_MAKE%g
16221 s%@top_builddir@%$top_builddir%g
16222 s%@ldap_subdir@%$ldap_subdir%g
16223 s%@CC@%$CC%g
16224 s%@RANLIB@%$RANLIB%g
16225 s%@LN_S@%$LN_S%g
16226 s%@DLLTOOL@%$DLLTOOL%g
16227 s%@AS@%$AS%g
16228 s%@OBJDUMP@%$OBJDUMP%g
16229 s%@LIBTOOL@%$LIBTOOL%g
16230 s%@LN_H@%$LN_H%g
16231 s%@SENDMAIL@%$SENDMAIL%g
16232 s%@EDITOR@%$EDITOR%g
16233 s%@FINGER@%$FINGER%g
16234 s%@PERLBIN@%$PERLBIN%g
16235 s%@CPP@%$CPP%g
16236 s%@EXEEXT@%$EXEEXT%g
16237 s%@OBJEXT@%$OBJEXT%g
16238 s%@OL_MKDEP@%$OL_MKDEP%g
16239 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16240 s%@LIBOBJS@%$LIBOBJS%g
16241 s%@LIBSRCS@%$LIBSRCS%g
16242 s%@PLAT@%$PLAT%g
16243 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16244 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16245 s%@DYN_EXT@%$DYN_EXT%g
16246 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16247 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16248 s%@BUILD_LDAP@%$BUILD_LDAP%g
16249 s%@BUILD_LDBM@%$BUILD_LDBM%g
16250 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16251 s%@BUILD_PERL@%$BUILD_PERL%g
16252 s%@BUILD_SHELL@%$BUILD_SHELL%g
16253 s%@BUILD_SQL@%$BUILD_SQL%g
16254 s%@BUILD_TCL@%$BUILD_TCL%g
16255 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16256 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16257 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16258 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16259 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16260 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16261 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16262 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16263 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16264 s%@LDAP_LIBS@%$LDAP_LIBS%g
16265 s%@LDIF_LIBS@%$LDIF_LIBS%g
16266 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16267 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16268 s%@LDBM_LIBS@%$LDBM_LIBS%g
16269 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16270 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16271 s%@WRAP_LIBS@%$WRAP_LIBS%g
16272 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16273 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16274 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16275 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16276 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16277 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16278 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16279 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16280 s%@KRB4_LIBS@%$KRB4_LIBS%g
16281 s%@KRB5_LIBS@%$KRB5_LIBS%g
16282 s%@READLINE_LIBS@%$READLINE_LIBS%g
16283 s%@SASL_LIBS@%$SASL_LIBS%g
16284 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16285 s%@TLS_LIBS@%$TLS_LIBS%g
16286 s%@MODULES_LIBS@%$MODULES_LIBS%g
16287 s%@AUTH_LIBS@%$AUTH_LIBS%g
16288 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16289 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16290 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16291
16292 CEOF
16293 EOF
16294
16295 cat >> $CONFIG_STATUS <<\EOF
16296
16297 # Split the substitutions into bite-sized pieces for seds with
16298 # small command number limits, like on Digital OSF/1 and HP-UX.
16299 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16300 ac_file=1 # Number of current file.
16301 ac_beg=1 # First line for current file.
16302 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16303 ac_more_lines=:
16304 ac_sed_cmds=""
16305 while $ac_more_lines; do
16306   if test $ac_beg -gt 1; then
16307     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16308   else
16309     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16310   fi
16311   if test ! -s conftest.s$ac_file; then
16312     ac_more_lines=false
16313     rm -f conftest.s$ac_file
16314   else
16315     if test -z "$ac_sed_cmds"; then
16316       ac_sed_cmds="sed -f conftest.s$ac_file"
16317     else
16318       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16319     fi
16320     ac_file=`expr $ac_file + 1`
16321     ac_beg=$ac_end
16322     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16323   fi
16324 done
16325 if test -z "$ac_sed_cmds"; then
16326   ac_sed_cmds=cat
16327 fi
16328 EOF
16329
16330 cat >> $CONFIG_STATUS <<EOF
16331
16332 CONFIG_FILES=\${CONFIG_FILES-"\
16333 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16334 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16335 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16336 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16337 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16338 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16339 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16340 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16341 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16342 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16343 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16344 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16345 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16346 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16347 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16348 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16349 include/Makefile:build/top.mk:include/Makefile.in \
16350 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16351 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16352 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16353 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16354 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16355 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16356 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16357 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16358 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16359 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16360 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16361 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16362 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16363 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16364 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16365 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16366 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16367 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16368 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16369 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16370 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16371 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16372 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16373 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16374 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16375 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16376 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16377 "}
16378 EOF
16379 cat >> $CONFIG_STATUS <<\EOF
16380 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16381   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16382   case "$ac_file" in
16383   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16384        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16385   *) ac_file_in="${ac_file}.in" ;;
16386   esac
16387
16388   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16389
16390   # Remove last slash and all that follows it.  Not all systems have dirname.
16391   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16392   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16393     # The file is in a subdirectory.
16394     test ! -d "$ac_dir" && mkdir "$ac_dir"
16395     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16396     # A "../" for each directory in $ac_dir_suffix.
16397     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16398   else
16399     ac_dir_suffix= ac_dots=
16400   fi
16401
16402   case "$ac_given_srcdir" in
16403   .)  srcdir=.
16404       if test -z "$ac_dots"; then top_srcdir=.
16405       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16406   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16407   *) # Relative path.
16408     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16409     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16410   esac
16411
16412   case "$ac_given_INSTALL" in
16413   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16414   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16415   esac
16416
16417   echo creating "$ac_file"
16418   rm -f "$ac_file"
16419   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16420   case "$ac_file" in
16421   *[Mm]akefile*) ac_comsub="1i\\
16422 # $configure_input" ;;
16423   *) ac_comsub= ;;
16424   esac
16425
16426   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16427   sed -e "$ac_comsub
16428 s%@configure_input@%$configure_input%g
16429 s%@srcdir@%$srcdir%g
16430 s%@top_srcdir@%$top_srcdir%g
16431 s%@INSTALL@%$INSTALL%g
16432 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16433 fi; done
16434 rm -f conftest.s*
16435
16436 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16437 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16438 #
16439 # ac_d sets the value in "#define NAME VALUE" lines.
16440 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16441 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16442 ac_dC='\3'
16443 ac_dD='%g'
16444 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16445 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16446 ac_uB='\([      ]\)%\1#\2define\3'
16447 ac_uC=' '
16448 ac_uD='\4%g'
16449 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16450 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16451 ac_eB='$%\1#\2define\3'
16452 ac_eC=' '
16453 ac_eD='%g'
16454
16455 if test "${CONFIG_HEADERS+set}" != set; then
16456 EOF
16457 cat >> $CONFIG_STATUS <<EOF
16458   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16459 EOF
16460 cat >> $CONFIG_STATUS <<\EOF
16461 fi
16462 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16463   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16464   case "$ac_file" in
16465   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16466        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16467   *) ac_file_in="${ac_file}.in" ;;
16468   esac
16469
16470   echo creating $ac_file
16471
16472   rm -f conftest.frag conftest.in conftest.out
16473   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16474   cat $ac_file_inputs > conftest.in
16475
16476 EOF
16477
16478 # Transform confdefs.h into a sed script conftest.vals that substitutes
16479 # the proper values into config.h.in to produce config.h.  And first:
16480 # Protect against being on the right side of a sed subst in config.status.
16481 # Protect against being in an unquoted here document in config.status.
16482 rm -f conftest.vals
16483 cat > conftest.hdr <<\EOF
16484 s/[\\&%]/\\&/g
16485 s%[\\$`]%\\&%g
16486 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16487 s%ac_d%ac_u%gp
16488 s%ac_u%ac_e%gp
16489 EOF
16490 sed -n -f conftest.hdr confdefs.h > conftest.vals
16491 rm -f conftest.hdr
16492
16493 # This sed command replaces #undef with comments.  This is necessary, for
16494 # example, in the case of _POSIX_SOURCE, which is predefined and required
16495 # on some systems where configure will not decide to define it.
16496 cat >> conftest.vals <<\EOF
16497 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16498 EOF
16499
16500 # Break up conftest.vals because some shells have a limit on
16501 # the size of here documents, and old seds have small limits too.
16502
16503 rm -f conftest.tail
16504 while :
16505 do
16506   ac_lines=`grep -c . conftest.vals`
16507   # grep -c gives empty output for an empty file on some AIX systems.
16508   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16509   # Write a limited-size here document to conftest.frag.
16510   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16511   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16512   echo 'CEOF
16513   sed -f conftest.frag conftest.in > conftest.out
16514   rm -f conftest.in
16515   mv conftest.out conftest.in
16516 ' >> $CONFIG_STATUS
16517   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16518   rm -f conftest.vals
16519   mv conftest.tail conftest.vals
16520 done
16521 rm -f conftest.vals
16522
16523 cat >> $CONFIG_STATUS <<\EOF
16524   rm -f conftest.frag conftest.h
16525   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16526   cat conftest.in >> conftest.h
16527   rm -f conftest.in
16528   if cmp -s $ac_file conftest.h 2>/dev/null; then
16529     echo "$ac_file is unchanged"
16530     rm -f conftest.h
16531   else
16532     # Remove last slash and all that follows it.  Not all systems have dirname.
16533       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16534       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16535       # The file is in a subdirectory.
16536       test ! -d "$ac_dir" && mkdir "$ac_dir"
16537     fi
16538     rm -f $ac_file
16539     mv conftest.h $ac_file
16540   fi
16541 fi; done
16542
16543 EOF
16544 cat >> $CONFIG_STATUS <<EOF
16545
16546 EOF
16547 cat >> $CONFIG_STATUS <<\EOF
16548
16549 date > stamp-h
16550 echo Please \"make depend\" to build dependencies
16551
16552 exit 0
16553 EOF
16554 chmod +x $CONFIG_STATUS
16555 rm -fr confdefs* $ac_clean_files
16556 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16557