]> git.sur5r.net Git - openldap/blob - configure
Import test000-rootdse schema check and other misc changes.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.14 2000/09/08 15:02:52 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 (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster  enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-rlookups     enable reverse lookups (auto)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-dnssrv       enable dnssrv backend (no)"
89 ac_help="$ac_help
90     --with-dnssrv-module  module type (static)"
91 ac_help="$ac_help
92     --enable-ldap         enable ldap backend (no)"
93 ac_help="$ac_help
94     --with-ldap-module    module type (static)"
95 ac_help="$ac_help
96     --enable-ldbm         enable ldbm backend (yes)"
97 ac_help="$ac_help
98     --with-ldbm-api       with LDBM API (auto)"
99 ac_help="$ac_help
100     --with-ldbm-module    module type (static)"
101 ac_help="$ac_help
102     --with-ldbm-type      use LDBM type (auto)"
103 ac_help="$ac_help
104     --enable-passwd       enable passwd backend (no)"
105 ac_help="$ac_help
106     --with-passwd-module  module type (static)"
107 ac_help="$ac_help
108     --enable-shell        enable shell backend (no)"
109 ac_help="$ac_help
110     --with-shell-module   module type (static)"
111 ac_help="$ac_help
112     --enable-sql          enable sql backend (no)"
113 ac_help="$ac_help
114     --with-sql-module     module type (static)"
115 ac_help="$ac_help
116 SLURPD (Replication Daemon) Options:"
117 ac_help="$ac_help
118   --enable-slurpd         enable building slurpd (auto)"
119 ac_help="$ac_help
120 Library Generation & Linking Options"
121 ac_help="$ac_help
122   --enable-static[=PKGS]  build static libraries [default=yes]"
123 ac_help="$ac_help
124   --enable-shared[=PKGS]  build shared libraries [default=yes]"
125 ac_help="$ac_help
126   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
127 ac_help="$ac_help
128   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
129 ac_help="$ac_help
130   --disable-libtool-lock  avoid locking (might break parallel builds)"
131
132 # Initialize some variables set by options.
133 # The variables have the same names as the options, with
134 # dashes changed to underlines.
135 build=NONE
136 cache_file=./config.cache
137 exec_prefix=NONE
138 host=NONE
139 no_create=
140 nonopt=NONE
141 no_recursion=
142 prefix=NONE
143 program_prefix=NONE
144 program_suffix=NONE
145 program_transform_name=s,x,x,
146 silent=
147 site=
148 srcdir=
149 target=NONE
150 verbose=
151 x_includes=NONE
152 x_libraries=NONE
153 bindir='${exec_prefix}/bin'
154 sbindir='${exec_prefix}/sbin'
155 libexecdir='${exec_prefix}/libexec'
156 datadir='${prefix}/share'
157 sysconfdir='${prefix}/etc'
158 sharedstatedir='${prefix}/com'
159 localstatedir='${prefix}/var'
160 libdir='${exec_prefix}/lib'
161 includedir='${prefix}/include'
162 oldincludedir='/usr/include'
163 infodir='${prefix}/info'
164 mandir='${prefix}/man'
165
166 # Initialize some other variables.
167 subdirs=
168 MFLAGS= MAKEFLAGS=
169 SHELL=${CONFIG_SHELL-/bin/sh}
170 # Maximum number of lines to put in a shell here document.
171 ac_max_here_lines=12
172
173 ac_prev=
174 for ac_option
175 do
176
177   # If the previous option needs an argument, assign it.
178   if test -n "$ac_prev"; then
179     eval "$ac_prev=\$ac_option"
180     ac_prev=
181     continue
182   fi
183
184   case "$ac_option" in
185   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
186   *) ac_optarg= ;;
187   esac
188
189   # Accept the important Cygnus configure options, so we can diagnose typos.
190
191   case "$ac_option" in
192
193   -bindir | --bindir | --bindi | --bind | --bin | --bi)
194     ac_prev=bindir ;;
195   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
196     bindir="$ac_optarg" ;;
197
198   -build | --build | --buil | --bui | --bu)
199     ac_prev=build ;;
200   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
201     build="$ac_optarg" ;;
202
203   -cache-file | --cache-file | --cache-fil | --cache-fi \
204   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
205     ac_prev=cache_file ;;
206   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
207   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
208     cache_file="$ac_optarg" ;;
209
210   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
211     ac_prev=datadir ;;
212   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
213   | --da=*)
214     datadir="$ac_optarg" ;;
215
216   -disable-* | --disable-*)
217     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
218     # Reject names that are not valid shell variable names.
219     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
220       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
221     fi
222     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
223     eval "enable_${ac_feature}=no" ;;
224
225   -enable-* | --enable-*)
226     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
227     # Reject names that are not valid shell variable names.
228     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
229       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
230     fi
231     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
232     case "$ac_option" in
233       *=*) ;;
234       *) ac_optarg=yes ;;
235     esac
236     eval "enable_${ac_feature}='$ac_optarg'" ;;
237
238   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
239   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
240   | --exec | --exe | --ex)
241     ac_prev=exec_prefix ;;
242   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
243   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
244   | --exec=* | --exe=* | --ex=*)
245     exec_prefix="$ac_optarg" ;;
246
247   -gas | --gas | --ga | --g)
248     # Obsolete; use --with-gas.
249     with_gas=yes ;;
250
251   -help | --help | --hel | --he)
252     # Omit some internal or obsolete options to make the list less imposing.
253     # This message is too long to be a string in the A/UX 3.1 sh.
254     cat << EOF
255 Usage: configure [options] [host]
256 Options: [defaults in brackets after descriptions]
257 Configuration:
258   --cache-file=FILE       cache test results in FILE
259   --help                  print this message
260   --no-create             do not create output files
261   --quiet, --silent       do not print \`checking...' messages
262   --version               print the version of autoconf that created configure
263 Directory and file names:
264   --prefix=PREFIX         install architecture-independent files in PREFIX
265                           [$ac_default_prefix]
266   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
267                           [same as prefix]
268   --bindir=DIR            user executables in DIR [EPREFIX/bin]
269   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
270   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
271   --datadir=DIR           read-only architecture-independent data in DIR
272                           [PREFIX/share]
273   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
274   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
275                           [PREFIX/com]
276   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
277   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
278   --includedir=DIR        C header files in DIR [PREFIX/include]
279   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
280   --infodir=DIR           info documentation in DIR [PREFIX/info]
281   --mandir=DIR            man documentation in DIR [PREFIX/man]
282   --srcdir=DIR            find the sources in DIR [configure dir or ..]
283   --program-prefix=PREFIX prepend PREFIX to installed program names
284   --program-suffix=SUFFIX append SUFFIX to installed program names
285   --program-transform-name=PROGRAM
286                           run sed PROGRAM on installed program names
287 EOF
288     cat << EOF
289 Host type:
290   --build=BUILD           configure for building on BUILD [BUILD=HOST]
291   --host=HOST             configure for HOST [guessed]
292   --target=TARGET         configure for TARGET [TARGET=HOST]
293 Features and packages:
294   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
295   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
296   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
297   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
298   --x-includes=DIR        X include files are in DIR
299   --x-libraries=DIR       X library files are in DIR
300 EOF
301     if test -n "$ac_help"; then
302       echo "--enable and --with options recognized:$ac_help"
303     fi
304     exit 0 ;;
305
306   -host | --host | --hos | --ho)
307     ac_prev=host ;;
308   -host=* | --host=* | --hos=* | --ho=*)
309     host="$ac_optarg" ;;
310
311   -includedir | --includedir | --includedi | --included | --include \
312   | --includ | --inclu | --incl | --inc)
313     ac_prev=includedir ;;
314   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
315   | --includ=* | --inclu=* | --incl=* | --inc=*)
316     includedir="$ac_optarg" ;;
317
318   -infodir | --infodir | --infodi | --infod | --info | --inf)
319     ac_prev=infodir ;;
320   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
321     infodir="$ac_optarg" ;;
322
323   -libdir | --libdir | --libdi | --libd)
324     ac_prev=libdir ;;
325   -libdir=* | --libdir=* | --libdi=* | --libd=*)
326     libdir="$ac_optarg" ;;
327
328   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
329   | --libexe | --libex | --libe)
330     ac_prev=libexecdir ;;
331   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
332   | --libexe=* | --libex=* | --libe=*)
333     libexecdir="$ac_optarg" ;;
334
335   -localstatedir | --localstatedir | --localstatedi | --localstated \
336   | --localstate | --localstat | --localsta | --localst \
337   | --locals | --local | --loca | --loc | --lo)
338     ac_prev=localstatedir ;;
339   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
340   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
341   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
342     localstatedir="$ac_optarg" ;;
343
344   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
345     ac_prev=mandir ;;
346   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
347     mandir="$ac_optarg" ;;
348
349   -nfp | --nfp | --nf)
350     # Obsolete; use --without-fp.
351     with_fp=no ;;
352
353   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
354   | --no-cr | --no-c)
355     no_create=yes ;;
356
357   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
358   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
359     no_recursion=yes ;;
360
361   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
362   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
363   | --oldin | --oldi | --old | --ol | --o)
364     ac_prev=oldincludedir ;;
365   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
366   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
367   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
368     oldincludedir="$ac_optarg" ;;
369
370   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
371     ac_prev=prefix ;;
372   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
373     prefix="$ac_optarg" ;;
374
375   -program-prefix | --program-prefix | --program-prefi | --program-pref \
376   | --program-pre | --program-pr | --program-p)
377     ac_prev=program_prefix ;;
378   -program-prefix=* | --program-prefix=* | --program-prefi=* \
379   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
380     program_prefix="$ac_optarg" ;;
381
382   -program-suffix | --program-suffix | --program-suffi | --program-suff \
383   | --program-suf | --program-su | --program-s)
384     ac_prev=program_suffix ;;
385   -program-suffix=* | --program-suffix=* | --program-suffi=* \
386   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
387     program_suffix="$ac_optarg" ;;
388
389   -program-transform-name | --program-transform-name \
390   | --program-transform-nam | --program-transform-na \
391   | --program-transform-n | --program-transform- \
392   | --program-transform | --program-transfor \
393   | --program-transfo | --program-transf \
394   | --program-trans | --program-tran \
395   | --progr-tra | --program-tr | --program-t)
396     ac_prev=program_transform_name ;;
397   -program-transform-name=* | --program-transform-name=* \
398   | --program-transform-nam=* | --program-transform-na=* \
399   | --program-transform-n=* | --program-transform-=* \
400   | --program-transform=* | --program-transfor=* \
401   | --program-transfo=* | --program-transf=* \
402   | --program-trans=* | --program-tran=* \
403   | --progr-tra=* | --program-tr=* | --program-t=*)
404     program_transform_name="$ac_optarg" ;;
405
406   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
407   | -silent | --silent | --silen | --sile | --sil)
408     silent=yes ;;
409
410   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
411     ac_prev=sbindir ;;
412   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
413   | --sbi=* | --sb=*)
414     sbindir="$ac_optarg" ;;
415
416   -sharedstatedir | --sharedstatedir | --sharedstatedi \
417   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
418   | --sharedst | --shareds | --shared | --share | --shar \
419   | --sha | --sh)
420     ac_prev=sharedstatedir ;;
421   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
422   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
423   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
424   | --sha=* | --sh=*)
425     sharedstatedir="$ac_optarg" ;;
426
427   -site | --site | --sit)
428     ac_prev=site ;;
429   -site=* | --site=* | --sit=*)
430     site="$ac_optarg" ;;
431
432   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
433     ac_prev=srcdir ;;
434   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
435     srcdir="$ac_optarg" ;;
436
437   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
438   | --syscon | --sysco | --sysc | --sys | --sy)
439     ac_prev=sysconfdir ;;
440   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
441   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
442     sysconfdir="$ac_optarg" ;;
443
444   -target | --target | --targe | --targ | --tar | --ta | --t)
445     ac_prev=target ;;
446   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
447     target="$ac_optarg" ;;
448
449   -v | -verbose | --verbose | --verbos | --verbo | --verb)
450     verbose=yes ;;
451
452   -version | --version | --versio | --versi | --vers)
453     echo "configure generated by autoconf version 2.13.1"
454     exit 0 ;;
455
456   -with-* | --with-*)
457     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
458     # Reject names that are not valid shell variable names.
459     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
460       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
461     fi
462     ac_package=`echo $ac_package| sed 's/-/_/g'`
463     case "$ac_option" in
464       *=*) ;;
465       *) ac_optarg=yes ;;
466     esac
467     eval "with_${ac_package}='$ac_optarg'" ;;
468
469   -without-* | --without-*)
470     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
471     # Reject names that are not valid shell variable names.
472     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
473       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
474     fi
475     ac_package=`echo $ac_package| sed 's/-/_/g'`
476     eval "with_${ac_package}=no" ;;
477
478   --x)
479     # Obsolete; use --with-x.
480     with_x=yes ;;
481
482   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
483   | --x-incl | --x-inc | --x-in | --x-i)
484     ac_prev=x_includes ;;
485   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
486   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
487     x_includes="$ac_optarg" ;;
488
489   -x-libraries | --x-libraries | --x-librarie | --x-librari \
490   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
491     ac_prev=x_libraries ;;
492   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
493   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
494     x_libraries="$ac_optarg" ;;
495
496   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
497     ;;
498
499   *)
500     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
501       echo "configure: warning: $ac_option: invalid host type" 1>&2
502     fi
503     if test "x$nonopt" != xNONE; then
504       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
505     fi
506     nonopt="$ac_option"
507     ;;
508
509   esac
510 done
511
512 if test -n "$ac_prev"; then
513   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
514 fi
515
516 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
517
518 # File descriptor usage:
519 # 0 standard input
520 # 1 file creation
521 # 2 errors and warnings
522 # 3 some systems may open it to /dev/tty
523 # 4 used on the Kubota Titan
524 # 6 checking for... messages and results
525 # 5 compiler messages saved in config.log
526 if test "$silent" = yes; then
527   exec 6>/dev/null
528 else
529   exec 6>&1
530 fi
531 exec 5>./config.log
532
533 echo "\
534 This file contains any messages produced by compilers while
535 running configure, to aid debugging if configure makes a mistake.
536 " 1>&5
537
538 # Strip out --no-create and --no-recursion so they do not pile up.
539 # Also quote any args containing shell metacharacters.
540 ac_configure_args=
541 for ac_arg
542 do
543   case "$ac_arg" in
544   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
545   | --no-cr | --no-c) ;;
546   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
547   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
548   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
549   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
550   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
551   esac
552 done
553
554 # NLS nuisances.
555 # Only set these to C if already set.  These must not be set unconditionally
556 # because not all systems understand e.g. LANG=C (notably SCO).
557 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
558 # Non-C LC_CTYPE values break the ctype check.
559 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
560 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
561 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
562 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
563
564 # confdefs.h avoids OS command line length limits that DEFS can exceed.
565 rm -rf conftest* confdefs.h
566 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
567 echo > confdefs.h
568
569 # A filename unique to this package, relative to the directory that
570 # configure is in, which we can look for to find out if srcdir is correct.
571 ac_unique_file=build/version
572
573 # Find the source files, if location was not specified.
574 if test -z "$srcdir"; then
575   ac_srcdir_defaulted=yes
576   # Try the directory containing this script, then its parent.
577   ac_prog=$0
578   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
579   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
580   srcdir=$ac_confdir
581   if test ! -r $srcdir/$ac_unique_file; then
582     srcdir=..
583   fi
584 else
585   ac_srcdir_defaulted=no
586 fi
587 if test ! -r $srcdir/$ac_unique_file; then
588   if test "$ac_srcdir_defaulted" = yes; then
589     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
590   else
591     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
592   fi
593 fi
594 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
595
596 # Prefer explicitly selected file to automatically selected ones.
597 if test -z "$CONFIG_SITE"; then
598   if test "x$prefix" != xNONE; then
599     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
600   else
601     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
602   fi
603 fi
604 for ac_site_file in $CONFIG_SITE; do
605   if test -r "$ac_site_file"; then
606     echo "loading site script $ac_site_file"
607     . "$ac_site_file"
608   fi
609 done
610
611
612 ac_ext=c
613 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
614 ac_cpp='$CPP $CPPFLAGS'
615 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
616 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
617 cross_compiling=$ac_cv_prog_cc_cross
618
619 ac_exeext=
620 ac_objext=o
621 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
622   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
623   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
624     ac_n= ac_c='
625 ' ac_t='        '
626   else
627     ac_n=-n ac_c= ac_t=
628   fi
629 else
630   ac_n= ac_c='\c' ac_t=
631 fi
632
633
634 # set unset (borrowed from autoconf 2.14a)
635 if (unset FOO) >/dev/null 2>&1; then
636   ol_unset=unset
637 else
638   ol_unset=false
639 fi
640 # unset CDPATH
641 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
642
643 ac_aux_dir=
644 for ac_dir in build $srcdir/build; do
645   if test -f $ac_dir/install-sh; then
646     ac_aux_dir=$ac_dir
647     ac_install_sh="$ac_aux_dir/install-sh -c"
648     break
649   elif test -f $ac_dir/install.sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install.sh -c"
652     break
653   elif test -f $ac_dir/shtool; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/shtool install -c"
656     break
657   fi
658 done
659 if test -z "$ac_aux_dir"; then
660   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
661 fi
662 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
663 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
664 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
665
666 OL_VERSION=`cat $ac_aux_dir/version`
667 if test -z "$OL_VERSION"; then
668         { echo "configure: error: could not determine version" 1>&2; exit 1; }
669 fi
670
671 echo "Configuring OpenLDAP $OL_VERSION ..."
672
673
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:676: checking host system type" >&5
676 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
677
678 # Make sure we can run config.sub.
679   if $ac_config_sub sun4 >/dev/null 2>&1; then :
680     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
681   fi
682
683   ac_cv_host_alias=$host
684   case "$ac_cv_host_alias" in
685   NONE)
686     case $nonopt in
687     NONE)
688       if ac_cv_host_alias=`$ac_config_guess`; then :
689       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
690       fi ;;
691     *) ac_cv_host_alias=$nonopt ;;
692     esac ;;
693   esac
694
695   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
696   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
697   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
698   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
699 else
700   echo $ac_n "(cached) $ac_c" 1>&6
701 fi
702
703 echo "$ac_t""$ac_cv_host" 1>&6
704
705 host=$ac_cv_host
706 host_alias=$ac_cv_host_alias
707 host_cpu=$ac_cv_host_cpu
708 host_vendor=$ac_cv_host_vendor
709 host_os=$ac_cv_host_os
710
711
712
713
714
715 echo $ac_n "checking target system type""... $ac_c" 1>&6
716 echo "configure:717: checking target system type" >&5
717 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
718
719 # Make sure we can run config.sub.
720   if $ac_config_sub sun4 >/dev/null 2>&1; then :
721     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
722   fi
723
724   ac_cv_target_alias=$target
725   case "$ac_cv_target_alias" in
726   NONE)
727     case $nonopt in
728     NONE)
729       ac_cv_target_alias=$host_alias ;;
730
731     *) ac_cv_target_alias=$nonopt ;;
732     esac ;;
733   esac
734
735   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
736   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
737   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
738   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
739 else
740   echo $ac_n "(cached) $ac_c" 1>&6
741 fi
742
743 echo "$ac_t""$ac_cv_target" 1>&6
744
745 target=$ac_cv_target
746 target_alias=$ac_cv_target_alias
747 target_cpu=$ac_cv_target_cpu
748 target_vendor=$ac_cv_target_vendor
749 target_os=$ac_cv_target_os
750
751
752
753
754
755 echo $ac_n "checking build system type""... $ac_c" 1>&6
756 echo "configure:757: checking build system type" >&5
757 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
758
759 # Make sure we can run config.sub.
760   if $ac_config_sub sun4 >/dev/null 2>&1; then :
761     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
762   fi
763
764   ac_cv_build_alias=$build
765   case "$ac_cv_build_alias" in
766   NONE)
767     case $nonopt in
768     NONE)
769       ac_cv_build_alias=$host_alias ;;
770
771     *) ac_cv_build_alias=$nonopt ;;
772     esac ;;
773   esac
774
775   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
776   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
777   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
778   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
779 else
780   echo $ac_n "(cached) $ac_c" 1>&6
781 fi
782
783 echo "$ac_t""$ac_cv_build" 1>&6
784
785 build=$ac_cv_build
786 build_alias=$ac_cv_build_alias
787 build_cpu=$ac_cv_build_cpu
788 build_vendor=$ac_cv_build_vendor
789 build_os=$ac_cv_build_os
790
791
792
793
794
795 # Do some error checking and defaulting for the host and target type.
796 # The inputs are:
797 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
798 #
799 # The rules are:
800 # 1. You are not allowed to specify --host, --target, and nonopt at the
801 #    same time.
802 # 2. Host defaults to nonopt.
803 # 3. If nonopt is not specified, then host defaults to the current host,
804 #    as determined by config.guess.
805 # 4. Target and build default to nonopt.
806 # 5. If nonopt is not specified, then target and build default to host.
807
808 # The aliases save the names the user supplied, while $host etc.
809 # will get canonicalized.
810 case $host---$target---$nonopt in
811 NONE---*---* | *---NONE---* | *---*---NONE) ;;
812 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
813 esac
814
815 test "$host_alias" != "$target_alias" &&
816   test "$program_prefix$program_suffix$program_transform_name" = \
817     NONENONEs,x,x, &&
818   program_prefix=${target_alias}-
819
820
821 # Find a good install program.  We prefer a C program (faster),
822 # so one script is as good as another.  But avoid the broken or
823 # incompatible versions:
824 # SysV /etc/install, /usr/sbin/install
825 # SunOS /usr/etc/install
826 # IRIX /sbin/install
827 # AIX /bin/install
828 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
829 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
830 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
831 # ./install, which can be erroneously created by make from ./install.sh.
832 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
833 echo "configure:834: checking for a BSD compatible install" >&5
834 if test -z "$INSTALL"; then
835 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
836   echo $ac_n "(cached) $ac_c" 1>&6
837 else
838     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
839   for ac_dir in $PATH; do
840     # Account for people who put trailing slashes in PATH elements.
841     case "$ac_dir/" in
842     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
843     *)
844       # OSF1 and SCO ODT 3.0 have their own names for install.
845       # Don't use installbsd from OSF since it installs stuff as root
846       # by default.
847       for ac_prog in ginstall scoinst install; do
848         if test -f $ac_dir/$ac_prog; then
849           if test $ac_prog = install &&
850             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
851             # AIX install.  It has an incompatible calling convention.
852             :
853           elif test $ac_prog = install &&
854             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # program-specific install script used by HP pwplus--don't use.
856             :
857           else
858             ac_cv_path_install="$ac_dir/$ac_prog -c"
859             break 2
860           fi
861         fi
862       done
863       ;;
864     esac
865   done
866   IFS="$ac_save_IFS"
867
868 fi
869   if test "${ac_cv_path_install+set}" = set; then
870     INSTALL="$ac_cv_path_install"
871   else
872     # As a last resort, use the slow shell script.  We don't cache a
873     # path for INSTALL within a source directory, because that will
874     # break other packages using the cache if that directory is
875     # removed, or if the path is relative.
876     INSTALL="$ac_install_sh"
877   fi
878 fi
879 echo "$ac_t""$INSTALL" 1>&6
880
881 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
882 # It thinks the first close brace ends the variable substitution.
883 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
884
885 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
886
887 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
888
889 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
890 echo "configure:891: checking whether build environment is sane" >&5
891 # Just in case
892 sleep 1
893 echo timestamp > conftestfile
894 # Do `set' in a subshell so we don't clobber the current shell's
895 # arguments.  Must try -L first in case configure is actually a
896 # symlink; some systems play weird games with the mod time of symlinks
897 # (eg FreeBSD returns the mod time of the symlink's containing
898 # directory).
899 if (
900    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
901    if test "$*" = "X"; then
902       # -L didn't work.
903       set X `ls -t $srcdir/configure conftestfile`
904    fi
905    if test "$*" != "X $srcdir/configure conftestfile" \
906       && test "$*" != "X conftestfile $srcdir/configure"; then
907
908       # If neither matched, then we have a broken ls.  This can happen
909       # if, for instance, CONFIG_SHELL is bash and it inherits a
910       # broken ls alias from the environment.  This has actually
911       # happened.  Such a system could not be considered "sane".
912       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
913 alias in your environment" 1>&2; exit 1; }
914    fi
915
916    test "$2" = conftestfile
917    )
918 then
919    # Ok.
920    :
921 else
922    { echo "configure: error: newly created file is older than distributed files!
923 Check your system clock" 1>&2; exit 1; }
924 fi
925 rm -f conftest*
926 echo "$ac_t""yes" 1>&6
927 if test "$program_transform_name" = s,x,x,; then
928   program_transform_name=
929 else
930   # Double any \ or $.  echo might interpret backslashes.
931   cat <<\EOF_SED > conftestsed
932 s,\\,\\\\,g; s,\$,$$,g
933 EOF_SED
934   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
935   rm -f conftestsed
936 fi
937 test "$program_prefix" != NONE &&
938   program_transform_name="s,^,${program_prefix},;$program_transform_name"
939 # Use a double $ so make ignores it.
940 test "$program_suffix" != NONE &&
941   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
942
943 # sed with no file args requires a program.
944 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
945
946 for ac_prog in mawk gawk nawk awk
947 do
948 # Extract the first word of "$ac_prog", so it can be a program name with args.
949 set dummy $ac_prog; ac_word=$2
950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
951 echo "configure:952: checking for $ac_word" >&5
952 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
953   echo $ac_n "(cached) $ac_c" 1>&6
954 else
955   if test -n "$AWK"; then
956   ac_cv_prog_AWK="$AWK" # Let the user override the test.
957 else
958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
959   ac_dummy="$PATH"
960   for ac_dir in $ac_dummy; do
961     test -z "$ac_dir" && ac_dir=.
962     if test -f $ac_dir/$ac_word; then
963       ac_cv_prog_AWK="$ac_prog"
964       break
965     fi
966   done
967   IFS="$ac_save_ifs"
968 fi
969 fi
970 AWK="$ac_cv_prog_AWK"
971 if test -n "$AWK"; then
972   echo "$ac_t""$AWK" 1>&6
973 else
974   echo "$ac_t""no" 1>&6
975 fi
976
977 test -n "$AWK" && break
978 done
979
980 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
981 echo "configure:982: checking whether ${MAKE-make} sets \${MAKE}" >&5
982 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
983 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
984   echo $ac_n "(cached) $ac_c" 1>&6
985 else
986   cat > conftestmake <<\EOF
987 all:
988         @echo 'ac_maketemp="${MAKE}"'
989 EOF
990 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
991 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
992 if test -n "$ac_maketemp"; then
993   eval ac_cv_prog_make_${ac_make}_set=yes
994 else
995   eval ac_cv_prog_make_${ac_make}_set=no
996 fi
997 rm -f conftestmake
998 fi
999 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1000   echo "$ac_t""yes" 1>&6
1001   SET_MAKE=
1002 else
1003   echo "$ac_t""no" 1>&6
1004   SET_MAKE="MAKE=${MAKE-make}"
1005 fi
1006
1007
1008
1009 PACKAGE=OpenLDAP
1010
1011 VERSION=$OL_VERSION
1012
1013 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1014   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1015 fi
1016
1017
1018
1019 missing_dir=`cd $ac_aux_dir && pwd`
1020 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working aclocal" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1026    ACLOCAL=aclocal
1027    echo "$ac_t""found" 1>&6
1028 else
1029    ACLOCAL="$missing_dir/missing aclocal"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working autoconf" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOCONF=autoconf
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOCONF="$missing_dir/missing autoconf"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working automake" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (automake --version) < /dev/null > /dev/null 2>&1; then
1052    AUTOMAKE=automake
1053    echo "$ac_t""found" 1>&6
1054 else
1055    AUTOMAKE="$missing_dir/missing automake"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1060 echo "configure:1061: checking for working autoheader" >&5
1061 # Run test in a subshell; some versions of sh will print an error if
1062 # an executable is not found, even if stderr is redirected.
1063 # Redirect stdin to placate older versions of autoconf.  Sigh.
1064 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1065    AUTOHEADER=autoheader
1066    echo "$ac_t""found" 1>&6
1067 else
1068    AUTOHEADER="$missing_dir/missing autoheader"
1069    echo "$ac_t""missing" 1>&6
1070 fi
1071
1072 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1073 echo "configure:1074: checking for working makeinfo" >&5
1074 # Run test in a subshell; some versions of sh will print an error if
1075 # an executable is not found, even if stderr is redirected.
1076 # Redirect stdin to placate older versions of autoconf.  Sigh.
1077 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1078    MAKEINFO=makeinfo
1079    echo "$ac_t""found" 1>&6
1080 else
1081    MAKEINFO="$missing_dir/missing makeinfo"
1082    echo "$ac_t""missing" 1>&6
1083 fi
1084
1085 install_sh="$missing_dir/install-sh"
1086 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1087
1088 for ac_prog in gnutar gtar tar
1089 do
1090 # Extract the first word of "$ac_prog", so it can be a program name with args.
1091 set dummy $ac_prog; ac_word=$2
1092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1093 echo "configure:1094: checking for $ac_word" >&5
1094 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1095   echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097   if test -n "$AMTAR"; then
1098   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1099 else
1100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1101   ac_dummy="$PATH"
1102   for ac_dir in $ac_dummy; do
1103     test -z "$ac_dir" && ac_dir=.
1104     if test -f $ac_dir/$ac_word; then
1105       ac_cv_prog_AMTAR="$ac_prog"
1106       break
1107     fi
1108   done
1109   IFS="$ac_save_ifs"
1110 fi
1111 fi
1112 AMTAR="$ac_cv_prog_AMTAR"
1113 if test -n "$AMTAR"; then
1114   echo "$ac_t""$AMTAR" 1>&6
1115 else
1116   echo "$ac_t""no" 1>&6
1117 fi
1118
1119 test -n "$AMTAR" && break
1120 done
1121
1122
1123 AMTARFLAGS=
1124 if test -n "$AMTAR"; then
1125   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1126         AMTARFLAGS=o
1127   fi
1128 fi
1129
1130
1131
1132 cat >> confdefs.h <<EOF
1133 #define OPENLDAP_PACKAGE "$PACKAGE"
1134 EOF
1135
1136 cat >> confdefs.h <<EOF
1137 #define OPENLDAP_VERSION "$VERSION"
1138 EOF
1139
1140
1141
1142
1143 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1144 echo "configure:1145: checking configure arguments" >&5
1145
1146
1147 top_builddir=`pwd`
1148
1149 ldap_subdir="/openldap"
1150
1151 # Check whether --with-subdir or --without-subdir was given.
1152 if test "${with_subdir+set}" = set; then
1153   withval="$with_subdir"
1154   case "$withval" in
1155         no) ldap_subdir=""
1156                 ;;
1157         yes)
1158                 ;;
1159         /*|\\*)
1160                 ldap_subdir="$withval"
1161                 ;;
1162         *)
1163                 ldap_subdir="/$withval"
1164                 ;;
1165 esac
1166
1167 fi
1168
1169
1170 # OpenLDAP --enable-debug
1171         # Check whether --enable-debug or --disable-debug was given.
1172 if test "${enable_debug+set}" = set; then
1173   enableval="$enable_debug"
1174   
1175         ol_arg=invalid
1176         for ol_val in auto yes no ; do
1177                 if test "$enableval" = "$ol_val" ; then
1178                         ol_arg="$ol_val"
1179                 fi
1180         done
1181         if test "$ol_arg" = "invalid" ; then
1182                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1183         fi
1184         ol_enable_debug="$ol_arg"
1185
1186 else
1187         ol_enable_debug="yes"
1188 fi
1189 # end --enable-debug
1190 # OpenLDAP --enable-syslog
1191         # Check whether --enable-syslog or --disable-syslog was given.
1192 if test "${enable_syslog+set}" = set; then
1193   enableval="$enable_syslog"
1194   
1195         ol_arg=invalid
1196         for ol_val in auto yes no ; do
1197                 if test "$enableval" = "$ol_val" ; then
1198                         ol_arg="$ol_val"
1199                 fi
1200         done
1201         if test "$ol_arg" = "invalid" ; then
1202                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1203         fi
1204         ol_enable_syslog="$ol_arg"
1205
1206 else
1207         ol_enable_syslog="auto"
1208 fi
1209 # end --enable-syslog
1210 # OpenLDAP --enable-proctitle
1211         # Check whether --enable-proctitle or --disable-proctitle was given.
1212 if test "${enable_proctitle+set}" = set; then
1213   enableval="$enable_proctitle"
1214   
1215         ol_arg=invalid
1216         for ol_val in auto yes no ; do
1217                 if test "$enableval" = "$ol_val" ; then
1218                         ol_arg="$ol_val"
1219                 fi
1220         done
1221         if test "$ol_arg" = "invalid" ; then
1222                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1223         fi
1224         ol_enable_proctitle="$ol_arg"
1225
1226 else
1227         ol_enable_proctitle="yes"
1228 fi
1229 # end --enable-proctitle
1230 # OpenLDAP --enable-cache
1231         # Check whether --enable-cache or --disable-cache was given.
1232 if test "${enable_cache+set}" = set; then
1233   enableval="$enable_cache"
1234   
1235         ol_arg=invalid
1236         for ol_val in auto yes no ; do
1237                 if test "$enableval" = "$ol_val" ; then
1238                         ol_arg="$ol_val"
1239                 fi
1240         done
1241         if test "$ol_arg" = "invalid" ; then
1242                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1243         fi
1244         ol_enable_cache="$ol_arg"
1245
1246 else
1247         ol_enable_cache="yes"
1248 fi
1249 # end --enable-cache
1250 # OpenLDAP --enable-referrals
1251         # Check whether --enable-referrals or --disable-referrals was given.
1252 if test "${enable_referrals+set}" = set; then
1253   enableval="$enable_referrals"
1254   
1255         ol_arg=invalid
1256         for ol_val in auto yes no ; do
1257                 if test "$enableval" = "$ol_val" ; then
1258                         ol_arg="$ol_val"
1259                 fi
1260         done
1261         if test "$ol_arg" = "invalid" ; then
1262                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1263         fi
1264         ol_enable_referrals="$ol_arg"
1265
1266 else
1267         ol_enable_referrals="yes"
1268 fi
1269 # end --enable-referrals
1270 # OpenLDAP --enable-kbind
1271         # Check whether --enable-kbind or --disable-kbind was given.
1272 if test "${enable_kbind+set}" = set; then
1273   enableval="$enable_kbind"
1274   
1275         ol_arg=invalid
1276         for ol_val in auto yes no ; do
1277                 if test "$enableval" = "$ol_val" ; then
1278                         ol_arg="$ol_val"
1279                 fi
1280         done
1281         if test "$ol_arg" = "invalid" ; then
1282                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1283         fi
1284         ol_enable_kbind="$ol_arg"
1285
1286 else
1287         ol_enable_kbind="no"
1288 fi
1289 # end --enable-kbind
1290 # OpenLDAP --enable-ipv6
1291         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1292 if test "${enable_ipv6+set}" = set; then
1293   enableval="$enable_ipv6"
1294   
1295         ol_arg=invalid
1296         for ol_val in auto yes no ; do
1297                 if test "$enableval" = "$ol_val" ; then
1298                         ol_arg="$ol_val"
1299                 fi
1300         done
1301         if test "$ol_arg" = "invalid" ; then
1302                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1303         fi
1304         ol_enable_ipv6="$ol_arg"
1305
1306 else
1307         ol_enable_ipv6="auto"
1308 fi
1309 # end --enable-ipv6
1310 # OpenLDAP --enable-local
1311         # Check whether --enable-local or --disable-local was given.
1312 if test "${enable_local+set}" = set; then
1313   enableval="$enable_local"
1314   
1315         ol_arg=invalid
1316         for ol_val in auto yes no ; do
1317                 if test "$enableval" = "$ol_val" ; then
1318                         ol_arg="$ol_val"
1319                 fi
1320         done
1321         if test "$ol_arg" = "invalid" ; then
1322                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1323         fi
1324         ol_enable_local="$ol_arg"
1325
1326 else
1327         ol_enable_local="auto"
1328 fi
1329 # end --enable-local
1330 # OpenLDAP --enable-x_compile
1331         # Check whether --enable-x_compile or --disable-x_compile was given.
1332 if test "${enable_x_compile+set}" = set; then
1333   enableval="$enable_x_compile"
1334   
1335         ol_arg=invalid
1336         for ol_val in yes no ; do
1337                 if test "$enableval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1343         fi
1344         ol_enable_x_compile="$ol_arg"
1345
1346 else
1347         ol_enable_x_compile="no"
1348 fi
1349 # end --enable-x_compile
1350
1351
1352 # OpenLDAP --with-cyrus_sasl
1353         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1354 if test "${with_cyrus_sasl+set}" = set; then
1355   withval="$with_cyrus_sasl"
1356   
1357         ol_arg=invalid
1358         for ol_val in auto yes no  ; do
1359                 if test "$withval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1365         fi
1366         ol_with_cyrus_sasl="$ol_arg"
1367
1368 else
1369         ol_with_cyrus_sasl="auto"
1370 fi
1371 # end --with-cyrus_sasl
1372
1373 # OpenLDAP --with-fetch
1374         # Check whether --with-fetch or --without-fetch was given.
1375 if test "${with_fetch+set}" = set; then
1376   withval="$with_fetch"
1377   
1378         ol_arg=invalid
1379         for ol_val in auto yes no  ; do
1380                 if test "$withval" = "$ol_val" ; then
1381                         ol_arg="$ol_val"
1382                 fi
1383         done
1384         if test "$ol_arg" = "invalid" ; then
1385                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1386         fi
1387         ol_with_fetch="$ol_arg"
1388
1389 else
1390         ol_with_fetch="auto"
1391 fi
1392 # end --with-fetch
1393
1394 # OpenLDAP --with-kerberos
1395         # Check whether --with-kerberos or --without-kerberos was given.
1396 if test "${with_kerberos+set}" = set; then
1397   withval="$with_kerberos"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1401                 if test "$withval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1407         fi
1408         ol_with_kerberos="$ol_arg"
1409
1410 else
1411         ol_with_kerberos="auto"
1412 fi
1413 # end --with-kerberos
1414
1415 # OpenLDAP --with-readline
1416         # Check whether --with-readline or --without-readline was given.
1417 if test "${with_readline+set}" = set; then
1418   withval="$with_readline"
1419   
1420         ol_arg=invalid
1421         for ol_val in auto yes no  ; do
1422                 if test "$withval" = "$ol_val" ; then
1423                         ol_arg="$ol_val"
1424                 fi
1425         done
1426         if test "$ol_arg" = "invalid" ; then
1427                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1428         fi
1429         ol_with_readline="$ol_arg"
1430
1431 else
1432         ol_with_readline="auto"
1433 fi
1434 # end --with-readline
1435
1436 # OpenLDAP --with-threads
1437         # Check whether --with-threads or --without-threads was given.
1438 if test "${with_threads+set}" = set; then
1439   withval="$with_threads"
1440   
1441         ol_arg=invalid
1442         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1443                 if test "$withval" = "$ol_val" ; then
1444                         ol_arg="$ol_val"
1445                 fi
1446         done
1447         if test "$ol_arg" = "invalid" ; then
1448                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1449         fi
1450         ol_with_threads="$ol_arg"
1451
1452 else
1453         ol_with_threads="auto"
1454 fi
1455 # end --with-threads
1456
1457 # OpenLDAP --with-tls
1458         # Check whether --with-tls or --without-tls was given.
1459 if test "${with_tls+set}" = set; then
1460   withval="$with_tls"
1461   
1462         ol_arg=invalid
1463         for ol_val in auto ssleay openssl yes no  ; do
1464                 if test "$withval" = "$ol_val" ; then
1465                         ol_arg="$ol_val"
1466                 fi
1467         done
1468         if test "$ol_arg" = "invalid" ; then
1469                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1470         fi
1471         ol_with_tls="$ol_arg"
1472
1473 else
1474         ol_with_tls="auto"
1475 fi
1476 # end --with-tls
1477
1478 # OpenLDAP --with-yielding_select
1479         # Check whether --with-yielding_select or --without-yielding_select was given.
1480 if test "${with_yielding_select+set}" = set; then
1481   withval="$with_yielding_select"
1482   
1483         ol_arg=invalid
1484         for ol_val in auto yes no manual  ; do
1485                 if test "$withval" = "$ol_val" ; then
1486                         ol_arg="$ol_val"
1487                 fi
1488         done
1489         if test "$ol_arg" = "invalid" ; then
1490                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1491         fi
1492         ol_with_yielding_select="$ol_arg"
1493
1494 else
1495         ol_with_yielding_select="auto"
1496 fi
1497 # end --with-yielding_select
1498
1499
1500
1501 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1502 if test "${with_xxslapdoptions+set}" = set; then
1503   withval="$with_xxslapdoptions"
1504   :
1505 fi
1506
1507 # OpenLDAP --enable-slapd
1508         # Check whether --enable-slapd or --disable-slapd was given.
1509 if test "${enable_slapd+set}" = set; then
1510   enableval="$enable_slapd"
1511   
1512         ol_arg=invalid
1513         for ol_val in auto yes no ; do
1514                 if test "$enableval" = "$ol_val" ; then
1515                         ol_arg="$ol_val"
1516                 fi
1517         done
1518         if test "$ol_arg" = "invalid" ; then
1519                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1520         fi
1521         ol_enable_slapd="$ol_arg"
1522
1523 else
1524         ol_enable_slapd="yes"
1525 fi
1526 # end --enable-slapd
1527 # OpenLDAP --enable-cleartext
1528         # Check whether --enable-cleartext or --disable-cleartext was given.
1529 if test "${enable_cleartext+set}" = set; then
1530   enableval="$enable_cleartext"
1531   
1532         ol_arg=invalid
1533         for ol_val in auto yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1540         fi
1541         ol_enable_cleartext="$ol_arg"
1542
1543 else
1544         ol_enable_cleartext="yes"
1545 fi
1546 # end --enable-cleartext
1547 # OpenLDAP --enable-crypt
1548         # Check whether --enable-crypt or --disable-crypt was given.
1549 if test "${enable_crypt+set}" = set; then
1550   enableval="$enable_crypt"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no ; do
1554                 if test "$enableval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1560         fi
1561         ol_enable_crypt="$ol_arg"
1562
1563 else
1564         ol_enable_crypt="auto"
1565 fi
1566 # end --enable-crypt
1567 # OpenLDAP --enable-kpasswd
1568         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1569 if test "${enable_kpasswd+set}" = set; then
1570   enableval="$enable_kpasswd"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1580         fi
1581         ol_enable_kpasswd="$ol_arg"
1582
1583 else
1584         ol_enable_kpasswd="no"
1585 fi
1586 # end --enable-kpasswd
1587 # OpenLDAP --enable-spasswd
1588         # Check whether --enable-spasswd or --disable-spasswd was given.
1589 if test "${enable_spasswd+set}" = set; then
1590   enableval="$enable_spasswd"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1600         fi
1601         ol_enable_spasswd="$ol_arg"
1602
1603 else
1604         ol_enable_spasswd="no"
1605 fi
1606 # end --enable-spasswd
1607 # OpenLDAP --enable-modules
1608         # Check whether --enable-modules or --disable-modules was given.
1609 if test "${enable_modules+set}" = set; then
1610   enableval="$enable_modules"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1620         fi
1621         ol_enable_modules="$ol_arg"
1622
1623 else
1624         ol_enable_modules="no"
1625 fi
1626 # end --enable-modules
1627 # OpenLDAP --enable-multimaster
1628         # Check whether --enable-multimaster or --disable-multimaster was given.
1629 if test "${enable_multimaster+set}" = set; then
1630   enableval="$enable_multimaster"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1640         fi
1641         ol_enable_multimaster="$ol_arg"
1642
1643 else
1644         ol_enable_multimaster="no"
1645 fi
1646 # end --enable-multimaster
1647 # OpenLDAP --enable-phonetic
1648         # Check whether --enable-phonetic or --disable-phonetic was given.
1649 if test "${enable_phonetic+set}" = set; then
1650   enableval="$enable_phonetic"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no ; do
1654                 if test "$enableval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1660         fi
1661         ol_enable_phonetic="$ol_arg"
1662
1663 else
1664         ol_enable_phonetic="no"
1665 fi
1666 # end --enable-phonetic
1667 # OpenLDAP --enable-rlookups
1668         # Check whether --enable-rlookups or --disable-rlookups was given.
1669 if test "${enable_rlookups+set}" = set; then
1670   enableval="$enable_rlookups"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1680         fi
1681         ol_enable_rlookups="$ol_arg"
1682
1683 else
1684         ol_enable_rlookups="auto"
1685 fi
1686 # end --enable-rlookups
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-wrappers
1708         # Check whether --enable-wrappers or --disable-wrappers was given.
1709 if test "${enable_wrappers+set}" = set; then
1710   enableval="$enable_wrappers"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1720         fi
1721         ol_enable_wrappers="$ol_arg"
1722
1723 else
1724         ol_enable_wrappers="no"
1725 fi
1726 # end --enable-wrappers
1727 # OpenLDAP --enable-dynamic
1728         # Check whether --enable-dynamic or --disable-dynamic was given.
1729 if test "${enable_dynamic+set}" = set; then
1730   enableval="$enable_dynamic"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1740         fi
1741         ol_enable_dynamic="$ol_arg"
1742
1743 else
1744         ol_enable_dynamic="no"
1745 fi
1746 # end --enable-dynamic
1747
1748 # OpenLDAP --enable-dnssrv
1749         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1750 if test "${enable_dnssrv+set}" = set; then
1751   enableval="$enable_dnssrv"
1752   
1753         ol_arg=invalid
1754         for ol_val in auto yes no ; do
1755                 if test "$enableval" = "$ol_val" ; then
1756                         ol_arg="$ol_val"
1757                 fi
1758         done
1759         if test "$ol_arg" = "invalid" ; then
1760                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1761         fi
1762         ol_enable_dnssrv="$ol_arg"
1763
1764 else
1765         ol_enable_dnssrv="no"
1766 fi
1767 # end --enable-dnssrv
1768 # OpenLDAP --with-dnssrv_module
1769         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1770 if test "${with_dnssrv_module+set}" = set; then
1771   withval="$with_dnssrv_module"
1772   
1773         ol_arg=invalid
1774         for ol_val in static dynamic ; do
1775                 if test "$withval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1781         fi
1782         ol_with_dnssrv_module="$ol_arg"
1783
1784 else
1785         ol_with_dnssrv_module="static"
1786 fi
1787 # end --with-dnssrv_module
1788
1789 # OpenLDAP --enable-ldap
1790         # Check whether --enable-ldap or --disable-ldap was given.
1791 if test "${enable_ldap+set}" = set; then
1792   enableval="$enable_ldap"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1802         fi
1803         ol_enable_ldap="$ol_arg"
1804
1805 else
1806         ol_enable_ldap="no"
1807 fi
1808 # end --enable-ldap
1809 # OpenLDAP --with-ldap_module
1810         # Check whether --with-ldap_module or --without-ldap_module was given.
1811 if test "${with_ldap_module+set}" = set; then
1812   withval="$with_ldap_module"
1813   
1814         ol_arg=invalid
1815         for ol_val in static dynamic ; do
1816                 if test "$withval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1822         fi
1823         ol_with_ldap_module="$ol_arg"
1824
1825 else
1826         ol_with_ldap_module="static"
1827 fi
1828 # end --with-ldap_module
1829
1830 # OpenLDAP --enable-ldbm
1831         # Check whether --enable-ldbm or --disable-ldbm was given.
1832 if test "${enable_ldbm+set}" = set; then
1833   enableval="$enable_ldbm"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1843         fi
1844         ol_enable_ldbm="$ol_arg"
1845
1846 else
1847         ol_enable_ldbm="yes"
1848 fi
1849 # end --enable-ldbm
1850 # OpenLDAP --with-ldbm_api
1851         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1852 if test "${with_ldbm_api+set}" = set; then
1853   withval="$with_ldbm_api"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1857                 if test "$withval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1863         fi
1864         ol_with_ldbm_api="$ol_arg"
1865
1866 else
1867         ol_with_ldbm_api="auto"
1868 fi
1869 # end --with-ldbm_api
1870
1871 # OpenLDAP --with-ldbm_module
1872         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1873 if test "${with_ldbm_module+set}" = set; then
1874   withval="$with_ldbm_module"
1875   
1876         ol_arg=invalid
1877         for ol_val in static dynamic ; do
1878                 if test "$withval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1884         fi
1885         ol_with_ldbm_module="$ol_arg"
1886
1887 else
1888         ol_with_ldbm_module="static"
1889 fi
1890 # end --with-ldbm_module
1891
1892 # OpenLDAP --with-ldbm_type
1893         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1894 if test "${with_ldbm_type+set}" = set; then
1895   withval="$with_ldbm_type"
1896   
1897         ol_arg=invalid
1898         for ol_val in auto btree hash ; do
1899                 if test "$withval" = "$ol_val" ; then
1900                         ol_arg="$ol_val"
1901                 fi
1902         done
1903         if test "$ol_arg" = "invalid" ; then
1904                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1905         fi
1906         ol_with_ldbm_type="$ol_arg"
1907
1908 else
1909         ol_with_ldbm_type="auto"
1910 fi
1911 # end --with-ldbm_type
1912
1913 # OpenLDAP --enable-passwd
1914         # Check whether --enable-passwd or --disable-passwd was given.
1915 if test "${enable_passwd+set}" = set; then
1916   enableval="$enable_passwd"
1917   
1918         ol_arg=invalid
1919         for ol_val in auto yes no ; do
1920                 if test "$enableval" = "$ol_val" ; then
1921                         ol_arg="$ol_val"
1922                 fi
1923         done
1924         if test "$ol_arg" = "invalid" ; then
1925                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1926         fi
1927         ol_enable_passwd="$ol_arg"
1928
1929 else
1930         ol_enable_passwd="no"
1931 fi
1932 # end --enable-passwd
1933 # OpenLDAP --with-passwd_module
1934         # Check whether --with-passwd_module or --without-passwd_module was given.
1935 if test "${with_passwd_module+set}" = set; then
1936   withval="$with_passwd_module"
1937   
1938         ol_arg=invalid
1939         for ol_val in static dynamic ; do
1940                 if test "$withval" = "$ol_val" ; then
1941                         ol_arg="$ol_val"
1942                 fi
1943         done
1944         if test "$ol_arg" = "invalid" ; then
1945                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1946         fi
1947         ol_with_passwd_module="$ol_arg"
1948
1949 else
1950         ol_with_passwd_module="static"
1951 fi
1952 # end --with-passwd_module
1953
1954 # OpenLDAP --enable-shell
1955         # Check whether --enable-shell or --disable-shell was given.
1956 if test "${enable_shell+set}" = set; then
1957   enableval="$enable_shell"
1958   
1959         ol_arg=invalid
1960         for ol_val in auto yes no ; do
1961                 if test "$enableval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1967         fi
1968         ol_enable_shell="$ol_arg"
1969
1970 else
1971         ol_enable_shell="no"
1972 fi
1973 # end --enable-shell
1974 # OpenLDAP --with-shell_module
1975         # Check whether --with-shell_module or --without-shell_module was given.
1976 if test "${with_shell_module+set}" = set; then
1977   withval="$with_shell_module"
1978   
1979         ol_arg=invalid
1980         for ol_val in static dynamic ; do
1981                 if test "$withval" = "$ol_val" ; then
1982                         ol_arg="$ol_val"
1983                 fi
1984         done
1985         if test "$ol_arg" = "invalid" ; then
1986                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1987         fi
1988         ol_with_shell_module="$ol_arg"
1989
1990 else
1991         ol_with_shell_module="static"
1992 fi
1993 # end --with-shell_module
1994
1995 # OpenLDAP --enable-sql
1996         # Check whether --enable-sql or --disable-sql was given.
1997 if test "${enable_sql+set}" = set; then
1998   enableval="$enable_sql"
1999   
2000         ol_arg=invalid
2001         for ol_val in auto yes no ; do
2002                 if test "$enableval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2008         fi
2009         ol_enable_sql="$ol_arg"
2010
2011 else
2012         ol_enable_sql="no"
2013 fi
2014 # end --enable-sql
2015 # OpenLDAP --with-sql_module
2016         # Check whether --with-sql_module or --without-sql_module was given.
2017 if test "${with_sql_module+set}" = set; then
2018   withval="$with_sql_module"
2019   
2020         ol_arg=invalid
2021         for ol_val in static dynamic ; do
2022                 if test "$withval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2028         fi
2029         ol_with_sql_module="$ol_arg"
2030
2031 else
2032         ol_with_sql_module="static"
2033 fi
2034 # end --with-sql_module
2035
2036
2037 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2038 if test "${with_xxslurpdoptions+set}" = set; then
2039   withval="$with_xxslurpdoptions"
2040   :
2041 fi
2042
2043 # OpenLDAP --enable-slurpd
2044         # Check whether --enable-slurpd or --disable-slurpd was given.
2045 if test "${enable_slurpd+set}" = set; then
2046   enableval="$enable_slurpd"
2047   
2048         ol_arg=invalid
2049         for ol_val in auto yes no ; do
2050                 if test "$enableval" = "$ol_val" ; then
2051                         ol_arg="$ol_val"
2052                 fi
2053         done
2054         if test "$ol_arg" = "invalid" ; then
2055                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2056         fi
2057         ol_enable_slurpd="$ol_arg"
2058
2059 else
2060         ol_enable_slurpd="auto"
2061 fi
2062 # end --enable-slurpd
2063
2064 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2065 if test "${with_xxliboptions+set}" = set; then
2066   withval="$with_xxliboptions"
2067   :
2068 fi
2069
2070 # Check whether --enable-static or --disable-static was given.
2071 if test "${enable_static+set}" = set; then
2072   enableval="$enable_static"
2073   p=${PACKAGE-default}
2074 case "$enableval" in
2075 yes) enable_static=yes ;;
2076 no) enable_static=no ;;
2077 *)
2078   enable_static=no
2079   # Look at the argument we got.  We use all the common list separators.
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081   for pkg in $enableval; do
2082     if test "X$pkg" = "X$p"; then
2083       enable_static=yes
2084     fi
2085   done
2086   IFS="$ac_save_ifs"
2087   ;;
2088 esac
2089 else
2090   enable_static=yes
2091 fi
2092
2093 # Check whether --enable-shared or --disable-shared was given.
2094 if test "${enable_shared+set}" = set; then
2095   enableval="$enable_shared"
2096   p=${PACKAGE-default}
2097 case "$enableval" in
2098 yes) enable_shared=yes ;;
2099 no) enable_shared=no ;;
2100 *)
2101   enable_shared=no
2102   # Look at the argument we got.  We use all the common list separators.
2103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2104   for pkg in $enableval; do
2105     if test "X$pkg" = "X$p"; then
2106       enable_shared=yes
2107     fi
2108   done
2109   IFS="$ac_save_ifs"
2110   ;;
2111 esac
2112 else
2113   enable_shared=yes
2114 fi
2115
2116
2117
2118 # validate options
2119 if test $ol_enable_slapd = no ; then
2120                 if test $ol_enable_dnssrv = yes ; then
2121                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2122         fi
2123         if test $ol_enable_ldap = yes ; then
2124                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2125         fi
2126         if test $ol_enable_ldbm = yes ; then
2127                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2128         fi
2129         if test $ol_enable_passwd = yes ; then
2130                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2131         fi
2132         if test $ol_enable_shell = yes ; then
2133                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2134         fi
2135         if test $ol_enable_sql = yes ; then
2136                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2137         fi
2138         if test $ol_enable_modules = yes ; then
2139                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2140         fi
2141         if test $ol_enable_multimaster = yes ; then
2142                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2143         fi
2144         if test $ol_enable_wrappers = yes ; then
2145                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2146         fi
2147         if test $ol_enable_phonetic = yes ; then
2148                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2149         fi
2150         if test $ol_enable_rlookups = yes ; then
2151                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2152         fi
2153         if test $ol_enable_aci = yes ; then
2154                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2155         fi
2156         if test $ol_with_ldbm_api != auto ; then
2157                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2158         fi
2159         if test $ol_with_ldbm_type != auto ; then
2160                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2161         fi
2162         if test $ol_with_dnssrv_module != static ; then
2163                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2164         fi
2165         if test $ol_with_ldap_module != static ; then
2166                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2167         fi
2168         if test $ol_with_ldbm_module != static ; then
2169                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2170         fi
2171         if test $ol_with_passwd_module != static ; then
2172                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2173         fi
2174         if test $ol_with_shell_module != static ; then
2175                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2176         fi
2177         if test $ol_with_sql_module != static ; then
2178                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2179         fi
2180         if test $ol_enable_slurpd = yes ; then
2181                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2182         fi
2183
2184         # force settings to no
2185         ol_enable_dnssrv=no
2186         ol_enable_ldap=no
2187         ol_enable_ldbm=no
2188         ol_enable_passwd=no
2189         ol_enable_shell=no
2190         ol_enable_sql=no
2191
2192         ol_enable_modules=no
2193         ol_enable_multimaster=no
2194         ol_enable_phonetic=no
2195         ol_enable_rlookups=no
2196         ol_enable_aci=no
2197         ol_enable_wrappers=no
2198         ol_enable_dynamic=no
2199
2200         ol_with_ldbm_api=no
2201         ol_with_ldbm_type=no
2202
2203         ol_with_dnssrv_module=static
2204         ol_with_ldap_module=static
2205         ol_with_ldbm_module=static
2206         ol_with_passwd_module=static
2207         ol_with_shell_module=static
2208         ol_with_sql_module=static
2209
2210         ol_enable_slurpd=no
2211
2212 elif test $ol_enable_ldbm = no ; then
2213         
2214         if test $ol_with_ldbm_api != auto ; then
2215                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2216         fi
2217
2218         if test $ol_with_ldbm_type != auto ; then
2219                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2220         fi
2221
2222         if test $ol_with_ldbm_module != static ; then
2223                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2224         fi
2225
2226         if test $ol_enable_modules != yes -a \
2227                 $ol_enable_dnssrv = no -a \
2228                 $ol_enable_ldap = no -a \
2229                 $ol_enable_passwd = no -a \
2230                 $ol_enable_shell = no -a \
2231                 $ol_enable_sql = no ; then
2232                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2233         fi
2234
2235         ol_with_ldbm_api=no
2236         ol_with_ldbm_type=no
2237         ol_with_ldbm_module=static
2238
2239 else
2240                 if test $ol_with_ldbm_api = gdbm -a \
2241                 $ol_with_ldbm_type = btree ; then
2242                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2243         fi
2244         if test $ol_with_ldbm_api = mdbm -a \
2245                 $ol_with_ldbm_type = btree ; then
2246                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2247         fi
2248         if test $ol_with_ldbm_api = ndbm -a \
2249                 $ol_with_ldbm_type = btree ; then
2250                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2251         fi
2252 fi
2253
2254 if test $ol_enable_slurpd = yes ; then
2255                 if test $ol_with_threads = no ; then
2256                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2257         fi
2258 fi
2259
2260 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2261         if test $ol_with_kerberos = no ; then
2262                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2263         fi
2264         ol_with_kerberos=yes
2265 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2266         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2267                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2268         fi
2269         ol_with_kerberos=no
2270 fi
2271
2272 if test $ol_enable_spasswd = yes ; then
2273         if test $ol_with_cyrus_sasl = no ; then
2274                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2275         fi
2276         ol_link_spasswd=yes
2277 fi
2278
2279 echo "$ac_t""done" 1>&6
2280
2281 LDAP_LIBS=
2282 LDIF_LIBS=
2283 LDBM_LIBS=
2284 LTHREAD_LIBS=
2285 LUTIL_LIBS=
2286
2287 SLAPD_LIBS=
2288 SLURPD_LIBS=
2289
2290 BUILD_SLAPD=no
2291 BUILD_SLURPD=no
2292
2293 BUILD_THREAD=no
2294
2295 BUILD_DNSSRV=no
2296 BUILD_LDAP=no
2297 BUILD_LDBM=no
2298 BUILD_PASSWD=no
2299 BUILD_SHELL=no
2300 BUILD_SQL=no
2301
2302 BUILD_DNSSRV_DYNAMIC=static
2303 BUILD_LDAP_DYNAMIC=static
2304 BUILD_LDBM_DYNAMIC=static
2305 BUILD_PASSWD_DYNAMIC=static
2306 BUILD_SHELL_DYNAMIC=static
2307 BUILD_SQL_DYNAMIC=static
2308
2309 SLAPD_MODULES_LDFLAGS=
2310 SLAPD_MODULES_CPPFLAGS=
2311 SLAPD_MODULES_LIST=
2312
2313 SLAPD_SQL_LDFLAGS=
2314 SLAPD_SQL_LIBS=
2315 SLAPD_SQL_INCLUDES=
2316
2317 KRB4_LIBS=
2318 KRB5_LIBS=
2319 READLINE_LIBS=
2320 SASL_LIBS=
2321 TERMCAP_LIBS=
2322 TLS_LIBS=
2323 MODULES_LIBS=
2324 AUTH_LIBS=
2325
2326
2327
2328 cat >> confdefs.h <<\EOF
2329 #define HAVE_MKVERSION 1
2330 EOF
2331
2332
2333
2334
2335 ol_aix_threads=no
2336 case "$target" in
2337 *-*-aix*)       if test -z "$CC" ; then
2338                 case "$ol_with_threads" in
2339                 auto | yes |  posix) ol_aix_threads=yes ;;
2340                 esac
2341         fi
2342 ;;
2343 esac
2344
2345 if test $ol_aix_threads = yes ; then
2346         if test -z "${CC}" ; then
2347                 for ac_prog in cc_r xlc_r cc
2348 do
2349 # Extract the first word of "$ac_prog", so it can be a program name with args.
2350 set dummy $ac_prog; ac_word=$2
2351 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2352 echo "configure:2353: checking for $ac_word" >&5
2353 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2354   echo $ac_n "(cached) $ac_c" 1>&6
2355 else
2356   if test -n "$CC"; then
2357   ac_cv_prog_CC="$CC" # Let the user override the test.
2358 else
2359   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2360   ac_dummy="$PATH"
2361   for ac_dir in $ac_dummy; do
2362     test -z "$ac_dir" && ac_dir=.
2363     if test -f $ac_dir/$ac_word; then
2364       ac_cv_prog_CC="$ac_prog"
2365       break
2366     fi
2367   done
2368   IFS="$ac_save_ifs"
2369 fi
2370 fi
2371 CC="$ac_cv_prog_CC"
2372 if test -n "$CC"; then
2373   echo "$ac_t""$CC" 1>&6
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377
2378 test -n "$CC" && break
2379 done
2380
2381
2382                 if test "$CC" = cc ; then
2383                                                 if test $ol_with_threads != auto ; then
2384                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2385                         else
2386                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2387                         fi
2388                         ol_with_threads=no
2389                 fi
2390         fi
2391
2392         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2393                 ol_with_threads=posix
2394                 ol_cv_pthread_create=yes
2395         fi
2396 fi
2397
2398 if test -z "${CC}"; then
2399         for ac_prog in cc
2400 do
2401 # Extract the first word of "$ac_prog", so it can be a program name with args.
2402 set dummy $ac_prog; ac_word=$2
2403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2404 echo "configure:2405: checking for $ac_word" >&5
2405 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   if test -n "$CC"; then
2409   ac_cv_prog_CC="$CC" # Let the user override the test.
2410 else
2411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2412   ac_dummy="$PATH"
2413   for ac_dir in $ac_dummy; do
2414     test -z "$ac_dir" && ac_dir=.
2415     if test -f $ac_dir/$ac_word; then
2416       ac_cv_prog_CC="$ac_prog"
2417       break
2418     fi
2419   done
2420   IFS="$ac_save_ifs"
2421 fi
2422 fi
2423 CC="$ac_cv_prog_CC"
2424 if test -n "$CC"; then
2425   echo "$ac_t""$CC" 1>&6
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429
2430 test -n "$CC" && break
2431 done
2432
2433 fi
2434
2435
2436
2437
2438 # Check whether --enable-fast-install or --disable-fast-install was given.
2439 if test "${enable_fast_install+set}" = set; then
2440   enableval="$enable_fast_install"
2441   p=${PACKAGE-default}
2442 case "$enableval" in
2443 yes) enable_fast_install=yes ;;
2444 no) enable_fast_install=no ;;
2445 *)
2446   enable_fast_install=no
2447   # Look at the argument we got.  We use all the common list separators.
2448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2449   for pkg in $enableval; do
2450     if test "X$pkg" = "X$p"; then
2451       enable_fast_install=yes
2452     fi
2453   done
2454   IFS="$ac_save_ifs"
2455   ;;
2456 esac
2457 else
2458   enable_fast_install=yes
2459 fi
2460
2461 # Extract the first word of "ranlib", so it can be a program name with args.
2462 set dummy ranlib; ac_word=$2
2463 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2464 echo "configure:2465: checking for $ac_word" >&5
2465 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2466   echo $ac_n "(cached) $ac_c" 1>&6
2467 else
2468   if test -n "$RANLIB"; then
2469   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2470 else
2471   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2472   ac_dummy="$PATH"
2473   for ac_dir in $ac_dummy; do
2474     test -z "$ac_dir" && ac_dir=.
2475     if test -f $ac_dir/$ac_word; then
2476       ac_cv_prog_RANLIB="ranlib"
2477       break
2478     fi
2479   done
2480   IFS="$ac_save_ifs"
2481   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2482 fi
2483 fi
2484 RANLIB="$ac_cv_prog_RANLIB"
2485 if test -n "$RANLIB"; then
2486   echo "$ac_t""$RANLIB" 1>&6
2487 else
2488   echo "$ac_t""no" 1>&6
2489 fi
2490
2491 # Extract the first word of "gcc", so it can be a program name with args.
2492 set dummy gcc; ac_word=$2
2493 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2494 echo "configure:2495: checking for $ac_word" >&5
2495 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2496   echo $ac_n "(cached) $ac_c" 1>&6
2497 else
2498   if test -n "$CC"; then
2499   ac_cv_prog_CC="$CC" # Let the user override the test.
2500 else
2501   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2502   ac_dummy="$PATH"
2503   for ac_dir in $ac_dummy; do
2504     test -z "$ac_dir" && ac_dir=.
2505     if test -f $ac_dir/$ac_word; then
2506       ac_cv_prog_CC="gcc"
2507       break
2508     fi
2509   done
2510   IFS="$ac_save_ifs"
2511 fi
2512 fi
2513 CC="$ac_cv_prog_CC"
2514 if test -n "$CC"; then
2515   echo "$ac_t""$CC" 1>&6
2516 else
2517   echo "$ac_t""no" 1>&6
2518 fi
2519
2520 if test -z "$CC"; then
2521   # Extract the first word of "cc", so it can be a program name with args.
2522 set dummy cc; ac_word=$2
2523 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2524 echo "configure:2525: checking for $ac_word" >&5
2525 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2526   echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528   if test -n "$CC"; then
2529   ac_cv_prog_CC="$CC" # Let the user override the test.
2530 else
2531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2532   ac_prog_rejected=no
2533   ac_dummy="$PATH"
2534   for ac_dir in $ac_dummy; do
2535     test -z "$ac_dir" && ac_dir=.
2536     if test -f $ac_dir/$ac_word; then
2537       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2538         ac_prog_rejected=yes
2539         continue
2540       fi
2541       ac_cv_prog_CC="cc"
2542       break
2543     fi
2544   done
2545   IFS="$ac_save_ifs"
2546 if test $ac_prog_rejected = yes; then
2547   # We found a bogon in the path, so make sure we never use it.
2548   set dummy $ac_cv_prog_CC
2549   shift
2550   if test $# -gt 0; then
2551     # We chose a different compiler from the bogus one.
2552     # However, it has the same basename, so the bogon will be chosen
2553     # first if we set CC to just the basename; use the full file name.
2554     shift
2555     set dummy "$ac_dir/$ac_word" "$@"
2556     shift
2557     ac_cv_prog_CC="$@"
2558   fi
2559 fi
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   if test -z "$CC"; then
2570     case "`uname -s`" in
2571     *win32* | *WIN32* | *CYGWIN*)
2572       # Extract the first word of "cl", so it can be a program name with args.
2573 set dummy cl; ac_word=$2
2574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2575 echo "configure:2576: checking for $ac_word" >&5
2576 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2577   echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579   if test -n "$CC"; then
2580   ac_cv_prog_CC="$CC" # Let the user override the test.
2581 else
2582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2583   ac_dummy="$PATH"
2584   for ac_dir in $ac_dummy; do
2585     test -z "$ac_dir" && ac_dir=.
2586     if test -f $ac_dir/$ac_word; then
2587       ac_cv_prog_CC="cl"
2588       break
2589     fi
2590   done
2591   IFS="$ac_save_ifs"
2592 fi
2593 fi
2594 CC="$ac_cv_prog_CC"
2595 if test -n "$CC"; then
2596   echo "$ac_t""$CC" 1>&6
2597 else
2598   echo "$ac_t""no" 1>&6
2599 fi
2600  ;;
2601     esac
2602   fi
2603   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2604 fi
2605
2606 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2607 echo "configure:2608: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2608
2609 ac_ext=c
2610 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2611 ac_cpp='$CPP $CPPFLAGS'
2612 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2613 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2614 cross_compiling=$ac_cv_prog_cc_cross
2615
2616 cat > conftest.$ac_ext << EOF
2617
2618 #line 2619 "configure"
2619 #include "confdefs.h"
2620
2621 main(){return(0);}
2622 EOF
2623 if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2624   ac_cv_prog_cc_works=yes
2625   # If we can't run a trivial program, we are probably using a cross compiler.
2626   if (./conftest; exit) 2>/dev/null; then
2627     ac_cv_prog_cc_cross=no
2628   else
2629     ac_cv_prog_cc_cross=yes
2630   fi
2631 else
2632   echo "configure: failed program was:" >&5
2633   cat conftest.$ac_ext >&5
2634   ac_cv_prog_cc_works=no
2635 fi
2636 rm -fr conftest*
2637 ac_ext=c
2638 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2639 ac_cpp='$CPP $CPPFLAGS'
2640 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2641 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2642 cross_compiling=$ac_cv_prog_cc_cross
2643
2644 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2645 if test $ac_cv_prog_cc_works = no; then
2646   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2647 fi
2648 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2649 echo "configure:2650: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2650 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2651 cross_compiling=$ac_cv_prog_cc_cross
2652
2653 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2654 echo "configure:2655: checking whether we are using GNU C" >&5
2655 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2656   echo $ac_n "(cached) $ac_c" 1>&6
2657 else
2658   cat > conftest.c <<EOF
2659 #ifdef __GNUC__
2660   yes;
2661 #endif
2662 EOF
2663 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2664   ac_cv_prog_gcc=yes
2665 else
2666   ac_cv_prog_gcc=no
2667 fi
2668 fi
2669
2670 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2671
2672 if test $ac_cv_prog_gcc = yes; then
2673   GCC=yes
2674 else
2675   GCC=
2676 fi
2677
2678 ac_test_CFLAGS="${CFLAGS+set}"
2679 ac_save_CFLAGS="$CFLAGS"
2680 CFLAGS=
2681 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2682 echo "configure:2683: checking whether ${CC-cc} accepts -g" >&5
2683 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2684   echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686   echo 'void f(){}' > conftest.c
2687 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2688   ac_cv_prog_cc_g=yes
2689 else
2690   ac_cv_prog_cc_g=no
2691 fi
2692 rm -f conftest*
2693
2694 fi
2695
2696 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2697 if test "$ac_test_CFLAGS" = set; then
2698   CFLAGS="$ac_save_CFLAGS"
2699 elif test $ac_cv_prog_cc_g = yes; then
2700   if test "$GCC" = yes; then
2701     CFLAGS="-g -O2"
2702   else
2703     CFLAGS="-g"
2704   fi
2705 else
2706   if test "$GCC" = yes; then
2707     CFLAGS="-O2"
2708   else
2709     CFLAGS=
2710   fi
2711 fi
2712
2713 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2714 if test "${with_gnu_ld+set}" = set; then
2715   withval="$with_gnu_ld"
2716   test "$withval" = no || with_gnu_ld=yes
2717 else
2718   with_gnu_ld=no
2719 fi
2720
2721 ac_prog=ld
2722 if test "$ac_cv_prog_gcc" = yes; then
2723   # Check if gcc -print-prog-name=ld gives a path.
2724   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2725 echo "configure:2726: checking for ld used by GCC" >&5
2726   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2727   case "$ac_prog" in
2728     # Accept absolute paths.
2729     [\\/]* | [A-Za-z]:[\\/]*)
2730       re_direlt='/[^/][^/]*/\.\./'
2731       # Canonicalize the path of ld
2732       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2733       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2734         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2735       done
2736       test -z "$LD" && LD="$ac_prog"
2737       ;;
2738   "")
2739     # If it fails, then pretend we aren't using GCC.
2740     ac_prog=ld
2741     ;;
2742   *)
2743     # If it is relative, then search for the first ld in PATH.
2744     with_gnu_ld=unknown
2745     ;;
2746   esac
2747 elif test "$with_gnu_ld" = yes; then
2748   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2749 echo "configure:2750: checking for GNU ld" >&5
2750 else
2751   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2752 echo "configure:2753: checking for non-GNU ld" >&5
2753 fi
2754 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757   if test -z "$LD"; then
2758   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2759   for ac_dir in $PATH; do
2760     test -z "$ac_dir" && ac_dir=.
2761     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2762       ac_cv_path_LD="$ac_dir/$ac_prog"
2763       # Check to see if the program is GNU ld.  I'd rather use --version,
2764       # but apparently some GNU ld's only accept -v.
2765       # Break only if it was the GNU/non-GNU ld that we prefer.
2766       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2767         test "$with_gnu_ld" != no && break
2768       else
2769         test "$with_gnu_ld" != yes && break
2770       fi
2771     fi
2772   done
2773   IFS="$ac_save_ifs"
2774 else
2775   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2776 fi
2777 fi
2778
2779 LD="$ac_cv_path_LD"
2780 if test -n "$LD"; then
2781   echo "$ac_t""$LD" 1>&6
2782 else
2783   echo "$ac_t""no" 1>&6
2784 fi
2785 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2786 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2787 echo "configure:2788: checking if the linker ($LD) is GNU ld" >&5
2788 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2789   echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2792 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2793   ac_cv_prog_gnu_ld=yes
2794 else
2795   ac_cv_prog_gnu_ld=no
2796 fi
2797 fi
2798
2799 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2800
2801
2802 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2803 echo "configure:2804: checking for BSD-compatible nm" >&5
2804 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2805   echo $ac_n "(cached) $ac_c" 1>&6
2806 else
2807   if test -n "$NM"; then
2808   # Let the user override the test.
2809   ac_cv_path_NM="$NM"
2810 else
2811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2812   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2813     test -z "$ac_dir" && ac_dir=.
2814     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2815       # Check to see if the nm accepts a BSD-compat flag.
2816       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2817       #   nm: unknown option "B" ignored
2818       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2819         ac_cv_path_NM="$ac_dir/nm -B"
2820         break
2821       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2822         ac_cv_path_NM="$ac_dir/nm -p"
2823         break
2824       else
2825         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2826         continue # so that we can try to find one that supports BSD flags
2827       fi
2828     fi
2829   done
2830   IFS="$ac_save_ifs"
2831   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2832 fi
2833 fi
2834
2835 NM="$ac_cv_path_NM"
2836 echo "$ac_t""$NM" 1>&6
2837
2838 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2839 echo "configure:2840: checking whether ln -s works" >&5
2840 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2841   echo $ac_n "(cached) $ac_c" 1>&6
2842 else
2843   rm -f conftestdata
2844 if ln -s X conftestdata 2>/dev/null
2845 then
2846   rm -f conftestdata
2847   ac_cv_prog_LN_S="ln -s"
2848 else
2849   ac_cv_prog_LN_S=ln
2850 fi
2851 fi
2852 LN_S="$ac_cv_prog_LN_S"
2853 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2854   echo "$ac_t""yes" 1>&6
2855 else
2856   echo "$ac_t""no" 1>&6
2857 fi
2858
2859 if test $host != $build; then
2860   ac_tool_prefix=${host_alias}-
2861 else
2862   ac_tool_prefix=
2863 fi
2864
2865
2866 case "$target" in
2867 NONE) lt_target="$host" ;;
2868 *) lt_target="$target" ;;
2869 esac
2870
2871 # Check for any special flags to pass to ltconfig.
2872 libtool_flags="--cache-file=$cache_file"
2873 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2874 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2875 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2876 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2877 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2878 libtool_flags="$libtool_flags --enable-dlopen"
2879 libtool_flags="$libtool_flags --enable-win32-dll"
2880 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2881 if test "${enable_libtool_lock+set}" = set; then
2882   enableval="$enable_libtool_lock"
2883   :
2884 fi
2885
2886 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2887 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2888
2889 # Some flags need to be propagated to the compiler or linker for good
2890 # libtool support.
2891 case "$lt_target" in
2892 *-*-irix6*)
2893   # Find out which ABI we are using.
2894   echo '#line 2895 "configure"' > conftest.$ac_ext
2895   if { (eval echo configure:2896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2896     case "`/usr/bin/file conftest.o`" in
2897     *32-bit*)
2898       LD="${LD-ld} -32"
2899       ;;
2900     *N32*)
2901       LD="${LD-ld} -n32"
2902       ;;
2903     *64-bit*)
2904       LD="${LD-ld} -64"
2905       ;;
2906     esac
2907   fi
2908   rm -rf conftest*
2909   ;;
2910
2911 *-*-sco3.2v5*)
2912   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2913   SAVE_CFLAGS="$CFLAGS"
2914   CFLAGS="$CFLAGS -belf"
2915   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2916 echo "configure:2917: checking whether the C compiler needs -belf" >&5
2917 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   cat > conftest.$ac_ext <<EOF
2921 #line 2922 "configure"
2922 #include "confdefs.h"
2923
2924 int main() {
2925
2926 ; return 0; }
2927 EOF
2928 if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2929   rm -rf conftest*
2930   lt_cv_cc_needs_belf=yes
2931 else
2932   echo "configure: failed program was:" >&5
2933   cat conftest.$ac_ext >&5
2934   rm -rf conftest*
2935   lt_cv_cc_needs_belf=no
2936 fi
2937 rm -f conftest*
2938 fi
2939
2940 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2941   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2942     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2943     CFLAGS="$SAVE_CFLAGS"
2944   fi
2945   ;;
2946
2947 *-*-cygwin* | *-*-mingw*)
2948   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2949 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2951 echo "configure:2952: checking for $ac_word" >&5
2952 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   if test -n "$DLLTOOL"; then
2956   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2957 else
2958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2959   ac_dummy="$PATH"
2960   for ac_dir in $ac_dummy; do
2961     test -z "$ac_dir" && ac_dir=.
2962     if test -f $ac_dir/$ac_word; then
2963       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2964       break
2965     fi
2966   done
2967   IFS="$ac_save_ifs"
2968 fi
2969 fi
2970 DLLTOOL="$ac_cv_prog_DLLTOOL"
2971 if test -n "$DLLTOOL"; then
2972   echo "$ac_t""$DLLTOOL" 1>&6
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976
2977
2978 if test -z "$ac_cv_prog_DLLTOOL"; then
2979 if test -n "$ac_tool_prefix"; then
2980   # Extract the first word of "dlltool", so it can be a program name with args.
2981 set dummy dlltool; ac_word=$2
2982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2983 echo "configure:2984: checking for $ac_word" >&5
2984 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   if test -n "$DLLTOOL"; then
2988   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2989 else
2990   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2991   ac_dummy="$PATH"
2992   for ac_dir in $ac_dummy; do
2993     test -z "$ac_dir" && ac_dir=.
2994     if test -f $ac_dir/$ac_word; then
2995       ac_cv_prog_DLLTOOL="dlltool"
2996       break
2997     fi
2998   done
2999   IFS="$ac_save_ifs"
3000   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3001 fi
3002 fi
3003 DLLTOOL="$ac_cv_prog_DLLTOOL"
3004 if test -n "$DLLTOOL"; then
3005   echo "$ac_t""$DLLTOOL" 1>&6
3006 else
3007   echo "$ac_t""no" 1>&6
3008 fi
3009
3010 else
3011   DLLTOOL="false"
3012 fi
3013 fi
3014
3015   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3016 set dummy ${ac_tool_prefix}as; ac_word=$2
3017 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3018 echo "configure:3019: checking for $ac_word" >&5
3019 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3020   echo $ac_n "(cached) $ac_c" 1>&6
3021 else
3022   if test -n "$AS"; then
3023   ac_cv_prog_AS="$AS" # Let the user override the test.
3024 else
3025   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3026   ac_dummy="$PATH"
3027   for ac_dir in $ac_dummy; do
3028     test -z "$ac_dir" && ac_dir=.
3029     if test -f $ac_dir/$ac_word; then
3030       ac_cv_prog_AS="${ac_tool_prefix}as"
3031       break
3032     fi
3033   done
3034   IFS="$ac_save_ifs"
3035 fi
3036 fi
3037 AS="$ac_cv_prog_AS"
3038 if test -n "$AS"; then
3039   echo "$ac_t""$AS" 1>&6
3040 else
3041   echo "$ac_t""no" 1>&6
3042 fi
3043
3044
3045 if test -z "$ac_cv_prog_AS"; then
3046 if test -n "$ac_tool_prefix"; then
3047   # Extract the first word of "as", so it can be a program name with args.
3048 set dummy as; ac_word=$2
3049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3050 echo "configure:3051: checking for $ac_word" >&5
3051 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   if test -n "$AS"; then
3055   ac_cv_prog_AS="$AS" # Let the user override the test.
3056 else
3057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3058   ac_dummy="$PATH"
3059   for ac_dir in $ac_dummy; do
3060     test -z "$ac_dir" && ac_dir=.
3061     if test -f $ac_dir/$ac_word; then
3062       ac_cv_prog_AS="as"
3063       break
3064     fi
3065   done
3066   IFS="$ac_save_ifs"
3067   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3068 fi
3069 fi
3070 AS="$ac_cv_prog_AS"
3071 if test -n "$AS"; then
3072   echo "$ac_t""$AS" 1>&6
3073 else
3074   echo "$ac_t""no" 1>&6
3075 fi
3076
3077 else
3078   AS="false"
3079 fi
3080 fi
3081
3082   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3083 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3085 echo "configure:3086: checking for $ac_word" >&5
3086 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3087   echo $ac_n "(cached) $ac_c" 1>&6
3088 else
3089   if test -n "$OBJDUMP"; then
3090   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3091 else
3092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3093   ac_dummy="$PATH"
3094   for ac_dir in $ac_dummy; do
3095     test -z "$ac_dir" && ac_dir=.
3096     if test -f $ac_dir/$ac_word; then
3097       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3098       break
3099     fi
3100   done
3101   IFS="$ac_save_ifs"
3102 fi
3103 fi
3104 OBJDUMP="$ac_cv_prog_OBJDUMP"
3105 if test -n "$OBJDUMP"; then
3106   echo "$ac_t""$OBJDUMP" 1>&6
3107 else
3108   echo "$ac_t""no" 1>&6
3109 fi
3110
3111
3112 if test -z "$ac_cv_prog_OBJDUMP"; then
3113 if test -n "$ac_tool_prefix"; then
3114   # Extract the first word of "objdump", so it can be a program name with args.
3115 set dummy objdump; ac_word=$2
3116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3117 echo "configure:3118: checking for $ac_word" >&5
3118 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3119   echo $ac_n "(cached) $ac_c" 1>&6
3120 else
3121   if test -n "$OBJDUMP"; then
3122   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3123 else
3124   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3125   ac_dummy="$PATH"
3126   for ac_dir in $ac_dummy; do
3127     test -z "$ac_dir" && ac_dir=.
3128     if test -f $ac_dir/$ac_word; then
3129       ac_cv_prog_OBJDUMP="objdump"
3130       break
3131     fi
3132   done
3133   IFS="$ac_save_ifs"
3134   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3135 fi
3136 fi
3137 OBJDUMP="$ac_cv_prog_OBJDUMP"
3138 if test -n "$OBJDUMP"; then
3139   echo "$ac_t""$OBJDUMP" 1>&6
3140 else
3141   echo "$ac_t""no" 1>&6
3142 fi
3143
3144 else
3145   OBJDUMP="false"
3146 fi
3147 fi
3148
3149   ;;
3150
3151 esac
3152
3153
3154 # Save cache, so that ltconfig can load it
3155
3156
3157 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3158 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3159 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3160 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3161 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3162 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3163 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3164 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3165
3166 # Reload cache, that may have been modified by ltconfig
3167
3168
3169 # This can be used to rebuild libtool when needed
3170 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3171
3172 # Always use our own libtool.
3173 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3174
3175 # Redirect the config.log output again, so that the ltconfig log is not
3176 # clobbered by the next message.
3177 exec 5>>./config.log
3178
3179
3180 for ac_prog in mawk gawk nawk awk
3181 do
3182 # Extract the first word of "$ac_prog", so it can be a program name with args.
3183 set dummy $ac_prog; ac_word=$2
3184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3185 echo "configure:3186: checking for $ac_word" >&5
3186 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   if test -n "$AWK"; then
3190   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3191 else
3192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3193   ac_dummy="$PATH"
3194   for ac_dir in $ac_dummy; do
3195     test -z "$ac_dir" && ac_dir=.
3196     if test -f $ac_dir/$ac_word; then
3197       ac_cv_prog_AWK="$ac_prog"
3198       break
3199     fi
3200   done
3201   IFS="$ac_save_ifs"
3202 fi
3203 fi
3204 AWK="$ac_cv_prog_AWK"
3205 if test -n "$AWK"; then
3206   echo "$ac_t""$AWK" 1>&6
3207 else
3208   echo "$ac_t""no" 1>&6
3209 fi
3210
3211 test -n "$AWK" && break
3212 done
3213
3214 # test for ln hardlink support
3215 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3216 echo "configure:3217: checking whether ln works" >&5
3217 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   rm -f conftest.src conftest.dst
3221 echo "conftest" > conftest.src
3222 if ln conftest.src conftest.dst 2>/dev/null
3223 then
3224   ol_cv_prog_LN_H="ln"
3225 else
3226   ol_cv_prog_LN_H="cp"
3227 fi
3228 rm -f conftest.src conftest.dst
3229
3230 fi
3231 LN_H="$ol_cv_prog_LN_H"
3232 if test "$ol_cv_prog_LN_H" = "ln"; then
3233         echo "$ac_t""yes" 1>&6
3234 else
3235         echo "$ac_t""no" 1>&6
3236 fi
3237
3238 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3239 echo "configure:3240: checking whether ln -s works" >&5
3240 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   rm -f conftestdata
3244 if ln -s X conftestdata 2>/dev/null
3245 then
3246   rm -f conftestdata
3247   ac_cv_prog_LN_S="ln -s"
3248 else
3249   ac_cv_prog_LN_S=ln
3250 fi
3251 fi
3252 LN_S="$ac_cv_prog_LN_S"
3253 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3254   echo "$ac_t""yes" 1>&6
3255 else
3256   echo "$ac_t""no" 1>&6
3257 fi
3258
3259
3260 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3261         LN_S="$LN_H"
3262 fi
3263
3264 # Extract the first word of "sendmail", so it can be a program name with args.
3265 set dummy sendmail; ac_word=$2
3266 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3267 echo "configure:3268: checking for $ac_word" >&5
3268 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3269   echo $ac_n "(cached) $ac_c" 1>&6
3270 else
3271   case "$SENDMAIL" in
3272   /*)
3273   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3274   ;;
3275   ?:/*)
3276   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3277   ;;
3278   *)
3279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3280   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3281   for ac_dir in $ac_dummy; do 
3282     test -z "$ac_dir" && ac_dir=.
3283     if test -f $ac_dir/$ac_word; then
3284       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3285       break
3286     fi
3287   done
3288   IFS="$ac_save_ifs"
3289   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3290   ;;
3291 esac
3292 fi
3293 SENDMAIL="$ac_cv_path_SENDMAIL"
3294 if test -n "$SENDMAIL"; then
3295   echo "$ac_t""$SENDMAIL" 1>&6
3296 else
3297   echo "$ac_t""no" 1>&6
3298 fi
3299
3300 # Extract the first word of "vi", so it can be a program name with args.
3301 set dummy vi; ac_word=$2
3302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3303 echo "configure:3304: checking for $ac_word" >&5
3304 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3305   echo $ac_n "(cached) $ac_c" 1>&6
3306 else
3307   case "$EDITOR" in
3308   /*)
3309   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3310   ;;
3311   ?:/*)
3312   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3313   ;;
3314   *)
3315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3316   ac_dummy="$PATH:/usr/ucb"
3317   for ac_dir in $ac_dummy; do 
3318     test -z "$ac_dir" && ac_dir=.
3319     if test -f $ac_dir/$ac_word; then
3320       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3321       break
3322     fi
3323   done
3324   IFS="$ac_save_ifs"
3325   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3326   ;;
3327 esac
3328 fi
3329 EDITOR="$ac_cv_path_EDITOR"
3330 if test -n "$EDITOR"; then
3331   echo "$ac_t""$EDITOR" 1>&6
3332 else
3333   echo "$ac_t""no" 1>&6
3334 fi
3335
3336 # Extract the first word of "finger", so it can be a program name with args.
3337 set dummy finger; ac_word=$2
3338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_word" >&5
3340 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3341   echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343   case "$FINGER" in
3344   /*)
3345   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3346   ;;
3347   ?:/*)
3348   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3349   ;;
3350   *)
3351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3352   ac_dummy="$PATH:/usr/ucb"
3353   for ac_dir in $ac_dummy; do 
3354     test -z "$ac_dir" && ac_dir=.
3355     if test -f $ac_dir/$ac_word; then
3356       ac_cv_path_FINGER="$ac_dir/$ac_word"
3357       break
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3362   ;;
3363 esac
3364 fi
3365 FINGER="$ac_cv_path_FINGER"
3366 if test -n "$FINGER"; then
3367   echo "$ac_t""$FINGER" 1>&6
3368 else
3369   echo "$ac_t""no" 1>&6
3370 fi
3371
3372
3373 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3374 echo "configure:3375: checking how to run the C preprocessor" >&5
3375 # On Suns, sometimes $CPP names a directory.
3376 if test -n "$CPP" && test -d "$CPP"; then
3377   CPP=
3378 fi
3379 if test -z "$CPP"; then
3380 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3381   echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383     # This must be in double quotes, not single quotes, because CPP may get
3384   # substituted into the Makefile and "${CC-cc}" will confuse make.
3385   CPP="${CC-cc} -E"
3386   # On the NeXT, cc -E runs the code through the compiler's parser,
3387   # not just through cpp.
3388   cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #include <assert.h>
3392 Syntax Error
3393 EOF
3394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3395 { (eval echo configure:3396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3397 if test -z "$ac_err"; then
3398   :
3399 else
3400   echo "$ac_err" >&5
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   CPP="${CC-cc} -E -traditional-cpp"
3405   cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408 #include <assert.h>
3409 Syntax Error
3410 EOF
3411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3412 { (eval echo configure:3413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3414 if test -z "$ac_err"; then
3415   :
3416 else
3417   echo "$ac_err" >&5
3418   echo "configure: failed program was:" >&5
3419   cat conftest.$ac_ext >&5
3420   rm -rf conftest*
3421   CPP="${CC-cc} -nologo -E"
3422   cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 #include <assert.h>
3426 Syntax Error
3427 EOF
3428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3429 { (eval echo configure:3430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3431 if test -z "$ac_err"; then
3432   :
3433 else
3434   echo "$ac_err" >&5
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -rf conftest*
3438   CPP=/lib/cpp
3439 fi
3440 rm -f conftest*
3441 fi
3442 rm -f conftest*
3443 fi
3444 rm -f conftest*
3445   ac_cv_prog_CPP="$CPP"
3446 fi
3447   CPP="$ac_cv_prog_CPP"
3448 else
3449   ac_cv_prog_CPP="$CPP"
3450 fi
3451 echo "$ac_t""$CPP" 1>&6
3452
3453
3454 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3455         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3456
3457 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3458         echo "configure: warning: programs compiled here do run here..." 1>&2
3459         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3460
3461 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3462         echo "configure: warning: programs compiled here do not run here..." 1>&2
3463         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3464 fi
3465
3466 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3467 echo "configure:3468: checking for AIX" >&5
3468 cat > conftest.$ac_ext <<EOF
3469 #line 3470 "configure"
3470 #include "confdefs.h"
3471 #ifdef _AIX
3472   yes
3473 #endif
3474
3475 EOF
3476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3477   egrep "yes" >/dev/null 2>&1; then
3478   rm -rf conftest*
3479   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3480 #define _ALL_SOURCE 1
3481 EOF
3482
3483 else
3484   rm -rf conftest*
3485   echo "$ac_t""no" 1>&6
3486 fi
3487 rm -f conftest*
3488
3489
3490 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3491 echo "configure:3492: checking for POSIXized ISC" >&5
3492 if test -d /etc/conf/kconfig.d &&
3493   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3494 then
3495   echo "$ac_t""yes" 1>&6
3496   ISC=yes # If later tests want to check for ISC.
3497   cat >> confdefs.h <<\EOF
3498 #define _POSIX_SOURCE 1
3499 EOF
3500
3501   if test "$GCC" = yes; then
3502     CC="$CC -posix"
3503   else
3504     CC="$CC -Xp"
3505   fi
3506 else
3507   echo "$ac_t""no" 1>&6
3508   ISC=
3509 fi
3510
3511 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3512 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3513 echo "configure:3514: checking for minix/config.h" >&5
3514 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #include <minix/config.h>
3521 EOF
3522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3523 { (eval echo configure:3524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3525 if test -z "$ac_err"; then
3526   rm -rf conftest*
3527   eval "ac_cv_header_$ac_safe=yes"
3528 else
3529   echo "$ac_err" >&5
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   eval "ac_cv_header_$ac_safe=no"
3534 fi
3535 rm -f conftest*
3536 fi
3537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3538   echo "$ac_t""yes" 1>&6
3539   MINIX=yes
3540 else
3541   echo "$ac_t""no" 1>&6
3542 MINIX=
3543 fi
3544
3545 if test "$MINIX" = yes; then
3546   cat >> confdefs.h <<\EOF
3547 #define _POSIX_SOURCE 1
3548 EOF
3549
3550   cat >> confdefs.h <<\EOF
3551 #define _POSIX_1_SOURCE 2
3552 EOF
3553
3554   cat >> confdefs.h <<\EOF
3555 #define _MINIX 1
3556 EOF
3557
3558 fi
3559
3560
3561 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3562 echo "configure:3563: checking for Cygwin environment" >&5
3563 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3569
3570 int main() {
3571
3572 #ifndef __CYGWIN__
3573 #define __CYGWIN__ __CYGWIN32__
3574 #endif
3575 return __CYGWIN__;
3576 ; return 0; }
3577 EOF
3578 if { (eval echo configure:3579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3579   rm -rf conftest*
3580   ac_cv_cygwin=yes
3581 else
3582   echo "configure: failed program was:" >&5
3583   cat conftest.$ac_ext >&5
3584   rm -rf conftest*
3585   ac_cv_cygwin=no
3586 fi
3587 rm -f conftest*
3588 fi
3589
3590 echo "$ac_t""$ac_cv_cygwin" 1>&6
3591 CYGWIN=
3592 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3593 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3594 echo "configure:3595: checking for mingw32 environment" >&5
3595 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601
3602 int main() {
3603 return __MINGW32__;
3604 ; return 0; }
3605 EOF
3606 if { (eval echo configure:3607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3607   rm -rf conftest*
3608   ac_cv_mingw32=yes
3609 else
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   ac_cv_mingw32=no
3614 fi
3615 rm -f conftest*
3616 fi
3617
3618 echo "$ac_t""$ac_cv_mingw32" 1>&6
3619 MINGW32=
3620 test "$ac_cv_mingw32" = yes && MINGW32=yes
3621 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3622 echo "configure:3623: checking for EMX OS/2 environment" >&5
3623 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629
3630 int main() {
3631 return __EMX__;
3632 ; return 0; }
3633 EOF
3634 if { (eval echo configure:3635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3635   rm -rf conftest*
3636   ac_cv_emxos2=yes
3637 else
3638   echo "configure: failed program was:" >&5
3639   cat conftest.$ac_ext >&5
3640   rm -rf conftest*
3641   ac_cv_emxos2=no
3642 fi
3643 rm -f conftest*
3644 fi
3645
3646 echo "$ac_t""$ac_cv_emxos2" 1>&6
3647 EMXOS2=
3648 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3649
3650
3651
3652 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3653 echo "configure:3654: checking for executable suffix" >&5
3654 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3658   ac_cv_exeext=.exe
3659 else
3660   rm -f conftest*
3661   echo 'int main () { return 0; }' > conftest.$ac_ext
3662   ac_cv_exeext=
3663   if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3664     for file in conftest.*; do
3665       case $file in
3666       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3667       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3668       esac
3669     done
3670   else
3671     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3672   fi
3673   rm -f conftest*
3674   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3675 fi
3676 fi
3677
3678 EXEEXT=""
3679 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3680 echo "$ac_t""${ac_cv_exeext}" 1>&6
3681 ac_exeext=$EXEEXT
3682
3683 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3684 echo "configure:3685: checking for object suffix" >&5
3685 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3686   echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688   rm -f conftest*
3689 echo 'int i = 1;' > conftest.$ac_ext
3690 if { (eval echo configure:3691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3691   for ac_file in conftest.*; do
3692     case $ac_file in
3693     *.c) ;;
3694     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3695     esac
3696   done
3697 else
3698   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3699 fi
3700 rm -f conftest*
3701 fi
3702
3703 echo "$ac_t""$ac_cv_objext" 1>&6
3704 OBJEXT=$ac_cv_objext
3705 ac_objext=$ac_cv_objext
3706
3707
3708 cat >> confdefs.h <<EOF
3709 #define EXEEXT "${EXEEXT}"
3710 EOF
3711
3712
3713 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3714 echo "configure:3715: checking for be_app in -lbe" >&5
3715 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3716 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3717   echo $ac_n "(cached) $ac_c" 1>&6
3718 else
3719   ac_save_LIBS="$LIBS"
3720 LIBS="-lbe -lroot -lnet $LIBS"
3721 cat > conftest.$ac_ext <<EOF
3722 #line 3723 "configure"
3723 #include "confdefs.h"
3724 /* Override any gcc2 internal prototype to avoid an error.  */
3725 /* We use char because int might match the return type of a gcc2
3726     builtin and then its argument prototype would still apply.  */
3727 char be_app();
3728
3729 int main() {
3730 be_app()
3731 ; return 0; }
3732 EOF
3733 if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3734   rm -rf conftest*
3735   eval "ac_cv_lib_$ac_lib_var=yes"
3736 else
3737   echo "configure: failed program was:" >&5
3738   cat conftest.$ac_ext >&5
3739   rm -rf conftest*
3740   eval "ac_cv_lib_$ac_lib_var=no"
3741 fi
3742 rm -f conftest*
3743 LIBS="$ac_save_LIBS"
3744
3745 fi
3746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3747   echo "$ac_t""yes" 1>&6
3748   LIBS="$LIBS -lbe -lroot -lnet"
3749 else
3750   echo "$ac_t""no" 1>&6
3751 :
3752 fi
3753
3754
3755
3756
3757
3758 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3759 echo "configure:3760: checking for ${CC-cc} option to accept ANSI C" >&5
3760 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3761   echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763   am_cv_prog_cc_stdc=no
3764 ac_save_CC="$CC"
3765 # Don't try gcc -ansi; that turns off useful extensions and
3766 # breaks some systems' header files.
3767 # AIX                   -qlanglvl=ansi
3768 # Ultrix and OSF/1      -std1
3769 # HP-UX 10.20 and later -Ae
3770 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3771 # SVR4                  -Xc -D__EXTENSIONS__
3772 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3773 do
3774   CC="$ac_save_CC $ac_arg"
3775   cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 #include <stdarg.h>
3779 #include <stdio.h>
3780 #include <sys/types.h>
3781 #include <sys/stat.h>
3782 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3783 struct buf { int x; };
3784 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3785 static char *e (p, i)
3786      char **p;
3787      int i;
3788 {
3789   return p[i];
3790 }
3791 static char *f (char * (*g) (char **, int), char **p, ...)
3792 {
3793   char *s;
3794   va_list v;
3795   va_start (v,p);
3796   s = g (p, va_arg (v,int));
3797   va_end (v);
3798   return s;
3799 }
3800 int test (int i, double x);
3801 struct s1 {int (*f) (int a);};
3802 struct s2 {int (*f) (double a);};
3803 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3804 int argc;
3805 char **argv;
3806
3807 int main() {
3808
3809 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3810
3811 ; return 0; }
3812 EOF
3813 if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3814   rm -rf conftest*
3815   am_cv_prog_cc_stdc="$ac_arg"; break
3816 else
3817   echo "configure: failed program was:" >&5
3818   cat conftest.$ac_ext >&5
3819 fi
3820 rm -f conftest*
3821 done
3822 CC="$ac_save_CC"
3823
3824 fi
3825
3826 if test -z "$am_cv_prog_cc_stdc"; then
3827   echo "$ac_t""none needed" 1>&6
3828 else
3829   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3830 fi
3831 case "x$am_cv_prog_cc_stdc" in
3832   x|xno) ;;
3833   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3834 esac
3835
3836 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3837         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3838 fi
3839
3840 # test for make depend flag
3841 OL_MKDEP=
3842 OL_MKDEP_FLAGS=
3843 if test -z "${MKDEP}"; then
3844         OL_MKDEP="${CC-cc}"
3845         if test -z "${MKDEP_FLAGS}"; then
3846                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3847 echo "configure:3848: checking for ${OL_MKDEP} depend flag" >&5
3848 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   
3852                         ol_cv_mkdep=no
3853                         for flag in "-M" "-xM"; do
3854                                 cat > conftest.c <<EOF
3855  noCode;
3856 EOF
3857                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3858                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3859                                 then
3860                                         if test ! -f conftest."${ac_object}" ; then
3861                                                 ol_cv_mkdep=$flag
3862                                                 OL_MKDEP_FLAGS="$flag"
3863                                                 break
3864                                         fi
3865                                 fi
3866                         done
3867                         rm -f conftest*
3868                 
3869 fi
3870
3871 echo "$ac_t""$ol_cv_mkdep" 1>&6
3872         else
3873                 cc_cv_mkdep=yes
3874                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3875         fi
3876 else
3877         cc_cv_mkdep=yes
3878         OL_MKDEP="${MKDEP}"
3879         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3880 fi
3881
3882
3883
3884 if test "${ol_cv_mkdep}" = no ; then
3885         # this will soon become an error
3886         echo "configure: warning: do not know how to generate dependencies" 1>&2
3887 fi
3888
3889 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3890 echo "configure:3891: checking for afopen in -ls" >&5
3891 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3892 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3893   echo $ac_n "(cached) $ac_c" 1>&6
3894 else
3895   ac_save_LIBS="$LIBS"
3896 LIBS="-ls  $LIBS"
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900 /* Override any gcc2 internal prototype to avoid an error.  */
3901 /* We use char because int might match the return type of a gcc2
3902     builtin and then its argument prototype would still apply.  */
3903 char afopen();
3904
3905 int main() {
3906 afopen()
3907 ; return 0; }
3908 EOF
3909 if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3910   rm -rf conftest*
3911   eval "ac_cv_lib_$ac_lib_var=yes"
3912 else
3913   echo "configure: failed program was:" >&5
3914   cat conftest.$ac_ext >&5
3915   rm -rf conftest*
3916   eval "ac_cv_lib_$ac_lib_var=no"
3917 fi
3918 rm -f conftest*
3919 LIBS="$ac_save_LIBS"
3920
3921 fi
3922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3923   echo "$ac_t""yes" 1>&6
3924   
3925         AUTH_LIBS=-ls
3926         cat >> confdefs.h <<\EOF
3927 #define HAVE_AIX_SECURITY 1
3928 EOF
3929
3930
3931 else
3932   echo "$ac_t""no" 1>&6
3933 fi
3934
3935
3936
3937 for ac_func in getaddrinfo 
3938 do
3939 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3940 echo "configure:3941: checking for $ac_func" >&5
3941 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3942   echo $ac_n "(cached) $ac_c" 1>&6
3943 else
3944   cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947 /* System header to define __stub macros and hopefully few prototypes,
3948     which can conflict with char $ac_func(); below.  */
3949 #include <assert.h>
3950 /* Override any gcc2 internal prototype to avoid an error.  */
3951 /* We use char because int might match the return type of a gcc2
3952     builtin and then its argument prototype would still apply.  */
3953 char $ac_func();
3954 char (*f)();
3955
3956 int main() {
3957
3958 /* The GNU C library defines this for functions which it implements
3959     to always fail with ENOSYS.  Some functions are actually named
3960     something starting with __ and the normal name is an alias.  */
3961 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3962 choke me
3963 #else
3964 f = $ac_func;
3965 #endif
3966
3967 ; return 0; }
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3970   rm -rf conftest*
3971   eval "ac_cv_func_$ac_func=yes"
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -rf conftest*
3976   eval "ac_cv_func_$ac_func=no"
3977 fi
3978 rm -f conftest*
3979 fi
3980
3981 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3982   echo "$ac_t""yes" 1>&6
3983     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3984   cat >> confdefs.h <<EOF
3985 #define $ac_tr_func 1
3986 EOF
3987  
3988 else
3989   echo "$ac_t""no" 1>&6
3990 fi
3991 done
3992
3993
3994 if test $ac_cv_func_getaddrinfo = no ; then
3995         if test $ol_enable_ipv6 = yes ; then
3996                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
3997         fi
3998         ol_enable_ipv6=no
3999 fi
4000
4001 if test $ol_enable_local != no ; then
4002         for ac_hdr in sys/un.h 
4003 do
4004 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4005 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4006 echo "configure:4007: checking for $ac_hdr" >&5
4007 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010   cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <$ac_hdr>
4014 EOF
4015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4016 { (eval echo configure:4017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4018 if test -z "$ac_err"; then
4019   rm -rf conftest*
4020   eval "ac_cv_header_$ac_safe=yes"
4021 else
4022   echo "$ac_err" >&5
4023   echo "configure: failed program was:" >&5
4024   cat conftest.$ac_ext >&5
4025   rm -rf conftest*
4026   eval "ac_cv_header_$ac_safe=no"
4027 fi
4028 rm -f conftest*
4029 fi
4030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4031   echo "$ac_t""yes" 1>&6
4032     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4033   cat >> confdefs.h <<EOF
4034 #define $ac_tr_hdr 1
4035 EOF
4036  
4037 else
4038   echo "$ac_t""no" 1>&6
4039 fi
4040 done
4041
4042
4043         if test $ol_enable_local = auto ; then
4044                 ol_enable_local=$ac_cv_header_sys_un_h
4045         elif test $ac_cv_header_sys_un_h = no ; then
4046                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4047         fi
4048 fi
4049
4050 ol_link_modules=no
4051 if test $ol_enable_modules != no ; then
4052         for ac_hdr in ltdl.h
4053 do
4054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4056 echo "configure:4057: checking for $ac_hdr" >&5
4057 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4058   echo $ac_n "(cached) $ac_c" 1>&6
4059 else
4060   cat > conftest.$ac_ext <<EOF
4061 #line 4062 "configure"
4062 #include "confdefs.h"
4063 #include <$ac_hdr>
4064 EOF
4065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4066 { (eval echo configure:4067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4068 if test -z "$ac_err"; then
4069   rm -rf conftest*
4070   eval "ac_cv_header_$ac_safe=yes"
4071 else
4072   echo "$ac_err" >&5
4073   echo "configure: failed program was:" >&5
4074   cat conftest.$ac_ext >&5
4075   rm -rf conftest*
4076   eval "ac_cv_header_$ac_safe=no"
4077 fi
4078 rm -f conftest*
4079 fi
4080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4081   echo "$ac_t""yes" 1>&6
4082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4083   cat >> confdefs.h <<EOF
4084 #define $ac_tr_hdr 1
4085 EOF
4086  
4087 else
4088   echo "$ac_t""no" 1>&6
4089 fi
4090 done
4091
4092
4093         if test $ac_cv_header_ltdl_h = no ; then
4094                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4095         fi
4096
4097         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4098 echo "configure:4099: checking for lt_dlinit in -lltdl" >&5
4099 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4101   echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103   ac_save_LIBS="$LIBS"
4104 LIBS="-lltdl  $LIBS"
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 /* Override any gcc2 internal prototype to avoid an error.  */
4109 /* We use char because int might match the return type of a gcc2
4110     builtin and then its argument prototype would still apply.  */
4111 char lt_dlinit();
4112
4113 int main() {
4114 lt_dlinit()
4115 ; return 0; }
4116 EOF
4117 if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4118   rm -rf conftest*
4119   eval "ac_cv_lib_$ac_lib_var=yes"
4120 else
4121   echo "configure: failed program was:" >&5
4122   cat conftest.$ac_ext >&5
4123   rm -rf conftest*
4124   eval "ac_cv_lib_$ac_lib_var=no"
4125 fi
4126 rm -f conftest*
4127 LIBS="$ac_save_LIBS"
4128
4129 fi
4130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4131   echo "$ac_t""yes" 1>&6
4132   
4133             MODULES_LIBS=-lltdl
4134             cat >> confdefs.h <<\EOF
4135 #define HAVE_LIBLTDL 1
4136 EOF
4137
4138         
4139 else
4140   echo "$ac_t""no" 1>&6
4141 fi
4142
4143
4144         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4145                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4146         fi
4147         ol_link_modules=yes
4148 else
4149         ol_with_dnssrv_module=static
4150         ol_with_ldap_module=static
4151         ol_with_ldbm_module=static
4152         ol_with_passwd_module=static
4153         ol_with_shell_module=static
4154         ol_with_sql_module=static
4155 fi
4156
4157 # test for EBCDIC
4158 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4159 echo "configure:4160: checking for EBCDIC" >&5
4160 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4161   echo $ac_n "(cached) $ac_c" 1>&6
4162 else
4163   
4164         cat > conftest.$ac_ext <<EOF
4165 #line 4166 "configure"
4166 #include "confdefs.h"
4167
4168 #if !('M' == 0xd4)
4169 #include <__ASCII__/generate_error.h>
4170 #endif
4171
4172 EOF
4173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4174 { (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4176 if test -z "$ac_err"; then
4177   rm -rf conftest*
4178   ol_cv_cpp_ebcdic=yes
4179 else
4180   echo "$ac_err" >&5
4181   echo "configure: failed program was:" >&5
4182   cat conftest.$ac_ext >&5
4183   rm -rf conftest*
4184   ol_cv_cpp_ebcdic=no
4185 fi
4186 rm -f conftest*
4187 fi
4188
4189 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4190 if test $ol_cv_cpp_ebcdic = yes ; then
4191         cat >> confdefs.h <<\EOF
4192 #define HAVE_EBCDIC 1
4193 EOF
4194
4195 fi
4196
4197 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4198 echo "configure:4199: checking for ANSI C header files" >&5
4199 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4200   echo $ac_n "(cached) $ac_c" 1>&6
4201 else
4202   cat > conftest.$ac_ext <<EOF
4203 #line 4204 "configure"
4204 #include "confdefs.h"
4205 #include <stdlib.h>
4206 #include <stdarg.h>
4207 #include <string.h>
4208 #include <float.h>
4209 EOF
4210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4211 { (eval echo configure:4212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4213 if test -z "$ac_err"; then
4214   rm -rf conftest*
4215   ol_cv_header_stdc=yes
4216 else
4217   echo "$ac_err" >&5
4218   echo "configure: failed program was:" >&5
4219   cat conftest.$ac_ext >&5
4220   rm -rf conftest*
4221   ol_cv_header_stdc=no
4222 fi
4223 rm -f conftest*
4224
4225 if test $ol_cv_header_stdc = yes; then
4226   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4227 cat > conftest.$ac_ext <<EOF
4228 #line 4229 "configure"
4229 #include "confdefs.h"
4230 #include <string.h>
4231 EOF
4232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4233   egrep "memchr" >/dev/null 2>&1; then
4234   :
4235 else
4236   rm -rf conftest*
4237   ol_cv_header_stdc=no
4238 fi
4239 rm -f conftest*
4240
4241 fi
4242
4243 if test $ol_cv_header_stdc = yes; then
4244   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4245 cat > conftest.$ac_ext <<EOF
4246 #line 4247 "configure"
4247 #include "confdefs.h"
4248 #include <stdlib.h>
4249 EOF
4250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4251   egrep "free" >/dev/null 2>&1; then
4252   :
4253 else
4254   rm -rf conftest*
4255   ol_cv_header_stdc=no
4256 fi
4257 rm -f conftest*
4258
4259 fi
4260
4261 if test $ol_cv_header_stdc = yes; then
4262   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4263 if test "$cross_compiling" = yes; then
4264   :
4265 else
4266   cat > conftest.$ac_ext <<EOF
4267 #line 4268 "configure"
4268 #include "confdefs.h"
4269 #include <ctype.h>
4270 #ifndef HAVE_EBCDIC
4271 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4272 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4273 #else
4274 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4275                 || ('j' <= (c) && (c) <= 'r') \
4276                 || ('s' <= (c) && (c) <= 'z'))
4277 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4278 #endif
4279 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4280 int main () { int i; for (i = 0; i < 256; i++)
4281 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4282 exit (0); }
4283
4284 EOF
4285 if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4286 then
4287   :
4288 else
4289   echo "configure: failed program was:" >&5
4290   cat conftest.$ac_ext >&5
4291   rm -fr conftest*
4292   ol_cv_header_stdc=no
4293 fi
4294 rm -fr conftest*
4295 fi
4296
4297 fi
4298 fi
4299
4300 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4301 if test $ol_cv_header_stdc = yes; then
4302   cat >> confdefs.h <<\EOF
4303 #define STDC_HEADERS 1
4304 EOF
4305
4306 fi
4307 ac_cv_header_stdc=disable
4308
4309
4310 if test $ol_cv_header_stdc != yes; then
4311         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4312 fi
4313
4314 ac_header_dirent=no
4315 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4316 do
4317 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4318 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4319 echo "configure:4320: checking for $ac_hdr that defines DIR" >&5
4320 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <sys/types.h>
4327 #include <$ac_hdr>
4328 int main() {
4329 DIR *dirp = 0;
4330 ; return 0; }
4331 EOF
4332 if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4333   rm -rf conftest*
4334   eval "ac_cv_header_dirent_$ac_safe=yes"
4335 else
4336   echo "configure: failed program was:" >&5
4337   cat conftest.$ac_ext >&5
4338   rm -rf conftest*
4339   eval "ac_cv_header_dirent_$ac_safe=no"
4340 fi
4341 rm -f conftest*
4342 fi
4343 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4344   echo "$ac_t""yes" 1>&6
4345     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4346   cat >> confdefs.h <<EOF
4347 #define $ac_tr_hdr 1
4348 EOF
4349  ac_header_dirent=$ac_hdr; break
4350 else
4351   echo "$ac_t""no" 1>&6
4352 fi
4353 done
4354 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4355 if test $ac_header_dirent = dirent.h; then
4356 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4357 echo "configure:4358: checking for opendir in -ldir" >&5
4358 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4359 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4360   echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362   ac_save_LIBS="$LIBS"
4363 LIBS="-ldir  $LIBS"
4364 cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4367 /* Override any gcc2 internal prototype to avoid an error.  */
4368 /* We use char because int might match the return type of a gcc2
4369     builtin and then its argument prototype would still apply.  */
4370 char opendir();
4371
4372 int main() {
4373 opendir()
4374 ; return 0; }
4375 EOF
4376 if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4377   rm -rf conftest*
4378   eval "ac_cv_lib_$ac_lib_var=yes"
4379 else
4380   echo "configure: failed program was:" >&5
4381   cat conftest.$ac_ext >&5
4382   rm -rf conftest*
4383   eval "ac_cv_lib_$ac_lib_var=no"
4384 fi
4385 rm -f conftest*
4386 LIBS="$ac_save_LIBS"
4387
4388 fi
4389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4390   echo "$ac_t""yes" 1>&6
4391   LIBS="$LIBS -ldir"
4392 else
4393   echo "$ac_t""no" 1>&6
4394 fi
4395
4396 else
4397 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4398 echo "configure:4399: checking for opendir in -lx" >&5
4399 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4401   echo $ac_n "(cached) $ac_c" 1>&6
4402 else
4403   ac_save_LIBS="$LIBS"
4404 LIBS="-lx  $LIBS"
4405 cat > conftest.$ac_ext <<EOF
4406 #line 4407 "configure"
4407 #include "confdefs.h"
4408 /* Override any gcc2 internal prototype to avoid an error.  */
4409 /* We use char because int might match the return type of a gcc2
4410     builtin and then its argument prototype would still apply.  */
4411 char opendir();
4412
4413 int main() {
4414 opendir()
4415 ; return 0; }
4416 EOF
4417 if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4418   rm -rf conftest*
4419   eval "ac_cv_lib_$ac_lib_var=yes"
4420 else
4421   echo "configure: failed program was:" >&5
4422   cat conftest.$ac_ext >&5
4423   rm -rf conftest*
4424   eval "ac_cv_lib_$ac_lib_var=no"
4425 fi
4426 rm -f conftest*
4427 LIBS="$ac_save_LIBS"
4428
4429 fi
4430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4431   echo "$ac_t""yes" 1>&6
4432   LIBS="$LIBS -lx"
4433 else
4434   echo "$ac_t""no" 1>&6
4435 fi
4436
4437 fi
4438
4439 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4440 echo "configure:4441: checking for sys/wait.h that is POSIX.1 compatible" >&5
4441 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4442   echo $ac_n "(cached) $ac_c" 1>&6
4443 else
4444   cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447 #include <sys/types.h>
4448 #include <sys/wait.h>
4449 #ifndef WEXITSTATUS
4450 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4451 #endif
4452 #ifndef WIFEXITED
4453 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4454 #endif
4455 int main() {
4456 int s;
4457 wait (&s);
4458 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4459 ; return 0; }
4460 EOF
4461 if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4462   rm -rf conftest*
4463   ac_cv_header_sys_wait_h=yes
4464 else
4465   echo "configure: failed program was:" >&5
4466   cat conftest.$ac_ext >&5
4467   rm -rf conftest*
4468   ac_cv_header_sys_wait_h=no
4469 fi
4470 rm -f conftest*
4471 fi
4472
4473 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4474 if test $ac_cv_header_sys_wait_h = yes; then
4475   cat >> confdefs.h <<\EOF
4476 #define HAVE_SYS_WAIT_H 1
4477 EOF
4478
4479 fi
4480
4481 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4482 echo "configure:4483: checking POSIX termios" >&5
4483 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4484   echo $ac_n "(cached) $ac_c" 1>&6
4485 else
4486   cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 #include <sys/types.h>
4490 #include <unistd.h>
4491 #include <termios.h>
4492 int main() {
4493 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4494    tcgetattr(0, 0);
4495 ; return 0; }
4496 EOF
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4498   rm -rf conftest*
4499   am_cv_sys_posix_termios=yes
4500 else
4501   echo "configure: failed program was:" >&5
4502   cat conftest.$ac_ext >&5
4503   rm -rf conftest*
4504   am_cv_sys_posix_termios=no
4505 fi
4506 rm -f conftest*
4507 fi
4508
4509 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4510
4511
4512  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4513 echo "configure:4514: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4514 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4515   echo $ac_n "(cached) $ac_c" 1>&6
4516 else
4517   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4518
4519   gwinsz_in_termios_h=no
4520   if test $am_cv_sys_posix_termios = yes; then
4521     cat > conftest.$ac_ext <<EOF
4522 #line 4523 "configure"
4523 #include "confdefs.h"
4524 #include <sys/types.h>
4525 #     include <termios.h>
4526 #     ifdef TIOCGWINSZ
4527         yes
4528 #     endif
4529     
4530 EOF
4531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4532   egrep "yes" >/dev/null 2>&1; then
4533   rm -rf conftest*
4534   gwinsz_in_termios_h=yes
4535 fi
4536 rm -f conftest*
4537
4538   fi
4539
4540   if test $gwinsz_in_termios_h = no; then
4541     cat > conftest.$ac_ext <<EOF
4542 #line 4543 "configure"
4543 #include "confdefs.h"
4544 #include <sys/types.h>
4545 #     include <sys/ioctl.h>
4546 #     ifdef TIOCGWINSZ
4547         yes
4548 #     endif
4549     
4550 EOF
4551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4552   egrep "yes" >/dev/null 2>&1; then
4553   rm -rf conftest*
4554   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4555 fi
4556 rm -f conftest*
4557
4558   fi
4559   
4560 fi
4561
4562 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4563   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4564     cat >> confdefs.h <<\EOF
4565 #define GWINSZ_IN_SYS_IOCTL 1
4566 EOF
4567
4568   fi
4569
4570 if test $am_cv_sys_posix_termios = yes ; then
4571         cat >> confdefs.h <<\EOF
4572 #define HAVE_POSIX_TERMIOS 1
4573 EOF
4574
4575 fi
4576
4577 for ac_hdr in \
4578         arpa/inet.h             \
4579         arpa/nameser.h  \
4580         assert.h                \
4581         conio.h                 \
4582         crypt.h                 \
4583         direct.h                \
4584         errno.h                 \
4585         fcntl.h                 \
4586         filio.h                 \
4587         getopt.h                \
4588         grp.h                   \
4589         io.h                    \
4590         libutil.h               \
4591         limits.h                \
4592         locale.h                \
4593         netinet/tcp.h   \
4594         malloc.h                \
4595         memory.h                \
4596         psap.h                  \
4597         pwd.h                   \
4598         process.h               \
4599         resolv.h                \
4600         sgtty.h                 \
4601         shadow.h                \
4602         stddef.h                \
4603         string.h                \
4604         strings.h               \
4605         sysexits.h              \
4606         sys/file.h              \
4607         sys/filio.h             \
4608         sys/errno.h             \
4609         sys/ioctl.h             \
4610         sys/param.h             \
4611         sys/resource.h  \
4612         sys/select.h    \
4613         sys/socket.h    \
4614         sys/syslog.h    \
4615         sys/time.h              \
4616         sys/types.h             \
4617         syslog.h                \
4618         termios.h               \
4619         unistd.h                \
4620         winsock.h               \
4621
4622 do
4623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_hdr" >&5
4626 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 #include <$ac_hdr>
4633 EOF
4634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4635 { (eval echo configure:4636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4637 if test -z "$ac_err"; then
4638   rm -rf conftest*
4639   eval "ac_cv_header_$ac_safe=yes"
4640 else
4641   echo "$ac_err" >&5
4642   echo "configure: failed program was:" >&5
4643   cat conftest.$ac_ext >&5
4644   rm -rf conftest*
4645   eval "ac_cv_header_$ac_safe=no"
4646 fi
4647 rm -f conftest*
4648 fi
4649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4650   echo "$ac_t""yes" 1>&6
4651     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4652   cat >> confdefs.h <<EOF
4653 #define $ac_tr_hdr 1
4654 EOF
4655  
4656 else
4657   echo "$ac_t""no" 1>&6
4658 fi
4659 done
4660
4661
4662
4663
4664 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4665 echo "configure:4666: checking for sigset in -lV3" >&5
4666 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4668   echo $ac_n "(cached) $ac_c" 1>&6
4669 else
4670   ac_save_LIBS="$LIBS"
4671 LIBS="-lV3  $LIBS"
4672 cat > conftest.$ac_ext <<EOF
4673 #line 4674 "configure"
4674 #include "confdefs.h"
4675 /* Override any gcc2 internal prototype to avoid an error.  */
4676 /* We use char because int might match the return type of a gcc2
4677     builtin and then its argument prototype would still apply.  */
4678 char sigset();
4679
4680 int main() {
4681 sigset()
4682 ; return 0; }
4683 EOF
4684 if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4685   rm -rf conftest*
4686   eval "ac_cv_lib_$ac_lib_var=yes"
4687 else
4688   echo "configure: failed program was:" >&5
4689   cat conftest.$ac_ext >&5
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=no"
4692 fi
4693 rm -f conftest*
4694 LIBS="$ac_save_LIBS"
4695
4696 fi
4697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4698   echo "$ac_t""yes" 1>&6
4699     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4700     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4701   cat >> confdefs.h <<EOF
4702 #define $ac_tr_lib 1
4703 EOF
4704
4705   LIBS="-lV3 $LIBS"
4706
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710
4711
4712 if test $ac_cv_header_winsock_h = yes; then
4713         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4714 echo "configure:4715: checking for winsock" >&5
4715 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4716   echo $ac_n "(cached) $ac_c" 1>&6
4717 else
4718   cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721 #include <winsock.h>
4722 int main() {
4723
4724                         socket(0,0,0);
4725                         select(0,NULL,NULL,NULL,NULL);
4726                         closesocket(0);
4727                         gethostname(NULL,0);
4728         
4729 ; return 0; }
4730 EOF
4731 if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4732   rm -rf conftest*
4733   ol_cv_winsock=yes
4734 else
4735   echo "configure: failed program was:" >&5
4736   cat conftest.$ac_ext >&5
4737   rm -rf conftest*
4738   ol_cv_winsock=no
4739 fi
4740 rm -f conftest*]
4741 fi
4742
4743 echo "$ac_t""$ol_cv_winsock" 1>&6
4744
4745         if test $ol_cv_winsock = yes ; then
4746                 cat >> confdefs.h <<\EOF
4747 #define HAVE_WINSOCK 1
4748 EOF
4749
4750                 ac_cv_func_socket=yes
4751                 ac_cv_func_select=yes
4752                 ac_cv_func_closesocket=yes
4753                 ac_cv_func_gethostname=yes
4754         fi
4755 fi
4756
4757
4758 echo $ac_n "checking for socket""... $ac_c" 1>&6
4759 echo "configure:4760: checking for socket" >&5
4760 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 /* System header to define __stub macros and hopefully few prototypes,
4767     which can conflict with char socket(); below.  */
4768 #include <assert.h>
4769 /* Override any gcc2 internal prototype to avoid an error.  */
4770 /* We use char because int might match the return type of a gcc2
4771     builtin and then its argument prototype would still apply.  */
4772 char socket();
4773 char (*f)();
4774
4775 int main() {
4776
4777 /* The GNU C library defines this for functions which it implements
4778     to always fail with ENOSYS.  Some functions are actually named
4779     something starting with __ and the normal name is an alias.  */
4780 #if defined (__stub_socket) || defined (__stub___socket)
4781 choke me
4782 #else
4783 f = socket;
4784 #endif
4785
4786 ; return 0; }
4787 EOF
4788 if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4789   rm -rf conftest*
4790   eval "ac_cv_func_socket=yes"
4791 else
4792   echo "configure: failed program was:" >&5
4793   cat conftest.$ac_ext >&5
4794   rm -rf conftest*
4795   eval "ac_cv_func_socket=no"
4796 fi
4797 rm -f conftest*
4798 fi
4799
4800 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802   :
4803 else
4804   echo "$ac_t""no" 1>&6
4805         
4806         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4807 echo "configure:4808: checking for main in -lsocket" >&5
4808 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4809 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4810   echo $ac_n "(cached) $ac_c" 1>&6
4811 else
4812   ac_save_LIBS="$LIBS"
4813 LIBS="-lsocket  $LIBS"
4814 cat > conftest.$ac_ext <<EOF
4815 #line 4816 "configure"
4816 #include "confdefs.h"
4817
4818 int main() {
4819 main()
4820 ; return 0; }
4821 EOF
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823   rm -rf conftest*
4824   eval "ac_cv_lib_$ac_lib_var=yes"
4825 else
4826   echo "configure: failed program was:" >&5
4827   cat conftest.$ac_ext >&5
4828   rm -rf conftest*
4829   eval "ac_cv_lib_$ac_lib_var=no"
4830 fi
4831 rm -f conftest*
4832 LIBS="$ac_save_LIBS"
4833
4834 fi
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4836   echo "$ac_t""yes" 1>&6
4837     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4839   cat >> confdefs.h <<EOF
4840 #define $ac_tr_lib 1
4841 EOF
4842
4843   LIBS="-lsocket $LIBS"
4844
4845 else
4846   echo "$ac_t""no" 1>&6
4847 fi
4848
4849         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4850 echo "configure:4851: checking for main in -lnet" >&5
4851 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4852 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4853   echo $ac_n "(cached) $ac_c" 1>&6
4854 else
4855   ac_save_LIBS="$LIBS"
4856 LIBS="-lnet  $LIBS"
4857 cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4860
4861 int main() {
4862 main()
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   eval "ac_cv_lib_$ac_lib_var=yes"
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   eval "ac_cv_lib_$ac_lib_var=no"
4873 fi
4874 rm -f conftest*
4875 LIBS="$ac_save_LIBS"
4876
4877 fi
4878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4879   echo "$ac_t""yes" 1>&6
4880     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4881     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4882   cat >> confdefs.h <<EOF
4883 #define $ac_tr_lib 1
4884 EOF
4885
4886   LIBS="-lnet $LIBS"
4887
4888 else
4889   echo "$ac_t""no" 1>&6
4890 fi
4891
4892         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4893 echo "configure:4894: checking for main in -lnsl_s" >&5
4894 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   ac_save_LIBS="$LIBS"
4899 LIBS="-lnsl_s  $LIBS"
4900 cat > conftest.$ac_ext <<EOF
4901 #line 4902 "configure"
4902 #include "confdefs.h"
4903
4904 int main() {
4905 main()
4906 ; return 0; }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=yes"
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=no"
4916 fi
4917 rm -f conftest*
4918 LIBS="$ac_save_LIBS"
4919
4920 fi
4921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4922   echo "$ac_t""yes" 1>&6
4923     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4924     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4925   cat >> confdefs.h <<EOF
4926 #define $ac_tr_lib 1
4927 EOF
4928
4929   LIBS="-lnsl_s $LIBS"
4930
4931 else
4932   echo "$ac_t""no" 1>&6
4933 fi
4934
4935         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4936 echo "configure:4937: checking for main in -lnsl" >&5
4937 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   ac_save_LIBS="$LIBS"
4942 LIBS="-lnsl  $LIBS"
4943 cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946
4947 int main() {
4948 main()
4949 ; return 0; }
4950 EOF
4951 if { (eval echo configure:4952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=yes"
4954 else
4955   echo "configure: failed program was:" >&5
4956   cat conftest.$ac_ext >&5
4957   rm -rf conftest*
4958   eval "ac_cv_lib_$ac_lib_var=no"
4959 fi
4960 rm -f conftest*
4961 LIBS="$ac_save_LIBS"
4962
4963 fi
4964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4965   echo "$ac_t""yes" 1>&6
4966     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4967     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4968   cat >> confdefs.h <<EOF
4969 #define $ac_tr_lib 1
4970 EOF
4971
4972   LIBS="-lnsl $LIBS"
4973
4974 else
4975   echo "$ac_t""no" 1>&6
4976 fi
4977
4978         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4979 echo "configure:4980: checking for socket in -linet" >&5
4980 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4982   echo $ac_n "(cached) $ac_c" 1>&6
4983 else
4984   ac_save_LIBS="$LIBS"
4985 LIBS="-linet  $LIBS"
4986 cat > conftest.$ac_ext <<EOF
4987 #line 4988 "configure"
4988 #include "confdefs.h"
4989 /* Override any gcc2 internal prototype to avoid an error.  */
4990 /* We use char because int might match the return type of a gcc2
4991     builtin and then its argument prototype would still apply.  */
4992 char socket();
4993
4994 int main() {
4995 socket()
4996 ; return 0; }
4997 EOF
4998 if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4999   rm -rf conftest*
5000   eval "ac_cv_lib_$ac_lib_var=yes"
5001 else
5002   echo "configure: failed program was:" >&5
5003   cat conftest.$ac_ext >&5
5004   rm -rf conftest*
5005   eval "ac_cv_lib_$ac_lib_var=no"
5006 fi
5007 rm -f conftest*
5008 LIBS="$ac_save_LIBS"
5009
5010 fi
5011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5012   echo "$ac_t""yes" 1>&6
5013     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5015   cat >> confdefs.h <<EOF
5016 #define $ac_tr_lib 1
5017 EOF
5018
5019   LIBS="-linet $LIBS"
5020
5021 else
5022   echo "$ac_t""no" 1>&6
5023 fi
5024
5025         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5026 echo "configure:5027: checking for main in -lgen" >&5
5027 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5029   echo $ac_n "(cached) $ac_c" 1>&6
5030 else
5031   ac_save_LIBS="$LIBS"
5032 LIBS="-lgen  $LIBS"
5033 cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036
5037 int main() {
5038 main()
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042   rm -rf conftest*
5043   eval "ac_cv_lib_$ac_lib_var=yes"
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047   rm -rf conftest*
5048   eval "ac_cv_lib_$ac_lib_var=no"
5049 fi
5050 rm -f conftest*
5051 LIBS="$ac_save_LIBS"
5052
5053 fi
5054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5055   echo "$ac_t""yes" 1>&6
5056     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5058   cat >> confdefs.h <<EOF
5059 #define $ac_tr_lib 1
5060 EOF
5061
5062   LIBS="-lgen $LIBS"
5063
5064 else
5065   echo "$ac_t""no" 1>&6
5066 fi
5067
5068
5069 fi
5070
5071
5072 echo $ac_n "checking for select""... $ac_c" 1>&6
5073 echo "configure:5074: checking for select" >&5
5074 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5075   echo $ac_n "(cached) $ac_c" 1>&6
5076 else
5077   cat > conftest.$ac_ext <<EOF
5078 #line 5079 "configure"
5079 #include "confdefs.h"
5080 /* System header to define __stub macros and hopefully few prototypes,
5081     which can conflict with char select(); below.  */
5082 #include <assert.h>
5083 /* Override any gcc2 internal prototype to avoid an error.  */
5084 /* We use char because int might match the return type of a gcc2
5085     builtin and then its argument prototype would still apply.  */
5086 char select();
5087 char (*f)();
5088
5089 int main() {
5090
5091 /* The GNU C library defines this for functions which it implements
5092     to always fail with ENOSYS.  Some functions are actually named
5093     something starting with __ and the normal name is an alias.  */
5094 #if defined (__stub_select) || defined (__stub___select)
5095 choke me
5096 #else
5097 f = select;
5098 #endif
5099
5100 ; return 0; }
5101 EOF
5102 if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5103   rm -rf conftest*
5104   eval "ac_cv_func_select=yes"
5105 else
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109   eval "ac_cv_func_select=no"
5110 fi
5111 rm -f conftest*
5112 fi
5113
5114 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5115   echo "$ac_t""yes" 1>&6
5116   :
5117 else
5118   echo "$ac_t""no" 1>&6
5119 { echo "configure: error: select() required." 1>&2; exit 1; }
5120 fi
5121
5122
5123 if test "${ac_cv_header_winsock_h}" != yes; then
5124                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5125 echo "configure:5126: checking types of arguments for select()" >&5
5126  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5127   echo $ac_n "(cached) $ac_c" 1>&6
5128 else
5129    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5130   echo $ac_n "(cached) $ac_c" 1>&6
5131 else
5132     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5133   echo $ac_n "(cached) $ac_c" 1>&6
5134 else
5135      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5136      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5137       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5138        cat > conftest.$ac_ext <<EOF
5139 #line 5140 "configure"
5140 #include "confdefs.h"
5141 #ifdef HAVE_SYS_TYPES_H
5142 #include <sys/types.h>
5143 #endif
5144 #ifdef HAVE_SYS_TIME_H
5145 #include <sys/time.h>
5146 #endif
5147 #ifdef HAVE_SYS_SELECT_H
5148 #include <sys/select.h>
5149 #endif
5150 #ifdef HAVE_SYS_SOCKET_H
5151 #include <sys/socket.h>
5152 #endif
5153 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);
5154 int main() {
5155
5156 ; return 0; }
5157 EOF
5158 if { (eval echo configure:5159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5159   rm -rf conftest*
5160           ac_not_found=no ; break 3
5161 else
5162   echo "configure: failed program was:" >&5
5163   cat conftest.$ac_ext >&5
5164   rm -rf conftest*
5165   ac_not_found=yes
5166 fi
5167 rm -f conftest*
5168       done
5169      done
5170     done
5171    
5172 fi
5173   
5174 fi
5175  
5176 fi
5177  if test "$ac_not_found" = yes; then
5178   ac_cv_func_select_arg1=int 
5179   ac_cv_func_select_arg234='int *' 
5180   ac_cv_func_select_arg5='struct timeval *'
5181  fi
5182  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5183  cat >> confdefs.h <<EOF
5184 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5185 EOF
5186
5187  cat >> confdefs.h <<EOF
5188 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5189 EOF
5190
5191  cat >> confdefs.h <<EOF
5192 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5193 EOF
5194
5195
5196 fi
5197
5198
5199 for ac_hdr in regex.h 
5200 do
5201 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5202 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5203 echo "configure:5204: checking for $ac_hdr" >&5
5204 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5205   echo $ac_n "(cached) $ac_c" 1>&6
5206 else
5207   cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210 #include <$ac_hdr>
5211 EOF
5212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5213 { (eval echo configure:5214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5215 if test -z "$ac_err"; then
5216   rm -rf conftest*
5217   eval "ac_cv_header_$ac_safe=yes"
5218 else
5219   echo "$ac_err" >&5
5220   echo "configure: failed program was:" >&5
5221   cat conftest.$ac_ext >&5
5222   rm -rf conftest*
5223   eval "ac_cv_header_$ac_safe=no"
5224 fi
5225 rm -f conftest*
5226 fi
5227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5228   echo "$ac_t""yes" 1>&6
5229     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5230   cat >> confdefs.h <<EOF
5231 #define $ac_tr_hdr 1
5232 EOF
5233  
5234 else
5235   echo "$ac_t""no" 1>&6
5236 fi
5237 done
5238
5239 if test "$ac_cv_header_regex_h" != yes ; then
5240         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5241 fi
5242 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5243 echo "configure:5244: checking for regfree" >&5
5244 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 /* System header to define __stub macros and hopefully few prototypes,
5251     which can conflict with char regfree(); below.  */
5252 #include <assert.h>
5253 /* Override any gcc2 internal prototype to avoid an error.  */
5254 /* We use char because int might match the return type of a gcc2
5255     builtin and then its argument prototype would still apply.  */
5256 char regfree();
5257 char (*f)();
5258
5259 int main() {
5260
5261 /* The GNU C library defines this for functions which it implements
5262     to always fail with ENOSYS.  Some functions are actually named
5263     something starting with __ and the normal name is an alias.  */
5264 #if defined (__stub_regfree) || defined (__stub___regfree)
5265 choke me
5266 #else
5267 f = regfree;
5268 #endif
5269
5270 ; return 0; }
5271 EOF
5272 if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5273   rm -rf conftest*
5274   eval "ac_cv_func_regfree=yes"
5275 else
5276   echo "configure: failed program was:" >&5
5277   cat conftest.$ac_ext >&5
5278   rm -rf conftest*
5279   eval "ac_cv_func_regfree=no"
5280 fi
5281 rm -f conftest*
5282 fi
5283
5284 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5285   echo "$ac_t""yes" 1>&6
5286   :
5287 else
5288   echo "$ac_t""no" 1>&6
5289 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5290 fi
5291
5292
5293
5294 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5295 echo "configure:5296: checking for compatible POSIX regex" >&5
5296 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5297   echo $ac_n "(cached) $ac_c" 1>&6
5298 else
5299   
5300         if test "$cross_compiling" = yes; then
5301   ol_cv_c_posix_regex=cross
5302 else
5303   cat > conftest.$ac_ext <<EOF
5304 #line 5305 "configure"
5305 #include "confdefs.h"
5306
5307 #include <sys/types.h>
5308 #include <regex.h>
5309 static char *pattern, *string;
5310 main()
5311 {
5312         int rc;
5313         regex_t re;
5314
5315         pattern = "^A";
5316
5317         if(regcomp(&re, pattern, 0)) {
5318                 return -1;
5319         }
5320         
5321         string = "ALL MATCH";
5322         
5323         rc = regexec(&re, string, 0, (void*)0, 0);
5324
5325         regfree(&re);
5326
5327         return rc;
5328 }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5331 then
5332   ol_cv_c_posix_regex=yes
5333 else
5334   echo "configure: failed program was:" >&5
5335   cat conftest.$ac_ext >&5
5336   rm -fr conftest*
5337   ol_cv_c_posix_regex=no
5338 fi
5339 rm -fr conftest*
5340 fi
5341
5342 fi
5343
5344 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5345
5346 if test "$ol_cv_c_posix_regex" = no ; then
5347         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5348 fi
5349
5350 ol_link_dnssrv=no
5351 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5352 echo "configure:5353: checking for res_query" >&5
5353 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5354   echo $ac_n "(cached) $ac_c" 1>&6
5355 else
5356   cat > conftest.$ac_ext <<EOF
5357 #line 5358 "configure"
5358 #include "confdefs.h"
5359 /* System header to define __stub macros and hopefully few prototypes,
5360     which can conflict with char res_query(); below.  */
5361 #include <assert.h>
5362 /* Override any gcc2 internal prototype to avoid an error.  */
5363 /* We use char because int might match the return type of a gcc2
5364     builtin and then its argument prototype would still apply.  */
5365 char res_query();
5366 char (*f)();
5367
5368 int main() {
5369
5370 /* The GNU C library defines this for functions which it implements
5371     to always fail with ENOSYS.  Some functions are actually named
5372     something starting with __ and the normal name is an alias.  */
5373 #if defined (__stub_res_query) || defined (__stub___res_query)
5374 choke me
5375 #else
5376 f = res_query;
5377 #endif
5378
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5382   rm -rf conftest*
5383   eval "ac_cv_func_res_query=yes"
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   eval "ac_cv_func_res_query=no"
5389 fi
5390 rm -f conftest*
5391 fi
5392
5393 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5394   echo "$ac_t""yes" 1>&6
5395   :
5396 else
5397   echo "$ac_t""no" 1>&6
5398 fi
5399
5400 if test $ac_cv_func_res_query = no ; then 
5401         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5402 echo "configure:5403: checking for res_query in -lbind" >&5
5403 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5404 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5405   echo $ac_n "(cached) $ac_c" 1>&6
5406 else
5407   ac_save_LIBS="$LIBS"
5408 LIBS="-lbind  $LIBS"
5409 cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412 /* Override any gcc2 internal prototype to avoid an error.  */
5413 /* We use char because int might match the return type of a gcc2
5414     builtin and then its argument prototype would still apply.  */
5415 char res_query();
5416
5417 int main() {
5418 res_query()
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   eval "ac_cv_lib_$ac_lib_var=yes"
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427   rm -rf conftest*
5428   eval "ac_cv_lib_$ac_lib_var=no"
5429 fi
5430 rm -f conftest*
5431 LIBS="$ac_save_LIBS"
5432
5433 fi
5434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5435   echo "$ac_t""yes" 1>&6
5436     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5437     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5438   cat >> confdefs.h <<EOF
5439 #define $ac_tr_lib 1
5440 EOF
5441
5442   LIBS="-lbind $LIBS"
5443
5444 else
5445   echo "$ac_t""no" 1>&6
5446 fi
5447
5448         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5449 fi
5450
5451 if test $ac_cv_func_res_query = no ; then 
5452         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5453 echo "configure:5454: checking for __res_query in -lbind" >&5
5454 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5455 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5456   echo $ac_n "(cached) $ac_c" 1>&6
5457 else
5458   ac_save_LIBS="$LIBS"
5459 LIBS="-lbind  $LIBS"
5460 cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463 /* Override any gcc2 internal prototype to avoid an error.  */
5464 /* We use char because int might match the return type of a gcc2
5465     builtin and then its argument prototype would still apply.  */
5466 char __res_query();
5467
5468 int main() {
5469 __res_query()
5470 ; return 0; }
5471 EOF
5472 if { (eval echo configure:5473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5473   rm -rf conftest*
5474   eval "ac_cv_lib_$ac_lib_var=yes"
5475 else
5476   echo "configure: failed program was:" >&5
5477   cat conftest.$ac_ext >&5
5478   rm -rf conftest*
5479   eval "ac_cv_lib_$ac_lib_var=no"
5480 fi
5481 rm -f conftest*
5482 LIBS="$ac_save_LIBS"
5483
5484 fi
5485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5486   echo "$ac_t""yes" 1>&6
5487     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5488     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5489   cat >> confdefs.h <<EOF
5490 #define $ac_tr_lib 1
5491 EOF
5492
5493   LIBS="-lbind $LIBS"
5494
5495 else
5496   echo "$ac_t""no" 1>&6
5497 fi
5498
5499         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5500 fi
5501
5502 if test $ac_cv_func_res_query = no ; then 
5503         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5504 echo "configure:5505: checking for res_query in -lresolv" >&5
5505 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5507   echo $ac_n "(cached) $ac_c" 1>&6
5508 else
5509   ac_save_LIBS="$LIBS"
5510 LIBS="-lresolv  $LIBS"
5511 cat > conftest.$ac_ext <<EOF
5512 #line 5513 "configure"
5513 #include "confdefs.h"
5514 /* Override any gcc2 internal prototype to avoid an error.  */
5515 /* We use char because int might match the return type of a gcc2
5516     builtin and then its argument prototype would still apply.  */
5517 char res_query();
5518
5519 int main() {
5520 res_query()
5521 ; return 0; }
5522 EOF
5523 if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5524   rm -rf conftest*
5525   eval "ac_cv_lib_$ac_lib_var=yes"
5526 else
5527   echo "configure: failed program was:" >&5
5528   cat conftest.$ac_ext >&5
5529   rm -rf conftest*
5530   eval "ac_cv_lib_$ac_lib_var=no"
5531 fi
5532 rm -f conftest*
5533 LIBS="$ac_save_LIBS"
5534
5535 fi
5536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5537   echo "$ac_t""yes" 1>&6
5538     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5539     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5540   cat >> confdefs.h <<EOF
5541 #define $ac_tr_lib 1
5542 EOF
5543
5544   LIBS="-lresolv $LIBS"
5545
5546 else
5547   echo "$ac_t""no" 1>&6
5548 fi
5549
5550         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5551 fi
5552
5553 if test "$ac_cv_func_res_query" = yes ; then
5554         cat >> confdefs.h <<\EOF
5555 #define HAVE_RES_QUERY 1
5556 EOF
5557
5558
5559         if test $ol_enable_dnssrv != no ; then
5560                 ol_link_dnssrv=yes
5561         fi
5562 fi
5563
5564 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5565         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5566 fi
5567
5568 ol_link_kbind=no
5569 ol_link_kpasswd=no
5570 ol_link_krb5=no
5571 ol_link_krb4=no
5572
5573 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5574         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5575         -o $ol_with_kerberos = k425 ; then
5576
5577         for ac_hdr in krb5.h
5578 do
5579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5581 echo "configure:5582: checking for $ac_hdr" >&5
5582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5583   echo $ac_n "(cached) $ac_c" 1>&6
5584 else
5585   cat > conftest.$ac_ext <<EOF
5586 #line 5587 "configure"
5587 #include "confdefs.h"
5588 #include <$ac_hdr>
5589 EOF
5590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5591 { (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5593 if test -z "$ac_err"; then
5594   rm -rf conftest*
5595   eval "ac_cv_header_$ac_safe=yes"
5596 else
5597   echo "$ac_err" >&5
5598   echo "configure: failed program was:" >&5
5599   cat conftest.$ac_ext >&5
5600   rm -rf conftest*
5601   eval "ac_cv_header_$ac_safe=no"
5602 fi
5603 rm -f conftest*
5604 fi
5605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5606   echo "$ac_t""yes" 1>&6
5607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5608   cat >> confdefs.h <<EOF
5609 #define $ac_tr_hdr 1
5610 EOF
5611  
5612 else
5613   echo "$ac_t""no" 1>&6
5614 fi
5615 done
5616
5617
5618         if test $ac_cv_header_krb5_h = yes ; then
5619                                 for ac_hdr in heim_err.h
5620 do
5621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5623 echo "configure:5624: checking for $ac_hdr" >&5
5624 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5625   echo $ac_n "(cached) $ac_c" 1>&6
5626 else
5627   cat > conftest.$ac_ext <<EOF
5628 #line 5629 "configure"
5629 #include "confdefs.h"
5630 #include <$ac_hdr>
5631 EOF
5632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5633 { (eval echo configure:5634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5635 if test -z "$ac_err"; then
5636   rm -rf conftest*
5637   eval "ac_cv_header_$ac_safe=yes"
5638 else
5639   echo "$ac_err" >&5
5640   echo "configure: failed program was:" >&5
5641   cat conftest.$ac_ext >&5
5642   rm -rf conftest*
5643   eval "ac_cv_header_$ac_safe=no"
5644 fi
5645 rm -f conftest*
5646 fi
5647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5648   echo "$ac_t""yes" 1>&6
5649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5650   cat >> confdefs.h <<EOF
5651 #define $ac_tr_hdr 1
5652 EOF
5653  
5654 else
5655   echo "$ac_t""no" 1>&6
5656 fi
5657 done
5658
5659                 if test $ac_cv_header_heim_err_h = yes ; then
5660                         krb5_impl=heimdal
5661                 else
5662                         krb5_impl=mit
5663                 fi
5664
5665                 if test $krb5_impl = mit; then
5666                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5667 echo "configure:5668: checking for main in -lkrb5" >&5
5668 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5670   echo $ac_n "(cached) $ac_c" 1>&6
5671 else
5672   ac_save_LIBS="$LIBS"
5673 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5674 cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677
5678 int main() {
5679 main()
5680 ; return 0; }
5681 EOF
5682 if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5683   rm -rf conftest*
5684   eval "ac_cv_lib_$ac_lib_var=yes"
5685 else
5686   echo "configure: failed program was:" >&5
5687   cat conftest.$ac_ext >&5
5688   rm -rf conftest*
5689   eval "ac_cv_lib_$ac_lib_var=no"
5690 fi
5691 rm -f conftest*
5692 LIBS="$ac_save_LIBS"
5693
5694 fi
5695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5696   echo "$ac_t""yes" 1>&6
5697   have_krb5=yes
5698                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5699 else
5700   echo "$ac_t""no" 1>&6
5701 have_krb5=no
5702 fi
5703
5704
5705                 elif test $krb5_impl = heimdal; then
5706                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5707 echo "configure:5708: checking for main in -lkrb5" >&5
5708 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5709 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5710   echo $ac_n "(cached) $ac_c" 1>&6
5711 else
5712   ac_save_LIBS="$LIBS"
5713 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5714 cat > conftest.$ac_ext <<EOF
5715 #line 5716 "configure"
5716 #include "confdefs.h"
5717
5718 int main() {
5719 main()
5720 ; return 0; }
5721 EOF
5722 if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5723   rm -rf conftest*
5724   eval "ac_cv_lib_$ac_lib_var=yes"
5725 else
5726   echo "configure: failed program was:" >&5
5727   cat conftest.$ac_ext >&5
5728   rm -rf conftest*
5729   eval "ac_cv_lib_$ac_lib_var=no"
5730 fi
5731 rm -f conftest*
5732 LIBS="$ac_save_LIBS"
5733
5734 fi
5735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5736   echo "$ac_t""yes" 1>&6
5737   have_krb5=yes
5738                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5739 else
5740   echo "$ac_t""no" 1>&6
5741 have_krb5=no
5742 fi
5743
5744
5745                         cat >> confdefs.h <<\EOF
5746 #define HAVE_HEIMDAL_KERBEROS 1
5747 EOF
5748
5749                 else
5750                         have_krb5=no
5751                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5752                 fi
5753
5754                 if test $have_krb5 = yes ; then
5755                         ol_link_krb5=yes
5756
5757                         cat >> confdefs.h <<\EOF
5758 #define HAVE_KRB5 1
5759 EOF
5760
5761
5762                         if test $ol_enable_kpasswd != no ; then
5763                                 ol_link_kpasswd=yes;
5764                         fi
5765
5766                         if test $ol_with_kerberos = k5only ; then
5767                                 ol_with_kerberos=found
5768                         fi
5769
5770                 elif test $ol_with_kerberos != auto ; then
5771                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5772                 fi
5773
5774         fi
5775 fi
5776
5777 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5778         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5779
5780         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5781 do
5782 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5783 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5784 echo "configure:5785: checking for $ac_hdr" >&5
5785 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5786   echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5788   cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 #include <$ac_hdr>
5792 EOF
5793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5794 { (eval echo configure:5795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5796 if test -z "$ac_err"; then
5797   rm -rf conftest*
5798   eval "ac_cv_header_$ac_safe=yes"
5799 else
5800   echo "$ac_err" >&5
5801   echo "configure: failed program was:" >&5
5802   cat conftest.$ac_ext >&5
5803   rm -rf conftest*
5804   eval "ac_cv_header_$ac_safe=no"
5805 fi
5806 rm -f conftest*
5807 fi
5808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5809   echo "$ac_t""yes" 1>&6
5810     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5811   cat >> confdefs.h <<EOF
5812 #define $ac_tr_hdr 1
5813 EOF
5814  
5815 else
5816   echo "$ac_t""no" 1>&6
5817 fi
5818 done
5819
5820
5821         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5822                 if test $krb5_impl = mit; then
5823                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5824 echo "configure:5825: checking for main in -lkrb4" >&5
5825 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5827   echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829   ac_save_LIBS="$LIBS"
5830 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5831 cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834
5835 int main() {
5836 main()
5837 ; return 0; }
5838 EOF
5839 if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5840   rm -rf conftest*
5841   eval "ac_cv_lib_$ac_lib_var=yes"
5842 else
5843   echo "configure: failed program was:" >&5
5844   cat conftest.$ac_ext >&5
5845   rm -rf conftest*
5846   eval "ac_cv_lib_$ac_lib_var=no"
5847 fi
5848 rm -f conftest*
5849 LIBS="$ac_save_LIBS"
5850
5851 fi
5852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5853   echo "$ac_t""yes" 1>&6
5854   have_k425=yes
5855                                 KRB4_LIBS="-lkrb4 -ldes425"
5856 else
5857   echo "$ac_t""no" 1>&6
5858 have_k425=no
5859 fi
5860
5861
5862                 elif test $krb5_impl = heimdal; then
5863                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5864 echo "configure:5865: checking for main in -lkrb4" >&5
5865 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5867   echo $ac_n "(cached) $ac_c" 1>&6
5868 else
5869   ac_save_LIBS="$LIBS"
5870 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5871 cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874
5875 int main() {
5876 main()
5877 ; return 0; }
5878 EOF
5879 if { (eval echo configure:5880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5880   rm -rf conftest*
5881   eval "ac_cv_lib_$ac_lib_var=yes"
5882 else
5883   echo "configure: failed program was:" >&5
5884   cat conftest.$ac_ext >&5
5885   rm -rf conftest*
5886   eval "ac_cv_lib_$ac_lib_var=no"
5887 fi
5888 rm -f conftest*
5889 LIBS="$ac_save_LIBS"
5890
5891 fi
5892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5893   echo "$ac_t""yes" 1>&6
5894   have_k425=yes
5895                                 KRB4_LIBS="-lkrb4"
5896 else
5897   echo "$ac_t""no" 1>&6
5898 have_k425=no
5899 fi
5900
5901
5902                 else
5903                         have_425=no
5904                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5905                 fi
5906
5907                 if test $have_k425 = yes ; then
5908                         ol_with_kerberos=found
5909                         ol_link_krb4=yes
5910
5911                         cat >> confdefs.h <<\EOF
5912 #define HAVE_KRB425 1
5913 EOF
5914
5915                         cat >> confdefs.h <<\EOF
5916 #define HAVE_KRB4 1
5917 EOF
5918
5919
5920                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5921 echo "configure:5922: checking for des_debug in Kerberos libraries" >&5
5922 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5923   echo $ac_n "(cached) $ac_c" 1>&6
5924 else
5925   
5926                                                                 save_LIBS="$LIBS"
5927                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5928                                 cat > conftest.$ac_ext <<EOF
5929 #line 5930 "configure"
5930 #include "confdefs.h"
5931
5932 #include <kerberosIV/krb.h>
5933 #include <kerberosIV/des.h>
5934 extern int des_debug;
5935
5936 int main() {
5937
5938 des_debug = 1;
5939
5940 ; return 0; }
5941 EOF
5942 if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5943   rm -rf conftest*
5944   ol_cv_var_des_debug=yes
5945 else
5946   echo "configure: failed program was:" >&5
5947   cat conftest.$ac_ext >&5
5948   rm -rf conftest*
5949   ol_cv_var_des_debug=no
5950 fi
5951 rm -f conftest*
5952                                                                 LIBS="$save_LIBS"
5953                         
5954 fi
5955
5956 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5957
5958                         if test $ol_cv_var_des_debug = yes ; then
5959                                 cat >> confdefs.h <<\EOF
5960 #define HAVE_DES_DEBUG 1
5961 EOF
5962
5963                         fi
5964
5965                         LIBS="$save_LIBS"
5966                 fi
5967         fi
5968 fi
5969
5970 if test $ol_link_krb5 = yes ; then
5971         ol_with_kerberos=found
5972 fi
5973
5974 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5975         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
5976
5977         for ac_hdr in krb.h des.h krb-archaeology.h 
5978 do
5979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5981 echo "configure:5982: checking for $ac_hdr" >&5
5982 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5983   echo $ac_n "(cached) $ac_c" 1>&6
5984 else
5985   cat > conftest.$ac_ext <<EOF
5986 #line 5987 "configure"
5987 #include "confdefs.h"
5988 #include <$ac_hdr>
5989 EOF
5990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5991 { (eval echo configure:5992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5993 if test -z "$ac_err"; then
5994   rm -rf conftest*
5995   eval "ac_cv_header_$ac_safe=yes"
5996 else
5997   echo "$ac_err" >&5
5998   echo "configure: failed program was:" >&5
5999   cat conftest.$ac_ext >&5
6000   rm -rf conftest*
6001   eval "ac_cv_header_$ac_safe=no"
6002 fi
6003 rm -f conftest*
6004 fi
6005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6006   echo "$ac_t""yes" 1>&6
6007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6008   cat >> confdefs.h <<EOF
6009 #define $ac_tr_hdr 1
6010 EOF
6011  
6012 else
6013   echo "$ac_t""no" 1>&6
6014 fi
6015 done
6016
6017
6018         if test $ac_cv_header_krb_h = yes ; then
6019                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6020 echo "configure:6021: checking for main in -lkrb" >&5
6021 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6022 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6023   echo $ac_n "(cached) $ac_c" 1>&6
6024 else
6025   ac_save_LIBS="$LIBS"
6026 LIBS="-lkrb -ldes $LIBS"
6027 cat > conftest.$ac_ext <<EOF
6028 #line 6029 "configure"
6029 #include "confdefs.h"
6030
6031 int main() {
6032 main()
6033 ; return 0; }
6034 EOF
6035 if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6036   rm -rf conftest*
6037   eval "ac_cv_lib_$ac_lib_var=yes"
6038 else
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   eval "ac_cv_lib_$ac_lib_var=no"
6043 fi
6044 rm -f conftest*
6045 LIBS="$ac_save_LIBS"
6046
6047 fi
6048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6049   echo "$ac_t""yes" 1>&6
6050   have_k4=yes
6051 else
6052   echo "$ac_t""no" 1>&6
6053 have_k4=no
6054 fi
6055
6056
6057                 if test $have_k4 = yes ; then
6058                         ol_with_kerberos=found
6059                         ol_link_krb4=yes
6060
6061                         cat >> confdefs.h <<\EOF
6062 #define HAVE_KRB4 1
6063 EOF
6064
6065
6066                         KRB4_LIBS="-lkrb -ldes"
6067
6068                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6069                                 cat >> confdefs.h <<\EOF
6070 #define HAVE_KTH_KERBEROS 1
6071 EOF
6072
6073                         fi
6074                 fi
6075         fi
6076 fi
6077
6078 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6079         ol_link_kpasswd=yes
6080 fi
6081
6082 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6083         ol_link_kbind=yes
6084
6085 elif test $ol_enable_kbind = yes ; then
6086         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6087 fi
6088
6089 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6090         cat >> confdefs.h <<\EOF
6091 #define HAVE_KERBEROS 1
6092 EOF
6093
6094
6095 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6096         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6097 fi
6098
6099 ol_link_tls=no
6100 if test $ol_with_tls != no ; then
6101         for ac_hdr in openssl/ssl.h ssl.h
6102 do
6103 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6104 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6105 echo "configure:6106: checking for $ac_hdr" >&5
6106 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6107   echo $ac_n "(cached) $ac_c" 1>&6
6108 else
6109   cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112 #include <$ac_hdr>
6113 EOF
6114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6115 { (eval echo configure:6116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6117 if test -z "$ac_err"; then
6118   rm -rf conftest*
6119   eval "ac_cv_header_$ac_safe=yes"
6120 else
6121   echo "$ac_err" >&5
6122   echo "configure: failed program was:" >&5
6123   cat conftest.$ac_ext >&5
6124   rm -rf conftest*
6125   eval "ac_cv_header_$ac_safe=no"
6126 fi
6127 rm -f conftest*
6128 fi
6129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6130   echo "$ac_t""yes" 1>&6
6131     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6132   cat >> confdefs.h <<EOF
6133 #define $ac_tr_hdr 1
6134 EOF
6135  
6136 else
6137   echo "$ac_t""no" 1>&6
6138 fi
6139 done
6140
6141         
6142         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6143                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6144 echo "configure:6145: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6145 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6147   echo $ac_n "(cached) $ac_c" 1>&6
6148 else
6149   ac_save_LIBS="$LIBS"
6150 LIBS="-lssl -lcrypto $LIBS"
6151 cat > conftest.$ac_ext <<EOF
6152 #line 6153 "configure"
6153 #include "confdefs.h"
6154 /* Override any gcc2 internal prototype to avoid an error.  */
6155 /* We use char because int might match the return type of a gcc2
6156     builtin and then its argument prototype would still apply.  */
6157 char SSLeay_add_ssl_algorithms();
6158
6159 int main() {
6160 SSLeay_add_ssl_algorithms()
6161 ; return 0; }
6162 EOF
6163 if { (eval echo configure:6164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6164   rm -rf conftest*
6165   eval "ac_cv_lib_$ac_lib_var=yes"
6166 else
6167   echo "configure: failed program was:" >&5
6168   cat conftest.$ac_ext >&5
6169   rm -rf conftest*
6170   eval "ac_cv_lib_$ac_lib_var=no"
6171 fi
6172 rm -f conftest*
6173 LIBS="$ac_save_LIBS"
6174
6175 fi
6176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6177   echo "$ac_t""yes" 1>&6
6178   have_ssleay=yes
6179                         need_rsaref=no
6180 else
6181   echo "$ac_t""no" 1>&6
6182 have_ssleay=no
6183 fi
6184
6185                         
6186                 if test $have_ssleay = no ; then
6187                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6188 echo "configure:6189: checking for SSL_library_init in -lssl" >&5
6189 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6191   echo $ac_n "(cached) $ac_c" 1>&6
6192 else
6193   ac_save_LIBS="$LIBS"
6194 LIBS="-lssl -lcrypto $LIBS"
6195 cat > conftest.$ac_ext <<EOF
6196 #line 6197 "configure"
6197 #include "confdefs.h"
6198 /* Override any gcc2 internal prototype to avoid an error.  */
6199 /* We use char because int might match the return type of a gcc2
6200     builtin and then its argument prototype would still apply.  */
6201 char SSL_library_init();
6202
6203 int main() {
6204 SSL_library_init()
6205 ; return 0; }
6206 EOF
6207 if { (eval echo configure:6208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6208   rm -rf conftest*
6209   eval "ac_cv_lib_$ac_lib_var=yes"
6210 else
6211   echo "configure: failed program was:" >&5
6212   cat conftest.$ac_ext >&5
6213   rm -rf conftest*
6214   eval "ac_cv_lib_$ac_lib_var=no"
6215 fi
6216 rm -f conftest*
6217 LIBS="$ac_save_LIBS"
6218
6219 fi
6220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6221   echo "$ac_t""yes" 1>&6
6222   have_ssleay=yes
6223                                 need_rsaref=no
6224 else
6225   echo "$ac_t""no" 1>&6
6226 have_ssleay=no
6227 fi
6228
6229                 fi
6230
6231                 if test $have_ssleay = no ; then
6232                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6233 echo "configure:6234: checking for ssl3_accept in -lssl" >&5
6234 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6236   echo $ac_n "(cached) $ac_c" 1>&6
6237 else
6238   ac_save_LIBS="$LIBS"
6239 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6240 cat > conftest.$ac_ext <<EOF
6241 #line 6242 "configure"
6242 #include "confdefs.h"
6243 /* Override any gcc2 internal prototype to avoid an error.  */
6244 /* We use char because int might match the return type of a gcc2
6245     builtin and then its argument prototype would still apply.  */
6246 char ssl3_accept();
6247
6248 int main() {
6249 ssl3_accept()
6250 ; return 0; }
6251 EOF
6252 if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6253   rm -rf conftest*
6254   eval "ac_cv_lib_$ac_lib_var=yes"
6255 else
6256   echo "configure: failed program was:" >&5
6257   cat conftest.$ac_ext >&5
6258   rm -rf conftest*
6259   eval "ac_cv_lib_$ac_lib_var=no"
6260 fi
6261 rm -f conftest*
6262 LIBS="$ac_save_LIBS"
6263
6264 fi
6265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6266   echo "$ac_t""yes" 1>&6
6267   have_ssleay=yes
6268                                 need_rsaref=yes
6269 else
6270   echo "$ac_t""no" 1>&6
6271 have_ssleay=no
6272 fi
6273
6274                 fi
6275
6276                 if test $have_ssleay = yes ; then
6277                         ol_with_tls=found
6278                         ol_link_tls=yes
6279
6280                         cat >> confdefs.h <<\EOF
6281 #define HAVE_SSLEAY 1
6282 EOF
6283
6284
6285                         if test $need_rsaref = yes; then
6286                                 cat >> confdefs.h <<\EOF
6287 #define HAVE_RSAREF 1
6288 EOF
6289
6290
6291                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6292                         else
6293                                 TLS_LIBS="-lssl -lcrypto"
6294                         fi
6295                 fi
6296         fi
6297
6298 else
6299         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6300 fi
6301
6302 if test $ol_link_tls = yes ; then
6303         cat >> confdefs.h <<\EOF
6304 #define HAVE_TLS 1
6305 EOF
6306
6307
6308 elif test $ol_with_tls = auto ; then
6309         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6310         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6311
6312 elif test $ol_with_tls != no ; then
6313         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6314 fi
6315
6316 for ac_func in \
6317         ctime_r                 \
6318         gethostbyname_r gethostbyaddr_r \
6319
6320 do
6321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6322 echo "configure:6323: checking for $ac_func" >&5
6323 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6324   echo $ac_n "(cached) $ac_c" 1>&6
6325 else
6326   cat > conftest.$ac_ext <<EOF
6327 #line 6328 "configure"
6328 #include "confdefs.h"
6329 /* System header to define __stub macros and hopefully few prototypes,
6330     which can conflict with char $ac_func(); below.  */
6331 #include <assert.h>
6332 /* Override any gcc2 internal prototype to avoid an error.  */
6333 /* We use char because int might match the return type of a gcc2
6334     builtin and then its argument prototype would still apply.  */
6335 char $ac_func();
6336 char (*f)();
6337
6338 int main() {
6339
6340 /* The GNU C library defines this for functions which it implements
6341     to always fail with ENOSYS.  Some functions are actually named
6342     something starting with __ and the normal name is an alias.  */
6343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6344 choke me
6345 #else
6346 f = $ac_func;
6347 #endif
6348
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_func_$ac_func=yes"
6354 else
6355   echo "configure: failed program was:" >&5
6356   cat conftest.$ac_ext >&5
6357   rm -rf conftest*
6358   eval "ac_cv_func_$ac_func=no"
6359 fi
6360 rm -f conftest*
6361 fi
6362
6363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6364   echo "$ac_t""yes" 1>&6
6365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6366   cat >> confdefs.h <<EOF
6367 #define $ac_tr_func 1
6368 EOF
6369  
6370 else
6371   echo "$ac_t""no" 1>&6
6372 fi
6373 done
6374
6375
6376 if test "$ac_cv_func_ctime_r" = no ; then
6377         ol_cv_func_ctime_r_nargs=0
6378 else
6379         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6380 echo "configure:6381: checking number of arguments of ctime_r" >&5
6381 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6382   echo $ac_n "(cached) $ac_c" 1>&6
6383 else
6384   cat > conftest.$ac_ext <<EOF
6385 #line 6386 "configure"
6386 #include "confdefs.h"
6387 #include <time.h>
6388 int main() {
6389 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6390 ; return 0; }
6391 EOF
6392 if { (eval echo configure:6393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6393   rm -rf conftest*
6394   ol_cv_func_ctime_r_nargs3=yes
6395 else
6396   echo "configure: failed program was:" >&5
6397   cat conftest.$ac_ext >&5
6398   rm -rf conftest*
6399   ol_cv_func_ctime_r_nargs3=no
6400 fi
6401 rm -f conftest*
6402
6403         cat > conftest.$ac_ext <<EOF
6404 #line 6405 "configure"
6405 #include "confdefs.h"
6406 #include <time.h>
6407 int main() {
6408 time_t ti; char *buffer; ctime_r(&ti,buffer);
6409 ; return 0; }
6410 EOF
6411 if { (eval echo configure:6412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6412   rm -rf conftest*
6413   ol_cv_func_ctime_r_nargs2=yes
6414 else
6415   echo "configure: failed program was:" >&5
6416   cat conftest.$ac_ext >&5
6417   rm -rf conftest*
6418   ol_cv_func_ctime_r_nargs2=no
6419 fi
6420 rm -f conftest*
6421
6422         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6423                 $ol_cv_func_ctime_r_nargs2 = no ; then
6424
6425                 ol_cv_func_ctime_r_nargs=3
6426
6427         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6428                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6429
6430                 ol_cv_func_ctime_r_nargs=2
6431
6432         else
6433                 ol_cv_func_ctime_r_nargs=0
6434         fi
6435   
6436 fi
6437
6438 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6439
6440   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6441         cat >> confdefs.h <<EOF
6442 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6443 EOF
6444
6445   fi
6446
6447 fi
6448
6449 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6450         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6451 echo "configure:6452: checking number of arguments of gethostbyname_r" >&5
6452 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6453   echo $ac_n "(cached) $ac_c" 1>&6
6454 else
6455   cat > conftest.$ac_ext <<EOF
6456 #line 6457 "configure"
6457 #include "confdefs.h"
6458 #include <sys/types.h>
6459 #include <sys/socket.h>
6460 #include <netinet/in.h>
6461 #include <netdb.h>
6462 #define BUFSIZE (sizeof(struct hostent)+10)
6463 int main() {
6464 struct hostent hent; char buffer[BUFSIZE];
6465                 int bufsize=BUFSIZE;int h_errno;
6466                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6467                         buffer, bufsize, &h_errno);
6468 ; return 0; }
6469 EOF
6470 if { (eval echo configure:6471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6471   rm -rf conftest*
6472   ol_cv_func_gethostbyname_r_nargs5=yes
6473 else
6474   echo "configure: failed program was:" >&5
6475   cat conftest.$ac_ext >&5
6476   rm -rf conftest*
6477   ol_cv_func_gethostbyname_r_nargs5=no
6478 fi
6479 rm -f conftest*
6480
6481         cat > conftest.$ac_ext <<EOF
6482 #line 6483 "configure"
6483 #include "confdefs.h"
6484 #include <sys/types.h>
6485 #include <sys/socket.h>
6486 #include <netinet/in.h>
6487 #include <netdb.h>
6488 #define BUFSIZE (sizeof(struct hostent)+10)
6489 int main() {
6490 struct hostent hent;struct hostent *rhent;
6491                 char buffer[BUFSIZE];
6492                 int bufsize=BUFSIZE;int h_errno;
6493                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6494                         &rhent, &h_errno);
6495 ; return 0; }
6496 EOF
6497 if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6498   rm -rf conftest*
6499   ol_cv_func_gethostbyname_r_nargs6=yes
6500 else
6501   echo "configure: failed program was:" >&5
6502   cat conftest.$ac_ext >&5
6503   rm -rf conftest*
6504   ol_cv_func_gethostbyname_r_nargs6=no
6505 fi
6506 rm -f conftest*
6507
6508         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6509                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6510
6511                 ol_cv_func_gethostbyname_r_nargs=5
6512
6513         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6514                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6515
6516                 ol_cv_func_gethostbyname_r_nargs=6
6517
6518         else
6519                 ol_cv_func_gethostbyname_r_nargs=0
6520         fi
6521   
6522 fi
6523
6524 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6525   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6526         cat >> confdefs.h <<EOF
6527 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6528 EOF
6529
6530   fi
6531
6532 else
6533         ol_cv_func_gethostbyname_r_nargs=0
6534 fi
6535  
6536 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6537         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6538 echo "configure:6539: checking number of arguments of gethostbyaddr_r" >&5
6539 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6540   echo $ac_n "(cached) $ac_c" 1>&6
6541 else
6542   cat > conftest.$ac_ext <<EOF
6543 #line 6544 "configure"
6544 #include "confdefs.h"
6545 #include <sys/types.h>
6546 #include <sys/socket.h>
6547 #include <netinet/in.h>
6548 #include <netdb.h>
6549 #define BUFSIZE (sizeof(struct hostent)+10)
6550 int main() {
6551 struct hostent hent; char buffer[BUFSIZE]; 
6552             struct in_addr add;
6553             size_t alen=sizeof(struct in_addr);
6554             int bufsize=BUFSIZE;int h_errno;
6555                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6556                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6557 ; return 0; }
6558 EOF
6559 if { (eval echo configure:6560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6560   rm -rf conftest*
6561   ol_cv_func_gethostbyaddr_r_nargs7=yes
6562 else
6563   echo "configure: failed program was:" >&5
6564   cat conftest.$ac_ext >&5
6565   rm -rf conftest*
6566   ol_cv_func_gethostbyaddr_r_nargs7=no
6567 fi
6568 rm -f conftest*
6569
6570         cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573 #include <sys/types.h>
6574 #include <sys/socket.h>
6575 #include <netinet/in.h>
6576 #include <netdb.h>
6577 #define BUFSIZE (sizeof(struct hostent)+10)
6578 int main() {
6579 struct hostent hent;
6580                 struct hostent *rhent; char buffer[BUFSIZE]; 
6581                 struct in_addr add;
6582                 size_t alen=sizeof(struct in_addr);
6583                 int bufsize=BUFSIZE;int h_errno;
6584                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6585                         alen, AF_INET, &hent, buffer, bufsize, 
6586                         &rhent, &h_errno);
6587 ; return 0; }
6588 EOF
6589 if { (eval echo configure:6590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6590   rm -rf conftest*
6591   ol_cv_func_gethostbyaddr_r_nargs8=yes
6592 else
6593   echo "configure: failed program was:" >&5
6594   cat conftest.$ac_ext >&5
6595   rm -rf conftest*
6596   ol_cv_func_gethostbyaddr_r_nargs8=no
6597 fi
6598 rm -f conftest*
6599
6600         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6601                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6602
6603                 ol_cv_func_gethostbyaddr_r_nargs=7
6604
6605         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6606                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6607
6608                 ol_cv_func_gethostbyaddr_r_nargs=8
6609
6610         else
6611                 ol_cv_func_gethostbyaddr_r_nargs=0
6612         fi
6613   
6614 fi
6615
6616 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6617   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6618     cat >> confdefs.h <<EOF
6619 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6620 EOF
6621
6622   fi
6623
6624 else
6625         ol_cv_func_gethostbyaddr_r_nargs=0
6626 fi
6627
6628 if test "$ac_cv_func_ctime_r" = yes \
6629         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6630         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6631         -a "$ac_cv_func_gethostbyname_r" = yes \
6632         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6633         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6634         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6635         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6636         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6637         ; then
6638  
6639         cat >> confdefs.h <<\EOF
6640 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6641 EOF
6642
6643 fi
6644
6645 ol_link_threads=no
6646
6647 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6648         -o $ol_with_threads = nt ; then
6649
6650         
6651         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6652 echo "configure:6653: checking for NT Threads" >&5
6653 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6654   echo $ac_n "(cached) $ac_c" 1>&6
6655 else
6656   
6657                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6658 echo "configure:6659: checking for _beginthread" >&5
6659 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6660   echo $ac_n "(cached) $ac_c" 1>&6
6661 else
6662   cat > conftest.$ac_ext <<EOF
6663 #line 6664 "configure"
6664 #include "confdefs.h"
6665 /* System header to define __stub macros and hopefully few prototypes,
6666     which can conflict with char _beginthread(); below.  */
6667 #include <assert.h>
6668 /* Override any gcc2 internal prototype to avoid an error.  */
6669 /* We use char because int might match the return type of a gcc2
6670     builtin and then its argument prototype would still apply.  */
6671 char _beginthread();
6672 char (*f)();
6673
6674 int main() {
6675
6676 /* The GNU C library defines this for functions which it implements
6677     to always fail with ENOSYS.  Some functions are actually named
6678     something starting with __ and the normal name is an alias.  */
6679 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6680 choke me
6681 #else
6682 f = _beginthread;
6683 #endif
6684
6685 ; return 0; }
6686 EOF
6687 if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6688   rm -rf conftest*
6689   eval "ac_cv_func__beginthread=yes"
6690 else
6691   echo "configure: failed program was:" >&5
6692   cat conftest.$ac_ext >&5
6693   rm -rf conftest*
6694   eval "ac_cv_func__beginthread=no"
6695 fi
6696 rm -f conftest*
6697 fi
6698
6699 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6700   echo "$ac_t""yes" 1>&6
6701   ol_cv_nt_threads=yes
6702 else
6703   echo "$ac_t""no" 1>&6
6704 ol_cv_nt_threads=no
6705 fi
6706
6707         
6708 fi
6709
6710 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6711
6712         if test $ol_cv_nt_threads = yes ; then
6713                 cat >> confdefs.h <<\EOF
6714 #define HAVE_NT_THREADS 1
6715 EOF
6716
6717         fi
6718
6719
6720         if test "$ol_cv_nt_threads" = yes ; then
6721         ol_link_threads=nt
6722         ol_with_threads=found
6723         ol_with_yielding_select=yes
6724
6725                 cat >> confdefs.h <<\EOF
6726 #define HAVE_NT_SERVICE_MANAGER 1
6727 EOF
6728
6729                 cat >> confdefs.h <<\EOF
6730 #define HAVE_NT_EVENT_LOG 1
6731 EOF
6732
6733         fi
6734
6735         if test $ol_with_threads = nt ; then
6736                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6737         fi
6738 fi
6739
6740 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6741         -o $ol_with_threads = posix ; then
6742
6743         for ac_hdr in pthread.h
6744 do
6745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6747 echo "configure:6748: checking for $ac_hdr" >&5
6748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6749   echo $ac_n "(cached) $ac_c" 1>&6
6750 else
6751   cat > conftest.$ac_ext <<EOF
6752 #line 6753 "configure"
6753 #include "confdefs.h"
6754 #include <$ac_hdr>
6755 EOF
6756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6757 { (eval echo configure:6758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6759 if test -z "$ac_err"; then
6760   rm -rf conftest*
6761   eval "ac_cv_header_$ac_safe=yes"
6762 else
6763   echo "$ac_err" >&5
6764   echo "configure: failed program was:" >&5
6765   cat conftest.$ac_ext >&5
6766   rm -rf conftest*
6767   eval "ac_cv_header_$ac_safe=no"
6768 fi
6769 rm -f conftest*
6770 fi
6771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6772   echo "$ac_t""yes" 1>&6
6773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6774   cat >> confdefs.h <<EOF
6775 #define $ac_tr_hdr 1
6776 EOF
6777  
6778 else
6779   echo "$ac_t""no" 1>&6
6780 fi
6781 done
6782
6783
6784         if test $ac_cv_header_pthread_h = yes ; then
6785                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6786 echo "configure:6787: checking POSIX thread version" >&5
6787 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   
6791         cat > conftest.$ac_ext <<EOF
6792 #line 6793 "configure"
6793 #include "confdefs.h"
6794
6795 #               include <pthread.h>
6796                 /* this check could be improved */
6797 #               ifdef PTHREAD_ONCE_INIT
6798                         pthread_version_final;
6799 #               endif
6800         
6801 EOF
6802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6803   egrep "pthread_version_final" >/dev/null 2>&1; then
6804   rm -rf conftest*
6805   ol_pthread_final=yes
6806 else
6807   rm -rf conftest*
6808   ol_pthread_final=no
6809 fi
6810 rm -f conftest*
6811
6812
6813         cat > conftest.$ac_ext <<EOF
6814 #line 6815 "configure"
6815 #include "confdefs.h"
6816
6817 #               include <pthread.h>
6818                 /* this check could be improved */
6819 #               ifdef pthread_once_init
6820                         pthread_version_draft4;
6821 #               endif
6822         
6823 EOF
6824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6825   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6826   rm -rf conftest*
6827   ol_pthread_draft4=yes
6828 else
6829   rm -rf conftest*
6830   ol_pthread_draft4=no
6831 fi
6832 rm -f conftest*
6833
6834
6835         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6836                 ol_cv_pthread_version=final
6837         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6838                 ol_cv_pthread_version=draft4
6839         else
6840                 ol_cv_pthread_version=unknown
6841         fi
6842
6843 fi
6844
6845 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6846
6847
6848                 if test $ol_cv_pthread_version = final ; then
6849                         cat >> confdefs.h <<\EOF
6850 #define HAVE_PTHREADS_FINAL 1
6851 EOF
6852
6853                 elif test $ol_cv_pthread_version = draft4 ; then
6854                         cat >> confdefs.h <<\EOF
6855 #define HAVE_PTHREADS_D4 1
6856 EOF
6857
6858                 else
6859                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6860                 fi
6861
6862                 # consider threads found
6863                 ol_with_threads=found
6864
6865                 
6866         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6867 echo "configure:6868: checking for LinuxThreads pthread.h" >&5
6868 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6869   echo $ac_n "(cached) $ac_c" 1>&6
6870 else
6871   cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874 #include <pthread.h>
6875 EOF
6876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6877   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6878   rm -rf conftest*
6879   ol_cv_header_linux_threads=yes
6880 else
6881   rm -rf conftest*
6882   ol_cv_header_linux_threads=no
6883 fi
6884 rm -f conftest*
6885
6886                 
6887 fi
6888
6889 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6890         if test $ol_cv_header_linux_threads = yes; then
6891                 cat >> confdefs.h <<\EOF
6892 #define HAVE_LINUX_THREADS 1
6893 EOF
6894
6895         fi
6896
6897                 
6898         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6899 echo "configure:6900: checking for GNU Pth pthread.h" >&5
6900 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6901   echo $ac_n "(cached) $ac_c" 1>&6
6902 else
6903   cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906 #include <pthread.h>
6907 #ifdef _POSIX_THREAD_IS_GNU_PTH
6908         __gnu_pth__;
6909 #endif
6910
6911 EOF
6912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6913   egrep "__gnu_pth__" >/dev/null 2>&1; then
6914   rm -rf conftest*
6915   ol_cv_header_gnu_pth_pthread_h=yes
6916 else
6917   rm -rf conftest*
6918   ol_cv_header_gnu_pth_pthread_h=no
6919 fi
6920 rm -f conftest*
6921
6922                 
6923 fi
6924
6925 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6926
6927
6928                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6929                         for ac_hdr in sched.h
6930 do
6931 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6932 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6933 echo "configure:6934: checking for $ac_hdr" >&5
6934 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6935   echo $ac_n "(cached) $ac_c" 1>&6
6936 else
6937   cat > conftest.$ac_ext <<EOF
6938 #line 6939 "configure"
6939 #include "confdefs.h"
6940 #include <$ac_hdr>
6941 EOF
6942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6943 { (eval echo configure:6944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6945 if test -z "$ac_err"; then
6946   rm -rf conftest*
6947   eval "ac_cv_header_$ac_safe=yes"
6948 else
6949   echo "$ac_err" >&5
6950   echo "configure: failed program was:" >&5
6951   cat conftest.$ac_ext >&5
6952   rm -rf conftest*
6953   eval "ac_cv_header_$ac_safe=no"
6954 fi
6955 rm -f conftest*
6956 fi
6957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6958   echo "$ac_t""yes" 1>&6
6959     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6960   cat >> confdefs.h <<EOF
6961 #define $ac_tr_hdr 1
6962 EOF
6963  
6964 else
6965   echo "$ac_t""no" 1>&6
6966 fi
6967 done
6968
6969                 fi
6970
6971                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6972                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6973 echo "configure:6974: checking for pthread_create in default libraries" >&5
6974 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6975   echo $ac_n "(cached) $ac_c" 1>&6
6976 else
6977   
6978                 if test "$cross_compiling" = yes; then
6979   cat > conftest.$ac_ext <<EOF
6980 #line 6981 "configure"
6981 #include "confdefs.h"
6982 /* pthread test headers */
6983 #include <pthread.h>
6984 #ifndef NULL
6985 #define NULL (void*)0
6986 #endif
6987
6988 static void *task(p)
6989         void *p;
6990 {
6991         return (void *) (p == NULL);
6992 }
6993
6994 int main() {
6995
6996         /* pthread test function */
6997         pthread_t t;
6998         int status;
6999 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7000         /* This system (e.g. AIX) defaults detached; must override */
7001         pthread_attr_t attr;
7002
7003         status = pthread_attr_init(&attr);
7004         if( status ) exit( status );
7005
7006         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7007         if( status ) exit( status );
7008
7009 #define ATTR    &attr
7010 #else
7011 #if HAVE_PTHREADS_D4
7012 #define ATTR    pthread_attr_default
7013 #else
7014 #define ATTR    NULL
7015 #endif
7016 #endif
7017         /* make sure pthread_create() isn't just a stub */
7018         status = pthread_create(&t, ATTR, task, NULL);
7019         if( status ) exit( status );
7020
7021         /* make sure pthread_detach() isn't just a stub */
7022 #if HAVE_PTHREADS_D4
7023         status = pthread_detach( &t );
7024 #else
7025         status = pthread_detach( t );
7026 #endif
7027
7028 #ifdef HAVE_LINUX_THREADS
7029         pthread_kill_other_threads_np();
7030 #endif
7031
7032         exit( status );
7033
7034 ; return 0; }
7035 EOF
7036 if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7037   rm -rf conftest*
7038   ol_cv_pthread_create=yes
7039 else
7040   echo "configure: failed program was:" >&5
7041   cat conftest.$ac_ext >&5
7042   rm -rf conftest*
7043   ol_cv_pthread_create=no
7044 fi
7045 rm -f conftest*
7046 else
7047   cat > conftest.$ac_ext <<EOF
7048 #line 7049 "configure"
7049 #include "confdefs.h"
7050 /* pthread test headers */
7051 #include <pthread.h>
7052 #ifndef NULL
7053 #define NULL (void*)0
7054 #endif
7055
7056 static void *task(p)
7057         void *p;
7058 {
7059         return (void *) (p == NULL);
7060 }
7061
7062
7063 int main(argc, argv)
7064         int argc;
7065         char **argv;
7066 {
7067
7068         /* pthread test function */
7069         pthread_t t;
7070         int status;
7071 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7072         /* This system (e.g. AIX) defaults detached; must override */
7073         pthread_attr_t attr;
7074
7075         status = pthread_attr_init(&attr);
7076         if( status ) exit( status );
7077
7078         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7079         if( status ) exit( status );
7080
7081 #define ATTR    &attr
7082 #else
7083 #if HAVE_PTHREADS_D4
7084 #define ATTR    pthread_attr_default
7085 #else
7086 #define ATTR    NULL
7087 #endif
7088 #endif
7089         /* make sure pthread_create() isn't just a stub */
7090         status = pthread_create(&t, ATTR, task, NULL);
7091         if( status ) exit( status );
7092
7093         /* make sure pthread_detach() isn't just a stub */
7094 #if HAVE_PTHREADS_D4
7095         status = pthread_detach( &t );
7096 #else
7097         status = pthread_detach( t );
7098 #endif
7099
7100 #ifdef HAVE_LINUX_THREADS
7101         pthread_kill_other_threads_np();
7102 #endif
7103
7104         exit( status );
7105
7106 }
7107
7108 EOF
7109 if { (eval echo configure:7110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7110 then
7111   ol_cv_pthread_create=yes
7112 else
7113   echo "configure: failed program was:" >&5
7114   cat conftest.$ac_ext >&5
7115   rm -fr conftest*
7116   ol_cv_pthread_create=no
7117 fi
7118 rm -fr conftest*
7119 fi
7120
7121 fi
7122
7123 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7124
7125                 if test $ol_cv_pthread_create != no ; then
7126                         ol_link_threads=posix
7127                         ol_link_pthreads=""
7128                 fi
7129                 
7130                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7131 if test "$ol_link_threads" = no ; then
7132         # try -kthread
7133         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7134 echo "configure:7135: checking for pthread link with -kthread" >&5
7135 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7136   echo $ac_n "(cached) $ac_c" 1>&6
7137 else
7138   
7139                 # save the flags
7140                 ol_LIBS="$LIBS"
7141                 LIBS="-kthread $LIBS"
7142
7143                 if test "$cross_compiling" = yes; then
7144   cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* pthread test headers */
7148 #include <pthread.h>
7149 #ifndef NULL
7150 #define NULL (void*)0
7151 #endif
7152
7153 static void *task(p)
7154         void *p;
7155 {
7156         return (void *) (p == NULL);
7157 }
7158
7159 int main() {
7160
7161         /* pthread test function */
7162         pthread_t t;
7163         int status;
7164 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7165         /* This system (e.g. AIX) defaults detached; must override */
7166         pthread_attr_t attr;
7167
7168         status = pthread_attr_init(&attr);
7169         if( status ) exit( status );
7170
7171         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7172         if( status ) exit( status );
7173
7174 #define ATTR    &attr
7175 #else
7176 #if HAVE_PTHREADS_D4
7177 #define ATTR    pthread_attr_default
7178 #else
7179 #define ATTR    NULL
7180 #endif
7181 #endif
7182         /* make sure pthread_create() isn't just a stub */
7183         status = pthread_create(&t, ATTR, task, NULL);
7184         if( status ) exit( status );
7185
7186         /* make sure pthread_detach() isn't just a stub */
7187 #if HAVE_PTHREADS_D4
7188         status = pthread_detach( &t );
7189 #else
7190         status = pthread_detach( t );
7191 #endif
7192
7193 #ifdef HAVE_LINUX_THREADS
7194         pthread_kill_other_threads_np();
7195 #endif
7196
7197         exit( status );
7198
7199 ; return 0; }
7200 EOF
7201 if { (eval echo configure:7202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7202   rm -rf conftest*
7203   ol_cv_pthread_kthread=yes
7204 else
7205   echo "configure: failed program was:" >&5
7206   cat conftest.$ac_ext >&5
7207   rm -rf conftest*
7208   ol_cv_pthread_kthread=no
7209 fi
7210 rm -f conftest*
7211 else
7212   cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 /* pthread test headers */
7216 #include <pthread.h>
7217 #ifndef NULL
7218 #define NULL (void*)0
7219 #endif
7220
7221 static void *task(p)
7222         void *p;
7223 {
7224         return (void *) (p == NULL);
7225 }
7226
7227
7228 int main(argc, argv)
7229         int argc;
7230         char **argv;
7231 {
7232
7233         /* pthread test function */
7234         pthread_t t;
7235         int status;
7236 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7237         /* This system (e.g. AIX) defaults detached; must override */
7238         pthread_attr_t attr;
7239
7240         status = pthread_attr_init(&attr);
7241         if( status ) exit( status );
7242
7243         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7244         if( status ) exit( status );
7245
7246 #define ATTR    &attr
7247 #else
7248 #if HAVE_PTHREADS_D4
7249 #define ATTR    pthread_attr_default
7250 #else
7251 #define ATTR    NULL
7252 #endif
7253 #endif
7254         /* make sure pthread_create() isn't just a stub */
7255         status = pthread_create(&t, ATTR, task, NULL);
7256         if( status ) exit( status );
7257
7258         /* make sure pthread_detach() isn't just a stub */
7259 #if HAVE_PTHREADS_D4
7260         status = pthread_detach( &t );
7261 #else
7262         status = pthread_detach( t );
7263 #endif
7264
7265 #ifdef HAVE_LINUX_THREADS
7266         pthread_kill_other_threads_np();
7267 #endif
7268
7269         exit( status );
7270
7271 }
7272
7273 EOF
7274 if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7275 then
7276   ol_cv_pthread_kthread=yes
7277 else
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -fr conftest*
7281   ol_cv_pthread_kthread=no
7282 fi
7283 rm -fr conftest*
7284 fi
7285
7286
7287                 # restore the LIBS
7288                 LIBS="$ol_LIBS"
7289         
7290 fi
7291
7292 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7293
7294         if test $ol_cv_pthread_kthread = yes ; then
7295                 ol_link_pthreads="-kthread"
7296                 ol_link_threads=posix
7297         fi
7298 fi
7299
7300                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7301 if test "$ol_link_threads" = no ; then
7302         # try -pthread
7303         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7304 echo "configure:7305: checking for pthread link with -pthread" >&5
7305 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7306   echo $ac_n "(cached) $ac_c" 1>&6
7307 else
7308   
7309                 # save the flags
7310                 ol_LIBS="$LIBS"
7311                 LIBS="-pthread $LIBS"
7312
7313                 if test "$cross_compiling" = yes; then
7314   cat > conftest.$ac_ext <<EOF
7315 #line 7316 "configure"
7316 #include "confdefs.h"
7317 /* pthread test headers */
7318 #include <pthread.h>
7319 #ifndef NULL
7320 #define NULL (void*)0
7321 #endif
7322
7323 static void *task(p)
7324         void *p;
7325 {
7326         return (void *) (p == NULL);
7327 }
7328
7329 int main() {
7330
7331         /* pthread test function */
7332         pthread_t t;
7333         int status;
7334 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7335         /* This system (e.g. AIX) defaults detached; must override */
7336         pthread_attr_t attr;
7337
7338         status = pthread_attr_init(&attr);
7339         if( status ) exit( status );
7340
7341         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7342         if( status ) exit( status );
7343
7344 #define ATTR    &attr
7345 #else
7346 #if HAVE_PTHREADS_D4
7347 #define ATTR    pthread_attr_default
7348 #else
7349 #define ATTR    NULL
7350 #endif
7351 #endif
7352         /* make sure pthread_create() isn't just a stub */
7353         status = pthread_create(&t, ATTR, task, NULL);
7354         if( status ) exit( status );
7355
7356         /* make sure pthread_detach() isn't just a stub */
7357 #if HAVE_PTHREADS_D4
7358         status = pthread_detach( &t );
7359 #else
7360         status = pthread_detach( t );
7361 #endif
7362
7363 #ifdef HAVE_LINUX_THREADS
7364         pthread_kill_other_threads_np();
7365 #endif
7366
7367         exit( status );
7368
7369 ; return 0; }
7370 EOF
7371 if { (eval echo configure:7372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7372   rm -rf conftest*
7373   ol_cv_pthread_pthread=yes
7374 else
7375   echo "configure: failed program was:" >&5
7376   cat conftest.$ac_ext >&5
7377   rm -rf conftest*
7378   ol_cv_pthread_pthread=no
7379 fi
7380 rm -f conftest*
7381 else
7382   cat > conftest.$ac_ext <<EOF
7383 #line 7384 "configure"
7384 #include "confdefs.h"
7385 /* pthread test headers */
7386 #include <pthread.h>
7387 #ifndef NULL
7388 #define NULL (void*)0
7389 #endif
7390
7391 static void *task(p)
7392         void *p;
7393 {
7394         return (void *) (p == NULL);
7395 }
7396
7397
7398 int main(argc, argv)
7399         int argc;
7400         char **argv;
7401 {
7402
7403         /* pthread test function */
7404         pthread_t t;
7405         int status;
7406 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7407         /* This system (e.g. AIX) defaults detached; must override */
7408         pthread_attr_t attr;
7409
7410         status = pthread_attr_init(&attr);
7411         if( status ) exit( status );
7412
7413         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7414         if( status ) exit( status );
7415
7416 #define ATTR    &attr
7417 #else
7418 #if HAVE_PTHREADS_D4
7419 #define ATTR    pthread_attr_default
7420 #else
7421 #define ATTR    NULL
7422 #endif
7423 #endif
7424         /* make sure pthread_create() isn't just a stub */
7425         status = pthread_create(&t, ATTR, task, NULL);
7426         if( status ) exit( status );
7427
7428         /* make sure pthread_detach() isn't just a stub */
7429 #if HAVE_PTHREADS_D4
7430         status = pthread_detach( &t );
7431 #else
7432         status = pthread_detach( t );
7433 #endif
7434
7435 #ifdef HAVE_LINUX_THREADS
7436         pthread_kill_other_threads_np();
7437 #endif
7438
7439         exit( status );
7440
7441 }
7442
7443 EOF
7444 if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7445 then
7446   ol_cv_pthread_pthread=yes
7447 else
7448   echo "configure: failed program was:" >&5
7449   cat conftest.$ac_ext >&5
7450   rm -fr conftest*
7451   ol_cv_pthread_pthread=no
7452 fi
7453 rm -fr conftest*
7454 fi
7455
7456
7457                 # restore the LIBS
7458                 LIBS="$ol_LIBS"
7459         
7460 fi
7461
7462 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7463
7464         if test $ol_cv_pthread_pthread = yes ; then
7465                 ol_link_pthreads="-pthread"
7466                 ol_link_threads=posix
7467         fi
7468 fi
7469
7470                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7471 if test "$ol_link_threads" = no ; then
7472         # try -pthreads
7473         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7474 echo "configure:7475: checking for pthread link with -pthreads" >&5
7475 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7476   echo $ac_n "(cached) $ac_c" 1>&6
7477 else
7478   
7479                 # save the flags
7480                 ol_LIBS="$LIBS"
7481                 LIBS="-pthreads $LIBS"
7482
7483                 if test "$cross_compiling" = yes; then
7484   cat > conftest.$ac_ext <<EOF
7485 #line 7486 "configure"
7486 #include "confdefs.h"
7487 /* pthread test headers */
7488 #include <pthread.h>
7489 #ifndef NULL
7490 #define NULL (void*)0
7491 #endif
7492
7493 static void *task(p)
7494         void *p;
7495 {
7496         return (void *) (p == NULL);
7497 }
7498
7499 int main() {
7500
7501         /* pthread test function */
7502         pthread_t t;
7503         int status;
7504 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7505         /* This system (e.g. AIX) defaults detached; must override */
7506         pthread_attr_t attr;
7507
7508         status = pthread_attr_init(&attr);
7509         if( status ) exit( status );
7510
7511         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7512         if( status ) exit( status );
7513
7514 #define ATTR    &attr
7515 #else
7516 #if HAVE_PTHREADS_D4
7517 #define ATTR    pthread_attr_default
7518 #else
7519 #define ATTR    NULL
7520 #endif
7521 #endif
7522         /* make sure pthread_create() isn't just a stub */
7523         status = pthread_create(&t, ATTR, task, NULL);
7524         if( status ) exit( status );
7525
7526         /* make sure pthread_detach() isn't just a stub */
7527 #if HAVE_PTHREADS_D4
7528         status = pthread_detach( &t );
7529 #else
7530         status = pthread_detach( t );
7531 #endif
7532
7533 #ifdef HAVE_LINUX_THREADS
7534         pthread_kill_other_threads_np();
7535 #endif
7536
7537         exit( status );
7538
7539 ; return 0; }
7540 EOF
7541 if { (eval echo configure:7542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7542   rm -rf conftest*
7543   ol_cv_pthread_pthreads=yes
7544 else
7545   echo "configure: failed program was:" >&5
7546   cat conftest.$ac_ext >&5
7547   rm -rf conftest*
7548   ol_cv_pthread_pthreads=no
7549 fi
7550 rm -f conftest*
7551 else
7552   cat > conftest.$ac_ext <<EOF
7553 #line 7554 "configure"
7554 #include "confdefs.h"
7555 /* pthread test headers */
7556 #include <pthread.h>
7557 #ifndef NULL
7558 #define NULL (void*)0
7559 #endif
7560
7561 static void *task(p)
7562         void *p;
7563 {
7564         return (void *) (p == NULL);
7565 }
7566
7567
7568 int main(argc, argv)
7569         int argc;
7570         char **argv;
7571 {
7572
7573         /* pthread test function */
7574         pthread_t t;
7575         int status;
7576 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7577         /* This system (e.g. AIX) defaults detached; must override */
7578         pthread_attr_t attr;
7579
7580         status = pthread_attr_init(&attr);
7581         if( status ) exit( status );
7582
7583         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7584         if( status ) exit( status );
7585
7586 #define ATTR    &attr
7587 #else
7588 #if HAVE_PTHREADS_D4
7589 #define ATTR    pthread_attr_default
7590 #else
7591 #define ATTR    NULL
7592 #endif
7593 #endif
7594         /* make sure pthread_create() isn't just a stub */
7595         status = pthread_create(&t, ATTR, task, NULL);
7596         if( status ) exit( status );
7597
7598         /* make sure pthread_detach() isn't just a stub */
7599 #if HAVE_PTHREADS_D4
7600         status = pthread_detach( &t );
7601 #else
7602         status = pthread_detach( t );
7603 #endif
7604
7605 #ifdef HAVE_LINUX_THREADS
7606         pthread_kill_other_threads_np();
7607 #endif
7608
7609         exit( status );
7610
7611 }
7612
7613 EOF
7614 if { (eval echo configure:7615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7615 then
7616   ol_cv_pthread_pthreads=yes
7617 else
7618   echo "configure: failed program was:" >&5
7619   cat conftest.$ac_ext >&5
7620   rm -fr conftest*
7621   ol_cv_pthread_pthreads=no
7622 fi
7623 rm -fr conftest*
7624 fi
7625
7626
7627                 # restore the LIBS
7628                 LIBS="$ol_LIBS"
7629         
7630 fi
7631
7632 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7633
7634         if test $ol_cv_pthread_pthreads = yes ; then
7635                 ol_link_pthreads="-pthreads"
7636                 ol_link_threads=posix
7637         fi
7638 fi
7639
7640                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7641 if test "$ol_link_threads" = no ; then
7642         # try -mthreads
7643         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7644 echo "configure:7645: checking for pthread link with -mthreads" >&5
7645 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7646   echo $ac_n "(cached) $ac_c" 1>&6
7647 else
7648   
7649                 # save the flags
7650                 ol_LIBS="$LIBS"
7651                 LIBS="-mthreads $LIBS"
7652
7653                 if test "$cross_compiling" = yes; then
7654   cat > conftest.$ac_ext <<EOF
7655 #line 7656 "configure"
7656 #include "confdefs.h"
7657 /* pthread test headers */
7658 #include <pthread.h>
7659 #ifndef NULL
7660 #define NULL (void*)0
7661 #endif
7662
7663 static void *task(p)
7664         void *p;
7665 {
7666         return (void *) (p == NULL);
7667 }
7668
7669 int main() {
7670
7671         /* pthread test function */
7672         pthread_t t;
7673         int status;
7674 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7675         /* This system (e.g. AIX) defaults detached; must override */
7676         pthread_attr_t attr;
7677
7678         status = pthread_attr_init(&attr);
7679         if( status ) exit( status );
7680
7681         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7682         if( status ) exit( status );
7683
7684 #define ATTR    &attr
7685 #else
7686 #if HAVE_PTHREADS_D4
7687 #define ATTR    pthread_attr_default
7688 #else
7689 #define ATTR    NULL
7690 #endif
7691 #endif
7692         /* make sure pthread_create() isn't just a stub */
7693         status = pthread_create(&t, ATTR, task, NULL);
7694         if( status ) exit( status );
7695
7696         /* make sure pthread_detach() isn't just a stub */
7697 #if HAVE_PTHREADS_D4
7698         status = pthread_detach( &t );
7699 #else
7700         status = pthread_detach( t );
7701 #endif
7702
7703 #ifdef HAVE_LINUX_THREADS
7704         pthread_kill_other_threads_np();
7705 #endif
7706
7707         exit( status );
7708
7709 ; return 0; }
7710 EOF
7711 if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7712   rm -rf conftest*
7713   ol_cv_pthread_mthreads=yes
7714 else
7715   echo "configure: failed program was:" >&5
7716   cat conftest.$ac_ext >&5
7717   rm -rf conftest*
7718   ol_cv_pthread_mthreads=no
7719 fi
7720 rm -f conftest*
7721 else
7722   cat > conftest.$ac_ext <<EOF
7723 #line 7724 "configure"
7724 #include "confdefs.h"
7725 /* pthread test headers */
7726 #include <pthread.h>
7727 #ifndef NULL
7728 #define NULL (void*)0
7729 #endif
7730
7731 static void *task(p)
7732         void *p;
7733 {
7734         return (void *) (p == NULL);
7735 }
7736
7737
7738 int main(argc, argv)
7739         int argc;
7740         char **argv;
7741 {
7742
7743         /* pthread test function */
7744         pthread_t t;
7745         int status;
7746 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7747         /* This system (e.g. AIX) defaults detached; must override */
7748         pthread_attr_t attr;
7749
7750         status = pthread_attr_init(&attr);
7751         if( status ) exit( status );
7752
7753         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7754         if( status ) exit( status );
7755
7756 #define ATTR    &attr
7757 #else
7758 #if HAVE_PTHREADS_D4
7759 #define ATTR    pthread_attr_default
7760 #else
7761 #define ATTR    NULL
7762 #endif
7763 #endif
7764         /* make sure pthread_create() isn't just a stub */
7765         status = pthread_create(&t, ATTR, task, NULL);
7766         if( status ) exit( status );
7767
7768         /* make sure pthread_detach() isn't just a stub */
7769 #if HAVE_PTHREADS_D4
7770         status = pthread_detach( &t );
7771 #else
7772         status = pthread_detach( t );
7773 #endif
7774
7775 #ifdef HAVE_LINUX_THREADS
7776         pthread_kill_other_threads_np();
7777 #endif
7778
7779         exit( status );
7780
7781 }
7782
7783 EOF
7784 if { (eval echo configure:7785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7785 then
7786   ol_cv_pthread_mthreads=yes
7787 else
7788   echo "configure: failed program was:" >&5
7789   cat conftest.$ac_ext >&5
7790   rm -fr conftest*
7791   ol_cv_pthread_mthreads=no
7792 fi
7793 rm -fr conftest*
7794 fi
7795
7796
7797                 # restore the LIBS
7798                 LIBS="$ol_LIBS"
7799         
7800 fi
7801
7802 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7803
7804         if test $ol_cv_pthread_mthreads = yes ; then
7805                 ol_link_pthreads="-mthreads"
7806                 ol_link_threads=posix
7807         fi
7808 fi
7809
7810                 # Pthread try link: -thread (ol_cv_pthread_thread)
7811 if test "$ol_link_threads" = no ; then
7812         # try -thread
7813         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7814 echo "configure:7815: checking for pthread link with -thread" >&5
7815 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7816   echo $ac_n "(cached) $ac_c" 1>&6
7817 else
7818   
7819                 # save the flags
7820                 ol_LIBS="$LIBS"
7821                 LIBS="-thread $LIBS"
7822
7823                 if test "$cross_compiling" = yes; then
7824   cat > conftest.$ac_ext <<EOF
7825 #line 7826 "configure"
7826 #include "confdefs.h"
7827 /* pthread test headers */
7828 #include <pthread.h>
7829 #ifndef NULL
7830 #define NULL (void*)0
7831 #endif
7832
7833 static void *task(p)
7834         void *p;
7835 {
7836         return (void *) (p == NULL);
7837 }
7838
7839 int main() {
7840
7841         /* pthread test function */
7842         pthread_t t;
7843         int status;
7844 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7845         /* This system (e.g. AIX) defaults detached; must override */
7846         pthread_attr_t attr;
7847
7848         status = pthread_attr_init(&attr);
7849         if( status ) exit( status );
7850
7851         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7852         if( status ) exit( status );
7853
7854 #define ATTR    &attr
7855 #else
7856 #if HAVE_PTHREADS_D4
7857 #define ATTR    pthread_attr_default
7858 #else
7859 #define ATTR    NULL
7860 #endif
7861 #endif
7862         /* make sure pthread_create() isn't just a stub */
7863         status = pthread_create(&t, ATTR, task, NULL);
7864         if( status ) exit( status );
7865
7866         /* make sure pthread_detach() isn't just a stub */
7867 #if HAVE_PTHREADS_D4
7868         status = pthread_detach( &t );
7869 #else
7870         status = pthread_detach( t );
7871 #endif
7872
7873 #ifdef HAVE_LINUX_THREADS
7874         pthread_kill_other_threads_np();
7875 #endif
7876
7877         exit( status );
7878
7879 ; return 0; }
7880 EOF
7881 if { (eval echo configure:7882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7882   rm -rf conftest*
7883   ol_cv_pthread_thread=yes
7884 else
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   ol_cv_pthread_thread=no
7889 fi
7890 rm -f conftest*
7891 else
7892   cat > conftest.$ac_ext <<EOF
7893 #line 7894 "configure"
7894 #include "confdefs.h"
7895 /* pthread test headers */
7896 #include <pthread.h>
7897 #ifndef NULL
7898 #define NULL (void*)0
7899 #endif
7900
7901 static void *task(p)
7902         void *p;
7903 {
7904         return (void *) (p == NULL);
7905 }
7906
7907
7908 int main(argc, argv)
7909         int argc;
7910         char **argv;
7911 {
7912
7913         /* pthread test function */
7914         pthread_t t;
7915         int status;
7916 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7917         /* This system (e.g. AIX) defaults detached; must override */
7918         pthread_attr_t attr;
7919
7920         status = pthread_attr_init(&attr);
7921         if( status ) exit( status );
7922
7923         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7924         if( status ) exit( status );
7925
7926 #define ATTR    &attr
7927 #else
7928 #if HAVE_PTHREADS_D4
7929 #define ATTR    pthread_attr_default
7930 #else
7931 #define ATTR    NULL
7932 #endif
7933 #endif
7934         /* make sure pthread_create() isn't just a stub */
7935         status = pthread_create(&t, ATTR, task, NULL);
7936         if( status ) exit( status );
7937
7938         /* make sure pthread_detach() isn't just a stub */
7939 #if HAVE_PTHREADS_D4
7940         status = pthread_detach( &t );
7941 #else
7942         status = pthread_detach( t );
7943 #endif
7944
7945 #ifdef HAVE_LINUX_THREADS
7946         pthread_kill_other_threads_np();
7947 #endif
7948
7949         exit( status );
7950
7951 }
7952
7953 EOF
7954 if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7955 then
7956   ol_cv_pthread_thread=yes
7957 else
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -fr conftest*
7961   ol_cv_pthread_thread=no
7962 fi
7963 rm -fr conftest*
7964 fi
7965
7966
7967                 # restore the LIBS
7968                 LIBS="$ol_LIBS"
7969         
7970 fi
7971
7972 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7973
7974         if test $ol_cv_pthread_thread = yes ; then
7975                 ol_link_pthreads="-thread"
7976                 ol_link_threads=posix
7977         fi
7978 fi
7979
7980
7981                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7982 if test "$ol_link_threads" = no ; then
7983         # try -lpthread -lmach -lexc -lc_r
7984         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7985 echo "configure:7986: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7986 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7987   echo $ac_n "(cached) $ac_c" 1>&6
7988 else
7989   
7990                 # save the flags
7991                 ol_LIBS="$LIBS"
7992                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7993
7994                 if test "$cross_compiling" = yes; then
7995   cat > conftest.$ac_ext <<EOF
7996 #line 7997 "configure"
7997 #include "confdefs.h"
7998 /* pthread test headers */
7999 #include <pthread.h>
8000 #ifndef NULL
8001 #define NULL (void*)0
8002 #endif
8003
8004 static void *task(p)
8005         void *p;
8006 {
8007         return (void *) (p == NULL);
8008 }
8009
8010 int main() {
8011
8012         /* pthread test function */
8013         pthread_t t;
8014         int status;
8015 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8016         /* This system (e.g. AIX) defaults detached; must override */
8017         pthread_attr_t attr;
8018
8019         status = pthread_attr_init(&attr);
8020         if( status ) exit( status );
8021
8022         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8023         if( status ) exit( status );
8024
8025 #define ATTR    &attr
8026 #else
8027 #if HAVE_PTHREADS_D4
8028 #define ATTR    pthread_attr_default
8029 #else
8030 #define ATTR    NULL
8031 #endif
8032 #endif
8033         /* make sure pthread_create() isn't just a stub */
8034         status = pthread_create(&t, ATTR, task, NULL);
8035         if( status ) exit( status );
8036
8037         /* make sure pthread_detach() isn't just a stub */
8038 #if HAVE_PTHREADS_D4
8039         status = pthread_detach( &t );
8040 #else
8041         status = pthread_detach( t );
8042 #endif
8043
8044 #ifdef HAVE_LINUX_THREADS
8045         pthread_kill_other_threads_np();
8046 #endif
8047
8048         exit( status );
8049
8050 ; return 0; }
8051 EOF
8052 if { (eval echo configure:8053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8053   rm -rf conftest*
8054   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8055 else
8056   echo "configure: failed program was:" >&5
8057   cat conftest.$ac_ext >&5
8058   rm -rf conftest*
8059   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8060 fi
8061 rm -f conftest*
8062 else
8063   cat > conftest.$ac_ext <<EOF
8064 #line 8065 "configure"
8065 #include "confdefs.h"
8066 /* pthread test headers */
8067 #include <pthread.h>
8068 #ifndef NULL
8069 #define NULL (void*)0
8070 #endif
8071
8072 static void *task(p)
8073         void *p;
8074 {
8075         return (void *) (p == NULL);
8076 }
8077
8078
8079 int main(argc, argv)
8080         int argc;
8081         char **argv;
8082 {
8083
8084         /* pthread test function */
8085         pthread_t t;
8086         int status;
8087 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8088         /* This system (e.g. AIX) defaults detached; must override */
8089         pthread_attr_t attr;
8090
8091         status = pthread_attr_init(&attr);
8092         if( status ) exit( status );
8093
8094         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8095         if( status ) exit( status );
8096
8097 #define ATTR    &attr
8098 #else
8099 #if HAVE_PTHREADS_D4
8100 #define ATTR    pthread_attr_default
8101 #else
8102 #define ATTR    NULL
8103 #endif
8104 #endif
8105         /* make sure pthread_create() isn't just a stub */
8106         status = pthread_create(&t, ATTR, task, NULL);
8107         if( status ) exit( status );
8108
8109         /* make sure pthread_detach() isn't just a stub */
8110 #if HAVE_PTHREADS_D4
8111         status = pthread_detach( &t );
8112 #else
8113         status = pthread_detach( t );
8114 #endif
8115
8116 #ifdef HAVE_LINUX_THREADS
8117         pthread_kill_other_threads_np();
8118 #endif
8119
8120         exit( status );
8121
8122 }
8123
8124 EOF
8125 if { (eval echo configure:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8126 then
8127   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8128 else
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -fr conftest*
8132   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8133 fi
8134 rm -fr conftest*
8135 fi
8136
8137
8138                 # restore the LIBS
8139                 LIBS="$ol_LIBS"
8140         
8141 fi
8142
8143 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8144
8145         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8146                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8147                 ol_link_threads=posix
8148         fi
8149 fi
8150
8151                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8152 if test "$ol_link_threads" = no ; then
8153         # try -lpthread -lmach -lexc
8154         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8155 echo "configure:8156: checking for pthread link with -lpthread -lmach -lexc" >&5
8156 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8157   echo $ac_n "(cached) $ac_c" 1>&6
8158 else
8159   
8160                 # save the flags
8161                 ol_LIBS="$LIBS"
8162                 LIBS="-lpthread -lmach -lexc $LIBS"
8163
8164                 if test "$cross_compiling" = yes; then
8165   cat > conftest.$ac_ext <<EOF
8166 #line 8167 "configure"
8167 #include "confdefs.h"
8168 /* pthread test headers */
8169 #include <pthread.h>
8170 #ifndef NULL
8171 #define NULL (void*)0
8172 #endif
8173
8174 static void *task(p)
8175         void *p;
8176 {
8177         return (void *) (p == NULL);
8178 }
8179
8180 int main() {
8181
8182         /* pthread test function */
8183         pthread_t t;
8184         int status;
8185 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8186         /* This system (e.g. AIX) defaults detached; must override */
8187         pthread_attr_t attr;
8188
8189         status = pthread_attr_init(&attr);
8190         if( status ) exit( status );
8191
8192         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8193         if( status ) exit( status );
8194
8195 #define ATTR    &attr
8196 #else
8197 #if HAVE_PTHREADS_D4
8198 #define ATTR    pthread_attr_default
8199 #else
8200 #define ATTR    NULL
8201 #endif
8202 #endif
8203         /* make sure pthread_create() isn't just a stub */
8204         status = pthread_create(&t, ATTR, task, NULL);
8205         if( status ) exit( status );
8206
8207         /* make sure pthread_detach() isn't just a stub */
8208 #if HAVE_PTHREADS_D4
8209         status = pthread_detach( &t );
8210 #else
8211         status = pthread_detach( t );
8212 #endif
8213
8214 #ifdef HAVE_LINUX_THREADS
8215         pthread_kill_other_threads_np();
8216 #endif
8217
8218         exit( status );
8219
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8223   rm -rf conftest*
8224   ol_cv_pthread_lpthread_lmach_lexc=yes
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   ol_cv_pthread_lpthread_lmach_lexc=no
8230 fi
8231 rm -f conftest*
8232 else
8233   cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 /* pthread test headers */
8237 #include <pthread.h>
8238 #ifndef NULL
8239 #define NULL (void*)0
8240 #endif
8241
8242 static void *task(p)
8243         void *p;
8244 {
8245         return (void *) (p == NULL);
8246 }
8247
8248
8249 int main(argc, argv)
8250         int argc;
8251         char **argv;
8252 {
8253
8254         /* pthread test function */
8255         pthread_t t;
8256         int status;
8257 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8258         /* This system (e.g. AIX) defaults detached; must override */
8259         pthread_attr_t attr;
8260
8261         status = pthread_attr_init(&attr);
8262         if( status ) exit( status );
8263
8264         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8265         if( status ) exit( status );
8266
8267 #define ATTR    &attr
8268 #else
8269 #if HAVE_PTHREADS_D4
8270 #define ATTR    pthread_attr_default
8271 #else
8272 #define ATTR    NULL
8273 #endif
8274 #endif
8275         /* make sure pthread_create() isn't just a stub */
8276         status = pthread_create(&t, ATTR, task, NULL);
8277         if( status ) exit( status );
8278
8279         /* make sure pthread_detach() isn't just a stub */
8280 #if HAVE_PTHREADS_D4
8281         status = pthread_detach( &t );
8282 #else
8283         status = pthread_detach( t );
8284 #endif
8285
8286 #ifdef HAVE_LINUX_THREADS
8287         pthread_kill_other_threads_np();
8288 #endif
8289
8290         exit( status );
8291
8292 }
8293
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8296 then
8297   ol_cv_pthread_lpthread_lmach_lexc=yes
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -fr conftest*
8302   ol_cv_pthread_lpthread_lmach_lexc=no
8303 fi
8304 rm -fr conftest*
8305 fi
8306
8307
8308                 # restore the LIBS
8309                 LIBS="$ol_LIBS"
8310         
8311 fi
8312
8313 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8314
8315         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8316                 ol_link_pthreads="-lpthread -lmach -lexc"
8317                 ol_link_threads=posix
8318         fi
8319 fi
8320
8321
8322                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8323 if test "$ol_link_threads" = no ; then
8324         # try -lpthread -Wl,-woff,85
8325         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8326 echo "configure:8327: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8327 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8328   echo $ac_n "(cached) $ac_c" 1>&6
8329 else
8330   
8331                 # save the flags
8332                 ol_LIBS="$LIBS"
8333                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8334
8335                 if test "$cross_compiling" = yes; then
8336   cat > conftest.$ac_ext <<EOF
8337 #line 8338 "configure"
8338 #include "confdefs.h"
8339 /* pthread test headers */
8340 #include <pthread.h>
8341 #ifndef NULL
8342 #define NULL (void*)0
8343 #endif
8344
8345 static void *task(p)
8346         void *p;
8347 {
8348         return (void *) (p == NULL);
8349 }
8350
8351 int main() {
8352
8353         /* pthread test function */
8354         pthread_t t;
8355         int status;
8356 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8357         /* This system (e.g. AIX) defaults detached; must override */
8358         pthread_attr_t attr;
8359
8360         status = pthread_attr_init(&attr);
8361         if( status ) exit( status );
8362
8363         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8364         if( status ) exit( status );
8365
8366 #define ATTR    &attr
8367 #else
8368 #if HAVE_PTHREADS_D4
8369 #define ATTR    pthread_attr_default
8370 #else
8371 #define ATTR    NULL
8372 #endif
8373 #endif
8374         /* make sure pthread_create() isn't just a stub */
8375         status = pthread_create(&t, ATTR, task, NULL);
8376         if( status ) exit( status );
8377
8378         /* make sure pthread_detach() isn't just a stub */
8379 #if HAVE_PTHREADS_D4
8380         status = pthread_detach( &t );
8381 #else
8382         status = pthread_detach( t );
8383 #endif
8384
8385 #ifdef HAVE_LINUX_THREADS
8386         pthread_kill_other_threads_np();
8387 #endif
8388
8389         exit( status );
8390
8391 ; return 0; }
8392 EOF
8393 if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8394   rm -rf conftest*
8395   ol_cv_pthread_lib_lpthread_woff=yes
8396 else
8397   echo "configure: failed program was:" >&5
8398   cat conftest.$ac_ext >&5
8399   rm -rf conftest*
8400   ol_cv_pthread_lib_lpthread_woff=no
8401 fi
8402 rm -f conftest*
8403 else
8404   cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 /* pthread test headers */
8408 #include <pthread.h>
8409 #ifndef NULL
8410 #define NULL (void*)0
8411 #endif
8412
8413 static void *task(p)
8414         void *p;
8415 {
8416         return (void *) (p == NULL);
8417 }
8418
8419
8420 int main(argc, argv)
8421         int argc;
8422         char **argv;
8423 {
8424
8425         /* pthread test function */
8426         pthread_t t;
8427         int status;
8428 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8429         /* This system (e.g. AIX) defaults detached; must override */
8430         pthread_attr_t attr;
8431
8432         status = pthread_attr_init(&attr);
8433         if( status ) exit( status );
8434
8435         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8436         if( status ) exit( status );
8437
8438 #define ATTR    &attr
8439 #else
8440 #if HAVE_PTHREADS_D4
8441 #define ATTR    pthread_attr_default
8442 #else
8443 #define ATTR    NULL
8444 #endif
8445 #endif
8446         /* make sure pthread_create() isn't just a stub */
8447         status = pthread_create(&t, ATTR, task, NULL);
8448         if( status ) exit( status );
8449
8450         /* make sure pthread_detach() isn't just a stub */
8451 #if HAVE_PTHREADS_D4
8452         status = pthread_detach( &t );
8453 #else
8454         status = pthread_detach( t );
8455 #endif
8456
8457 #ifdef HAVE_LINUX_THREADS
8458         pthread_kill_other_threads_np();
8459 #endif
8460
8461         exit( status );
8462
8463 }
8464
8465 EOF
8466 if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8467 then
8468   ol_cv_pthread_lib_lpthread_woff=yes
8469 else
8470   echo "configure: failed program was:" >&5
8471   cat conftest.$ac_ext >&5
8472   rm -fr conftest*
8473   ol_cv_pthread_lib_lpthread_woff=no
8474 fi
8475 rm -fr conftest*
8476 fi
8477
8478
8479                 # restore the LIBS
8480                 LIBS="$ol_LIBS"
8481         
8482 fi
8483
8484 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8485
8486         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8487                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8488                 ol_link_threads=posix
8489         fi
8490 fi
8491
8492
8493                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8494 if test "$ol_link_threads" = no ; then
8495         # try -lpthread
8496         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8497 echo "configure:8498: checking for pthread link with -lpthread" >&5
8498 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8499   echo $ac_n "(cached) $ac_c" 1>&6
8500 else
8501   
8502                 # save the flags
8503                 ol_LIBS="$LIBS"
8504                 LIBS="-lpthread $LIBS"
8505
8506                 if test "$cross_compiling" = yes; then
8507   cat > conftest.$ac_ext <<EOF
8508 #line 8509 "configure"
8509 #include "confdefs.h"
8510 /* pthread test headers */
8511 #include <pthread.h>
8512 #ifndef NULL
8513 #define NULL (void*)0
8514 #endif
8515
8516 static void *task(p)
8517         void *p;
8518 {
8519         return (void *) (p == NULL);
8520 }
8521
8522 int main() {
8523
8524         /* pthread test function */
8525         pthread_t t;
8526         int status;
8527 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8528         /* This system (e.g. AIX) defaults detached; must override */
8529         pthread_attr_t attr;
8530
8531         status = pthread_attr_init(&attr);
8532         if( status ) exit( status );
8533
8534         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8535         if( status ) exit( status );
8536
8537 #define ATTR    &attr
8538 #else
8539 #if HAVE_PTHREADS_D4
8540 #define ATTR    pthread_attr_default
8541 #else
8542 #define ATTR    NULL
8543 #endif
8544 #endif
8545         /* make sure pthread_create() isn't just a stub */
8546         status = pthread_create(&t, ATTR, task, NULL);
8547         if( status ) exit( status );
8548
8549         /* make sure pthread_detach() isn't just a stub */
8550 #if HAVE_PTHREADS_D4
8551         status = pthread_detach( &t );
8552 #else
8553         status = pthread_detach( t );
8554 #endif
8555
8556 #ifdef HAVE_LINUX_THREADS
8557         pthread_kill_other_threads_np();
8558 #endif
8559
8560         exit( status );
8561
8562 ; return 0; }
8563 EOF
8564 if { (eval echo configure:8565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8565   rm -rf conftest*
8566   ol_cv_pthread_lpthread=yes
8567 else
8568   echo "configure: failed program was:" >&5
8569   cat conftest.$ac_ext >&5
8570   rm -rf conftest*
8571   ol_cv_pthread_lpthread=no
8572 fi
8573 rm -f conftest*
8574 else
8575   cat > conftest.$ac_ext <<EOF
8576 #line 8577 "configure"
8577 #include "confdefs.h"
8578 /* pthread test headers */
8579 #include <pthread.h>
8580 #ifndef NULL
8581 #define NULL (void*)0
8582 #endif
8583
8584 static void *task(p)
8585         void *p;
8586 {
8587         return (void *) (p == NULL);
8588 }
8589
8590
8591 int main(argc, argv)
8592         int argc;
8593         char **argv;
8594 {
8595
8596         /* pthread test function */
8597         pthread_t t;
8598         int status;
8599 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8600         /* This system (e.g. AIX) defaults detached; must override */
8601         pthread_attr_t attr;
8602
8603         status = pthread_attr_init(&attr);
8604         if( status ) exit( status );
8605
8606         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8607         if( status ) exit( status );
8608
8609 #define ATTR    &attr
8610 #else
8611 #if HAVE_PTHREADS_D4
8612 #define ATTR    pthread_attr_default
8613 #else
8614 #define ATTR    NULL
8615 #endif
8616 #endif
8617         /* make sure pthread_create() isn't just a stub */
8618         status = pthread_create(&t, ATTR, task, NULL);
8619         if( status ) exit( status );
8620
8621         /* make sure pthread_detach() isn't just a stub */
8622 #if HAVE_PTHREADS_D4
8623         status = pthread_detach( &t );
8624 #else
8625         status = pthread_detach( t );
8626 #endif
8627
8628 #ifdef HAVE_LINUX_THREADS
8629         pthread_kill_other_threads_np();
8630 #endif
8631
8632         exit( status );
8633
8634 }
8635
8636 EOF
8637 if { (eval echo configure:8638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8638 then
8639   ol_cv_pthread_lpthread=yes
8640 else
8641   echo "configure: failed program was:" >&5
8642   cat conftest.$ac_ext >&5
8643   rm -fr conftest*
8644   ol_cv_pthread_lpthread=no
8645 fi
8646 rm -fr conftest*
8647 fi
8648
8649
8650                 # restore the LIBS
8651                 LIBS="$ol_LIBS"
8652         
8653 fi
8654
8655 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8656
8657         if test $ol_cv_pthread_lpthread = yes ; then
8658                 ol_link_pthreads="-lpthread"
8659                 ol_link_threads=posix
8660         fi
8661 fi
8662
8663                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8664 if test "$ol_link_threads" = no ; then
8665         # try -lc_r
8666         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8667 echo "configure:8668: checking for pthread link with -lc_r" >&5
8668 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   
8672                 # save the flags
8673                 ol_LIBS="$LIBS"
8674                 LIBS="-lc_r $LIBS"
8675
8676                 if test "$cross_compiling" = yes; then
8677   cat > conftest.$ac_ext <<EOF
8678 #line 8679 "configure"
8679 #include "confdefs.h"
8680 /* pthread test headers */
8681 #include <pthread.h>
8682 #ifndef NULL
8683 #define NULL (void*)0
8684 #endif
8685
8686 static void *task(p)
8687         void *p;
8688 {
8689         return (void *) (p == NULL);
8690 }
8691
8692 int main() {
8693
8694         /* pthread test function */
8695         pthread_t t;
8696         int status;
8697 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8698         /* This system (e.g. AIX) defaults detached; must override */
8699         pthread_attr_t attr;
8700
8701         status = pthread_attr_init(&attr);
8702         if( status ) exit( status );
8703
8704         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8705         if( status ) exit( status );
8706
8707 #define ATTR    &attr
8708 #else
8709 #if HAVE_PTHREADS_D4
8710 #define ATTR    pthread_attr_default
8711 #else
8712 #define ATTR    NULL
8713 #endif
8714 #endif
8715         /* make sure pthread_create() isn't just a stub */
8716         status = pthread_create(&t, ATTR, task, NULL);
8717         if( status ) exit( status );
8718
8719         /* make sure pthread_detach() isn't just a stub */
8720 #if HAVE_PTHREADS_D4
8721         status = pthread_detach( &t );
8722 #else
8723         status = pthread_detach( t );
8724 #endif
8725
8726 #ifdef HAVE_LINUX_THREADS
8727         pthread_kill_other_threads_np();
8728 #endif
8729
8730         exit( status );
8731
8732 ; return 0; }
8733 EOF
8734 if { (eval echo configure:8735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8735   rm -rf conftest*
8736   ol_cv_pthread_lc_r=yes
8737 else
8738   echo "configure: failed program was:" >&5
8739   cat conftest.$ac_ext >&5
8740   rm -rf conftest*
8741   ol_cv_pthread_lc_r=no
8742 fi
8743 rm -f conftest*
8744 else
8745   cat > conftest.$ac_ext <<EOF
8746 #line 8747 "configure"
8747 #include "confdefs.h"
8748 /* pthread test headers */
8749 #include <pthread.h>
8750 #ifndef NULL
8751 #define NULL (void*)0
8752 #endif
8753
8754 static void *task(p)
8755         void *p;
8756 {
8757         return (void *) (p == NULL);
8758 }
8759
8760
8761 int main(argc, argv)
8762         int argc;
8763         char **argv;
8764 {
8765
8766         /* pthread test function */
8767         pthread_t t;
8768         int status;
8769 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8770         /* This system (e.g. AIX) defaults detached; must override */
8771         pthread_attr_t attr;
8772
8773         status = pthread_attr_init(&attr);
8774         if( status ) exit( status );
8775
8776         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8777         if( status ) exit( status );
8778
8779 #define ATTR    &attr
8780 #else
8781 #if HAVE_PTHREADS_D4
8782 #define ATTR    pthread_attr_default
8783 #else
8784 #define ATTR    NULL
8785 #endif
8786 #endif
8787         /* make sure pthread_create() isn't just a stub */
8788         status = pthread_create(&t, ATTR, task, NULL);
8789         if( status ) exit( status );
8790
8791         /* make sure pthread_detach() isn't just a stub */
8792 #if HAVE_PTHREADS_D4
8793         status = pthread_detach( &t );
8794 #else
8795         status = pthread_detach( t );
8796 #endif
8797
8798 #ifdef HAVE_LINUX_THREADS
8799         pthread_kill_other_threads_np();
8800 #endif
8801
8802         exit( status );
8803
8804 }
8805
8806 EOF
8807 if { (eval echo configure:8808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8808 then
8809   ol_cv_pthread_lc_r=yes
8810 else
8811   echo "configure: failed program was:" >&5
8812   cat conftest.$ac_ext >&5
8813   rm -fr conftest*
8814   ol_cv_pthread_lc_r=no
8815 fi
8816 rm -fr conftest*
8817 fi
8818
8819
8820                 # restore the LIBS
8821                 LIBS="$ol_LIBS"
8822         
8823 fi
8824
8825 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8826
8827         if test $ol_cv_pthread_lc_r = yes ; then
8828                 ol_link_pthreads="-lc_r"
8829                 ol_link_threads=posix
8830         fi
8831 fi
8832
8833
8834                 # Pthread try link: -threads (ol_cv_pthread_threads)
8835 if test "$ol_link_threads" = no ; then
8836         # try -threads
8837         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8838 echo "configure:8839: checking for pthread link with -threads" >&5
8839 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8840   echo $ac_n "(cached) $ac_c" 1>&6
8841 else
8842   
8843                 # save the flags
8844                 ol_LIBS="$LIBS"
8845                 LIBS="-threads $LIBS"
8846
8847                 if test "$cross_compiling" = yes; then
8848   cat > conftest.$ac_ext <<EOF
8849 #line 8850 "configure"
8850 #include "confdefs.h"
8851 /* pthread test headers */
8852 #include <pthread.h>
8853 #ifndef NULL
8854 #define NULL (void*)0
8855 #endif
8856
8857 static void *task(p)
8858         void *p;
8859 {
8860         return (void *) (p == NULL);
8861 }
8862
8863 int main() {
8864
8865         /* pthread test function */
8866         pthread_t t;
8867         int status;
8868 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8869         /* This system (e.g. AIX) defaults detached; must override */
8870         pthread_attr_t attr;
8871
8872         status = pthread_attr_init(&attr);
8873         if( status ) exit( status );
8874
8875         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8876         if( status ) exit( status );
8877
8878 #define ATTR    &attr
8879 #else
8880 #if HAVE_PTHREADS_D4
8881 #define ATTR    pthread_attr_default
8882 #else
8883 #define ATTR    NULL
8884 #endif
8885 #endif
8886         /* make sure pthread_create() isn't just a stub */
8887         status = pthread_create(&t, ATTR, task, NULL);
8888         if( status ) exit( status );
8889
8890         /* make sure pthread_detach() isn't just a stub */
8891 #if HAVE_PTHREADS_D4
8892         status = pthread_detach( &t );
8893 #else
8894         status = pthread_detach( t );
8895 #endif
8896
8897 #ifdef HAVE_LINUX_THREADS
8898         pthread_kill_other_threads_np();
8899 #endif
8900
8901         exit( status );
8902
8903 ; return 0; }
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906   rm -rf conftest*
8907   ol_cv_pthread_threads=yes
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -rf conftest*
8912   ol_cv_pthread_threads=no
8913 fi
8914 rm -f conftest*
8915 else
8916   cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 /* pthread test headers */
8920 #include <pthread.h>
8921 #ifndef NULL
8922 #define NULL (void*)0
8923 #endif
8924
8925 static void *task(p)
8926         void *p;
8927 {
8928         return (void *) (p == NULL);
8929 }
8930
8931
8932 int main(argc, argv)
8933         int argc;
8934         char **argv;
8935 {
8936
8937         /* pthread test function */
8938         pthread_t t;
8939         int status;
8940 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8941         /* This system (e.g. AIX) defaults detached; must override */
8942         pthread_attr_t attr;
8943
8944         status = pthread_attr_init(&attr);
8945         if( status ) exit( status );
8946
8947         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8948         if( status ) exit( status );
8949
8950 #define ATTR    &attr
8951 #else
8952 #if HAVE_PTHREADS_D4
8953 #define ATTR    pthread_attr_default
8954 #else
8955 #define ATTR    NULL
8956 #endif
8957 #endif
8958         /* make sure pthread_create() isn't just a stub */
8959         status = pthread_create(&t, ATTR, task, NULL);
8960         if( status ) exit( status );
8961
8962         /* make sure pthread_detach() isn't just a stub */
8963 #if HAVE_PTHREADS_D4
8964         status = pthread_detach( &t );
8965 #else
8966         status = pthread_detach( t );
8967 #endif
8968
8969 #ifdef HAVE_LINUX_THREADS
8970         pthread_kill_other_threads_np();
8971 #endif
8972
8973         exit( status );
8974
8975 }
8976
8977 EOF
8978 if { (eval echo configure:8979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8979 then
8980   ol_cv_pthread_threads=yes
8981 else
8982   echo "configure: failed program was:" >&5
8983   cat conftest.$ac_ext >&5
8984   rm -fr conftest*
8985   ol_cv_pthread_threads=no
8986 fi
8987 rm -fr conftest*
8988 fi
8989
8990
8991                 # restore the LIBS
8992                 LIBS="$ol_LIBS"
8993         
8994 fi
8995
8996 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8997
8998         if test $ol_cv_pthread_threads = yes ; then
8999                 ol_link_pthreads="-threads"
9000                 ol_link_threads=posix
9001         fi
9002 fi
9003
9004
9005                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9006 if test "$ol_link_threads" = no ; then
9007         # try -lpthreads -lmach -lexc -lc_r
9008         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9009 echo "configure:9010: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9010 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9011   echo $ac_n "(cached) $ac_c" 1>&6
9012 else
9013   
9014                 # save the flags
9015                 ol_LIBS="$LIBS"
9016                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9017
9018                 if test "$cross_compiling" = yes; then
9019   cat > conftest.$ac_ext <<EOF
9020 #line 9021 "configure"
9021 #include "confdefs.h"
9022 /* pthread test headers */
9023 #include <pthread.h>
9024 #ifndef NULL
9025 #define NULL (void*)0
9026 #endif
9027
9028 static void *task(p)
9029         void *p;
9030 {
9031         return (void *) (p == NULL);
9032 }
9033
9034 int main() {
9035
9036         /* pthread test function */
9037         pthread_t t;
9038         int status;
9039 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9040         /* This system (e.g. AIX) defaults detached; must override */
9041         pthread_attr_t attr;
9042
9043         status = pthread_attr_init(&attr);
9044         if( status ) exit( status );
9045
9046         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9047         if( status ) exit( status );
9048
9049 #define ATTR    &attr
9050 #else
9051 #if HAVE_PTHREADS_D4
9052 #define ATTR    pthread_attr_default
9053 #else
9054 #define ATTR    NULL
9055 #endif
9056 #endif
9057         /* make sure pthread_create() isn't just a stub */
9058         status = pthread_create(&t, ATTR, task, NULL);
9059         if( status ) exit( status );
9060
9061         /* make sure pthread_detach() isn't just a stub */
9062 #if HAVE_PTHREADS_D4
9063         status = pthread_detach( &t );
9064 #else
9065         status = pthread_detach( t );
9066 #endif
9067
9068 #ifdef HAVE_LINUX_THREADS
9069         pthread_kill_other_threads_np();
9070 #endif
9071
9072         exit( status );
9073
9074 ; return 0; }
9075 EOF
9076 if { (eval echo configure:9077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9077   rm -rf conftest*
9078   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9079 else
9080   echo "configure: failed program was:" >&5
9081   cat conftest.$ac_ext >&5
9082   rm -rf conftest*
9083   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9084 fi
9085 rm -f conftest*
9086 else
9087   cat > conftest.$ac_ext <<EOF
9088 #line 9089 "configure"
9089 #include "confdefs.h"
9090 /* pthread test headers */
9091 #include <pthread.h>
9092 #ifndef NULL
9093 #define NULL (void*)0
9094 #endif
9095
9096 static void *task(p)
9097         void *p;
9098 {
9099         return (void *) (p == NULL);
9100 }
9101
9102
9103 int main(argc, argv)
9104         int argc;
9105         char **argv;
9106 {
9107
9108         /* pthread test function */
9109         pthread_t t;
9110         int status;
9111 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9112         /* This system (e.g. AIX) defaults detached; must override */
9113         pthread_attr_t attr;
9114
9115         status = pthread_attr_init(&attr);
9116         if( status ) exit( status );
9117
9118         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9119         if( status ) exit( status );
9120
9121 #define ATTR    &attr
9122 #else
9123 #if HAVE_PTHREADS_D4
9124 #define ATTR    pthread_attr_default
9125 #else
9126 #define ATTR    NULL
9127 #endif
9128 #endif
9129         /* make sure pthread_create() isn't just a stub */
9130         status = pthread_create(&t, ATTR, task, NULL);
9131         if( status ) exit( status );
9132
9133         /* make sure pthread_detach() isn't just a stub */
9134 #if HAVE_PTHREADS_D4
9135         status = pthread_detach( &t );
9136 #else
9137         status = pthread_detach( t );
9138 #endif
9139
9140 #ifdef HAVE_LINUX_THREADS
9141         pthread_kill_other_threads_np();
9142 #endif
9143
9144         exit( status );
9145
9146 }
9147
9148 EOF
9149 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9150 then
9151   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9152 else
9153   echo "configure: failed program was:" >&5
9154   cat conftest.$ac_ext >&5
9155   rm -fr conftest*
9156   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9157 fi
9158 rm -fr conftest*
9159 fi
9160
9161
9162                 # restore the LIBS
9163                 LIBS="$ol_LIBS"
9164         
9165 fi
9166
9167 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9168
9169         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9170                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9171                 ol_link_threads=posix
9172         fi
9173 fi
9174
9175                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9176 if test "$ol_link_threads" = no ; then
9177         # try -lpthreads -lmach -lexc
9178         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9179 echo "configure:9180: checking for pthread link with -lpthreads -lmach -lexc" >&5
9180 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9181   echo $ac_n "(cached) $ac_c" 1>&6
9182 else
9183   
9184                 # save the flags
9185                 ol_LIBS="$LIBS"
9186                 LIBS="-lpthreads -lmach -lexc $LIBS"
9187
9188                 if test "$cross_compiling" = yes; then
9189   cat > conftest.$ac_ext <<EOF
9190 #line 9191 "configure"
9191 #include "confdefs.h"
9192 /* pthread test headers */
9193 #include <pthread.h>
9194 #ifndef NULL
9195 #define NULL (void*)0
9196 #endif
9197
9198 static void *task(p)
9199         void *p;
9200 {
9201         return (void *) (p == NULL);
9202 }
9203
9204 int main() {
9205
9206         /* pthread test function */
9207         pthread_t t;
9208         int status;
9209 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9210         /* This system (e.g. AIX) defaults detached; must override */
9211         pthread_attr_t attr;
9212
9213         status = pthread_attr_init(&attr);
9214         if( status ) exit( status );
9215
9216         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9217         if( status ) exit( status );
9218
9219 #define ATTR    &attr
9220 #else
9221 #if HAVE_PTHREADS_D4
9222 #define ATTR    pthread_attr_default
9223 #else
9224 #define ATTR    NULL
9225 #endif
9226 #endif
9227         /* make sure pthread_create() isn't just a stub */
9228         status = pthread_create(&t, ATTR, task, NULL);
9229         if( status ) exit( status );
9230
9231         /* make sure pthread_detach() isn't just a stub */
9232 #if HAVE_PTHREADS_D4
9233         status = pthread_detach( &t );
9234 #else
9235         status = pthread_detach( t );
9236 #endif
9237
9238 #ifdef HAVE_LINUX_THREADS
9239         pthread_kill_other_threads_np();
9240 #endif
9241
9242         exit( status );
9243
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9247   rm -rf conftest*
9248   ol_cv_pthread_lpthreads_lmach_lexc=yes
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   ol_cv_pthread_lpthreads_lmach_lexc=no
9254 fi
9255 rm -f conftest*
9256 else
9257   cat > conftest.$ac_ext <<EOF
9258 #line 9259 "configure"
9259 #include "confdefs.h"
9260 /* pthread test headers */
9261 #include <pthread.h>
9262 #ifndef NULL
9263 #define NULL (void*)0
9264 #endif
9265
9266 static void *task(p)
9267         void *p;
9268 {
9269         return (void *) (p == NULL);
9270 }
9271
9272
9273 int main(argc, argv)
9274         int argc;
9275         char **argv;
9276 {
9277
9278         /* pthread test function */
9279         pthread_t t;
9280         int status;
9281 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9282         /* This system (e.g. AIX) defaults detached; must override */
9283         pthread_attr_t attr;
9284
9285         status = pthread_attr_init(&attr);
9286         if( status ) exit( status );
9287
9288         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9289         if( status ) exit( status );
9290
9291 #define ATTR    &attr
9292 #else
9293 #if HAVE_PTHREADS_D4
9294 #define ATTR    pthread_attr_default
9295 #else
9296 #define ATTR    NULL
9297 #endif
9298 #endif
9299         /* make sure pthread_create() isn't just a stub */
9300         status = pthread_create(&t, ATTR, task, NULL);
9301         if( status ) exit( status );
9302
9303         /* make sure pthread_detach() isn't just a stub */
9304 #if HAVE_PTHREADS_D4
9305         status = pthread_detach( &t );
9306 #else
9307         status = pthread_detach( t );
9308 #endif
9309
9310 #ifdef HAVE_LINUX_THREADS
9311         pthread_kill_other_threads_np();
9312 #endif
9313
9314         exit( status );
9315
9316 }
9317
9318 EOF
9319 if { (eval echo configure:9320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9320 then
9321   ol_cv_pthread_lpthreads_lmach_lexc=yes
9322 else
9323   echo "configure: failed program was:" >&5
9324   cat conftest.$ac_ext >&5
9325   rm -fr conftest*
9326   ol_cv_pthread_lpthreads_lmach_lexc=no
9327 fi
9328 rm -fr conftest*
9329 fi
9330
9331
9332                 # restore the LIBS
9333                 LIBS="$ol_LIBS"
9334         
9335 fi
9336
9337 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9338
9339         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9340                 ol_link_pthreads="-lpthreads -lmach -lexc"
9341                 ol_link_threads=posix
9342         fi
9343 fi
9344
9345                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9346 if test "$ol_link_threads" = no ; then
9347         # try -lpthreads -lexc
9348         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9349 echo "configure:9350: checking for pthread link with -lpthreads -lexc" >&5
9350 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9351   echo $ac_n "(cached) $ac_c" 1>&6
9352 else
9353   
9354                 # save the flags
9355                 ol_LIBS="$LIBS"
9356                 LIBS="-lpthreads -lexc $LIBS"
9357
9358                 if test "$cross_compiling" = yes; then
9359   cat > conftest.$ac_ext <<EOF
9360 #line 9361 "configure"
9361 #include "confdefs.h"
9362 /* pthread test headers */
9363 #include <pthread.h>
9364 #ifndef NULL
9365 #define NULL (void*)0
9366 #endif
9367
9368 static void *task(p)
9369         void *p;
9370 {
9371         return (void *) (p == NULL);
9372 }
9373
9374 int main() {
9375
9376         /* pthread test function */
9377         pthread_t t;
9378         int status;
9379 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9380         /* This system (e.g. AIX) defaults detached; must override */
9381         pthread_attr_t attr;
9382
9383         status = pthread_attr_init(&attr);
9384         if( status ) exit( status );
9385
9386         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9387         if( status ) exit( status );
9388
9389 #define ATTR    &attr
9390 #else
9391 #if HAVE_PTHREADS_D4
9392 #define ATTR    pthread_attr_default
9393 #else
9394 #define ATTR    NULL
9395 #endif
9396 #endif
9397         /* make sure pthread_create() isn't just a stub */
9398         status = pthread_create(&t, ATTR, task, NULL);
9399         if( status ) exit( status );
9400
9401         /* make sure pthread_detach() isn't just a stub */
9402 #if HAVE_PTHREADS_D4
9403         status = pthread_detach( &t );
9404 #else
9405         status = pthread_detach( t );
9406 #endif
9407
9408 #ifdef HAVE_LINUX_THREADS
9409         pthread_kill_other_threads_np();
9410 #endif
9411
9412         exit( status );
9413
9414 ; return 0; }
9415 EOF
9416 if { (eval echo configure:9417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9417   rm -rf conftest*
9418   ol_cv_pthread_lpthreads_lexc=yes
9419 else
9420   echo "configure: failed program was:" >&5
9421   cat conftest.$ac_ext >&5
9422   rm -rf conftest*
9423   ol_cv_pthread_lpthreads_lexc=no
9424 fi
9425 rm -f conftest*
9426 else
9427   cat > conftest.$ac_ext <<EOF
9428 #line 9429 "configure"
9429 #include "confdefs.h"
9430 /* pthread test headers */
9431 #include <pthread.h>
9432 #ifndef NULL
9433 #define NULL (void*)0
9434 #endif
9435
9436 static void *task(p)
9437         void *p;
9438 {
9439         return (void *) (p == NULL);
9440 }
9441
9442
9443 int main(argc, argv)
9444         int argc;
9445         char **argv;
9446 {
9447
9448         /* pthread test function */
9449         pthread_t t;
9450         int status;
9451 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9452         /* This system (e.g. AIX) defaults detached; must override */
9453         pthread_attr_t attr;
9454
9455         status = pthread_attr_init(&attr);
9456         if( status ) exit( status );
9457
9458         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9459         if( status ) exit( status );
9460
9461 #define ATTR    &attr
9462 #else
9463 #if HAVE_PTHREADS_D4
9464 #define ATTR    pthread_attr_default
9465 #else
9466 #define ATTR    NULL
9467 #endif
9468 #endif
9469         /* make sure pthread_create() isn't just a stub */
9470         status = pthread_create(&t, ATTR, task, NULL);
9471         if( status ) exit( status );
9472
9473         /* make sure pthread_detach() isn't just a stub */
9474 #if HAVE_PTHREADS_D4
9475         status = pthread_detach( &t );
9476 #else
9477         status = pthread_detach( t );
9478 #endif
9479
9480 #ifdef HAVE_LINUX_THREADS
9481         pthread_kill_other_threads_np();
9482 #endif
9483
9484         exit( status );
9485
9486 }
9487
9488 EOF
9489 if { (eval echo configure:9490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9490 then
9491   ol_cv_pthread_lpthreads_lexc=yes
9492 else
9493   echo "configure: failed program was:" >&5
9494   cat conftest.$ac_ext >&5
9495   rm -fr conftest*
9496   ol_cv_pthread_lpthreads_lexc=no
9497 fi
9498 rm -fr conftest*
9499 fi
9500
9501
9502                 # restore the LIBS
9503                 LIBS="$ol_LIBS"
9504         
9505 fi
9506
9507 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9508
9509         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9510                 ol_link_pthreads="-lpthreads -lexc"
9511                 ol_link_threads=posix
9512         fi
9513 fi
9514
9515
9516                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9517 if test "$ol_link_threads" = no ; then
9518         # try -lpthreads
9519         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9520 echo "configure:9521: checking for pthread link with -lpthreads" >&5
9521 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   
9525                 # save the flags
9526                 ol_LIBS="$LIBS"
9527                 LIBS="-lpthreads $LIBS"
9528
9529                 if test "$cross_compiling" = yes; then
9530   cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533 /* pthread test headers */
9534 #include <pthread.h>
9535 #ifndef NULL
9536 #define NULL (void*)0
9537 #endif
9538
9539 static void *task(p)
9540         void *p;
9541 {
9542         return (void *) (p == NULL);
9543 }
9544
9545 int main() {
9546
9547         /* pthread test function */
9548         pthread_t t;
9549         int status;
9550 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9551         /* This system (e.g. AIX) defaults detached; must override */
9552         pthread_attr_t attr;
9553
9554         status = pthread_attr_init(&attr);
9555         if( status ) exit( status );
9556
9557         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9558         if( status ) exit( status );
9559
9560 #define ATTR    &attr
9561 #else
9562 #if HAVE_PTHREADS_D4
9563 #define ATTR    pthread_attr_default
9564 #else
9565 #define ATTR    NULL
9566 #endif
9567 #endif
9568         /* make sure pthread_create() isn't just a stub */
9569         status = pthread_create(&t, ATTR, task, NULL);
9570         if( status ) exit( status );
9571
9572         /* make sure pthread_detach() isn't just a stub */
9573 #if HAVE_PTHREADS_D4
9574         status = pthread_detach( &t );
9575 #else
9576         status = pthread_detach( t );
9577 #endif
9578
9579 #ifdef HAVE_LINUX_THREADS
9580         pthread_kill_other_threads_np();
9581 #endif
9582
9583         exit( status );
9584
9585 ; return 0; }
9586 EOF
9587 if { (eval echo configure:9588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9588   rm -rf conftest*
9589   ol_cv_pthread_lib_lpthreads=yes
9590 else
9591   echo "configure: failed program was:" >&5
9592   cat conftest.$ac_ext >&5
9593   rm -rf conftest*
9594   ol_cv_pthread_lib_lpthreads=no
9595 fi
9596 rm -f conftest*
9597 else
9598   cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 /* pthread test headers */
9602 #include <pthread.h>
9603 #ifndef NULL
9604 #define NULL (void*)0
9605 #endif
9606
9607 static void *task(p)
9608         void *p;
9609 {
9610         return (void *) (p == NULL);
9611 }
9612
9613
9614 int main(argc, argv)
9615         int argc;
9616         char **argv;
9617 {
9618
9619         /* pthread test function */
9620         pthread_t t;
9621         int status;
9622 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9623         /* This system (e.g. AIX) defaults detached; must override */
9624         pthread_attr_t attr;
9625
9626         status = pthread_attr_init(&attr);
9627         if( status ) exit( status );
9628
9629         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9630         if( status ) exit( status );
9631
9632 #define ATTR    &attr
9633 #else
9634 #if HAVE_PTHREADS_D4
9635 #define ATTR    pthread_attr_default
9636 #else
9637 #define ATTR    NULL
9638 #endif
9639 #endif
9640         /* make sure pthread_create() isn't just a stub */
9641         status = pthread_create(&t, ATTR, task, NULL);
9642         if( status ) exit( status );
9643
9644         /* make sure pthread_detach() isn't just a stub */
9645 #if HAVE_PTHREADS_D4
9646         status = pthread_detach( &t );
9647 #else
9648         status = pthread_detach( t );
9649 #endif
9650
9651 #ifdef HAVE_LINUX_THREADS
9652         pthread_kill_other_threads_np();
9653 #endif
9654
9655         exit( status );
9656
9657 }
9658
9659 EOF
9660 if { (eval echo configure:9661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9661 then
9662   ol_cv_pthread_lib_lpthreads=yes
9663 else
9664   echo "configure: failed program was:" >&5
9665   cat conftest.$ac_ext >&5
9666   rm -fr conftest*
9667   ol_cv_pthread_lib_lpthreads=no
9668 fi
9669 rm -fr conftest*
9670 fi
9671
9672
9673                 # restore the LIBS
9674                 LIBS="$ol_LIBS"
9675         
9676 fi
9677
9678 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9679
9680         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9681                 ol_link_pthreads="-lpthreads"
9682                 ol_link_threads=posix
9683         fi
9684 fi
9685
9686
9687                 if test $ol_link_threads != no ; then
9688                         cat >> confdefs.h <<\EOF
9689 #define HAVE_PTHREADS 1
9690 EOF
9691
9692
9693                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9694
9695                                                 save_CPPFLAGS="$CPPFLAGS"
9696                         save_LIBS="$LIBS"
9697                         LIBS="$LTHREAD_LIBS $LIBS"
9698
9699                                                                                                 for ac_func in sched_yield pthread_yield
9700 do
9701 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9702 echo "configure:9703: checking for $ac_func" >&5
9703 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9704   echo $ac_n "(cached) $ac_c" 1>&6
9705 else
9706   cat > conftest.$ac_ext <<EOF
9707 #line 9708 "configure"
9708 #include "confdefs.h"
9709 /* System header to define __stub macros and hopefully few prototypes,
9710     which can conflict with char $ac_func(); below.  */
9711 #include <assert.h>
9712 /* Override any gcc2 internal prototype to avoid an error.  */
9713 /* We use char because int might match the return type of a gcc2
9714     builtin and then its argument prototype would still apply.  */
9715 char $ac_func();
9716 char (*f)();
9717
9718 int main() {
9719
9720 /* The GNU C library defines this for functions which it implements
9721     to always fail with ENOSYS.  Some functions are actually named
9722     something starting with __ and the normal name is an alias.  */
9723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9724 choke me
9725 #else
9726 f = $ac_func;
9727 #endif
9728
9729 ; return 0; }
9730 EOF
9731 if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9732   rm -rf conftest*
9733   eval "ac_cv_func_$ac_func=yes"
9734 else
9735   echo "configure: failed program was:" >&5
9736   cat conftest.$ac_ext >&5
9737   rm -rf conftest*
9738   eval "ac_cv_func_$ac_func=no"
9739 fi
9740 rm -f conftest*
9741 fi
9742
9743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9744   echo "$ac_t""yes" 1>&6
9745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9746   cat >> confdefs.h <<EOF
9747 #define $ac_tr_func 1
9748 EOF
9749  
9750 else
9751   echo "$ac_t""no" 1>&6
9752 fi
9753 done
9754
9755
9756                         if test $ac_cv_func_sched_yield = no -a \
9757                                 $ac_cv_func_pthread_yield = no ; then
9758                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9759 echo "configure:9760: checking for sched_yield in -lrt" >&5
9760 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9761 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   ac_save_LIBS="$LIBS"
9765 LIBS="-lrt  $LIBS"
9766 cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769 /* Override any gcc2 internal prototype to avoid an error.  */
9770 /* We use char because int might match the return type of a gcc2
9771     builtin and then its argument prototype would still apply.  */
9772 char sched_yield();
9773
9774 int main() {
9775 sched_yield()
9776 ; return 0; }
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9779   rm -rf conftest*
9780   eval "ac_cv_lib_$ac_lib_var=yes"
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -rf conftest*
9785   eval "ac_cv_lib_$ac_lib_var=no"
9786 fi
9787 rm -f conftest*
9788 LIBS="$ac_save_LIBS"
9789
9790 fi
9791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9792   echo "$ac_t""yes" 1>&6
9793   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9794                                         cat >> confdefs.h <<\EOF
9795 #define HAVE_SCHED_YIELD 1
9796 EOF
9797
9798                                         ac_cv_func_sched_yield=yes
9799 else
9800   echo "$ac_t""no" 1>&6
9801 ac_cv_func_sched_yield=no
9802 fi
9803
9804                         fi
9805                         if test $ac_cv_func_sched_yield = no -a \
9806                                 $ac_cv_func_pthread_yield = no ; then
9807                                                                                                 for ac_func in thr_yield
9808 do
9809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9810 echo "configure:9811: checking for $ac_func" >&5
9811 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9812   echo $ac_n "(cached) $ac_c" 1>&6
9813 else
9814   cat > conftest.$ac_ext <<EOF
9815 #line 9816 "configure"
9816 #include "confdefs.h"
9817 /* System header to define __stub macros and hopefully few prototypes,
9818     which can conflict with char $ac_func(); below.  */
9819 #include <assert.h>
9820 /* Override any gcc2 internal prototype to avoid an error.  */
9821 /* We use char because int might match the return type of a gcc2
9822     builtin and then its argument prototype would still apply.  */
9823 char $ac_func();
9824 char (*f)();
9825
9826 int main() {
9827
9828 /* The GNU C library defines this for functions which it implements
9829     to always fail with ENOSYS.  Some functions are actually named
9830     something starting with __ and the normal name is an alias.  */
9831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9832 choke me
9833 #else
9834 f = $ac_func;
9835 #endif
9836
9837 ; return 0; }
9838 EOF
9839 if { (eval echo configure:9840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9840   rm -rf conftest*
9841   eval "ac_cv_func_$ac_func=yes"
9842 else
9843   echo "configure: failed program was:" >&5
9844   cat conftest.$ac_ext >&5
9845   rm -rf conftest*
9846   eval "ac_cv_func_$ac_func=no"
9847 fi
9848 rm -f conftest*
9849 fi
9850
9851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9852   echo "$ac_t""yes" 1>&6
9853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9854   cat >> confdefs.h <<EOF
9855 #define $ac_tr_func 1
9856 EOF
9857  
9858 else
9859   echo "$ac_t""no" 1>&6
9860 fi
9861 done
9862
9863                         fi
9864                         if test $ac_cv_func_sched_yield = no -a \
9865                                 $ac_cv_func_pthread_yield = no -a \
9866                                 "$ac_cv_func_thr_yield" = no ; then
9867                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9868                         fi
9869
9870                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9871 do
9872 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9873 echo "configure:9874: checking for $ac_func" >&5
9874 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9875   echo $ac_n "(cached) $ac_c" 1>&6
9876 else
9877   cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 /* System header to define __stub macros and hopefully few prototypes,
9881     which can conflict with char $ac_func(); below.  */
9882 #include <assert.h>
9883 /* Override any gcc2 internal prototype to avoid an error.  */
9884 /* We use char because int might match the return type of a gcc2
9885     builtin and then its argument prototype would still apply.  */
9886 char $ac_func();
9887 char (*f)();
9888
9889 int main() {
9890
9891 /* The GNU C library defines this for functions which it implements
9892     to always fail with ENOSYS.  Some functions are actually named
9893     something starting with __ and the normal name is an alias.  */
9894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9895 choke me
9896 #else
9897 f = $ac_func;
9898 #endif
9899
9900 ; return 0; }
9901 EOF
9902 if { (eval echo configure:9903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9903   rm -rf conftest*
9904   eval "ac_cv_func_$ac_func=yes"
9905 else
9906   echo "configure: failed program was:" >&5
9907   cat conftest.$ac_ext >&5
9908   rm -rf conftest*
9909   eval "ac_cv_func_$ac_func=no"
9910 fi
9911 rm -f conftest*
9912 fi
9913
9914 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9915   echo "$ac_t""yes" 1>&6
9916     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9917   cat >> confdefs.h <<EOF
9918 #define $ac_tr_func 1
9919 EOF
9920  
9921 else
9922   echo "$ac_t""no" 1>&6
9923 fi
9924 done
9925
9926
9927                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9928 echo "configure:9929: checking for pthread_detach with <pthread.h>" >&5
9929 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9930   echo $ac_n "(cached) $ac_c" 1>&6
9931 else
9932   
9933                                                                 cat > conftest.$ac_ext <<EOF
9934 #line 9935 "configure"
9935 #include "confdefs.h"
9936
9937 #include <pthread.h>
9938 #ifndef NULL
9939 #define NULL (void*)0
9940 #endif
9941
9942 int main() {
9943 pthread_detach(NULL);
9944 ; return 0; }
9945 EOF
9946 if { (eval echo configure:9947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9947   rm -rf conftest*
9948   ol_cv_func_pthread_detach=yes
9949 else
9950   echo "configure: failed program was:" >&5
9951   cat conftest.$ac_ext >&5
9952   rm -rf conftest*
9953   ol_cv_func_pthread_detach=no
9954 fi
9955 rm -f conftest*
9956                         
9957 fi
9958
9959 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9960
9961                         if test $ol_cv_func_pthread_detach = no ; then
9962                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9963                         fi
9964
9965                         cat >> confdefs.h <<\EOF
9966 #define HAVE_PTHREAD_DETACH 1
9967 EOF
9968
9969
9970                                                 for ac_func in \
9971                                 pthread_setconcurrency \
9972                                 pthread_getconcurrency \
9973                                 thr_setconcurrency \
9974                                 thr_getconcurrency \
9975                         
9976 do
9977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9978 echo "configure:9979: checking for $ac_func" >&5
9979 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9980   echo $ac_n "(cached) $ac_c" 1>&6
9981 else
9982   cat > conftest.$ac_ext <<EOF
9983 #line 9984 "configure"
9984 #include "confdefs.h"
9985 /* System header to define __stub macros and hopefully few prototypes,
9986     which can conflict with char $ac_func(); below.  */
9987 #include <assert.h>
9988 /* Override any gcc2 internal prototype to avoid an error.  */
9989 /* We use char because int might match the return type of a gcc2
9990     builtin and then its argument prototype would still apply.  */
9991 char $ac_func();
9992 char (*f)();
9993
9994 int main() {
9995
9996 /* The GNU C library defines this for functions which it implements
9997     to always fail with ENOSYS.  Some functions are actually named
9998     something starting with __ and the normal name is an alias.  */
9999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10000 choke me
10001 #else
10002 f = $ac_func;
10003 #endif
10004
10005 ; return 0; }
10006 EOF
10007 if { (eval echo configure:10008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10008   rm -rf conftest*
10009   eval "ac_cv_func_$ac_func=yes"
10010 else
10011   echo "configure: failed program was:" >&5
10012   cat conftest.$ac_ext >&5
10013   rm -rf conftest*
10014   eval "ac_cv_func_$ac_func=no"
10015 fi
10016 rm -f conftest*
10017 fi
10018
10019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10020   echo "$ac_t""yes" 1>&6
10021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10022   cat >> confdefs.h <<EOF
10023 #define $ac_tr_func 1
10024 EOF
10025  
10026 else
10027   echo "$ac_t""no" 1>&6
10028 fi
10029 done
10030
10031
10032                         
10033         for ac_func in pthread_kill_other_threads_np
10034 do
10035 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10036 echo "configure:10037: checking for $ac_func" >&5
10037 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10038   echo $ac_n "(cached) $ac_c" 1>&6
10039 else
10040   cat > conftest.$ac_ext <<EOF
10041 #line 10042 "configure"
10042 #include "confdefs.h"
10043 /* System header to define __stub macros and hopefully few prototypes,
10044     which can conflict with char $ac_func(); below.  */
10045 #include <assert.h>
10046 /* Override any gcc2 internal prototype to avoid an error.  */
10047 /* We use char because int might match the return type of a gcc2
10048     builtin and then its argument prototype would still apply.  */
10049 char $ac_func();
10050 char (*f)();
10051
10052 int main() {
10053
10054 /* The GNU C library defines this for functions which it implements
10055     to always fail with ENOSYS.  Some functions are actually named
10056     something starting with __ and the normal name is an alias.  */
10057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10058 choke me
10059 #else
10060 f = $ac_func;
10061 #endif
10062
10063 ; return 0; }
10064 EOF
10065 if { (eval echo configure:10066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10066   rm -rf conftest*
10067   eval "ac_cv_func_$ac_func=yes"
10068 else
10069   echo "configure: failed program was:" >&5
10070   cat conftest.$ac_ext >&5
10071   rm -rf conftest*
10072   eval "ac_cv_func_$ac_func=no"
10073 fi
10074 rm -f conftest*
10075 fi
10076
10077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10078   echo "$ac_t""yes" 1>&6
10079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10080   cat >> confdefs.h <<EOF
10081 #define $ac_tr_func 1
10082 EOF
10083  
10084 else
10085   echo "$ac_t""no" 1>&6
10086 fi
10087 done
10088
10089         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10090 echo "configure:10091: checking for LinuxThreads implementation" >&5
10091 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10092   echo $ac_n "(cached) $ac_c" 1>&6
10093 else
10094   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10095 fi
10096
10097 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10098
10099                         
10100         
10101         
10102         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10103 echo "configure:10104: checking for LinuxThreads consistency" >&5
10104 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10105   echo $ac_n "(cached) $ac_c" 1>&6
10106 else
10107   
10108                 if test $ol_cv_header_linux_threads = yes -a \
10109                         $ol_cv_sys_linux_threads = yes; then
10110                         ol_cv_linux_threads=yes
10111                 elif test $ol_cv_header_linux_threads = no -a \
10112                         $ol_cv_sys_linux_threads = no; then
10113                         ol_cv_linux_threads=no
10114                 else
10115                         ol_cv_linux_threads=error
10116                 fi
10117         
10118 fi
10119
10120 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10121
10122
10123                         if test $ol_cv_linux_threads = error; then
10124                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10125                         fi
10126
10127                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10128 echo "configure:10129: checking if pthread_create() works" >&5
10129 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10130   echo $ac_n "(cached) $ac_c" 1>&6
10131 else
10132   
10133                         if test "$cross_compiling" = yes; then
10134                                 ol_cv_pthread_create_works=yes
10135 else
10136   cat > conftest.$ac_ext <<EOF
10137 #line 10138 "configure"
10138 #include "confdefs.h"
10139 /* pthread test headers */
10140 #include <pthread.h>
10141 #ifndef NULL
10142 #define NULL (void*)0
10143 #endif
10144
10145 static void *task(p)
10146         void *p;
10147 {
10148         return (void *) (p == NULL);
10149 }
10150
10151
10152 int main(argc, argv)
10153         int argc;
10154         char **argv;
10155 {
10156
10157         /* pthread test function */
10158         pthread_t t;
10159         int status;
10160 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10161         /* This system (e.g. AIX) defaults detached; must override */
10162         pthread_attr_t attr;
10163
10164         status = pthread_attr_init(&attr);
10165         if( status ) exit( status );
10166
10167         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10168         if( status ) exit( status );
10169
10170 #define ATTR    &attr
10171 #else
10172 #if HAVE_PTHREADS_D4
10173 #define ATTR    pthread_attr_default
10174 #else
10175 #define ATTR    NULL
10176 #endif
10177 #endif
10178         /* make sure pthread_create() isn't just a stub */
10179         status = pthread_create(&t, ATTR, task, NULL);
10180         if( status ) exit( status );
10181
10182         /* make sure pthread_detach() isn't just a stub */
10183 #if HAVE_PTHREADS_D4
10184         status = pthread_detach( &t );
10185 #else
10186         status = pthread_detach( t );
10187 #endif
10188
10189 #ifdef HAVE_LINUX_THREADS
10190         pthread_kill_other_threads_np();
10191 #endif
10192
10193         exit( status );
10194
10195 }
10196
10197 EOF
10198 if { (eval echo configure:10199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10199 then
10200   ol_cv_pthread_create_works=yes
10201 else
10202   echo "configure: failed program was:" >&5
10203   cat conftest.$ac_ext >&5
10204   rm -fr conftest*
10205   ol_cv_pthread_create_works=no
10206 fi
10207 rm -fr conftest*
10208 fi
10209
10210 fi
10211
10212 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10213
10214                         if test $ol_cv_pthread_create_works = no ; then
10215                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10216                         fi
10217
10218                                                 if test $ol_with_yielding_select = auto ; then
10219                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10220 echo "configure:10221: checking if select yields when using pthreads" >&5
10221 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10222   echo $ac_n "(cached) $ac_c" 1>&6
10223 else
10224   
10225                                 if test "$cross_compiling" = yes; then
10226   ol_cv_pthread_select_yields=cross
10227 else
10228   cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231
10232 #include <sys/types.h>
10233 #include <sys/time.h>
10234 #include <unistd.h>
10235 #include <pthread.h>
10236 #ifndef NULL
10237 #define NULL (void*) 0
10238 #endif
10239
10240 static int fildes[2];
10241
10242 static void *task(p)
10243         void *p;
10244 {
10245         int i;
10246         struct timeval tv;
10247
10248         fd_set rfds;
10249
10250         tv.tv_sec=10;
10251         tv.tv_usec=0;
10252
10253         FD_ZERO(&rfds);
10254         FD_SET(fildes[0], &rfds);
10255
10256         /* we're not interested in any fds */
10257         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10258
10259         if(i < 0) {
10260                 perror("select");
10261                 exit(10);
10262         }
10263
10264         exit(0); /* if we exit here, the select blocked the whole process */
10265 }
10266
10267 int main(argc, argv)
10268         int argc;
10269         char **argv;
10270 {
10271         pthread_t t;
10272
10273         /* create a pipe to select */
10274         if(pipe(&fildes[0])) {
10275                 perror("select");
10276                 exit(1);
10277         }
10278
10279 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10280         (void) pthread_setconcurrency(2);
10281 #else
10282 #ifdef HAVE_THR_SETCONCURRENCY
10283         /* Set Solaris LWP concurrency to 2 */
10284         thr_setconcurrency(2);
10285 #endif
10286 #endif
10287
10288 #if HAVE_PTHREADS_D4
10289         pthread_create(&t, pthread_attr_default, task, NULL);
10290 #else
10291         pthread_create(&t, NULL, task, NULL);
10292 #endif
10293
10294 #if HAVE_SCHED_YIELD
10295         sched_yield();  /* make sure task runs first */
10296 #else
10297 #ifdef HAVE_PTHREAD_YIELD
10298         pthread_yield();        /* make sure task runs first */
10299 #endif
10300 #endif
10301
10302         exit(2);
10303 }
10304 EOF
10305 if { (eval echo configure:10306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10306 then
10307   ol_cv_pthread_select_yields=no
10308 else
10309   echo "configure: failed program was:" >&5
10310   cat conftest.$ac_ext >&5
10311   rm -fr conftest*
10312   ol_cv_pthread_select_yields=yes
10313 fi
10314 rm -fr conftest*
10315 fi
10316
10317 fi
10318
10319 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10320
10321                                 if test $ol_cv_pthread_select_yields = cross ; then
10322                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10323                                 fi
10324
10325                                 if test $ol_cv_pthread_select_yields = yes ; then
10326                                         ol_with_yielding_select=yes
10327                                 fi
10328                         fi
10329
10330                                                 CPPFLAGS="$save_CPPFLAGS"
10331                         LIBS="$save_LIBS"
10332                 else
10333                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10334                 fi
10335         fi
10336
10337         if test $ol_with_threads = posix ; then
10338                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10339         fi
10340 fi
10341
10342 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10343         -o $ol_with_threads = mach ; then
10344
10345                 for ac_hdr in mach/cthreads.h
10346 do
10347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10349 echo "configure:10350: checking for $ac_hdr" >&5
10350 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10351   echo $ac_n "(cached) $ac_c" 1>&6
10352 else
10353   cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 #include <$ac_hdr>
10357 EOF
10358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10359 { (eval echo configure:10360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10361 if test -z "$ac_err"; then
10362   rm -rf conftest*
10363   eval "ac_cv_header_$ac_safe=yes"
10364 else
10365   echo "$ac_err" >&5
10366   echo "configure: failed program was:" >&5
10367   cat conftest.$ac_ext >&5
10368   rm -rf conftest*
10369   eval "ac_cv_header_$ac_safe=no"
10370 fi
10371 rm -f conftest*
10372 fi
10373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10374   echo "$ac_t""yes" 1>&6
10375     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10376   cat >> confdefs.h <<EOF
10377 #define $ac_tr_hdr 1
10378 EOF
10379  
10380 else
10381   echo "$ac_t""no" 1>&6
10382 fi
10383 done
10384
10385         if test $ac_cv_header_mach_cthreads_h = yes ; then
10386                 ol_with_threads=found
10387
10388                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10389 echo "configure:10390: checking for cthread_fork" >&5
10390 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393   cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 /* System header to define __stub macros and hopefully few prototypes,
10397     which can conflict with char cthread_fork(); below.  */
10398 #include <assert.h>
10399 /* Override any gcc2 internal prototype to avoid an error.  */
10400 /* We use char because int might match the return type of a gcc2
10401     builtin and then its argument prototype would still apply.  */
10402 char cthread_fork();
10403 char (*f)();
10404
10405 int main() {
10406
10407 /* The GNU C library defines this for functions which it implements
10408     to always fail with ENOSYS.  Some functions are actually named
10409     something starting with __ and the normal name is an alias.  */
10410 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10411 choke me
10412 #else
10413 f = cthread_fork;
10414 #endif
10415
10416 ; return 0; }
10417 EOF
10418 if { (eval echo configure:10419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10419   rm -rf conftest*
10420   eval "ac_cv_func_cthread_fork=yes"
10421 else
10422   echo "configure: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   rm -rf conftest*
10425   eval "ac_cv_func_cthread_fork=no"
10426 fi
10427 rm -f conftest*
10428 fi
10429
10430 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10431   echo "$ac_t""yes" 1>&6
10432   ol_link_threads=yes
10433 else
10434   echo "$ac_t""no" 1>&6
10435 fi
10436
10437
10438                 if test $ol_link_threads = no ; then
10439                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10440 echo "configure:10441: checking for cthread_fork with -all_load" >&5
10441 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10442   echo $ac_n "(cached) $ac_c" 1>&6
10443 else
10444   
10445                                                                 save_LIBS="$LIBS"
10446                                 LIBS="-all_load $LIBS"
10447                                 cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450 #include <mach/cthreads.h>
10451 int main() {
10452
10453                                         cthread_fork((void *)0, (void *)0);
10454                                         
10455 ; return 0; }
10456 EOF
10457 if { (eval echo configure:10458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10458   rm -rf conftest*
10459   ol_cv_cthread_all_load=yes
10460 else
10461   echo "configure: failed program was:" >&5
10462   cat conftest.$ac_ext >&5
10463   rm -rf conftest*
10464   ol_cv_cthread_all_load=no
10465 fi
10466 rm -f conftest*
10467                                                                 LIBS="$save_LIBS"
10468                         
10469 fi
10470
10471 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10472
10473                         if test $ol_cv_cthread_all_load = yes ; then
10474                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10475                                 ol_link_threads=mach
10476                         fi
10477                 fi
10478
10479                 if test $ol_link_threads != no ; then
10480                         : check for cthread specific functionality here
10481                         cat >> confdefs.h <<\EOF
10482 #define HAVE_MACH_CTHREADS 1
10483 EOF
10484
10485                 else
10486                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10487                 fi
10488         fi
10489
10490         if test $ol_with_threads = mach ; then
10491                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10492         fi
10493 fi
10494
10495 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10496         -o $ol_with_threads = pth ; then
10497
10498         for ac_hdr in pth.h
10499 do
10500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10502 echo "configure:10503: checking for $ac_hdr" >&5
10503 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10504   echo $ac_n "(cached) $ac_c" 1>&6
10505 else
10506   cat > conftest.$ac_ext <<EOF
10507 #line 10508 "configure"
10508 #include "confdefs.h"
10509 #include <$ac_hdr>
10510 EOF
10511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10512 { (eval echo configure:10513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10514 if test -z "$ac_err"; then
10515   rm -rf conftest*
10516   eval "ac_cv_header_$ac_safe=yes"
10517 else
10518   echo "$ac_err" >&5
10519   echo "configure: failed program was:" >&5
10520   cat conftest.$ac_ext >&5
10521   rm -rf conftest*
10522   eval "ac_cv_header_$ac_safe=no"
10523 fi
10524 rm -f conftest*
10525 fi
10526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10527   echo "$ac_t""yes" 1>&6
10528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10529   cat >> confdefs.h <<EOF
10530 #define $ac_tr_hdr 1
10531 EOF
10532  
10533 else
10534   echo "$ac_t""no" 1>&6
10535 fi
10536 done
10537
10538
10539         if test $ac_cv_header_pth_h = yes ; then
10540                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10541 echo "configure:10542: checking for pth_version in -lpth" >&5
10542 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10544   echo $ac_n "(cached) $ac_c" 1>&6
10545 else
10546   ac_save_LIBS="$LIBS"
10547 LIBS="-lpth  $LIBS"
10548 cat > conftest.$ac_ext <<EOF
10549 #line 10550 "configure"
10550 #include "confdefs.h"
10551 /* Override any gcc2 internal prototype to avoid an error.  */
10552 /* We use char because int might match the return type of a gcc2
10553     builtin and then its argument prototype would still apply.  */
10554 char pth_version();
10555
10556 int main() {
10557 pth_version()
10558 ; return 0; }
10559 EOF
10560 if { (eval echo configure:10561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10561   rm -rf conftest*
10562   eval "ac_cv_lib_$ac_lib_var=yes"
10563 else
10564   echo "configure: failed program was:" >&5
10565   cat conftest.$ac_ext >&5
10566   rm -rf conftest*
10567   eval "ac_cv_lib_$ac_lib_var=no"
10568 fi
10569 rm -f conftest*
10570 LIBS="$ac_save_LIBS"
10571
10572 fi
10573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10574   echo "$ac_t""yes" 1>&6
10575   have_pth=yes
10576 else
10577   echo "$ac_t""no" 1>&6
10578 have_pth=no
10579 fi
10580
10581
10582                 if test $have_pth = yes ; then
10583                         cat >> confdefs.h <<\EOF
10584 #define HAVE_GNU_PTH 1
10585 EOF
10586
10587                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10588                         ol_link_threads=pth
10589
10590                         if test $ol_with_yielding_select = auto ; then
10591                                 ol_with_yielding_select=yes
10592                         fi
10593                 fi
10594         fi
10595 fi
10596
10597 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10598         -o $ol_with_threads = lwp ; then
10599
10600                 for ac_hdr in thread.h synch.h
10601 do
10602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10604 echo "configure:10605: checking for $ac_hdr" >&5
10605 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10606   echo $ac_n "(cached) $ac_c" 1>&6
10607 else
10608   cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611 #include <$ac_hdr>
10612 EOF
10613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10614 { (eval echo configure:10615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10616 if test -z "$ac_err"; then
10617   rm -rf conftest*
10618   eval "ac_cv_header_$ac_safe=yes"
10619 else
10620   echo "$ac_err" >&5
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -rf conftest*
10624   eval "ac_cv_header_$ac_safe=no"
10625 fi
10626 rm -f conftest*
10627 fi
10628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10629   echo "$ac_t""yes" 1>&6
10630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10631   cat >> confdefs.h <<EOF
10632 #define $ac_tr_hdr 1
10633 EOF
10634  
10635 else
10636   echo "$ac_t""no" 1>&6
10637 fi
10638 done
10639
10640         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10641                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10642 echo "configure:10643: checking for thr_create in -lthread" >&5
10643 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10645   echo $ac_n "(cached) $ac_c" 1>&6
10646 else
10647   ac_save_LIBS="$LIBS"
10648 LIBS="-lthread  $LIBS"
10649 cat > conftest.$ac_ext <<EOF
10650 #line 10651 "configure"
10651 #include "confdefs.h"
10652 /* Override any gcc2 internal prototype to avoid an error.  */
10653 /* We use char because int might match the return type of a gcc2
10654     builtin and then its argument prototype would still apply.  */
10655 char thr_create();
10656
10657 int main() {
10658 thr_create()
10659 ; return 0; }
10660 EOF
10661 if { (eval echo configure:10662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10662   rm -rf conftest*
10663   eval "ac_cv_lib_$ac_lib_var=yes"
10664 else
10665   echo "configure: failed program was:" >&5
10666   cat conftest.$ac_ext >&5
10667   rm -rf conftest*
10668   eval "ac_cv_lib_$ac_lib_var=no"
10669 fi
10670 rm -f conftest*
10671 LIBS="$ac_save_LIBS"
10672
10673 fi
10674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10675   echo "$ac_t""yes" 1>&6
10676   have_thr=yes
10677 else
10678   echo "$ac_t""no" 1>&6
10679 have_thr=no
10680 fi
10681
10682
10683                 if test $have_thr = yes ; then
10684                         cat >> confdefs.h <<\EOF
10685 #define HAVE_THR 1
10686 EOF
10687
10688                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10689                         ol_link_threads=thr
10690
10691                         if test $ol_with_yielding_select = auto ; then
10692                                 ol_with_yielding_select=yes
10693                         fi
10694
10695                                                 for ac_func in \
10696                                 thr_setconcurrency \
10697                                 thr_getconcurrency \
10698                         
10699 do
10700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10701 echo "configure:10702: checking for $ac_func" >&5
10702 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708 /* System header to define __stub macros and hopefully few prototypes,
10709     which can conflict with char $ac_func(); below.  */
10710 #include <assert.h>
10711 /* Override any gcc2 internal prototype to avoid an error.  */
10712 /* We use char because int might match the return type of a gcc2
10713     builtin and then its argument prototype would still apply.  */
10714 char $ac_func();
10715 char (*f)();
10716
10717 int main() {
10718
10719 /* The GNU C library defines this for functions which it implements
10720     to always fail with ENOSYS.  Some functions are actually named
10721     something starting with __ and the normal name is an alias.  */
10722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10723 choke me
10724 #else
10725 f = $ac_func;
10726 #endif
10727
10728 ; return 0; }
10729 EOF
10730 if { (eval echo configure:10731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10731   rm -rf conftest*
10732   eval "ac_cv_func_$ac_func=yes"
10733 else
10734   echo "configure: failed program was:" >&5
10735   cat conftest.$ac_ext >&5
10736   rm -rf conftest*
10737   eval "ac_cv_func_$ac_func=no"
10738 fi
10739 rm -f conftest*
10740 fi
10741
10742 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10743   echo "$ac_t""yes" 1>&6
10744     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10745   cat >> confdefs.h <<EOF
10746 #define $ac_tr_func 1
10747 EOF
10748  
10749 else
10750   echo "$ac_t""no" 1>&6
10751 fi
10752 done
10753
10754                 fi
10755         fi
10756
10757                 for ac_hdr in lwp/lwp.h
10758 do
10759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10761 echo "configure:10762: checking for $ac_hdr" >&5
10762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10763   echo $ac_n "(cached) $ac_c" 1>&6
10764 else
10765   cat > conftest.$ac_ext <<EOF
10766 #line 10767 "configure"
10767 #include "confdefs.h"
10768 #include <$ac_hdr>
10769 EOF
10770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10771 { (eval echo configure:10772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10773 if test -z "$ac_err"; then
10774   rm -rf conftest*
10775   eval "ac_cv_header_$ac_safe=yes"
10776 else
10777   echo "$ac_err" >&5
10778   echo "configure: failed program was:" >&5
10779   cat conftest.$ac_ext >&5
10780   rm -rf conftest*
10781   eval "ac_cv_header_$ac_safe=no"
10782 fi
10783 rm -f conftest*
10784 fi
10785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10786   echo "$ac_t""yes" 1>&6
10787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10788   cat >> confdefs.h <<EOF
10789 #define $ac_tr_hdr 1
10790 EOF
10791  
10792 else
10793   echo "$ac_t""no" 1>&6
10794 fi
10795 done
10796
10797         if test $ac_cv_header_lwp_lwp_h = yes ; then
10798                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10799 echo "configure:10800: checking for lwp_create in -llwp" >&5
10800 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10802   echo $ac_n "(cached) $ac_c" 1>&6
10803 else
10804   ac_save_LIBS="$LIBS"
10805 LIBS="-llwp  $LIBS"
10806 cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809 /* Override any gcc2 internal prototype to avoid an error.  */
10810 /* We use char because int might match the return type of a gcc2
10811     builtin and then its argument prototype would still apply.  */
10812 char lwp_create();
10813
10814 int main() {
10815 lwp_create()
10816 ; return 0; }
10817 EOF
10818 if { (eval echo configure:10819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10819   rm -rf conftest*
10820   eval "ac_cv_lib_$ac_lib_var=yes"
10821 else
10822   echo "configure: failed program was:" >&5
10823   cat conftest.$ac_ext >&5
10824   rm -rf conftest*
10825   eval "ac_cv_lib_$ac_lib_var=no"
10826 fi
10827 rm -f conftest*
10828 LIBS="$ac_save_LIBS"
10829
10830 fi
10831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10832   echo "$ac_t""yes" 1>&6
10833   have_lwp=yes
10834 else
10835   echo "$ac_t""no" 1>&6
10836 have_lwp=no
10837 fi
10838
10839
10840                 if test $have_lwp = yes ; then
10841                         cat >> confdefs.h <<\EOF
10842 #define HAVE_LWP 1
10843 EOF
10844
10845                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10846                         ol_link_threads=lwp
10847
10848                         if test $ol_with_yielding_select = auto ; then
10849                                 ol_with_yielding_select=no
10850                         fi
10851                 fi
10852         fi
10853 fi
10854
10855 if test $ol_with_yielding_select = yes ; then
10856         cat >> confdefs.h <<\EOF
10857 #define HAVE_YIELDING_SELECT 1
10858 EOF
10859
10860 fi
10861
10862 if test $ol_with_threads = manual ; then
10863                 ol_link_threads=yes
10864
10865         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10866
10867         for ac_hdr in pthread.h sched.h
10868 do
10869 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10870 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10871 echo "configure:10872: checking for $ac_hdr" >&5
10872 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   cat > conftest.$ac_ext <<EOF
10876 #line 10877 "configure"
10877 #include "confdefs.h"
10878 #include <$ac_hdr>
10879 EOF
10880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10881 { (eval echo configure:10882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10883 if test -z "$ac_err"; then
10884   rm -rf conftest*
10885   eval "ac_cv_header_$ac_safe=yes"
10886 else
10887   echo "$ac_err" >&5
10888   echo "configure: failed program was:" >&5
10889   cat conftest.$ac_ext >&5
10890   rm -rf conftest*
10891   eval "ac_cv_header_$ac_safe=no"
10892 fi
10893 rm -f conftest*
10894 fi
10895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10896   echo "$ac_t""yes" 1>&6
10897     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10898   cat >> confdefs.h <<EOF
10899 #define $ac_tr_hdr 1
10900 EOF
10901  
10902 else
10903   echo "$ac_t""no" 1>&6
10904 fi
10905 done
10906
10907         for ac_func in sched_yield pthread_yield
10908 do
10909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10910 echo "configure:10911: checking for $ac_func" >&5
10911 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10912   echo $ac_n "(cached) $ac_c" 1>&6
10913 else
10914   cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917 /* System header to define __stub macros and hopefully few prototypes,
10918     which can conflict with char $ac_func(); below.  */
10919 #include <assert.h>
10920 /* Override any gcc2 internal prototype to avoid an error.  */
10921 /* We use char because int might match the return type of a gcc2
10922     builtin and then its argument prototype would still apply.  */
10923 char $ac_func();
10924 char (*f)();
10925
10926 int main() {
10927
10928 /* The GNU C library defines this for functions which it implements
10929     to always fail with ENOSYS.  Some functions are actually named
10930     something starting with __ and the normal name is an alias.  */
10931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10932 choke me
10933 #else
10934 f = $ac_func;
10935 #endif
10936
10937 ; return 0; }
10938 EOF
10939 if { (eval echo configure:10940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10940   rm -rf conftest*
10941   eval "ac_cv_func_$ac_func=yes"
10942 else
10943   echo "configure: failed program was:" >&5
10944   cat conftest.$ac_ext >&5
10945   rm -rf conftest*
10946   eval "ac_cv_func_$ac_func=no"
10947 fi
10948 rm -f conftest*
10949 fi
10950
10951 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10952   echo "$ac_t""yes" 1>&6
10953     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10954   cat >> confdefs.h <<EOF
10955 #define $ac_tr_func 1
10956 EOF
10957  
10958 else
10959   echo "$ac_t""no" 1>&6
10960 fi
10961 done
10962
10963         
10964         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10965 echo "configure:10966: checking for LinuxThreads pthread.h" >&5
10966 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10967   echo $ac_n "(cached) $ac_c" 1>&6
10968 else
10969   cat > conftest.$ac_ext <<EOF
10970 #line 10971 "configure"
10971 #include "confdefs.h"
10972 #include <pthread.h>
10973 EOF
10974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10975   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10976   rm -rf conftest*
10977   ol_cv_header_linux_threads=yes
10978 else
10979   rm -rf conftest*
10980   ol_cv_header_linux_threads=no
10981 fi
10982 rm -f conftest*
10983
10984                 
10985 fi
10986
10987 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10988         if test $ol_cv_header_linux_threads = yes; then
10989                 cat >> confdefs.h <<\EOF
10990 #define HAVE_LINUX_THREADS 1
10991 EOF
10992
10993         fi
10994
10995
10996         for ac_hdr in mach/cthreads.h
10997 do
10998 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10999 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11000 echo "configure:11001: checking for $ac_hdr" >&5
11001 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11002   echo $ac_n "(cached) $ac_c" 1>&6
11003 else
11004   cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007 #include <$ac_hdr>
11008 EOF
11009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11010 { (eval echo configure:11011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11012 if test -z "$ac_err"; then
11013   rm -rf conftest*
11014   eval "ac_cv_header_$ac_safe=yes"
11015 else
11016   echo "$ac_err" >&5
11017   echo "configure: failed program was:" >&5
11018   cat conftest.$ac_ext >&5
11019   rm -rf conftest*
11020   eval "ac_cv_header_$ac_safe=no"
11021 fi
11022 rm -f conftest*
11023 fi
11024 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11025   echo "$ac_t""yes" 1>&6
11026     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11027   cat >> confdefs.h <<EOF
11028 #define $ac_tr_hdr 1
11029 EOF
11030  
11031 else
11032   echo "$ac_t""no" 1>&6
11033 fi
11034 done
11035
11036         for ac_hdr in lwp/lwp.h
11037 do
11038 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11039 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11040 echo "configure:11041: checking for $ac_hdr" >&5
11041 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11042   echo $ac_n "(cached) $ac_c" 1>&6
11043 else
11044   cat > conftest.$ac_ext <<EOF
11045 #line 11046 "configure"
11046 #include "confdefs.h"
11047 #include <$ac_hdr>
11048 EOF
11049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11050 { (eval echo configure:11051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11052 if test -z "$ac_err"; then
11053   rm -rf conftest*
11054   eval "ac_cv_header_$ac_safe=yes"
11055 else
11056   echo "$ac_err" >&5
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=no"
11061 fi
11062 rm -f conftest*
11063 fi
11064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11065   echo "$ac_t""yes" 1>&6
11066     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11067   cat >> confdefs.h <<EOF
11068 #define $ac_tr_hdr 1
11069 EOF
11070  
11071 else
11072   echo "$ac_t""no" 1>&6
11073 fi
11074 done
11075
11076         for ac_hdr in thread.h synch.h
11077 do
11078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11080 echo "configure:11081: checking for $ac_hdr" >&5
11081 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11082   echo $ac_n "(cached) $ac_c" 1>&6
11083 else
11084   cat > conftest.$ac_ext <<EOF
11085 #line 11086 "configure"
11086 #include "confdefs.h"
11087 #include <$ac_hdr>
11088 EOF
11089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11090 { (eval echo configure:11091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11092 if test -z "$ac_err"; then
11093   rm -rf conftest*
11094   eval "ac_cv_header_$ac_safe=yes"
11095 else
11096   echo "$ac_err" >&5
11097   echo "configure: failed program was:" >&5
11098   cat conftest.$ac_ext >&5
11099   rm -rf conftest*
11100   eval "ac_cv_header_$ac_safe=no"
11101 fi
11102 rm -f conftest*
11103 fi
11104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11105   echo "$ac_t""yes" 1>&6
11106     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11107   cat >> confdefs.h <<EOF
11108 #define $ac_tr_hdr 1
11109 EOF
11110  
11111 else
11112   echo "$ac_t""no" 1>&6
11113 fi
11114 done
11115
11116 fi
11117
11118 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11119                         cat >> confdefs.h <<\EOF
11120 #define REENTRANT 1
11121 EOF
11122
11123         cat >> confdefs.h <<\EOF
11124 #define _REENTRANT 1
11125 EOF
11126
11127         cat >> confdefs.h <<\EOF
11128 #define THREAD_SAFE 1
11129 EOF
11130
11131         cat >> confdefs.h <<\EOF
11132 #define _THREAD_SAFE 1
11133 EOF
11134
11135         cat >> confdefs.h <<\EOF
11136 #define THREADSAFE 1
11137 EOF
11138
11139         cat >> confdefs.h <<\EOF
11140 #define _THREADSAFE 1
11141 EOF
11142
11143         cat >> confdefs.h <<\EOF
11144 #define _SGI_MP_SOURCE 1
11145 EOF
11146
11147
11148                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11149 echo "configure:11150: checking for thread specific errno" >&5
11150 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11151   echo $ac_n "(cached) $ac_c" 1>&6
11152 else
11153   
11154                 cat > conftest.$ac_ext <<EOF
11155 #line 11156 "configure"
11156 #include "confdefs.h"
11157 #include <errno.h>
11158 int main() {
11159 errno = 0;
11160 ; return 0; }
11161 EOF
11162 if { (eval echo configure:11163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11163   rm -rf conftest*
11164   ol_cv_errno_thread_specific=yes
11165 else
11166   echo "configure: failed program was:" >&5
11167   cat conftest.$ac_ext >&5
11168   rm -rf conftest*
11169   ol_cv_errno_thread_specific=no
11170 fi
11171 rm -f conftest*
11172         
11173 fi
11174
11175 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11176
11177                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11178 echo "configure:11179: checking for thread specific h_errno" >&5
11179 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11180   echo $ac_n "(cached) $ac_c" 1>&6
11181 else
11182   
11183                 cat > conftest.$ac_ext <<EOF
11184 #line 11185 "configure"
11185 #include "confdefs.h"
11186 #include <netdb.h>
11187 int main() {
11188 h_errno = 0;
11189 ; return 0; }
11190 EOF
11191 if { (eval echo configure:11192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11192   rm -rf conftest*
11193   ol_cv_h_errno_thread_specific=yes
11194 else
11195   echo "configure: failed program was:" >&5
11196   cat conftest.$ac_ext >&5
11197   rm -rf conftest*
11198   ol_cv_h_errno_thread_specific=no
11199 fi
11200 rm -f conftest*
11201         
11202 fi
11203
11204 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11205
11206         if test $ol_cv_errno_thread_specific != yes \
11207                 -o $ol_cv_h_errno_thread_specific != yes ; then
11208                 LIBS="$LTHREAD_LIBS $LIBS"
11209                 LTHREAD_LIBS=""
11210         fi
11211
11212 fi  
11213
11214 if test $ol_link_threads = no ; then
11215         if test $ol_with_threads = yes ; then
11216                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11217         fi
11218
11219         if test $ol_with_threads = auto ; then
11220                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11221                 ol_with_threads=no
11222         fi
11223
11224         cat >> confdefs.h <<\EOF
11225 #define NO_THREADS 1
11226 EOF
11227
11228         LTHREAD_LIBS=""
11229 fi
11230
11231 if test $ol_link_threads != no ; then
11232         cat >> confdefs.h <<\EOF
11233 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11234 EOF
11235
11236 fi
11237
11238 ol_link_ldbm=no 
11239
11240 if test $ol_with_ldbm_api = auto \
11241         -o $ol_with_ldbm_api = berkeley \
11242         -o $ol_with_ldbm_api = bcompat ; then
11243
11244         if test $ol_with_ldbm_api = bcompat; then \
11245                 ol_cv_berkeley_db=no
11246 for ac_hdr in db_185.h db.h
11247 do
11248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11250 echo "configure:11251: checking for $ac_hdr" >&5
11251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11252   echo $ac_n "(cached) $ac_c" 1>&6
11253 else
11254   cat > conftest.$ac_ext <<EOF
11255 #line 11256 "configure"
11256 #include "confdefs.h"
11257 #include <$ac_hdr>
11258 EOF
11259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11260 { (eval echo configure:11261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11262 if test -z "$ac_err"; then
11263   rm -rf conftest*
11264   eval "ac_cv_header_$ac_safe=yes"
11265 else
11266   echo "$ac_err" >&5
11267   echo "configure: failed program was:" >&5
11268   cat conftest.$ac_ext >&5
11269   rm -rf conftest*
11270   eval "ac_cv_header_$ac_safe=no"
11271 fi
11272 rm -f conftest*
11273 fi
11274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11275   echo "$ac_t""yes" 1>&6
11276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11277   cat >> confdefs.h <<EOF
11278 #define $ac_tr_hdr 1
11279 EOF
11280  
11281 else
11282   echo "$ac_t""no" 1>&6
11283 fi
11284 done
11285
11286 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11287         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11288 echo "configure:11289: checking if Berkeley DB header compatibility" >&5
11289 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11290   echo $ac_n "(cached) $ac_c" 1>&6
11291 else
11292   
11293                 cat > conftest.$ac_ext <<EOF
11294 #line 11295 "configure"
11295 #include "confdefs.h"
11296
11297 #if HAVE_DB_185_H
11298 #       include <db_185.h>
11299 #else
11300 #       include <db.h>
11301 #endif
11302
11303  /* this check could be improved */
11304 #ifndef DB_VERSION_MAJOR
11305 #       define DB_VERSION_MAJOR 1
11306 #endif
11307
11308 #if DB_VERSION_MAJOR == 1 
11309         __db_version_1
11310 #endif
11311
11312 EOF
11313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11314   egrep "__db_version_1" >/dev/null 2>&1; then
11315   rm -rf conftest*
11316   ol_cv_header_db1=yes
11317 else
11318   rm -rf conftest*
11319   ol_cv_header_db1=no
11320 fi
11321 rm -f conftest*
11322
11323 fi
11324
11325 echo "$ac_t""$ol_cv_header_db1" 1>&6
11326
11327         if test ol_cv_header_db1=yes ; then
11328                 ol_cv_lib_db=no
11329 if test $ol_cv_lib_db = no ; then
11330         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11331 echo "configure:11332: checking for Berkeley DB link (default)" >&5
11332 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11333   echo $ac_n "(cached) $ac_c" 1>&6
11334 else
11335   
11336         ol_DB_LIB=
11337         ol_LIBS=$LIBS
11338         LIBS="$ol_DB_LIB $LIBS"
11339
11340         cat > conftest.$ac_ext <<EOF
11341 #line 11342 "configure"
11342 #include "confdefs.h"
11343
11344 #ifdef HAVE_DB_185_H
11345 # include <db_185.h>
11346 #else
11347 # include <db.h>
11348 #endif
11349
11350 #ifndef DB_VERSION_MAJOR
11351 # define DB_VERSION_MAJOR 1
11352 #endif
11353
11354 #ifndef NULL
11355 #define NULL ((void*)0)
11356 #endif
11357
11358 int main() {
11359
11360 #if DB_VERSION_MAJOR > 2
11361         db_env_create( NULL, 0 );
11362 #elif DB_VERSION_MAJOR > 1
11363         db_appexit( NULL );
11364 #else
11365         (void) dbopen( NULL, 0, 0, 0, NULL);
11366 #endif
11367
11368 ; return 0; }
11369 EOF
11370 if { (eval echo configure:11371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11371   rm -rf conftest*
11372   ol_cv_db_none=yes
11373 else
11374   echo "configure: failed program was:" >&5
11375   cat conftest.$ac_ext >&5
11376   rm -rf conftest*
11377   ol_cv_db_none=no
11378 fi
11379 rm -f conftest*
11380
11381         LIBS="$ol_LIBS"
11382
11383 fi
11384
11385 echo "$ac_t""$ol_cv_db_none" 1>&6
11386
11387         if test $ol_cv_db_none = yes ; then
11388                 ol_cv_lib_db=yes
11389         fi
11390 fi
11391
11392 if test $ol_cv_lib_db = no ; then
11393         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11394 echo "configure:11395: checking for Berkeley DB link (-ldb)" >&5
11395 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   
11399         ol_DB_LIB=-ldb
11400         ol_LIBS=$LIBS
11401         LIBS="$ol_DB_LIB $LIBS"
11402
11403         cat > conftest.$ac_ext <<EOF
11404 #line 11405 "configure"
11405 #include "confdefs.h"
11406
11407 #ifdef HAVE_DB_185_H
11408 # include <db_185.h>
11409 #else
11410 # include <db.h>
11411 #endif
11412
11413 #ifndef DB_VERSION_MAJOR
11414 # define DB_VERSION_MAJOR 1
11415 #endif
11416
11417 #ifndef NULL
11418 #define NULL ((void*)0)
11419 #endif
11420
11421 int main() {
11422
11423 #if DB_VERSION_MAJOR > 2
11424         db_env_create( NULL, 0 );
11425 #elif DB_VERSION_MAJOR > 1
11426         db_appexit( NULL );
11427 #else
11428         (void) dbopen( NULL, 0, 0, 0, NULL);
11429 #endif
11430
11431 ; return 0; }
11432 EOF
11433 if { (eval echo configure:11434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11434   rm -rf conftest*
11435   ol_cv_db_db=yes
11436 else
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -rf conftest*
11440   ol_cv_db_db=no
11441 fi
11442 rm -f conftest*
11443
11444         LIBS="$ol_LIBS"
11445
11446 fi
11447
11448 echo "$ac_t""$ol_cv_db_db" 1>&6
11449
11450         if test $ol_cv_db_db = yes ; then
11451                 ol_cv_lib_db=-ldb
11452         fi
11453 fi
11454
11455 if test $ol_cv_lib_db = no ; then
11456         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11457 echo "configure:11458: checking for Berkeley DB link (-ldb3)" >&5
11458 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11459   echo $ac_n "(cached) $ac_c" 1>&6
11460 else
11461   
11462         ol_DB_LIB=-ldb3
11463         ol_LIBS=$LIBS
11464         LIBS="$ol_DB_LIB $LIBS"
11465
11466         cat > conftest.$ac_ext <<EOF
11467 #line 11468 "configure"
11468 #include "confdefs.h"
11469
11470 #ifdef HAVE_DB_185_H
11471 # include <db_185.h>
11472 #else
11473 # include <db.h>
11474 #endif
11475
11476 #ifndef DB_VERSION_MAJOR
11477 # define DB_VERSION_MAJOR 1
11478 #endif
11479
11480 #ifndef NULL
11481 #define NULL ((void*)0)
11482 #endif
11483
11484 int main() {
11485
11486 #if DB_VERSION_MAJOR > 2
11487         db_env_create( NULL, 0 );
11488 #elif DB_VERSION_MAJOR > 1
11489         db_appexit( NULL );
11490 #else
11491         (void) dbopen( NULL, 0, 0, 0, NULL);
11492 #endif
11493
11494 ; return 0; }
11495 EOF
11496 if { (eval echo configure:11497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11497   rm -rf conftest*
11498   ol_cv_db_db3=yes
11499 else
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   ol_cv_db_db3=no
11504 fi
11505 rm -f conftest*
11506
11507         LIBS="$ol_LIBS"
11508
11509 fi
11510
11511 echo "$ac_t""$ol_cv_db_db3" 1>&6
11512
11513         if test $ol_cv_db_db3 = yes ; then
11514                 ol_cv_lib_db=-ldb3
11515         fi
11516 fi
11517
11518 if test $ol_cv_lib_db = no ; then
11519         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11520 echo "configure:11521: checking for Berkeley DB link (-ldb2)" >&5
11521 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11522   echo $ac_n "(cached) $ac_c" 1>&6
11523 else
11524   
11525         ol_DB_LIB=-ldb2
11526         ol_LIBS=$LIBS
11527         LIBS="$ol_DB_LIB $LIBS"
11528
11529         cat > conftest.$ac_ext <<EOF
11530 #line 11531 "configure"
11531 #include "confdefs.h"
11532
11533 #ifdef HAVE_DB_185_H
11534 # include <db_185.h>
11535 #else
11536 # include <db.h>
11537 #endif
11538
11539 #ifndef DB_VERSION_MAJOR
11540 # define DB_VERSION_MAJOR 1
11541 #endif
11542
11543 #ifndef NULL
11544 #define NULL ((void*)0)
11545 #endif
11546
11547 int main() {
11548
11549 #if DB_VERSION_MAJOR > 2
11550         db_env_create( NULL, 0 );
11551 #elif DB_VERSION_MAJOR > 1
11552         db_appexit( NULL );
11553 #else
11554         (void) dbopen( NULL, 0, 0, 0, NULL);
11555 #endif
11556
11557 ; return 0; }
11558 EOF
11559 if { (eval echo configure:11560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11560   rm -rf conftest*
11561   ol_cv_db_db2=yes
11562 else
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -rf conftest*
11566   ol_cv_db_db2=no
11567 fi
11568 rm -f conftest*
11569
11570         LIBS="$ol_LIBS"
11571
11572 fi
11573
11574 echo "$ac_t""$ol_cv_db_db2" 1>&6
11575
11576         if test $ol_cv_db_db2 = yes ; then
11577                 ol_cv_lib_db=-ldb2
11578         fi
11579 fi
11580
11581 if test $ol_cv_lib_db = no ; then
11582         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11583 echo "configure:11584: checking for Berkeley DB link (-ldb1)" >&5
11584 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11585   echo $ac_n "(cached) $ac_c" 1>&6
11586 else
11587   
11588         ol_DB_LIB=-ldb1
11589         ol_LIBS=$LIBS
11590         LIBS="$ol_DB_LIB $LIBS"
11591
11592         cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595
11596 #ifdef HAVE_DB_185_H
11597 # include <db_185.h>
11598 #else
11599 # include <db.h>
11600 #endif
11601
11602 #ifndef DB_VERSION_MAJOR
11603 # define DB_VERSION_MAJOR 1
11604 #endif
11605
11606 #ifndef NULL
11607 #define NULL ((void*)0)
11608 #endif
11609
11610 int main() {
11611
11612 #if DB_VERSION_MAJOR > 2
11613         db_env_create( NULL, 0 );
11614 #elif DB_VERSION_MAJOR > 1
11615         db_appexit( NULL );
11616 #else
11617         (void) dbopen( NULL, 0, 0, 0, NULL);
11618 #endif
11619
11620 ; return 0; }
11621 EOF
11622 if { (eval echo configure:11623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11623   rm -rf conftest*
11624   ol_cv_db_db1=yes
11625 else
11626   echo "configure: failed program was:" >&5
11627   cat conftest.$ac_ext >&5
11628   rm -rf conftest*
11629   ol_cv_db_db1=no
11630 fi
11631 rm -f conftest*
11632
11633         LIBS="$ol_LIBS"
11634
11635 fi
11636
11637 echo "$ac_t""$ol_cv_db_db1" 1>&6
11638
11639         if test $ol_cv_db_db1 = yes ; then
11640                 ol_cv_lib_db=-ldb1
11641         fi
11642 fi
11643
11644
11645                 if test "$ol_cv_lib_db" != no ; then
11646                         ol_cv_berkeley_db=yes
11647                 fi
11648         fi
11649 fi
11650
11651         else
11652                 ol_cv_berkeley_db=no
11653 for ac_hdr in db.h
11654 do
11655 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11656 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11657 echo "configure:11658: checking for $ac_hdr" >&5
11658 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11659   echo $ac_n "(cached) $ac_c" 1>&6
11660 else
11661   cat > conftest.$ac_ext <<EOF
11662 #line 11663 "configure"
11663 #include "confdefs.h"
11664 #include <$ac_hdr>
11665 EOF
11666 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11667 { (eval echo configure:11668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11668 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11669 if test -z "$ac_err"; then
11670   rm -rf conftest*
11671   eval "ac_cv_header_$ac_safe=yes"
11672 else
11673   echo "$ac_err" >&5
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -rf conftest*
11677   eval "ac_cv_header_$ac_safe=no"
11678 fi
11679 rm -f conftest*
11680 fi
11681 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11682   echo "$ac_t""yes" 1>&6
11683     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11684   cat >> confdefs.h <<EOF
11685 #define $ac_tr_hdr 1
11686 EOF
11687  
11688 else
11689   echo "$ac_t""no" 1>&6
11690 fi
11691 done
11692
11693 if test $ac_cv_header_db_h = yes; then
11694         ol_cv_lib_db=no
11695 if test $ol_cv_lib_db = no ; then
11696         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11697 echo "configure:11698: checking for Berkeley DB link (default)" >&5
11698 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11699   echo $ac_n "(cached) $ac_c" 1>&6
11700 else
11701   
11702         ol_DB_LIB=
11703         ol_LIBS=$LIBS
11704         LIBS="$ol_DB_LIB $LIBS"
11705
11706         cat > conftest.$ac_ext <<EOF
11707 #line 11708 "configure"
11708 #include "confdefs.h"
11709
11710 #ifdef HAVE_DB_185_H
11711 # include <db_185.h>
11712 #else
11713 # include <db.h>
11714 #endif
11715
11716 #ifndef DB_VERSION_MAJOR
11717 # define DB_VERSION_MAJOR 1
11718 #endif
11719
11720 #ifndef NULL
11721 #define NULL ((void*)0)
11722 #endif
11723
11724 int main() {
11725
11726 #if DB_VERSION_MAJOR > 2
11727         db_env_create( NULL, 0 );
11728 #elif DB_VERSION_MAJOR > 1
11729         db_appexit( NULL );
11730 #else
11731         (void) dbopen( NULL, 0, 0, 0, NULL);
11732 #endif
11733
11734 ; return 0; }
11735 EOF
11736 if { (eval echo configure:11737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11737   rm -rf conftest*
11738   ol_cv_db_none=yes
11739 else
11740   echo "configure: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   rm -rf conftest*
11743   ol_cv_db_none=no
11744 fi
11745 rm -f conftest*
11746
11747         LIBS="$ol_LIBS"
11748
11749 fi
11750
11751 echo "$ac_t""$ol_cv_db_none" 1>&6
11752
11753         if test $ol_cv_db_none = yes ; then
11754                 ol_cv_lib_db=yes
11755         fi
11756 fi
11757
11758 if test $ol_cv_lib_db = no ; then
11759         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11760 echo "configure:11761: checking for Berkeley DB link (-ldb)" >&5
11761 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11762   echo $ac_n "(cached) $ac_c" 1>&6
11763 else
11764   
11765         ol_DB_LIB=-ldb
11766         ol_LIBS=$LIBS
11767         LIBS="$ol_DB_LIB $LIBS"
11768
11769         cat > conftest.$ac_ext <<EOF
11770 #line 11771 "configure"
11771 #include "confdefs.h"
11772
11773 #ifdef HAVE_DB_185_H
11774 # include <db_185.h>
11775 #else
11776 # include <db.h>
11777 #endif
11778
11779 #ifndef DB_VERSION_MAJOR
11780 # define DB_VERSION_MAJOR 1
11781 #endif
11782
11783 #ifndef NULL
11784 #define NULL ((void*)0)
11785 #endif
11786
11787 int main() {
11788
11789 #if DB_VERSION_MAJOR > 2
11790         db_env_create( NULL, 0 );
11791 #elif DB_VERSION_MAJOR > 1
11792         db_appexit( NULL );
11793 #else
11794         (void) dbopen( NULL, 0, 0, 0, NULL);
11795 #endif
11796
11797 ; return 0; }
11798 EOF
11799 if { (eval echo configure:11800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11800   rm -rf conftest*
11801   ol_cv_db_db=yes
11802 else
11803   echo "configure: failed program was:" >&5
11804   cat conftest.$ac_ext >&5
11805   rm -rf conftest*
11806   ol_cv_db_db=no
11807 fi
11808 rm -f conftest*
11809
11810         LIBS="$ol_LIBS"
11811
11812 fi
11813
11814 echo "$ac_t""$ol_cv_db_db" 1>&6
11815
11816         if test $ol_cv_db_db = yes ; then
11817                 ol_cv_lib_db=-ldb
11818         fi
11819 fi
11820
11821 if test $ol_cv_lib_db = no ; then
11822         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11823 echo "configure:11824: checking for Berkeley DB link (-ldb3)" >&5
11824 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11825   echo $ac_n "(cached) $ac_c" 1>&6
11826 else
11827   
11828         ol_DB_LIB=-ldb3
11829         ol_LIBS=$LIBS
11830         LIBS="$ol_DB_LIB $LIBS"
11831
11832         cat > conftest.$ac_ext <<EOF
11833 #line 11834 "configure"
11834 #include "confdefs.h"
11835
11836 #ifdef HAVE_DB_185_H
11837 # include <db_185.h>
11838 #else
11839 # include <db.h>
11840 #endif
11841
11842 #ifndef DB_VERSION_MAJOR
11843 # define DB_VERSION_MAJOR 1
11844 #endif
11845
11846 #ifndef NULL
11847 #define NULL ((void*)0)
11848 #endif
11849
11850 int main() {
11851
11852 #if DB_VERSION_MAJOR > 2
11853         db_env_create( NULL, 0 );
11854 #elif DB_VERSION_MAJOR > 1
11855         db_appexit( NULL );
11856 #else
11857         (void) dbopen( NULL, 0, 0, 0, NULL);
11858 #endif
11859
11860 ; return 0; }
11861 EOF
11862 if { (eval echo configure:11863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11863   rm -rf conftest*
11864   ol_cv_db_db3=yes
11865 else
11866   echo "configure: failed program was:" >&5
11867   cat conftest.$ac_ext >&5
11868   rm -rf conftest*
11869   ol_cv_db_db3=no
11870 fi
11871 rm -f conftest*
11872
11873         LIBS="$ol_LIBS"
11874
11875 fi
11876
11877 echo "$ac_t""$ol_cv_db_db3" 1>&6
11878
11879         if test $ol_cv_db_db3 = yes ; then
11880                 ol_cv_lib_db=-ldb3
11881         fi
11882 fi
11883
11884 if test $ol_cv_lib_db = no ; then
11885         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11886 echo "configure:11887: checking for Berkeley DB link (-ldb2)" >&5
11887 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11888   echo $ac_n "(cached) $ac_c" 1>&6
11889 else
11890   
11891         ol_DB_LIB=-ldb2
11892         ol_LIBS=$LIBS
11893         LIBS="$ol_DB_LIB $LIBS"
11894
11895         cat > conftest.$ac_ext <<EOF
11896 #line 11897 "configure"
11897 #include "confdefs.h"
11898
11899 #ifdef HAVE_DB_185_H
11900 # include <db_185.h>
11901 #else
11902 # include <db.h>
11903 #endif
11904
11905 #ifndef DB_VERSION_MAJOR
11906 # define DB_VERSION_MAJOR 1
11907 #endif
11908
11909 #ifndef NULL
11910 #define NULL ((void*)0)
11911 #endif
11912
11913 int main() {
11914
11915 #if DB_VERSION_MAJOR > 2
11916         db_env_create( NULL, 0 );
11917 #elif DB_VERSION_MAJOR > 1
11918         db_appexit( NULL );
11919 #else
11920         (void) dbopen( NULL, 0, 0, 0, NULL);
11921 #endif
11922
11923 ; return 0; }
11924 EOF
11925 if { (eval echo configure:11926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11926   rm -rf conftest*
11927   ol_cv_db_db2=yes
11928 else
11929   echo "configure: failed program was:" >&5
11930   cat conftest.$ac_ext >&5
11931   rm -rf conftest*
11932   ol_cv_db_db2=no
11933 fi
11934 rm -f conftest*
11935
11936         LIBS="$ol_LIBS"
11937
11938 fi
11939
11940 echo "$ac_t""$ol_cv_db_db2" 1>&6
11941
11942         if test $ol_cv_db_db2 = yes ; then
11943                 ol_cv_lib_db=-ldb2
11944         fi
11945 fi
11946
11947 if test $ol_cv_lib_db = no ; then
11948         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11949 echo "configure:11950: checking for Berkeley DB link (-ldb1)" >&5
11950 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11951   echo $ac_n "(cached) $ac_c" 1>&6
11952 else
11953   
11954         ol_DB_LIB=-ldb1
11955         ol_LIBS=$LIBS
11956         LIBS="$ol_DB_LIB $LIBS"
11957
11958         cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961
11962 #ifdef HAVE_DB_185_H
11963 # include <db_185.h>
11964 #else
11965 # include <db.h>
11966 #endif
11967
11968 #ifndef DB_VERSION_MAJOR
11969 # define DB_VERSION_MAJOR 1
11970 #endif
11971
11972 #ifndef NULL
11973 #define NULL ((void*)0)
11974 #endif
11975
11976 int main() {
11977
11978 #if DB_VERSION_MAJOR > 2
11979         db_env_create( NULL, 0 );
11980 #elif DB_VERSION_MAJOR > 1
11981         db_appexit( NULL );
11982 #else
11983         (void) dbopen( NULL, 0, 0, 0, NULL);
11984 #endif
11985
11986 ; return 0; }
11987 EOF
11988 if { (eval echo configure:11989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11989   rm -rf conftest*
11990   ol_cv_db_db1=yes
11991 else
11992   echo "configure: failed program was:" >&5
11993   cat conftest.$ac_ext >&5
11994   rm -rf conftest*
11995   ol_cv_db_db1=no
11996 fi
11997 rm -f conftest*
11998
11999         LIBS="$ol_LIBS"
12000
12001 fi
12002
12003 echo "$ac_t""$ol_cv_db_db1" 1>&6
12004
12005         if test $ol_cv_db_db1 = yes ; then
12006                 ol_cv_lib_db=-ldb1
12007         fi
12008 fi
12009
12010
12011         if test "$ol_cv_lib_db" != no ; then
12012                 ol_cv_berkeley_db=yes
12013                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12014 echo "configure:12015: checking for Berkeley DB thread support" >&5
12015 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12016   echo $ac_n "(cached) $ac_c" 1>&6
12017 else
12018   
12019         ol_LIBS="$LIBS"
12020         if test $ol_cv_lib_db != yes ; then
12021                 LIBS="$ol_cv_lib_db"
12022         fi
12023
12024         if test "$cross_compiling" = yes; then
12025   ol_cv_berkeley_db_thread=cross
12026 else
12027   cat > conftest.$ac_ext <<EOF
12028 #line 12029 "configure"
12029 #include "confdefs.h"
12030
12031 #ifdef HAVE_DB_185_H
12032         choke me;
12033 #else
12034 #include <db.h>
12035 #endif
12036 #ifndef NULL
12037 #define NULL ((void *)0)
12038 #endif
12039 main()
12040 {
12041         int rc;
12042         u_int32_t flags = DB_CREATE | DB_THREAD;
12043
12044 #if DB_VERSION_MAJOR > 2
12045         DB_ENV *env = NULL;
12046
12047         rc = db_env_create( &env, 0 );
12048
12049         if( rc == 0 ) {
12050 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12051                 rc = env->open( env, NULL, flags, 0 );
12052 #else
12053                 rc = env->open( env, NULL, NULL, flags, 0 );
12054 #endif
12055         }
12056
12057 #else
12058         DB_ENV env;
12059         memset( &env, '\0', sizeof(env) );
12060
12061         rc = db_appinit( NULL, NULL, &env, flags );
12062
12063         if( rc == 0 ) {
12064                 db_appexit( &env );
12065         }
12066 #endif
12067 #if DB_VERSION_MAJOR > 2
12068 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12069         env->remove( env, NULL, DB_FORCE);
12070 #else
12071         env->remove( env, NULL, NULL, DB_FORCE);
12072 #endif
12073 #endif
12074
12075         return rc;
12076 }
12077 EOF
12078 if { (eval echo configure:12079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12079 then
12080   ol_cv_berkeley_db_thread=yes
12081 else
12082   echo "configure: failed program was:" >&5
12083   cat conftest.$ac_ext >&5
12084   rm -fr conftest*
12085   ol_cv_berkeley_db_thread=no
12086 fi
12087 rm -fr conftest*
12088 fi
12089
12090
12091         LIBS="$ol_LIBS"
12092
12093         if test $ol_cv_berkeley_db_thread != no ; then
12094                 cat >> confdefs.h <<\EOF
12095 #define HAVE_BERKELEY_DB_THREAD 1
12096 EOF
12097
12098         fi
12099
12100 fi
12101
12102 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12103         fi
12104 fi
12105
12106         fi
12107
12108         if test $ol_cv_berkeley_db != no ; then
12109                 cat >> confdefs.h <<\EOF
12110 #define HAVE_BERKELEY_DB 1
12111 EOF
12112
12113
12114                 ol_link_ldbm=berkeley
12115                 ol_with_ldbm_api=db
12116
12117                 if test $ol_with_ldbm_type = hash ; then
12118                         cat >> confdefs.h <<\EOF
12119 #define LDBM_USE_DBHASH 1
12120 EOF
12121
12122                 else
12123                         cat >> confdefs.h <<\EOF
12124 #define LDBM_USE_DBBTREE 1
12125 EOF
12126
12127                 fi
12128
12129                                                 if test $ol_cv_lib_db != yes ; then
12130                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12131                 fi
12132         fi
12133 fi
12134
12135 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12136         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12137         ol_with_ldbm_api=none
12138 fi
12139
12140 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12141         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12142 echo "configure:12143: checking for MDBM library" >&5
12143 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12144   echo $ac_n "(cached) $ac_c" 1>&6
12145 else
12146         ol_LIBS="$LIBS"
12147         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12148 echo "configure:12149: checking for mdbm_set_chain" >&5
12149 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12150   echo $ac_n "(cached) $ac_c" 1>&6
12151 else
12152   cat > conftest.$ac_ext <<EOF
12153 #line 12154 "configure"
12154 #include "confdefs.h"
12155 /* System header to define __stub macros and hopefully few prototypes,
12156     which can conflict with char mdbm_set_chain(); below.  */
12157 #include <assert.h>
12158 /* Override any gcc2 internal prototype to avoid an error.  */
12159 /* We use char because int might match the return type of a gcc2
12160     builtin and then its argument prototype would still apply.  */
12161 char mdbm_set_chain();
12162 char (*f)();
12163
12164 int main() {
12165
12166 /* The GNU C library defines this for functions which it implements
12167     to always fail with ENOSYS.  Some functions are actually named
12168     something starting with __ and the normal name is an alias.  */
12169 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12170 choke me
12171 #else
12172 f = mdbm_set_chain;
12173 #endif
12174
12175 ; return 0; }
12176 EOF
12177 if { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12178   rm -rf conftest*
12179   eval "ac_cv_func_mdbm_set_chain=yes"
12180 else
12181   echo "configure: failed program was:" >&5
12182   cat conftest.$ac_ext >&5
12183   rm -rf conftest*
12184   eval "ac_cv_func_mdbm_set_chain=no"
12185 fi
12186 rm -f conftest*
12187 fi
12188
12189 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12190   echo "$ac_t""yes" 1>&6
12191   ol_cv_lib_mdbm=yes
12192 else
12193   echo "$ac_t""no" 1>&6
12194
12195                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12196 echo "configure:12197: checking for mdbm_set_chain in -lmdbm" >&5
12197 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12198 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12199   echo $ac_n "(cached) $ac_c" 1>&6
12200 else
12201   ac_save_LIBS="$LIBS"
12202 LIBS="-lmdbm  $LIBS"
12203 cat > conftest.$ac_ext <<EOF
12204 #line 12205 "configure"
12205 #include "confdefs.h"
12206 /* Override any gcc2 internal prototype to avoid an error.  */
12207 /* We use char because int might match the return type of a gcc2
12208     builtin and then its argument prototype would still apply.  */
12209 char mdbm_set_chain();
12210
12211 int main() {
12212 mdbm_set_chain()
12213 ; return 0; }
12214 EOF
12215 if { (eval echo configure:12216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12216   rm -rf conftest*
12217   eval "ac_cv_lib_$ac_lib_var=yes"
12218 else
12219   echo "configure: failed program was:" >&5
12220   cat conftest.$ac_ext >&5
12221   rm -rf conftest*
12222   eval "ac_cv_lib_$ac_lib_var=no"
12223 fi
12224 rm -f conftest*
12225 LIBS="$ac_save_LIBS"
12226
12227 fi
12228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12229   echo "$ac_t""yes" 1>&6
12230   ol_cv_lib_mdbm=-lmdbm
12231 else
12232   echo "$ac_t""no" 1>&6
12233 ol_cv_lib_mdbm=no
12234 fi
12235
12236         
12237 fi
12238
12239         LIBS="$ol_LIBS"
12240
12241 fi
12242
12243 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12244
12245
12246  for ac_hdr in mdbm.h
12247 do
12248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12250 echo "configure:12251: checking for $ac_hdr" >&5
12251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12252   echo $ac_n "(cached) $ac_c" 1>&6
12253 else
12254   cat > conftest.$ac_ext <<EOF
12255 #line 12256 "configure"
12256 #include "confdefs.h"
12257 #include <$ac_hdr>
12258 EOF
12259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12260 { (eval echo configure:12261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12262 if test -z "$ac_err"; then
12263   rm -rf conftest*
12264   eval "ac_cv_header_$ac_safe=yes"
12265 else
12266   echo "$ac_err" >&5
12267   echo "configure: failed program was:" >&5
12268   cat conftest.$ac_ext >&5
12269   rm -rf conftest*
12270   eval "ac_cv_header_$ac_safe=no"
12271 fi
12272 rm -f conftest*
12273 fi
12274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12275   echo "$ac_t""yes" 1>&6
12276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12277   cat >> confdefs.h <<EOF
12278 #define $ac_tr_hdr 1
12279 EOF
12280  
12281 else
12282   echo "$ac_t""no" 1>&6
12283 fi
12284 done
12285
12286  echo $ac_n "checking for db""... $ac_c" 1>&6
12287 echo "configure:12288: checking for db" >&5
12288 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12289   echo $ac_n "(cached) $ac_c" 1>&6
12290 else
12291   
12292         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12293                 ol_cv_mdbm=no
12294         else
12295                 ol_cv_mdbm=yes
12296         fi
12297
12298 fi
12299
12300 echo "$ac_t""$ol_cv_mdbm" 1>&6
12301  if test $ol_cv_mdbm = yes ; then
12302         cat >> confdefs.h <<\EOF
12303 #define HAVE_MDBM 1
12304 EOF
12305
12306  fi
12307
12308
12309         if test $ol_cv_mdbm = yes ; then
12310                 ol_link_ldbm=mdbm
12311                 ol_with_ldbm_api=mdbm
12312                 if test $ol_cv_lib_mdbm != yes ; then
12313                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12314                 fi
12315         fi
12316 fi
12317
12318 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12319         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12320 echo "configure:12321: checking for GDBM library" >&5
12321 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12322   echo $ac_n "(cached) $ac_c" 1>&6
12323 else
12324         ol_LIBS="$LIBS"
12325         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12326 echo "configure:12327: checking for gdbm_open" >&5
12327 if eval "test \"\${ac_cv_func_gdbm_open+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 gdbm_open(); 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 gdbm_open();
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_gdbm_open) || defined (__stub___gdbm_open)
12348 choke me
12349 #else
12350 f = gdbm_open;
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_gdbm_open=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_gdbm_open=no"
12363 fi
12364 rm -f conftest*
12365 fi
12366
12367 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12368   echo "$ac_t""yes" 1>&6
12369   ol_cv_lib_gdbm=yes
12370 else
12371   echo "$ac_t""no" 1>&6
12372
12373                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12374 echo "configure:12375: checking for gdbm_open in -lgdbm" >&5
12375 ac_lib_var=`echo gdbm'_'gdbm_open | 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="-lgdbm  $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 gdbm_open();
12388
12389 int main() {
12390 gdbm_open()
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_gdbm=-lgdbm
12409 else
12410   echo "$ac_t""no" 1>&6
12411 ol_cv_lib_gdbm=no
12412 fi
12413
12414         
12415 fi
12416
12417         LIBS="$ol_LIBS"
12418
12419 fi
12420
12421 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12422
12423
12424  for ac_hdr in gdbm.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_gdbm+set}\" = set"; then
12467   echo $ac_n "(cached) $ac_c" 1>&6
12468 else
12469   
12470         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12471                 ol_cv_gdbm=no
12472         else
12473                 ol_cv_gdbm=yes
12474         fi
12475
12476 fi
12477
12478 echo "$ac_t""$ol_cv_gdbm" 1>&6
12479  if test $ol_cv_gdbm = yes ; then
12480         cat >> confdefs.h <<\EOF
12481 #define HAVE_GDBM 1
12482 EOF
12483
12484  fi
12485
12486
12487         if test $ol_cv_gdbm = yes ; then
12488                 ol_link_ldbm=gdbm
12489                 ol_with_ldbm_api=gdbm
12490
12491                 if test $ol_cv_lib_gdbm != yes ; then
12492                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12493                 fi
12494         fi
12495 fi
12496
12497 if test $ol_with_ldbm_api = ndbm ; then
12498         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12499 echo "configure:12500: checking for NDBM library" >&5
12500 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12501   echo $ac_n "(cached) $ac_c" 1>&6
12502 else
12503         ol_LIBS="$LIBS"
12504         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12505 echo "configure:12506: checking for dbm_open" >&5
12506 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12507   echo $ac_n "(cached) $ac_c" 1>&6
12508 else
12509   cat > conftest.$ac_ext <<EOF
12510 #line 12511 "configure"
12511 #include "confdefs.h"
12512 /* System header to define __stub macros and hopefully few prototypes,
12513     which can conflict with char dbm_open(); below.  */
12514 #include <assert.h>
12515 /* Override any gcc2 internal prototype to avoid an error.  */
12516 /* We use char because int might match the return type of a gcc2
12517     builtin and then its argument prototype would still apply.  */
12518 char dbm_open();
12519 char (*f)();
12520
12521 int main() {
12522
12523 /* The GNU C library defines this for functions which it implements
12524     to always fail with ENOSYS.  Some functions are actually named
12525     something starting with __ and the normal name is an alias.  */
12526 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12527 choke me
12528 #else
12529 f = dbm_open;
12530 #endif
12531
12532 ; return 0; }
12533 EOF
12534 if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12535   rm -rf conftest*
12536   eval "ac_cv_func_dbm_open=yes"
12537 else
12538   echo "configure: failed program was:" >&5
12539   cat conftest.$ac_ext >&5
12540   rm -rf conftest*
12541   eval "ac_cv_func_dbm_open=no"
12542 fi
12543 rm -f conftest*
12544 fi
12545
12546 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12547   echo "$ac_t""yes" 1>&6
12548   ol_cv_lib_ndbm=yes
12549 else
12550   echo "$ac_t""no" 1>&6
12551
12552                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12553 echo "configure:12554: checking for dbm_open in -lndbm" >&5
12554 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12556   echo $ac_n "(cached) $ac_c" 1>&6
12557 else
12558   ac_save_LIBS="$LIBS"
12559 LIBS="-lndbm  $LIBS"
12560 cat > conftest.$ac_ext <<EOF
12561 #line 12562 "configure"
12562 #include "confdefs.h"
12563 /* Override any gcc2 internal prototype to avoid an error.  */
12564 /* We use char because int might match the return type of a gcc2
12565     builtin and then its argument prototype would still apply.  */
12566 char dbm_open();
12567
12568 int main() {
12569 dbm_open()
12570 ; return 0; }
12571 EOF
12572 if { (eval echo configure:12573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12573   rm -rf conftest*
12574   eval "ac_cv_lib_$ac_lib_var=yes"
12575 else
12576   echo "configure: failed program was:" >&5
12577   cat conftest.$ac_ext >&5
12578   rm -rf conftest*
12579   eval "ac_cv_lib_$ac_lib_var=no"
12580 fi
12581 rm -f conftest*
12582 LIBS="$ac_save_LIBS"
12583
12584 fi
12585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12586   echo "$ac_t""yes" 1>&6
12587   ol_cv_lib_ndbm=-lndbm
12588 else
12589   echo "$ac_t""no" 1>&6
12590
12591                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12592 echo "configure:12593: checking for dbm_open in -ldbm" >&5
12593 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12595   echo $ac_n "(cached) $ac_c" 1>&6
12596 else
12597   ac_save_LIBS="$LIBS"
12598 LIBS="-ldbm  $LIBS"
12599 cat > conftest.$ac_ext <<EOF
12600 #line 12601 "configure"
12601 #include "confdefs.h"
12602 /* Override any gcc2 internal prototype to avoid an error.  */
12603 /* We use char because int might match the return type of a gcc2
12604     builtin and then its argument prototype would still apply.  */
12605 char dbm_open();
12606
12607 int main() {
12608 dbm_open()
12609 ; return 0; }
12610 EOF
12611 if { (eval echo configure:12612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12612   rm -rf conftest*
12613   eval "ac_cv_lib_$ac_lib_var=yes"
12614 else
12615   echo "configure: failed program was:" >&5
12616   cat conftest.$ac_ext >&5
12617   rm -rf conftest*
12618   eval "ac_cv_lib_$ac_lib_var=no"
12619 fi
12620 rm -f conftest*
12621 LIBS="$ac_save_LIBS"
12622
12623 fi
12624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12625   echo "$ac_t""yes" 1>&6
12626   ol_cv_lib_ndbm=-ldbm
12627 else
12628   echo "$ac_t""no" 1>&6
12629 ol_cv_lib_ndbm=no
12630 fi
12631                 
12632 fi
12633
12634         
12635 fi
12636
12637         LIBS="$ol_LIBS"
12638
12639 fi
12640
12641 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12642
12643
12644  for ac_hdr in ndbm.h
12645 do
12646 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12647 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12648 echo "configure:12649: checking for $ac_hdr" >&5
12649 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12650   echo $ac_n "(cached) $ac_c" 1>&6
12651 else
12652   cat > conftest.$ac_ext <<EOF
12653 #line 12654 "configure"
12654 #include "confdefs.h"
12655 #include <$ac_hdr>
12656 EOF
12657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12658 { (eval echo configure:12659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12660 if test -z "$ac_err"; then
12661   rm -rf conftest*
12662   eval "ac_cv_header_$ac_safe=yes"
12663 else
12664   echo "$ac_err" >&5
12665   echo "configure: failed program was:" >&5
12666   cat conftest.$ac_ext >&5
12667   rm -rf conftest*
12668   eval "ac_cv_header_$ac_safe=no"
12669 fi
12670 rm -f conftest*
12671 fi
12672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12673   echo "$ac_t""yes" 1>&6
12674     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12675   cat >> confdefs.h <<EOF
12676 #define $ac_tr_hdr 1
12677 EOF
12678  
12679 else
12680   echo "$ac_t""no" 1>&6
12681 fi
12682 done
12683
12684  echo $ac_n "checking for db""... $ac_c" 1>&6
12685 echo "configure:12686: checking for db" >&5
12686 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12687   echo $ac_n "(cached) $ac_c" 1>&6
12688 else
12689   
12690         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12691                 ol_cv_ndbm=no
12692         else
12693                 ol_cv_ndbm=yes
12694         fi
12695
12696 fi
12697
12698 echo "$ac_t""$ol_cv_ndbm" 1>&6
12699  if test $ol_cv_ndbm = yes ; then
12700         cat >> confdefs.h <<\EOF
12701 #define HAVE_NDBM 1
12702 EOF
12703
12704  fi
12705
12706
12707         if test $ol_cv_ndbm = yes ; then
12708                 ol_link_ldbm=ndbm
12709                 ol_with_ldbm_api=ndbm
12710
12711                 if test $ol_cv_lib_ndbm != yes ; then
12712                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12713                 fi
12714         fi
12715 fi
12716
12717 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12718         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12719         if test $ol_enable_ldbm = yes ; then
12720                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12721         fi
12722
12723         echo "configure: warning: disabling LDBM" 1>&2
12724         ol_enable_ldbm=no
12725 fi
12726
12727 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12728         LINK_BINS_DYNAMIC="yes"
12729 else
12730         LINK_BINS_DYNAMIC="no"
12731 fi
12732
12733 if test $ol_enable_wrappers != no ; then
12734         for ac_hdr in tcpd.h
12735 do
12736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12738 echo "configure:12739: checking for $ac_hdr" >&5
12739 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12740   echo $ac_n "(cached) $ac_c" 1>&6
12741 else
12742   cat > conftest.$ac_ext <<EOF
12743 #line 12744 "configure"
12744 #include "confdefs.h"
12745 #include <$ac_hdr>
12746 EOF
12747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12748 { (eval echo configure:12749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12750 if test -z "$ac_err"; then
12751   rm -rf conftest*
12752   eval "ac_cv_header_$ac_safe=yes"
12753 else
12754   echo "$ac_err" >&5
12755   echo "configure: failed program was:" >&5
12756   cat conftest.$ac_ext >&5
12757   rm -rf conftest*
12758   eval "ac_cv_header_$ac_safe=no"
12759 fi
12760 rm -f conftest*
12761 fi
12762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12763   echo "$ac_t""yes" 1>&6
12764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12765   cat >> confdefs.h <<EOF
12766 #define $ac_tr_hdr 1
12767 EOF
12768  
12769 else
12770   echo "$ac_t""no" 1>&6
12771 fi
12772 done
12773
12774
12775         if test $ac_cv_header_tcpd_h != yes ; then
12776                 have_wrappers=no
12777         else
12778                 cat > conftest.$ac_ext <<EOF
12779 #line 12780 "configure"
12780 #include "confdefs.h"
12781
12782 int allow_severity = 0;
12783 int deny_severity  = 0;
12784                 
12785 int main() {
12786 hosts_access()
12787 ; return 0; }
12788 EOF
12789 if { (eval echo configure:12790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12790   rm -rf conftest*
12791   have_wrappers=yes
12792 else
12793   echo "configure: failed program was:" >&5
12794   cat conftest.$ac_ext >&5
12795   rm -rf conftest*
12796   have_wrappers=no
12797 fi
12798 rm -f conftest*
12799         fi
12800
12801         if test $have_wrappers = yes ; then
12802                 cat >> confdefs.h <<\EOF
12803 #define HAVE_TCPD 1
12804 EOF
12805
12806                 WRAP_LIBS="-lwrap"
12807
12808                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12809 echo "configure:12810: checking for main in -lnsl" >&5
12810 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12812   echo $ac_n "(cached) $ac_c" 1>&6
12813 else
12814   ac_save_LIBS="$LIBS"
12815 LIBS="-lnsl  $LIBS"
12816 cat > conftest.$ac_ext <<EOF
12817 #line 12818 "configure"
12818 #include "confdefs.h"
12819
12820 int main() {
12821 main()
12822 ; return 0; }
12823 EOF
12824 if { (eval echo configure:12825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12825   rm -rf conftest*
12826   eval "ac_cv_lib_$ac_lib_var=yes"
12827 else
12828   echo "configure: failed program was:" >&5
12829   cat conftest.$ac_ext >&5
12830   rm -rf conftest*
12831   eval "ac_cv_lib_$ac_lib_var=no"
12832 fi
12833 rm -f conftest*
12834 LIBS="$ac_save_LIBS"
12835
12836 fi
12837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12838   echo "$ac_t""yes" 1>&6
12839     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12840     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12841   cat >> confdefs.h <<EOF
12842 #define $ac_tr_lib 1
12843 EOF
12844
12845   LIBS="-lnsl $LIBS"
12846
12847 else
12848   echo "$ac_t""no" 1>&6
12849 fi
12850
12851         else
12852                 echo "configure: warning: could not find -lwrap" 1>&2
12853                 if test $ol_enable_wrappers = yes ; then
12854                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12855                 fi
12856
12857                 echo "configure: warning: disabling wrappers support" 1>&2
12858                 ol_enable_wrappers=no
12859                 WRAP_LIBS=""
12860         fi
12861 fi
12862
12863 if test $ol_enable_syslog != no ; then
12864         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12865 echo "configure:12866: checking for openlog" >&5
12866 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12867   echo $ac_n "(cached) $ac_c" 1>&6
12868 else
12869   cat > conftest.$ac_ext <<EOF
12870 #line 12871 "configure"
12871 #include "confdefs.h"
12872 /* System header to define __stub macros and hopefully few prototypes,
12873     which can conflict with char openlog(); below.  */
12874 #include <assert.h>
12875 /* Override any gcc2 internal prototype to avoid an error.  */
12876 /* We use char because int might match the return type of a gcc2
12877     builtin and then its argument prototype would still apply.  */
12878 char openlog();
12879 char (*f)();
12880
12881 int main() {
12882
12883 /* The GNU C library defines this for functions which it implements
12884     to always fail with ENOSYS.  Some functions are actually named
12885     something starting with __ and the normal name is an alias.  */
12886 #if defined (__stub_openlog) || defined (__stub___openlog)
12887 choke me
12888 #else
12889 f = openlog;
12890 #endif
12891
12892 ; return 0; }
12893 EOF
12894 if { (eval echo configure:12895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12895   rm -rf conftest*
12896   eval "ac_cv_func_openlog=yes"
12897 else
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   eval "ac_cv_func_openlog=no"
12902 fi
12903 rm -f conftest*
12904 fi
12905
12906 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12907   echo "$ac_t""yes" 1>&6
12908   :
12909 else
12910   echo "$ac_t""no" 1>&6
12911 fi
12912
12913         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12914                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12915         fi
12916         ol_enable_syslog=$ac_cv_func_openlog
12917 fi
12918
12919 ol_link_sql=no
12920 if test $ol_enable_sql != no ; then
12921         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
12922 echo "configure:12923: checking for SQLDriverConnect in -liodbc" >&5
12923 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
12924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12925   echo $ac_n "(cached) $ac_c" 1>&6
12926 else
12927   ac_save_LIBS="$LIBS"
12928 LIBS="-liodbc  $LIBS"
12929 cat > conftest.$ac_ext <<EOF
12930 #line 12931 "configure"
12931 #include "confdefs.h"
12932 /* Override any gcc2 internal prototype to avoid an error.  */
12933 /* We use char because int might match the return type of a gcc2
12934     builtin and then its argument prototype would still apply.  */
12935 char SQLDriverConnect();
12936
12937 int main() {
12938 SQLDriverConnect()
12939 ; return 0; }
12940 EOF
12941 if { (eval echo configure:12942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12942   rm -rf conftest*
12943   eval "ac_cv_lib_$ac_lib_var=yes"
12944 else
12945   echo "configure: failed program was:" >&5
12946   cat conftest.$ac_ext >&5
12947   rm -rf conftest*
12948   eval "ac_cv_lib_$ac_lib_var=no"
12949 fi
12950 rm -f conftest*
12951 LIBS="$ac_save_LIBS"
12952
12953 fi
12954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12955   echo "$ac_t""yes" 1>&6
12956   have_iodbc=yes
12957 else
12958   echo "$ac_t""no" 1>&6
12959 have_iodbc=no
12960 fi
12961
12962         if test $have_iodbc = yes ; then
12963                 ol_link_sql="-liodbc"
12964         else
12965                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
12966 echo "configure:12967: checking for SQLDriverConnect in -lodbc" >&5
12967 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
12968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12969   echo $ac_n "(cached) $ac_c" 1>&6
12970 else
12971   ac_save_LIBS="$LIBS"
12972 LIBS="-lodbc  $LIBS"
12973 cat > conftest.$ac_ext <<EOF
12974 #line 12975 "configure"
12975 #include "confdefs.h"
12976 /* Override any gcc2 internal prototype to avoid an error.  */
12977 /* We use char because int might match the return type of a gcc2
12978     builtin and then its argument prototype would still apply.  */
12979 char SQLDriverConnect();
12980
12981 int main() {
12982 SQLDriverConnect()
12983 ; return 0; }
12984 EOF
12985 if { (eval echo configure:12986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12986   rm -rf conftest*
12987   eval "ac_cv_lib_$ac_lib_var=yes"
12988 else
12989   echo "configure: failed program was:" >&5
12990   cat conftest.$ac_ext >&5
12991   rm -rf conftest*
12992   eval "ac_cv_lib_$ac_lib_var=no"
12993 fi
12994 rm -f conftest*
12995 LIBS="$ac_save_LIBS"
12996
12997 fi
12998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12999   echo "$ac_t""yes" 1>&6
13000   have_odbc=yes
13001 else
13002   echo "$ac_t""no" 1>&6
13003 have_odbc=no
13004 fi
13005
13006                 if test $have_odbc = yes ; then
13007                         ol_link_sql="-lodbc"
13008                 fi
13009         fi
13010
13011         if test $ol_link_sql != no ; then
13012                 SLAPD_SQL_LIBS="$ol_link_sql"
13013
13014         elif test $ol_enable_sql != auto ; then
13015                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13016         fi
13017 fi
13018
13019 ol_link_termcap=no
13020 for ac_hdr in termcap.h ncurses.h
13021 do
13022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13024 echo "configure:13025: checking for $ac_hdr" >&5
13025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13026   echo $ac_n "(cached) $ac_c" 1>&6
13027 else
13028   cat > conftest.$ac_ext <<EOF
13029 #line 13030 "configure"
13030 #include "confdefs.h"
13031 #include <$ac_hdr>
13032 EOF
13033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13034 { (eval echo configure:13035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13036 if test -z "$ac_err"; then
13037   rm -rf conftest*
13038   eval "ac_cv_header_$ac_safe=yes"
13039 else
13040   echo "$ac_err" >&5
13041   echo "configure: failed program was:" >&5
13042   cat conftest.$ac_ext >&5
13043   rm -rf conftest*
13044   eval "ac_cv_header_$ac_safe=no"
13045 fi
13046 rm -f conftest*
13047 fi
13048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13049   echo "$ac_t""yes" 1>&6
13050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13051   cat >> confdefs.h <<EOF
13052 #define $ac_tr_hdr 1
13053 EOF
13054  
13055 else
13056   echo "$ac_t""no" 1>&6
13057 fi
13058 done
13059
13060
13061 if test $ol_link_termcap = no ; then
13062         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13063 echo "configure:13064: checking for tputs in -ltermcap" >&5
13064 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13066   echo $ac_n "(cached) $ac_c" 1>&6
13067 else
13068   ac_save_LIBS="$LIBS"
13069 LIBS="-ltermcap  $LIBS"
13070 cat > conftest.$ac_ext <<EOF
13071 #line 13072 "configure"
13072 #include "confdefs.h"
13073 /* Override any gcc2 internal prototype to avoid an error.  */
13074 /* We use char because int might match the return type of a gcc2
13075     builtin and then its argument prototype would still apply.  */
13076 char tputs();
13077
13078 int main() {
13079 tputs()
13080 ; return 0; }
13081 EOF
13082 if { (eval echo configure:13083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13083   rm -rf conftest*
13084   eval "ac_cv_lib_$ac_lib_var=yes"
13085 else
13086   echo "configure: failed program was:" >&5
13087   cat conftest.$ac_ext >&5
13088   rm -rf conftest*
13089   eval "ac_cv_lib_$ac_lib_var=no"
13090 fi
13091 rm -f conftest*
13092 LIBS="$ac_save_LIBS"
13093
13094 fi
13095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13096   echo "$ac_t""yes" 1>&6
13097   have_termcap=yes
13098 else
13099   echo "$ac_t""no" 1>&6
13100 have_termcap=no
13101 fi
13102
13103         if test $have_termcap = yes ; then
13104                 cat >> confdefs.h <<\EOF
13105 #define HAVE_TERMCAP 1
13106 EOF
13107
13108                 ol_link_termcap=yes
13109                 TERMCAP_LIBS=-ltermcap
13110         fi
13111 fi
13112
13113 if test $ol_link_termcap = no ; then
13114         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13115 echo "configure:13116: checking for initscr in -lncurses" >&5
13116 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13117 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13118   echo $ac_n "(cached) $ac_c" 1>&6
13119 else
13120   ac_save_LIBS="$LIBS"
13121 LIBS="-lncurses  $LIBS"
13122 cat > conftest.$ac_ext <<EOF
13123 #line 13124 "configure"
13124 #include "confdefs.h"
13125 /* Override any gcc2 internal prototype to avoid an error.  */
13126 /* We use char because int might match the return type of a gcc2
13127     builtin and then its argument prototype would still apply.  */
13128 char initscr();
13129
13130 int main() {
13131 initscr()
13132 ; return 0; }
13133 EOF
13134 if { (eval echo configure:13135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13135   rm -rf conftest*
13136   eval "ac_cv_lib_$ac_lib_var=yes"
13137 else
13138   echo "configure: failed program was:" >&5
13139   cat conftest.$ac_ext >&5
13140   rm -rf conftest*
13141   eval "ac_cv_lib_$ac_lib_var=no"
13142 fi
13143 rm -f conftest*
13144 LIBS="$ac_save_LIBS"
13145
13146 fi
13147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13148   echo "$ac_t""yes" 1>&6
13149   have_ncurses=yes
13150 else
13151   echo "$ac_t""no" 1>&6
13152 have_ncurses=no
13153 fi
13154
13155         if test $have_ncurses = yes ; then
13156                 cat >> confdefs.h <<\EOF
13157 #define HAVE_NCURSES 1
13158 EOF
13159
13160                 ol_link_termcap=yes
13161                 TERMCAP_LIBS=-lncurses
13162         fi
13163 fi
13164
13165 if test $ol_link_termcap = no ; then
13166         cat >> confdefs.h <<\EOF
13167 #define NO_TERMCAP 1
13168 EOF
13169
13170         TERMCAP_LIBS=
13171 fi
13172
13173 ol_link_sasl=no
13174 ol_link_spasswd=no
13175 if test $ol_with_cyrus_sasl != no ; then
13176         for ac_hdr in sasl.h
13177 do
13178 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13179 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13180 echo "configure:13181: checking for $ac_hdr" >&5
13181 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13182   echo $ac_n "(cached) $ac_c" 1>&6
13183 else
13184   cat > conftest.$ac_ext <<EOF
13185 #line 13186 "configure"
13186 #include "confdefs.h"
13187 #include <$ac_hdr>
13188 EOF
13189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13190 { (eval echo configure:13191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13192 if test -z "$ac_err"; then
13193   rm -rf conftest*
13194   eval "ac_cv_header_$ac_safe=yes"
13195 else
13196   echo "$ac_err" >&5
13197   echo "configure: failed program was:" >&5
13198   cat conftest.$ac_ext >&5
13199   rm -rf conftest*
13200   eval "ac_cv_header_$ac_safe=no"
13201 fi
13202 rm -f conftest*
13203 fi
13204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13205   echo "$ac_t""yes" 1>&6
13206     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13207   cat >> confdefs.h <<EOF
13208 #define $ac_tr_hdr 1
13209 EOF
13210  
13211 else
13212   echo "$ac_t""no" 1>&6
13213 fi
13214 done
13215
13216
13217         if test $ac_cv_header_sasl_h = yes ; then
13218                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13219 echo "configure:13220: checking for sasl_client_init in -lsasl" >&5
13220 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13221 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13222   echo $ac_n "(cached) $ac_c" 1>&6
13223 else
13224   ac_save_LIBS="$LIBS"
13225 LIBS="-lsasl  $LIBS"
13226 cat > conftest.$ac_ext <<EOF
13227 #line 13228 "configure"
13228 #include "confdefs.h"
13229 /* Override any gcc2 internal prototype to avoid an error.  */
13230 /* We use char because int might match the return type of a gcc2
13231     builtin and then its argument prototype would still apply.  */
13232 char sasl_client_init();
13233
13234 int main() {
13235 sasl_client_init()
13236 ; return 0; }
13237 EOF
13238 if { (eval echo configure:13239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13239   rm -rf conftest*
13240   eval "ac_cv_lib_$ac_lib_var=yes"
13241 else
13242   echo "configure: failed program was:" >&5
13243   cat conftest.$ac_ext >&5
13244   rm -rf conftest*
13245   eval "ac_cv_lib_$ac_lib_var=no"
13246 fi
13247 rm -f conftest*
13248 LIBS="$ac_save_LIBS"
13249
13250 fi
13251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13252   echo "$ac_t""yes" 1>&6
13253   have_cyrus_sasl=yes
13254 else
13255   echo "$ac_t""no" 1>&6
13256 have_cyrus_sasl=no
13257 fi
13258
13259
13260                 if test $have_cyrus_sasl != no ; then
13261                         SASL_LIBS="-lsasl"
13262                         cat >> confdefs.h <<\EOF
13263 #define HAVE_CYRUS_SASL 1
13264 EOF
13265
13266                         ol_link_sasl=yes
13267                 fi
13268         fi
13269
13270         if test $ol_link_sasl = no ; then
13271                 if test $ol_with_cyrus_sasl != auto ; then
13272                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13273                 else
13274                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13275                         echo "configure: warning: SASL authentication not supported!" 1>&2
13276                         if test $ol_link_tls = no ; then
13277                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13278                         fi
13279                 fi
13280         fi
13281 else
13282         echo "configure: warning: SASL authentication not supported!" 1>&2
13283         if test $ol_link_tls = no ; then
13284                 echo "configure: warning: Strong authentication not supported!" 1>&2
13285         fi
13286 fi
13287
13288 if test $cross_compiling != yes ; then
13289         dev=no
13290         if test -r /dev/urandom ; then
13291                 dev="/dev/urandom";
13292         elif test -r /idev/urandom ; then
13293                 dev="/idev/urandom";
13294         elif test -r /dev/srandom ; then
13295                 dev="/dev/srandom";
13296         elif test -r /dev/random ; then
13297                 dev="/dev/random";
13298         elif test -r /idev/random ; then
13299                 dev="/idev/random";
13300         fi
13301
13302         if test $dev != no ; then
13303                 cat >> confdefs.h <<EOF
13304 #define URANDOM_DEVICE "$dev"
13305 EOF
13306
13307         fi
13308 fi
13309
13310 ol_link_fetch=no
13311 if test $ol_with_fetch != no ; then
13312         ol_LIBS=$LIBS
13313 LIBS="-lfetch -lcom_err $LIBS"
13314 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13315 echo "configure:13316: checking fetch(3) library" >&5
13316 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13317   echo $ac_n "(cached) $ac_c" 1>&6
13318 else
13319   
13320         cat > conftest.$ac_ext <<EOF
13321 #line 13322 "configure"
13322 #include "confdefs.h"
13323
13324 #include <sys/param.h>
13325 #include <stdio.h>
13326 #include <fetch.h>
13327 int main() {
13328 struct url *u = fetchParseURL("file:///"); 
13329 ; return 0; }
13330 EOF
13331 if { (eval echo configure:13332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13332   rm -rf conftest*
13333   ol_cv_lib_fetch=yes
13334 else
13335   echo "configure: failed program was:" >&5
13336   cat conftest.$ac_ext >&5
13337   rm -rf conftest*
13338   ol_cv_lib_fetch=no
13339 fi
13340 rm -f conftest*
13341 fi
13342
13343 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13344 LIBS=$ol_LIBS
13345 if test $ol_cv_lib_fetch != no ; then
13346         ol_link_fetch="-lfetch -lcom_err"
13347         cat >> confdefs.h <<\EOF
13348 #define HAVE_FETCH 1
13349 EOF
13350
13351 fi
13352
13353
13354         if test $ol_cv_lib_fetch != no ; then
13355                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13356                 ol_link_fetch=freebsd
13357
13358         elif test $ol_with_fetch != auto ; then
13359                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13360         fi 
13361 fi
13362
13363 ol_link_readline=no
13364 if test $ol_with_readline != no ; then
13365         for ac_hdr in readline/readline.h readline/history.h
13366 do
13367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13369 echo "configure:13370: checking for $ac_hdr" >&5
13370 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13371   echo $ac_n "(cached) $ac_c" 1>&6
13372 else
13373   cat > conftest.$ac_ext <<EOF
13374 #line 13375 "configure"
13375 #include "confdefs.h"
13376 #include <$ac_hdr>
13377 EOF
13378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13379 { (eval echo configure:13380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13381 if test -z "$ac_err"; then
13382   rm -rf conftest*
13383   eval "ac_cv_header_$ac_safe=yes"
13384 else
13385   echo "$ac_err" >&5
13386   echo "configure: failed program was:" >&5
13387   cat conftest.$ac_ext >&5
13388   rm -rf conftest*
13389   eval "ac_cv_header_$ac_safe=no"
13390 fi
13391 rm -f conftest*
13392 fi
13393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13394   echo "$ac_t""yes" 1>&6
13395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13396   cat >> confdefs.h <<EOF
13397 #define $ac_tr_hdr 1
13398 EOF
13399  
13400 else
13401   echo "$ac_t""no" 1>&6
13402 fi
13403 done
13404
13405
13406         if test $ac_cv_header_readline_readline_h = yes ; then
13407                 save_LIBS="$LIBS"
13408                 LIBS="$TERMCAP_LIBS $LIBS"
13409                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13410 echo "configure:13411: checking for readline in -lreadline" >&5
13411 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13413   echo $ac_n "(cached) $ac_c" 1>&6
13414 else
13415   ac_save_LIBS="$LIBS"
13416 LIBS="-lreadline  $LIBS"
13417 cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420 /* Override any gcc2 internal prototype to avoid an error.  */
13421 /* We use char because int might match the return type of a gcc2
13422     builtin and then its argument prototype would still apply.  */
13423 char readline();
13424
13425 int main() {
13426 readline()
13427 ; return 0; }
13428 EOF
13429 if { (eval echo configure:13430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13430   rm -rf conftest*
13431   eval "ac_cv_lib_$ac_lib_var=yes"
13432 else
13433   echo "configure: failed program was:" >&5
13434   cat conftest.$ac_ext >&5
13435   rm -rf conftest*
13436   eval "ac_cv_lib_$ac_lib_var=no"
13437 fi
13438 rm -f conftest*
13439 LIBS="$ac_save_LIBS"
13440
13441 fi
13442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13443   echo "$ac_t""yes" 1>&6
13444   have_readline=yes
13445 else
13446   echo "$ac_t""no" 1>&6
13447 have_readline=no
13448 fi
13449
13450                 LIBS="$save_LIBS"
13451                         
13452                 if test $have_readline = yes ; then
13453                         ol_with_readline=found
13454                         ol_link_readline=yes
13455
13456                         READLINE_LIBS="-lreadline"
13457                 fi
13458         fi
13459 fi
13460
13461 if test $ol_link_readline = yes ; then
13462         cat >> confdefs.h <<\EOF
13463 #define HAVE_READLINE 1
13464 EOF
13465
13466 fi
13467
13468
13469 if test $ol_enable_crypt != no ; then
13470         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13471 echo "configure:13472: checking for crypt" >&5
13472 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13473   echo $ac_n "(cached) $ac_c" 1>&6
13474 else
13475   cat > conftest.$ac_ext <<EOF
13476 #line 13477 "configure"
13477 #include "confdefs.h"
13478 /* System header to define __stub macros and hopefully few prototypes,
13479     which can conflict with char crypt(); below.  */
13480 #include <assert.h>
13481 /* Override any gcc2 internal prototype to avoid an error.  */
13482 /* We use char because int might match the return type of a gcc2
13483     builtin and then its argument prototype would still apply.  */
13484 char crypt();
13485 char (*f)();
13486
13487 int main() {
13488
13489 /* The GNU C library defines this for functions which it implements
13490     to always fail with ENOSYS.  Some functions are actually named
13491     something starting with __ and the normal name is an alias.  */
13492 #if defined (__stub_crypt) || defined (__stub___crypt)
13493 choke me
13494 #else
13495 f = crypt;
13496 #endif
13497
13498 ; return 0; }
13499 EOF
13500 if { (eval echo configure:13501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13501   rm -rf conftest*
13502   eval "ac_cv_func_crypt=yes"
13503 else
13504   echo "configure: failed program was:" >&5
13505   cat conftest.$ac_ext >&5
13506   rm -rf conftest*
13507   eval "ac_cv_func_crypt=no"
13508 fi
13509 rm -f conftest*
13510 fi
13511
13512 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13513   echo "$ac_t""yes" 1>&6
13514   have_crypt=yes
13515 else
13516   echo "$ac_t""no" 1>&6
13517
13518                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13519 echo "configure:13520: checking for crypt in -lcrypt" >&5
13520 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13522   echo $ac_n "(cached) $ac_c" 1>&6
13523 else
13524   ac_save_LIBS="$LIBS"
13525 LIBS="-lcrypt  $LIBS"
13526 cat > conftest.$ac_ext <<EOF
13527 #line 13528 "configure"
13528 #include "confdefs.h"
13529 /* Override any gcc2 internal prototype to avoid an error.  */
13530 /* We use char because int might match the return type of a gcc2
13531     builtin and then its argument prototype would still apply.  */
13532 char crypt();
13533
13534 int main() {
13535 crypt()
13536 ; return 0; }
13537 EOF
13538 if { (eval echo configure:13539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13539   rm -rf conftest*
13540   eval "ac_cv_lib_$ac_lib_var=yes"
13541 else
13542   echo "configure: failed program was:" >&5
13543   cat conftest.$ac_ext >&5
13544   rm -rf conftest*
13545   eval "ac_cv_lib_$ac_lib_var=no"
13546 fi
13547 rm -f conftest*
13548 LIBS="$ac_save_LIBS"
13549
13550 fi
13551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13552   echo "$ac_t""yes" 1>&6
13553   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13554                         have_crypt=yes
13555 else
13556   echo "$ac_t""no" 1>&6
13557 have_crypt=no
13558 fi
13559
13560 fi
13561
13562
13563         if test $have_crypt = yes ; then
13564                 cat >> confdefs.h <<\EOF
13565 #define HAVE_CRYPT 1
13566 EOF
13567
13568         else
13569                 echo "configure: warning: could not find crypt" 1>&2
13570                 if test $ol_enable_crypt = yes ; then
13571                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13572                 fi
13573
13574                 echo "configure: warning: disabling crypt support" 1>&2
13575                 ol_enable_crypt=no
13576         fi
13577 fi
13578
13579 if test $ol_enable_proctitle != no ; then
13580         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13581 echo "configure:13582: checking for setproctitle" >&5
13582 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13583   echo $ac_n "(cached) $ac_c" 1>&6
13584 else
13585   cat > conftest.$ac_ext <<EOF
13586 #line 13587 "configure"
13587 #include "confdefs.h"
13588 /* System header to define __stub macros and hopefully few prototypes,
13589     which can conflict with char setproctitle(); below.  */
13590 #include <assert.h>
13591 /* Override any gcc2 internal prototype to avoid an error.  */
13592 /* We use char because int might match the return type of a gcc2
13593     builtin and then its argument prototype would still apply.  */
13594 char setproctitle();
13595 char (*f)();
13596
13597 int main() {
13598
13599 /* The GNU C library defines this for functions which it implements
13600     to always fail with ENOSYS.  Some functions are actually named
13601     something starting with __ and the normal name is an alias.  */
13602 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13603 choke me
13604 #else
13605 f = setproctitle;
13606 #endif
13607
13608 ; return 0; }
13609 EOF
13610 if { (eval echo configure:13611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13611   rm -rf conftest*
13612   eval "ac_cv_func_setproctitle=yes"
13613 else
13614   echo "configure: failed program was:" >&5
13615   cat conftest.$ac_ext >&5
13616   rm -rf conftest*
13617   eval "ac_cv_func_setproctitle=no"
13618 fi
13619 rm -f conftest*
13620 fi
13621
13622 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13623   echo "$ac_t""yes" 1>&6
13624   have_setproctitle=yes
13625 else
13626   echo "$ac_t""no" 1>&6
13627
13628                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13629 echo "configure:13630: checking for setproctitle in -lutil" >&5
13630 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13631 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13632   echo $ac_n "(cached) $ac_c" 1>&6
13633 else
13634   ac_save_LIBS="$LIBS"
13635 LIBS="-lutil  $LIBS"
13636 cat > conftest.$ac_ext <<EOF
13637 #line 13638 "configure"
13638 #include "confdefs.h"
13639 /* Override any gcc2 internal prototype to avoid an error.  */
13640 /* We use char because int might match the return type of a gcc2
13641     builtin and then its argument prototype would still apply.  */
13642 char setproctitle();
13643
13644 int main() {
13645 setproctitle()
13646 ; return 0; }
13647 EOF
13648 if { (eval echo configure:13649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13649   rm -rf conftest*
13650   eval "ac_cv_lib_$ac_lib_var=yes"
13651 else
13652   echo "configure: failed program was:" >&5
13653   cat conftest.$ac_ext >&5
13654   rm -rf conftest*
13655   eval "ac_cv_lib_$ac_lib_var=no"
13656 fi
13657 rm -f conftest*
13658 LIBS="$ac_save_LIBS"
13659
13660 fi
13661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13662   echo "$ac_t""yes" 1>&6
13663   have_setproctitle=yes
13664                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13665 else
13666   echo "$ac_t""no" 1>&6
13667 have_setproctitle=no
13668                         LIBOBJS="$LIBOBJS setproctitle.o"
13669                         LIBSRCS="$LIBSRCS setproctitle.c"
13670 fi
13671
13672 fi
13673
13674
13675         if test $have_setproctitle = yes ; then
13676                 cat >> confdefs.h <<\EOF
13677 #define HAVE_SETPROCTITLE 1
13678 EOF
13679
13680         fi
13681 fi
13682
13683 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13684 echo "configure:13685: checking for ANSI C header files" >&5
13685 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13686   echo $ac_n "(cached) $ac_c" 1>&6
13687 else
13688   cat > conftest.$ac_ext <<EOF
13689 #line 13690 "configure"
13690 #include "confdefs.h"
13691 #include <stdlib.h>
13692 #include <stdarg.h>
13693 #include <string.h>
13694 #include <float.h>
13695 EOF
13696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13697 { (eval echo configure:13698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13699 if test -z "$ac_err"; then
13700   rm -rf conftest*
13701   ac_cv_header_stdc=yes
13702 else
13703   echo "$ac_err" >&5
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -rf conftest*
13707   ac_cv_header_stdc=no
13708 fi
13709 rm -f conftest*
13710
13711 if test $ac_cv_header_stdc = yes; then
13712   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13713 cat > conftest.$ac_ext <<EOF
13714 #line 13715 "configure"
13715 #include "confdefs.h"
13716 #include <string.h>
13717 EOF
13718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13719   egrep "memchr" >/dev/null 2>&1; then
13720   :
13721 else
13722   rm -rf conftest*
13723   ac_cv_header_stdc=no
13724 fi
13725 rm -f conftest*
13726
13727 fi
13728
13729 if test $ac_cv_header_stdc = yes; then
13730   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13731 cat > conftest.$ac_ext <<EOF
13732 #line 13733 "configure"
13733 #include "confdefs.h"
13734 #include <stdlib.h>
13735 EOF
13736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13737   egrep "free" >/dev/null 2>&1; then
13738   :
13739 else
13740   rm -rf conftest*
13741   ac_cv_header_stdc=no
13742 fi
13743 rm -f conftest*
13744
13745 fi
13746
13747 if test $ac_cv_header_stdc = yes; then
13748   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13749 if test "$cross_compiling" = yes; then
13750   :
13751 else
13752   cat > conftest.$ac_ext <<EOF
13753 #line 13754 "configure"
13754 #include "confdefs.h"
13755 #include <ctype.h>
13756 #if ((' ' & 0x0FF) == 0x020)
13757 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13758 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13759 #else
13760 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13761  || ('j' <= (c) && (c) <= 'r') \
13762  || ('s' <= (c) && (c) <= 'z'))
13763 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13764 #endif
13765 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13766 int main () { int i; for (i = 0; i < 256; i++)
13767 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13768 exit (0); }
13769
13770 EOF
13771 if { (eval echo configure:13772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13772 then
13773   :
13774 else
13775   echo "configure: failed program was:" >&5
13776   cat conftest.$ac_ext >&5
13777   rm -fr conftest*
13778   ac_cv_header_stdc=no
13779 fi
13780 rm -fr conftest*
13781 fi
13782
13783 fi
13784 fi
13785
13786 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13787 if test $ac_cv_header_stdc = yes; then
13788   cat >> confdefs.h <<\EOF
13789 #define STDC_HEADERS 1
13790 EOF
13791
13792 fi
13793
13794 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13795 echo "configure:13796: checking for mode_t" >&5
13796 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13797   echo $ac_n "(cached) $ac_c" 1>&6
13798 else
13799   cat > conftest.$ac_ext <<EOF
13800 #line 13801 "configure"
13801 #include "confdefs.h"
13802 #include <sys/types.h>
13803 #if STDC_HEADERS
13804 #include <stdlib.h>
13805 #include <stddef.h>
13806 #endif
13807
13808 EOF
13809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13810   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13811   rm -rf conftest*
13812   eval "ac_cv_type_mode_t=yes"
13813 else
13814   rm -rf conftest*
13815   eval "ac_cv_type_mode_t=no"
13816 fi
13817 rm -f conftest*
13818
13819 fi
13820 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13821   echo "$ac_t""yes" 1>&6
13822 else
13823   echo "$ac_t""no" 1>&6
13824   cat >> confdefs.h <<EOF
13825 #define mode_t int
13826 EOF
13827
13828 fi
13829
13830 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13831 echo "configure:13832: checking for off_t" >&5
13832 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13833   echo $ac_n "(cached) $ac_c" 1>&6
13834 else
13835   cat > conftest.$ac_ext <<EOF
13836 #line 13837 "configure"
13837 #include "confdefs.h"
13838 #include <sys/types.h>
13839 #if STDC_HEADERS
13840 #include <stdlib.h>
13841 #include <stddef.h>
13842 #endif
13843
13844 EOF
13845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13846   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13847   rm -rf conftest*
13848   eval "ac_cv_type_off_t=yes"
13849 else
13850   rm -rf conftest*
13851   eval "ac_cv_type_off_t=no"
13852 fi
13853 rm -f conftest*
13854
13855 fi
13856 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13857   echo "$ac_t""yes" 1>&6
13858 else
13859   echo "$ac_t""no" 1>&6
13860   cat >> confdefs.h <<EOF
13861 #define off_t long
13862 EOF
13863
13864 fi
13865
13866 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13867 echo "configure:13868: checking for pid_t" >&5
13868 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13869   echo $ac_n "(cached) $ac_c" 1>&6
13870 else
13871   cat > conftest.$ac_ext <<EOF
13872 #line 13873 "configure"
13873 #include "confdefs.h"
13874 #include <sys/types.h>
13875 #if STDC_HEADERS
13876 #include <stdlib.h>
13877 #include <stddef.h>
13878 #endif
13879
13880 EOF
13881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13882   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13883   rm -rf conftest*
13884   eval "ac_cv_type_pid_t=yes"
13885 else
13886   rm -rf conftest*
13887   eval "ac_cv_type_pid_t=no"
13888 fi
13889 rm -f conftest*
13890
13891 fi
13892 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13893   echo "$ac_t""yes" 1>&6
13894 else
13895   echo "$ac_t""no" 1>&6
13896   cat >> confdefs.h <<EOF
13897 #define pid_t int
13898 EOF
13899
13900 fi
13901
13902 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13903 echo "configure:13904: checking for ptrdiff_t" >&5
13904 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13905   echo $ac_n "(cached) $ac_c" 1>&6
13906 else
13907   cat > conftest.$ac_ext <<EOF
13908 #line 13909 "configure"
13909 #include "confdefs.h"
13910 #include <stddef.h>
13911 int main() {
13912 ptrdiff_t p
13913 ; return 0; }
13914 EOF
13915 if { (eval echo configure:13916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13916   rm -rf conftest*
13917   am_cv_type_ptrdiff_t=yes
13918 else
13919   echo "configure: failed program was:" >&5
13920   cat conftest.$ac_ext >&5
13921   rm -rf conftest*
13922   am_cv_type_ptrdiff_t=no
13923 fi
13924 rm -f conftest*
13925 fi
13926
13927 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13928    if test $am_cv_type_ptrdiff_t = yes; then
13929      cat >> confdefs.h <<\EOF
13930 #define HAVE_PTRDIFF_T 1
13931 EOF
13932
13933    fi
13934
13935 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13936 echo "configure:13937: checking return type of signal handlers" >&5
13937 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13938   echo $ac_n "(cached) $ac_c" 1>&6
13939 else
13940   cat > conftest.$ac_ext <<EOF
13941 #line 13942 "configure"
13942 #include "confdefs.h"
13943 #include <sys/types.h>
13944 #include <signal.h>
13945 #ifdef signal
13946 #undef signal
13947 #endif
13948 #ifdef __cplusplus
13949 extern "C" void (*signal (int, void (*)(int)))(int);
13950 #else
13951 void (*signal ()) ();
13952 #endif
13953
13954 int main() {
13955 int i;
13956 ; return 0; }
13957 EOF
13958 if { (eval echo configure:13959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13959   rm -rf conftest*
13960   ac_cv_type_signal=void
13961 else
13962   echo "configure: failed program was:" >&5
13963   cat conftest.$ac_ext >&5
13964   rm -rf conftest*
13965   ac_cv_type_signal=int
13966 fi
13967 rm -f conftest*
13968 fi
13969
13970 echo "$ac_t""$ac_cv_type_signal" 1>&6
13971 cat >> confdefs.h <<EOF
13972 #define RETSIGTYPE $ac_cv_type_signal
13973 EOF
13974
13975
13976 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13977 echo "configure:13978: checking for size_t" >&5
13978 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13979   echo $ac_n "(cached) $ac_c" 1>&6
13980 else
13981   cat > conftest.$ac_ext <<EOF
13982 #line 13983 "configure"
13983 #include "confdefs.h"
13984 #include <sys/types.h>
13985 #if STDC_HEADERS
13986 #include <stdlib.h>
13987 #include <stddef.h>
13988 #endif
13989
13990 EOF
13991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13992   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13993   rm -rf conftest*
13994   eval "ac_cv_type_size_t=yes"
13995 else
13996   rm -rf conftest*
13997   eval "ac_cv_type_size_t=no"
13998 fi
13999 rm -f conftest*
14000
14001 fi
14002 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14003   echo "$ac_t""yes" 1>&6
14004 else
14005   echo "$ac_t""no" 1>&6
14006   cat >> confdefs.h <<EOF
14007 #define size_t unsigned
14008 EOF
14009
14010 fi
14011
14012
14013 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14014 echo "configure:14015: checking for ssize_t" >&5
14015 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14016   echo $ac_n "(cached) $ac_c" 1>&6
14017 else
14018   cat > conftest.$ac_ext <<EOF
14019 #line 14020 "configure"
14020 #include "confdefs.h"
14021 #include <sys/types.h>
14022 #if STDC_HEADERS
14023 #include <stdlib.h>
14024 #include <stddef.h>
14025 #endif
14026
14027 EOF
14028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14029   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14030   rm -rf conftest*
14031   eval "ac_cv_type_ssize_t=yes"
14032 else
14033   rm -rf conftest*
14034   eval "ac_cv_type_ssize_t=no"
14035 fi
14036 rm -f conftest*
14037
14038 fi
14039 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14040   echo "$ac_t""yes" 1>&6
14041 else
14042   echo "$ac_t""no" 1>&6
14043   cat >> confdefs.h <<EOF
14044 #define ssize_t signed int
14045 EOF
14046
14047 fi
14048
14049 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14050 echo "configure:14051: checking for caddr_t" >&5
14051 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14052   echo $ac_n "(cached) $ac_c" 1>&6
14053 else
14054   cat > conftest.$ac_ext <<EOF
14055 #line 14056 "configure"
14056 #include "confdefs.h"
14057 #include <sys/types.h>
14058 #if STDC_HEADERS
14059 #include <stdlib.h>
14060 #include <stddef.h>
14061 #endif
14062
14063 EOF
14064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14065   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14066   rm -rf conftest*
14067   eval "ac_cv_type_caddr_t=yes"
14068 else
14069   rm -rf conftest*
14070   eval "ac_cv_type_caddr_t=no"
14071 fi
14072 rm -f conftest*
14073
14074 fi
14075 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14076   echo "$ac_t""yes" 1>&6
14077 else
14078   echo "$ac_t""no" 1>&6
14079   cat >> confdefs.h <<EOF
14080 #define caddr_t char *
14081 EOF
14082
14083 fi
14084
14085
14086 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14087 echo "configure:14088: checking for socklen_t" >&5
14088 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14089   echo $ac_n "(cached) $ac_c" 1>&6
14090 else
14091   cat > conftest.$ac_ext <<EOF
14092 #line 14093 "configure"
14093 #include "confdefs.h"
14094
14095 #ifdef HAVE_SYS_TYPES_H
14096 #include <sys/types.h>
14097 #endif
14098 #ifdef HAVE_SYS_SOCKET_H
14099 #include <sys/socket.h>
14100 #endif
14101
14102 int main() {
14103 socklen_t len;
14104 ; return 0; }
14105 EOF
14106 if { (eval echo configure:14107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14107   rm -rf conftest*
14108   ol_cv_type_socklen_t=yes
14109 else
14110   echo "configure: failed program was:" >&5
14111   cat conftest.$ac_ext >&5
14112   rm -rf conftest*
14113   ol_cv_type_socklen_t=no
14114 fi
14115 rm -f conftest*
14116 fi
14117
14118 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14119   if test $ol_cv_type_socklen_t = no; then
14120     cat >> confdefs.h <<\EOF
14121 #define socklen_t int
14122 EOF
14123
14124   fi
14125  
14126 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14127 echo "configure:14128: checking for member st_blksize in aggregate type struct stat" >&5
14128 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14129   echo $ac_n "(cached) $ac_c" 1>&6
14130 else
14131   cat > conftest.$ac_ext <<EOF
14132 #line 14133 "configure"
14133 #include "confdefs.h"
14134 #include <sys/types.h>
14135 #include <sys/stat.h>
14136 int main() {
14137 struct stat foo; foo.st_blksize;
14138 ; return 0; }
14139 EOF
14140 if { (eval echo configure:14141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14141   rm -rf conftest*
14142   ac_cv_c_struct_member_st_blksize=yes
14143 else
14144   echo "configure: failed program was:" >&5
14145   cat conftest.$ac_ext >&5
14146   rm -rf conftest*
14147   ac_cv_c_struct_member_st_blksize=no
14148 fi
14149 rm -f conftest*
14150 fi
14151
14152 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14153 st_blksize="$ac_cv_c_struct_member_st_blksize"
14154 if test $ac_cv_c_struct_member_st_blksize = yes; then
14155   cat >> confdefs.h <<\EOF
14156 #define HAVE_ST_BLKSIZE 1
14157 EOF
14158
14159 fi
14160
14161 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14162 echo "configure:14163: checking whether time.h and sys/time.h may both be included" >&5
14163 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14164   echo $ac_n "(cached) $ac_c" 1>&6
14165 else
14166   cat > conftest.$ac_ext <<EOF
14167 #line 14168 "configure"
14168 #include "confdefs.h"
14169 #include <sys/types.h>
14170 #include <sys/time.h>
14171 #include <time.h>
14172 int main() {
14173 struct tm *tp;
14174 ; return 0; }
14175 EOF
14176 if { (eval echo configure:14177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14177   rm -rf conftest*
14178   ac_cv_header_time=yes
14179 else
14180   echo "configure: failed program was:" >&5
14181   cat conftest.$ac_ext >&5
14182   rm -rf conftest*
14183   ac_cv_header_time=no
14184 fi
14185 rm -f conftest*
14186 fi
14187
14188 echo "$ac_t""$ac_cv_header_time" 1>&6
14189 if test $ac_cv_header_time = yes; then
14190   cat >> confdefs.h <<\EOF
14191 #define TIME_WITH_SYS_TIME 1
14192 EOF
14193
14194 fi
14195
14196 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14197 echo "configure:14198: checking whether struct tm is in sys/time.h or time.h" >&5
14198 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14199   echo $ac_n "(cached) $ac_c" 1>&6
14200 else
14201   cat > conftest.$ac_ext <<EOF
14202 #line 14203 "configure"
14203 #include "confdefs.h"
14204 #include <sys/types.h>
14205 #include <time.h>
14206 int main() {
14207 struct tm *tp; tp->tm_sec;
14208 ; return 0; }
14209 EOF
14210 if { (eval echo configure:14211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14211   rm -rf conftest*
14212   ac_cv_struct_tm=time.h
14213 else
14214   echo "configure: failed program was:" >&5
14215   cat conftest.$ac_ext >&5
14216   rm -rf conftest*
14217   ac_cv_struct_tm=sys/time.h
14218 fi
14219 rm -f conftest*
14220 fi
14221
14222 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14223 if test $ac_cv_struct_tm = sys/time.h; then
14224   cat >> confdefs.h <<\EOF
14225 #define TM_IN_SYS_TIME 1
14226 EOF
14227
14228 fi
14229
14230 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14231 echo "configure:14232: checking for uid_t in sys/types.h" >&5
14232 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14233   echo $ac_n "(cached) $ac_c" 1>&6
14234 else
14235   cat > conftest.$ac_ext <<EOF
14236 #line 14237 "configure"
14237 #include "confdefs.h"
14238 #include <sys/types.h>
14239 EOF
14240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14241   egrep "uid_t" >/dev/null 2>&1; then
14242   rm -rf conftest*
14243   ac_cv_type_uid_t=yes
14244 else
14245   rm -rf conftest*
14246   ac_cv_type_uid_t=no
14247 fi
14248 rm -f conftest*
14249
14250 fi
14251
14252 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14253 if test $ac_cv_type_uid_t = no; then
14254   cat >> confdefs.h <<\EOF
14255 #define uid_t int
14256 EOF
14257
14258   cat >> confdefs.h <<\EOF
14259 #define gid_t int
14260 EOF
14261
14262 fi
14263
14264 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14265 echo "configure:14266: checking for sig_atomic_t" >&5
14266 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14267   echo $ac_n "(cached) $ac_c" 1>&6
14268 else
14269   cat > conftest.$ac_ext <<EOF
14270 #line 14271 "configure"
14271 #include "confdefs.h"
14272 #include <signal.h>
14273 int main() {
14274 sig_atomic_t atomic;
14275 ; return 0; }
14276 EOF
14277 if { (eval echo configure:14278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14278   rm -rf conftest*
14279   ol_cv_type_sig_atomic_t=yes
14280 else
14281   echo "configure: failed program was:" >&5
14282   cat conftest.$ac_ext >&5
14283   rm -rf conftest*
14284   ol_cv_type_sig_atomic_t=no
14285 fi
14286 rm -f conftest*
14287 fi
14288
14289 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14290   if test $ol_cv_type_sig_atomic_t = no; then
14291     cat >> confdefs.h <<\EOF
14292 #define sig_atomic_t int
14293 EOF
14294
14295   fi
14296  
14297
14298
14299 # test for pw_gecos in struct passwd
14300 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14301 echo "configure:14302: checking struct passwd for pw_gecos" >&5
14302 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14303   echo $ac_n "(cached) $ac_c" 1>&6
14304 else
14305   
14306         cat > conftest.$ac_ext <<EOF
14307 #line 14308 "configure"
14308 #include "confdefs.h"
14309 #include <pwd.h>
14310 int main() {
14311
14312         struct passwd pwd;
14313         pwd.pw_gecos = pwd.pw_name;
14314
14315 ; return 0; }
14316 EOF
14317 if { (eval echo configure:14318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14318   rm -rf conftest*
14319   ol_cv_struct_passwd_pw_gecos=yes
14320 else
14321   echo "configure: failed program was:" >&5
14322   cat conftest.$ac_ext >&5
14323   rm -rf conftest*
14324   ol_cv_struct_passwd_pw_gecos=no
14325 fi
14326 rm -f conftest*
14327 fi
14328
14329 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14330 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14331         cat >> confdefs.h <<\EOF
14332 #define HAVE_PW_GECOS 1
14333 EOF
14334
14335 fi
14336
14337 # test for pw_passwd in struct passwd
14338 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14339 echo "configure:14340: checking struct passwd for pw_passwd" >&5
14340 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14341   echo $ac_n "(cached) $ac_c" 1>&6
14342 else
14343   
14344         cat > conftest.$ac_ext <<EOF
14345 #line 14346 "configure"
14346 #include "confdefs.h"
14347 #include <pwd.h>
14348 int main() {
14349
14350         struct passwd pwd;
14351         pwd.pw_passwd = pwd.pw_name;
14352
14353 ; return 0; }
14354 EOF
14355 if { (eval echo configure:14356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14356   rm -rf conftest*
14357   ol_cv_struct_passwd_pw_passwd=yes
14358 else
14359   echo "configure: failed program was:" >&5
14360   cat conftest.$ac_ext >&5
14361   rm -rf conftest*
14362   ol_cv_struct_passwd_pw_passwd=no
14363 fi
14364 rm -f conftest*
14365 fi
14366
14367 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14368 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14369         cat >> confdefs.h <<\EOF
14370 #define HAVE_PW_PASSWD 1
14371 EOF
14372
14373 fi
14374
14375
14376 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14377 echo "configure:14378: checking if toupper() requires islower()" >&5
14378 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14379   echo $ac_n "(cached) $ac_c" 1>&6
14380 else
14381   
14382         if test "$cross_compiling" = yes; then
14383   ol_cv_c_upper_lower=safe
14384 else
14385   cat > conftest.$ac_ext <<EOF
14386 #line 14387 "configure"
14387 #include "confdefs.h"
14388
14389 #include <ctype.h>
14390 main()
14391 {
14392         if ('C' == toupper('C'))
14393                 exit(0);
14394         else
14395                 exit(1);
14396 }
14397 EOF
14398 if { (eval echo configure:14399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14399 then
14400   ol_cv_c_upper_lower=no
14401 else
14402   echo "configure: failed program was:" >&5
14403   cat conftest.$ac_ext >&5
14404   rm -fr conftest*
14405   ol_cv_c_upper_lower=yes
14406 fi
14407 rm -fr conftest*
14408 fi
14409
14410 fi
14411
14412 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14413 if test $ol_cv_c_upper_lower != no ; then
14414         cat >> confdefs.h <<\EOF
14415 #define C_UPPER_LOWER 1
14416 EOF
14417
14418 fi
14419
14420 echo $ac_n "checking for working const""... $ac_c" 1>&6
14421 echo "configure:14422: checking for working const" >&5
14422 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14423   echo $ac_n "(cached) $ac_c" 1>&6
14424 else
14425   cat > conftest.$ac_ext <<EOF
14426 #line 14427 "configure"
14427 #include "confdefs.h"
14428
14429 int main() {
14430
14431 /* Ultrix mips cc rejects this.  */
14432 typedef int charset[2]; const charset x;
14433 /* SunOS 4.1.1 cc rejects this.  */
14434 char const *const *ccp;
14435 char **p;
14436 /* NEC SVR4.0.2 mips cc rejects this.  */
14437 struct point {int x, y;};
14438 static struct point const zero = {0,0};
14439 /* AIX XL C 1.02.0.0 rejects this.
14440    It does not let you subtract one const X* pointer from another in an arm
14441    of an if-expression whose if-part is not a constant expression */
14442 const char *g = "string";
14443 ccp = &g + (g ? g-g : 0);
14444 /* HPUX 7.0 cc rejects these. */
14445 ++ccp;
14446 p = (char**) ccp;
14447 ccp = (char const *const *) p;
14448 { /* SCO 3.2v4 cc rejects this.  */
14449   char *t;
14450   char const *s = 0 ? (char *) 0 : (char const *) 0;
14451
14452   *t++ = 0;
14453 }
14454 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14455   int x[] = {25, 17};
14456   const int *foo = &x[0];
14457   ++foo;
14458 }
14459 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14460   typedef const int *iptr;
14461   iptr p = 0;
14462   ++p;
14463 }
14464 { /* AIX XL C 1.02.0.0 rejects this saying
14465      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14466   struct s { int j; const int *ap[3]; };
14467   struct s *b; b->j = 5;
14468 }
14469 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14470   const int foo = 10;
14471 }
14472
14473 ; return 0; }
14474 EOF
14475 if { (eval echo configure:14476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14476   rm -rf conftest*
14477   ac_cv_c_const=yes
14478 else
14479   echo "configure: failed program was:" >&5
14480   cat conftest.$ac_ext >&5
14481   rm -rf conftest*
14482   ac_cv_c_const=no
14483 fi
14484 rm -f conftest*
14485 fi
14486
14487 echo "$ac_t""$ac_cv_c_const" 1>&6
14488 if test $ac_cv_c_const = no; then
14489   cat >> confdefs.h <<\EOF
14490 #define const 
14491 EOF
14492
14493 fi
14494
14495 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14496 echo "configure:14497: checking if compiler understands volatile" >&5
14497 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14498   echo $ac_n "(cached) $ac_c" 1>&6
14499 else
14500   cat > conftest.$ac_ext <<EOF
14501 #line 14502 "configure"
14502 #include "confdefs.h"
14503 int x, y, z;
14504 int main() {
14505 volatile int a; int * volatile b = x ? &y : &z;
14506       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14507       *b = 0;
14508 ; return 0; }
14509 EOF
14510 if { (eval echo configure:14511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14511   rm -rf conftest*
14512   ol_cv_c_volatile=yes
14513 else
14514   echo "configure: failed program was:" >&5
14515   cat conftest.$ac_ext >&5
14516   rm -rf conftest*
14517   ol_cv_c_volatile=no
14518 fi
14519 rm -f conftest*
14520 fi
14521
14522 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14523   if test $ol_cv_c_volatile = yes; then
14524     : 
14525   else
14526     cat >> confdefs.h <<\EOF
14527 #define volatile 
14528 EOF
14529
14530   fi
14531  
14532
14533 if test $cross_compiling = yes ; then
14534         cat >> confdefs.h <<\EOF
14535 #define CROSS_COMPILING 1
14536 EOF
14537
14538 else
14539         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14540 echo "configure:14541: checking whether byte ordering is bigendian" >&5
14541 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14542   echo $ac_n "(cached) $ac_c" 1>&6
14543 else
14544   ac_cv_c_bigendian=unknown
14545 # See if sys/param.h defines the BYTE_ORDER macro.
14546 cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549 #include <sys/types.h>
14550 #include <sys/param.h>
14551 int main() {
14552
14553 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14554  bogus endian macros
14555 #endif
14556 ; return 0; }
14557 EOF
14558 if { (eval echo configure:14559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14559   rm -rf conftest*
14560   # It does; now see whether it defined to BIG_ENDIAN or not.
14561 cat > conftest.$ac_ext <<EOF
14562 #line 14563 "configure"
14563 #include "confdefs.h"
14564 #include <sys/types.h>
14565 #include <sys/param.h>
14566 int main() {
14567
14568 #if BYTE_ORDER != BIG_ENDIAN
14569  not big endian
14570 #endif
14571 ; return 0; }
14572 EOF
14573 if { (eval echo configure:14574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14574   rm -rf conftest*
14575   ac_cv_c_bigendian=yes
14576 else
14577   echo "configure: failed program was:" >&5
14578   cat conftest.$ac_ext >&5
14579   rm -rf conftest*
14580   ac_cv_c_bigendian=no
14581 fi
14582 rm -f conftest*
14583 else
14584   echo "configure: failed program was:" >&5
14585   cat conftest.$ac_ext >&5
14586 fi
14587 rm -f conftest*
14588 if test $ac_cv_c_bigendian = unknown; then
14589 if test "$cross_compiling" = yes; then
14590     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14591 else
14592   cat > conftest.$ac_ext <<EOF
14593 #line 14594 "configure"
14594 #include "confdefs.h"
14595 main () {
14596   /* Are we little or big endian?  From Harbison&Steele.  */
14597   union
14598   {
14599     long l;
14600     char c[sizeof (long)];
14601   } u;
14602   u.l = 1;
14603   exit (u.c[sizeof (long) - 1] == 1);
14604 }
14605 EOF
14606 if { (eval echo configure:14607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14607 then
14608   ac_cv_c_bigendian=no
14609 else
14610   echo "configure: failed program was:" >&5
14611   cat conftest.$ac_ext >&5
14612   rm -fr conftest*
14613   ac_cv_c_bigendian=yes
14614 fi
14615 rm -fr conftest*
14616 fi
14617
14618 fi
14619 fi
14620
14621 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14622 if test $ac_cv_c_bigendian = yes; then
14623   cat >> confdefs.h <<\EOF
14624 #define WORDS_BIGENDIAN 1
14625 EOF
14626
14627 fi
14628
14629 fi
14630
14631 echo $ac_n "checking size of short""... $ac_c" 1>&6
14632 echo "configure:14633: checking size of short" >&5 
14633 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14634   echo $ac_n "(cached) $ac_c" 1>&6
14635 else
14636   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14637   cat > conftest.$ac_ext <<EOF
14638 #line 14639 "configure"
14639 #include "confdefs.h"
14640 #include "confdefs.h" 
14641 #include <sys/types.h> 
14642  
14643
14644 int main() {
14645 switch (0) case 0: case (sizeof (short) == $ac_size):;
14646 ; return 0; }
14647 EOF
14648 if { (eval echo configure:14649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14649   rm -rf conftest*
14650   ac_cv_sizeof_short=$ac_size
14651 else
14652   echo "configure: failed program was:" >&5
14653   cat conftest.$ac_ext >&5
14654 fi
14655 rm -f conftest* 
14656   if test x$ac_cv_sizeof_short != x ; then break; fi 
14657 done 
14658
14659 fi
14660  
14661 if test x$ac_cv_sizeof_short = x ; then 
14662   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14663 fi 
14664 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14665 cat >> confdefs.h <<EOF
14666 #define SIZEOF_SHORT $ac_cv_sizeof_short
14667 EOF
14668  
14669  
14670 echo $ac_n "checking size of int""... $ac_c" 1>&6
14671 echo "configure:14672: checking size of int" >&5 
14672 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14673   echo $ac_n "(cached) $ac_c" 1>&6
14674 else
14675   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14676   cat > conftest.$ac_ext <<EOF
14677 #line 14678 "configure"
14678 #include "confdefs.h"
14679 #include "confdefs.h" 
14680 #include <sys/types.h> 
14681  
14682
14683 int main() {
14684 switch (0) case 0: case (sizeof (int) == $ac_size):;
14685 ; return 0; }
14686 EOF
14687 if { (eval echo configure:14688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14688   rm -rf conftest*
14689   ac_cv_sizeof_int=$ac_size
14690 else
14691   echo "configure: failed program was:" >&5
14692   cat conftest.$ac_ext >&5
14693 fi
14694 rm -f conftest* 
14695   if test x$ac_cv_sizeof_int != x ; then break; fi 
14696 done 
14697
14698 fi
14699  
14700 if test x$ac_cv_sizeof_int = x ; then 
14701   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14702 fi 
14703 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14704 cat >> confdefs.h <<EOF
14705 #define SIZEOF_INT $ac_cv_sizeof_int
14706 EOF
14707  
14708  
14709 echo $ac_n "checking size of long""... $ac_c" 1>&6
14710 echo "configure:14711: checking size of long" >&5 
14711 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14712   echo $ac_n "(cached) $ac_c" 1>&6
14713 else
14714   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14715   cat > conftest.$ac_ext <<EOF
14716 #line 14717 "configure"
14717 #include "confdefs.h"
14718 #include "confdefs.h" 
14719 #include <sys/types.h> 
14720  
14721
14722 int main() {
14723 switch (0) case 0: case (sizeof (long) == $ac_size):;
14724 ; return 0; }
14725 EOF
14726 if { (eval echo configure:14727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14727   rm -rf conftest*
14728   ac_cv_sizeof_long=$ac_size
14729 else
14730   echo "configure: failed program was:" >&5
14731   cat conftest.$ac_ext >&5
14732 fi
14733 rm -f conftest* 
14734   if test x$ac_cv_sizeof_long != x ; then break; fi 
14735 done 
14736
14737 fi
14738  
14739 if test x$ac_cv_sizeof_long = x ; then 
14740   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14741 fi 
14742 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14743 cat >> confdefs.h <<EOF
14744 #define SIZEOF_LONG $ac_cv_sizeof_long
14745 EOF
14746  
14747
14748
14749 if test "$ac_cv_sizeof_int" -lt 4 ; then
14750         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14751
14752         cat >> confdefs.h <<\EOF
14753 #define LBER_INT_T long
14754 EOF
14755
14756 else
14757         cat >> confdefs.h <<\EOF
14758 #define LBER_INT_T int
14759 EOF
14760
14761 fi
14762
14763 cat >> confdefs.h <<\EOF
14764 #define LBER_LEN_T long
14765 EOF
14766
14767 cat >> confdefs.h <<\EOF
14768 #define LBER_SOCKET_T int
14769 EOF
14770
14771 cat >> confdefs.h <<\EOF
14772 #define LBER_TAG_T long
14773 EOF
14774
14775
14776 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14777 echo "configure:14778: checking for 8-bit clean memcmp" >&5
14778 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14779   echo $ac_n "(cached) $ac_c" 1>&6
14780 else
14781   if test "$cross_compiling" = yes; then
14782   ac_cv_func_memcmp_clean=no
14783 else
14784   cat > conftest.$ac_ext <<EOF
14785 #line 14786 "configure"
14786 #include "confdefs.h"
14787
14788 main()
14789 {
14790   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14791   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14792 }
14793
14794 EOF
14795 if { (eval echo configure:14796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14796 then
14797   ac_cv_func_memcmp_clean=yes
14798 else
14799   echo "configure: failed program was:" >&5
14800   cat conftest.$ac_ext >&5
14801   rm -fr conftest*
14802   ac_cv_func_memcmp_clean=no
14803 fi
14804 rm -fr conftest*
14805 fi
14806
14807 fi
14808
14809 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14810 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14811
14812 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14813 echo "configure:14814: checking for strftime" >&5
14814 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14815   echo $ac_n "(cached) $ac_c" 1>&6
14816 else
14817   cat > conftest.$ac_ext <<EOF
14818 #line 14819 "configure"
14819 #include "confdefs.h"
14820 /* System header to define __stub macros and hopefully few prototypes,
14821     which can conflict with char strftime(); below.  */
14822 #include <assert.h>
14823 /* Override any gcc2 internal prototype to avoid an error.  */
14824 /* We use char because int might match the return type of a gcc2
14825     builtin and then its argument prototype would still apply.  */
14826 char strftime();
14827 char (*f)();
14828
14829 int main() {
14830
14831 /* The GNU C library defines this for functions which it implements
14832     to always fail with ENOSYS.  Some functions are actually named
14833     something starting with __ and the normal name is an alias.  */
14834 #if defined (__stub_strftime) || defined (__stub___strftime)
14835 choke me
14836 #else
14837 f = strftime;
14838 #endif
14839
14840 ; return 0; }
14841 EOF
14842 if { (eval echo configure:14843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14843   rm -rf conftest*
14844   eval "ac_cv_func_strftime=yes"
14845 else
14846   echo "configure: failed program was:" >&5
14847   cat conftest.$ac_ext >&5
14848   rm -rf conftest*
14849   eval "ac_cv_func_strftime=no"
14850 fi
14851 rm -f conftest*
14852 fi
14853
14854 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14855   echo "$ac_t""yes" 1>&6
14856   cat >> confdefs.h <<\EOF
14857 #define HAVE_STRFTIME 1
14858 EOF
14859
14860 else
14861   echo "$ac_t""no" 1>&6
14862 # strftime is in -lintl on SCO UNIX.
14863 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14864 echo "configure:14865: checking for strftime in -lintl" >&5
14865 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14867   echo $ac_n "(cached) $ac_c" 1>&6
14868 else
14869   ac_save_LIBS="$LIBS"
14870 LIBS="-lintl  $LIBS"
14871 cat > conftest.$ac_ext <<EOF
14872 #line 14873 "configure"
14873 #include "confdefs.h"
14874 /* Override any gcc2 internal prototype to avoid an error.  */
14875 /* We use char because int might match the return type of a gcc2
14876     builtin and then its argument prototype would still apply.  */
14877 char strftime();
14878
14879 int main() {
14880 strftime()
14881 ; return 0; }
14882 EOF
14883 if { (eval echo configure:14884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14884   rm -rf conftest*
14885   eval "ac_cv_lib_$ac_lib_var=yes"
14886 else
14887   echo "configure: failed program was:" >&5
14888   cat conftest.$ac_ext >&5
14889   rm -rf conftest*
14890   eval "ac_cv_lib_$ac_lib_var=no"
14891 fi
14892 rm -f conftest*
14893 LIBS="$ac_save_LIBS"
14894
14895 fi
14896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14897   echo "$ac_t""yes" 1>&6
14898   cat >> confdefs.h <<\EOF
14899 #define HAVE_STRFTIME 1
14900 EOF
14901
14902 LIBS="-lintl $LIBS"
14903 else
14904   echo "$ac_t""no" 1>&6
14905 fi
14906
14907 fi
14908
14909
14910 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14911 echo "configure:14912: checking for inet_aton()" >&5
14912 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14913   echo $ac_n "(cached) $ac_c" 1>&6
14914 else
14915   cat > conftest.$ac_ext <<EOF
14916 #line 14917 "configure"
14917 #include "confdefs.h"
14918
14919 #ifdef HAVE_SYS_TYPES_H
14920 #       include <sys/types.h>
14921 #endif
14922 #ifdef HAVE_SYS_SOCKET_H
14923 #       include <sys/socket.h>
14924 #       ifdef HAVE_SYS_SELECT_H
14925 #               include <sys/select.h>
14926 #       endif
14927 #       include <netinet/in.h>
14928 #       ifdef HAVE_ARPA_INET_H
14929 #               include <arpa/inet.h>
14930 #       endif
14931 #endif
14932
14933 int main() {
14934 struct in_addr in;
14935 int rc = inet_aton( "255.255.255.255", &in );
14936 ; return 0; }
14937 EOF
14938 if { (eval echo configure:14939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14939   rm -rf conftest*
14940   ol_cv_func_inet_aton=yes
14941 else
14942   echo "configure: failed program was:" >&5
14943   cat conftest.$ac_ext >&5
14944   rm -rf conftest*
14945   ol_cv_func_inet_aton=no
14946 fi
14947 rm -f conftest*
14948 fi
14949
14950 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14951   if test $ol_cv_func_inet_aton != no; then
14952     cat >> confdefs.h <<\EOF
14953 #define HAVE_INET_ATON 1
14954 EOF
14955
14956   fi
14957  
14958
14959 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14960 echo "configure:14961: checking for _spawnlp" >&5
14961 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14962   echo $ac_n "(cached) $ac_c" 1>&6
14963 else
14964   cat > conftest.$ac_ext <<EOF
14965 #line 14966 "configure"
14966 #include "confdefs.h"
14967 /* System header to define __stub macros and hopefully few prototypes,
14968     which can conflict with char _spawnlp(); below.  */
14969 #include <assert.h>
14970 /* Override any gcc2 internal prototype to avoid an error.  */
14971 /* We use char because int might match the return type of a gcc2
14972     builtin and then its argument prototype would still apply.  */
14973 char _spawnlp();
14974 char (*f)();
14975
14976 int main() {
14977
14978 /* The GNU C library defines this for functions which it implements
14979     to always fail with ENOSYS.  Some functions are actually named
14980     something starting with __ and the normal name is an alias.  */
14981 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14982 choke me
14983 #else
14984 f = _spawnlp;
14985 #endif
14986
14987 ; return 0; }
14988 EOF
14989 if { (eval echo configure:14990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14990   rm -rf conftest*
14991   eval "ac_cv_func__spawnlp=yes"
14992 else
14993   echo "configure: failed program was:" >&5
14994   cat conftest.$ac_ext >&5
14995   rm -rf conftest*
14996   eval "ac_cv_func__spawnlp=no"
14997 fi
14998 rm -f conftest*
14999 fi
15000
15001 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15002   echo "$ac_t""yes" 1>&6
15003   cat >> confdefs.h <<\EOF
15004 #define HAVE_SPAWNLP 1
15005 EOF
15006
15007 else
15008   echo "$ac_t""no" 1>&6
15009 fi
15010
15011
15012 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15013 echo "configure:15014: checking for _snprintf" >&5
15014 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15015   echo $ac_n "(cached) $ac_c" 1>&6
15016 else
15017   cat > conftest.$ac_ext <<EOF
15018 #line 15019 "configure"
15019 #include "confdefs.h"
15020 /* System header to define __stub macros and hopefully few prototypes,
15021     which can conflict with char _snprintf(); below.  */
15022 #include <assert.h>
15023 /* Override any gcc2 internal prototype to avoid an error.  */
15024 /* We use char because int might match the return type of a gcc2
15025     builtin and then its argument prototype would still apply.  */
15026 char _snprintf();
15027 char (*f)();
15028
15029 int main() {
15030
15031 /* The GNU C library defines this for functions which it implements
15032     to always fail with ENOSYS.  Some functions are actually named
15033     something starting with __ and the normal name is an alias.  */
15034 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15035 choke me
15036 #else
15037 f = _snprintf;
15038 #endif
15039
15040 ; return 0; }
15041 EOF
15042 if { (eval echo configure:15043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15043   rm -rf conftest*
15044   eval "ac_cv_func__snprintf=yes"
15045 else
15046   echo "configure: failed program was:" >&5
15047   cat conftest.$ac_ext >&5
15048   rm -rf conftest*
15049   eval "ac_cv_func__snprintf=no"
15050 fi
15051 rm -f conftest*
15052 fi
15053
15054 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15055   echo "$ac_t""yes" 1>&6
15056   ac_cv_func_snprintf=yes
15057         cat >> confdefs.h <<\EOF
15058 #define snprintf _snprintf
15059 EOF
15060
15061
15062 else
15063   echo "$ac_t""no" 1>&6
15064 fi
15065
15066
15067 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15068 echo "configure:15069: checking for _vsnprintf" >&5
15069 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15070   echo $ac_n "(cached) $ac_c" 1>&6
15071 else
15072   cat > conftest.$ac_ext <<EOF
15073 #line 15074 "configure"
15074 #include "confdefs.h"
15075 /* System header to define __stub macros and hopefully few prototypes,
15076     which can conflict with char _vsnprintf(); below.  */
15077 #include <assert.h>
15078 /* Override any gcc2 internal prototype to avoid an error.  */
15079 /* We use char because int might match the return type of a gcc2
15080     builtin and then its argument prototype would still apply.  */
15081 char _vsnprintf();
15082 char (*f)();
15083
15084 int main() {
15085
15086 /* The GNU C library defines this for functions which it implements
15087     to always fail with ENOSYS.  Some functions are actually named
15088     something starting with __ and the normal name is an alias.  */
15089 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15090 choke me
15091 #else
15092 f = _vsnprintf;
15093 #endif
15094
15095 ; return 0; }
15096 EOF
15097 if { (eval echo configure:15098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15098   rm -rf conftest*
15099   eval "ac_cv_func__vsnprintf=yes"
15100 else
15101   echo "configure: failed program was:" >&5
15102   cat conftest.$ac_ext >&5
15103   rm -rf conftest*
15104   eval "ac_cv_func__vsnprintf=no"
15105 fi
15106 rm -f conftest*
15107 fi
15108
15109 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15110   echo "$ac_t""yes" 1>&6
15111   ac_cv_func_vsnprintf=yes
15112         cat >> confdefs.h <<\EOF
15113 #define vsnprintf _vsnprintf
15114 EOF
15115
15116
15117 else
15118   echo "$ac_t""no" 1>&6
15119 fi
15120
15121
15122 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15123 echo "configure:15124: checking for vprintf" >&5
15124 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15125   echo $ac_n "(cached) $ac_c" 1>&6
15126 else
15127   cat > conftest.$ac_ext <<EOF
15128 #line 15129 "configure"
15129 #include "confdefs.h"
15130 /* System header to define __stub macros and hopefully few prototypes,
15131     which can conflict with char vprintf(); below.  */
15132 #include <assert.h>
15133 /* Override any gcc2 internal prototype to avoid an error.  */
15134 /* We use char because int might match the return type of a gcc2
15135     builtin and then its argument prototype would still apply.  */
15136 char vprintf();
15137 char (*f)();
15138
15139 int main() {
15140
15141 /* The GNU C library defines this for functions which it implements
15142     to always fail with ENOSYS.  Some functions are actually named
15143     something starting with __ and the normal name is an alias.  */
15144 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15145 choke me
15146 #else
15147 f = vprintf;
15148 #endif
15149
15150 ; return 0; }
15151 EOF
15152 if { (eval echo configure:15153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15153   rm -rf conftest*
15154   eval "ac_cv_func_vprintf=yes"
15155 else
15156   echo "configure: failed program was:" >&5
15157   cat conftest.$ac_ext >&5
15158   rm -rf conftest*
15159   eval "ac_cv_func_vprintf=no"
15160 fi
15161 rm -f conftest*
15162 fi
15163
15164 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15165   echo "$ac_t""yes" 1>&6
15166   cat >> confdefs.h <<\EOF
15167 #define HAVE_VPRINTF 1
15168 EOF
15169
15170 else
15171   echo "$ac_t""no" 1>&6
15172 fi
15173
15174 if test "$ac_cv_func_vprintf" != yes; then
15175 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15176 echo "configure:15177: checking for _doprnt" >&5
15177 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15178   echo $ac_n "(cached) $ac_c" 1>&6
15179 else
15180   cat > conftest.$ac_ext <<EOF
15181 #line 15182 "configure"
15182 #include "confdefs.h"
15183 /* System header to define __stub macros and hopefully few prototypes,
15184     which can conflict with char _doprnt(); below.  */
15185 #include <assert.h>
15186 /* Override any gcc2 internal prototype to avoid an error.  */
15187 /* We use char because int might match the return type of a gcc2
15188     builtin and then its argument prototype would still apply.  */
15189 char _doprnt();
15190 char (*f)();
15191
15192 int main() {
15193
15194 /* The GNU C library defines this for functions which it implements
15195     to always fail with ENOSYS.  Some functions are actually named
15196     something starting with __ and the normal name is an alias.  */
15197 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15198 choke me
15199 #else
15200 f = _doprnt;
15201 #endif
15202
15203 ; return 0; }
15204 EOF
15205 if { (eval echo configure:15206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15206   rm -rf conftest*
15207   eval "ac_cv_func__doprnt=yes"
15208 else
15209   echo "configure: failed program was:" >&5
15210   cat conftest.$ac_ext >&5
15211   rm -rf conftest*
15212   eval "ac_cv_func__doprnt=no"
15213 fi
15214 rm -f conftest*
15215 fi
15216
15217 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15218   echo "$ac_t""yes" 1>&6
15219   cat >> confdefs.h <<\EOF
15220 #define HAVE_DOPRNT 1
15221 EOF
15222
15223 else
15224   echo "$ac_t""no" 1>&6
15225 fi
15226
15227 fi
15228
15229
15230 if test $ac_cv_func_vprintf = yes ; then
15231                 for ac_func in vsnprintf vsprintf
15232 do
15233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15234 echo "configure:15235: checking for $ac_func" >&5
15235 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15236   echo $ac_n "(cached) $ac_c" 1>&6
15237 else
15238   cat > conftest.$ac_ext <<EOF
15239 #line 15240 "configure"
15240 #include "confdefs.h"
15241 /* System header to define __stub macros and hopefully few prototypes,
15242     which can conflict with char $ac_func(); below.  */
15243 #include <assert.h>
15244 /* Override any gcc2 internal prototype to avoid an error.  */
15245 /* We use char because int might match the return type of a gcc2
15246     builtin and then its argument prototype would still apply.  */
15247 char $ac_func();
15248 char (*f)();
15249
15250 int main() {
15251
15252 /* The GNU C library defines this for functions which it implements
15253     to always fail with ENOSYS.  Some functions are actually named
15254     something starting with __ and the normal name is an alias.  */
15255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15256 choke me
15257 #else
15258 f = $ac_func;
15259 #endif
15260
15261 ; return 0; }
15262 EOF
15263 if { (eval echo configure:15264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15264   rm -rf conftest*
15265   eval "ac_cv_func_$ac_func=yes"
15266 else
15267   echo "configure: failed program was:" >&5
15268   cat conftest.$ac_ext >&5
15269   rm -rf conftest*
15270   eval "ac_cv_func_$ac_func=no"
15271 fi
15272 rm -f conftest*
15273 fi
15274
15275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15276   echo "$ac_t""yes" 1>&6
15277     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15278   cat >> confdefs.h <<EOF
15279 #define $ac_tr_func 1
15280 EOF
15281  
15282 else
15283   echo "$ac_t""no" 1>&6
15284 fi
15285 done
15286
15287 fi
15288
15289 for ac_func in \
15290         bcopy                   \
15291         closesocket             \
15292         chroot                  \
15293         endgrent                \
15294         endpwent                \
15295         flock                   \
15296         getdtablesize   \
15297         getgrgid                \
15298         gethostname             \
15299         getpass                 \
15300         getpassphrase   \
15301         getpwuid                \
15302         getpwnam                \
15303         getspnam                \
15304         gettimeofday    \
15305         initgroups              \
15306         lockf                   \
15307         memcpy                  \
15308         memmove                 \
15309         mkstemp                 \
15310         pipe                    \
15311         read                    \
15312         recv                    \
15313         recvfrom                \
15314         setpwfile               \
15315         setgid                  \
15316         setegid                 \
15317         setsid                  \
15318         setuid                  \
15319         seteuid                 \
15320         sigaction               \
15321         signal                  \
15322         sigset                  \
15323         snprintf                \
15324         strdup                  \
15325         strerror                \
15326         strpbrk                 \
15327         strrchr                 \
15328         strsep                  \
15329         strstr                  \
15330         strtol                  \
15331         strtoul                 \
15332         strspn                  \
15333         sysconf                 \
15334         waitpid                 \
15335         wait4                   \
15336         write                   \
15337         send                    \
15338         sendto                  \
15339
15340 do
15341 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15342 echo "configure:15343: checking for $ac_func" >&5
15343 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15344   echo $ac_n "(cached) $ac_c" 1>&6
15345 else
15346   cat > conftest.$ac_ext <<EOF
15347 #line 15348 "configure"
15348 #include "confdefs.h"
15349 /* System header to define __stub macros and hopefully few prototypes,
15350     which can conflict with char $ac_func(); below.  */
15351 #include <assert.h>
15352 /* Override any gcc2 internal prototype to avoid an error.  */
15353 /* We use char because int might match the return type of a gcc2
15354     builtin and then its argument prototype would still apply.  */
15355 char $ac_func();
15356 char (*f)();
15357
15358 int main() {
15359
15360 /* The GNU C library defines this for functions which it implements
15361     to always fail with ENOSYS.  Some functions are actually named
15362     something starting with __ and the normal name is an alias.  */
15363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15364 choke me
15365 #else
15366 f = $ac_func;
15367 #endif
15368
15369 ; return 0; }
15370 EOF
15371 if { (eval echo configure:15372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15372   rm -rf conftest*
15373   eval "ac_cv_func_$ac_func=yes"
15374 else
15375   echo "configure: failed program was:" >&5
15376   cat conftest.$ac_ext >&5
15377   rm -rf conftest*
15378   eval "ac_cv_func_$ac_func=no"
15379 fi
15380 rm -f conftest*
15381 fi
15382
15383 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15384   echo "$ac_t""yes" 1>&6
15385     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15386   cat >> confdefs.h <<EOF
15387 #define $ac_tr_func 1
15388 EOF
15389  
15390 else
15391   echo "$ac_t""no" 1>&6
15392 fi
15393 done
15394
15395
15396 for ac_func in getopt tempnam
15397 do
15398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15399 echo "configure:15400: checking for $ac_func" >&5
15400 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15401   echo $ac_n "(cached) $ac_c" 1>&6
15402 else
15403   cat > conftest.$ac_ext <<EOF
15404 #line 15405 "configure"
15405 #include "confdefs.h"
15406 /* System header to define __stub macros and hopefully few prototypes,
15407     which can conflict with char $ac_func(); below.  */
15408 #include <assert.h>
15409 /* Override any gcc2 internal prototype to avoid an error.  */
15410 /* We use char because int might match the return type of a gcc2
15411     builtin and then its argument prototype would still apply.  */
15412 char $ac_func();
15413 char (*f)();
15414
15415 int main() {
15416
15417 /* The GNU C library defines this for functions which it implements
15418     to always fail with ENOSYS.  Some functions are actually named
15419     something starting with __ and the normal name is an alias.  */
15420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15421 choke me
15422 #else
15423 f = $ac_func;
15424 #endif
15425
15426 ; return 0; }
15427 EOF
15428 if { (eval echo configure:15429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15429   rm -rf conftest*
15430   eval "ac_cv_func_$ac_func=yes"
15431 else
15432   echo "configure: failed program was:" >&5
15433   cat conftest.$ac_ext >&5
15434   rm -rf conftest*
15435   eval "ac_cv_func_$ac_func=no"
15436 fi
15437 rm -f conftest*
15438 fi
15439
15440 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15441   echo "$ac_t""yes" 1>&6
15442     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15443   cat >> confdefs.h <<EOF
15444 #define $ac_tr_func 1
15445 EOF
15446  
15447 else
15448   echo "$ac_t""no" 1>&6
15449 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15450 fi
15451 done
15452
15453
15454
15455 if test "$ac_cv_func_getopt" != yes; then
15456     LIBSRCS="$LIBSRCS getopt.c"
15457 fi
15458
15459 if test "$ac_cv_func_tempnam" != yes; then
15460     LIBSRCS="$LIBSRCS tempnam.c"
15461 fi
15462
15463 # Check Configuration
15464 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15465 echo "configure:15466: checking declaration of sys_errlist" >&5
15466 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15467   echo $ac_n "(cached) $ac_c" 1>&6
15468 else
15469   
15470         cat > conftest.$ac_ext <<EOF
15471 #line 15472 "configure"
15472 #include "confdefs.h"
15473
15474 #include <stdio.h>
15475 #include <sys/types.h>
15476 #include <errno.h>
15477 #ifdef WINNT
15478 #include <stdlib.h>
15479 #endif 
15480 int main() {
15481 char *c = (char *) *sys_errlist
15482 ; return 0; }
15483 EOF
15484 if { (eval echo configure:15485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15485   rm -rf conftest*
15486   ol_cv_dcl_sys_errlist=yes
15487         ol_cv_have_sys_errlist=yes
15488 else
15489   echo "configure: failed program was:" >&5
15490   cat conftest.$ac_ext >&5
15491   rm -rf conftest*
15492   ol_cv_dcl_sys_errlist=no
15493 fi
15494 rm -f conftest*
15495 fi
15496
15497 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15498 #
15499 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15500 if test $ol_cv_dcl_sys_errlist = no ; then
15501         cat >> confdefs.h <<\EOF
15502 #define DECL_SYS_ERRLIST 1
15503 EOF
15504
15505
15506         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15507 echo "configure:15508: checking existence of sys_errlist" >&5
15508 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15509   echo $ac_n "(cached) $ac_c" 1>&6
15510 else
15511   
15512                 cat > conftest.$ac_ext <<EOF
15513 #line 15514 "configure"
15514 #include "confdefs.h"
15515 #include <errno.h>
15516 int main() {
15517 char *c = (char *) *sys_errlist
15518 ; return 0; }
15519 EOF
15520 if { (eval echo configure:15521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15521   rm -rf conftest*
15522   ol_cv_have_sys_errlist=yes
15523 else
15524   echo "configure: failed program was:" >&5
15525   cat conftest.$ac_ext >&5
15526   rm -rf conftest*
15527   ol_cv_have_sys_errlist=no
15528 fi
15529 rm -f conftest*
15530 fi
15531
15532 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15533 fi
15534 if test $ol_cv_have_sys_errlist = yes ; then
15535         cat >> confdefs.h <<\EOF
15536 #define HAVE_SYS_ERRLIST 1
15537 EOF
15538
15539 fi
15540
15541
15542
15543 if test "$ol_enable_debug" != no ; then
15544         cat >> confdefs.h <<\EOF
15545 #define LDAP_DEBUG 1
15546 EOF
15547
15548 fi
15549 if test "$ol_enable_syslog" = yes ; then
15550         cat >> confdefs.h <<\EOF
15551 #define LDAP_SYSLOG 1
15552 EOF
15553
15554 fi
15555 if test "$ol_enable_libui" = yes ; then
15556         cat >> confdefs.h <<\EOF
15557 #define LDAP_LIBUI 1
15558 EOF
15559
15560 fi
15561 if test "$ol_enable_cache" = no ; then
15562         cat >> confdefs.h <<\EOF
15563 #define LDAP_NOCACHE 1
15564 EOF
15565
15566 fi
15567 if test "$ol_link_kbind" != no ; then
15568         cat >> confdefs.h <<\EOF
15569 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15570 EOF
15571
15572 fi
15573 if test "$ol_enable_proctitle" != no ; then
15574         cat >> confdefs.h <<\EOF
15575 #define LDAP_PROCTITLE 1
15576 EOF
15577
15578 fi
15579 if test "$ol_enable_referrals" != no ; then
15580         cat >> confdefs.h <<\EOF
15581 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15582 EOF
15583
15584 fi
15585 if test "$ol_enable_local" != no; then
15586         cat >> confdefs.h <<\EOF
15587 #define LDAP_PF_LOCAL 1
15588 EOF
15589
15590 fi
15591 if test "$ol_enable_ipv6" != no; then
15592         cat >> confdefs.h <<\EOF
15593 #define LDAP_PF_INET6 1
15594 EOF
15595
15596 fi
15597 if test "$ol_enable_cleartext" != no ; then
15598         cat >> confdefs.h <<\EOF
15599 #define SLAPD_CLEARTEXT 1
15600 EOF
15601
15602 fi
15603 if test "$ol_enable_crypt" != no ; then
15604         cat >> confdefs.h <<\EOF
15605 #define SLAPD_CRYPT 1
15606 EOF
15607
15608 fi
15609 if test "$ol_link_kpasswd" != no ; then
15610         cat >> confdefs.h <<\EOF
15611 #define SLAPD_KPASSWD 1
15612 EOF
15613
15614 fi
15615 if test "$ol_link_spasswd" != no ; then
15616         cat >> confdefs.h <<\EOF
15617 #define SLAPD_SPASSWD 1
15618 EOF
15619
15620 fi
15621 if test "$ol_enable_multimaster" != no ; then
15622         cat >> confdefs.h <<\EOF
15623 #define SLAPD_MULTIMASTER 1
15624 EOF
15625
15626 fi
15627 if test "$ol_enable_phonetic" != no ; then
15628         cat >> confdefs.h <<\EOF
15629 #define SLAPD_PHONETIC 1
15630 EOF
15631
15632 fi
15633 if test "$ol_enable_rlookups" != no ; then
15634         cat >> confdefs.h <<\EOF
15635 #define SLAPD_RLOOKUPS 1
15636 EOF
15637
15638 fi
15639 if test "$ol_enable_aci" != no ; then
15640         cat >> confdefs.h <<\EOF
15641 #define SLAPD_ACI_ENABLED 1
15642 EOF
15643
15644 fi
15645
15646 if test "$ol_link_modules" != no ; then
15647         cat >> confdefs.h <<\EOF
15648 #define SLAPD_MODULES 1
15649 EOF
15650
15651         BUILD_SLAPD=yes
15652         SLAPD_MODULES_LDFLAGS="-dlopen self"
15653 fi
15654
15655 if test "$ol_link_dnssrv" != no ; then
15656         cat >> confdefs.h <<\EOF
15657 #define SLAPD_DNSSRV 1
15658 EOF
15659
15660         BUILD_SLAPD=yes
15661         BUILD_DNSSRV=yes
15662         if test "$ol_with_dnssrv_module" != static ; then
15663                 cat >> confdefs.h <<\EOF
15664 #define SLAPD_DNSSRV_DYNAMIC 1
15665 EOF
15666
15667                 BUILD_DNSSRV=mod
15668                 BUILD_DNSSRV_DYNAMIC=shared
15669                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15670         fi
15671 fi
15672
15673 if test "$ol_enable_ldap" != no ; then
15674         cat >> confdefs.h <<\EOF
15675 #define SLAPD_LDAP 1
15676 EOF
15677
15678         BUILD_SLAPD=yes
15679         BUILD_LDAP=yes
15680         if test "$ol_with_ldap_module" != static ; then
15681                 cat >> confdefs.h <<\EOF
15682 #define SLAPD_LDAP_DYNAMIC 1
15683 EOF
15684
15685                 BUILD_LDAP=mod
15686                 BUILD_LDAP_DYNAMIC=shared
15687                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15688         fi
15689 fi
15690
15691 if test "$ol_link_ldbm" != no ; then
15692         cat >> confdefs.h <<\EOF
15693 #define SLAPD_LDBM 1
15694 EOF
15695
15696         BUILD_SLAPD=yes
15697         BUILD_LDBM=yes
15698         if test "$ol_with_ldbm_module" != static ; then
15699                 cat >> confdefs.h <<\EOF
15700 #define SLAPD_LDBM_DYNAMIC 1
15701 EOF
15702
15703                 BUILD_LDBM=mod
15704                 BUILD_LDBM_DYNAMIC=shared
15705                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15706         fi
15707 fi
15708
15709 if test "$ol_enable_passwd" != no ; then
15710         cat >> confdefs.h <<\EOF
15711 #define SLAPD_PASSWD 1
15712 EOF
15713
15714         BUILD_SLAPD=yes
15715         BUILD_PASSWD=yes
15716         if test "$ol_with_passwd_module" != static ; then
15717                 cat >> confdefs.h <<\EOF
15718 #define SLAPD_PASSWD_DYNAMIC 1
15719 EOF
15720
15721                 BUILD_PASSWD=mod
15722                 BUILD_PASSWD_DYNAMIC=shared
15723                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15724         fi
15725 fi
15726
15727 if test "$ol_enable_shell" != no ; then
15728         cat >> confdefs.h <<\EOF
15729 #define SLAPD_SHELL 1
15730 EOF
15731
15732         BUILD_SLAPD=yes
15733         BUILD_SHELL=yes
15734         if test "$ol_with_shell_module" != static ; then
15735                 cat >> confdefs.h <<\EOF
15736 #define SLAPD_SHELL_DYNAMIC 1
15737 EOF
15738
15739                 BUILD_SHELL=mod
15740                 BUILD_SHELL_DYNAMIC=shared
15741                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15742         fi
15743 fi
15744
15745 if test "$ol_enable_sql" != no ; then
15746         cat >> confdefs.h <<\EOF
15747 #define SLAPD_SQL 1
15748 EOF
15749
15750         BUILD_SLAPD=yes
15751         BUILD_SQL=yes
15752         if test "$ol_with_sql_module" != static; then
15753                 cat >> confdefs.h <<\EOF
15754 #define SLAPD_SQL_DYNAMIC 1
15755 EOF
15756
15757                 BUILD_SQL=mod
15758                 BUILD_SQL_DYNAMIC=shared
15759                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15760         fi
15761 fi
15762
15763 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15764         $BUILD_SLAPD = yes ; then
15765         BUILD_SLURPD=yes
15766 fi
15767
15768
15769 if test "$LINK_BINS_DYNAMIC" = yes; then
15770     LIB_LINKAGE=DYN
15771     LT_LIB_LINKAGE=shared
15772 else
15773     LIB_LINKAGE=STAT
15774     LT_LIB_LINKAGE=static
15775 fi
15776
15777 if test "$ac_cv_mingw32" = yes ; then
15778     PLAT=NT
15779     DYN_EXT=dll
15780 else
15781     PLAT=UNIX
15782     DYN_EXT=so
15783 fi
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793   
15794   
15795   
15796   
15797   
15798   
15799   
15800   
15801   
15802   
15803   
15804   
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835 trap '' 1 2 15
15836
15837 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15838
15839 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15840 # Let make expand exec_prefix.
15841 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15842
15843 # Any assignment to VPATH causes Sun make to only execute
15844 # the first set of double-colon rules, so remove it if not needed.
15845 # If there is a colon in the path, we need to keep it.
15846 if test "x$srcdir" = x.; then
15847   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15848 fi
15849
15850 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15851
15852 DEFS=-DHAVE_CONFIG_H
15853
15854 # Without the "./", some shells look in PATH for config.status.
15855 : ${CONFIG_STATUS=./config.status}
15856
15857 echo creating $CONFIG_STATUS
15858 rm -f $CONFIG_STATUS
15859 cat > $CONFIG_STATUS <<EOF
15860 #! /bin/sh
15861 # Generated automatically by configure.
15862 # Run this file to recreate the current configuration.
15863 # This directory was configured as follows,
15864 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15865 #
15866 # $0 $ac_configure_args
15867 #
15868 # Compiler output produced by configure, useful for debugging
15869 # configure, is in ./config.log if it exists.
15870
15871 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15872 for ac_option
15873 do
15874   case "\$ac_option" in
15875   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15876     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15877     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15878   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15879     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15880     exit 0 ;;
15881   -help | --help | --hel | --he | --h)
15882     echo "\$ac_cs_usage"; exit 0 ;;
15883   *) echo "\$ac_cs_usage"; exit 1 ;;
15884   esac
15885 done
15886
15887 ac_given_srcdir=$srcdir
15888 ac_given_INSTALL="$INSTALL"
15889
15890 trap 'rm -fr `echo "\
15891 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15892 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15893 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15894 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15895 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15896 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15897 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15898 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15899 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15900 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15901 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15902 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15903 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15904 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15905 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15906 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15907 include/Makefile:build/top.mk:include/Makefile.in \
15908 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15909 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15910 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15911 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15912 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15913 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15914 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15915 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15916 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15917 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15918 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15919 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15920 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15921 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15922 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15923 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15924 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15925 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15926 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15927 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15928 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15929 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15930 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15931 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15932  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15933 EOF
15934 cat >> $CONFIG_STATUS <<EOF
15935
15936 # Protect against being on the right side of a sed subst in config.status.
15937 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15938  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15939 $ac_vpsub
15940 $extrasub
15941 s%@SHELL@%$SHELL%g
15942 s%@CFLAGS@%$CFLAGS%g
15943 s%@CPPFLAGS@%$CPPFLAGS%g
15944 s%@CXXFLAGS@%$CXXFLAGS%g
15945 s%@FFLAGS@%$FFLAGS%g
15946 s%@DEFS@%$DEFS%g
15947 s%@LDFLAGS@%$LDFLAGS%g
15948 s%@LIBS@%$LIBS%g
15949 s%@exec_prefix@%$exec_prefix%g
15950 s%@prefix@%$prefix%g
15951 s%@program_transform_name@%$program_transform_name%g
15952 s%@bindir@%$bindir%g
15953 s%@sbindir@%$sbindir%g
15954 s%@libexecdir@%$libexecdir%g
15955 s%@datadir@%$datadir%g
15956 s%@sysconfdir@%$sysconfdir%g
15957 s%@sharedstatedir@%$sharedstatedir%g
15958 s%@localstatedir@%$localstatedir%g
15959 s%@libdir@%$libdir%g
15960 s%@includedir@%$includedir%g
15961 s%@oldincludedir@%$oldincludedir%g
15962 s%@infodir@%$infodir%g
15963 s%@mandir@%$mandir%g
15964 s%@host@%$host%g
15965 s%@host_alias@%$host_alias%g
15966 s%@host_cpu@%$host_cpu%g
15967 s%@host_vendor@%$host_vendor%g
15968 s%@host_os@%$host_os%g
15969 s%@target@%$target%g
15970 s%@target_alias@%$target_alias%g
15971 s%@target_cpu@%$target_cpu%g
15972 s%@target_vendor@%$target_vendor%g
15973 s%@target_os@%$target_os%g
15974 s%@build@%$build%g
15975 s%@build_alias@%$build_alias%g
15976 s%@build_cpu@%$build_cpu%g
15977 s%@build_vendor@%$build_vendor%g
15978 s%@build_os@%$build_os%g
15979 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15980 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15981 s%@INSTALL_DATA@%$INSTALL_DATA%g
15982 s%@PACKAGE@%$PACKAGE%g
15983 s%@VERSION@%$VERSION%g
15984 s%@ACLOCAL@%$ACLOCAL%g
15985 s%@AUTOCONF@%$AUTOCONF%g
15986 s%@AUTOMAKE@%$AUTOMAKE%g
15987 s%@AUTOHEADER@%$AUTOHEADER%g
15988 s%@MAKEINFO@%$MAKEINFO%g
15989 s%@install_sh@%$install_sh%g
15990 s%@AMTAR@%$AMTAR%g
15991 s%@AWK@%$AWK%g
15992 s%@AMTARFLAGS@%$AMTARFLAGS%g
15993 s%@SET_MAKE@%$SET_MAKE%g
15994 s%@top_builddir@%$top_builddir%g
15995 s%@ldap_subdir@%$ldap_subdir%g
15996 s%@CC@%$CC%g
15997 s%@RANLIB@%$RANLIB%g
15998 s%@LN_S@%$LN_S%g
15999 s%@DLLTOOL@%$DLLTOOL%g
16000 s%@AS@%$AS%g
16001 s%@OBJDUMP@%$OBJDUMP%g
16002 s%@LIBTOOL@%$LIBTOOL%g
16003 s%@LN_H@%$LN_H%g
16004 s%@SENDMAIL@%$SENDMAIL%g
16005 s%@EDITOR@%$EDITOR%g
16006 s%@FINGER@%$FINGER%g
16007 s%@CPP@%$CPP%g
16008 s%@EXEEXT@%$EXEEXT%g
16009 s%@OBJEXT@%$OBJEXT%g
16010 s%@OL_MKDEP@%$OL_MKDEP%g
16011 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16012 s%@LIBOBJS@%$LIBOBJS%g
16013 s%@LIBSRCS@%$LIBSRCS%g
16014 s%@PLAT@%$PLAT%g
16015 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16016 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16017 s%@DYN_EXT@%$DYN_EXT%g
16018 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16019 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16020 s%@BUILD_LDAP@%$BUILD_LDAP%g
16021 s%@BUILD_LDBM@%$BUILD_LDBM%g
16022 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16023 s%@BUILD_SHELL@%$BUILD_SHELL%g
16024 s%@BUILD_SQL@%$BUILD_SQL%g
16025 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16026 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16027 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16028 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16029 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16030 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16031 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16032 s%@LDAP_LIBS@%$LDAP_LIBS%g
16033 s%@LDIF_LIBS@%$LDIF_LIBS%g
16034 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16035 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16036 s%@LDBM_LIBS@%$LDBM_LIBS%g
16037 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16038 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16039 s%@WRAP_LIBS@%$WRAP_LIBS%g
16040 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16041 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16042 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16043 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16044 s%@KRB4_LIBS@%$KRB4_LIBS%g
16045 s%@KRB5_LIBS@%$KRB5_LIBS%g
16046 s%@READLINE_LIBS@%$READLINE_LIBS%g
16047 s%@SASL_LIBS@%$SASL_LIBS%g
16048 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16049 s%@TLS_LIBS@%$TLS_LIBS%g
16050 s%@MODULES_LIBS@%$MODULES_LIBS%g
16051 s%@AUTH_LIBS@%$AUTH_LIBS%g
16052 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16053 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16054 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16055
16056 CEOF
16057 EOF
16058
16059 cat >> $CONFIG_STATUS <<\EOF
16060
16061 # Split the substitutions into bite-sized pieces for seds with
16062 # small command number limits, like on Digital OSF/1 and HP-UX.
16063 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16064 ac_file=1 # Number of current file.
16065 ac_beg=1 # First line for current file.
16066 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16067 ac_more_lines=:
16068 ac_sed_cmds=""
16069 while $ac_more_lines; do
16070   if test $ac_beg -gt 1; then
16071     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16072   else
16073     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16074   fi
16075   if test ! -s conftest.s$ac_file; then
16076     ac_more_lines=false
16077     rm -f conftest.s$ac_file
16078   else
16079     if test -z "$ac_sed_cmds"; then
16080       ac_sed_cmds="sed -f conftest.s$ac_file"
16081     else
16082       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16083     fi
16084     ac_file=`expr $ac_file + 1`
16085     ac_beg=$ac_end
16086     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16087   fi
16088 done
16089 if test -z "$ac_sed_cmds"; then
16090   ac_sed_cmds=cat
16091 fi
16092 EOF
16093
16094 cat >> $CONFIG_STATUS <<EOF
16095
16096 CONFIG_FILES=\${CONFIG_FILES-"\
16097 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16098 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16099 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16100 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16101 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16102 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16103 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16104 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16105 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16106 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16107 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16108 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16109 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16110 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16111 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16112 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16113 include/Makefile:build/top.mk:include/Makefile.in \
16114 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16115 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16116 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16117 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16118 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16119 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16120 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16121 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16122 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16123 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16124 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16125 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16126 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16127 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16128 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16129 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16130 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16131 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16132 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16133 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16134 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16135 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16136 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16137 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16138 "}
16139 EOF
16140 cat >> $CONFIG_STATUS <<\EOF
16141 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16142   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16143   case "$ac_file" in
16144   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16145        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16146   *) ac_file_in="${ac_file}.in" ;;
16147   esac
16148
16149   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16150
16151   # Remove last slash and all that follows it.  Not all systems have dirname.
16152   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16153   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16154     # The file is in a subdirectory.
16155     test ! -d "$ac_dir" && mkdir "$ac_dir"
16156     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16157     # A "../" for each directory in $ac_dir_suffix.
16158     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16159   else
16160     ac_dir_suffix= ac_dots=
16161   fi
16162
16163   case "$ac_given_srcdir" in
16164   .)  srcdir=.
16165       if test -z "$ac_dots"; then top_srcdir=.
16166       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16167   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16168   *) # Relative path.
16169     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16170     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16171   esac
16172
16173   case "$ac_given_INSTALL" in
16174   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16175   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16176   esac
16177
16178   echo creating "$ac_file"
16179   rm -f "$ac_file"
16180   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16181   case "$ac_file" in
16182   *[Mm]akefile*) ac_comsub="1i\\
16183 # $configure_input" ;;
16184   *) ac_comsub= ;;
16185   esac
16186
16187   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16188   sed -e "$ac_comsub
16189 s%@configure_input@%$configure_input%g
16190 s%@srcdir@%$srcdir%g
16191 s%@top_srcdir@%$top_srcdir%g
16192 s%@INSTALL@%$INSTALL%g
16193 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16194 fi; done
16195 rm -f conftest.s*
16196
16197 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16198 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16199 #
16200 # ac_d sets the value in "#define NAME VALUE" lines.
16201 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16202 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16203 ac_dC='\3'
16204 ac_dD='%g'
16205 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16206 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16207 ac_uB='\([      ]\)%\1#\2define\3'
16208 ac_uC=' '
16209 ac_uD='\4%g'
16210 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16211 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16212 ac_eB='$%\1#\2define\3'
16213 ac_eC=' '
16214 ac_eD='%g'
16215
16216 if test "${CONFIG_HEADERS+set}" != set; then
16217 EOF
16218 cat >> $CONFIG_STATUS <<EOF
16219   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16220 EOF
16221 cat >> $CONFIG_STATUS <<\EOF
16222 fi
16223 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16224   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16225   case "$ac_file" in
16226   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16227        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16228   *) ac_file_in="${ac_file}.in" ;;
16229   esac
16230
16231   echo creating $ac_file
16232
16233   rm -f conftest.frag conftest.in conftest.out
16234   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16235   cat $ac_file_inputs > conftest.in
16236
16237 EOF
16238
16239 # Transform confdefs.h into a sed script conftest.vals that substitutes
16240 # the proper values into config.h.in to produce config.h.  And first:
16241 # Protect against being on the right side of a sed subst in config.status.
16242 # Protect against being in an unquoted here document in config.status.
16243 rm -f conftest.vals
16244 cat > conftest.hdr <<\EOF
16245 s/[\\&%]/\\&/g
16246 s%[\\$`]%\\&%g
16247 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16248 s%ac_d%ac_u%gp
16249 s%ac_u%ac_e%gp
16250 EOF
16251 sed -n -f conftest.hdr confdefs.h > conftest.vals
16252 rm -f conftest.hdr
16253
16254 # This sed command replaces #undef with comments.  This is necessary, for
16255 # example, in the case of _POSIX_SOURCE, which is predefined and required
16256 # on some systems where configure will not decide to define it.
16257 cat >> conftest.vals <<\EOF
16258 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16259 EOF
16260
16261 # Break up conftest.vals because some shells have a limit on
16262 # the size of here documents, and old seds have small limits too.
16263
16264 rm -f conftest.tail
16265 while :
16266 do
16267   ac_lines=`grep -c . conftest.vals`
16268   # grep -c gives empty output for an empty file on some AIX systems.
16269   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16270   # Write a limited-size here document to conftest.frag.
16271   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16272   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16273   echo 'CEOF
16274   sed -f conftest.frag conftest.in > conftest.out
16275   rm -f conftest.in
16276   mv conftest.out conftest.in
16277 ' >> $CONFIG_STATUS
16278   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16279   rm -f conftest.vals
16280   mv conftest.tail conftest.vals
16281 done
16282 rm -f conftest.vals
16283
16284 cat >> $CONFIG_STATUS <<\EOF
16285   rm -f conftest.frag conftest.h
16286   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16287   cat conftest.in >> conftest.h
16288   rm -f conftest.in
16289   if cmp -s $ac_file conftest.h 2>/dev/null; then
16290     echo "$ac_file is unchanged"
16291     rm -f conftest.h
16292   else
16293     # Remove last slash and all that follows it.  Not all systems have dirname.
16294       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16295       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16296       # The file is in a subdirectory.
16297       test ! -d "$ac_dir" && mkdir "$ac_dir"
16298     fi
16299     rm -f $ac_file
16300     mv conftest.h $ac_file
16301   fi
16302 fi; done
16303
16304 EOF
16305 cat >> $CONFIG_STATUS <<EOF
16306
16307 EOF
16308 cat >> $CONFIG_STATUS <<\EOF
16309
16310 date > stamp-h
16311 echo Please \"make depend\" to build dependencies
16312
16313 exit 0
16314 EOF
16315 chmod +x $CONFIG_STATUS
16316 rm -fr confdefs* $ac_clean_files
16317 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16318