]> git.sur5r.net Git - openldap/blob - configure
Import empty rootdn fix
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP 
4
5 # Copyright 1998-2001 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-2001 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-phonetic     enable phonetic/soundex [no]"
77 ac_help="$ac_help
78     --enable-rlookups     enable reverse lookups [no]"
79 ac_help="$ac_help
80     --enable-aci          enable per-object ACIs [no]"
81 ac_help="$ac_help
82     --enable-wrappers     enable tcp wrapper support [no]"
83 ac_help="$ac_help
84     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
85 ac_help="$ac_help
86     --enable-dnssrv       enable dnssrv backend [no]"
87 ac_help="$ac_help
88     --with-dnssrv-module  module type [static]"
89 ac_help="$ac_help
90     --enable-ldap         enable ldap backend [no]"
91 ac_help="$ac_help
92     --with-ldap-module    module type [static]"
93 ac_help="$ac_help
94     --enable-ldbm         enable ldbm backend [yes]"
95 ac_help="$ac_help
96     --with-ldbm-api       with LDBM API [auto]"
97 ac_help="$ac_help
98     --with-ldbm-module    module type [static]"
99 ac_help="$ac_help
100     --with-ldbm-type      use LDBM type [auto]"
101 ac_help="$ac_help
102     --enable-passwd       enable passwd backend [no]"
103 ac_help="$ac_help
104     --with-passwd-module  module type [static]"
105 ac_help="$ac_help
106     --enable-shell        enable shell backend [no]"
107 ac_help="$ac_help
108     --with-shell-module   module type [static]"
109 ac_help="$ac_help
110     --enable-sql          enable sql backend [no]"
111 ac_help="$ac_help
112     --with-sql-module     module type [static]"
113 ac_help="$ac_help
114 SLURPD (Replication Daemon) Options:"
115 ac_help="$ac_help
116   --enable-slurpd         enable building slurpd [auto]"
117 ac_help="$ac_help
118 Library Generation & Linking Options"
119 ac_help="$ac_help
120   --enable-static[=PKGS]  build static libraries [default=yes]"
121 ac_help="$ac_help
122   --enable-shared[=PKGS]  build shared libraries [default=yes]"
123 ac_help="$ac_help
124   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
125 ac_help="$ac_help
126   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
127 ac_help="$ac_help
128   --disable-libtool-lock  avoid locking (might break parallel builds)"
129
130 # Initialize some variables set by options.
131 # The variables have the same names as the options, with
132 # dashes changed to underlines.
133 build=NONE
134 cache_file=./config.cache
135 exec_prefix=NONE
136 host=NONE
137 no_create=
138 nonopt=NONE
139 no_recursion=
140 prefix=NONE
141 program_prefix=NONE
142 program_suffix=NONE
143 program_transform_name=s,x,x,
144 silent=
145 site=
146 srcdir=
147 target=NONE
148 verbose=
149 x_includes=NONE
150 x_libraries=NONE
151 bindir='${exec_prefix}/bin'
152 sbindir='${exec_prefix}/sbin'
153 libexecdir='${exec_prefix}/libexec'
154 datadir='${prefix}/share'
155 sysconfdir='${prefix}/etc'
156 sharedstatedir='${prefix}/com'
157 localstatedir='${prefix}/var'
158 libdir='${exec_prefix}/lib'
159 includedir='${prefix}/include'
160 oldincludedir='/usr/include'
161 infodir='${prefix}/info'
162 mandir='${prefix}/man'
163
164 # Initialize some other variables.
165 subdirs=
166 MFLAGS= MAKEFLAGS=
167 SHELL=${CONFIG_SHELL-/bin/sh}
168 # Maximum number of lines to put in a shell here document.
169 ac_max_here_lines=12
170
171 ac_prev=
172 for ac_option
173 do
174
175   # If the previous option needs an argument, assign it.
176   if test -n "$ac_prev"; then
177     eval "$ac_prev=\$ac_option"
178     ac_prev=
179     continue
180   fi
181
182   case "$ac_option" in
183   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
184   *) ac_optarg= ;;
185   esac
186
187   # Accept the important Cygnus configure options, so we can diagnose typos.
188
189   case "$ac_option" in
190
191   -bindir | --bindir | --bindi | --bind | --bin | --bi)
192     ac_prev=bindir ;;
193   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
194     bindir="$ac_optarg" ;;
195
196   -build | --build | --buil | --bui | --bu)
197     ac_prev=build ;;
198   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
199     build="$ac_optarg" ;;
200
201   -cache-file | --cache-file | --cache-fil | --cache-fi \
202   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
203     ac_prev=cache_file ;;
204   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
205   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
206     cache_file="$ac_optarg" ;;
207
208   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
209     ac_prev=datadir ;;
210   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
211   | --da=*)
212     datadir="$ac_optarg" ;;
213
214   -disable-* | --disable-*)
215     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
216     # Reject names that are not valid shell variable names.
217     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
218       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
219     fi
220     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
221     eval "enable_${ac_feature}=no" ;;
222
223   -enable-* | --enable-*)
224     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
225     # Reject names that are not valid shell variable names.
226     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
227       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
228     fi
229     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
230     case "$ac_option" in
231       *=*) ;;
232       *) ac_optarg=yes ;;
233     esac
234     eval "enable_${ac_feature}='$ac_optarg'" ;;
235
236   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
237   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
238   | --exec | --exe | --ex)
239     ac_prev=exec_prefix ;;
240   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
241   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
242   | --exec=* | --exe=* | --ex=*)
243     exec_prefix="$ac_optarg" ;;
244
245   -gas | --gas | --ga | --g)
246     # Obsolete; use --with-gas.
247     with_gas=yes ;;
248
249   -help | --help | --hel | --he)
250     # Omit some internal or obsolete options to make the list less imposing.
251     # This message is too long to be a string in the A/UX 3.1 sh.
252     cat << EOF
253 Usage: configure [options] [host]
254 Options: [defaults in brackets after descriptions]
255 Configuration:
256   --cache-file=FILE       cache test results in FILE
257   --help                  print this message
258   --no-create             do not create output files
259   --quiet, --silent       do not print \`checking...' messages
260   --version               print the version of autoconf that created configure
261 Directory and file names:
262   --prefix=PREFIX         install architecture-independent files in PREFIX
263                           [$ac_default_prefix]
264   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
265                           [same as prefix]
266   --bindir=DIR            user executables in DIR [EPREFIX/bin]
267   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
268   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
269   --datadir=DIR           read-only architecture-independent data in DIR
270                           [PREFIX/share]
271   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
272   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
273                           [PREFIX/com]
274   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
275   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
276   --includedir=DIR        C header files in DIR [PREFIX/include]
277   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
278   --infodir=DIR           info documentation in DIR [PREFIX/info]
279   --mandir=DIR            man documentation in DIR [PREFIX/man]
280   --srcdir=DIR            find the sources in DIR [configure dir or ..]
281   --program-prefix=PREFIX prepend PREFIX to installed program names
282   --program-suffix=SUFFIX append SUFFIX to installed program names
283   --program-transform-name=PROGRAM
284                           run sed PROGRAM on installed program names
285 EOF
286     cat << EOF
287 Host type:
288   --build=BUILD           configure for building on BUILD [BUILD=HOST]
289   --host=HOST             configure for HOST [guessed]
290   --target=TARGET         configure for TARGET [TARGET=HOST]
291 Features and packages:
292   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
293   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
294   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
295   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
296   --x-includes=DIR        X include files are in DIR
297   --x-libraries=DIR       X library files are in DIR
298 EOF
299     if test -n "$ac_help"; then
300       echo "--enable and --with options recognized:$ac_help"
301     fi
302     exit 0 ;;
303
304   -host | --host | --hos | --ho)
305     ac_prev=host ;;
306   -host=* | --host=* | --hos=* | --ho=*)
307     host="$ac_optarg" ;;
308
309   -includedir | --includedir | --includedi | --included | --include \
310   | --includ | --inclu | --incl | --inc)
311     ac_prev=includedir ;;
312   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
313   | --includ=* | --inclu=* | --incl=* | --inc=*)
314     includedir="$ac_optarg" ;;
315
316   -infodir | --infodir | --infodi | --infod | --info | --inf)
317     ac_prev=infodir ;;
318   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
319     infodir="$ac_optarg" ;;
320
321   -libdir | --libdir | --libdi | --libd)
322     ac_prev=libdir ;;
323   -libdir=* | --libdir=* | --libdi=* | --libd=*)
324     libdir="$ac_optarg" ;;
325
326   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
327   | --libexe | --libex | --libe)
328     ac_prev=libexecdir ;;
329   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
330   | --libexe=* | --libex=* | --libe=*)
331     libexecdir="$ac_optarg" ;;
332
333   -localstatedir | --localstatedir | --localstatedi | --localstated \
334   | --localstate | --localstat | --localsta | --localst \
335   | --locals | --local | --loca | --loc | --lo)
336     ac_prev=localstatedir ;;
337   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
338   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
339   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
340     localstatedir="$ac_optarg" ;;
341
342   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
343     ac_prev=mandir ;;
344   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
345     mandir="$ac_optarg" ;;
346
347   -nfp | --nfp | --nf)
348     # Obsolete; use --without-fp.
349     with_fp=no ;;
350
351   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
352   | --no-cr | --no-c)
353     no_create=yes ;;
354
355   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
356   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
357     no_recursion=yes ;;
358
359   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
360   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
361   | --oldin | --oldi | --old | --ol | --o)
362     ac_prev=oldincludedir ;;
363   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
364   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
365   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
366     oldincludedir="$ac_optarg" ;;
367
368   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
369     ac_prev=prefix ;;
370   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
371     prefix="$ac_optarg" ;;
372
373   -program-prefix | --program-prefix | --program-prefi | --program-pref \
374   | --program-pre | --program-pr | --program-p)
375     ac_prev=program_prefix ;;
376   -program-prefix=* | --program-prefix=* | --program-prefi=* \
377   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
378     program_prefix="$ac_optarg" ;;
379
380   -program-suffix | --program-suffix | --program-suffi | --program-suff \
381   | --program-suf | --program-su | --program-s)
382     ac_prev=program_suffix ;;
383   -program-suffix=* | --program-suffix=* | --program-suffi=* \
384   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
385     program_suffix="$ac_optarg" ;;
386
387   -program-transform-name | --program-transform-name \
388   | --program-transform-nam | --program-transform-na \
389   | --program-transform-n | --program-transform- \
390   | --program-transform | --program-transfor \
391   | --program-transfo | --program-transf \
392   | --program-trans | --program-tran \
393   | --progr-tra | --program-tr | --program-t)
394     ac_prev=program_transform_name ;;
395   -program-transform-name=* | --program-transform-name=* \
396   | --program-transform-nam=* | --program-transform-na=* \
397   | --program-transform-n=* | --program-transform-=* \
398   | --program-transform=* | --program-transfor=* \
399   | --program-transfo=* | --program-transf=* \
400   | --program-trans=* | --program-tran=* \
401   | --progr-tra=* | --program-tr=* | --program-t=*)
402     program_transform_name="$ac_optarg" ;;
403
404   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
405   | -silent | --silent | --silen | --sile | --sil)
406     silent=yes ;;
407
408   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
409     ac_prev=sbindir ;;
410   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
411   | --sbi=* | --sb=*)
412     sbindir="$ac_optarg" ;;
413
414   -sharedstatedir | --sharedstatedir | --sharedstatedi \
415   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
416   | --sharedst | --shareds | --shared | --share | --shar \
417   | --sha | --sh)
418     ac_prev=sharedstatedir ;;
419   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
420   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
421   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
422   | --sha=* | --sh=*)
423     sharedstatedir="$ac_optarg" ;;
424
425   -site | --site | --sit)
426     ac_prev=site ;;
427   -site=* | --site=* | --sit=*)
428     site="$ac_optarg" ;;
429
430   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
431     ac_prev=srcdir ;;
432   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
433     srcdir="$ac_optarg" ;;
434
435   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
436   | --syscon | --sysco | --sysc | --sys | --sy)
437     ac_prev=sysconfdir ;;
438   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
439   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
440     sysconfdir="$ac_optarg" ;;
441
442   -target | --target | --targe | --targ | --tar | --ta | --t)
443     ac_prev=target ;;
444   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
445     target="$ac_optarg" ;;
446
447   -v | -verbose | --verbose | --verbos | --verbo | --verb)
448     verbose=yes ;;
449
450   -version | --version | --versio | --versi | --vers)
451     echo "configure generated by autoconf version 2.13.1"
452     exit 0 ;;
453
454   -with-* | --with-*)
455     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
456     # Reject names that are not valid shell variable names.
457     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
458       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
459     fi
460     ac_package=`echo $ac_package| sed 's/-/_/g'`
461     case "$ac_option" in
462       *=*) ;;
463       *) ac_optarg=yes ;;
464     esac
465     eval "with_${ac_package}='$ac_optarg'" ;;
466
467   -without-* | --without-*)
468     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
469     # Reject names that are not valid shell variable names.
470     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
471       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
472     fi
473     ac_package=`echo $ac_package| sed 's/-/_/g'`
474     eval "with_${ac_package}=no" ;;
475
476   --x)
477     # Obsolete; use --with-x.
478     with_x=yes ;;
479
480   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
481   | --x-incl | --x-inc | --x-in | --x-i)
482     ac_prev=x_includes ;;
483   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
484   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
485     x_includes="$ac_optarg" ;;
486
487   -x-libraries | --x-libraries | --x-librarie | --x-librari \
488   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
489     ac_prev=x_libraries ;;
490   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
491   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
492     x_libraries="$ac_optarg" ;;
493
494   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
495     ;;
496
497   *)
498     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
499       echo "configure: warning: $ac_option: invalid host type" 1>&2
500     fi
501     if test "x$nonopt" != xNONE; then
502       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
503     fi
504     nonopt="$ac_option"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
512 fi
513
514 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
515
516 # File descriptor usage:
517 # 0 standard input
518 # 1 file creation
519 # 2 errors and warnings
520 # 3 some systems may open it to /dev/tty
521 # 4 used on the Kubota Titan
522 # 6 checking for... messages and results
523 # 5 compiler messages saved in config.log
524 if test "$silent" = yes; then
525   exec 6>/dev/null
526 else
527   exec 6>&1
528 fi
529 exec 5>./config.log
530
531 echo "\
532 This file contains any messages produced by compilers while
533 running configure, to aid debugging if configure makes a mistake.
534 " 1>&5
535
536 # Strip out --no-create and --no-recursion so they do not pile up.
537 # Also quote any args containing shell metacharacters.
538 ac_configure_args=
539 for ac_arg
540 do
541   case "$ac_arg" in
542   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
543   | --no-cr | --no-c) ;;
544   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
545   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
546   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
547   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
548   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
549   esac
550 done
551
552 # NLS nuisances.
553 # Only set these to C if already set.  These must not be set unconditionally
554 # because not all systems understand e.g. LANG=C (notably SCO).
555 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
556 # Non-C LC_CTYPE values break the ctype check.
557 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
558 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
559 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
560 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
561
562 # confdefs.h avoids OS command line length limits that DEFS can exceed.
563 rm -rf conftest* confdefs.h
564 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
565 echo > confdefs.h
566
567 # A filename unique to this package, relative to the directory that
568 # configure is in, which we can look for to find out if srcdir is correct.
569 ac_unique_file=build/version
570
571 # Find the source files, if location was not specified.
572 if test -z "$srcdir"; then
573   ac_srcdir_defaulted=yes
574   # Try the directory containing this script, then its parent.
575   ac_prog=$0
576   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
577   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
578   srcdir=$ac_confdir
579   if test ! -r $srcdir/$ac_unique_file; then
580     srcdir=..
581   fi
582 else
583   ac_srcdir_defaulted=no
584 fi
585 if test ! -r $srcdir/$ac_unique_file; then
586   if test "$ac_srcdir_defaulted" = yes; then
587     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
588   else
589     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
590   fi
591 fi
592 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
593
594 # Prefer explicitly selected file to automatically selected ones.
595 if test -z "$CONFIG_SITE"; then
596   if test "x$prefix" != xNONE; then
597     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
598   else
599     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
600   fi
601 fi
602 for ac_site_file in $CONFIG_SITE; do
603   if test -r "$ac_site_file"; then
604     echo "loading site script $ac_site_file"
605     . "$ac_site_file"
606   fi
607 done
608
609
610 ac_ext=c
611 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
612 ac_cpp='$CPP $CPPFLAGS'
613 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
614 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
615 cross_compiling=$ac_cv_prog_cc_cross
616
617 ac_exeext=
618 ac_objext=o
619 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
620   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
621   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
622     ac_n= ac_c='
623 ' ac_t='        '
624   else
625     ac_n=-n ac_c= ac_t=
626   fi
627 else
628   ac_n= ac_c='\c' ac_t=
629 fi
630
631
632 # set unset (borrowed from autoconf 2.49c)
633 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
634   ol_unset=unset
635 else
636   ol_unset=false
637 fi
638 # unset CDPATH
639 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
640
641 ac_aux_dir=
642 for ac_dir in build $srcdir/build; do
643   if test -f $ac_dir/install-sh; then
644     ac_aux_dir=$ac_dir
645     ac_install_sh="$ac_aux_dir/install-sh -c"
646     break
647   elif test -f $ac_dir/install.sh; then
648     ac_aux_dir=$ac_dir
649     ac_install_sh="$ac_aux_dir/install.sh -c"
650     break
651   elif test -f $ac_dir/shtool; then
652     ac_aux_dir=$ac_dir
653     ac_install_sh="$ac_aux_dir/shtool install -c"
654     break
655   fi
656 done
657 if test -z "$ac_aux_dir"; then
658   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
659 fi
660 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
661 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
662 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
663
664 OL_VERSION=`cat $ac_aux_dir/version`
665 if test -z "$OL_VERSION"; then
666         { echo "configure: error: could not determine version" 1>&2; exit 1; }
667 fi
668
669 echo "Configuring OpenLDAP $OL_VERSION ..."
670
671
672 echo $ac_n "checking host system type""... $ac_c" 1>&6
673 echo "configure:674: checking host system type" >&5
674 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
675
676 # Make sure we can run config.sub.
677   if $ac_config_sub sun4 >/dev/null 2>&1; then :
678     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
679   fi
680
681   ac_cv_host_alias=$host
682   case "$ac_cv_host_alias" in
683   NONE)
684     case $nonopt in
685     NONE)
686       if ac_cv_host_alias=`$ac_config_guess`; then :
687       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
688       fi ;;
689     *) ac_cv_host_alias=$nonopt ;;
690     esac ;;
691   esac
692
693   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
694   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
695   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
696   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
697 else
698   echo $ac_n "(cached) $ac_c" 1>&6
699 fi
700
701 echo "$ac_t""$ac_cv_host" 1>&6
702
703 host=$ac_cv_host
704 host_alias=$ac_cv_host_alias
705 host_cpu=$ac_cv_host_cpu
706 host_vendor=$ac_cv_host_vendor
707 host_os=$ac_cv_host_os
708
709
710
711
712
713 echo $ac_n "checking target system type""... $ac_c" 1>&6
714 echo "configure:715: checking target system type" >&5
715 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
716
717 # Make sure we can run config.sub.
718   if $ac_config_sub sun4 >/dev/null 2>&1; then :
719     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
720   fi
721
722   ac_cv_target_alias=$target
723   case "$ac_cv_target_alias" in
724   NONE)
725     case $nonopt in
726     NONE)
727       ac_cv_target_alias=$host_alias ;;
728
729     *) ac_cv_target_alias=$nonopt ;;
730     esac ;;
731   esac
732
733   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
734   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
735   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
736   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
737 else
738   echo $ac_n "(cached) $ac_c" 1>&6
739 fi
740
741 echo "$ac_t""$ac_cv_target" 1>&6
742
743 target=$ac_cv_target
744 target_alias=$ac_cv_target_alias
745 target_cpu=$ac_cv_target_cpu
746 target_vendor=$ac_cv_target_vendor
747 target_os=$ac_cv_target_os
748
749
750
751
752
753 echo $ac_n "checking build system type""... $ac_c" 1>&6
754 echo "configure:755: checking build system type" >&5
755 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
756
757 # Make sure we can run config.sub.
758   if $ac_config_sub sun4 >/dev/null 2>&1; then :
759     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
760   fi
761
762   ac_cv_build_alias=$build
763   case "$ac_cv_build_alias" in
764   NONE)
765     case $nonopt in
766     NONE)
767       ac_cv_build_alias=$host_alias ;;
768
769     *) ac_cv_build_alias=$nonopt ;;
770     esac ;;
771   esac
772
773   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
774   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
775   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
776   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
777 else
778   echo $ac_n "(cached) $ac_c" 1>&6
779 fi
780
781 echo "$ac_t""$ac_cv_build" 1>&6
782
783 build=$ac_cv_build
784 build_alias=$ac_cv_build_alias
785 build_cpu=$ac_cv_build_cpu
786 build_vendor=$ac_cv_build_vendor
787 build_os=$ac_cv_build_os
788
789
790
791
792
793 # Do some error checking and defaulting for the host and target type.
794 # The inputs are:
795 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
796 #
797 # The rules are:
798 # 1. You are not allowed to specify --host, --target, and nonopt at the
799 #    same time.
800 # 2. Host defaults to nonopt.
801 # 3. If nonopt is not specified, then host defaults to the current host,
802 #    as determined by config.guess.
803 # 4. Target and build default to nonopt.
804 # 5. If nonopt is not specified, then target and build default to host.
805
806 # The aliases save the names the user supplied, while $host etc.
807 # will get canonicalized.
808 case $host---$target---$nonopt in
809 NONE---*---* | *---NONE---* | *---*---NONE) ;;
810 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
811 esac
812
813 test "$host_alias" != "$target_alias" &&
814   test "$program_prefix$program_suffix$program_transform_name" = \
815     NONENONEs,x,x, &&
816   program_prefix=${target_alias}-
817
818
819 # Find a good install program.  We prefer a C program (faster),
820 # so one script is as good as another.  But avoid the broken or
821 # incompatible versions:
822 # SysV /etc/install, /usr/sbin/install
823 # SunOS /usr/etc/install
824 # IRIX /sbin/install
825 # AIX /bin/install
826 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
827 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
828 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
829 # ./install, which can be erroneously created by make from ./install.sh.
830 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
831 echo "configure:832: checking for a BSD compatible install" >&5
832 if test -z "$INSTALL"; then
833 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
834   echo $ac_n "(cached) $ac_c" 1>&6
835 else
836     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
837   for ac_dir in $PATH; do
838     # Account for people who put trailing slashes in PATH elements.
839     case "$ac_dir/" in
840     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
841     *)
842       # OSF1 and SCO ODT 3.0 have their own names for install.
843       # Don't use installbsd from OSF since it installs stuff as root
844       # by default.
845       for ac_prog in ginstall scoinst install; do
846         if test -f $ac_dir/$ac_prog; then
847           if test $ac_prog = install &&
848             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
849             # AIX install.  It has an incompatible calling convention.
850             :
851           elif test $ac_prog = install &&
852             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
853             # program-specific install script used by HP pwplus--don't use.
854             :
855           else
856             ac_cv_path_install="$ac_dir/$ac_prog -c"
857             break 2
858           fi
859         fi
860       done
861       ;;
862     esac
863   done
864   IFS="$ac_save_IFS"
865
866 fi
867   if test "${ac_cv_path_install+set}" = set; then
868     INSTALL="$ac_cv_path_install"
869   else
870     # As a last resort, use the slow shell script.  We don't cache a
871     # path for INSTALL within a source directory, because that will
872     # break other packages using the cache if that directory is
873     # removed, or if the path is relative.
874     INSTALL="$ac_install_sh"
875   fi
876 fi
877 echo "$ac_t""$INSTALL" 1>&6
878
879 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
880 # It thinks the first close brace ends the variable substitution.
881 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
882
883 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
884
885 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
886
887 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
888 echo "configure:889: checking whether build environment is sane" >&5
889 # Just in case
890 sleep 1
891 echo timestamp > conftestfile
892 # Do `set' in a subshell so we don't clobber the current shell's
893 # arguments.  Must try -L first in case configure is actually a
894 # symlink; some systems play weird games with the mod time of symlinks
895 # (eg FreeBSD returns the mod time of the symlink's containing
896 # directory).
897 if (
898    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
899    if test "$*" = "X"; then
900       # -L didn't work.
901       set X `ls -t $srcdir/configure conftestfile`
902    fi
903    if test "$*" != "X $srcdir/configure conftestfile" \
904       && test "$*" != "X conftestfile $srcdir/configure"; then
905
906       # If neither matched, then we have a broken ls.  This can happen
907       # if, for instance, CONFIG_SHELL is bash and it inherits a
908       # broken ls alias from the environment.  This has actually
909       # happened.  Such a system could not be considered "sane".
910       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
911 alias in your environment" 1>&2; exit 1; }
912    fi
913
914    test "$2" = conftestfile
915    )
916 then
917    # Ok.
918    :
919 else
920    { echo "configure: error: newly created file is older than distributed files!
921 Check your system clock" 1>&2; exit 1; }
922 fi
923 rm -f conftest*
924 echo "$ac_t""yes" 1>&6
925 if test "$program_transform_name" = s,x,x,; then
926   program_transform_name=
927 else
928   # Double any \ or $.  echo might interpret backslashes.
929   cat <<\EOF_SED > conftestsed
930 s,\\,\\\\,g; s,\$,$$,g
931 EOF_SED
932   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
933   rm -f conftestsed
934 fi
935 test "$program_prefix" != NONE &&
936   program_transform_name="s,^,${program_prefix},;$program_transform_name"
937 # Use a double $ so make ignores it.
938 test "$program_suffix" != NONE &&
939   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
940
941 # sed with no file args requires a program.
942 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
943
944 for ac_prog in mawk gawk nawk awk
945 do
946 # Extract the first word of "$ac_prog", so it can be a program name with args.
947 set dummy $ac_prog; ac_word=$2
948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
949 echo "configure:950: checking for $ac_word" >&5
950 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
951   echo $ac_n "(cached) $ac_c" 1>&6
952 else
953   if test -n "$AWK"; then
954   ac_cv_prog_AWK="$AWK" # Let the user override the test.
955 else
956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
957   ac_dummy="$PATH"
958   for ac_dir in $ac_dummy; do
959     test -z "$ac_dir" && ac_dir=.
960     if test -f $ac_dir/$ac_word; then
961       ac_cv_prog_AWK="$ac_prog"
962       break
963     fi
964   done
965   IFS="$ac_save_ifs"
966 fi
967 fi
968 AWK="$ac_cv_prog_AWK"
969 if test -n "$AWK"; then
970   echo "$ac_t""$AWK" 1>&6
971 else
972   echo "$ac_t""no" 1>&6
973 fi
974
975 test -n "$AWK" && break
976 done
977
978 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
979 echo "configure:980: checking whether ${MAKE-make} sets \${MAKE}" >&5
980 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
981 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
982   echo $ac_n "(cached) $ac_c" 1>&6
983 else
984   cat > conftestmake <<\EOF
985 all:
986         @echo 'ac_maketemp="${MAKE}"'
987 EOF
988 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
989 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
990 if test -n "$ac_maketemp"; then
991   eval ac_cv_prog_make_${ac_make}_set=yes
992 else
993   eval ac_cv_prog_make_${ac_make}_set=no
994 fi
995 rm -f conftestmake
996 fi
997 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
998   echo "$ac_t""yes" 1>&6
999   SET_MAKE=
1000 else
1001   echo "$ac_t""no" 1>&6
1002   SET_MAKE="MAKE=${MAKE-make}"
1003 fi
1004
1005
1006
1007 PACKAGE=OpenLDAP
1008
1009 VERSION=$OL_VERSION
1010
1011 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1012   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1013 fi
1014
1015
1016
1017 missing_dir=`cd $ac_aux_dir && pwd`
1018 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1019 echo "configure:1020: checking for working aclocal" >&5
1020 # Run test in a subshell; some versions of sh will print an error if
1021 # an executable is not found, even if stderr is redirected.
1022 # Redirect stdin to placate older versions of autoconf.  Sigh.
1023 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1024    ACLOCAL=aclocal
1025    echo "$ac_t""found" 1>&6
1026 else
1027    ACLOCAL="$missing_dir/missing aclocal"
1028    echo "$ac_t""missing" 1>&6
1029 fi
1030
1031 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1032 echo "configure:1033: checking for working autoconf" >&5
1033 # Run test in a subshell; some versions of sh will print an error if
1034 # an executable is not found, even if stderr is redirected.
1035 # Redirect stdin to placate older versions of autoconf.  Sigh.
1036 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1037    AUTOCONF=autoconf
1038    echo "$ac_t""found" 1>&6
1039 else
1040    AUTOCONF="$missing_dir/missing autoconf"
1041    echo "$ac_t""missing" 1>&6
1042 fi
1043
1044 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1045 echo "configure:1046: checking for working automake" >&5
1046 # Run test in a subshell; some versions of sh will print an error if
1047 # an executable is not found, even if stderr is redirected.
1048 # Redirect stdin to placate older versions of autoconf.  Sigh.
1049 if (automake --version) < /dev/null > /dev/null 2>&1; then
1050    AUTOMAKE=automake
1051    echo "$ac_t""found" 1>&6
1052 else
1053    AUTOMAKE="$missing_dir/missing automake"
1054    echo "$ac_t""missing" 1>&6
1055 fi
1056
1057 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1058 echo "configure:1059: checking for working autoheader" >&5
1059 # Run test in a subshell; some versions of sh will print an error if
1060 # an executable is not found, even if stderr is redirected.
1061 # Redirect stdin to placate older versions of autoconf.  Sigh.
1062 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1063    AUTOHEADER=autoheader
1064    echo "$ac_t""found" 1>&6
1065 else
1066    AUTOHEADER="$missing_dir/missing autoheader"
1067    echo "$ac_t""missing" 1>&6
1068 fi
1069
1070 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1071 echo "configure:1072: checking for working makeinfo" >&5
1072 # Run test in a subshell; some versions of sh will print an error if
1073 # an executable is not found, even if stderr is redirected.
1074 # Redirect stdin to placate older versions of autoconf.  Sigh.
1075 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1076    MAKEINFO=makeinfo
1077    echo "$ac_t""found" 1>&6
1078 else
1079    MAKEINFO="$missing_dir/missing makeinfo"
1080    echo "$ac_t""missing" 1>&6
1081 fi
1082
1083 install_sh="$missing_dir/install-sh"
1084 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1085
1086 for ac_prog in gnutar gtar tar
1087 do
1088 # Extract the first word of "$ac_prog", so it can be a program name with args.
1089 set dummy $ac_prog; ac_word=$2
1090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1091 echo "configure:1092: checking for $ac_word" >&5
1092 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1093   echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095   if test -n "$AMTAR"; then
1096   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1097 else
1098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1099   ac_dummy="$PATH"
1100   for ac_dir in $ac_dummy; do
1101     test -z "$ac_dir" && ac_dir=.
1102     if test -f $ac_dir/$ac_word; then
1103       ac_cv_prog_AMTAR="$ac_prog"
1104       break
1105     fi
1106   done
1107   IFS="$ac_save_ifs"
1108 fi
1109 fi
1110 AMTAR="$ac_cv_prog_AMTAR"
1111 if test -n "$AMTAR"; then
1112   echo "$ac_t""$AMTAR" 1>&6
1113 else
1114   echo "$ac_t""no" 1>&6
1115 fi
1116
1117 test -n "$AMTAR" && break
1118 done
1119
1120
1121 AMTARFLAGS=
1122 if test -n "$AMTAR"; then
1123   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1124         AMTARFLAGS=o
1125   fi
1126 fi
1127
1128 cat >> confdefs.h <<EOF
1129 #define OPENLDAP_PACKAGE "$PACKAGE"
1130 EOF
1131
1132 cat >> confdefs.h <<EOF
1133 #define OPENLDAP_VERSION "$VERSION"
1134 EOF
1135
1136
1137
1138
1139 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1140 echo "configure:1141: checking configure arguments" >&5
1141
1142
1143 top_builddir=`pwd`
1144
1145 ldap_subdir="/openldap"
1146
1147 # Check whether --with-subdir or --without-subdir was given.
1148 if test "${with_subdir+set}" = set; then
1149   withval="$with_subdir"
1150   case "$withval" in
1151         no) ldap_subdir=""
1152                 ;;
1153         yes)
1154                 ;;
1155         /*|\\*)
1156                 ldap_subdir="$withval"
1157                 ;;
1158         *)
1159                 ldap_subdir="/$withval"
1160                 ;;
1161 esac
1162
1163 fi
1164
1165
1166 # OpenLDAP --enable-debug
1167         # Check whether --enable-debug or --disable-debug was given.
1168 if test "${enable_debug+set}" = set; then
1169   enableval="$enable_debug"
1170   
1171         ol_arg=invalid
1172         for ol_val in auto yes no ; do
1173                 if test "$enableval" = "$ol_val" ; then
1174                         ol_arg="$ol_val"
1175                 fi
1176         done
1177         if test "$ol_arg" = "invalid" ; then
1178                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1179         fi
1180         ol_enable_debug="$ol_arg"
1181
1182 else
1183         ol_enable_debug="yes"
1184 fi
1185 # end --enable-debug
1186 # OpenLDAP --enable-syslog
1187         # Check whether --enable-syslog or --disable-syslog was given.
1188 if test "${enable_syslog+set}" = set; then
1189   enableval="$enable_syslog"
1190   
1191         ol_arg=invalid
1192         for ol_val in auto yes no ; do
1193                 if test "$enableval" = "$ol_val" ; then
1194                         ol_arg="$ol_val"
1195                 fi
1196         done
1197         if test "$ol_arg" = "invalid" ; then
1198                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1199         fi
1200         ol_enable_syslog="$ol_arg"
1201
1202 else
1203         ol_enable_syslog="auto"
1204 fi
1205 # end --enable-syslog
1206 # OpenLDAP --enable-proctitle
1207         # Check whether --enable-proctitle or --disable-proctitle was given.
1208 if test "${enable_proctitle+set}" = set; then
1209   enableval="$enable_proctitle"
1210   
1211         ol_arg=invalid
1212         for ol_val in auto yes no ; do
1213                 if test "$enableval" = "$ol_val" ; then
1214                         ol_arg="$ol_val"
1215                 fi
1216         done
1217         if test "$ol_arg" = "invalid" ; then
1218                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1219         fi
1220         ol_enable_proctitle="$ol_arg"
1221
1222 else
1223         ol_enable_proctitle="yes"
1224 fi
1225 # end --enable-proctitle
1226 # OpenLDAP --enable-cache
1227         # Check whether --enable-cache or --disable-cache was given.
1228 if test "${enable_cache+set}" = set; then
1229   enableval="$enable_cache"
1230   
1231         ol_arg=invalid
1232         for ol_val in auto yes no ; do
1233                 if test "$enableval" = "$ol_val" ; then
1234                         ol_arg="$ol_val"
1235                 fi
1236         done
1237         if test "$ol_arg" = "invalid" ; then
1238                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1239         fi
1240         ol_enable_cache="$ol_arg"
1241
1242 else
1243         ol_enable_cache="yes"
1244 fi
1245 # end --enable-cache
1246 # OpenLDAP --enable-referrals
1247         # Check whether --enable-referrals or --disable-referrals was given.
1248 if test "${enable_referrals+set}" = set; then
1249   enableval="$enable_referrals"
1250   
1251         ol_arg=invalid
1252         for ol_val in auto yes no ; do
1253                 if test "$enableval" = "$ol_val" ; then
1254                         ol_arg="$ol_val"
1255                 fi
1256         done
1257         if test "$ol_arg" = "invalid" ; then
1258                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1259         fi
1260         ol_enable_referrals="$ol_arg"
1261
1262 else
1263         ol_enable_referrals="yes"
1264 fi
1265 # end --enable-referrals
1266 # OpenLDAP --enable-kbind
1267         # Check whether --enable-kbind or --disable-kbind was given.
1268 if test "${enable_kbind+set}" = set; then
1269   enableval="$enable_kbind"
1270   
1271         ol_arg=invalid
1272         for ol_val in auto yes no ; do
1273                 if test "$enableval" = "$ol_val" ; then
1274                         ol_arg="$ol_val"
1275                 fi
1276         done
1277         if test "$ol_arg" = "invalid" ; then
1278                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1279         fi
1280         ol_enable_kbind="$ol_arg"
1281
1282 else
1283         ol_enable_kbind="no"
1284 fi
1285 # end --enable-kbind
1286 # OpenLDAP --enable-ipv6
1287         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1288 if test "${enable_ipv6+set}" = set; then
1289   enableval="$enable_ipv6"
1290   
1291         ol_arg=invalid
1292         for ol_val in auto yes no ; do
1293                 if test "$enableval" = "$ol_val" ; then
1294                         ol_arg="$ol_val"
1295                 fi
1296         done
1297         if test "$ol_arg" = "invalid" ; then
1298                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1299         fi
1300         ol_enable_ipv6="$ol_arg"
1301
1302 else
1303         ol_enable_ipv6="auto"
1304 fi
1305 # end --enable-ipv6
1306 # OpenLDAP --enable-local
1307         # Check whether --enable-local or --disable-local was given.
1308 if test "${enable_local+set}" = set; then
1309   enableval="$enable_local"
1310   
1311         ol_arg=invalid
1312         for ol_val in auto yes no ; do
1313                 if test "$enableval" = "$ol_val" ; then
1314                         ol_arg="$ol_val"
1315                 fi
1316         done
1317         if test "$ol_arg" = "invalid" ; then
1318                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1319         fi
1320         ol_enable_local="$ol_arg"
1321
1322 else
1323         ol_enable_local="auto"
1324 fi
1325 # end --enable-local
1326 # OpenLDAP --enable-x_compile
1327         # Check whether --enable-x_compile or --disable-x_compile was given.
1328 if test "${enable_x_compile+set}" = set; then
1329   enableval="$enable_x_compile"
1330   
1331         ol_arg=invalid
1332         for ol_val in yes no ; do
1333                 if test "$enableval" = "$ol_val" ; then
1334                         ol_arg="$ol_val"
1335                 fi
1336         done
1337         if test "$ol_arg" = "invalid" ; then
1338                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1339         fi
1340         ol_enable_x_compile="$ol_arg"
1341
1342 else
1343         ol_enable_x_compile="no"
1344 fi
1345 # end --enable-x_compile
1346
1347
1348 # OpenLDAP --with-cyrus_sasl
1349         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1350 if test "${with_cyrus_sasl+set}" = set; then
1351   withval="$with_cyrus_sasl"
1352   
1353         ol_arg=invalid
1354         for ol_val in auto yes no  ; do
1355                 if test "$withval" = "$ol_val" ; then
1356                         ol_arg="$ol_val"
1357                 fi
1358         done
1359         if test "$ol_arg" = "invalid" ; then
1360                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1361         fi
1362         ol_with_cyrus_sasl="$ol_arg"
1363
1364 else
1365         ol_with_cyrus_sasl="auto"
1366 fi
1367 # end --with-cyrus_sasl
1368
1369 # OpenLDAP --with-fetch
1370         # Check whether --with-fetch or --without-fetch was given.
1371 if test "${with_fetch+set}" = set; then
1372   withval="$with_fetch"
1373   
1374         ol_arg=invalid
1375         for ol_val in auto yes no  ; do
1376                 if test "$withval" = "$ol_val" ; then
1377                         ol_arg="$ol_val"
1378                 fi
1379         done
1380         if test "$ol_arg" = "invalid" ; then
1381                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1382         fi
1383         ol_with_fetch="$ol_arg"
1384
1385 else
1386         ol_with_fetch="auto"
1387 fi
1388 # end --with-fetch
1389
1390 # OpenLDAP --with-kerberos
1391         # Check whether --with-kerberos or --without-kerberos was given.
1392 if test "${with_kerberos+set}" = set; then
1393   withval="$with_kerberos"
1394   
1395         ol_arg=invalid
1396         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1397                 if test "$withval" = "$ol_val" ; then
1398                         ol_arg="$ol_val"
1399                 fi
1400         done
1401         if test "$ol_arg" = "invalid" ; then
1402                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1403         fi
1404         ol_with_kerberos="$ol_arg"
1405
1406 else
1407         ol_with_kerberos="auto"
1408 fi
1409 # end --with-kerberos
1410
1411 # OpenLDAP --with-readline
1412         # Check whether --with-readline or --without-readline was given.
1413 if test "${with_readline+set}" = set; then
1414   withval="$with_readline"
1415   
1416         ol_arg=invalid
1417         for ol_val in auto yes no  ; do
1418                 if test "$withval" = "$ol_val" ; then
1419                         ol_arg="$ol_val"
1420                 fi
1421         done
1422         if test "$ol_arg" = "invalid" ; then
1423                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1424         fi
1425         ol_with_readline="$ol_arg"
1426
1427 else
1428         ol_with_readline="auto"
1429 fi
1430 # end --with-readline
1431
1432 # OpenLDAP --with-threads
1433         # Check whether --with-threads or --without-threads was given.
1434 if test "${with_threads+set}" = set; then
1435   withval="$with_threads"
1436   
1437         ol_arg=invalid
1438         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1439                 if test "$withval" = "$ol_val" ; then
1440                         ol_arg="$ol_val"
1441                 fi
1442         done
1443         if test "$ol_arg" = "invalid" ; then
1444                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1445         fi
1446         ol_with_threads="$ol_arg"
1447
1448 else
1449         ol_with_threads="auto"
1450 fi
1451 # end --with-threads
1452
1453 # OpenLDAP --with-tls
1454         # Check whether --with-tls or --without-tls was given.
1455 if test "${with_tls+set}" = set; then
1456   withval="$with_tls"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto ssleay openssl yes no  ; do
1460                 if test "$withval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1466         fi
1467         ol_with_tls="$ol_arg"
1468
1469 else
1470         ol_with_tls="auto"
1471 fi
1472 # end --with-tls
1473
1474 # OpenLDAP --with-yielding_select
1475         # Check whether --with-yielding_select or --without-yielding_select was given.
1476 if test "${with_yielding_select+set}" = set; then
1477   withval="$with_yielding_select"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no manual  ; do
1481                 if test "$withval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1487         fi
1488         ol_with_yielding_select="$ol_arg"
1489
1490 else
1491         ol_with_yielding_select="auto"
1492 fi
1493 # end --with-yielding_select
1494
1495
1496
1497 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1498 if test "${with_xxslapdoptions+set}" = set; then
1499   withval="$with_xxslapdoptions"
1500   :
1501 fi
1502
1503 # OpenLDAP --enable-slapd
1504         # Check whether --enable-slapd or --disable-slapd was given.
1505 if test "${enable_slapd+set}" = set; then
1506   enableval="$enable_slapd"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1516         fi
1517         ol_enable_slapd="$ol_arg"
1518
1519 else
1520         ol_enable_slapd="yes"
1521 fi
1522 # end --enable-slapd
1523 # OpenLDAP --enable-cleartext
1524         # Check whether --enable-cleartext or --disable-cleartext was given.
1525 if test "${enable_cleartext+set}" = set; then
1526   enableval="$enable_cleartext"
1527   
1528         ol_arg=invalid
1529         for ol_val in auto yes no ; do
1530                 if test "$enableval" = "$ol_val" ; then
1531                         ol_arg="$ol_val"
1532                 fi
1533         done
1534         if test "$ol_arg" = "invalid" ; then
1535                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1536         fi
1537         ol_enable_cleartext="$ol_arg"
1538
1539 else
1540         ol_enable_cleartext="yes"
1541 fi
1542 # end --enable-cleartext
1543 # OpenLDAP --enable-crypt
1544         # Check whether --enable-crypt or --disable-crypt was given.
1545 if test "${enable_crypt+set}" = set; then
1546   enableval="$enable_crypt"
1547   
1548         ol_arg=invalid
1549         for ol_val in auto yes no ; do
1550                 if test "$enableval" = "$ol_val" ; then
1551                         ol_arg="$ol_val"
1552                 fi
1553         done
1554         if test "$ol_arg" = "invalid" ; then
1555                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1556         fi
1557         ol_enable_crypt="$ol_arg"
1558
1559 else
1560         ol_enable_crypt="auto"
1561 fi
1562 # end --enable-crypt
1563 # OpenLDAP --enable-kpasswd
1564         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1565 if test "${enable_kpasswd+set}" = set; then
1566   enableval="$enable_kpasswd"
1567   
1568         ol_arg=invalid
1569         for ol_val in auto yes no ; do
1570                 if test "$enableval" = "$ol_val" ; then
1571                         ol_arg="$ol_val"
1572                 fi
1573         done
1574         if test "$ol_arg" = "invalid" ; then
1575                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1576         fi
1577         ol_enable_kpasswd="$ol_arg"
1578
1579 else
1580         ol_enable_kpasswd="no"
1581 fi
1582 # end --enable-kpasswd
1583 # OpenLDAP --enable-spasswd
1584         # Check whether --enable-spasswd or --disable-spasswd was given.
1585 if test "${enable_spasswd+set}" = set; then
1586   enableval="$enable_spasswd"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto yes no ; do
1590                 if test "$enableval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1596         fi
1597         ol_enable_spasswd="$ol_arg"
1598
1599 else
1600         ol_enable_spasswd="no"
1601 fi
1602 # end --enable-spasswd
1603 # OpenLDAP --enable-modules
1604         # Check whether --enable-modules or --disable-modules was given.
1605 if test "${enable_modules+set}" = set; then
1606   enableval="$enable_modules"
1607   
1608         ol_arg=invalid
1609         for ol_val in auto yes no ; do
1610                 if test "$enableval" = "$ol_val" ; then
1611                         ol_arg="$ol_val"
1612                 fi
1613         done
1614         if test "$ol_arg" = "invalid" ; then
1615                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1616         fi
1617         ol_enable_modules="$ol_arg"
1618
1619 else
1620         ol_enable_modules="no"
1621 fi
1622 # end --enable-modules
1623 # OpenLDAP --enable-phonetic
1624         # Check whether --enable-phonetic or --disable-phonetic was given.
1625 if test "${enable_phonetic+set}" = set; then
1626   enableval="$enable_phonetic"
1627   
1628         ol_arg=invalid
1629         for ol_val in auto yes no ; do
1630                 if test "$enableval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1636         fi
1637         ol_enable_phonetic="$ol_arg"
1638
1639 else
1640         ol_enable_phonetic="no"
1641 fi
1642 # end --enable-phonetic
1643 # OpenLDAP --enable-rlookups
1644         # Check whether --enable-rlookups or --disable-rlookups was given.
1645 if test "${enable_rlookups+set}" = set; then
1646   enableval="$enable_rlookups"
1647   
1648         ol_arg=invalid
1649         for ol_val in auto yes no ; do
1650                 if test "$enableval" = "$ol_val" ; then
1651                         ol_arg="$ol_val"
1652                 fi
1653         done
1654         if test "$ol_arg" = "invalid" ; then
1655                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1656         fi
1657         ol_enable_rlookups="$ol_arg"
1658
1659 else
1660         ol_enable_rlookups="no"
1661 fi
1662 # end --enable-rlookups
1663 # OpenLDAP --enable-aci
1664         # Check whether --enable-aci or --disable-aci was given.
1665 if test "${enable_aci+set}" = set; then
1666   enableval="$enable_aci"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1676         fi
1677         ol_enable_aci="$ol_arg"
1678
1679 else
1680         ol_enable_aci="no"
1681 fi
1682 # end --enable-aci
1683 # OpenLDAP --enable-wrappers
1684         # Check whether --enable-wrappers or --disable-wrappers was given.
1685 if test "${enable_wrappers+set}" = set; then
1686   enableval="$enable_wrappers"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1696         fi
1697         ol_enable_wrappers="$ol_arg"
1698
1699 else
1700         ol_enable_wrappers="no"
1701 fi
1702 # end --enable-wrappers
1703 # OpenLDAP --enable-dynamic
1704         # Check whether --enable-dynamic or --disable-dynamic was given.
1705 if test "${enable_dynamic+set}" = set; then
1706   enableval="$enable_dynamic"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1716         fi
1717         ol_enable_dynamic="$ol_arg"
1718
1719 else
1720         ol_enable_dynamic="no"
1721 fi
1722 # end --enable-dynamic
1723
1724 # OpenLDAP --enable-dnssrv
1725         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1726 if test "${enable_dnssrv+set}" = set; then
1727   enableval="$enable_dnssrv"
1728   
1729         ol_arg=invalid
1730         for ol_val in auto yes no ; do
1731                 if test "$enableval" = "$ol_val" ; then
1732                         ol_arg="$ol_val"
1733                 fi
1734         done
1735         if test "$ol_arg" = "invalid" ; then
1736                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1737         fi
1738         ol_enable_dnssrv="$ol_arg"
1739
1740 else
1741         ol_enable_dnssrv="no"
1742 fi
1743 # end --enable-dnssrv
1744 # OpenLDAP --with-dnssrv_module
1745         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1746 if test "${with_dnssrv_module+set}" = set; then
1747   withval="$with_dnssrv_module"
1748   
1749         ol_arg=invalid
1750         for ol_val in static dynamic ; do
1751                 if test "$withval" = "$ol_val" ; then
1752                         ol_arg="$ol_val"
1753                 fi
1754         done
1755         if test "$ol_arg" = "invalid" ; then
1756                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1757         fi
1758         ol_with_dnssrv_module="$ol_arg"
1759
1760 else
1761         ol_with_dnssrv_module="static"
1762 fi
1763 # end --with-dnssrv_module
1764
1765 # OpenLDAP --enable-ldap
1766         # Check whether --enable-ldap or --disable-ldap was given.
1767 if test "${enable_ldap+set}" = set; then
1768   enableval="$enable_ldap"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto yes no ; do
1772                 if test "$enableval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1778         fi
1779         ol_enable_ldap="$ol_arg"
1780
1781 else
1782         ol_enable_ldap="no"
1783 fi
1784 # end --enable-ldap
1785 # OpenLDAP --with-ldap_module
1786         # Check whether --with-ldap_module or --without-ldap_module was given.
1787 if test "${with_ldap_module+set}" = set; then
1788   withval="$with_ldap_module"
1789   
1790         ol_arg=invalid
1791         for ol_val in static dynamic ; do
1792                 if test "$withval" = "$ol_val" ; then
1793                         ol_arg="$ol_val"
1794                 fi
1795         done
1796         if test "$ol_arg" = "invalid" ; then
1797                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1798         fi
1799         ol_with_ldap_module="$ol_arg"
1800
1801 else
1802         ol_with_ldap_module="static"
1803 fi
1804 # end --with-ldap_module
1805
1806 # OpenLDAP --enable-ldbm
1807         # Check whether --enable-ldbm or --disable-ldbm was given.
1808 if test "${enable_ldbm+set}" = set; then
1809   enableval="$enable_ldbm"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto yes no ; do
1813                 if test "$enableval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1819         fi
1820         ol_enable_ldbm="$ol_arg"
1821
1822 else
1823         ol_enable_ldbm="yes"
1824 fi
1825 # end --enable-ldbm
1826 # OpenLDAP --with-ldbm_api
1827         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1828 if test "${with_ldbm_api+set}" = set; then
1829   withval="$with_ldbm_api"
1830   
1831         ol_arg=invalid
1832         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1833                 if test "$withval" = "$ol_val" ; then
1834                         ol_arg="$ol_val"
1835                 fi
1836         done
1837         if test "$ol_arg" = "invalid" ; then
1838                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1839         fi
1840         ol_with_ldbm_api="$ol_arg"
1841
1842 else
1843         ol_with_ldbm_api="auto"
1844 fi
1845 # end --with-ldbm_api
1846
1847 # OpenLDAP --with-ldbm_module
1848         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1849 if test "${with_ldbm_module+set}" = set; then
1850   withval="$with_ldbm_module"
1851   
1852         ol_arg=invalid
1853         for ol_val in static dynamic ; do
1854                 if test "$withval" = "$ol_val" ; then
1855                         ol_arg="$ol_val"
1856                 fi
1857         done
1858         if test "$ol_arg" = "invalid" ; then
1859                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1860         fi
1861         ol_with_ldbm_module="$ol_arg"
1862
1863 else
1864         ol_with_ldbm_module="static"
1865 fi
1866 # end --with-ldbm_module
1867
1868 # OpenLDAP --with-ldbm_type
1869         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1870 if test "${with_ldbm_type+set}" = set; then
1871   withval="$with_ldbm_type"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto btree hash ; do
1875                 if test "$withval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1881         fi
1882         ol_with_ldbm_type="$ol_arg"
1883
1884 else
1885         ol_with_ldbm_type="auto"
1886 fi
1887 # end --with-ldbm_type
1888
1889 # OpenLDAP --enable-passwd
1890         # Check whether --enable-passwd or --disable-passwd was given.
1891 if test "${enable_passwd+set}" = set; then
1892   enableval="$enable_passwd"
1893   
1894         ol_arg=invalid
1895         for ol_val in auto yes no ; do
1896                 if test "$enableval" = "$ol_val" ; then
1897                         ol_arg="$ol_val"
1898                 fi
1899         done
1900         if test "$ol_arg" = "invalid" ; then
1901                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1902         fi
1903         ol_enable_passwd="$ol_arg"
1904
1905 else
1906         ol_enable_passwd="no"
1907 fi
1908 # end --enable-passwd
1909 # OpenLDAP --with-passwd_module
1910         # Check whether --with-passwd_module or --without-passwd_module was given.
1911 if test "${with_passwd_module+set}" = set; then
1912   withval="$with_passwd_module"
1913   
1914         ol_arg=invalid
1915         for ol_val in static dynamic ; do
1916                 if test "$withval" = "$ol_val" ; then
1917                         ol_arg="$ol_val"
1918                 fi
1919         done
1920         if test "$ol_arg" = "invalid" ; then
1921                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1922         fi
1923         ol_with_passwd_module="$ol_arg"
1924
1925 else
1926         ol_with_passwd_module="static"
1927 fi
1928 # end --with-passwd_module
1929
1930 # OpenLDAP --enable-shell
1931         # Check whether --enable-shell or --disable-shell was given.
1932 if test "${enable_shell+set}" = set; then
1933   enableval="$enable_shell"
1934   
1935         ol_arg=invalid
1936         for ol_val in auto yes no ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1943         fi
1944         ol_enable_shell="$ol_arg"
1945
1946 else
1947         ol_enable_shell="no"
1948 fi
1949 # end --enable-shell
1950 # OpenLDAP --with-shell_module
1951         # Check whether --with-shell_module or --without-shell_module was given.
1952 if test "${with_shell_module+set}" = set; then
1953   withval="$with_shell_module"
1954   
1955         ol_arg=invalid
1956         for ol_val in static dynamic ; do
1957                 if test "$withval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1963         fi
1964         ol_with_shell_module="$ol_arg"
1965
1966 else
1967         ol_with_shell_module="static"
1968 fi
1969 # end --with-shell_module
1970
1971 # OpenLDAP --enable-sql
1972         # Check whether --enable-sql or --disable-sql was given.
1973 if test "${enable_sql+set}" = set; then
1974   enableval="$enable_sql"
1975   
1976         ol_arg=invalid
1977         for ol_val in auto yes no ; do
1978                 if test "$enableval" = "$ol_val" ; then
1979                         ol_arg="$ol_val"
1980                 fi
1981         done
1982         if test "$ol_arg" = "invalid" ; then
1983                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
1984         fi
1985         ol_enable_sql="$ol_arg"
1986
1987 else
1988         ol_enable_sql="no"
1989 fi
1990 # end --enable-sql
1991 # OpenLDAP --with-sql_module
1992         # Check whether --with-sql_module or --without-sql_module was given.
1993 if test "${with_sql_module+set}" = set; then
1994   withval="$with_sql_module"
1995   
1996         ol_arg=invalid
1997         for ol_val in static dynamic ; do
1998                 if test "$withval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2004         fi
2005         ol_with_sql_module="$ol_arg"
2006
2007 else
2008         ol_with_sql_module="static"
2009 fi
2010 # end --with-sql_module
2011
2012
2013 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2014 if test "${with_xxslurpdoptions+set}" = set; then
2015   withval="$with_xxslurpdoptions"
2016   :
2017 fi
2018
2019 # OpenLDAP --enable-slurpd
2020         # Check whether --enable-slurpd or --disable-slurpd was given.
2021 if test "${enable_slurpd+set}" = set; then
2022   enableval="$enable_slurpd"
2023   
2024         ol_arg=invalid
2025         for ol_val in auto yes no ; do
2026                 if test "$enableval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2032         fi
2033         ol_enable_slurpd="$ol_arg"
2034
2035 else
2036         ol_enable_slurpd="auto"
2037 fi
2038 # end --enable-slurpd
2039
2040 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2041 if test "${with_xxliboptions+set}" = set; then
2042   withval="$with_xxliboptions"
2043   :
2044 fi
2045
2046 # Check whether --enable-static or --disable-static was given.
2047 if test "${enable_static+set}" = set; then
2048   enableval="$enable_static"
2049   p=${PACKAGE-default}
2050 case "$enableval" in
2051 yes) enable_static=yes ;;
2052 no) enable_static=no ;;
2053 *)
2054   enable_static=no
2055   # Look at the argument we got.  We use all the common list separators.
2056   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2057   for pkg in $enableval; do
2058     if test "X$pkg" = "X$p"; then
2059       enable_static=yes
2060     fi
2061   done
2062   IFS="$ac_save_ifs"
2063   ;;
2064 esac
2065 else
2066   enable_static=yes
2067 fi
2068
2069 # Check whether --enable-shared or --disable-shared was given.
2070 if test "${enable_shared+set}" = set; then
2071   enableval="$enable_shared"
2072   p=${PACKAGE-default}
2073 case "$enableval" in
2074 yes) enable_shared=yes ;;
2075 no) enable_shared=no ;;
2076 *)
2077   enable_shared=no
2078   # Look at the argument we got.  We use all the common list separators.
2079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2080   for pkg in $enableval; do
2081     if test "X$pkg" = "X$p"; then
2082       enable_shared=yes
2083     fi
2084   done
2085   IFS="$ac_save_ifs"
2086   ;;
2087 esac
2088 else
2089   enable_shared=yes
2090 fi
2091
2092
2093
2094 # validate options
2095 if test $ol_enable_slapd = no ; then
2096                 if test $ol_enable_dnssrv = yes ; then
2097                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2098         fi
2099         if test $ol_enable_ldap = yes ; then
2100                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2101         fi
2102         if test $ol_enable_ldbm = yes ; then
2103                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2104         fi
2105         if test $ol_enable_passwd = yes ; then
2106                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2107         fi
2108         if test $ol_enable_shell = yes ; then
2109                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2110         fi
2111         if test $ol_enable_sql = yes ; then
2112                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2113         fi
2114         if test $ol_enable_modules = yes ; then
2115                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2116         fi
2117         if test $ol_enable_wrappers = yes ; then
2118                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2119         fi
2120         if test $ol_enable_phonetic = yes ; then
2121                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2122         fi
2123         if test $ol_enable_rlookups = yes ; then
2124                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2125         fi
2126         if test $ol_enable_aci = yes ; then
2127                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2128         fi
2129         if test $ol_with_ldbm_api != auto ; then
2130                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2131         fi
2132         if test $ol_with_ldbm_type != auto ; then
2133                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2134         fi
2135         if test $ol_with_dnssrv_module != static ; then
2136                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2137         fi
2138         if test $ol_with_ldap_module != static ; then
2139                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2140         fi
2141         if test $ol_with_ldbm_module != static ; then
2142                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2143         fi
2144         if test $ol_with_passwd_module != static ; then
2145                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2146         fi
2147         if test $ol_with_shell_module != static ; then
2148                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2149         fi
2150         if test $ol_with_sql_module != static ; then
2151                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2152         fi
2153         if test $ol_enable_slurpd = yes ; then
2154                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2155         fi
2156
2157         # force settings to no
2158         ol_enable_dnssrv=no
2159         ol_enable_ldap=no
2160         ol_enable_ldbm=no
2161         ol_enable_passwd=no
2162         ol_enable_shell=no
2163         ol_enable_sql=no
2164
2165         ol_enable_modules=no
2166         ol_enable_phonetic=no
2167         ol_enable_rlookups=no
2168         ol_enable_aci=no
2169         ol_enable_wrappers=no
2170         ol_enable_dynamic=no
2171
2172         ol_with_ldbm_api=no
2173         ol_with_ldbm_type=no
2174
2175         ol_with_dnssrv_module=static
2176         ol_with_ldap_module=static
2177         ol_with_ldbm_module=static
2178         ol_with_passwd_module=static
2179         ol_with_shell_module=static
2180         ol_with_sql_module=static
2181
2182         ol_enable_slurpd=no
2183
2184 elif test $ol_enable_ldbm = no ; then
2185         
2186         if test $ol_with_ldbm_api != auto ; then
2187                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2188         fi
2189
2190         if test $ol_with_ldbm_type != auto ; then
2191                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2192         fi
2193
2194         if test $ol_with_ldbm_module != static ; then
2195                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2196         fi
2197
2198         if test $ol_enable_modules != yes -a \
2199                 $ol_enable_dnssrv = no -a \
2200                 $ol_enable_ldap = no -a \
2201                 $ol_enable_passwd = no -a \
2202                 $ol_enable_shell = no -a \
2203                 $ol_enable_sql = no ; then
2204                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2205         fi
2206
2207         ol_with_ldbm_api=no
2208         ol_with_ldbm_type=no
2209         ol_with_ldbm_module=static
2210
2211 else
2212                 if test $ol_with_ldbm_api = gdbm -a \
2213                 $ol_with_ldbm_type = btree ; then
2214                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2215         fi
2216         if test $ol_with_ldbm_api = mdbm -a \
2217                 $ol_with_ldbm_type = btree ; then
2218                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2219         fi
2220         if test $ol_with_ldbm_api = ndbm -a \
2221                 $ol_with_ldbm_type = btree ; then
2222                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2223         fi
2224 fi
2225
2226 if test $ol_enable_slurpd = yes ; then
2227                 if test $ol_with_threads = no ; then
2228                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2229         fi
2230 fi
2231
2232 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2233         if test $ol_with_kerberos = no ; then
2234                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2235         fi
2236         ol_with_kerberos=yes
2237 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2238         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2239                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2240         fi
2241         ol_with_kerberos=no
2242 fi
2243
2244 if test $ol_enable_spasswd = yes ; then
2245         if test $ol_with_cyrus_sasl = no ; then
2246                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2247         fi
2248         ol_with_cyrus_sasl=yes
2249 fi
2250
2251 echo "$ac_t""done" 1>&6
2252
2253 LDAP_LIBS=
2254 LDIF_LIBS=
2255 LDBM_LIBS=
2256 LTHREAD_LIBS=
2257 LUTIL_LIBS=
2258
2259 SLAPD_LIBS=
2260 SLURPD_LIBS=
2261
2262 BUILD_SLAPD=no
2263 BUILD_SLURPD=no
2264
2265 BUILD_THREAD=no
2266
2267 BUILD_DNSSRV=no
2268 BUILD_LDAP=no
2269 BUILD_LDBM=no
2270 BUILD_PASSWD=no
2271 BUILD_SHELL=no
2272 BUILD_SQL=no
2273
2274 BUILD_DNSSRV_DYNAMIC=static
2275 BUILD_LDAP_DYNAMIC=static
2276 BUILD_LDBM_DYNAMIC=static
2277 BUILD_PASSWD_DYNAMIC=static
2278 BUILD_SHELL_DYNAMIC=static
2279 BUILD_SQL_DYNAMIC=static
2280
2281 SLAPD_MODULES_LDFLAGS=
2282 SLAPD_MODULES_CPPFLAGS=
2283 SLAPD_MODULES_LIST=
2284
2285 SLAPD_SQL_LDFLAGS=
2286 SLAPD_SQL_LIBS=
2287 SLAPD_SQL_INCLUDES=
2288
2289 KRB4_LIBS=
2290 KRB5_LIBS=
2291 READLINE_LIBS=
2292 SASL_LIBS=
2293 TERMCAP_LIBS=
2294 TLS_LIBS=
2295 MODULES_LIBS=
2296 AUTH_LIBS=
2297
2298
2299
2300 cat >> confdefs.h <<\EOF
2301 #define HAVE_MKVERSION 1
2302 EOF
2303
2304
2305
2306
2307 ol_aix_threads=no
2308 case "$target" in
2309 *-*-aix*)       if test -z "$CC" ; then
2310                 case "$ol_with_threads" in
2311                 auto | yes |  posix) ol_aix_threads=yes ;;
2312                 esac
2313         fi
2314 ;;
2315 esac
2316
2317 if test $ol_aix_threads = yes ; then
2318         if test -z "${CC}" ; then
2319                 for ac_prog in cc_r xlc_r cc
2320 do
2321 # Extract the first word of "$ac_prog", so it can be a program name with args.
2322 set dummy $ac_prog; ac_word=$2
2323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2324 echo "configure:2325: checking for $ac_word" >&5
2325 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2326   echo $ac_n "(cached) $ac_c" 1>&6
2327 else
2328   if test -n "$CC"; then
2329   ac_cv_prog_CC="$CC" # Let the user override the test.
2330 else
2331   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2332   ac_dummy="$PATH"
2333   for ac_dir in $ac_dummy; do
2334     test -z "$ac_dir" && ac_dir=.
2335     if test -f $ac_dir/$ac_word; then
2336       ac_cv_prog_CC="$ac_prog"
2337       break
2338     fi
2339   done
2340   IFS="$ac_save_ifs"
2341 fi
2342 fi
2343 CC="$ac_cv_prog_CC"
2344 if test -n "$CC"; then
2345   echo "$ac_t""$CC" 1>&6
2346 else
2347   echo "$ac_t""no" 1>&6
2348 fi
2349
2350 test -n "$CC" && break
2351 done
2352
2353
2354                 if test "$CC" = cc ; then
2355                                                 if test $ol_with_threads != auto ; then
2356                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2357                         else
2358                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2359                         fi
2360                         ol_with_threads=no
2361                 fi
2362         fi
2363
2364         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2365                 ol_with_threads=posix
2366                 ol_cv_pthread_create=yes
2367         fi
2368 fi
2369
2370 if test -z "${CC}"; then
2371         for ac_prog in cc
2372 do
2373 # Extract the first word of "$ac_prog", so it can be a program name with args.
2374 set dummy $ac_prog; ac_word=$2
2375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2376 echo "configure:2377: checking for $ac_word" >&5
2377 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2378   echo $ac_n "(cached) $ac_c" 1>&6
2379 else
2380   if test -n "$CC"; then
2381   ac_cv_prog_CC="$CC" # Let the user override the test.
2382 else
2383   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2384   ac_dummy="$PATH"
2385   for ac_dir in $ac_dummy; do
2386     test -z "$ac_dir" && ac_dir=.
2387     if test -f $ac_dir/$ac_word; then
2388       ac_cv_prog_CC="$ac_prog"
2389       break
2390     fi
2391   done
2392   IFS="$ac_save_ifs"
2393 fi
2394 fi
2395 CC="$ac_cv_prog_CC"
2396 if test -n "$CC"; then
2397   echo "$ac_t""$CC" 1>&6
2398 else
2399   echo "$ac_t""no" 1>&6
2400 fi
2401
2402 test -n "$CC" && break
2403 done
2404
2405 fi
2406
2407
2408
2409
2410 # Check whether --enable-fast-install or --disable-fast-install was given.
2411 if test "${enable_fast_install+set}" = set; then
2412   enableval="$enable_fast_install"
2413   p=${PACKAGE-default}
2414 case "$enableval" in
2415 yes) enable_fast_install=yes ;;
2416 no) enable_fast_install=no ;;
2417 *)
2418   enable_fast_install=no
2419   # Look at the argument we got.  We use all the common list separators.
2420   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2421   for pkg in $enableval; do
2422     if test "X$pkg" = "X$p"; then
2423       enable_fast_install=yes
2424     fi
2425   done
2426   IFS="$ac_save_ifs"
2427   ;;
2428 esac
2429 else
2430   enable_fast_install=yes
2431 fi
2432
2433 # Extract the first word of "ranlib", so it can be a program name with args.
2434 set dummy ranlib; ac_word=$2
2435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_word" >&5
2437 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   if test -n "$RANLIB"; then
2441   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2442 else
2443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2444   ac_dummy="$PATH"
2445   for ac_dir in $ac_dummy; do
2446     test -z "$ac_dir" && ac_dir=.
2447     if test -f $ac_dir/$ac_word; then
2448       ac_cv_prog_RANLIB="ranlib"
2449       break
2450     fi
2451   done
2452   IFS="$ac_save_ifs"
2453   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2454 fi
2455 fi
2456 RANLIB="$ac_cv_prog_RANLIB"
2457 if test -n "$RANLIB"; then
2458   echo "$ac_t""$RANLIB" 1>&6
2459 else
2460   echo "$ac_t""no" 1>&6
2461 fi
2462
2463 # Extract the first word of "gcc", so it can be a program name with args.
2464 set dummy gcc; ac_word=$2
2465 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2466 echo "configure:2467: checking for $ac_word" >&5
2467 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2468   echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470   if test -n "$CC"; then
2471   ac_cv_prog_CC="$CC" # Let the user override the test.
2472 else
2473   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2474   ac_dummy="$PATH"
2475   for ac_dir in $ac_dummy; do
2476     test -z "$ac_dir" && ac_dir=.
2477     if test -f $ac_dir/$ac_word; then
2478       ac_cv_prog_CC="gcc"
2479       break
2480     fi
2481   done
2482   IFS="$ac_save_ifs"
2483 fi
2484 fi
2485 CC="$ac_cv_prog_CC"
2486 if test -n "$CC"; then
2487   echo "$ac_t""$CC" 1>&6
2488 else
2489   echo "$ac_t""no" 1>&6
2490 fi
2491
2492 if test -z "$CC"; then
2493   # Extract the first word of "cc", so it can be a program name with args.
2494 set dummy cc; ac_word=$2
2495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2496 echo "configure:2497: checking for $ac_word" >&5
2497 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2498   echo $ac_n "(cached) $ac_c" 1>&6
2499 else
2500   if test -n "$CC"; then
2501   ac_cv_prog_CC="$CC" # Let the user override the test.
2502 else
2503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2504   ac_prog_rejected=no
2505   ac_dummy="$PATH"
2506   for ac_dir in $ac_dummy; do
2507     test -z "$ac_dir" && ac_dir=.
2508     if test -f $ac_dir/$ac_word; then
2509       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2510         ac_prog_rejected=yes
2511         continue
2512       fi
2513       ac_cv_prog_CC="cc"
2514       break
2515     fi
2516   done
2517   IFS="$ac_save_ifs"
2518 if test $ac_prog_rejected = yes; then
2519   # We found a bogon in the path, so make sure we never use it.
2520   set dummy $ac_cv_prog_CC
2521   shift
2522   if test $# -gt 0; then
2523     # We chose a different compiler from the bogus one.
2524     # However, it has the same basename, so the bogon will be chosen
2525     # first if we set CC to just the basename; use the full file name.
2526     shift
2527     set dummy "$ac_dir/$ac_word" "$@"
2528     shift
2529     ac_cv_prog_CC="$@"
2530   fi
2531 fi
2532 fi
2533 fi
2534 CC="$ac_cv_prog_CC"
2535 if test -n "$CC"; then
2536   echo "$ac_t""$CC" 1>&6
2537 else
2538   echo "$ac_t""no" 1>&6
2539 fi
2540
2541   if test -z "$CC"; then
2542     case "`uname -s`" in
2543     *win32* | *WIN32* | *CYGWIN*)
2544       # Extract the first word of "cl", so it can be a program name with args.
2545 set dummy cl; ac_word=$2
2546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2547 echo "configure:2548: checking for $ac_word" >&5
2548 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2549   echo $ac_n "(cached) $ac_c" 1>&6
2550 else
2551   if test -n "$CC"; then
2552   ac_cv_prog_CC="$CC" # Let the user override the test.
2553 else
2554   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2555   ac_dummy="$PATH"
2556   for ac_dir in $ac_dummy; do
2557     test -z "$ac_dir" && ac_dir=.
2558     if test -f $ac_dir/$ac_word; then
2559       ac_cv_prog_CC="cl"
2560       break
2561     fi
2562   done
2563   IFS="$ac_save_ifs"
2564 fi
2565 fi
2566 CC="$ac_cv_prog_CC"
2567 if test -n "$CC"; then
2568   echo "$ac_t""$CC" 1>&6
2569 else
2570   echo "$ac_t""no" 1>&6
2571 fi
2572  ;;
2573     esac
2574   fi
2575   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2576 fi
2577
2578 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2579 echo "configure:2580: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2580
2581 ac_ext=c
2582 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2583 ac_cpp='$CPP $CPPFLAGS'
2584 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2585 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2586 cross_compiling=$ac_cv_prog_cc_cross
2587
2588 cat > conftest.$ac_ext << EOF
2589
2590 #line 2591 "configure"
2591 #include "confdefs.h"
2592
2593 main(){return(0);}
2594 EOF
2595 if { (eval echo configure:2596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2596   ac_cv_prog_cc_works=yes
2597   # If we can't run a trivial program, we are probably using a cross compiler.
2598   if (./conftest; exit) 2>/dev/null; then
2599     ac_cv_prog_cc_cross=no
2600   else
2601     ac_cv_prog_cc_cross=yes
2602   fi
2603 else
2604   echo "configure: failed program was:" >&5
2605   cat conftest.$ac_ext >&5
2606   ac_cv_prog_cc_works=no
2607 fi
2608 rm -fr conftest*
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 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2617 if test $ac_cv_prog_cc_works = no; then
2618   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2619 fi
2620 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2621 echo "configure:2622: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2622 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2623 cross_compiling=$ac_cv_prog_cc_cross
2624
2625 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2626 echo "configure:2627: checking whether we are using GNU C" >&5
2627 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2628   echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630   cat > conftest.c <<EOF
2631 #ifdef __GNUC__
2632   yes;
2633 #endif
2634 EOF
2635 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2636   ac_cv_prog_gcc=yes
2637 else
2638   ac_cv_prog_gcc=no
2639 fi
2640 fi
2641
2642 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2643
2644 if test $ac_cv_prog_gcc = yes; then
2645   GCC=yes
2646 else
2647   GCC=
2648 fi
2649
2650 ac_test_CFLAGS="${CFLAGS+set}"
2651 ac_save_CFLAGS="$CFLAGS"
2652 CFLAGS=
2653 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2654 echo "configure:2655: checking whether ${CC-cc} accepts -g" >&5
2655 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2656   echo $ac_n "(cached) $ac_c" 1>&6
2657 else
2658   echo 'void f(){}' > conftest.c
2659 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2660   ac_cv_prog_cc_g=yes
2661 else
2662   ac_cv_prog_cc_g=no
2663 fi
2664 rm -f conftest*
2665
2666 fi
2667
2668 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2669 if test "$ac_test_CFLAGS" = set; then
2670   CFLAGS="$ac_save_CFLAGS"
2671 elif test $ac_cv_prog_cc_g = yes; then
2672   if test "$GCC" = yes; then
2673     CFLAGS="-g -O2"
2674   else
2675     CFLAGS="-g"
2676   fi
2677 else
2678   if test "$GCC" = yes; then
2679     CFLAGS="-O2"
2680   else
2681     CFLAGS=
2682   fi
2683 fi
2684
2685 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2686 if test "${with_gnu_ld+set}" = set; then
2687   withval="$with_gnu_ld"
2688   test "$withval" = no || with_gnu_ld=yes
2689 else
2690   with_gnu_ld=no
2691 fi
2692
2693 ac_prog=ld
2694 if test "$ac_cv_prog_gcc" = yes; then
2695   # Check if gcc -print-prog-name=ld gives a path.
2696   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2697 echo "configure:2698: checking for ld used by GCC" >&5
2698   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2699   case "$ac_prog" in
2700     # Accept absolute paths.
2701     [\\/]* | [A-Za-z]:[\\/]*)
2702       re_direlt='/[^/][^/]*/\.\./'
2703       # Canonicalize the path of ld
2704       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2705       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2706         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2707       done
2708       test -z "$LD" && LD="$ac_prog"
2709       ;;
2710   "")
2711     # If it fails, then pretend we aren't using GCC.
2712     ac_prog=ld
2713     ;;
2714   *)
2715     # If it is relative, then search for the first ld in PATH.
2716     with_gnu_ld=unknown
2717     ;;
2718   esac
2719 elif test "$with_gnu_ld" = yes; then
2720   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2721 echo "configure:2722: checking for GNU ld" >&5
2722 else
2723   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2724 echo "configure:2725: checking for non-GNU ld" >&5
2725 fi
2726 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2727   echo $ac_n "(cached) $ac_c" 1>&6
2728 else
2729   if test -z "$LD"; then
2730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2731   for ac_dir in $PATH; do
2732     test -z "$ac_dir" && ac_dir=.
2733     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2734       ac_cv_path_LD="$ac_dir/$ac_prog"
2735       # Check to see if the program is GNU ld.  I'd rather use --version,
2736       # but apparently some GNU ld's only accept -v.
2737       # Break only if it was the GNU/non-GNU ld that we prefer.
2738       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2739         test "$with_gnu_ld" != no && break
2740       else
2741         test "$with_gnu_ld" != yes && break
2742       fi
2743     fi
2744   done
2745   IFS="$ac_save_ifs"
2746 else
2747   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2748 fi
2749 fi
2750
2751 LD="$ac_cv_path_LD"
2752 if test -n "$LD"; then
2753   echo "$ac_t""$LD" 1>&6
2754 else
2755   echo "$ac_t""no" 1>&6
2756 fi
2757 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2758 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2759 echo "configure:2760: checking if the linker ($LD) is GNU ld" >&5
2760 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2761   echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2764 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2765   ac_cv_prog_gnu_ld=yes
2766 else
2767   ac_cv_prog_gnu_ld=no
2768 fi
2769 fi
2770
2771 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2772
2773
2774 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2775 echo "configure:2776: checking for BSD-compatible nm" >&5
2776 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   if test -n "$NM"; then
2780   # Let the user override the test.
2781   ac_cv_path_NM="$NM"
2782 else
2783   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2784   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2785     test -z "$ac_dir" && ac_dir=.
2786     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2787       # Check to see if the nm accepts a BSD-compat flag.
2788       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2789       #   nm: unknown option "B" ignored
2790       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2791         ac_cv_path_NM="$ac_dir/nm -B"
2792         break
2793       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2794         ac_cv_path_NM="$ac_dir/nm -p"
2795         break
2796       else
2797         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2798         continue # so that we can try to find one that supports BSD flags
2799       fi
2800     fi
2801   done
2802   IFS="$ac_save_ifs"
2803   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2804 fi
2805 fi
2806
2807 NM="$ac_cv_path_NM"
2808 echo "$ac_t""$NM" 1>&6
2809
2810 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2811 echo "configure:2812: checking whether ln -s works" >&5
2812 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2813   echo $ac_n "(cached) $ac_c" 1>&6
2814 else
2815   rm -f conftestdata
2816 if ln -s X conftestdata 2>/dev/null
2817 then
2818   rm -f conftestdata
2819   ac_cv_prog_LN_S="ln -s"
2820 else
2821   ac_cv_prog_LN_S=ln
2822 fi
2823 fi
2824 LN_S="$ac_cv_prog_LN_S"
2825 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2826   echo "$ac_t""yes" 1>&6
2827 else
2828   echo "$ac_t""no" 1>&6
2829 fi
2830
2831 if test $host != $build; then
2832   ac_tool_prefix=${host_alias}-
2833 else
2834   ac_tool_prefix=
2835 fi
2836
2837
2838 case "$target" in
2839 NONE) lt_target="$host" ;;
2840 *) lt_target="$target" ;;
2841 esac
2842
2843 # Check for any special flags to pass to ltconfig.
2844 libtool_flags="--cache-file=$cache_file"
2845 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2846 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2847 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2848 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2849 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2850 libtool_flags="$libtool_flags --enable-dlopen"
2851 libtool_flags="$libtool_flags --enable-win32-dll"
2852 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2853 if test "${enable_libtool_lock+set}" = set; then
2854   enableval="$enable_libtool_lock"
2855   :
2856 fi
2857
2858 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2859 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2860
2861 # Some flags need to be propagated to the compiler or linker for good
2862 # libtool support.
2863 case "$lt_target" in
2864 *-*-irix6*)
2865   # Find out which ABI we are using.
2866   echo '#line 2867 "configure"' > conftest.$ac_ext
2867   if { (eval echo configure:2868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2868     case "`/usr/bin/file conftest.o`" in
2869     *32-bit*)
2870       LD="${LD-ld} -32"
2871       ;;
2872     *N32*)
2873       LD="${LD-ld} -n32"
2874       ;;
2875     *64-bit*)
2876       LD="${LD-ld} -64"
2877       ;;
2878     esac
2879   fi
2880   rm -rf conftest*
2881   ;;
2882
2883 *-*-sco3.2v5*)
2884   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2885   SAVE_CFLAGS="$CFLAGS"
2886   CFLAGS="$CFLAGS -belf"
2887   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2888 echo "configure:2889: checking whether the C compiler needs -belf" >&5
2889 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   cat > conftest.$ac_ext <<EOF
2893 #line 2894 "configure"
2894 #include "confdefs.h"
2895
2896 int main() {
2897
2898 ; return 0; }
2899 EOF
2900 if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2901   rm -rf conftest*
2902   lt_cv_cc_needs_belf=yes
2903 else
2904   echo "configure: failed program was:" >&5
2905   cat conftest.$ac_ext >&5
2906   rm -rf conftest*
2907   lt_cv_cc_needs_belf=no
2908 fi
2909 rm -f conftest*
2910 fi
2911
2912 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2913   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2914     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2915     CFLAGS="$SAVE_CFLAGS"
2916   fi
2917   ;;
2918
2919 *-*-cygwin* | *-*-mingw*)
2920   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2921 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2923 echo "configure:2924: checking for $ac_word" >&5
2924 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2925   echo $ac_n "(cached) $ac_c" 1>&6
2926 else
2927   if test -n "$DLLTOOL"; then
2928   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2929 else
2930   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2931   ac_dummy="$PATH"
2932   for ac_dir in $ac_dummy; do
2933     test -z "$ac_dir" && ac_dir=.
2934     if test -f $ac_dir/$ac_word; then
2935       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2936       break
2937     fi
2938   done
2939   IFS="$ac_save_ifs"
2940 fi
2941 fi
2942 DLLTOOL="$ac_cv_prog_DLLTOOL"
2943 if test -n "$DLLTOOL"; then
2944   echo "$ac_t""$DLLTOOL" 1>&6
2945 else
2946   echo "$ac_t""no" 1>&6
2947 fi
2948
2949
2950 if test -z "$ac_cv_prog_DLLTOOL"; then
2951 if test -n "$ac_tool_prefix"; then
2952   # Extract the first word of "dlltool", so it can be a program name with args.
2953 set dummy dlltool; ac_word=$2
2954 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2955 echo "configure:2956: checking for $ac_word" >&5
2956 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2957   echo $ac_n "(cached) $ac_c" 1>&6
2958 else
2959   if test -n "$DLLTOOL"; then
2960   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2961 else
2962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2963   ac_dummy="$PATH"
2964   for ac_dir in $ac_dummy; do
2965     test -z "$ac_dir" && ac_dir=.
2966     if test -f $ac_dir/$ac_word; then
2967       ac_cv_prog_DLLTOOL="dlltool"
2968       break
2969     fi
2970   done
2971   IFS="$ac_save_ifs"
2972   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
2973 fi
2974 fi
2975 DLLTOOL="$ac_cv_prog_DLLTOOL"
2976 if test -n "$DLLTOOL"; then
2977   echo "$ac_t""$DLLTOOL" 1>&6
2978 else
2979   echo "$ac_t""no" 1>&6
2980 fi
2981
2982 else
2983   DLLTOOL="false"
2984 fi
2985 fi
2986
2987   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2988 set dummy ${ac_tool_prefix}as; ac_word=$2
2989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2990 echo "configure:2991: checking for $ac_word" >&5
2991 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
2992   echo $ac_n "(cached) $ac_c" 1>&6
2993 else
2994   if test -n "$AS"; then
2995   ac_cv_prog_AS="$AS" # Let the user override the test.
2996 else
2997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2998   ac_dummy="$PATH"
2999   for ac_dir in $ac_dummy; do
3000     test -z "$ac_dir" && ac_dir=.
3001     if test -f $ac_dir/$ac_word; then
3002       ac_cv_prog_AS="${ac_tool_prefix}as"
3003       break
3004     fi
3005   done
3006   IFS="$ac_save_ifs"
3007 fi
3008 fi
3009 AS="$ac_cv_prog_AS"
3010 if test -n "$AS"; then
3011   echo "$ac_t""$AS" 1>&6
3012 else
3013   echo "$ac_t""no" 1>&6
3014 fi
3015
3016
3017 if test -z "$ac_cv_prog_AS"; then
3018 if test -n "$ac_tool_prefix"; then
3019   # Extract the first word of "as", so it can be a program name with args.
3020 set dummy as; ac_word=$2
3021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_word" >&5
3023 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   if test -n "$AS"; then
3027   ac_cv_prog_AS="$AS" # Let the user override the test.
3028 else
3029   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3030   ac_dummy="$PATH"
3031   for ac_dir in $ac_dummy; do
3032     test -z "$ac_dir" && ac_dir=.
3033     if test -f $ac_dir/$ac_word; then
3034       ac_cv_prog_AS="as"
3035       break
3036     fi
3037   done
3038   IFS="$ac_save_ifs"
3039   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3040 fi
3041 fi
3042 AS="$ac_cv_prog_AS"
3043 if test -n "$AS"; then
3044   echo "$ac_t""$AS" 1>&6
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048
3049 else
3050   AS="false"
3051 fi
3052 fi
3053
3054   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3055 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3056 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3057 echo "configure:3058: checking for $ac_word" >&5
3058 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3059   echo $ac_n "(cached) $ac_c" 1>&6
3060 else
3061   if test -n "$OBJDUMP"; then
3062   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3063 else
3064   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3065   ac_dummy="$PATH"
3066   for ac_dir in $ac_dummy; do
3067     test -z "$ac_dir" && ac_dir=.
3068     if test -f $ac_dir/$ac_word; then
3069       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3070       break
3071     fi
3072   done
3073   IFS="$ac_save_ifs"
3074 fi
3075 fi
3076 OBJDUMP="$ac_cv_prog_OBJDUMP"
3077 if test -n "$OBJDUMP"; then
3078   echo "$ac_t""$OBJDUMP" 1>&6
3079 else
3080   echo "$ac_t""no" 1>&6
3081 fi
3082
3083
3084 if test -z "$ac_cv_prog_OBJDUMP"; then
3085 if test -n "$ac_tool_prefix"; then
3086   # Extract the first word of "objdump", so it can be a program name with args.
3087 set dummy objdump; ac_word=$2
3088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3089 echo "configure:3090: checking for $ac_word" >&5
3090 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3091   echo $ac_n "(cached) $ac_c" 1>&6
3092 else
3093   if test -n "$OBJDUMP"; then
3094   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3095 else
3096   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3097   ac_dummy="$PATH"
3098   for ac_dir in $ac_dummy; do
3099     test -z "$ac_dir" && ac_dir=.
3100     if test -f $ac_dir/$ac_word; then
3101       ac_cv_prog_OBJDUMP="objdump"
3102       break
3103     fi
3104   done
3105   IFS="$ac_save_ifs"
3106   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3107 fi
3108 fi
3109 OBJDUMP="$ac_cv_prog_OBJDUMP"
3110 if test -n "$OBJDUMP"; then
3111   echo "$ac_t""$OBJDUMP" 1>&6
3112 else
3113   echo "$ac_t""no" 1>&6
3114 fi
3115
3116 else
3117   OBJDUMP="false"
3118 fi
3119 fi
3120
3121   ;;
3122
3123 esac
3124
3125
3126 # Save cache, so that ltconfig can load it
3127
3128
3129 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3130 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3131 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3132 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3133 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3134 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3135 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3136 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3137
3138 # Reload cache, that may have been modified by ltconfig
3139
3140
3141 # This can be used to rebuild libtool when needed
3142 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3143
3144 # Always use our own libtool.
3145 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3146
3147 # Redirect the config.log output again, so that the ltconfig log is not
3148 # clobbered by the next message.
3149 exec 5>>./config.log
3150
3151
3152 for ac_prog in mawk gawk nawk awk
3153 do
3154 # Extract the first word of "$ac_prog", so it can be a program name with args.
3155 set dummy $ac_prog; ac_word=$2
3156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_word" >&5
3158 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   if test -n "$AWK"; then
3162   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3163 else
3164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3165   ac_dummy="$PATH"
3166   for ac_dir in $ac_dummy; do
3167     test -z "$ac_dir" && ac_dir=.
3168     if test -f $ac_dir/$ac_word; then
3169       ac_cv_prog_AWK="$ac_prog"
3170       break
3171     fi
3172   done
3173   IFS="$ac_save_ifs"
3174 fi
3175 fi
3176 AWK="$ac_cv_prog_AWK"
3177 if test -n "$AWK"; then
3178   echo "$ac_t""$AWK" 1>&6
3179 else
3180   echo "$ac_t""no" 1>&6
3181 fi
3182
3183 test -n "$AWK" && break
3184 done
3185
3186 # test for ln hardlink support
3187 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3188 echo "configure:3189: checking whether ln works" >&5
3189 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3190   echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192   rm -f conftest.src conftest.dst
3193 echo "conftest" > conftest.src
3194 if ln conftest.src conftest.dst 2>/dev/null
3195 then
3196   ol_cv_prog_LN_H="ln"
3197 else
3198   ol_cv_prog_LN_H="cp"
3199 fi
3200 rm -f conftest.src conftest.dst
3201
3202 fi
3203 LN_H="$ol_cv_prog_LN_H"
3204 if test "$ol_cv_prog_LN_H" = "ln"; then
3205         echo "$ac_t""yes" 1>&6
3206 else
3207         echo "$ac_t""no" 1>&6
3208 fi
3209
3210 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3211 echo "configure:3212: checking whether ln -s works" >&5
3212 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3213   echo $ac_n "(cached) $ac_c" 1>&6
3214 else
3215   rm -f conftestdata
3216 if ln -s X conftestdata 2>/dev/null
3217 then
3218   rm -f conftestdata
3219   ac_cv_prog_LN_S="ln -s"
3220 else
3221   ac_cv_prog_LN_S=ln
3222 fi
3223 fi
3224 LN_S="$ac_cv_prog_LN_S"
3225 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3226   echo "$ac_t""yes" 1>&6
3227 else
3228   echo "$ac_t""no" 1>&6
3229 fi
3230
3231
3232 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3233         LN_S="$LN_H"
3234 fi
3235
3236 # Extract the first word of "sendmail", so it can be a program name with args.
3237 set dummy sendmail; ac_word=$2
3238 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3239 echo "configure:3240: checking for $ac_word" >&5
3240 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   case "$SENDMAIL" in
3244   /*)
3245   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3246   ;;
3247   ?:/*)
3248   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3249   ;;
3250   *)
3251   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3252   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3253   for ac_dir in $ac_dummy; do 
3254     test -z "$ac_dir" && ac_dir=.
3255     if test -f $ac_dir/$ac_word; then
3256       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3257       break
3258     fi
3259   done
3260   IFS="$ac_save_ifs"
3261   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3262   ;;
3263 esac
3264 fi
3265 SENDMAIL="$ac_cv_path_SENDMAIL"
3266 if test -n "$SENDMAIL"; then
3267   echo "$ac_t""$SENDMAIL" 1>&6
3268 else
3269   echo "$ac_t""no" 1>&6
3270 fi
3271
3272 # Extract the first word of "vi", so it can be a program name with args.
3273 set dummy vi; ac_word=$2
3274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3275 echo "configure:3276: checking for $ac_word" >&5
3276 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3277   echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279   case "$EDITOR" in
3280   /*)
3281   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3282   ;;
3283   ?:/*)
3284   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3285   ;;
3286   *)
3287   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3288   ac_dummy="$PATH:/usr/ucb"
3289   for ac_dir in $ac_dummy; do 
3290     test -z "$ac_dir" && ac_dir=.
3291     if test -f $ac_dir/$ac_word; then
3292       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3293       break
3294     fi
3295   done
3296   IFS="$ac_save_ifs"
3297   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3298   ;;
3299 esac
3300 fi
3301 EDITOR="$ac_cv_path_EDITOR"
3302 if test -n "$EDITOR"; then
3303   echo "$ac_t""$EDITOR" 1>&6
3304 else
3305   echo "$ac_t""no" 1>&6
3306 fi
3307
3308 # Extract the first word of "finger", so it can be a program name with args.
3309 set dummy finger; ac_word=$2
3310 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3311 echo "configure:3312: checking for $ac_word" >&5
3312 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3313   echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315   case "$FINGER" in
3316   /*)
3317   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3318   ;;
3319   ?:/*)
3320   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3321   ;;
3322   *)
3323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3324   ac_dummy="$PATH:/usr/ucb"
3325   for ac_dir in $ac_dummy; do 
3326     test -z "$ac_dir" && ac_dir=.
3327     if test -f $ac_dir/$ac_word; then
3328       ac_cv_path_FINGER="$ac_dir/$ac_word"
3329       break
3330     fi
3331   done
3332   IFS="$ac_save_ifs"
3333   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3334   ;;
3335 esac
3336 fi
3337 FINGER="$ac_cv_path_FINGER"
3338 if test -n "$FINGER"; then
3339   echo "$ac_t""$FINGER" 1>&6
3340 else
3341   echo "$ac_t""no" 1>&6
3342 fi
3343
3344
3345 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3346 echo "configure:3347: checking how to run the C preprocessor" >&5
3347 # On Suns, sometimes $CPP names a directory.
3348 if test -n "$CPP" && test -d "$CPP"; then
3349   CPP=
3350 fi
3351 if test -z "$CPP"; then
3352 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355     # This must be in double quotes, not single quotes, because CPP may get
3356   # substituted into the Makefile and "${CC-cc}" will confuse make.
3357   CPP="${CC-cc} -E"
3358   # On the NeXT, cc -E runs the code through the compiler's parser,
3359   # not just through cpp.
3360   cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 #include <assert.h>
3364 Syntax Error
3365 EOF
3366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3367 { (eval echo configure:3368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3369 if test -z "$ac_err"; then
3370   :
3371 else
3372   echo "$ac_err" >&5
3373   echo "configure: failed program was:" >&5
3374   cat conftest.$ac_ext >&5
3375   rm -rf conftest*
3376   CPP="${CC-cc} -E -traditional-cpp"
3377   cat > conftest.$ac_ext <<EOF
3378 #line 3379 "configure"
3379 #include "confdefs.h"
3380 #include <assert.h>
3381 Syntax Error
3382 EOF
3383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3384 { (eval echo configure:3385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3386 if test -z "$ac_err"; then
3387   :
3388 else
3389   echo "$ac_err" >&5
3390   echo "configure: failed program was:" >&5
3391   cat conftest.$ac_ext >&5
3392   rm -rf conftest*
3393   CPP="${CC-cc} -nologo -E"
3394   cat > conftest.$ac_ext <<EOF
3395 #line 3396 "configure"
3396 #include "confdefs.h"
3397 #include <assert.h>
3398 Syntax Error
3399 EOF
3400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3401 { (eval echo configure:3402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3403 if test -z "$ac_err"; then
3404   :
3405 else
3406   echo "$ac_err" >&5
3407   echo "configure: failed program was:" >&5
3408   cat conftest.$ac_ext >&5
3409   rm -rf conftest*
3410   CPP=/lib/cpp
3411 fi
3412 rm -f conftest*
3413 fi
3414 rm -f conftest*
3415 fi
3416 rm -f conftest*
3417   ac_cv_prog_CPP="$CPP"
3418 fi
3419   CPP="$ac_cv_prog_CPP"
3420 else
3421   ac_cv_prog_CPP="$CPP"
3422 fi
3423 echo "$ac_t""$CPP" 1>&6
3424
3425
3426 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3427         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3428
3429 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3430         echo "configure: warning: programs compiled here do run here..." 1>&2
3431         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3432
3433 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3434         echo "configure: warning: programs compiled here do not run here..." 1>&2
3435         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3436 fi
3437
3438 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3439 echo "configure:3440: checking for AIX" >&5
3440 cat > conftest.$ac_ext <<EOF
3441 #line 3442 "configure"
3442 #include "confdefs.h"
3443 #ifdef _AIX
3444   yes
3445 #endif
3446
3447 EOF
3448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3449   egrep "yes" >/dev/null 2>&1; then
3450   rm -rf conftest*
3451   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3452 #define _ALL_SOURCE 1
3453 EOF
3454
3455 else
3456   rm -rf conftest*
3457   echo "$ac_t""no" 1>&6
3458 fi
3459 rm -f conftest*
3460
3461
3462 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3463 echo "configure:3464: checking for POSIXized ISC" >&5
3464 if test -d /etc/conf/kconfig.d &&
3465   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3466 then
3467   echo "$ac_t""yes" 1>&6
3468   ISC=yes # If later tests want to check for ISC.
3469   cat >> confdefs.h <<\EOF
3470 #define _POSIX_SOURCE 1
3471 EOF
3472
3473   if test "$GCC" = yes; then
3474     CC="$CC -posix"
3475   else
3476     CC="$CC -Xp"
3477   fi
3478 else
3479   echo "$ac_t""no" 1>&6
3480   ISC=
3481 fi
3482
3483 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3484 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3485 echo "configure:3486: checking for minix/config.h" >&5
3486 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489   cat > conftest.$ac_ext <<EOF
3490 #line 3491 "configure"
3491 #include "confdefs.h"
3492 #include <minix/config.h>
3493 EOF
3494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3495 { (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3497 if test -z "$ac_err"; then
3498   rm -rf conftest*
3499   eval "ac_cv_header_$ac_safe=yes"
3500 else
3501   echo "$ac_err" >&5
3502   echo "configure: failed program was:" >&5
3503   cat conftest.$ac_ext >&5
3504   rm -rf conftest*
3505   eval "ac_cv_header_$ac_safe=no"
3506 fi
3507 rm -f conftest*
3508 fi
3509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3510   echo "$ac_t""yes" 1>&6
3511   MINIX=yes
3512 else
3513   echo "$ac_t""no" 1>&6
3514 MINIX=
3515 fi
3516
3517 if test "$MINIX" = yes; then
3518   cat >> confdefs.h <<\EOF
3519 #define _POSIX_SOURCE 1
3520 EOF
3521
3522   cat >> confdefs.h <<\EOF
3523 #define _POSIX_1_SOURCE 2
3524 EOF
3525
3526   cat >> confdefs.h <<\EOF
3527 #define _MINIX 1
3528 EOF
3529
3530 fi
3531
3532
3533 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3534 echo "configure:3535: checking for Cygwin environment" >&5
3535 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541
3542 int main() {
3543
3544 #ifndef __CYGWIN__
3545 #define __CYGWIN__ __CYGWIN32__
3546 #endif
3547 return __CYGWIN__;
3548 ; return 0; }
3549 EOF
3550 if { (eval echo configure:3551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3551   rm -rf conftest*
3552   ac_cv_cygwin=yes
3553 else
3554   echo "configure: failed program was:" >&5
3555   cat conftest.$ac_ext >&5
3556   rm -rf conftest*
3557   ac_cv_cygwin=no
3558 fi
3559 rm -f conftest*
3560 fi
3561
3562 echo "$ac_t""$ac_cv_cygwin" 1>&6
3563 CYGWIN=
3564 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3565 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3566 echo "configure:3567: checking for mingw32 environment" >&5
3567 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3573
3574 int main() {
3575 return __MINGW32__;
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_mingw32=yes
3581 else
3582   echo "configure: failed program was:" >&5
3583   cat conftest.$ac_ext >&5
3584   rm -rf conftest*
3585   ac_cv_mingw32=no
3586 fi
3587 rm -f conftest*
3588 fi
3589
3590 echo "$ac_t""$ac_cv_mingw32" 1>&6
3591 MINGW32=
3592 test "$ac_cv_mingw32" = yes && MINGW32=yes
3593 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3594 echo "configure:3595: checking for EMX OS/2 environment" >&5
3595 if eval "test \"\${ac_cv_emxos2+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 __EMX__;
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_emxos2=yes
3609 else
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   ac_cv_emxos2=no
3614 fi
3615 rm -f conftest*
3616 fi
3617
3618 echo "$ac_t""$ac_cv_emxos2" 1>&6
3619 EMXOS2=
3620 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3621
3622
3623
3624 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3625 echo "configure:3626: checking for executable suffix" >&5
3626 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3630   ac_cv_exeext=.exe
3631 else
3632   rm -f conftest*
3633   echo 'int main () { return 0; }' > conftest.$ac_ext
3634   ac_cv_exeext=
3635   if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3636     for file in conftest.*; do
3637       case $file in
3638       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3639       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3640       esac
3641     done
3642   else
3643     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3644   fi
3645   rm -f conftest*
3646   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3647 fi
3648 fi
3649
3650 EXEEXT=""
3651 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3652 echo "$ac_t""${ac_cv_exeext}" 1>&6
3653 ac_exeext=$EXEEXT
3654
3655 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3656 echo "configure:3657: checking for object suffix" >&5
3657 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3658   echo $ac_n "(cached) $ac_c" 1>&6
3659 else
3660   rm -f conftest*
3661 echo 'int i = 1;' > conftest.$ac_ext
3662 if { (eval echo configure:3663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3663   for ac_file in conftest.*; do
3664     case $ac_file in
3665     *.c) ;;
3666     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3667     esac
3668   done
3669 else
3670   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3671 fi
3672 rm -f conftest*
3673 fi
3674
3675 echo "$ac_t""$ac_cv_objext" 1>&6
3676 OBJEXT=$ac_cv_objext
3677 ac_objext=$ac_cv_objext
3678
3679
3680 cat >> confdefs.h <<EOF
3681 #define EXEEXT "${EXEEXT}"
3682 EOF
3683
3684
3685 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3686 echo "configure:3687: checking for be_app in -lbe" >&5
3687 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3689   echo $ac_n "(cached) $ac_c" 1>&6
3690 else
3691   ac_save_LIBS="$LIBS"
3692 LIBS="-lbe -lroot -lnet $LIBS"
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 /* Override any gcc2 internal prototype to avoid an error.  */
3697 /* We use char because int might match the return type of a gcc2
3698     builtin and then its argument prototype would still apply.  */
3699 char be_app();
3700
3701 int main() {
3702 be_app()
3703 ; return 0; }
3704 EOF
3705 if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3706   rm -rf conftest*
3707   eval "ac_cv_lib_$ac_lib_var=yes"
3708 else
3709   echo "configure: failed program was:" >&5
3710   cat conftest.$ac_ext >&5
3711   rm -rf conftest*
3712   eval "ac_cv_lib_$ac_lib_var=no"
3713 fi
3714 rm -f conftest*
3715 LIBS="$ac_save_LIBS"
3716
3717 fi
3718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3719   echo "$ac_t""yes" 1>&6
3720   LIBS="$LIBS -lbe -lroot -lnet"
3721 else
3722   echo "$ac_t""no" 1>&6
3723 :
3724 fi
3725
3726
3727
3728
3729
3730 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3731 echo "configure:3732: checking for ${CC-cc} option to accept ANSI C" >&5
3732 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   am_cv_prog_cc_stdc=no
3736 ac_save_CC="$CC"
3737 # Don't try gcc -ansi; that turns off useful extensions and
3738 # breaks some systems' header files.
3739 # AIX                   -qlanglvl=ansi
3740 # Ultrix and OSF/1      -std1
3741 # HP-UX 10.20 and later -Ae
3742 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3743 # SVR4                  -Xc -D__EXTENSIONS__
3744 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3745 do
3746   CC="$ac_save_CC $ac_arg"
3747   cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750 #include <stdarg.h>
3751 #include <stdio.h>
3752 #include <sys/types.h>
3753 #include <sys/stat.h>
3754 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3755 struct buf { int x; };
3756 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3757 static char *e (p, i)
3758      char **p;
3759      int i;
3760 {
3761   return p[i];
3762 }
3763 static char *f (char * (*g) (char **, int), char **p, ...)
3764 {
3765   char *s;
3766   va_list v;
3767   va_start (v,p);
3768   s = g (p, va_arg (v,int));
3769   va_end (v);
3770   return s;
3771 }
3772 int test (int i, double x);
3773 struct s1 {int (*f) (int a);};
3774 struct s2 {int (*f) (double a);};
3775 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3776 int argc;
3777 char **argv;
3778
3779 int main() {
3780
3781 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3782
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3786   rm -rf conftest*
3787   am_cv_prog_cc_stdc="$ac_arg"; break
3788 else
3789   echo "configure: failed program was:" >&5
3790   cat conftest.$ac_ext >&5
3791 fi
3792 rm -f conftest*
3793 done
3794 CC="$ac_save_CC"
3795
3796 fi
3797
3798 if test -z "$am_cv_prog_cc_stdc"; then
3799   echo "$ac_t""none needed" 1>&6
3800 else
3801   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3802 fi
3803 case "x$am_cv_prog_cc_stdc" in
3804   x|xno) ;;
3805   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3806 esac
3807
3808 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3809         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3810 fi
3811
3812 # test for make depend flag
3813 OL_MKDEP=
3814 OL_MKDEP_FLAGS=
3815 if test -z "${MKDEP}"; then
3816         OL_MKDEP="${CC-cc}"
3817         if test -z "${MKDEP_FLAGS}"; then
3818                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3819 echo "configure:3820: checking for ${OL_MKDEP} depend flag" >&5
3820 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3821   echo $ac_n "(cached) $ac_c" 1>&6
3822 else
3823   
3824                         ol_cv_mkdep=no
3825                         for flag in "-M" "-xM"; do
3826                                 cat > conftest.c <<EOF
3827  noCode;
3828 EOF
3829                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3830                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3831                                 then
3832                                         if test ! -f conftest."${ac_object}" ; then
3833                                                 ol_cv_mkdep=$flag
3834                                                 OL_MKDEP_FLAGS="$flag"
3835                                                 break
3836                                         fi
3837                                 fi
3838                         done
3839                         rm -f conftest*
3840                 
3841 fi
3842
3843 echo "$ac_t""$ol_cv_mkdep" 1>&6
3844         else
3845                 cc_cv_mkdep=yes
3846                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3847         fi
3848 else
3849         cc_cv_mkdep=yes
3850         OL_MKDEP="${MKDEP}"
3851         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3852 fi
3853
3854
3855
3856 if test "${ol_cv_mkdep}" = no ; then
3857         # this will soon become an error
3858         echo "configure: warning: do not know how to generate dependencies" 1>&2
3859 fi
3860
3861 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3862 echo "configure:3863: checking for afopen in -ls" >&5
3863 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3865   echo $ac_n "(cached) $ac_c" 1>&6
3866 else
3867   ac_save_LIBS="$LIBS"
3868 LIBS="-ls  $LIBS"
3869 cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872 /* Override any gcc2 internal prototype to avoid an error.  */
3873 /* We use char because int might match the return type of a gcc2
3874     builtin and then its argument prototype would still apply.  */
3875 char afopen();
3876
3877 int main() {
3878 afopen()
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3882   rm -rf conftest*
3883   eval "ac_cv_lib_$ac_lib_var=yes"
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   eval "ac_cv_lib_$ac_lib_var=no"
3889 fi
3890 rm -f conftest*
3891 LIBS="$ac_save_LIBS"
3892
3893 fi
3894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3895   echo "$ac_t""yes" 1>&6
3896   
3897         AUTH_LIBS=-ls
3898         cat >> confdefs.h <<\EOF
3899 #define HAVE_AIX_SECURITY 1
3900 EOF
3901
3902
3903 else
3904   echo "$ac_t""no" 1>&6
3905 fi
3906
3907
3908
3909 ol_link_modules=no
3910 if test $ol_enable_modules != no ; then
3911         for ac_hdr in ltdl.h
3912 do
3913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3915 echo "configure:3916: checking for $ac_hdr" >&5
3916 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3917   echo $ac_n "(cached) $ac_c" 1>&6
3918 else
3919   cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922 #include <$ac_hdr>
3923 EOF
3924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3925 { (eval echo configure:3926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3927 if test -z "$ac_err"; then
3928   rm -rf conftest*
3929   eval "ac_cv_header_$ac_safe=yes"
3930 else
3931   echo "$ac_err" >&5
3932   echo "configure: failed program was:" >&5
3933   cat conftest.$ac_ext >&5
3934   rm -rf conftest*
3935   eval "ac_cv_header_$ac_safe=no"
3936 fi
3937 rm -f conftest*
3938 fi
3939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3940   echo "$ac_t""yes" 1>&6
3941     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3942   cat >> confdefs.h <<EOF
3943 #define $ac_tr_hdr 1
3944 EOF
3945  
3946 else
3947   echo "$ac_t""no" 1>&6
3948 fi
3949 done
3950
3951
3952         if test $ac_cv_header_ltdl_h = no ; then
3953                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3954         fi
3955
3956         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3957 echo "configure:3958: checking for lt_dlinit in -lltdl" >&5
3958 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   ac_save_LIBS="$LIBS"
3963 LIBS="-lltdl  $LIBS"
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967 /* Override any gcc2 internal prototype to avoid an error.  */
3968 /* We use char because int might match the return type of a gcc2
3969     builtin and then its argument prototype would still apply.  */
3970 char lt_dlinit();
3971
3972 int main() {
3973 lt_dlinit()
3974 ; return 0; }
3975 EOF
3976 if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3977   rm -rf conftest*
3978   eval "ac_cv_lib_$ac_lib_var=yes"
3979 else
3980   echo "configure: failed program was:" >&5
3981   cat conftest.$ac_ext >&5
3982   rm -rf conftest*
3983   eval "ac_cv_lib_$ac_lib_var=no"
3984 fi
3985 rm -f conftest*
3986 LIBS="$ac_save_LIBS"
3987
3988 fi
3989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3990   echo "$ac_t""yes" 1>&6
3991   
3992             MODULES_LIBS=-lltdl
3993             cat >> confdefs.h <<\EOF
3994 #define HAVE_LIBLTDL 1
3995 EOF
3996
3997         
3998 else
3999   echo "$ac_t""no" 1>&6
4000 fi
4001
4002
4003         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4004                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4005         fi
4006         ol_link_modules=yes
4007 else
4008         ol_with_dnssrv_module=static
4009         ol_with_ldap_module=static
4010         ol_with_ldbm_module=static
4011         ol_with_passwd_module=static
4012         ol_with_shell_module=static
4013         ol_with_sql_module=static
4014 fi
4015
4016 # test for EBCDIC
4017 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4018 echo "configure:4019: checking for EBCDIC" >&5
4019 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4020   echo $ac_n "(cached) $ac_c" 1>&6
4021 else
4022   
4023         cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026
4027 #if !('M' == 0xd4)
4028 #include <__ASCII__/generate_error.h>
4029 #endif
4030
4031 EOF
4032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4033 { (eval echo configure:4034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4035 if test -z "$ac_err"; then
4036   rm -rf conftest*
4037   ol_cv_cpp_ebcdic=yes
4038 else
4039   echo "$ac_err" >&5
4040   echo "configure: failed program was:" >&5
4041   cat conftest.$ac_ext >&5
4042   rm -rf conftest*
4043   ol_cv_cpp_ebcdic=no
4044 fi
4045 rm -f conftest*
4046 fi
4047
4048 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4049 if test $ol_cv_cpp_ebcdic = yes ; then
4050         cat >> confdefs.h <<\EOF
4051 #define HAVE_EBCDIC 1
4052 EOF
4053
4054 fi
4055
4056 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4057 echo "configure:4058: checking for ANSI C header files" >&5
4058 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4059   echo $ac_n "(cached) $ac_c" 1>&6
4060 else
4061   cat > conftest.$ac_ext <<EOF
4062 #line 4063 "configure"
4063 #include "confdefs.h"
4064 #include <stdlib.h>
4065 #include <stdarg.h>
4066 #include <string.h>
4067 #include <float.h>
4068 EOF
4069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4070 { (eval echo configure:4071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4072 if test -z "$ac_err"; then
4073   rm -rf conftest*
4074   ol_cv_header_stdc=yes
4075 else
4076   echo "$ac_err" >&5
4077   echo "configure: failed program was:" >&5
4078   cat conftest.$ac_ext >&5
4079   rm -rf conftest*
4080   ol_cv_header_stdc=no
4081 fi
4082 rm -f conftest*
4083
4084 if test $ol_cv_header_stdc = yes; then
4085   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4086 cat > conftest.$ac_ext <<EOF
4087 #line 4088 "configure"
4088 #include "confdefs.h"
4089 #include <string.h>
4090 EOF
4091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4092   egrep "memchr" >/dev/null 2>&1; then
4093   :
4094 else
4095   rm -rf conftest*
4096   ol_cv_header_stdc=no
4097 fi
4098 rm -f conftest*
4099
4100 fi
4101
4102 if test $ol_cv_header_stdc = yes; then
4103   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 #include <stdlib.h>
4108 EOF
4109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4110   egrep "free" >/dev/null 2>&1; then
4111   :
4112 else
4113   rm -rf conftest*
4114   ol_cv_header_stdc=no
4115 fi
4116 rm -f conftest*
4117
4118 fi
4119
4120 if test $ol_cv_header_stdc = yes; then
4121   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4122 if test "$cross_compiling" = yes; then
4123   :
4124 else
4125   cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128 #include <ctype.h>
4129 #ifndef HAVE_EBCDIC
4130 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4131 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4132 #else
4133 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4134                 || ('j' <= (c) && (c) <= 'r') \
4135                 || ('s' <= (c) && (c) <= 'z'))
4136 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4137 #endif
4138 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4139 int main () { int i; for (i = 0; i < 256; i++)
4140 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4141 exit (0); }
4142
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4145 then
4146   :
4147 else
4148   echo "configure: failed program was:" >&5
4149   cat conftest.$ac_ext >&5
4150   rm -fr conftest*
4151   ol_cv_header_stdc=no
4152 fi
4153 rm -fr conftest*
4154 fi
4155
4156 fi
4157 fi
4158
4159 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4160 if test $ol_cv_header_stdc = yes; then
4161   cat >> confdefs.h <<\EOF
4162 #define STDC_HEADERS 1
4163 EOF
4164
4165 fi
4166 ac_cv_header_stdc=disable
4167
4168
4169 if test $ol_cv_header_stdc != yes; then
4170         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4171 fi
4172
4173 ac_header_dirent=no
4174 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4175 do
4176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4177 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4178 echo "configure:4179: checking for $ac_hdr that defines DIR" >&5
4179 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 #include <sys/types.h>
4186 #include <$ac_hdr>
4187 int main() {
4188 DIR *dirp = 0;
4189 ; return 0; }
4190 EOF
4191 if { (eval echo configure:4192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4192   rm -rf conftest*
4193   eval "ac_cv_header_dirent_$ac_safe=yes"
4194 else
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -rf conftest*
4198   eval "ac_cv_header_dirent_$ac_safe=no"
4199 fi
4200 rm -f conftest*
4201 fi
4202 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4203   echo "$ac_t""yes" 1>&6
4204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4205   cat >> confdefs.h <<EOF
4206 #define $ac_tr_hdr 1
4207 EOF
4208  ac_header_dirent=$ac_hdr; break
4209 else
4210   echo "$ac_t""no" 1>&6
4211 fi
4212 done
4213 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4214 if test $ac_header_dirent = dirent.h; then
4215 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4216 echo "configure:4217: checking for opendir in -ldir" >&5
4217 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   ac_save_LIBS="$LIBS"
4222 LIBS="-ldir  $LIBS"
4223 cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 /* Override any gcc2 internal prototype to avoid an error.  */
4227 /* We use char because int might match the return type of a gcc2
4228     builtin and then its argument prototype would still apply.  */
4229 char opendir();
4230
4231 int main() {
4232 opendir()
4233 ; return 0; }
4234 EOF
4235 if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4236   rm -rf conftest*
4237   eval "ac_cv_lib_$ac_lib_var=yes"
4238 else
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -rf conftest*
4242   eval "ac_cv_lib_$ac_lib_var=no"
4243 fi
4244 rm -f conftest*
4245 LIBS="$ac_save_LIBS"
4246
4247 fi
4248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4249   echo "$ac_t""yes" 1>&6
4250   LIBS="$LIBS -ldir"
4251 else
4252   echo "$ac_t""no" 1>&6
4253 fi
4254
4255 else
4256 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4257 echo "configure:4258: checking for opendir in -lx" >&5
4258 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4259 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   ac_save_LIBS="$LIBS"
4263 LIBS="-lx  $LIBS"
4264 cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 /* Override any gcc2 internal prototype to avoid an error.  */
4268 /* We use char because int might match the return type of a gcc2
4269     builtin and then its argument prototype would still apply.  */
4270 char opendir();
4271
4272 int main() {
4273 opendir()
4274 ; return 0; }
4275 EOF
4276 if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4277   rm -rf conftest*
4278   eval "ac_cv_lib_$ac_lib_var=yes"
4279 else
4280   echo "configure: failed program was:" >&5
4281   cat conftest.$ac_ext >&5
4282   rm -rf conftest*
4283   eval "ac_cv_lib_$ac_lib_var=no"
4284 fi
4285 rm -f conftest*
4286 LIBS="$ac_save_LIBS"
4287
4288 fi
4289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4290   echo "$ac_t""yes" 1>&6
4291   LIBS="$LIBS -lx"
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296 fi
4297
4298 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4299 echo "configure:4300: checking for sys/wait.h that is POSIX.1 compatible" >&5
4300 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4301   echo $ac_n "(cached) $ac_c" 1>&6
4302 else
4303   cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4306 #include <sys/types.h>
4307 #include <sys/wait.h>
4308 #ifndef WEXITSTATUS
4309 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4310 #endif
4311 #ifndef WIFEXITED
4312 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4313 #endif
4314 int main() {
4315 int s;
4316 wait (&s);
4317 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4318 ; return 0; }
4319 EOF
4320 if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4321   rm -rf conftest*
4322   ac_cv_header_sys_wait_h=yes
4323 else
4324   echo "configure: failed program was:" >&5
4325   cat conftest.$ac_ext >&5
4326   rm -rf conftest*
4327   ac_cv_header_sys_wait_h=no
4328 fi
4329 rm -f conftest*
4330 fi
4331
4332 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4333 if test $ac_cv_header_sys_wait_h = yes; then
4334   cat >> confdefs.h <<\EOF
4335 #define HAVE_SYS_WAIT_H 1
4336 EOF
4337
4338 fi
4339
4340 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4341 echo "configure:4342: checking POSIX termios" >&5
4342 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4343   echo $ac_n "(cached) $ac_c" 1>&6
4344 else
4345   cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 #include <sys/types.h>
4349 #include <unistd.h>
4350 #include <termios.h>
4351 int main() {
4352 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4353    tcgetattr(0, 0);
4354 ; return 0; }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4357   rm -rf conftest*
4358   am_cv_sys_posix_termios=yes
4359 else
4360   echo "configure: failed program was:" >&5
4361   cat conftest.$ac_ext >&5
4362   rm -rf conftest*
4363   am_cv_sys_posix_termios=no
4364 fi
4365 rm -f conftest*
4366 fi
4367
4368 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4369
4370
4371  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4372 echo "configure:4373: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4373 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4374   echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4377
4378   gwinsz_in_termios_h=no
4379   if test $am_cv_sys_posix_termios = yes; then
4380     cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 #include <sys/types.h>
4384 #     include <termios.h>
4385 #     ifdef TIOCGWINSZ
4386         yes
4387 #     endif
4388     
4389 EOF
4390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4391   egrep "yes" >/dev/null 2>&1; then
4392   rm -rf conftest*
4393   gwinsz_in_termios_h=yes
4394 fi
4395 rm -f conftest*
4396
4397   fi
4398
4399   if test $gwinsz_in_termios_h = no; then
4400     cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 #include <sys/types.h>
4404 #     include <sys/ioctl.h>
4405 #     ifdef TIOCGWINSZ
4406         yes
4407 #     endif
4408     
4409 EOF
4410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4411   egrep "yes" >/dev/null 2>&1; then
4412   rm -rf conftest*
4413   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4414 fi
4415 rm -f conftest*
4416
4417   fi
4418   
4419 fi
4420
4421 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4422   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4423     cat >> confdefs.h <<\EOF
4424 #define GWINSZ_IN_SYS_IOCTL 1
4425 EOF
4426
4427   fi
4428
4429 if test $am_cv_sys_posix_termios = yes ; then
4430         cat >> confdefs.h <<\EOF
4431 #define HAVE_POSIX_TERMIOS 1
4432 EOF
4433
4434 fi
4435
4436 for ac_hdr in \
4437         arpa/inet.h             \
4438         arpa/nameser.h  \
4439         assert.h                \
4440         conio.h                 \
4441         crypt.h                 \
4442         direct.h                \
4443         errno.h                 \
4444         fcntl.h                 \
4445         filio.h                 \
4446         getopt.h                \
4447         grp.h                   \
4448         io.h                    \
4449         libutil.h               \
4450         limits.h                \
4451         locale.h                \
4452         netinet/tcp.h   \
4453         malloc.h                \
4454         memory.h                \
4455         psap.h                  \
4456         pwd.h                   \
4457         process.h               \
4458         resolv.h                \
4459         sgtty.h                 \
4460         shadow.h                \
4461         stddef.h                \
4462         string.h                \
4463         strings.h               \
4464         sysexits.h              \
4465         sys/file.h              \
4466         sys/filio.h             \
4467         sys/errno.h             \
4468         sys/ioctl.h             \
4469         sys/param.h             \
4470         sys/resource.h  \
4471         sys/select.h    \
4472         sys/socket.h    \
4473         sys/syslog.h    \
4474         sys/time.h              \
4475         sys/types.h             \
4476         syslog.h                \
4477         termios.h               \
4478         unistd.h                \
4479         winsock.h               \
4480
4481 do
4482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4484 echo "configure:4485: checking for $ac_hdr" >&5
4485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4486   echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488   cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491 #include <$ac_hdr>
4492 EOF
4493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4494 { (eval echo configure:4495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4496 if test -z "$ac_err"; then
4497   rm -rf conftest*
4498   eval "ac_cv_header_$ac_safe=yes"
4499 else
4500   echo "$ac_err" >&5
4501   echo "configure: failed program was:" >&5
4502   cat conftest.$ac_ext >&5
4503   rm -rf conftest*
4504   eval "ac_cv_header_$ac_safe=no"
4505 fi
4506 rm -f conftest*
4507 fi
4508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4509   echo "$ac_t""yes" 1>&6
4510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4511   cat >> confdefs.h <<EOF
4512 #define $ac_tr_hdr 1
4513 EOF
4514  
4515 else
4516   echo "$ac_t""no" 1>&6
4517 fi
4518 done
4519
4520
4521
4522
4523 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4524 echo "configure:4525: checking for dlopen" >&5
4525 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
4526   echo $ac_n "(cached) $ac_c" 1>&6
4527 else
4528   cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4531 /* System header to define __stub macros and hopefully few prototypes,
4532     which can conflict with char dlopen(); below.  */
4533 #include <assert.h>
4534 /* Override any gcc2 internal prototype to avoid an error.  */
4535 /* We use char because int might match the return type of a gcc2
4536     builtin and then its argument prototype would still apply.  */
4537 char dlopen();
4538 char (*f)();
4539
4540 int main() {
4541
4542 /* The GNU C library defines this for functions which it implements
4543     to always fail with ENOSYS.  Some functions are actually named
4544     something starting with __ and the normal name is an alias.  */
4545 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4546 choke me
4547 #else
4548 f = dlopen;
4549 #endif
4550
4551 ; return 0; }
4552 EOF
4553 if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4554   rm -rf conftest*
4555   eval "ac_cv_func_dlopen=yes"
4556 else
4557   echo "configure: failed program was:" >&5
4558   cat conftest.$ac_ext >&5
4559   rm -rf conftest*
4560   eval "ac_cv_func_dlopen=no"
4561 fi
4562 rm -f conftest*
4563 fi
4564
4565 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4566   echo "$ac_t""yes" 1>&6
4567   :
4568 else
4569   echo "$ac_t""no" 1>&6
4570 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4571 echo "configure:4572: checking for dlopen in -ldl" >&5
4572 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
4573 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4574   echo $ac_n "(cached) $ac_c" 1>&6
4575 else
4576   ac_save_LIBS="$LIBS"
4577 LIBS="-ldl  $LIBS"
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4580 "configure"
4580 #include "confdefs.h"
4581 /* Override any gcc2 internal prototype to avoid an error.  */
4582 /* We use char because int might match the return type of a gcc2
4583     builtin and then its argument prototype would still apply.  */
4584 char dlopen();
4585
4586 int main() {
4587 dlopen()
4588 ; return 0; }
4589 EOF
4590 if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4591   rm -rf conftest*
4592   eval "ac_cv_lib_$ac_lib_var=yes"
4593 else
4594   echo "configure: failed program was:" >&5
4595   cat conftest.$ac_ext >&5
4596   rm -rf conftest*
4597   eval "ac_cv_lib_$ac_lib_var=no"
4598 fi
4599 rm -f conftest*
4600 LIBS="$ac_save_LIBS"
4601
4602 fi
4603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4604   echo "$ac_t""yes" 1>&6
4605     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4606     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4607   cat >> confdefs.h <<EOF
4608 #define $ac_tr_lib 1
4609 EOF
4610
4611   LIBS="-ldl $LIBS"
4612
4613 else
4614   echo "$ac_t""no" 1>&6
4615 fi
4616
4617 fi
4618
4619
4620 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4621 echo "configure:4622: checking for sigset in -lV3" >&5
4622 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4624   echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626   ac_save_LIBS="$LIBS"
4627 LIBS="-lV3  $LIBS"
4628 cat > conftest.$ac_ext <<EOF
4629 #line 4630 "configure"
4630 #include "confdefs.h"
4631 /* Override any gcc2 internal prototype to avoid an error.  */
4632 /* We use char because int might match the return type of a gcc2
4633     builtin and then its argument prototype would still apply.  */
4634 char sigset();
4635
4636 int main() {
4637 sigset()
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641   rm -rf conftest*
4642   eval "ac_cv_lib_$ac_lib_var=yes"
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=no"
4648 fi
4649 rm -f conftest*
4650 LIBS="$ac_save_LIBS"
4651
4652 fi
4653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4656     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4657   cat >> confdefs.h <<EOF
4658 #define $ac_tr_lib 1
4659 EOF
4660
4661   LIBS="-lV3 $LIBS"
4662
4663 else
4664   echo "$ac_t""no" 1>&6
4665 fi
4666
4667
4668 if test $ac_cv_header_winsock_h = yes; then
4669         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4670 echo "configure:4671: checking for winsock" >&5
4671 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 #include <winsock.h>
4678 int main() {
4679
4680                         socket(0,0,0);
4681                         select(0,NULL,NULL,NULL,NULL);
4682                         closesocket(0);
4683                         gethostname(NULL,0);
4684         
4685 ; return 0; }
4686 EOF
4687 if { (eval echo configure:4688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4688   rm -rf conftest*
4689   ol_cv_winsock=yes
4690 else
4691   echo "configure: failed program was:" >&5
4692   cat conftest.$ac_ext >&5
4693   rm -rf conftest*
4694   ol_cv_winsock=no
4695 fi
4696 rm -f conftest*]
4697 fi
4698
4699 echo "$ac_t""$ol_cv_winsock" 1>&6
4700
4701         if test $ol_cv_winsock = yes ; then
4702                 cat >> confdefs.h <<\EOF
4703 #define HAVE_WINSOCK 1
4704 EOF
4705
4706                 ac_cv_func_socket=yes
4707                 ac_cv_func_select=yes
4708                 ac_cv_func_closesocket=yes
4709                 ac_cv_func_gethostname=yes
4710         fi
4711 fi
4712
4713
4714 echo $ac_n "checking for socket""... $ac_c" 1>&6
4715 echo "configure:4716: checking for socket" >&5
4716 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 /* System header to define __stub macros and hopefully few prototypes,
4723     which can conflict with char socket(); below.  */
4724 #include <assert.h>
4725 /* Override any gcc2 internal prototype to avoid an error.  */
4726 /* We use char because int might match the return type of a gcc2
4727     builtin and then its argument prototype would still apply.  */
4728 char socket();
4729 char (*f)();
4730
4731 int main() {
4732
4733 /* The GNU C library defines this for functions which it implements
4734     to always fail with ENOSYS.  Some functions are actually named
4735     something starting with __ and the normal name is an alias.  */
4736 #if defined (__stub_socket) || defined (__stub___socket)
4737 choke me
4738 #else
4739 f = socket;
4740 #endif
4741
4742 ; return 0; }
4743 EOF
4744 if { (eval echo configure:4745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4745   rm -rf conftest*
4746   eval "ac_cv_func_socket=yes"
4747 else
4748   echo "configure: failed program was:" >&5
4749   cat conftest.$ac_ext >&5
4750   rm -rf conftest*
4751   eval "ac_cv_func_socket=no"
4752 fi
4753 rm -f conftest*
4754 fi
4755
4756 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4757   echo "$ac_t""yes" 1>&6
4758   :
4759 else
4760   echo "$ac_t""no" 1>&6
4761         
4762         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4763 echo "configure:4764: checking for main in -lsocket" >&5
4764 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4765 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768   ac_save_LIBS="$LIBS"
4769 LIBS="-lsocket  $LIBS"
4770 cat > conftest.$ac_ext <<EOF
4771 #line 4772 "configure"
4772 #include "confdefs.h"
4773
4774 int main() {
4775 main()
4776 ; return 0; }
4777 EOF
4778 if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4779   rm -rf conftest*
4780   eval "ac_cv_lib_$ac_lib_var=yes"
4781 else
4782   echo "configure: failed program was:" >&5
4783   cat conftest.$ac_ext >&5
4784   rm -rf conftest*
4785   eval "ac_cv_lib_$ac_lib_var=no"
4786 fi
4787 rm -f conftest*
4788 LIBS="$ac_save_LIBS"
4789
4790 fi
4791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4792   echo "$ac_t""yes" 1>&6
4793     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4794     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4795   cat >> confdefs.h <<EOF
4796 #define $ac_tr_lib 1
4797 EOF
4798
4799   LIBS="-lsocket $LIBS"
4800
4801 else
4802   echo "$ac_t""no" 1>&6
4803 fi
4804
4805         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4806 echo "configure:4807: checking for main in -lnet" >&5
4807 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4809   echo $ac_n "(cached) $ac_c" 1>&6
4810 else
4811   ac_save_LIBS="$LIBS"
4812 LIBS="-lnet  $LIBS"
4813 cat > conftest.$ac_ext <<EOF
4814 #line 4815 "configure"
4815 #include "confdefs.h"
4816
4817 int main() {
4818 main()
4819 ; return 0; }
4820 EOF
4821 if { (eval echo configure:4822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4822   rm -rf conftest*
4823   eval "ac_cv_lib_$ac_lib_var=yes"
4824 else
4825   echo "configure: failed program was:" >&5
4826   cat conftest.$ac_ext >&5
4827   rm -rf conftest*
4828   eval "ac_cv_lib_$ac_lib_var=no"
4829 fi
4830 rm -f conftest*
4831 LIBS="$ac_save_LIBS"
4832
4833 fi
4834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4835   echo "$ac_t""yes" 1>&6
4836     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4838   cat >> confdefs.h <<EOF
4839 #define $ac_tr_lib 1
4840 EOF
4841
4842   LIBS="-lnet $LIBS"
4843
4844 else
4845   echo "$ac_t""no" 1>&6
4846 fi
4847
4848         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4849 echo "configure:4850: checking for main in -lnsl_s" >&5
4850 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4851 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4852   echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854   ac_save_LIBS="$LIBS"
4855 LIBS="-lnsl_s  $LIBS"
4856 cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859
4860 int main() {
4861 main()
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865   rm -rf conftest*
4866   eval "ac_cv_lib_$ac_lib_var=yes"
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -rf conftest*
4871   eval "ac_cv_lib_$ac_lib_var=no"
4872 fi
4873 rm -f conftest*
4874 LIBS="$ac_save_LIBS"
4875
4876 fi
4877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4878   echo "$ac_t""yes" 1>&6
4879     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4880     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4881   cat >> confdefs.h <<EOF
4882 #define $ac_tr_lib 1
4883 EOF
4884
4885   LIBS="-lnsl_s $LIBS"
4886
4887 else
4888   echo "$ac_t""no" 1>&6
4889 fi
4890
4891         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4892 echo "configure:4893: checking for main in -lnsl" >&5
4893 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4894 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4895   echo $ac_n "(cached) $ac_c" 1>&6
4896 else
4897   ac_save_LIBS="$LIBS"
4898 LIBS="-lnsl  $LIBS"
4899 cat > conftest.$ac_ext <<EOF
4900 #line 4901 "configure"
4901 #include "confdefs.h"
4902
4903 int main() {
4904 main()
4905 ; return 0; }
4906 EOF
4907 if { (eval echo configure:4908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4908   rm -rf conftest*
4909   eval "ac_cv_lib_$ac_lib_var=yes"
4910 else
4911   echo "configure: failed program was:" >&5
4912   cat conftest.$ac_ext >&5
4913   rm -rf conftest*
4914   eval "ac_cv_lib_$ac_lib_var=no"
4915 fi
4916 rm -f conftest*
4917 LIBS="$ac_save_LIBS"
4918
4919 fi
4920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4921   echo "$ac_t""yes" 1>&6
4922     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4923     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4924   cat >> confdefs.h <<EOF
4925 #define $ac_tr_lib 1
4926 EOF
4927
4928   LIBS="-lnsl $LIBS"
4929
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933
4934         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4935 echo "configure:4936: checking for socket in -linet" >&5
4936 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4937 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4938   echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940   ac_save_LIBS="$LIBS"
4941 LIBS="-linet  $LIBS"
4942 cat > conftest.$ac_ext <<EOF
4943 #line 4944 "configure"
4944 #include "confdefs.h"
4945 /* Override any gcc2 internal prototype to avoid an error.  */
4946 /* We use char because int might match the return type of a gcc2
4947     builtin and then its argument prototype would still apply.  */
4948 char socket();
4949
4950 int main() {
4951 socket()
4952 ; return 0; }
4953 EOF
4954 if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4955   rm -rf conftest*
4956   eval "ac_cv_lib_$ac_lib_var=yes"
4957 else
4958   echo "configure: failed program was:" >&5
4959   cat conftest.$ac_ext >&5
4960   rm -rf conftest*
4961   eval "ac_cv_lib_$ac_lib_var=no"
4962 fi
4963 rm -f conftest*
4964 LIBS="$ac_save_LIBS"
4965
4966 fi
4967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4968   echo "$ac_t""yes" 1>&6
4969     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4970     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4971   cat >> confdefs.h <<EOF
4972 #define $ac_tr_lib 1
4973 EOF
4974
4975   LIBS="-linet $LIBS"
4976
4977 else
4978   echo "$ac_t""no" 1>&6
4979 fi
4980
4981         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4982 echo "configure:4983: checking for main in -lgen" >&5
4983 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   ac_save_LIBS="$LIBS"
4988 LIBS="-lgen  $LIBS"
4989 cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4992
4993 int main() {
4994 main()
4995 ; return 0; }
4996 EOF
4997 if { (eval echo configure:4998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4998   rm -rf conftest*
4999   eval "ac_cv_lib_$ac_lib_var=yes"
5000 else
5001   echo "configure: failed program was:" >&5
5002   cat conftest.$ac_ext >&5
5003   rm -rf conftest*
5004   eval "ac_cv_lib_$ac_lib_var=no"
5005 fi
5006 rm -f conftest*
5007 LIBS="$ac_save_LIBS"
5008
5009 fi
5010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5011   echo "$ac_t""yes" 1>&6
5012     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5014   cat >> confdefs.h <<EOF
5015 #define $ac_tr_lib 1
5016 EOF
5017
5018   LIBS="-lgen $LIBS"
5019
5020 else
5021   echo "$ac_t""no" 1>&6
5022 fi
5023
5024
5025 fi
5026
5027
5028 echo $ac_n "checking for select""... $ac_c" 1>&6
5029 echo "configure:5030: checking for select" >&5
5030 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5031   echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033   cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036 /* System header to define __stub macros and hopefully few prototypes,
5037     which can conflict with char select(); below.  */
5038 #include <assert.h>
5039 /* Override any gcc2 internal prototype to avoid an error.  */
5040 /* We use char because int might match the return type of a gcc2
5041     builtin and then its argument prototype would still apply.  */
5042 char select();
5043 char (*f)();
5044
5045 int main() {
5046
5047 /* The GNU C library defines this for functions which it implements
5048     to always fail with ENOSYS.  Some functions are actually named
5049     something starting with __ and the normal name is an alias.  */
5050 #if defined (__stub_select) || defined (__stub___select)
5051 choke me
5052 #else
5053 f = select;
5054 #endif
5055
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059   rm -rf conftest*
5060   eval "ac_cv_func_select=yes"
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   eval "ac_cv_func_select=no"
5066 fi
5067 rm -f conftest*
5068 fi
5069
5070 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5071   echo "$ac_t""yes" 1>&6
5072   :
5073 else
5074   echo "$ac_t""no" 1>&6
5075 { echo "configure: error: select() required." 1>&2; exit 1; }
5076 fi
5077
5078
5079 if test "${ac_cv_header_winsock_h}" != yes; then
5080                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5081 echo "configure:5082: checking types of arguments for select()" >&5
5082  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5083   echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5089   echo $ac_n "(cached) $ac_c" 1>&6
5090 else
5091      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5092      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5093       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5094        cat > conftest.$ac_ext <<EOF
5095 #line 5096 "configure"
5096 #include "confdefs.h"
5097 #ifdef HAVE_SYS_TYPES_H
5098 #include <sys/types.h>
5099 #endif
5100 #ifdef HAVE_SYS_TIME_H
5101 #include <sys/time.h>
5102 #endif
5103 #ifdef HAVE_SYS_SELECT_H
5104 #include <sys/select.h>
5105 #endif
5106 #ifdef HAVE_SYS_SOCKET_H
5107 #include <sys/socket.h>
5108 #endif
5109 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);
5110 int main() {
5111
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5115   rm -rf conftest*
5116           ac_not_found=no ; break 3
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   ac_not_found=yes
5122 fi
5123 rm -f conftest*
5124       done
5125      done
5126     done
5127    
5128 fi
5129   
5130 fi
5131  
5132 fi
5133  if test "$ac_not_found" = yes; then
5134   ac_cv_func_select_arg1=int 
5135   ac_cv_func_select_arg234='int *' 
5136   ac_cv_func_select_arg5='struct timeval *'
5137  fi
5138  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5139  cat >> confdefs.h <<EOF
5140 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5141 EOF
5142
5143  cat >> confdefs.h <<EOF
5144 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5145 EOF
5146
5147  cat >> confdefs.h <<EOF
5148 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5149 EOF
5150
5151
5152 fi
5153
5154
5155 for ac_hdr in regex.h 
5156 do
5157 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5158 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5159 echo "configure:5160: checking for $ac_hdr" >&5
5160 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5161   echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5163   cat > conftest.$ac_ext <<EOF
5164 #line 5165 "configure"
5165 #include "confdefs.h"
5166 #include <$ac_hdr>
5167 EOF
5168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5169 { (eval echo configure:5170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5171 if test -z "$ac_err"; then
5172   rm -rf conftest*
5173   eval "ac_cv_header_$ac_safe=yes"
5174 else
5175   echo "$ac_err" >&5
5176   echo "configure: failed program was:" >&5
5177   cat conftest.$ac_ext >&5
5178   rm -rf conftest*
5179   eval "ac_cv_header_$ac_safe=no"
5180 fi
5181 rm -f conftest*
5182 fi
5183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5184   echo "$ac_t""yes" 1>&6
5185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5186   cat >> confdefs.h <<EOF
5187 #define $ac_tr_hdr 1
5188 EOF
5189  
5190 else
5191   echo "$ac_t""no" 1>&6
5192 fi
5193 done
5194
5195 if test "$ac_cv_header_regex_h" != yes ; then
5196         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5197 fi
5198 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5199 echo "configure:5200: checking for regfree" >&5
5200 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5201   echo $ac_n "(cached) $ac_c" 1>&6
5202 else
5203   cat > conftest.$ac_ext <<EOF
5204 #line 5205 "configure"
5205 #include "confdefs.h"
5206 /* System header to define __stub macros and hopefully few prototypes,
5207     which can conflict with char regfree(); below.  */
5208 #include <assert.h>
5209 /* Override any gcc2 internal prototype to avoid an error.  */
5210 /* We use char because int might match the return type of a gcc2
5211     builtin and then its argument prototype would still apply.  */
5212 char regfree();
5213 char (*f)();
5214
5215 int main() {
5216
5217 /* The GNU C library defines this for functions which it implements
5218     to always fail with ENOSYS.  Some functions are actually named
5219     something starting with __ and the normal name is an alias.  */
5220 #if defined (__stub_regfree) || defined (__stub___regfree)
5221 choke me
5222 #else
5223 f = regfree;
5224 #endif
5225
5226 ; return 0; }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5229   rm -rf conftest*
5230   eval "ac_cv_func_regfree=yes"
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -rf conftest*
5235   eval "ac_cv_func_regfree=no"
5236 fi
5237 rm -f conftest*
5238 fi
5239
5240 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5241   echo "$ac_t""yes" 1>&6
5242   :
5243 else
5244   echo "$ac_t""no" 1>&6
5245 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5246 fi
5247
5248
5249
5250 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5251 echo "configure:5252: checking for compatible POSIX regex" >&5
5252 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5253   echo $ac_n "(cached) $ac_c" 1>&6
5254 else
5255   
5256         if test "$cross_compiling" = yes; then
5257   ol_cv_c_posix_regex=cross
5258 else
5259   cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262
5263 #include <sys/types.h>
5264 #include <regex.h>
5265 static char *pattern, *string;
5266 main()
5267 {
5268         int rc;
5269         regex_t re;
5270
5271         pattern = "^A";
5272
5273         if(regcomp(&re, pattern, 0)) {
5274                 return -1;
5275         }
5276         
5277         string = "ALL MATCH";
5278         
5279         rc = regexec(&re, string, 0, (void*)0, 0);
5280
5281         regfree(&re);
5282
5283         return rc;
5284 }
5285 EOF
5286 if { (eval echo configure:5287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5287 then
5288   ol_cv_c_posix_regex=yes
5289 else
5290   echo "configure: failed program was:" >&5
5291   cat conftest.$ac_ext >&5
5292   rm -fr conftest*
5293   ol_cv_c_posix_regex=no
5294 fi
5295 rm -fr conftest*
5296 fi
5297
5298 fi
5299
5300 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5301
5302 if test "$ol_cv_c_posix_regex" = no ; then
5303         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5304 fi
5305
5306 ol_link_dnssrv=no
5307 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5308 echo "configure:5309: checking for res_query" >&5
5309 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5310   echo $ac_n "(cached) $ac_c" 1>&6
5311 else
5312   cat > conftest.$ac_ext <<EOF
5313 #line 5314 "configure"
5314 #include "confdefs.h"
5315 /* System header to define __stub macros and hopefully few prototypes,
5316     which can conflict with char res_query(); below.  */
5317 #include <assert.h>
5318 /* Override any gcc2 internal prototype to avoid an error.  */
5319 /* We use char because int might match the return type of a gcc2
5320     builtin and then its argument prototype would still apply.  */
5321 char res_query();
5322 char (*f)();
5323
5324 int main() {
5325
5326 /* The GNU C library defines this for functions which it implements
5327     to always fail with ENOSYS.  Some functions are actually named
5328     something starting with __ and the normal name is an alias.  */
5329 #if defined (__stub_res_query) || defined (__stub___res_query)
5330 choke me
5331 #else
5332 f = res_query;
5333 #endif
5334
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5338   rm -rf conftest*
5339   eval "ac_cv_func_res_query=yes"
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   eval "ac_cv_func_res_query=no"
5345 fi
5346 rm -f conftest*
5347 fi
5348
5349 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5350   echo "$ac_t""yes" 1>&6
5351   :
5352 else
5353   echo "$ac_t""no" 1>&6
5354 fi
5355
5356 if test $ac_cv_func_res_query = no ; then 
5357         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5358 echo "configure:5359: checking for res_query in -lbind" >&5
5359 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   ac_save_LIBS="$LIBS"
5364 LIBS="-lbind  $LIBS"
5365 cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368 /* Override any gcc2 internal prototype to avoid an error.  */
5369 /* We use char because int might match the return type of a gcc2
5370     builtin and then its argument prototype would still apply.  */
5371 char res_query();
5372
5373 int main() {
5374 res_query()
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378   rm -rf conftest*
5379   eval "ac_cv_lib_$ac_lib_var=yes"
5380 else
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   eval "ac_cv_lib_$ac_lib_var=no"
5385 fi
5386 rm -f conftest*
5387 LIBS="$ac_save_LIBS"
5388
5389 fi
5390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5391   echo "$ac_t""yes" 1>&6
5392     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5393     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5394   cat >> confdefs.h <<EOF
5395 #define $ac_tr_lib 1
5396 EOF
5397
5398   LIBS="-lbind $LIBS"
5399
5400 else
5401   echo "$ac_t""no" 1>&6
5402 fi
5403
5404         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5405 fi
5406
5407 if test $ac_cv_func_res_query = no ; then 
5408         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5409 echo "configure:5410: checking for __res_query in -lbind" >&5
5410 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5411 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5412   echo $ac_n "(cached) $ac_c" 1>&6
5413 else
5414   ac_save_LIBS="$LIBS"
5415 LIBS="-lbind  $LIBS"
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419 /* Override any gcc2 internal prototype to avoid an error.  */
5420 /* We use char because int might match the return type of a gcc2
5421     builtin and then its argument prototype would still apply.  */
5422 char __res_query();
5423
5424 int main() {
5425 __res_query()
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5429   rm -rf conftest*
5430   eval "ac_cv_lib_$ac_lib_var=yes"
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=no"
5436 fi
5437 rm -f conftest*
5438 LIBS="$ac_save_LIBS"
5439
5440 fi
5441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5442   echo "$ac_t""yes" 1>&6
5443     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5444     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5445   cat >> confdefs.h <<EOF
5446 #define $ac_tr_lib 1
5447 EOF
5448
5449   LIBS="-lbind $LIBS"
5450
5451 else
5452   echo "$ac_t""no" 1>&6
5453 fi
5454
5455         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5456 fi
5457
5458 if test $ac_cv_func_res_query = no ; then 
5459         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5460 echo "configure:5461: checking for res_query in -lresolv" >&5
5461 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5462 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5463   echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465   ac_save_LIBS="$LIBS"
5466 LIBS="-lresolv  $LIBS"
5467 cat > conftest.$ac_ext <<EOF
5468 #line 5469 "configure"
5469 #include "confdefs.h"
5470 /* Override any gcc2 internal prototype to avoid an error.  */
5471 /* We use char because int might match the return type of a gcc2
5472     builtin and then its argument prototype would still apply.  */
5473 char res_query();
5474
5475 int main() {
5476 res_query()
5477 ; return 0; }
5478 EOF
5479 if { (eval echo configure:5480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5480   rm -rf conftest*
5481   eval "ac_cv_lib_$ac_lib_var=yes"
5482 else
5483   echo "configure: failed program was:" >&5
5484   cat conftest.$ac_ext >&5
5485   rm -rf conftest*
5486   eval "ac_cv_lib_$ac_lib_var=no"
5487 fi
5488 rm -f conftest*
5489 LIBS="$ac_save_LIBS"
5490
5491 fi
5492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5493   echo "$ac_t""yes" 1>&6
5494     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5495     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5496   cat >> confdefs.h <<EOF
5497 #define $ac_tr_lib 1
5498 EOF
5499
5500   LIBS="-lresolv $LIBS"
5501
5502 else
5503   echo "$ac_t""no" 1>&6
5504 fi
5505
5506         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5507 fi
5508
5509 if test "$ac_cv_func_res_query" = yes ; then
5510         cat >> confdefs.h <<\EOF
5511 #define HAVE_RES_QUERY 1
5512 EOF
5513
5514
5515         if test $ol_enable_dnssrv != no ; then
5516                 ol_link_dnssrv=yes
5517         fi
5518 fi
5519
5520 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5521         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5522 fi
5523
5524 for ac_func in getaddrinfo inet_ntop 
5525 do
5526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5527 echo "configure:5528: checking for $ac_func" >&5
5528 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5529   echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531   cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534 /* System header to define __stub macros and hopefully few prototypes,
5535     which can conflict with char $ac_func(); below.  */
5536 #include <assert.h>
5537 /* Override any gcc2 internal prototype to avoid an error.  */
5538 /* We use char because int might match the return type of a gcc2
5539     builtin and then its argument prototype would still apply.  */
5540 char $ac_func();
5541 char (*f)();
5542
5543 int main() {
5544
5545 /* The GNU C library defines this for functions which it implements
5546     to always fail with ENOSYS.  Some functions are actually named
5547     something starting with __ and the normal name is an alias.  */
5548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5549 choke me
5550 #else
5551 f = $ac_func;
5552 #endif
5553
5554 ; return 0; }
5555 EOF
5556 if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5557   rm -rf conftest*
5558   eval "ac_cv_func_$ac_func=yes"
5559 else
5560   echo "configure: failed program was:" >&5
5561   cat conftest.$ac_ext >&5
5562   rm -rf conftest*
5563   eval "ac_cv_func_$ac_func=no"
5564 fi
5565 rm -f conftest*
5566 fi
5567
5568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5569   echo "$ac_t""yes" 1>&6
5570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5571   cat >> confdefs.h <<EOF
5572 #define $ac_tr_func 1
5573 EOF
5574  
5575 else
5576   echo "$ac_t""no" 1>&6
5577 fi
5578 done
5579
5580
5581 ol_link_ipv6=no
5582 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
5583         if test $ol_enable_ipv6 = yes ; then
5584                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
5585         fi
5586 else
5587         for ac_func in gai_strerror 
5588 do
5589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5590 echo "configure:5591: checking for $ac_func" >&5
5591 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5592   echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594   cat > conftest.$ac_ext <<EOF
5595 #line 5596 "configure"
5596 #include "confdefs.h"
5597 /* System header to define __stub macros and hopefully few prototypes,
5598     which can conflict with char $ac_func(); below.  */
5599 #include <assert.h>
5600 /* Override any gcc2 internal prototype to avoid an error.  */
5601 /* We use char because int might match the return type of a gcc2
5602     builtin and then its argument prototype would still apply.  */
5603 char $ac_func();
5604 char (*f)();
5605
5606 int main() {
5607
5608 /* The GNU C library defines this for functions which it implements
5609     to always fail with ENOSYS.  Some functions are actually named
5610     something starting with __ and the normal name is an alias.  */
5611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5612 choke me
5613 #else
5614 f = $ac_func;
5615 #endif
5616
5617 ; return 0; }
5618 EOF
5619 if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5620   rm -rf conftest*
5621   eval "ac_cv_func_$ac_func=yes"
5622 else
5623   echo "configure: failed program was:" >&5
5624   cat conftest.$ac_ext >&5
5625   rm -rf conftest*
5626   eval "ac_cv_func_$ac_func=no"
5627 fi
5628 rm -f conftest*
5629 fi
5630
5631 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5632   echo "$ac_t""yes" 1>&6
5633     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5634   cat >> confdefs.h <<EOF
5635 #define $ac_tr_func 1
5636 EOF
5637  
5638 else
5639   echo "$ac_t""no" 1>&6
5640 fi
5641 done
5642
5643
5644         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5645 echo "configure:5646: checking INET6_ADDRSTRLEN" >&5
5646 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5647   echo $ac_n "(cached) $ac_c" 1>&6
5648 else
5649   
5650                 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653
5654 #                       include <netinet/in.h>
5655 #                       ifdef INET6_ADDRSTRLEN
5656                                 __has_inet6_addrstrlen__;
5657 #                       endif
5658                 
5659 EOF
5660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5661   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5662   rm -rf conftest*
5663   ol_cv_inet6_addrstrlen=yes
5664 else
5665   rm -rf conftest*
5666   ol_cv_inet6_addrstrlen=no
5667 fi
5668 rm -f conftest*
5669
5670 fi
5671
5672 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5673
5674         if test $ol_cv_inet6_addrstrlen = yes ; then
5675                 ol_link_ipv6=yes
5676         elif test $ol_enable_ipv6 = yes ; then
5677                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5678         fi
5679 fi
5680
5681 if test $ol_enable_local != no ; then
5682         for ac_hdr in sys/un.h 
5683 do
5684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5686 echo "configure:5687: checking for $ac_hdr" >&5
5687 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5688   echo $ac_n "(cached) $ac_c" 1>&6
5689 else
5690   cat > conftest.$ac_ext <<EOF
5691 #line 5692 "configure"
5692 #include "confdefs.h"
5693 #include <$ac_hdr>
5694 EOF
5695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5696 { (eval echo configure:5697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5698 if test -z "$ac_err"; then
5699   rm -rf conftest*
5700   eval "ac_cv_header_$ac_safe=yes"
5701 else
5702   echo "$ac_err" >&5
5703   echo "configure: failed program was:" >&5
5704   cat conftest.$ac_ext >&5
5705   rm -rf conftest*
5706   eval "ac_cv_header_$ac_safe=no"
5707 fi
5708 rm -f conftest*
5709 fi
5710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5711   echo "$ac_t""yes" 1>&6
5712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5713   cat >> confdefs.h <<EOF
5714 #define $ac_tr_hdr 1
5715 EOF
5716  
5717 else
5718   echo "$ac_t""no" 1>&6
5719 fi
5720 done
5721
5722
5723         if test $ol_enable_local = auto ; then
5724                 ol_enable_local=$ac_cv_header_sys_un_h
5725         elif test $ac_cv_header_sys_un_h = no ; then
5726                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5727         fi
5728 fi
5729
5730 ol_link_kbind=no
5731 ol_link_kpasswd=no
5732 ol_link_krb5=no
5733 ol_link_krb4=no
5734
5735 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5736         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5737         -o $ol_with_kerberos = k425 ; then
5738
5739         for ac_hdr in krb5.h
5740 do
5741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5743 echo "configure:5744: checking for $ac_hdr" >&5
5744 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5745   echo $ac_n "(cached) $ac_c" 1>&6
5746 else
5747   cat > conftest.$ac_ext <<EOF
5748 #line 5749 "configure"
5749 #include "confdefs.h"
5750 #include <$ac_hdr>
5751 EOF
5752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5753 { (eval echo configure:5754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5755 if test -z "$ac_err"; then
5756   rm -rf conftest*
5757   eval "ac_cv_header_$ac_safe=yes"
5758 else
5759   echo "$ac_err" >&5
5760   echo "configure: failed program was:" >&5
5761   cat conftest.$ac_ext >&5
5762   rm -rf conftest*
5763   eval "ac_cv_header_$ac_safe=no"
5764 fi
5765 rm -f conftest*
5766 fi
5767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5768   echo "$ac_t""yes" 1>&6
5769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5770   cat >> confdefs.h <<EOF
5771 #define $ac_tr_hdr 1
5772 EOF
5773  
5774 else
5775   echo "$ac_t""no" 1>&6
5776 fi
5777 done
5778
5779
5780         if test $ac_cv_header_krb5_h = yes ; then
5781                                 for ac_hdr in heim_err.h
5782 do
5783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5785 echo "configure:5786: checking for $ac_hdr" >&5
5786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5787   echo $ac_n "(cached) $ac_c" 1>&6
5788 else
5789   cat > conftest.$ac_ext <<EOF
5790 #line 5791 "configure"
5791 #include "confdefs.h"
5792 #include <$ac_hdr>
5793 EOF
5794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5795 { (eval echo configure:5796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5797 if test -z "$ac_err"; then
5798   rm -rf conftest*
5799   eval "ac_cv_header_$ac_safe=yes"
5800 else
5801   echo "$ac_err" >&5
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   eval "ac_cv_header_$ac_safe=no"
5806 fi
5807 rm -f conftest*
5808 fi
5809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5810   echo "$ac_t""yes" 1>&6
5811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5812   cat >> confdefs.h <<EOF
5813 #define $ac_tr_hdr 1
5814 EOF
5815  
5816 else
5817   echo "$ac_t""no" 1>&6
5818 fi
5819 done
5820
5821                 if test $ac_cv_header_heim_err_h = yes ; then
5822                         krb5_impl=heimdal
5823                 else
5824                         krb5_impl=mit
5825                 fi
5826
5827                 if test $krb5_impl = mit; then
5828                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5829 echo "configure:5830: checking for main in -lkrb5" >&5
5830 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5832   echo $ac_n "(cached) $ac_c" 1>&6
5833 else
5834   ac_save_LIBS="$LIBS"
5835 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5836 cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839
5840 int main() {
5841 main()
5842 ; return 0; }
5843 EOF
5844 if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5845   rm -rf conftest*
5846   eval "ac_cv_lib_$ac_lib_var=yes"
5847 else
5848   echo "configure: failed program was:" >&5
5849   cat conftest.$ac_ext >&5
5850   rm -rf conftest*
5851   eval "ac_cv_lib_$ac_lib_var=no"
5852 fi
5853 rm -f conftest*
5854 LIBS="$ac_save_LIBS"
5855
5856 fi
5857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5858   echo "$ac_t""yes" 1>&6
5859   have_krb5=yes
5860                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5861 else
5862   echo "$ac_t""no" 1>&6
5863 have_krb5=no
5864 fi
5865
5866
5867                 elif test $krb5_impl = heimdal; then
5868                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5869 echo "configure:5870: checking for main in -lkrb5" >&5
5870 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5871 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5872   echo $ac_n "(cached) $ac_c" 1>&6
5873 else
5874   ac_save_LIBS="$LIBS"
5875 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5876 cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879
5880 int main() {
5881 main()
5882 ; return 0; }
5883 EOF
5884 if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5885   rm -rf conftest*
5886   eval "ac_cv_lib_$ac_lib_var=yes"
5887 else
5888   echo "configure: failed program was:" >&5
5889   cat conftest.$ac_ext >&5
5890   rm -rf conftest*
5891   eval "ac_cv_lib_$ac_lib_var=no"
5892 fi
5893 rm -f conftest*
5894 LIBS="$ac_save_LIBS"
5895
5896 fi
5897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5898   echo "$ac_t""yes" 1>&6
5899   have_krb5=yes
5900                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5901 else
5902   echo "$ac_t""no" 1>&6
5903 have_krb5=no
5904 fi
5905
5906
5907                         cat >> confdefs.h <<\EOF
5908 #define HAVE_HEIMDAL_KERBEROS 1
5909 EOF
5910
5911                 else
5912                         have_krb5=no
5913                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
5914                 fi
5915
5916                 if test $have_krb5 = yes ; then
5917                         ol_link_krb5=yes
5918
5919                         cat >> confdefs.h <<\EOF
5920 #define HAVE_KRB5 1
5921 EOF
5922
5923
5924                         if test $ol_enable_kpasswd != no ; then
5925                                 ol_link_kpasswd=yes;
5926                         fi
5927
5928                         if test $ol_with_kerberos = k5only ; then
5929                                 ol_with_kerberos=found
5930                         fi
5931
5932                 elif test $ol_with_kerberos != auto ; then
5933                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5934                 fi
5935
5936         fi
5937 fi
5938
5939 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5940         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5941
5942         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5943 do
5944 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5946 echo "configure:5947: checking for $ac_hdr" >&5
5947 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5948   echo $ac_n "(cached) $ac_c" 1>&6
5949 else
5950   cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 #include <$ac_hdr>
5954 EOF
5955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5956 { (eval echo configure:5957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5958 if test -z "$ac_err"; then
5959   rm -rf conftest*
5960   eval "ac_cv_header_$ac_safe=yes"
5961 else
5962   echo "$ac_err" >&5
5963   echo "configure: failed program was:" >&5
5964   cat conftest.$ac_ext >&5
5965   rm -rf conftest*
5966   eval "ac_cv_header_$ac_safe=no"
5967 fi
5968 rm -f conftest*
5969 fi
5970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5971   echo "$ac_t""yes" 1>&6
5972     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5973   cat >> confdefs.h <<EOF
5974 #define $ac_tr_hdr 1
5975 EOF
5976  
5977 else
5978   echo "$ac_t""no" 1>&6
5979 fi
5980 done
5981
5982
5983         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5984                 if test $krb5_impl = mit; then
5985                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5986 echo "configure:5987: checking for main in -lkrb4" >&5
5987 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5989   echo $ac_n "(cached) $ac_c" 1>&6
5990 else
5991   ac_save_LIBS="$LIBS"
5992 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996
5997 int main() {
5998 main()
5999 ; return 0; }
6000 EOF
6001 if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6002   rm -rf conftest*
6003   eval "ac_cv_lib_$ac_lib_var=yes"
6004 else
6005   echo "configure: failed program was:" >&5
6006   cat conftest.$ac_ext >&5
6007   rm -rf conftest*
6008   eval "ac_cv_lib_$ac_lib_var=no"
6009 fi
6010 rm -f conftest*
6011 LIBS="$ac_save_LIBS"
6012
6013 fi
6014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6015   echo "$ac_t""yes" 1>&6
6016   have_k425=yes
6017                                 KRB4_LIBS="-lkrb4 -ldes425"
6018 else
6019   echo "$ac_t""no" 1>&6
6020 have_k425=no
6021 fi
6022
6023
6024                 elif test $krb5_impl = heimdal; then
6025                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6026 echo "configure:6027: checking for main in -lkrb4" >&5
6027 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6029   echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031   ac_save_LIBS="$LIBS"
6032 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6033 cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036
6037 int main() {
6038 main()
6039 ; return 0; }
6040 EOF
6041 if { (eval echo configure:6042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6042   rm -rf conftest*
6043   eval "ac_cv_lib_$ac_lib_var=yes"
6044 else
6045   echo "configure: failed program was:" >&5
6046   cat conftest.$ac_ext >&5
6047   rm -rf conftest*
6048   eval "ac_cv_lib_$ac_lib_var=no"
6049 fi
6050 rm -f conftest*
6051 LIBS="$ac_save_LIBS"
6052
6053 fi
6054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6055   echo "$ac_t""yes" 1>&6
6056   have_k425=yes
6057                                 KRB4_LIBS="-lkrb4"
6058 else
6059   echo "$ac_t""no" 1>&6
6060 have_k425=no
6061 fi
6062
6063
6064                 else
6065                         have_425=no
6066                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6067                 fi
6068
6069                 if test $have_k425 = yes ; then
6070                         ol_with_kerberos=found
6071                         ol_link_krb4=yes
6072
6073                         cat >> confdefs.h <<\EOF
6074 #define HAVE_KRB425 1
6075 EOF
6076
6077                         cat >> confdefs.h <<\EOF
6078 #define HAVE_KRB4 1
6079 EOF
6080
6081
6082                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6083 echo "configure:6084: checking for des_debug in Kerberos libraries" >&5
6084 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6085   echo $ac_n "(cached) $ac_c" 1>&6
6086 else
6087   
6088                                                                 save_LIBS="$LIBS"
6089                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6090                                 cat > conftest.$ac_ext <<EOF
6091 #line 6092 "configure"
6092 #include "confdefs.h"
6093
6094 #include <kerberosIV/krb.h>
6095 #include <kerberosIV/des.h>
6096 extern int des_debug;
6097
6098 int main() {
6099
6100 des_debug = 1;
6101
6102 ; return 0; }
6103 EOF
6104 if { (eval echo configure:6105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6105   rm -rf conftest*
6106   ol_cv_var_des_debug=yes
6107 else
6108   echo "configure: failed program was:" >&5
6109   cat conftest.$ac_ext >&5
6110   rm -rf conftest*
6111   ol_cv_var_des_debug=no
6112 fi
6113 rm -f conftest*
6114                                                                 LIBS="$save_LIBS"
6115                         
6116 fi
6117
6118 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6119
6120                         if test $ol_cv_var_des_debug = yes ; then
6121                                 cat >> confdefs.h <<\EOF
6122 #define HAVE_DES_DEBUG 1
6123 EOF
6124
6125                         fi
6126
6127                         LIBS="$save_LIBS"
6128                 fi
6129         fi
6130 fi
6131
6132 if test $ol_link_krb5 = yes ; then
6133         ol_with_kerberos=found
6134 fi
6135
6136 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6137         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6138
6139         for ac_hdr in krb.h des.h krb-archaeology.h 
6140 do
6141 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6142 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6143 echo "configure:6144: checking for $ac_hdr" >&5
6144 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6145   echo $ac_n "(cached) $ac_c" 1>&6
6146 else
6147   cat > conftest.$ac_ext <<EOF
6148 #line 6149 "configure"
6149 #include "confdefs.h"
6150 #include <$ac_hdr>
6151 EOF
6152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6153 { (eval echo configure:6154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6155 if test -z "$ac_err"; then
6156   rm -rf conftest*
6157   eval "ac_cv_header_$ac_safe=yes"
6158 else
6159   echo "$ac_err" >&5
6160   echo "configure: failed program was:" >&5
6161   cat conftest.$ac_ext >&5
6162   rm -rf conftest*
6163   eval "ac_cv_header_$ac_safe=no"
6164 fi
6165 rm -f conftest*
6166 fi
6167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6168   echo "$ac_t""yes" 1>&6
6169     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6170   cat >> confdefs.h <<EOF
6171 #define $ac_tr_hdr 1
6172 EOF
6173  
6174 else
6175   echo "$ac_t""no" 1>&6
6176 fi
6177 done
6178
6179
6180         if test $ac_cv_header_krb_h = yes ; then
6181                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6182 echo "configure:6183: checking for main in -lkrb" >&5
6183 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6185   echo $ac_n "(cached) $ac_c" 1>&6
6186 else
6187   ac_save_LIBS="$LIBS"
6188 LIBS="-lkrb -ldes $LIBS"
6189 cat > conftest.$ac_ext <<EOF
6190 #line 6191 "configure"
6191 #include "confdefs.h"
6192
6193 int main() {
6194 main()
6195 ; return 0; }
6196 EOF
6197 if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6198   rm -rf conftest*
6199   eval "ac_cv_lib_$ac_lib_var=yes"
6200 else
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   eval "ac_cv_lib_$ac_lib_var=no"
6205 fi
6206 rm -f conftest*
6207 LIBS="$ac_save_LIBS"
6208
6209 fi
6210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6211   echo "$ac_t""yes" 1>&6
6212   have_k4=yes
6213 else
6214   echo "$ac_t""no" 1>&6
6215 have_k4=no
6216 fi
6217
6218
6219                 if test $have_k4 = yes ; then
6220                         ol_with_kerberos=found
6221                         ol_link_krb4=yes
6222
6223                         cat >> confdefs.h <<\EOF
6224 #define HAVE_KRB4 1
6225 EOF
6226
6227
6228                         KRB4_LIBS="-lkrb -ldes"
6229
6230                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6231                                 cat >> confdefs.h <<\EOF
6232 #define HAVE_KTH_KERBEROS 1
6233 EOF
6234
6235                         fi
6236                 fi
6237         fi
6238 fi
6239
6240 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6241         ol_link_kpasswd=yes
6242 fi
6243
6244 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6245         ol_link_kbind=yes
6246
6247 elif test $ol_enable_kbind = yes ; then
6248         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6249 fi
6250
6251 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6252         cat >> confdefs.h <<\EOF
6253 #define HAVE_KERBEROS 1
6254 EOF
6255
6256
6257 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6258         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6259 fi
6260
6261 ol_link_tls=no
6262 if test $ol_with_tls != no ; then
6263         for ac_hdr in openssl/ssl.h ssl.h
6264 do
6265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6267 echo "configure:6268: checking for $ac_hdr" >&5
6268 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6269   echo $ac_n "(cached) $ac_c" 1>&6
6270 else
6271   cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274 #include <$ac_hdr>
6275 EOF
6276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6277 { (eval echo configure:6278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6279 if test -z "$ac_err"; then
6280   rm -rf conftest*
6281   eval "ac_cv_header_$ac_safe=yes"
6282 else
6283   echo "$ac_err" >&5
6284   echo "configure: failed program was:" >&5
6285   cat conftest.$ac_ext >&5
6286   rm -rf conftest*
6287   eval "ac_cv_header_$ac_safe=no"
6288 fi
6289 rm -f conftest*
6290 fi
6291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6292   echo "$ac_t""yes" 1>&6
6293     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6294   cat >> confdefs.h <<EOF
6295 #define $ac_tr_hdr 1
6296 EOF
6297  
6298 else
6299   echo "$ac_t""no" 1>&6
6300 fi
6301 done
6302
6303         
6304         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6305                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6306 echo "configure:6307: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6307 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6309   echo $ac_n "(cached) $ac_c" 1>&6
6310 else
6311   ac_save_LIBS="$LIBS"
6312 LIBS="-lssl -lcrypto $LIBS"
6313 cat > conftest.$ac_ext <<EOF
6314 #line 6315 "configure"
6315 #include "confdefs.h"
6316 /* Override any gcc2 internal prototype to avoid an error.  */
6317 /* We use char because int might match the return type of a gcc2
6318     builtin and then its argument prototype would still apply.  */
6319 char SSLeay_add_ssl_algorithms();
6320
6321 int main() {
6322 SSLeay_add_ssl_algorithms()
6323 ; return 0; }
6324 EOF
6325 if { (eval echo configure:6326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6326   rm -rf conftest*
6327   eval "ac_cv_lib_$ac_lib_var=yes"
6328 else
6329   echo "configure: failed program was:" >&5
6330   cat conftest.$ac_ext >&5
6331   rm -rf conftest*
6332   eval "ac_cv_lib_$ac_lib_var=no"
6333 fi
6334 rm -f conftest*
6335 LIBS="$ac_save_LIBS"
6336
6337 fi
6338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6339   echo "$ac_t""yes" 1>&6
6340   have_ssleay=yes
6341                         need_rsaref=no
6342 else
6343   echo "$ac_t""no" 1>&6
6344 have_ssleay=no
6345 fi
6346
6347                         
6348                 if test $have_ssleay = no ; then
6349                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6350 echo "configure:6351: checking for SSL_library_init in -lssl" >&5
6351 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6352 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6353   echo $ac_n "(cached) $ac_c" 1>&6
6354 else
6355   ac_save_LIBS="$LIBS"
6356 LIBS="-lssl -lcrypto $LIBS"
6357 cat > conftest.$ac_ext <<EOF
6358 #line 6359 "configure"
6359 #include "confdefs.h"
6360 /* Override any gcc2 internal prototype to avoid an error.  */
6361 /* We use char because int might match the return type of a gcc2
6362     builtin and then its argument prototype would still apply.  */
6363 char SSL_library_init();
6364
6365 int main() {
6366 SSL_library_init()
6367 ; return 0; }
6368 EOF
6369 if { (eval echo configure:6370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6370   rm -rf conftest*
6371   eval "ac_cv_lib_$ac_lib_var=yes"
6372 else
6373   echo "configure: failed program was:" >&5
6374   cat conftest.$ac_ext >&5
6375   rm -rf conftest*
6376   eval "ac_cv_lib_$ac_lib_var=no"
6377 fi
6378 rm -f conftest*
6379 LIBS="$ac_save_LIBS"
6380
6381 fi
6382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6383   echo "$ac_t""yes" 1>&6
6384   have_ssleay=yes
6385                                 need_rsaref=no
6386 else
6387   echo "$ac_t""no" 1>&6
6388 have_ssleay=no
6389 fi
6390
6391                 fi
6392
6393                 if test $have_ssleay = no ; then
6394                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6395 echo "configure:6396: checking for ssl3_accept in -lssl" >&5
6396 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6397 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6398   echo $ac_n "(cached) $ac_c" 1>&6
6399 else
6400   ac_save_LIBS="$LIBS"
6401 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6402 cat > conftest.$ac_ext <<EOF
6403 #line 6404 "configure"
6404 #include "confdefs.h"
6405 /* Override any gcc2 internal prototype to avoid an error.  */
6406 /* We use char because int might match the return type of a gcc2
6407     builtin and then its argument prototype would still apply.  */
6408 char ssl3_accept();
6409
6410 int main() {
6411 ssl3_accept()
6412 ; return 0; }
6413 EOF
6414 if { (eval echo configure:6415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6415   rm -rf conftest*
6416   eval "ac_cv_lib_$ac_lib_var=yes"
6417 else
6418   echo "configure: failed program was:" >&5
6419   cat conftest.$ac_ext >&5
6420   rm -rf conftest*
6421   eval "ac_cv_lib_$ac_lib_var=no"
6422 fi
6423 rm -f conftest*
6424 LIBS="$ac_save_LIBS"
6425
6426 fi
6427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6428   echo "$ac_t""yes" 1>&6
6429   have_ssleay=yes
6430                                 need_rsaref=yes
6431 else
6432   echo "$ac_t""no" 1>&6
6433 have_ssleay=no
6434 fi
6435
6436                 fi
6437
6438                 if test $have_ssleay = yes ; then
6439                         ol_with_tls=found
6440                         ol_link_tls=yes
6441
6442                         cat >> confdefs.h <<\EOF
6443 #define HAVE_SSLEAY 1
6444 EOF
6445
6446
6447                         if test $need_rsaref = yes; then
6448                                 cat >> confdefs.h <<\EOF
6449 #define HAVE_RSAREF 1
6450 EOF
6451
6452
6453                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6454                         else
6455                                 TLS_LIBS="-lssl -lcrypto"
6456                         fi
6457                 fi
6458         fi
6459
6460 else
6461         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6462 fi
6463
6464 if test $ol_link_tls = yes ; then
6465         cat >> confdefs.h <<\EOF
6466 #define HAVE_TLS 1
6467 EOF
6468
6469
6470 elif test $ol_with_tls = auto ; then
6471         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6472         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6473
6474 elif test $ol_with_tls != no ; then
6475         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6476 fi
6477
6478 for ac_func in \
6479         ctime_r                 \
6480         gethostbyname_r gethostbyaddr_r \
6481
6482 do
6483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6484 echo "configure:6485: checking for $ac_func" >&5
6485 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6486   echo $ac_n "(cached) $ac_c" 1>&6
6487 else
6488   cat > conftest.$ac_ext <<EOF
6489 #line 6490 "configure"
6490 #include "confdefs.h"
6491 /* System header to define __stub macros and hopefully few prototypes,
6492     which can conflict with char $ac_func(); below.  */
6493 #include <assert.h>
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char $ac_func();
6498 char (*f)();
6499
6500 int main() {
6501
6502 /* The GNU C library defines this for functions which it implements
6503     to always fail with ENOSYS.  Some functions are actually named
6504     something starting with __ and the normal name is an alias.  */
6505 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6506 choke me
6507 #else
6508 f = $ac_func;
6509 #endif
6510
6511 ; return 0; }
6512 EOF
6513 if { (eval echo configure:6514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6514   rm -rf conftest*
6515   eval "ac_cv_func_$ac_func=yes"
6516 else
6517   echo "configure: failed program was:" >&5
6518   cat conftest.$ac_ext >&5
6519   rm -rf conftest*
6520   eval "ac_cv_func_$ac_func=no"
6521 fi
6522 rm -f conftest*
6523 fi
6524
6525 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6526   echo "$ac_t""yes" 1>&6
6527     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6528   cat >> confdefs.h <<EOF
6529 #define $ac_tr_func 1
6530 EOF
6531  
6532 else
6533   echo "$ac_t""no" 1>&6
6534 fi
6535 done
6536
6537
6538 if test "$ac_cv_func_ctime_r" = no ; then
6539         ol_cv_func_ctime_r_nargs=0
6540 else
6541         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6542 echo "configure:6543: checking number of arguments of ctime_r" >&5
6543 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 #include <time.h>
6550 int main() {
6551 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6552 ; return 0; }
6553 EOF
6554 if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6555   rm -rf conftest*
6556   ol_cv_func_ctime_r_nargs3=yes
6557 else
6558   echo "configure: failed program was:" >&5
6559   cat conftest.$ac_ext >&5
6560   rm -rf conftest*
6561   ol_cv_func_ctime_r_nargs3=no
6562 fi
6563 rm -f conftest*
6564
6565         cat > conftest.$ac_ext <<EOF
6566 #line 6567 "configure"
6567 #include "confdefs.h"
6568 #include <time.h>
6569 int main() {
6570 time_t ti; char *buffer; ctime_r(&ti,buffer);
6571 ; return 0; }
6572 EOF
6573 if { (eval echo configure:6574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6574   rm -rf conftest*
6575   ol_cv_func_ctime_r_nargs2=yes
6576 else
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   ol_cv_func_ctime_r_nargs2=no
6581 fi
6582 rm -f conftest*
6583
6584         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6585                 $ol_cv_func_ctime_r_nargs2 = no ; then
6586
6587                 ol_cv_func_ctime_r_nargs=3
6588
6589         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6590                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6591
6592                 ol_cv_func_ctime_r_nargs=2
6593
6594         else
6595                 ol_cv_func_ctime_r_nargs=0
6596         fi
6597   
6598 fi
6599
6600 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6601
6602   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6603         cat >> confdefs.h <<EOF
6604 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6605 EOF
6606
6607   fi
6608
6609 fi
6610
6611 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6612         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6613 echo "configure:6614: checking number of arguments of gethostbyname_r" >&5
6614 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6615   echo $ac_n "(cached) $ac_c" 1>&6
6616 else
6617   cat > conftest.$ac_ext <<EOF
6618 #line 6619 "configure"
6619 #include "confdefs.h"
6620 #include <sys/types.h>
6621 #include <sys/socket.h>
6622 #include <netinet/in.h>
6623 #include <netdb.h>
6624 #define BUFSIZE (sizeof(struct hostent)+10)
6625 int main() {
6626 struct hostent hent; char buffer[BUFSIZE];
6627                 int bufsize=BUFSIZE;int h_errno;
6628                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6629                         buffer, bufsize, &h_errno);
6630 ; return 0; }
6631 EOF
6632 if { (eval echo configure:6633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6633   rm -rf conftest*
6634   ol_cv_func_gethostbyname_r_nargs5=yes
6635 else
6636   echo "configure: failed program was:" >&5
6637   cat conftest.$ac_ext >&5
6638   rm -rf conftest*
6639   ol_cv_func_gethostbyname_r_nargs5=no
6640 fi
6641 rm -f conftest*
6642
6643         cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 #include <sys/types.h>
6647 #include <sys/socket.h>
6648 #include <netinet/in.h>
6649 #include <netdb.h>
6650 #define BUFSIZE (sizeof(struct hostent)+10)
6651 int main() {
6652 struct hostent hent;struct hostent *rhent;
6653                 char buffer[BUFSIZE];
6654                 int bufsize=BUFSIZE;int h_errno;
6655                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6656                         &rhent, &h_errno);
6657 ; return 0; }
6658 EOF
6659 if { (eval echo configure:6660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6660   rm -rf conftest*
6661   ol_cv_func_gethostbyname_r_nargs6=yes
6662 else
6663   echo "configure: failed program was:" >&5
6664   cat conftest.$ac_ext >&5
6665   rm -rf conftest*
6666   ol_cv_func_gethostbyname_r_nargs6=no
6667 fi
6668 rm -f conftest*
6669
6670         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6671                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6672
6673                 ol_cv_func_gethostbyname_r_nargs=5
6674
6675         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6676                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6677
6678                 ol_cv_func_gethostbyname_r_nargs=6
6679
6680         else
6681                 ol_cv_func_gethostbyname_r_nargs=0
6682         fi
6683   
6684 fi
6685
6686 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6687   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6688         cat >> confdefs.h <<EOF
6689 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6690 EOF
6691
6692   fi
6693
6694 else
6695         ol_cv_func_gethostbyname_r_nargs=0
6696 fi
6697  
6698 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6699         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6700 echo "configure:6701: checking number of arguments of gethostbyaddr_r" >&5
6701 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 #include <sys/types.h>
6708 #include <sys/socket.h>
6709 #include <netinet/in.h>
6710 #include <netdb.h>
6711 #define BUFSIZE (sizeof(struct hostent)+10)
6712 int main() {
6713 struct hostent hent; char buffer[BUFSIZE]; 
6714             struct in_addr add;
6715             size_t alen=sizeof(struct in_addr);
6716             int bufsize=BUFSIZE;int h_errno;
6717                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6718                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6722   rm -rf conftest*
6723   ol_cv_func_gethostbyaddr_r_nargs7=yes
6724 else
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727   rm -rf conftest*
6728   ol_cv_func_gethostbyaddr_r_nargs7=no
6729 fi
6730 rm -f conftest*
6731
6732         cat > conftest.$ac_ext <<EOF
6733 #line 6734 "configure"
6734 #include "confdefs.h"
6735 #include <sys/types.h>
6736 #include <sys/socket.h>
6737 #include <netinet/in.h>
6738 #include <netdb.h>
6739 #define BUFSIZE (sizeof(struct hostent)+10)
6740 int main() {
6741 struct hostent hent;
6742                 struct hostent *rhent; char buffer[BUFSIZE]; 
6743                 struct in_addr add;
6744                 size_t alen=sizeof(struct in_addr);
6745                 int bufsize=BUFSIZE;int h_errno;
6746                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6747                         alen, AF_INET, &hent, buffer, bufsize, 
6748                         &rhent, &h_errno);
6749 ; return 0; }
6750 EOF
6751 if { (eval echo configure:6752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6752   rm -rf conftest*
6753   ol_cv_func_gethostbyaddr_r_nargs8=yes
6754 else
6755   echo "configure: failed program was:" >&5
6756   cat conftest.$ac_ext >&5
6757   rm -rf conftest*
6758   ol_cv_func_gethostbyaddr_r_nargs8=no
6759 fi
6760 rm -f conftest*
6761
6762         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6763                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6764
6765                 ol_cv_func_gethostbyaddr_r_nargs=7
6766
6767         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6768                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6769
6770                 ol_cv_func_gethostbyaddr_r_nargs=8
6771
6772         else
6773                 ol_cv_func_gethostbyaddr_r_nargs=0
6774         fi
6775   
6776 fi
6777
6778 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6779   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6780     cat >> confdefs.h <<EOF
6781 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6782 EOF
6783
6784   fi
6785
6786 else
6787         ol_cv_func_gethostbyaddr_r_nargs=0
6788 fi
6789
6790 if test "$ac_cv_func_ctime_r" = yes \
6791         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6792         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6793         -a "$ac_cv_func_gethostbyname_r" = yes \
6794         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6795         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6796         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6797         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6798         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6799         ; then
6800  
6801         cat >> confdefs.h <<\EOF
6802 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6803 EOF
6804
6805 fi
6806
6807 ol_link_threads=no
6808
6809 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6810         -o $ol_with_threads = nt ; then
6811
6812         
6813         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6814 echo "configure:6815: checking for _beginthread" >&5
6815 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6816   echo $ac_n "(cached) $ac_c" 1>&6
6817 else
6818   cat > conftest.$ac_ext <<EOF
6819 #line 6820 "configure"
6820 #include "confdefs.h"
6821 /* System header to define __stub macros and hopefully few prototypes,
6822     which can conflict with char _beginthread(); below.  */
6823 #include <assert.h>
6824 /* Override any gcc2 internal prototype to avoid an error.  */
6825 /* We use char because int might match the return type of a gcc2
6826     builtin and then its argument prototype would still apply.  */
6827 char _beginthread();
6828 char (*f)();
6829
6830 int main() {
6831
6832 /* The GNU C library defines this for functions which it implements
6833     to always fail with ENOSYS.  Some functions are actually named
6834     something starting with __ and the normal name is an alias.  */
6835 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6836 choke me
6837 #else
6838 f = _beginthread;
6839 #endif
6840
6841 ; return 0; }
6842 EOF
6843 if { (eval echo configure:6844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6844   rm -rf conftest*
6845   eval "ac_cv_func__beginthread=yes"
6846 else
6847   echo "configure: failed program was:" >&5
6848   cat conftest.$ac_ext >&5
6849   rm -rf conftest*
6850   eval "ac_cv_func__beginthread=no"
6851 fi
6852 rm -f conftest*
6853 fi
6854
6855 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6856   echo "$ac_t""yes" 1>&6
6857   :
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861
6862
6863         if test $ac_cv_func__beginthread = yes ; then
6864                 cat >> confdefs.h <<\EOF
6865 #define HAVE_NT_THREADS 1
6866 EOF
6867
6868         fi
6869
6870
6871         if test "$ol_cv_nt_threads" = yes ; then
6872         ol_link_threads=nt
6873         ol_with_threads=found
6874         ol_with_yielding_select=yes
6875
6876                 cat >> confdefs.h <<\EOF
6877 #define HAVE_NT_SERVICE_MANAGER 1
6878 EOF
6879
6880                 cat >> confdefs.h <<\EOF
6881 #define HAVE_NT_EVENT_LOG 1
6882 EOF
6883
6884         fi
6885
6886         if test $ol_with_threads = nt ; then
6887                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6888         fi
6889 fi
6890
6891 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6892         -o $ol_with_threads = posix ; then
6893
6894         for ac_hdr in pthread.h
6895 do
6896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6898 echo "configure:6899: checking for $ac_hdr" >&5
6899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6900   echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902   cat > conftest.$ac_ext <<EOF
6903 #line 6904 "configure"
6904 #include "confdefs.h"
6905 #include <$ac_hdr>
6906 EOF
6907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6908 { (eval echo configure:6909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6910 if test -z "$ac_err"; then
6911   rm -rf conftest*
6912   eval "ac_cv_header_$ac_safe=yes"
6913 else
6914   echo "$ac_err" >&5
6915   echo "configure: failed program was:" >&5
6916   cat conftest.$ac_ext >&5
6917   rm -rf conftest*
6918   eval "ac_cv_header_$ac_safe=no"
6919 fi
6920 rm -f conftest*
6921 fi
6922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6923   echo "$ac_t""yes" 1>&6
6924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6925   cat >> confdefs.h <<EOF
6926 #define $ac_tr_hdr 1
6927 EOF
6928  
6929 else
6930   echo "$ac_t""no" 1>&6
6931 fi
6932 done
6933
6934
6935         if test $ac_cv_header_pthread_h = yes ; then
6936                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6937 echo "configure:6938: checking POSIX thread version" >&5
6938 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6939   echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941   
6942         cat > conftest.$ac_ext <<EOF
6943 #line 6944 "configure"
6944 #include "confdefs.h"
6945
6946 #               include <pthread.h>
6947                 /* this check could be improved */
6948 #               ifdef PTHREAD_ONCE_INIT
6949                         pthread_version_final;
6950 #               endif
6951         
6952 EOF
6953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6954   egrep "pthread_version_final" >/dev/null 2>&1; then
6955   rm -rf conftest*
6956   ol_pthread_final=yes
6957 else
6958   rm -rf conftest*
6959   ol_pthread_final=no
6960 fi
6961 rm -f conftest*
6962
6963
6964         cat > conftest.$ac_ext <<EOF
6965 #line 6966 "configure"
6966 #include "confdefs.h"
6967
6968 #               include <pthread.h>
6969                 /* this check could be improved */
6970 #               ifdef pthread_once_init
6971                         pthread_version_draft4;
6972 #               endif
6973         
6974 EOF
6975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6976   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6977   rm -rf conftest*
6978   ol_pthread_draft4=yes
6979 else
6980   rm -rf conftest*
6981   ol_pthread_draft4=no
6982 fi
6983 rm -f conftest*
6984
6985
6986         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6987                 ol_cv_pthread_version=final
6988         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6989                 ol_cv_pthread_version=draft4
6990         else
6991                 ol_cv_pthread_version=unknown
6992         fi
6993
6994 fi
6995
6996 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6997
6998
6999                 if test $ol_cv_pthread_version = final ; then
7000                         cat >> confdefs.h <<\EOF
7001 #define HAVE_PTHREADS_FINAL 1
7002 EOF
7003
7004                 elif test $ol_cv_pthread_version = draft4 ; then
7005                         cat >> confdefs.h <<\EOF
7006 #define HAVE_PTHREADS_D4 1
7007 EOF
7008
7009                 else
7010                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7011                 fi
7012
7013                 # consider threads found
7014                 ol_with_threads=found
7015
7016                 
7017         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7018 echo "configure:7019: checking for LinuxThreads pthread.h" >&5
7019 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7020   echo $ac_n "(cached) $ac_c" 1>&6
7021 else
7022   cat > conftest.$ac_ext <<EOF
7023 #line 7024 "configure"
7024 #include "confdefs.h"
7025 #include <pthread.h>
7026 EOF
7027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7028   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7029   rm -rf conftest*
7030   ol_cv_header_linux_threads=yes
7031 else
7032   rm -rf conftest*
7033   ol_cv_header_linux_threads=no
7034 fi
7035 rm -f conftest*
7036
7037                 
7038 fi
7039
7040 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7041         if test $ol_cv_header_linux_threads = yes; then
7042                 cat >> confdefs.h <<\EOF
7043 #define HAVE_LINUX_THREADS 1
7044 EOF
7045
7046         fi
7047
7048                 
7049         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7050 echo "configure:7051: checking for GNU Pth pthread.h" >&5
7051 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7052   echo $ac_n "(cached) $ac_c" 1>&6
7053 else
7054   cat > conftest.$ac_ext <<EOF
7055 #line 7056 "configure"
7056 #include "confdefs.h"
7057 #include <pthread.h>
7058 #ifdef _POSIX_THREAD_IS_GNU_PTH
7059         __gnu_pth__;
7060 #endif
7061
7062 EOF
7063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7064   egrep "__gnu_pth__" >/dev/null 2>&1; then
7065   rm -rf conftest*
7066   ol_cv_header_gnu_pth_pthread_h=yes
7067 else
7068   rm -rf conftest*
7069   ol_cv_header_gnu_pth_pthread_h=no
7070 fi
7071 rm -f conftest*
7072
7073                 
7074 fi
7075
7076 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7077
7078
7079                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7080                         for ac_hdr in sched.h
7081 do
7082 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7083 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7084 echo "configure:7085: checking for $ac_hdr" >&5
7085 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7086   echo $ac_n "(cached) $ac_c" 1>&6
7087 else
7088   cat > conftest.$ac_ext <<EOF
7089 #line 7090 "configure"
7090 #include "confdefs.h"
7091 #include <$ac_hdr>
7092 EOF
7093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7094 { (eval echo configure:7095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7096 if test -z "$ac_err"; then
7097   rm -rf conftest*
7098   eval "ac_cv_header_$ac_safe=yes"
7099 else
7100   echo "$ac_err" >&5
7101   echo "configure: failed program was:" >&5
7102   cat conftest.$ac_ext >&5
7103   rm -rf conftest*
7104   eval "ac_cv_header_$ac_safe=no"
7105 fi
7106 rm -f conftest*
7107 fi
7108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7109   echo "$ac_t""yes" 1>&6
7110     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7111   cat >> confdefs.h <<EOF
7112 #define $ac_tr_hdr 1
7113 EOF
7114  
7115 else
7116   echo "$ac_t""no" 1>&6
7117 fi
7118 done
7119
7120                 fi
7121
7122                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7123                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7124 echo "configure:7125: checking for pthread_create in default libraries" >&5
7125 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7126   echo $ac_n "(cached) $ac_c" 1>&6
7127 else
7128   
7129                 if test "$cross_compiling" = yes; then
7130   cat > conftest.$ac_ext <<EOF
7131 #line 7132 "configure"
7132 #include "confdefs.h"
7133 /* pthread test headers */
7134 #include <pthread.h>
7135 #ifndef NULL
7136 #define NULL (void*)0
7137 #endif
7138
7139 static void *task(p)
7140         void *p;
7141 {
7142         return (void *) (p == NULL);
7143 }
7144
7145 int main() {
7146
7147         /* pthread test function */
7148         pthread_t t;
7149         int status;
7150 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7151         /* This system (e.g. AIX) defaults detached; must override */
7152         pthread_attr_t attr;
7153
7154         status = pthread_attr_init(&attr);
7155         if( status ) exit( status );
7156
7157         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7158         if( status ) exit( status );
7159
7160 #       define  ATTR    &attr
7161 #elif defined( HAVE_PTHREADS_D4 )
7162 #       define  ATTR    pthread_attr_default
7163 #else
7164 #       define  ATTR    NULL
7165 #endif
7166
7167         /* make sure pthread_create() isn't just a stub */
7168         status = pthread_create(&t, ATTR, task, NULL);
7169         if( status ) exit( status );
7170
7171         /* give the thread a chance to complete...
7172      * it should remain joinable and hence detachable
7173          */
7174         sleep( 1 );
7175
7176         /* make sure pthread_detach() isn't just a stub */
7177 #if HAVE_PTHREADS_D4
7178         status = pthread_detach( &t );
7179 #else
7180         status = pthread_detach( t );
7181 #endif
7182
7183 #ifdef HAVE_LINUX_THREADS
7184         pthread_kill_other_threads_np();
7185 #endif
7186
7187         exit( status );
7188
7189 ; return 0; }
7190 EOF
7191 if { (eval echo configure:7192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7192   rm -rf conftest*
7193   ol_cv_pthread_create=yes
7194 else
7195   echo "configure: failed program was:" >&5
7196   cat conftest.$ac_ext >&5
7197   rm -rf conftest*
7198   ol_cv_pthread_create=no
7199 fi
7200 rm -f conftest*
7201 else
7202   cat > conftest.$ac_ext <<EOF
7203 #line 7204 "configure"
7204 #include "confdefs.h"
7205 /* pthread test headers */
7206 #include <pthread.h>
7207 #ifndef NULL
7208 #define NULL (void*)0
7209 #endif
7210
7211 static void *task(p)
7212         void *p;
7213 {
7214         return (void *) (p == NULL);
7215 }
7216
7217
7218 int main(argc, argv)
7219         int argc;
7220         char **argv;
7221 {
7222
7223         /* pthread test function */
7224         pthread_t t;
7225         int status;
7226 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7227         /* This system (e.g. AIX) defaults detached; must override */
7228         pthread_attr_t attr;
7229
7230         status = pthread_attr_init(&attr);
7231         if( status ) exit( status );
7232
7233         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7234         if( status ) exit( status );
7235
7236 #       define  ATTR    &attr
7237 #elif defined( HAVE_PTHREADS_D4 )
7238 #       define  ATTR    pthread_attr_default
7239 #else
7240 #       define  ATTR    NULL
7241 #endif
7242
7243         /* make sure pthread_create() isn't just a stub */
7244         status = pthread_create(&t, ATTR, task, NULL);
7245         if( status ) exit( status );
7246
7247         /* give the thread a chance to complete...
7248      * it should remain joinable and hence detachable
7249          */
7250         sleep( 1 );
7251
7252         /* make sure pthread_detach() isn't just a stub */
7253 #if HAVE_PTHREADS_D4
7254         status = pthread_detach( &t );
7255 #else
7256         status = pthread_detach( t );
7257 #endif
7258
7259 #ifdef HAVE_LINUX_THREADS
7260         pthread_kill_other_threads_np();
7261 #endif
7262
7263         exit( status );
7264
7265 }
7266
7267 EOF
7268 if { (eval echo configure:7269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7269 then
7270   ol_cv_pthread_create=yes
7271 else
7272   echo "configure: failed program was:" >&5
7273   cat conftest.$ac_ext >&5
7274   rm -fr conftest*
7275   ol_cv_pthread_create=no
7276 fi
7277 rm -fr conftest*
7278 fi
7279
7280 fi
7281
7282 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7283
7284                 if test $ol_cv_pthread_create != no ; then
7285                         ol_link_threads=posix
7286                         ol_link_pthreads=""
7287                 fi
7288                 
7289                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7290 if test "$ol_link_threads" = no ; then
7291         # try -kthread
7292         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7293 echo "configure:7294: checking for pthread link with -kthread" >&5
7294 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7295   echo $ac_n "(cached) $ac_c" 1>&6
7296 else
7297   
7298                 # save the flags
7299                 ol_LIBS="$LIBS"
7300                 LIBS="-kthread $LIBS"
7301
7302                 if test "$cross_compiling" = yes; then
7303   cat > conftest.$ac_ext <<EOF
7304 #line 7305 "configure"
7305 #include "confdefs.h"
7306 /* pthread test headers */
7307 #include <pthread.h>
7308 #ifndef NULL
7309 #define NULL (void*)0
7310 #endif
7311
7312 static void *task(p)
7313         void *p;
7314 {
7315         return (void *) (p == NULL);
7316 }
7317
7318 int main() {
7319
7320         /* pthread test function */
7321         pthread_t t;
7322         int status;
7323 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7324         /* This system (e.g. AIX) defaults detached; must override */
7325         pthread_attr_t attr;
7326
7327         status = pthread_attr_init(&attr);
7328         if( status ) exit( status );
7329
7330         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7331         if( status ) exit( status );
7332
7333 #       define  ATTR    &attr
7334 #elif defined( HAVE_PTHREADS_D4 )
7335 #       define  ATTR    pthread_attr_default
7336 #else
7337 #       define  ATTR    NULL
7338 #endif
7339
7340         /* make sure pthread_create() isn't just a stub */
7341         status = pthread_create(&t, ATTR, task, NULL);
7342         if( status ) exit( status );
7343
7344         /* give the thread a chance to complete...
7345      * it should remain joinable and hence detachable
7346          */
7347         sleep( 1 );
7348
7349         /* make sure pthread_detach() isn't just a stub */
7350 #if HAVE_PTHREADS_D4
7351         status = pthread_detach( &t );
7352 #else
7353         status = pthread_detach( t );
7354 #endif
7355
7356 #ifdef HAVE_LINUX_THREADS
7357         pthread_kill_other_threads_np();
7358 #endif
7359
7360         exit( status );
7361
7362 ; return 0; }
7363 EOF
7364 if { (eval echo configure:7365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7365   rm -rf conftest*
7366   ol_cv_pthread_kthread=yes
7367 else
7368   echo "configure: failed program was:" >&5
7369   cat conftest.$ac_ext >&5
7370   rm -rf conftest*
7371   ol_cv_pthread_kthread=no
7372 fi
7373 rm -f conftest*
7374 else
7375   cat > conftest.$ac_ext <<EOF
7376 #line 7377 "configure"
7377 #include "confdefs.h"
7378 /* pthread test headers */
7379 #include <pthread.h>
7380 #ifndef NULL
7381 #define NULL (void*)0
7382 #endif
7383
7384 static void *task(p)
7385         void *p;
7386 {
7387         return (void *) (p == NULL);
7388 }
7389
7390
7391 int main(argc, argv)
7392         int argc;
7393         char **argv;
7394 {
7395
7396         /* pthread test function */
7397         pthread_t t;
7398         int status;
7399 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7400         /* This system (e.g. AIX) defaults detached; must override */
7401         pthread_attr_t attr;
7402
7403         status = pthread_attr_init(&attr);
7404         if( status ) exit( status );
7405
7406         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7407         if( status ) exit( status );
7408
7409 #       define  ATTR    &attr
7410 #elif defined( HAVE_PTHREADS_D4 )
7411 #       define  ATTR    pthread_attr_default
7412 #else
7413 #       define  ATTR    NULL
7414 #endif
7415
7416         /* make sure pthread_create() isn't just a stub */
7417         status = pthread_create(&t, ATTR, task, NULL);
7418         if( status ) exit( status );
7419
7420         /* give the thread a chance to complete...
7421      * it should remain joinable and hence detachable
7422          */
7423         sleep( 1 );
7424
7425         /* make sure pthread_detach() isn't just a stub */
7426 #if HAVE_PTHREADS_D4
7427         status = pthread_detach( &t );
7428 #else
7429         status = pthread_detach( t );
7430 #endif
7431
7432 #ifdef HAVE_LINUX_THREADS
7433         pthread_kill_other_threads_np();
7434 #endif
7435
7436         exit( status );
7437
7438 }
7439
7440 EOF
7441 if { (eval echo configure:7442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7442 then
7443   ol_cv_pthread_kthread=yes
7444 else
7445   echo "configure: failed program was:" >&5
7446   cat conftest.$ac_ext >&5
7447   rm -fr conftest*
7448   ol_cv_pthread_kthread=no
7449 fi
7450 rm -fr conftest*
7451 fi
7452
7453
7454                 # restore the LIBS
7455                 LIBS="$ol_LIBS"
7456         
7457 fi
7458
7459 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7460
7461         if test $ol_cv_pthread_kthread = yes ; then
7462                 ol_link_pthreads="-kthread"
7463                 ol_link_threads=posix
7464         fi
7465 fi
7466
7467                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7468 if test "$ol_link_threads" = no ; then
7469         # try -pthread
7470         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7471 echo "configure:7472: checking for pthread link with -pthread" >&5
7472 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7473   echo $ac_n "(cached) $ac_c" 1>&6
7474 else
7475   
7476                 # save the flags
7477                 ol_LIBS="$LIBS"
7478                 LIBS="-pthread $LIBS"
7479
7480                 if test "$cross_compiling" = yes; then
7481   cat > conftest.$ac_ext <<EOF
7482 #line 7483 "configure"
7483 #include "confdefs.h"
7484 /* pthread test headers */
7485 #include <pthread.h>
7486 #ifndef NULL
7487 #define NULL (void*)0
7488 #endif
7489
7490 static void *task(p)
7491         void *p;
7492 {
7493         return (void *) (p == NULL);
7494 }
7495
7496 int main() {
7497
7498         /* pthread test function */
7499         pthread_t t;
7500         int status;
7501 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7502         /* This system (e.g. AIX) defaults detached; must override */
7503         pthread_attr_t attr;
7504
7505         status = pthread_attr_init(&attr);
7506         if( status ) exit( status );
7507
7508         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7509         if( status ) exit( status );
7510
7511 #       define  ATTR    &attr
7512 #elif defined( HAVE_PTHREADS_D4 )
7513 #       define  ATTR    pthread_attr_default
7514 #else
7515 #       define  ATTR    NULL
7516 #endif
7517
7518         /* make sure pthread_create() isn't just a stub */
7519         status = pthread_create(&t, ATTR, task, NULL);
7520         if( status ) exit( status );
7521
7522         /* give the thread a chance to complete...
7523      * it should remain joinable and hence detachable
7524          */
7525         sleep( 1 );
7526
7527         /* make sure pthread_detach() isn't just a stub */
7528 #if HAVE_PTHREADS_D4
7529         status = pthread_detach( &t );
7530 #else
7531         status = pthread_detach( t );
7532 #endif
7533
7534 #ifdef HAVE_LINUX_THREADS
7535         pthread_kill_other_threads_np();
7536 #endif
7537
7538         exit( status );
7539
7540 ; return 0; }
7541 EOF
7542 if { (eval echo configure:7543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7543   rm -rf conftest*
7544   ol_cv_pthread_pthread=yes
7545 else
7546   echo "configure: failed program was:" >&5
7547   cat conftest.$ac_ext >&5
7548   rm -rf conftest*
7549   ol_cv_pthread_pthread=no
7550 fi
7551 rm -f conftest*
7552 else
7553   cat > conftest.$ac_ext <<EOF
7554 #line 7555 "configure"
7555 #include "confdefs.h"
7556 /* pthread test headers */
7557 #include <pthread.h>
7558 #ifndef NULL
7559 #define NULL (void*)0
7560 #endif
7561
7562 static void *task(p)
7563         void *p;
7564 {
7565         return (void *) (p == NULL);
7566 }
7567
7568
7569 int main(argc, argv)
7570         int argc;
7571         char **argv;
7572 {
7573
7574         /* pthread test function */
7575         pthread_t t;
7576         int status;
7577 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7578         /* This system (e.g. AIX) defaults detached; must override */
7579         pthread_attr_t attr;
7580
7581         status = pthread_attr_init(&attr);
7582         if( status ) exit( status );
7583
7584         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7585         if( status ) exit( status );
7586
7587 #       define  ATTR    &attr
7588 #elif defined( HAVE_PTHREADS_D4 )
7589 #       define  ATTR    pthread_attr_default
7590 #else
7591 #       define  ATTR    NULL
7592 #endif
7593
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         /* give the thread a chance to complete...
7599      * it should remain joinable and hence detachable
7600          */
7601         sleep( 1 );
7602
7603         /* make sure pthread_detach() isn't just a stub */
7604 #if HAVE_PTHREADS_D4
7605         status = pthread_detach( &t );
7606 #else
7607         status = pthread_detach( t );
7608 #endif
7609
7610 #ifdef HAVE_LINUX_THREADS
7611         pthread_kill_other_threads_np();
7612 #endif
7613
7614         exit( status );
7615
7616 }
7617
7618 EOF
7619 if { (eval echo configure:7620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7620 then
7621   ol_cv_pthread_pthread=yes
7622 else
7623   echo "configure: failed program was:" >&5
7624   cat conftest.$ac_ext >&5
7625   rm -fr conftest*
7626   ol_cv_pthread_pthread=no
7627 fi
7628 rm -fr conftest*
7629 fi
7630
7631
7632                 # restore the LIBS
7633                 LIBS="$ol_LIBS"
7634         
7635 fi
7636
7637 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7638
7639         if test $ol_cv_pthread_pthread = yes ; then
7640                 ol_link_pthreads="-pthread"
7641                 ol_link_threads=posix
7642         fi
7643 fi
7644
7645                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7646 if test "$ol_link_threads" = no ; then
7647         # try -pthreads
7648         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7649 echo "configure:7650: checking for pthread link with -pthreads" >&5
7650 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7651   echo $ac_n "(cached) $ac_c" 1>&6
7652 else
7653   
7654                 # save the flags
7655                 ol_LIBS="$LIBS"
7656                 LIBS="-pthreads $LIBS"
7657
7658                 if test "$cross_compiling" = yes; then
7659   cat > conftest.$ac_ext <<EOF
7660 #line 7661 "configure"
7661 #include "confdefs.h"
7662 /* pthread test headers */
7663 #include <pthread.h>
7664 #ifndef NULL
7665 #define NULL (void*)0
7666 #endif
7667
7668 static void *task(p)
7669         void *p;
7670 {
7671         return (void *) (p == NULL);
7672 }
7673
7674 int main() {
7675
7676         /* pthread test function */
7677         pthread_t t;
7678         int status;
7679 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7680         /* This system (e.g. AIX) defaults detached; must override */
7681         pthread_attr_t attr;
7682
7683         status = pthread_attr_init(&attr);
7684         if( status ) exit( status );
7685
7686         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7687         if( status ) exit( status );
7688
7689 #       define  ATTR    &attr
7690 #elif defined( HAVE_PTHREADS_D4 )
7691 #       define  ATTR    pthread_attr_default
7692 #else
7693 #       define  ATTR    NULL
7694 #endif
7695
7696         /* make sure pthread_create() isn't just a stub */
7697         status = pthread_create(&t, ATTR, task, NULL);
7698         if( status ) exit( status );
7699
7700         /* give the thread a chance to complete...
7701      * it should remain joinable and hence detachable
7702          */
7703         sleep( 1 );
7704
7705         /* make sure pthread_detach() isn't just a stub */
7706 #if HAVE_PTHREADS_D4
7707         status = pthread_detach( &t );
7708 #else
7709         status = pthread_detach( t );
7710 #endif
7711
7712 #ifdef HAVE_LINUX_THREADS
7713         pthread_kill_other_threads_np();
7714 #endif
7715
7716         exit( status );
7717
7718 ; return 0; }
7719 EOF
7720 if { (eval echo configure:7721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7721   rm -rf conftest*
7722   ol_cv_pthread_pthreads=yes
7723 else
7724   echo "configure: failed program was:" >&5
7725   cat conftest.$ac_ext >&5
7726   rm -rf conftest*
7727   ol_cv_pthread_pthreads=no
7728 fi
7729 rm -f conftest*
7730 else
7731   cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734 /* pthread test headers */
7735 #include <pthread.h>
7736 #ifndef NULL
7737 #define NULL (void*)0
7738 #endif
7739
7740 static void *task(p)
7741         void *p;
7742 {
7743         return (void *) (p == NULL);
7744 }
7745
7746
7747 int main(argc, argv)
7748         int argc;
7749         char **argv;
7750 {
7751
7752         /* pthread test function */
7753         pthread_t t;
7754         int status;
7755 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7756         /* This system (e.g. AIX) defaults detached; must override */
7757         pthread_attr_t attr;
7758
7759         status = pthread_attr_init(&attr);
7760         if( status ) exit( status );
7761
7762         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7763         if( status ) exit( status );
7764
7765 #       define  ATTR    &attr
7766 #elif defined( HAVE_PTHREADS_D4 )
7767 #       define  ATTR    pthread_attr_default
7768 #else
7769 #       define  ATTR    NULL
7770 #endif
7771
7772         /* make sure pthread_create() isn't just a stub */
7773         status = pthread_create(&t, ATTR, task, NULL);
7774         if( status ) exit( status );
7775
7776         /* give the thread a chance to complete...
7777      * it should remain joinable and hence detachable
7778          */
7779         sleep( 1 );
7780
7781         /* make sure pthread_detach() isn't just a stub */
7782 #if HAVE_PTHREADS_D4
7783         status = pthread_detach( &t );
7784 #else
7785         status = pthread_detach( t );
7786 #endif
7787
7788 #ifdef HAVE_LINUX_THREADS
7789         pthread_kill_other_threads_np();
7790 #endif
7791
7792         exit( status );
7793
7794 }
7795
7796 EOF
7797 if { (eval echo configure:7798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7798 then
7799   ol_cv_pthread_pthreads=yes
7800 else
7801   echo "configure: failed program was:" >&5
7802   cat conftest.$ac_ext >&5
7803   rm -fr conftest*
7804   ol_cv_pthread_pthreads=no
7805 fi
7806 rm -fr conftest*
7807 fi
7808
7809
7810                 # restore the LIBS
7811                 LIBS="$ol_LIBS"
7812         
7813 fi
7814
7815 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7816
7817         if test $ol_cv_pthread_pthreads = yes ; then
7818                 ol_link_pthreads="-pthreads"
7819                 ol_link_threads=posix
7820         fi
7821 fi
7822
7823                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7824 if test "$ol_link_threads" = no ; then
7825         # try -mthreads
7826         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7827 echo "configure:7828: checking for pthread link with -mthreads" >&5
7828 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7829   echo $ac_n "(cached) $ac_c" 1>&6
7830 else
7831   
7832                 # save the flags
7833                 ol_LIBS="$LIBS"
7834                 LIBS="-mthreads $LIBS"
7835
7836                 if test "$cross_compiling" = yes; then
7837   cat > conftest.$ac_ext <<EOF
7838 #line 7839 "configure"
7839 #include "confdefs.h"
7840 /* pthread test headers */
7841 #include <pthread.h>
7842 #ifndef NULL
7843 #define NULL (void*)0
7844 #endif
7845
7846 static void *task(p)
7847         void *p;
7848 {
7849         return (void *) (p == NULL);
7850 }
7851
7852 int main() {
7853
7854         /* pthread test function */
7855         pthread_t t;
7856         int status;
7857 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7858         /* This system (e.g. AIX) defaults detached; must override */
7859         pthread_attr_t attr;
7860
7861         status = pthread_attr_init(&attr);
7862         if( status ) exit( status );
7863
7864         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7865         if( status ) exit( status );
7866
7867 #       define  ATTR    &attr
7868 #elif defined( HAVE_PTHREADS_D4 )
7869 #       define  ATTR    pthread_attr_default
7870 #else
7871 #       define  ATTR    NULL
7872 #endif
7873
7874         /* make sure pthread_create() isn't just a stub */
7875         status = pthread_create(&t, ATTR, task, NULL);
7876         if( status ) exit( status );
7877
7878         /* give the thread a chance to complete...
7879      * it should remain joinable and hence detachable
7880          */
7881         sleep( 1 );
7882
7883         /* make sure pthread_detach() isn't just a stub */
7884 #if HAVE_PTHREADS_D4
7885         status = pthread_detach( &t );
7886 #else
7887         status = pthread_detach( t );
7888 #endif
7889
7890 #ifdef HAVE_LINUX_THREADS
7891         pthread_kill_other_threads_np();
7892 #endif
7893
7894         exit( status );
7895
7896 ; return 0; }
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7899   rm -rf conftest*
7900   ol_cv_pthread_mthreads=yes
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   ol_cv_pthread_mthreads=no
7906 fi
7907 rm -f conftest*
7908 else
7909   cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 /* pthread test headers */
7913 #include <pthread.h>
7914 #ifndef NULL
7915 #define NULL (void*)0
7916 #endif
7917
7918 static void *task(p)
7919         void *p;
7920 {
7921         return (void *) (p == NULL);
7922 }
7923
7924
7925 int main(argc, argv)
7926         int argc;
7927         char **argv;
7928 {
7929
7930         /* pthread test function */
7931         pthread_t t;
7932         int status;
7933 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7934         /* This system (e.g. AIX) defaults detached; must override */
7935         pthread_attr_t attr;
7936
7937         status = pthread_attr_init(&attr);
7938         if( status ) exit( status );
7939
7940         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7941         if( status ) exit( status );
7942
7943 #       define  ATTR    &attr
7944 #elif defined( HAVE_PTHREADS_D4 )
7945 #       define  ATTR    pthread_attr_default
7946 #else
7947 #       define  ATTR    NULL
7948 #endif
7949
7950         /* make sure pthread_create() isn't just a stub */
7951         status = pthread_create(&t, ATTR, task, NULL);
7952         if( status ) exit( status );
7953
7954         /* give the thread a chance to complete...
7955      * it should remain joinable and hence detachable
7956          */
7957         sleep( 1 );
7958
7959         /* make sure pthread_detach() isn't just a stub */
7960 #if HAVE_PTHREADS_D4
7961         status = pthread_detach( &t );
7962 #else
7963         status = pthread_detach( t );
7964 #endif
7965
7966 #ifdef HAVE_LINUX_THREADS
7967         pthread_kill_other_threads_np();
7968 #endif
7969
7970         exit( status );
7971
7972 }
7973
7974 EOF
7975 if { (eval echo configure:7976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7976 then
7977   ol_cv_pthread_mthreads=yes
7978 else
7979   echo "configure: failed program was:" >&5
7980   cat conftest.$ac_ext >&5
7981   rm -fr conftest*
7982   ol_cv_pthread_mthreads=no
7983 fi
7984 rm -fr conftest*
7985 fi
7986
7987
7988                 # restore the LIBS
7989                 LIBS="$ol_LIBS"
7990         
7991 fi
7992
7993 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7994
7995         if test $ol_cv_pthread_mthreads = yes ; then
7996                 ol_link_pthreads="-mthreads"
7997                 ol_link_threads=posix
7998         fi
7999 fi
8000
8001                 # Pthread try link: -thread (ol_cv_pthread_thread)
8002 if test "$ol_link_threads" = no ; then
8003         # try -thread
8004         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8005 echo "configure:8006: checking for pthread link with -thread" >&5
8006 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8007   echo $ac_n "(cached) $ac_c" 1>&6
8008 else
8009   
8010                 # save the flags
8011                 ol_LIBS="$LIBS"
8012                 LIBS="-thread $LIBS"
8013
8014                 if test "$cross_compiling" = yes; then
8015   cat > conftest.$ac_ext <<EOF
8016 #line 8017 "configure"
8017 #include "confdefs.h"
8018 /* pthread test headers */
8019 #include <pthread.h>
8020 #ifndef NULL
8021 #define NULL (void*)0
8022 #endif
8023
8024 static void *task(p)
8025         void *p;
8026 {
8027         return (void *) (p == NULL);
8028 }
8029
8030 int main() {
8031
8032         /* pthread test function */
8033         pthread_t t;
8034         int status;
8035 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8036         /* This system (e.g. AIX) defaults detached; must override */
8037         pthread_attr_t attr;
8038
8039         status = pthread_attr_init(&attr);
8040         if( status ) exit( status );
8041
8042         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8043         if( status ) exit( status );
8044
8045 #       define  ATTR    &attr
8046 #elif defined( HAVE_PTHREADS_D4 )
8047 #       define  ATTR    pthread_attr_default
8048 #else
8049 #       define  ATTR    NULL
8050 #endif
8051
8052         /* make sure pthread_create() isn't just a stub */
8053         status = pthread_create(&t, ATTR, task, NULL);
8054         if( status ) exit( status );
8055
8056         /* give the thread a chance to complete...
8057      * it should remain joinable and hence detachable
8058          */
8059         sleep( 1 );
8060
8061         /* make sure pthread_detach() isn't just a stub */
8062 #if HAVE_PTHREADS_D4
8063         status = pthread_detach( &t );
8064 #else
8065         status = pthread_detach( t );
8066 #endif
8067
8068 #ifdef HAVE_LINUX_THREADS
8069         pthread_kill_other_threads_np();
8070 #endif
8071
8072         exit( status );
8073
8074 ; return 0; }
8075 EOF
8076 if { (eval echo configure:8077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8077   rm -rf conftest*
8078   ol_cv_pthread_thread=yes
8079 else
8080   echo "configure: failed program was:" >&5
8081   cat conftest.$ac_ext >&5
8082   rm -rf conftest*
8083   ol_cv_pthread_thread=no
8084 fi
8085 rm -f conftest*
8086 else
8087   cat > conftest.$ac_ext <<EOF
8088 #line 8089 "configure"
8089 #include "confdefs.h"
8090 /* pthread test headers */
8091 #include <pthread.h>
8092 #ifndef NULL
8093 #define NULL (void*)0
8094 #endif
8095
8096 static void *task(p)
8097         void *p;
8098 {
8099         return (void *) (p == NULL);
8100 }
8101
8102
8103 int main(argc, argv)
8104         int argc;
8105         char **argv;
8106 {
8107
8108         /* pthread test function */
8109         pthread_t t;
8110         int status;
8111 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8112         /* This system (e.g. AIX) defaults detached; must override */
8113         pthread_attr_t attr;
8114
8115         status = pthread_attr_init(&attr);
8116         if( status ) exit( status );
8117
8118         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8119         if( status ) exit( status );
8120
8121 #       define  ATTR    &attr
8122 #elif defined( HAVE_PTHREADS_D4 )
8123 #       define  ATTR    pthread_attr_default
8124 #else
8125 #       define  ATTR    NULL
8126 #endif
8127
8128         /* make sure pthread_create() isn't just a stub */
8129         status = pthread_create(&t, ATTR, task, NULL);
8130         if( status ) exit( status );
8131
8132         /* give the thread a chance to complete...
8133      * it should remain joinable and hence detachable
8134          */
8135         sleep( 1 );
8136
8137         /* make sure pthread_detach() isn't just a stub */
8138 #if HAVE_PTHREADS_D4
8139         status = pthread_detach( &t );
8140 #else
8141         status = pthread_detach( t );
8142 #endif
8143
8144 #ifdef HAVE_LINUX_THREADS
8145         pthread_kill_other_threads_np();
8146 #endif
8147
8148         exit( status );
8149
8150 }
8151
8152 EOF
8153 if { (eval echo configure:8154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8154 then
8155   ol_cv_pthread_thread=yes
8156 else
8157   echo "configure: failed program was:" >&5
8158   cat conftest.$ac_ext >&5
8159   rm -fr conftest*
8160   ol_cv_pthread_thread=no
8161 fi
8162 rm -fr conftest*
8163 fi
8164
8165
8166                 # restore the LIBS
8167                 LIBS="$ol_LIBS"
8168         
8169 fi
8170
8171 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8172
8173         if test $ol_cv_pthread_thread = yes ; then
8174                 ol_link_pthreads="-thread"
8175                 ol_link_threads=posix
8176         fi
8177 fi
8178
8179
8180                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8181 if test "$ol_link_threads" = no ; then
8182         # try -lpthread -lmach -lexc -lc_r
8183         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8184 echo "configure:8185: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8185 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8186   echo $ac_n "(cached) $ac_c" 1>&6
8187 else
8188   
8189                 # save the flags
8190                 ol_LIBS="$LIBS"
8191                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8192
8193                 if test "$cross_compiling" = yes; then
8194   cat > conftest.$ac_ext <<EOF
8195 #line 8196 "configure"
8196 #include "confdefs.h"
8197 /* pthread test headers */
8198 #include <pthread.h>
8199 #ifndef NULL
8200 #define NULL (void*)0
8201 #endif
8202
8203 static void *task(p)
8204         void *p;
8205 {
8206         return (void *) (p == NULL);
8207 }
8208
8209 int main() {
8210
8211         /* pthread test function */
8212         pthread_t t;
8213         int status;
8214 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8215         /* This system (e.g. AIX) defaults detached; must override */
8216         pthread_attr_t attr;
8217
8218         status = pthread_attr_init(&attr);
8219         if( status ) exit( status );
8220
8221         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8222         if( status ) exit( status );
8223
8224 #       define  ATTR    &attr
8225 #elif defined( HAVE_PTHREADS_D4 )
8226 #       define  ATTR    pthread_attr_default
8227 #else
8228 #       define  ATTR    NULL
8229 #endif
8230
8231         /* make sure pthread_create() isn't just a stub */
8232         status = pthread_create(&t, ATTR, task, NULL);
8233         if( status ) exit( status );
8234
8235         /* give the thread a chance to complete...
8236      * it should remain joinable and hence detachable
8237          */
8238         sleep( 1 );
8239
8240         /* make sure pthread_detach() isn't just a stub */
8241 #if HAVE_PTHREADS_D4
8242         status = pthread_detach( &t );
8243 #else
8244         status = pthread_detach( t );
8245 #endif
8246
8247 #ifdef HAVE_LINUX_THREADS
8248         pthread_kill_other_threads_np();
8249 #endif
8250
8251         exit( status );
8252
8253 ; return 0; }
8254 EOF
8255 if { (eval echo configure:8256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8256   rm -rf conftest*
8257   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8258 else
8259   echo "configure: failed program was:" >&5
8260   cat conftest.$ac_ext >&5
8261   rm -rf conftest*
8262   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8263 fi
8264 rm -f conftest*
8265 else
8266   cat > conftest.$ac_ext <<EOF
8267 #line 8268 "configure"
8268 #include "confdefs.h"
8269 /* pthread test headers */
8270 #include <pthread.h>
8271 #ifndef NULL
8272 #define NULL (void*)0
8273 #endif
8274
8275 static void *task(p)
8276         void *p;
8277 {
8278         return (void *) (p == NULL);
8279 }
8280
8281
8282 int main(argc, argv)
8283         int argc;
8284         char **argv;
8285 {
8286
8287         /* pthread test function */
8288         pthread_t t;
8289         int status;
8290 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8291         /* This system (e.g. AIX) defaults detached; must override */
8292         pthread_attr_t attr;
8293
8294         status = pthread_attr_init(&attr);
8295         if( status ) exit( status );
8296
8297         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8298         if( status ) exit( status );
8299
8300 #       define  ATTR    &attr
8301 #elif defined( HAVE_PTHREADS_D4 )
8302 #       define  ATTR    pthread_attr_default
8303 #else
8304 #       define  ATTR    NULL
8305 #endif
8306
8307         /* make sure pthread_create() isn't just a stub */
8308         status = pthread_create(&t, ATTR, task, NULL);
8309         if( status ) exit( status );
8310
8311         /* give the thread a chance to complete...
8312      * it should remain joinable and hence detachable
8313          */
8314         sleep( 1 );
8315
8316         /* make sure pthread_detach() isn't just a stub */
8317 #if HAVE_PTHREADS_D4
8318         status = pthread_detach( &t );
8319 #else
8320         status = pthread_detach( t );
8321 #endif
8322
8323 #ifdef HAVE_LINUX_THREADS
8324         pthread_kill_other_threads_np();
8325 #endif
8326
8327         exit( status );
8328
8329 }
8330
8331 EOF
8332 if { (eval echo configure:8333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8333 then
8334   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8335 else
8336   echo "configure: failed program was:" >&5
8337   cat conftest.$ac_ext >&5
8338   rm -fr conftest*
8339   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8340 fi
8341 rm -fr conftest*
8342 fi
8343
8344
8345                 # restore the LIBS
8346                 LIBS="$ol_LIBS"
8347         
8348 fi
8349
8350 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8351
8352         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8353                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8354                 ol_link_threads=posix
8355         fi
8356 fi
8357
8358                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8359 if test "$ol_link_threads" = no ; then
8360         # try -lpthread -lmach -lexc
8361         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8362 echo "configure:8363: checking for pthread link with -lpthread -lmach -lexc" >&5
8363 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8364   echo $ac_n "(cached) $ac_c" 1>&6
8365 else
8366   
8367                 # save the flags
8368                 ol_LIBS="$LIBS"
8369                 LIBS="-lpthread -lmach -lexc $LIBS"
8370
8371                 if test "$cross_compiling" = yes; then
8372   cat > conftest.$ac_ext <<EOF
8373 #line 8374 "configure"
8374 #include "confdefs.h"
8375 /* pthread test headers */
8376 #include <pthread.h>
8377 #ifndef NULL
8378 #define NULL (void*)0
8379 #endif
8380
8381 static void *task(p)
8382         void *p;
8383 {
8384         return (void *) (p == NULL);
8385 }
8386
8387 int main() {
8388
8389         /* pthread test function */
8390         pthread_t t;
8391         int status;
8392 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8393         /* This system (e.g. AIX) defaults detached; must override */
8394         pthread_attr_t attr;
8395
8396         status = pthread_attr_init(&attr);
8397         if( status ) exit( status );
8398
8399         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8400         if( status ) exit( status );
8401
8402 #       define  ATTR    &attr
8403 #elif defined( HAVE_PTHREADS_D4 )
8404 #       define  ATTR    pthread_attr_default
8405 #else
8406 #       define  ATTR    NULL
8407 #endif
8408
8409         /* make sure pthread_create() isn't just a stub */
8410         status = pthread_create(&t, ATTR, task, NULL);
8411         if( status ) exit( status );
8412
8413         /* give the thread a chance to complete...
8414      * it should remain joinable and hence detachable
8415          */
8416         sleep( 1 );
8417
8418         /* make sure pthread_detach() isn't just a stub */
8419 #if HAVE_PTHREADS_D4
8420         status = pthread_detach( &t );
8421 #else
8422         status = pthread_detach( t );
8423 #endif
8424
8425 #ifdef HAVE_LINUX_THREADS
8426         pthread_kill_other_threads_np();
8427 #endif
8428
8429         exit( status );
8430
8431 ; return 0; }
8432 EOF
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8434   rm -rf conftest*
8435   ol_cv_pthread_lpthread_lmach_lexc=yes
8436 else
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   ol_cv_pthread_lpthread_lmach_lexc=no
8441 fi
8442 rm -f conftest*
8443 else
8444   cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 /* pthread test headers */
8448 #include <pthread.h>
8449 #ifndef NULL
8450 #define NULL (void*)0
8451 #endif
8452
8453 static void *task(p)
8454         void *p;
8455 {
8456         return (void *) (p == NULL);
8457 }
8458
8459
8460 int main(argc, argv)
8461         int argc;
8462         char **argv;
8463 {
8464
8465         /* pthread test function */
8466         pthread_t t;
8467         int status;
8468 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8469         /* This system (e.g. AIX) defaults detached; must override */
8470         pthread_attr_t attr;
8471
8472         status = pthread_attr_init(&attr);
8473         if( status ) exit( status );
8474
8475         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8476         if( status ) exit( status );
8477
8478 #       define  ATTR    &attr
8479 #elif defined( HAVE_PTHREADS_D4 )
8480 #       define  ATTR    pthread_attr_default
8481 #else
8482 #       define  ATTR    NULL
8483 #endif
8484
8485         /* make sure pthread_create() isn't just a stub */
8486         status = pthread_create(&t, ATTR, task, NULL);
8487         if( status ) exit( status );
8488
8489         /* give the thread a chance to complete...
8490      * it should remain joinable and hence detachable
8491          */
8492         sleep( 1 );
8493
8494         /* make sure pthread_detach() isn't just a stub */
8495 #if HAVE_PTHREADS_D4
8496         status = pthread_detach( &t );
8497 #else
8498         status = pthread_detach( t );
8499 #endif
8500
8501 #ifdef HAVE_LINUX_THREADS
8502         pthread_kill_other_threads_np();
8503 #endif
8504
8505         exit( status );
8506
8507 }
8508
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8511 then
8512   ol_cv_pthread_lpthread_lmach_lexc=yes
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -fr conftest*
8517   ol_cv_pthread_lpthread_lmach_lexc=no
8518 fi
8519 rm -fr conftest*
8520 fi
8521
8522
8523                 # restore the LIBS
8524                 LIBS="$ol_LIBS"
8525         
8526 fi
8527
8528 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8529
8530         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8531                 ol_link_pthreads="-lpthread -lmach -lexc"
8532                 ol_link_threads=posix
8533         fi
8534 fi
8535
8536
8537                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8538 if test "$ol_link_threads" = no ; then
8539         # try -lpthread -Wl,-woff,85
8540         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8541 echo "configure:8542: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8542 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8543   echo $ac_n "(cached) $ac_c" 1>&6
8544 else
8545   
8546                 # save the flags
8547                 ol_LIBS="$LIBS"
8548                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8549
8550                 if test "$cross_compiling" = yes; then
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* pthread test headers */
8555 #include <pthread.h>
8556 #ifndef NULL
8557 #define NULL (void*)0
8558 #endif
8559
8560 static void *task(p)
8561         void *p;
8562 {
8563         return (void *) (p == NULL);
8564 }
8565
8566 int main() {
8567
8568         /* pthread test function */
8569         pthread_t t;
8570         int status;
8571 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8572         /* This system (e.g. AIX) defaults detached; must override */
8573         pthread_attr_t attr;
8574
8575         status = pthread_attr_init(&attr);
8576         if( status ) exit( status );
8577
8578         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8579         if( status ) exit( status );
8580
8581 #       define  ATTR    &attr
8582 #elif defined( HAVE_PTHREADS_D4 )
8583 #       define  ATTR    pthread_attr_default
8584 #else
8585 #       define  ATTR    NULL
8586 #endif
8587
8588         /* make sure pthread_create() isn't just a stub */
8589         status = pthread_create(&t, ATTR, task, NULL);
8590         if( status ) exit( status );
8591
8592         /* give the thread a chance to complete...
8593      * it should remain joinable and hence detachable
8594          */
8595         sleep( 1 );
8596
8597         /* make sure pthread_detach() isn't just a stub */
8598 #if HAVE_PTHREADS_D4
8599         status = pthread_detach( &t );
8600 #else
8601         status = pthread_detach( t );
8602 #endif
8603
8604 #ifdef HAVE_LINUX_THREADS
8605         pthread_kill_other_threads_np();
8606 #endif
8607
8608         exit( status );
8609
8610 ; return 0; }
8611 EOF
8612 if { (eval echo configure:8613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8613   rm -rf conftest*
8614   ol_cv_pthread_lib_lpthread_woff=yes
8615 else
8616   echo "configure: failed program was:" >&5
8617   cat conftest.$ac_ext >&5
8618   rm -rf conftest*
8619   ol_cv_pthread_lib_lpthread_woff=no
8620 fi
8621 rm -f conftest*
8622 else
8623   cat > conftest.$ac_ext <<EOF
8624 #line 8625 "configure"
8625 #include "confdefs.h"
8626 /* pthread test headers */
8627 #include <pthread.h>
8628 #ifndef NULL
8629 #define NULL (void*)0
8630 #endif
8631
8632 static void *task(p)
8633         void *p;
8634 {
8635         return (void *) (p == NULL);
8636 }
8637
8638
8639 int main(argc, argv)
8640         int argc;
8641         char **argv;
8642 {
8643
8644         /* pthread test function */
8645         pthread_t t;
8646         int status;
8647 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8648         /* This system (e.g. AIX) defaults detached; must override */
8649         pthread_attr_t attr;
8650
8651         status = pthread_attr_init(&attr);
8652         if( status ) exit( status );
8653
8654         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8655         if( status ) exit( status );
8656
8657 #       define  ATTR    &attr
8658 #elif defined( HAVE_PTHREADS_D4 )
8659 #       define  ATTR    pthread_attr_default
8660 #else
8661 #       define  ATTR    NULL
8662 #endif
8663
8664         /* make sure pthread_create() isn't just a stub */
8665         status = pthread_create(&t, ATTR, task, NULL);
8666         if( status ) exit( status );
8667
8668         /* give the thread a chance to complete...
8669      * it should remain joinable and hence detachable
8670          */
8671         sleep( 1 );
8672
8673         /* make sure pthread_detach() isn't just a stub */
8674 #if HAVE_PTHREADS_D4
8675         status = pthread_detach( &t );
8676 #else
8677         status = pthread_detach( t );
8678 #endif
8679
8680 #ifdef HAVE_LINUX_THREADS
8681         pthread_kill_other_threads_np();
8682 #endif
8683
8684         exit( status );
8685
8686 }
8687
8688 EOF
8689 if { (eval echo configure:8690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8690 then
8691   ol_cv_pthread_lib_lpthread_woff=yes
8692 else
8693   echo "configure: failed program was:" >&5
8694   cat conftest.$ac_ext >&5
8695   rm -fr conftest*
8696   ol_cv_pthread_lib_lpthread_woff=no
8697 fi
8698 rm -fr conftest*
8699 fi
8700
8701
8702                 # restore the LIBS
8703                 LIBS="$ol_LIBS"
8704         
8705 fi
8706
8707 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8708
8709         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8710                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8711                 ol_link_threads=posix
8712         fi
8713 fi
8714
8715
8716                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8717 if test "$ol_link_threads" = no ; then
8718         # try -lpthread
8719         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8720 echo "configure:8721: checking for pthread link with -lpthread" >&5
8721 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8722   echo $ac_n "(cached) $ac_c" 1>&6
8723 else
8724   
8725                 # save the flags
8726                 ol_LIBS="$LIBS"
8727                 LIBS="-lpthread $LIBS"
8728
8729                 if test "$cross_compiling" = yes; then
8730   cat > conftest.$ac_ext <<EOF
8731 #line 8732 "configure"
8732 #include "confdefs.h"
8733 /* pthread test headers */
8734 #include <pthread.h>
8735 #ifndef NULL
8736 #define NULL (void*)0
8737 #endif
8738
8739 static void *task(p)
8740         void *p;
8741 {
8742         return (void *) (p == NULL);
8743 }
8744
8745 int main() {
8746
8747         /* pthread test function */
8748         pthread_t t;
8749         int status;
8750 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8751         /* This system (e.g. AIX) defaults detached; must override */
8752         pthread_attr_t attr;
8753
8754         status = pthread_attr_init(&attr);
8755         if( status ) exit( status );
8756
8757         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8758         if( status ) exit( status );
8759
8760 #       define  ATTR    &attr
8761 #elif defined( HAVE_PTHREADS_D4 )
8762 #       define  ATTR    pthread_attr_default
8763 #else
8764 #       define  ATTR    NULL
8765 #endif
8766
8767         /* make sure pthread_create() isn't just a stub */
8768         status = pthread_create(&t, ATTR, task, NULL);
8769         if( status ) exit( status );
8770
8771         /* give the thread a chance to complete...
8772      * it should remain joinable and hence detachable
8773          */
8774         sleep( 1 );
8775
8776         /* make sure pthread_detach() isn't just a stub */
8777 #if HAVE_PTHREADS_D4
8778         status = pthread_detach( &t );
8779 #else
8780         status = pthread_detach( t );
8781 #endif
8782
8783 #ifdef HAVE_LINUX_THREADS
8784         pthread_kill_other_threads_np();
8785 #endif
8786
8787         exit( status );
8788
8789 ; return 0; }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8792   rm -rf conftest*
8793   ol_cv_pthread_lpthread=yes
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -rf conftest*
8798   ol_cv_pthread_lpthread=no
8799 fi
8800 rm -f conftest*
8801 else
8802   cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 /* pthread test headers */
8806 #include <pthread.h>
8807 #ifndef NULL
8808 #define NULL (void*)0
8809 #endif
8810
8811 static void *task(p)
8812         void *p;
8813 {
8814         return (void *) (p == NULL);
8815 }
8816
8817
8818 int main(argc, argv)
8819         int argc;
8820         char **argv;
8821 {
8822
8823         /* pthread test function */
8824         pthread_t t;
8825         int status;
8826 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8827         /* This system (e.g. AIX) defaults detached; must override */
8828         pthread_attr_t attr;
8829
8830         status = pthread_attr_init(&attr);
8831         if( status ) exit( status );
8832
8833         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8834         if( status ) exit( status );
8835
8836 #       define  ATTR    &attr
8837 #elif defined( HAVE_PTHREADS_D4 )
8838 #       define  ATTR    pthread_attr_default
8839 #else
8840 #       define  ATTR    NULL
8841 #endif
8842
8843         /* make sure pthread_create() isn't just a stub */
8844         status = pthread_create(&t, ATTR, task, NULL);
8845         if( status ) exit( status );
8846
8847         /* give the thread a chance to complete...
8848      * it should remain joinable and hence detachable
8849          */
8850         sleep( 1 );
8851
8852         /* make sure pthread_detach() isn't just a stub */
8853 #if HAVE_PTHREADS_D4
8854         status = pthread_detach( &t );
8855 #else
8856         status = pthread_detach( t );
8857 #endif
8858
8859 #ifdef HAVE_LINUX_THREADS
8860         pthread_kill_other_threads_np();
8861 #endif
8862
8863         exit( status );
8864
8865 }
8866
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8869 then
8870   ol_cv_pthread_lpthread=yes
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -fr conftest*
8875   ol_cv_pthread_lpthread=no
8876 fi
8877 rm -fr conftest*
8878 fi
8879
8880
8881                 # restore the LIBS
8882                 LIBS="$ol_LIBS"
8883         
8884 fi
8885
8886 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8887
8888         if test $ol_cv_pthread_lpthread = yes ; then
8889                 ol_link_pthreads="-lpthread"
8890                 ol_link_threads=posix
8891         fi
8892 fi
8893
8894                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8895 if test "$ol_link_threads" = no ; then
8896         # try -lc_r
8897         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8898 echo "configure:8899: checking for pthread link with -lc_r" >&5
8899 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   
8903                 # save the flags
8904                 ol_LIBS="$LIBS"
8905                 LIBS="-lc_r $LIBS"
8906
8907                 if test "$cross_compiling" = yes; then
8908   cat > conftest.$ac_ext <<EOF
8909 #line 8910 "configure"
8910 #include "confdefs.h"
8911 /* pthread test headers */
8912 #include <pthread.h>
8913 #ifndef NULL
8914 #define NULL (void*)0
8915 #endif
8916
8917 static void *task(p)
8918         void *p;
8919 {
8920         return (void *) (p == NULL);
8921 }
8922
8923 int main() {
8924
8925         /* pthread test function */
8926         pthread_t t;
8927         int status;
8928 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8929         /* This system (e.g. AIX) defaults detached; must override */
8930         pthread_attr_t attr;
8931
8932         status = pthread_attr_init(&attr);
8933         if( status ) exit( status );
8934
8935         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8936         if( status ) exit( status );
8937
8938 #       define  ATTR    &attr
8939 #elif defined( HAVE_PTHREADS_D4 )
8940 #       define  ATTR    pthread_attr_default
8941 #else
8942 #       define  ATTR    NULL
8943 #endif
8944
8945         /* make sure pthread_create() isn't just a stub */
8946         status = pthread_create(&t, ATTR, task, NULL);
8947         if( status ) exit( status );
8948
8949         /* give the thread a chance to complete...
8950      * it should remain joinable and hence detachable
8951          */
8952         sleep( 1 );
8953
8954         /* make sure pthread_detach() isn't just a stub */
8955 #if HAVE_PTHREADS_D4
8956         status = pthread_detach( &t );
8957 #else
8958         status = pthread_detach( t );
8959 #endif
8960
8961 #ifdef HAVE_LINUX_THREADS
8962         pthread_kill_other_threads_np();
8963 #endif
8964
8965         exit( status );
8966
8967 ; return 0; }
8968 EOF
8969 if { (eval echo configure:8970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8970   rm -rf conftest*
8971   ol_cv_pthread_lc_r=yes
8972 else
8973   echo "configure: failed program was:" >&5
8974   cat conftest.$ac_ext >&5
8975   rm -rf conftest*
8976   ol_cv_pthread_lc_r=no
8977 fi
8978 rm -f conftest*
8979 else
8980   cat > conftest.$ac_ext <<EOF
8981 #line 8982 "configure"
8982 #include "confdefs.h"
8983 /* pthread test headers */
8984 #include <pthread.h>
8985 #ifndef NULL
8986 #define NULL (void*)0
8987 #endif
8988
8989 static void *task(p)
8990         void *p;
8991 {
8992         return (void *) (p == NULL);
8993 }
8994
8995
8996 int main(argc, argv)
8997         int argc;
8998         char **argv;
8999 {
9000
9001         /* pthread test function */
9002         pthread_t t;
9003         int status;
9004 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9005         /* This system (e.g. AIX) defaults detached; must override */
9006         pthread_attr_t attr;
9007
9008         status = pthread_attr_init(&attr);
9009         if( status ) exit( status );
9010
9011         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9012         if( status ) exit( status );
9013
9014 #       define  ATTR    &attr
9015 #elif defined( HAVE_PTHREADS_D4 )
9016 #       define  ATTR    pthread_attr_default
9017 #else
9018 #       define  ATTR    NULL
9019 #endif
9020
9021         /* make sure pthread_create() isn't just a stub */
9022         status = pthread_create(&t, ATTR, task, NULL);
9023         if( status ) exit( status );
9024
9025         /* give the thread a chance to complete...
9026      * it should remain joinable and hence detachable
9027          */
9028         sleep( 1 );
9029
9030         /* make sure pthread_detach() isn't just a stub */
9031 #if HAVE_PTHREADS_D4
9032         status = pthread_detach( &t );
9033 #else
9034         status = pthread_detach( t );
9035 #endif
9036
9037 #ifdef HAVE_LINUX_THREADS
9038         pthread_kill_other_threads_np();
9039 #endif
9040
9041         exit( status );
9042
9043 }
9044
9045 EOF
9046 if { (eval echo configure:9047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9047 then
9048   ol_cv_pthread_lc_r=yes
9049 else
9050   echo "configure: failed program was:" >&5
9051   cat conftest.$ac_ext >&5
9052   rm -fr conftest*
9053   ol_cv_pthread_lc_r=no
9054 fi
9055 rm -fr conftest*
9056 fi
9057
9058
9059                 # restore the LIBS
9060                 LIBS="$ol_LIBS"
9061         
9062 fi
9063
9064 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9065
9066         if test $ol_cv_pthread_lc_r = yes ; then
9067                 ol_link_pthreads="-lc_r"
9068                 ol_link_threads=posix
9069         fi
9070 fi
9071
9072
9073                 # Pthread try link: -threads (ol_cv_pthread_threads)
9074 if test "$ol_link_threads" = no ; then
9075         # try -threads
9076         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9077 echo "configure:9078: checking for pthread link with -threads" >&5
9078 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9079   echo $ac_n "(cached) $ac_c" 1>&6
9080 else
9081   
9082                 # save the flags
9083                 ol_LIBS="$LIBS"
9084                 LIBS="-threads $LIBS"
9085
9086                 if test "$cross_compiling" = yes; then
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 int main() {
9103
9104         /* pthread test function */
9105         pthread_t t;
9106         int status;
9107 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9108         /* This system (e.g. AIX) defaults detached; must override */
9109         pthread_attr_t attr;
9110
9111         status = pthread_attr_init(&attr);
9112         if( status ) exit( status );
9113
9114         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9115         if( status ) exit( status );
9116
9117 #       define  ATTR    &attr
9118 #elif defined( HAVE_PTHREADS_D4 )
9119 #       define  ATTR    pthread_attr_default
9120 #else
9121 #       define  ATTR    NULL
9122 #endif
9123
9124         /* make sure pthread_create() isn't just a stub */
9125         status = pthread_create(&t, ATTR, task, NULL);
9126         if( status ) exit( status );
9127
9128         /* give the thread a chance to complete...
9129      * it should remain joinable and hence detachable
9130          */
9131         sleep( 1 );
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 ; return 0; }
9147 EOF
9148 if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9149   rm -rf conftest*
9150   ol_cv_pthread_threads=yes
9151 else
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -rf conftest*
9155   ol_cv_pthread_threads=no
9156 fi
9157 rm -f conftest*
9158 else
9159   cat > conftest.$ac_ext <<EOF
9160 #line 9161 "configure"
9161 #include "confdefs.h"
9162 /* pthread test headers */
9163 #include <pthread.h>
9164 #ifndef NULL
9165 #define NULL (void*)0
9166 #endif
9167
9168 static void *task(p)
9169         void *p;
9170 {
9171         return (void *) (p == NULL);
9172 }
9173
9174
9175 int main(argc, argv)
9176         int argc;
9177         char **argv;
9178 {
9179
9180         /* pthread test function */
9181         pthread_t t;
9182         int status;
9183 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9184         /* This system (e.g. AIX) defaults detached; must override */
9185         pthread_attr_t attr;
9186
9187         status = pthread_attr_init(&attr);
9188         if( status ) exit( status );
9189
9190         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9191         if( status ) exit( status );
9192
9193 #       define  ATTR    &attr
9194 #elif defined( HAVE_PTHREADS_D4 )
9195 #       define  ATTR    pthread_attr_default
9196 #else
9197 #       define  ATTR    NULL
9198 #endif
9199
9200         /* make sure pthread_create() isn't just a stub */
9201         status = pthread_create(&t, ATTR, task, NULL);
9202         if( status ) exit( status );
9203
9204         /* give the thread a chance to complete...
9205      * it should remain joinable and hence detachable
9206          */
9207         sleep( 1 );
9208
9209         /* make sure pthread_detach() isn't just a stub */
9210 #if HAVE_PTHREADS_D4
9211         status = pthread_detach( &t );
9212 #else
9213         status = pthread_detach( t );
9214 #endif
9215
9216 #ifdef HAVE_LINUX_THREADS
9217         pthread_kill_other_threads_np();
9218 #endif
9219
9220         exit( status );
9221
9222 }
9223
9224 EOF
9225 if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9226 then
9227   ol_cv_pthread_threads=yes
9228 else
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -fr conftest*
9232   ol_cv_pthread_threads=no
9233 fi
9234 rm -fr conftest*
9235 fi
9236
9237
9238                 # restore the LIBS
9239                 LIBS="$ol_LIBS"
9240         
9241 fi
9242
9243 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9244
9245         if test $ol_cv_pthread_threads = yes ; then
9246                 ol_link_pthreads="-threads"
9247                 ol_link_threads=posix
9248         fi
9249 fi
9250
9251
9252                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9253 if test "$ol_link_threads" = no ; then
9254         # try -lpthreads -lmach -lexc -lc_r
9255         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9256 echo "configure:9257: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9257 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9258   echo $ac_n "(cached) $ac_c" 1>&6
9259 else
9260   
9261                 # save the flags
9262                 ol_LIBS="$LIBS"
9263                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9264
9265                 if test "$cross_compiling" = yes; then
9266   cat > conftest.$ac_ext <<EOF
9267 #line 9268 "configure"
9268 #include "confdefs.h"
9269 /* pthread test headers */
9270 #include <pthread.h>
9271 #ifndef NULL
9272 #define NULL (void*)0
9273 #endif
9274
9275 static void *task(p)
9276         void *p;
9277 {
9278         return (void *) (p == NULL);
9279 }
9280
9281 int main() {
9282
9283         /* pthread test function */
9284         pthread_t t;
9285         int status;
9286 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9287         /* This system (e.g. AIX) defaults detached; must override */
9288         pthread_attr_t attr;
9289
9290         status = pthread_attr_init(&attr);
9291         if( status ) exit( status );
9292
9293         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9294         if( status ) exit( status );
9295
9296 #       define  ATTR    &attr
9297 #elif defined( HAVE_PTHREADS_D4 )
9298 #       define  ATTR    pthread_attr_default
9299 #else
9300 #       define  ATTR    NULL
9301 #endif
9302
9303         /* make sure pthread_create() isn't just a stub */
9304         status = pthread_create(&t, ATTR, task, NULL);
9305         if( status ) exit( status );
9306
9307         /* give the thread a chance to complete...
9308      * it should remain joinable and hence detachable
9309          */
9310         sleep( 1 );
9311
9312         /* make sure pthread_detach() isn't just a stub */
9313 #if HAVE_PTHREADS_D4
9314         status = pthread_detach( &t );
9315 #else
9316         status = pthread_detach( t );
9317 #endif
9318
9319 #ifdef HAVE_LINUX_THREADS
9320         pthread_kill_other_threads_np();
9321 #endif
9322
9323         exit( status );
9324
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9328   rm -rf conftest*
9329   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9335 fi
9336 rm -f conftest*
9337 else
9338   cat > conftest.$ac_ext <<EOF
9339 #line 9340 "configure"
9340 #include "confdefs.h"
9341 /* pthread test headers */
9342 #include <pthread.h>
9343 #ifndef NULL
9344 #define NULL (void*)0
9345 #endif
9346
9347 static void *task(p)
9348         void *p;
9349 {
9350         return (void *) (p == NULL);
9351 }
9352
9353
9354 int main(argc, argv)
9355         int argc;
9356         char **argv;
9357 {
9358
9359         /* pthread test function */
9360         pthread_t t;
9361         int status;
9362 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9363         /* This system (e.g. AIX) defaults detached; must override */
9364         pthread_attr_t attr;
9365
9366         status = pthread_attr_init(&attr);
9367         if( status ) exit( status );
9368
9369         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9370         if( status ) exit( status );
9371
9372 #       define  ATTR    &attr
9373 #elif defined( HAVE_PTHREADS_D4 )
9374 #       define  ATTR    pthread_attr_default
9375 #else
9376 #       define  ATTR    NULL
9377 #endif
9378
9379         /* make sure pthread_create() isn't just a stub */
9380         status = pthread_create(&t, ATTR, task, NULL);
9381         if( status ) exit( status );
9382
9383         /* give the thread a chance to complete...
9384      * it should remain joinable and hence detachable
9385          */
9386         sleep( 1 );
9387
9388         /* make sure pthread_detach() isn't just a stub */
9389 #if HAVE_PTHREADS_D4
9390         status = pthread_detach( &t );
9391 #else
9392         status = pthread_detach( t );
9393 #endif
9394
9395 #ifdef HAVE_LINUX_THREADS
9396         pthread_kill_other_threads_np();
9397 #endif
9398
9399         exit( status );
9400
9401 }
9402
9403 EOF
9404 if { (eval echo configure:9405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9405 then
9406   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9407 else
9408   echo "configure: failed program was:" >&5
9409   cat conftest.$ac_ext >&5
9410   rm -fr conftest*
9411   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9412 fi
9413 rm -fr conftest*
9414 fi
9415
9416
9417                 # restore the LIBS
9418                 LIBS="$ol_LIBS"
9419         
9420 fi
9421
9422 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9423
9424         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9425                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9426                 ol_link_threads=posix
9427         fi
9428 fi
9429
9430                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9431 if test "$ol_link_threads" = no ; then
9432         # try -lpthreads -lmach -lexc
9433         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9434 echo "configure:9435: checking for pthread link with -lpthreads -lmach -lexc" >&5
9435 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9436   echo $ac_n "(cached) $ac_c" 1>&6
9437 else
9438   
9439                 # save the flags
9440                 ol_LIBS="$LIBS"
9441                 LIBS="-lpthreads -lmach -lexc $LIBS"
9442
9443                 if test "$cross_compiling" = yes; then
9444   cat > conftest.$ac_ext <<EOF
9445 #line 9446 "configure"
9446 #include "confdefs.h"
9447 /* pthread test headers */
9448 #include <pthread.h>
9449 #ifndef NULL
9450 #define NULL (void*)0
9451 #endif
9452
9453 static void *task(p)
9454         void *p;
9455 {
9456         return (void *) (p == NULL);
9457 }
9458
9459 int main() {
9460
9461         /* pthread test function */
9462         pthread_t t;
9463         int status;
9464 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9465         /* This system (e.g. AIX) defaults detached; must override */
9466         pthread_attr_t attr;
9467
9468         status = pthread_attr_init(&attr);
9469         if( status ) exit( status );
9470
9471         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9472         if( status ) exit( status );
9473
9474 #       define  ATTR    &attr
9475 #elif defined( HAVE_PTHREADS_D4 )
9476 #       define  ATTR    pthread_attr_default
9477 #else
9478 #       define  ATTR    NULL
9479 #endif
9480
9481         /* make sure pthread_create() isn't just a stub */
9482         status = pthread_create(&t, ATTR, task, NULL);
9483         if( status ) exit( status );
9484
9485         /* give the thread a chance to complete...
9486      * it should remain joinable and hence detachable
9487          */
9488         sleep( 1 );
9489
9490         /* make sure pthread_detach() isn't just a stub */
9491 #if HAVE_PTHREADS_D4
9492         status = pthread_detach( &t );
9493 #else
9494         status = pthread_detach( t );
9495 #endif
9496
9497 #ifdef HAVE_LINUX_THREADS
9498         pthread_kill_other_threads_np();
9499 #endif
9500
9501         exit( status );
9502
9503 ; return 0; }
9504 EOF
9505 if { (eval echo configure:9506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9506   rm -rf conftest*
9507   ol_cv_pthread_lpthreads_lmach_lexc=yes
9508 else
9509   echo "configure: failed program was:" >&5
9510   cat conftest.$ac_ext >&5
9511   rm -rf conftest*
9512   ol_cv_pthread_lpthreads_lmach_lexc=no
9513 fi
9514 rm -f conftest*
9515 else
9516   cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519 /* pthread test headers */
9520 #include <pthread.h>
9521 #ifndef NULL
9522 #define NULL (void*)0
9523 #endif
9524
9525 static void *task(p)
9526         void *p;
9527 {
9528         return (void *) (p == NULL);
9529 }
9530
9531
9532 int main(argc, argv)
9533         int argc;
9534         char **argv;
9535 {
9536
9537         /* pthread test function */
9538         pthread_t t;
9539         int status;
9540 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9541         /* This system (e.g. AIX) defaults detached; must override */
9542         pthread_attr_t attr;
9543
9544         status = pthread_attr_init(&attr);
9545         if( status ) exit( status );
9546
9547         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9548         if( status ) exit( status );
9549
9550 #       define  ATTR    &attr
9551 #elif defined( HAVE_PTHREADS_D4 )
9552 #       define  ATTR    pthread_attr_default
9553 #else
9554 #       define  ATTR    NULL
9555 #endif
9556
9557         /* make sure pthread_create() isn't just a stub */
9558         status = pthread_create(&t, ATTR, task, NULL);
9559         if( status ) exit( status );
9560
9561         /* give the thread a chance to complete...
9562      * it should remain joinable and hence detachable
9563          */
9564         sleep( 1 );
9565
9566         /* make sure pthread_detach() isn't just a stub */
9567 #if HAVE_PTHREADS_D4
9568         status = pthread_detach( &t );
9569 #else
9570         status = pthread_detach( t );
9571 #endif
9572
9573 #ifdef HAVE_LINUX_THREADS
9574         pthread_kill_other_threads_np();
9575 #endif
9576
9577         exit( status );
9578
9579 }
9580
9581 EOF
9582 if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9583 then
9584   ol_cv_pthread_lpthreads_lmach_lexc=yes
9585 else
9586   echo "configure: failed program was:" >&5
9587   cat conftest.$ac_ext >&5
9588   rm -fr conftest*
9589   ol_cv_pthread_lpthreads_lmach_lexc=no
9590 fi
9591 rm -fr conftest*
9592 fi
9593
9594
9595                 # restore the LIBS
9596                 LIBS="$ol_LIBS"
9597         
9598 fi
9599
9600 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9601
9602         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9603                 ol_link_pthreads="-lpthreads -lmach -lexc"
9604                 ol_link_threads=posix
9605         fi
9606 fi
9607
9608                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9609 if test "$ol_link_threads" = no ; then
9610         # try -lpthreads -lexc
9611         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9612 echo "configure:9613: checking for pthread link with -lpthreads -lexc" >&5
9613 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9614   echo $ac_n "(cached) $ac_c" 1>&6
9615 else
9616   
9617                 # save the flags
9618                 ol_LIBS="$LIBS"
9619                 LIBS="-lpthreads -lexc $LIBS"
9620
9621                 if test "$cross_compiling" = yes; then
9622   cat > conftest.$ac_ext <<EOF
9623 #line 9624 "configure"
9624 #include "confdefs.h"
9625 /* pthread test headers */
9626 #include <pthread.h>
9627 #ifndef NULL
9628 #define NULL (void*)0
9629 #endif
9630
9631 static void *task(p)
9632         void *p;
9633 {
9634         return (void *) (p == NULL);
9635 }
9636
9637 int main() {
9638
9639         /* pthread test function */
9640         pthread_t t;
9641         int status;
9642 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9643         /* This system (e.g. AIX) defaults detached; must override */
9644         pthread_attr_t attr;
9645
9646         status = pthread_attr_init(&attr);
9647         if( status ) exit( status );
9648
9649         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9650         if( status ) exit( status );
9651
9652 #       define  ATTR    &attr
9653 #elif defined( HAVE_PTHREADS_D4 )
9654 #       define  ATTR    pthread_attr_default
9655 #else
9656 #       define  ATTR    NULL
9657 #endif
9658
9659         /* make sure pthread_create() isn't just a stub */
9660         status = pthread_create(&t, ATTR, task, NULL);
9661         if( status ) exit( status );
9662
9663         /* give the thread a chance to complete...
9664      * it should remain joinable and hence detachable
9665          */
9666         sleep( 1 );
9667
9668         /* make sure pthread_detach() isn't just a stub */
9669 #if HAVE_PTHREADS_D4
9670         status = pthread_detach( &t );
9671 #else
9672         status = pthread_detach( t );
9673 #endif
9674
9675 #ifdef HAVE_LINUX_THREADS
9676         pthread_kill_other_threads_np();
9677 #endif
9678
9679         exit( status );
9680
9681 ; return 0; }
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9684   rm -rf conftest*
9685   ol_cv_pthread_lpthreads_lexc=yes
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -rf conftest*
9690   ol_cv_pthread_lpthreads_lexc=no
9691 fi
9692 rm -f conftest*
9693 else
9694   cat > conftest.$ac_ext <<EOF
9695 #line 9696 "configure"
9696 #include "confdefs.h"
9697 /* pthread test headers */
9698 #include <pthread.h>
9699 #ifndef NULL
9700 #define NULL (void*)0
9701 #endif
9702
9703 static void *task(p)
9704         void *p;
9705 {
9706         return (void *) (p == NULL);
9707 }
9708
9709
9710 int main(argc, argv)
9711         int argc;
9712         char **argv;
9713 {
9714
9715         /* pthread test function */
9716         pthread_t t;
9717         int status;
9718 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9719         /* This system (e.g. AIX) defaults detached; must override */
9720         pthread_attr_t attr;
9721
9722         status = pthread_attr_init(&attr);
9723         if( status ) exit( status );
9724
9725         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9726         if( status ) exit( status );
9727
9728 #       define  ATTR    &attr
9729 #elif defined( HAVE_PTHREADS_D4 )
9730 #       define  ATTR    pthread_attr_default
9731 #else
9732 #       define  ATTR    NULL
9733 #endif
9734
9735         /* make sure pthread_create() isn't just a stub */
9736         status = pthread_create(&t, ATTR, task, NULL);
9737         if( status ) exit( status );
9738
9739         /* give the thread a chance to complete...
9740      * it should remain joinable and hence detachable
9741          */
9742         sleep( 1 );
9743
9744         /* make sure pthread_detach() isn't just a stub */
9745 #if HAVE_PTHREADS_D4
9746         status = pthread_detach( &t );
9747 #else
9748         status = pthread_detach( t );
9749 #endif
9750
9751 #ifdef HAVE_LINUX_THREADS
9752         pthread_kill_other_threads_np();
9753 #endif
9754
9755         exit( status );
9756
9757 }
9758
9759 EOF
9760 if { (eval echo configure:9761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9761 then
9762   ol_cv_pthread_lpthreads_lexc=yes
9763 else
9764   echo "configure: failed program was:" >&5
9765   cat conftest.$ac_ext >&5
9766   rm -fr conftest*
9767   ol_cv_pthread_lpthreads_lexc=no
9768 fi
9769 rm -fr conftest*
9770 fi
9771
9772
9773                 # restore the LIBS
9774                 LIBS="$ol_LIBS"
9775         
9776 fi
9777
9778 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9779
9780         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9781                 ol_link_pthreads="-lpthreads -lexc"
9782                 ol_link_threads=posix
9783         fi
9784 fi
9785
9786
9787                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9788 if test "$ol_link_threads" = no ; then
9789         # try -lpthreads
9790         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9791 echo "configure:9792: checking for pthread link with -lpthreads" >&5
9792 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9793   echo $ac_n "(cached) $ac_c" 1>&6
9794 else
9795   
9796                 # save the flags
9797                 ol_LIBS="$LIBS"
9798                 LIBS="-lpthreads $LIBS"
9799
9800                 if test "$cross_compiling" = yes; then
9801   cat > conftest.$ac_ext <<EOF
9802 #line 9803 "configure"
9803 #include "confdefs.h"
9804 /* pthread test headers */
9805 #include <pthread.h>
9806 #ifndef NULL
9807 #define NULL (void*)0
9808 #endif
9809
9810 static void *task(p)
9811         void *p;
9812 {
9813         return (void *) (p == NULL);
9814 }
9815
9816 int main() {
9817
9818         /* pthread test function */
9819         pthread_t t;
9820         int status;
9821 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9822         /* This system (e.g. AIX) defaults detached; must override */
9823         pthread_attr_t attr;
9824
9825         status = pthread_attr_init(&attr);
9826         if( status ) exit( status );
9827
9828         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9829         if( status ) exit( status );
9830
9831 #       define  ATTR    &attr
9832 #elif defined( HAVE_PTHREADS_D4 )
9833 #       define  ATTR    pthread_attr_default
9834 #else
9835 #       define  ATTR    NULL
9836 #endif
9837
9838         /* make sure pthread_create() isn't just a stub */
9839         status = pthread_create(&t, ATTR, task, NULL);
9840         if( status ) exit( status );
9841
9842         /* give the thread a chance to complete...
9843      * it should remain joinable and hence detachable
9844          */
9845         sleep( 1 );
9846
9847         /* make sure pthread_detach() isn't just a stub */
9848 #if HAVE_PTHREADS_D4
9849         status = pthread_detach( &t );
9850 #else
9851         status = pthread_detach( t );
9852 #endif
9853
9854 #ifdef HAVE_LINUX_THREADS
9855         pthread_kill_other_threads_np();
9856 #endif
9857
9858         exit( status );
9859
9860 ; return 0; }
9861 EOF
9862 if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9863   rm -rf conftest*
9864   ol_cv_pthread_lib_lpthreads=yes
9865 else
9866   echo "configure: failed program was:" >&5
9867   cat conftest.$ac_ext >&5
9868   rm -rf conftest*
9869   ol_cv_pthread_lib_lpthreads=no
9870 fi
9871 rm -f conftest*
9872 else
9873   cat > conftest.$ac_ext <<EOF
9874 #line 9875 "configure"
9875 #include "confdefs.h"
9876 /* pthread test headers */
9877 #include <pthread.h>
9878 #ifndef NULL
9879 #define NULL (void*)0
9880 #endif
9881
9882 static void *task(p)
9883         void *p;
9884 {
9885         return (void *) (p == NULL);
9886 }
9887
9888
9889 int main(argc, argv)
9890         int argc;
9891         char **argv;
9892 {
9893
9894         /* pthread test function */
9895         pthread_t t;
9896         int status;
9897 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9898         /* This system (e.g. AIX) defaults detached; must override */
9899         pthread_attr_t attr;
9900
9901         status = pthread_attr_init(&attr);
9902         if( status ) exit( status );
9903
9904         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9905         if( status ) exit( status );
9906
9907 #       define  ATTR    &attr
9908 #elif defined( HAVE_PTHREADS_D4 )
9909 #       define  ATTR    pthread_attr_default
9910 #else
9911 #       define  ATTR    NULL
9912 #endif
9913
9914         /* make sure pthread_create() isn't just a stub */
9915         status = pthread_create(&t, ATTR, task, NULL);
9916         if( status ) exit( status );
9917
9918         /* give the thread a chance to complete...
9919      * it should remain joinable and hence detachable
9920          */
9921         sleep( 1 );
9922
9923         /* make sure pthread_detach() isn't just a stub */
9924 #if HAVE_PTHREADS_D4
9925         status = pthread_detach( &t );
9926 #else
9927         status = pthread_detach( t );
9928 #endif
9929
9930 #ifdef HAVE_LINUX_THREADS
9931         pthread_kill_other_threads_np();
9932 #endif
9933
9934         exit( status );
9935
9936 }
9937
9938 EOF
9939 if { (eval echo configure:9940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9940 then
9941   ol_cv_pthread_lib_lpthreads=yes
9942 else
9943   echo "configure: failed program was:" >&5
9944   cat conftest.$ac_ext >&5
9945   rm -fr conftest*
9946   ol_cv_pthread_lib_lpthreads=no
9947 fi
9948 rm -fr conftest*
9949 fi
9950
9951
9952                 # restore the LIBS
9953                 LIBS="$ol_LIBS"
9954         
9955 fi
9956
9957 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9958
9959         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9960                 ol_link_pthreads="-lpthreads"
9961                 ol_link_threads=posix
9962         fi
9963 fi
9964
9965
9966                 if test $ol_link_threads != no ; then
9967                         cat >> confdefs.h <<\EOF
9968 #define HAVE_PTHREADS 1
9969 EOF
9970
9971
9972                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9973
9974                                                 save_CPPFLAGS="$CPPFLAGS"
9975                         save_LIBS="$LIBS"
9976                         LIBS="$LTHREAD_LIBS $LIBS"
9977
9978                                                                                                 for ac_func in sched_yield pthread_yield
9979 do
9980 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9981 echo "configure:9982: checking for $ac_func" >&5
9982 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9983   echo $ac_n "(cached) $ac_c" 1>&6
9984 else
9985   cat > conftest.$ac_ext <<EOF
9986 #line 9987 "configure"
9987 #include "confdefs.h"
9988 /* System header to define __stub macros and hopefully few prototypes,
9989     which can conflict with char $ac_func(); below.  */
9990 #include <assert.h>
9991 /* Override any gcc2 internal prototype to avoid an error.  */
9992 /* We use char because int might match the return type of a gcc2
9993     builtin and then its argument prototype would still apply.  */
9994 char $ac_func();
9995 char (*f)();
9996
9997 int main() {
9998
9999 /* The GNU C library defines this for functions which it implements
10000     to always fail with ENOSYS.  Some functions are actually named
10001     something starting with __ and the normal name is an alias.  */
10002 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10003 choke me
10004 #else
10005 f = $ac_func;
10006 #endif
10007
10008 ; return 0; }
10009 EOF
10010 if { (eval echo configure:10011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10011   rm -rf conftest*
10012   eval "ac_cv_func_$ac_func=yes"
10013 else
10014   echo "configure: failed program was:" >&5
10015   cat conftest.$ac_ext >&5
10016   rm -rf conftest*
10017   eval "ac_cv_func_$ac_func=no"
10018 fi
10019 rm -f conftest*
10020 fi
10021
10022 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10023   echo "$ac_t""yes" 1>&6
10024     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10025   cat >> confdefs.h <<EOF
10026 #define $ac_tr_func 1
10027 EOF
10028  
10029 else
10030   echo "$ac_t""no" 1>&6
10031 fi
10032 done
10033
10034
10035                         if test $ac_cv_func_sched_yield = no -a \
10036                                 $ac_cv_func_pthread_yield = no ; then
10037                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10038 echo "configure:10039: checking for sched_yield in -lrt" >&5
10039 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10041   echo $ac_n "(cached) $ac_c" 1>&6
10042 else
10043   ac_save_LIBS="$LIBS"
10044 LIBS="-lrt  $LIBS"
10045 cat > conftest.$ac_ext <<EOF
10046 #line 10047 "configure"
10047 #include "confdefs.h"
10048 /* Override any gcc2 internal prototype to avoid an error.  */
10049 /* We use char because int might match the return type of a gcc2
10050     builtin and then its argument prototype would still apply.  */
10051 char sched_yield();
10052
10053 int main() {
10054 sched_yield()
10055 ; return 0; }
10056 EOF
10057 if { (eval echo configure:10058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10058   rm -rf conftest*
10059   eval "ac_cv_lib_$ac_lib_var=yes"
10060 else
10061   echo "configure: failed program was:" >&5
10062   cat conftest.$ac_ext >&5
10063   rm -rf conftest*
10064   eval "ac_cv_lib_$ac_lib_var=no"
10065 fi
10066 rm -f conftest*
10067 LIBS="$ac_save_LIBS"
10068
10069 fi
10070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10071   echo "$ac_t""yes" 1>&6
10072   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10073                                         cat >> confdefs.h <<\EOF
10074 #define HAVE_SCHED_YIELD 1
10075 EOF
10076
10077                                         ac_cv_func_sched_yield=yes
10078 else
10079   echo "$ac_t""no" 1>&6
10080 ac_cv_func_sched_yield=no
10081 fi
10082
10083                         fi
10084                         if test $ac_cv_func_sched_yield = no -a \
10085                                 $ac_cv_func_pthread_yield = no ; then
10086                                                                                                 for ac_func in thr_yield
10087 do
10088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10089 echo "configure:10090: checking for $ac_func" >&5
10090 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10091   echo $ac_n "(cached) $ac_c" 1>&6
10092 else
10093   cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096 /* System header to define __stub macros and hopefully few prototypes,
10097     which can conflict with char $ac_func(); below.  */
10098 #include <assert.h>
10099 /* Override any gcc2 internal prototype to avoid an error.  */
10100 /* We use char because int might match the return type of a gcc2
10101     builtin and then its argument prototype would still apply.  */
10102 char $ac_func();
10103 char (*f)();
10104
10105 int main() {
10106
10107 /* The GNU C library defines this for functions which it implements
10108     to always fail with ENOSYS.  Some functions are actually named
10109     something starting with __ and the normal name is an alias.  */
10110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10111 choke me
10112 #else
10113 f = $ac_func;
10114 #endif
10115
10116 ; return 0; }
10117 EOF
10118 if { (eval echo configure:10119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10119   rm -rf conftest*
10120   eval "ac_cv_func_$ac_func=yes"
10121 else
10122   echo "configure: failed program was:" >&5
10123   cat conftest.$ac_ext >&5
10124   rm -rf conftest*
10125   eval "ac_cv_func_$ac_func=no"
10126 fi
10127 rm -f conftest*
10128 fi
10129
10130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10131   echo "$ac_t""yes" 1>&6
10132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10133   cat >> confdefs.h <<EOF
10134 #define $ac_tr_func 1
10135 EOF
10136  
10137 else
10138   echo "$ac_t""no" 1>&6
10139 fi
10140 done
10141
10142                         fi
10143                         if test $ac_cv_func_sched_yield = no -a \
10144                                 $ac_cv_func_pthread_yield = no -a \
10145                                 "$ac_cv_func_thr_yield" = no ; then
10146                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10147                         fi
10148
10149                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10150 do
10151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10152 echo "configure:10153: checking for $ac_func" >&5
10153 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10154   echo $ac_n "(cached) $ac_c" 1>&6
10155 else
10156   cat > conftest.$ac_ext <<EOF
10157 #line 10158 "configure"
10158 #include "confdefs.h"
10159 /* System header to define __stub macros and hopefully few prototypes,
10160     which can conflict with char $ac_func(); below.  */
10161 #include <assert.h>
10162 /* Override any gcc2 internal prototype to avoid an error.  */
10163 /* We use char because int might match the return type of a gcc2
10164     builtin and then its argument prototype would still apply.  */
10165 char $ac_func();
10166 char (*f)();
10167
10168 int main() {
10169
10170 /* The GNU C library defines this for functions which it implements
10171     to always fail with ENOSYS.  Some functions are actually named
10172     something starting with __ and the normal name is an alias.  */
10173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10174 choke me
10175 #else
10176 f = $ac_func;
10177 #endif
10178
10179 ; return 0; }
10180 EOF
10181 if { (eval echo configure:10182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10182   rm -rf conftest*
10183   eval "ac_cv_func_$ac_func=yes"
10184 else
10185   echo "configure: failed program was:" >&5
10186   cat conftest.$ac_ext >&5
10187   rm -rf conftest*
10188   eval "ac_cv_func_$ac_func=no"
10189 fi
10190 rm -f conftest*
10191 fi
10192
10193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10194   echo "$ac_t""yes" 1>&6
10195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10196   cat >> confdefs.h <<EOF
10197 #define $ac_tr_func 1
10198 EOF
10199  
10200 else
10201   echo "$ac_t""no" 1>&6
10202 fi
10203 done
10204
10205
10206                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10207 echo "configure:10208: checking for pthread_detach with <pthread.h>" >&5
10208 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10209   echo $ac_n "(cached) $ac_c" 1>&6
10210 else
10211   
10212                                                                 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215
10216 #include <pthread.h>
10217 #ifndef NULL
10218 #define NULL (void*)0
10219 #endif
10220
10221 int main() {
10222 pthread_detach(NULL);
10223 ; return 0; }
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10226   rm -rf conftest*
10227   ol_cv_func_pthread_detach=yes
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -rf conftest*
10232   ol_cv_func_pthread_detach=no
10233 fi
10234 rm -f conftest*
10235                         
10236 fi
10237
10238 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10239
10240                         if test $ol_cv_func_pthread_detach = no ; then
10241                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10242                         fi
10243
10244                         cat >> confdefs.h <<\EOF
10245 #define HAVE_PTHREAD_DETACH 1
10246 EOF
10247
10248
10249                                                 for ac_func in \
10250                                 pthread_setconcurrency \
10251                                 pthread_getconcurrency \
10252                                 thr_setconcurrency \
10253                                 thr_getconcurrency \
10254                         
10255 do
10256 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10257 echo "configure:10258: checking for $ac_func" >&5
10258 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10259   echo $ac_n "(cached) $ac_c" 1>&6
10260 else
10261   cat > conftest.$ac_ext <<EOF
10262 #line 10263 "configure"
10263 #include "confdefs.h"
10264 /* System header to define __stub macros and hopefully few prototypes,
10265     which can conflict with char $ac_func(); below.  */
10266 #include <assert.h>
10267 /* Override any gcc2 internal prototype to avoid an error.  */
10268 /* We use char because int might match the return type of a gcc2
10269     builtin and then its argument prototype would still apply.  */
10270 char $ac_func();
10271 char (*f)();
10272
10273 int main() {
10274
10275 /* The GNU C library defines this for functions which it implements
10276     to always fail with ENOSYS.  Some functions are actually named
10277     something starting with __ and the normal name is an alias.  */
10278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10279 choke me
10280 #else
10281 f = $ac_func;
10282 #endif
10283
10284 ; return 0; }
10285 EOF
10286 if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10287   rm -rf conftest*
10288   eval "ac_cv_func_$ac_func=yes"
10289 else
10290   echo "configure: failed program was:" >&5
10291   cat conftest.$ac_ext >&5
10292   rm -rf conftest*
10293   eval "ac_cv_func_$ac_func=no"
10294 fi
10295 rm -f conftest*
10296 fi
10297
10298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10299   echo "$ac_t""yes" 1>&6
10300     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10301   cat >> confdefs.h <<EOF
10302 #define $ac_tr_func 1
10303 EOF
10304  
10305 else
10306   echo "$ac_t""no" 1>&6
10307 fi
10308 done
10309
10310
10311                         
10312         for ac_func in pthread_kill_other_threads_np
10313 do
10314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10315 echo "configure:10316: checking for $ac_func" >&5
10316 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10317   echo $ac_n "(cached) $ac_c" 1>&6
10318 else
10319   cat > conftest.$ac_ext <<EOF
10320 #line 10321 "configure"
10321 #include "confdefs.h"
10322 /* System header to define __stub macros and hopefully few prototypes,
10323     which can conflict with char $ac_func(); below.  */
10324 #include <assert.h>
10325 /* Override any gcc2 internal prototype to avoid an error.  */
10326 /* We use char because int might match the return type of a gcc2
10327     builtin and then its argument prototype would still apply.  */
10328 char $ac_func();
10329 char (*f)();
10330
10331 int main() {
10332
10333 /* The GNU C library defines this for functions which it implements
10334     to always fail with ENOSYS.  Some functions are actually named
10335     something starting with __ and the normal name is an alias.  */
10336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10337 choke me
10338 #else
10339 f = $ac_func;
10340 #endif
10341
10342 ; return 0; }
10343 EOF
10344 if { (eval echo configure:10345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10345   rm -rf conftest*
10346   eval "ac_cv_func_$ac_func=yes"
10347 else
10348   echo "configure: failed program was:" >&5
10349   cat conftest.$ac_ext >&5
10350   rm -rf conftest*
10351   eval "ac_cv_func_$ac_func=no"
10352 fi
10353 rm -f conftest*
10354 fi
10355
10356 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10357   echo "$ac_t""yes" 1>&6
10358     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10359   cat >> confdefs.h <<EOF
10360 #define $ac_tr_func 1
10361 EOF
10362  
10363 else
10364   echo "$ac_t""no" 1>&6
10365 fi
10366 done
10367
10368         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10369 echo "configure:10370: checking for LinuxThreads implementation" >&5
10370 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10371   echo $ac_n "(cached) $ac_c" 1>&6
10372 else
10373   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10374 fi
10375
10376 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10377
10378                         
10379         
10380         
10381         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10382 echo "configure:10383: checking for LinuxThreads consistency" >&5
10383 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10384   echo $ac_n "(cached) $ac_c" 1>&6
10385 else
10386   
10387                 if test $ol_cv_header_linux_threads = yes -a \
10388                         $ol_cv_sys_linux_threads = yes; then
10389                         ol_cv_linux_threads=yes
10390                 elif test $ol_cv_header_linux_threads = no -a \
10391                         $ol_cv_sys_linux_threads = no; then
10392                         ol_cv_linux_threads=no
10393                 else
10394                         ol_cv_linux_threads=error
10395                 fi
10396         
10397 fi
10398
10399 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10400
10401
10402                         if test $ol_cv_linux_threads = error; then
10403                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10404                         fi
10405
10406                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10407 echo "configure:10408: checking if pthread_create() works" >&5
10408 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10409   echo $ac_n "(cached) $ac_c" 1>&6
10410 else
10411   
10412                         if test "$cross_compiling" = yes; then
10413                                 ol_cv_pthread_create_works=yes
10414 else
10415   cat > conftest.$ac_ext <<EOF
10416 #line 10417 "configure"
10417 #include "confdefs.h"
10418 /* pthread test headers */
10419 #include <pthread.h>
10420 #ifndef NULL
10421 #define NULL (void*)0
10422 #endif
10423
10424 static void *task(p)
10425         void *p;
10426 {
10427         return (void *) (p == NULL);
10428 }
10429
10430
10431 int main(argc, argv)
10432         int argc;
10433         char **argv;
10434 {
10435
10436         /* pthread test function */
10437         pthread_t t;
10438         int status;
10439 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10440         /* This system (e.g. AIX) defaults detached; must override */
10441         pthread_attr_t attr;
10442
10443         status = pthread_attr_init(&attr);
10444         if( status ) exit( status );
10445
10446         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10447         if( status ) exit( status );
10448
10449 #       define  ATTR    &attr
10450 #elif defined( HAVE_PTHREADS_D4 )
10451 #       define  ATTR    pthread_attr_default
10452 #else
10453 #       define  ATTR    NULL
10454 #endif
10455
10456         /* make sure pthread_create() isn't just a stub */
10457         status = pthread_create(&t, ATTR, task, NULL);
10458         if( status ) exit( status );
10459
10460         /* give the thread a chance to complete...
10461      * it should remain joinable and hence detachable
10462          */
10463         sleep( 1 );
10464
10465         /* make sure pthread_detach() isn't just a stub */
10466 #if HAVE_PTHREADS_D4
10467         status = pthread_detach( &t );
10468 #else
10469         status = pthread_detach( t );
10470 #endif
10471
10472 #ifdef HAVE_LINUX_THREADS
10473         pthread_kill_other_threads_np();
10474 #endif
10475
10476         exit( status );
10477
10478 }
10479
10480 EOF
10481 if { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10482 then
10483   ol_cv_pthread_create_works=yes
10484 else
10485   echo "configure: failed program was:" >&5
10486   cat conftest.$ac_ext >&5
10487   rm -fr conftest*
10488   ol_cv_pthread_create_works=no
10489 fi
10490 rm -fr conftest*
10491 fi
10492
10493 fi
10494
10495 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10496
10497                         if test $ol_cv_pthread_create_works = no ; then
10498                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10499                         fi
10500
10501                                                 if test $ol_with_yielding_select = auto ; then
10502                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10503 echo "configure:10504: checking if select yields when using pthreads" >&5
10504 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10505   echo $ac_n "(cached) $ac_c" 1>&6
10506 else
10507   
10508                                 if test "$cross_compiling" = yes; then
10509   ol_cv_pthread_select_yields=cross
10510 else
10511   cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514
10515 #include <sys/types.h>
10516 #include <sys/time.h>
10517 #include <unistd.h>
10518 #include <pthread.h>
10519 #ifndef NULL
10520 #define NULL (void*) 0
10521 #endif
10522
10523 static int fildes[2];
10524
10525 static void *task(p)
10526         void *p;
10527 {
10528         int i;
10529         struct timeval tv;
10530
10531         fd_set rfds;
10532
10533         tv.tv_sec=10;
10534         tv.tv_usec=0;
10535
10536         FD_ZERO(&rfds);
10537         FD_SET(fildes[0], &rfds);
10538
10539         /* we're not interested in any fds */
10540         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10541
10542         if(i < 0) {
10543                 perror("select");
10544                 exit(10);
10545         }
10546
10547         exit(0); /* if we exit here, the select blocked the whole process */
10548 }
10549
10550 int main(argc, argv)
10551         int argc;
10552         char **argv;
10553 {
10554         pthread_t t;
10555
10556         /* create a pipe to select */
10557         if(pipe(&fildes[0])) {
10558                 perror("select");
10559                 exit(1);
10560         }
10561
10562 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10563         (void) pthread_setconcurrency(2);
10564 #else
10565 #ifdef HAVE_THR_SETCONCURRENCY
10566         /* Set Solaris LWP concurrency to 2 */
10567         thr_setconcurrency(2);
10568 #endif
10569 #endif
10570
10571 #if HAVE_PTHREADS_D4
10572         pthread_create(&t, pthread_attr_default, task, NULL);
10573 #else
10574         pthread_create(&t, NULL, task, NULL);
10575 #endif
10576
10577 #if HAVE_SCHED_YIELD
10578         sched_yield();  /* make sure task runs first */
10579 #else
10580 #ifdef HAVE_PTHREAD_YIELD
10581         pthread_yield();        /* make sure task runs first */
10582 #endif
10583 #endif
10584
10585         exit(2);
10586 }
10587 EOF
10588 if { (eval echo configure:10589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10589 then
10590   ol_cv_pthread_select_yields=no
10591 else
10592   echo "configure: failed program was:" >&5
10593   cat conftest.$ac_ext >&5
10594   rm -fr conftest*
10595   ol_cv_pthread_select_yields=yes
10596 fi
10597 rm -fr conftest*
10598 fi
10599
10600 fi
10601
10602 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10603
10604                                 if test $ol_cv_pthread_select_yields = cross ; then
10605                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10606                                 fi
10607
10608                                 if test $ol_cv_pthread_select_yields = yes ; then
10609                                         ol_with_yielding_select=yes
10610                                 fi
10611                         fi
10612
10613                                                 CPPFLAGS="$save_CPPFLAGS"
10614                         LIBS="$save_LIBS"
10615                 else
10616                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10617                 fi
10618         fi
10619
10620         if test $ol_with_threads = posix ; then
10621                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10622         fi
10623 fi
10624
10625 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10626         -o $ol_with_threads = mach ; then
10627
10628                 for ac_hdr in mach/cthreads.h
10629 do
10630 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10631 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10632 echo "configure:10633: checking for $ac_hdr" >&5
10633 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10634   echo $ac_n "(cached) $ac_c" 1>&6
10635 else
10636   cat > conftest.$ac_ext <<EOF
10637 #line 10638 "configure"
10638 #include "confdefs.h"
10639 #include <$ac_hdr>
10640 EOF
10641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10642 { (eval echo configure:10643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10644 if test -z "$ac_err"; then
10645   rm -rf conftest*
10646   eval "ac_cv_header_$ac_safe=yes"
10647 else
10648   echo "$ac_err" >&5
10649   echo "configure: failed program was:" >&5
10650   cat conftest.$ac_ext >&5
10651   rm -rf conftest*
10652   eval "ac_cv_header_$ac_safe=no"
10653 fi
10654 rm -f conftest*
10655 fi
10656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10657   echo "$ac_t""yes" 1>&6
10658     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10659   cat >> confdefs.h <<EOF
10660 #define $ac_tr_hdr 1
10661 EOF
10662  
10663 else
10664   echo "$ac_t""no" 1>&6
10665 fi
10666 done
10667
10668         if test $ac_cv_header_mach_cthreads_h = yes ; then
10669                 ol_with_threads=found
10670
10671                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10672 echo "configure:10673: checking for cthread_fork" >&5
10673 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10674   echo $ac_n "(cached) $ac_c" 1>&6
10675 else
10676   cat > conftest.$ac_ext <<EOF
10677 #line 10678 "configure"
10678 #include "confdefs.h"
10679 /* System header to define __stub macros and hopefully few prototypes,
10680     which can conflict with char cthread_fork(); below.  */
10681 #include <assert.h>
10682 /* Override any gcc2 internal prototype to avoid an error.  */
10683 /* We use char because int might match the return type of a gcc2
10684     builtin and then its argument prototype would still apply.  */
10685 char cthread_fork();
10686 char (*f)();
10687
10688 int main() {
10689
10690 /* The GNU C library defines this for functions which it implements
10691     to always fail with ENOSYS.  Some functions are actually named
10692     something starting with __ and the normal name is an alias.  */
10693 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10694 choke me
10695 #else
10696 f = cthread_fork;
10697 #endif
10698
10699 ; return 0; }
10700 EOF
10701 if { (eval echo configure:10702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10702   rm -rf conftest*
10703   eval "ac_cv_func_cthread_fork=yes"
10704 else
10705   echo "configure: failed program was:" >&5
10706   cat conftest.$ac_ext >&5
10707   rm -rf conftest*
10708   eval "ac_cv_func_cthread_fork=no"
10709 fi
10710 rm -f conftest*
10711 fi
10712
10713 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10714   echo "$ac_t""yes" 1>&6
10715   ol_link_threads=yes
10716 else
10717   echo "$ac_t""no" 1>&6
10718 fi
10719
10720
10721                 if test $ol_link_threads = no ; then
10722                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10723 echo "configure:10724: checking for cthread_fork with -all_load" >&5
10724 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10725   echo $ac_n "(cached) $ac_c" 1>&6
10726 else
10727   
10728                                                                 save_LIBS="$LIBS"
10729                                 LIBS="-all_load $LIBS"
10730                                 cat > conftest.$ac_ext <<EOF
10731 #line 10732 "configure"
10732 #include "confdefs.h"
10733 #include <mach/cthreads.h>
10734 int main() {
10735
10736                                         cthread_fork((void *)0, (void *)0);
10737                                         
10738 ; return 0; }
10739 EOF
10740 if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10741   rm -rf conftest*
10742   ol_cv_cthread_all_load=yes
10743 else
10744   echo "configure: failed program was:" >&5
10745   cat conftest.$ac_ext >&5
10746   rm -rf conftest*
10747   ol_cv_cthread_all_load=no
10748 fi
10749 rm -f conftest*
10750                                                                 LIBS="$save_LIBS"
10751                         
10752 fi
10753
10754 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10755
10756                         if test $ol_cv_cthread_all_load = yes ; then
10757                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10758                                 ol_link_threads=mach
10759                         fi
10760                 fi
10761
10762                 if test $ol_link_threads != no ; then
10763                         : check for cthread specific functionality here
10764                         cat >> confdefs.h <<\EOF
10765 #define HAVE_MACH_CTHREADS 1
10766 EOF
10767
10768                 else
10769                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10770                 fi
10771         fi
10772
10773         if test $ol_with_threads = mach ; then
10774                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10775         fi
10776 fi
10777
10778 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10779         -o $ol_with_threads = pth ; then
10780
10781         for ac_hdr in pth.h
10782 do
10783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10785 echo "configure:10786: checking for $ac_hdr" >&5
10786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10787   echo $ac_n "(cached) $ac_c" 1>&6
10788 else
10789   cat > conftest.$ac_ext <<EOF
10790 #line 10791 "configure"
10791 #include "confdefs.h"
10792 #include <$ac_hdr>
10793 EOF
10794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10795 { (eval echo configure:10796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10797 if test -z "$ac_err"; then
10798   rm -rf conftest*
10799   eval "ac_cv_header_$ac_safe=yes"
10800 else
10801   echo "$ac_err" >&5
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   eval "ac_cv_header_$ac_safe=no"
10806 fi
10807 rm -f conftest*
10808 fi
10809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10810   echo "$ac_t""yes" 1>&6
10811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10812   cat >> confdefs.h <<EOF
10813 #define $ac_tr_hdr 1
10814 EOF
10815  
10816 else
10817   echo "$ac_t""no" 1>&6
10818 fi
10819 done
10820
10821
10822         if test $ac_cv_header_pth_h = yes ; then
10823                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10824 echo "configure:10825: checking for pth_version in -lpth" >&5
10825 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10827   echo $ac_n "(cached) $ac_c" 1>&6
10828 else
10829   ac_save_LIBS="$LIBS"
10830 LIBS="-lpth  $LIBS"
10831 cat > conftest.$ac_ext <<EOF
10832 #line 10833 "configure"
10833 #include "confdefs.h"
10834 /* Override any gcc2 internal prototype to avoid an error.  */
10835 /* We use char because int might match the return type of a gcc2
10836     builtin and then its argument prototype would still apply.  */
10837 char pth_version();
10838
10839 int main() {
10840 pth_version()
10841 ; return 0; }
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10844   rm -rf conftest*
10845   eval "ac_cv_lib_$ac_lib_var=yes"
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -rf conftest*
10850   eval "ac_cv_lib_$ac_lib_var=no"
10851 fi
10852 rm -f conftest*
10853 LIBS="$ac_save_LIBS"
10854
10855 fi
10856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10857   echo "$ac_t""yes" 1>&6
10858   have_pth=yes
10859 else
10860   echo "$ac_t""no" 1>&6
10861 have_pth=no
10862 fi
10863
10864
10865                 if test $have_pth = yes ; then
10866                         cat >> confdefs.h <<\EOF
10867 #define HAVE_GNU_PTH 1
10868 EOF
10869
10870                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10871                         ol_link_threads=pth
10872
10873                         if test $ol_with_yielding_select = auto ; then
10874                                 ol_with_yielding_select=yes
10875                         fi
10876                 fi
10877         fi
10878 fi
10879
10880 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10881         -o $ol_with_threads = lwp ; then
10882
10883                 for ac_hdr in thread.h synch.h
10884 do
10885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10887 echo "configure:10888: checking for $ac_hdr" >&5
10888 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10889   echo $ac_n "(cached) $ac_c" 1>&6
10890 else
10891   cat > conftest.$ac_ext <<EOF
10892 #line 10893 "configure"
10893 #include "confdefs.h"
10894 #include <$ac_hdr>
10895 EOF
10896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10897 { (eval echo configure:10898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10899 if test -z "$ac_err"; then
10900   rm -rf conftest*
10901   eval "ac_cv_header_$ac_safe=yes"
10902 else
10903   echo "$ac_err" >&5
10904   echo "configure: failed program was:" >&5
10905   cat conftest.$ac_ext >&5
10906   rm -rf conftest*
10907   eval "ac_cv_header_$ac_safe=no"
10908 fi
10909 rm -f conftest*
10910 fi
10911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10912   echo "$ac_t""yes" 1>&6
10913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10914   cat >> confdefs.h <<EOF
10915 #define $ac_tr_hdr 1
10916 EOF
10917  
10918 else
10919   echo "$ac_t""no" 1>&6
10920 fi
10921 done
10922
10923         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10924                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10925 echo "configure:10926: checking for thr_create in -lthread" >&5
10926 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10928   echo $ac_n "(cached) $ac_c" 1>&6
10929 else
10930   ac_save_LIBS="$LIBS"
10931 LIBS="-lthread  $LIBS"
10932 cat > conftest.$ac_ext <<EOF
10933 #line 10934 "configure"
10934 #include "confdefs.h"
10935 /* Override any gcc2 internal prototype to avoid an error.  */
10936 /* We use char because int might match the return type of a gcc2
10937     builtin and then its argument prototype would still apply.  */
10938 char thr_create();
10939
10940 int main() {
10941 thr_create()
10942 ; return 0; }
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10945   rm -rf conftest*
10946   eval "ac_cv_lib_$ac_lib_var=yes"
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=no"
10952 fi
10953 rm -f conftest*
10954 LIBS="$ac_save_LIBS"
10955
10956 fi
10957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10958   echo "$ac_t""yes" 1>&6
10959   have_thr=yes
10960 else
10961   echo "$ac_t""no" 1>&6
10962 have_thr=no
10963 fi
10964
10965
10966                 if test $have_thr = yes ; then
10967                         cat >> confdefs.h <<\EOF
10968 #define HAVE_THR 1
10969 EOF
10970
10971                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10972                         ol_link_threads=thr
10973
10974                         if test $ol_with_yielding_select = auto ; then
10975                                 ol_with_yielding_select=yes
10976                         fi
10977
10978                                                 for ac_func in \
10979                                 thr_setconcurrency \
10980                                 thr_getconcurrency \
10981                         
10982 do
10983 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10984 echo "configure:10985: checking for $ac_func" >&5
10985 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10986   echo $ac_n "(cached) $ac_c" 1>&6
10987 else
10988   cat > conftest.$ac_ext <<EOF
10989 #line 10990 "configure"
10990 #include "confdefs.h"
10991 /* System header to define __stub macros and hopefully few prototypes,
10992     which can conflict with char $ac_func(); below.  */
10993 #include <assert.h>
10994 /* Override any gcc2 internal prototype to avoid an error.  */
10995 /* We use char because int might match the return type of a gcc2
10996     builtin and then its argument prototype would still apply.  */
10997 char $ac_func();
10998 char (*f)();
10999
11000 int main() {
11001
11002 /* The GNU C library defines this for functions which it implements
11003     to always fail with ENOSYS.  Some functions are actually named
11004     something starting with __ and the normal name is an alias.  */
11005 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11006 choke me
11007 #else
11008 f = $ac_func;
11009 #endif
11010
11011 ; return 0; }
11012 EOF
11013 if { (eval echo configure:11014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11014   rm -rf conftest*
11015   eval "ac_cv_func_$ac_func=yes"
11016 else
11017   echo "configure: failed program was:" >&5
11018   cat conftest.$ac_ext >&5
11019   rm -rf conftest*
11020   eval "ac_cv_func_$ac_func=no"
11021 fi
11022 rm -f conftest*
11023 fi
11024
11025 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11026   echo "$ac_t""yes" 1>&6
11027     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11028   cat >> confdefs.h <<EOF
11029 #define $ac_tr_func 1
11030 EOF
11031  
11032 else
11033   echo "$ac_t""no" 1>&6
11034 fi
11035 done
11036
11037                 fi
11038         fi
11039
11040                 for ac_hdr in lwp/lwp.h
11041 do
11042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11044 echo "configure:11045: checking for $ac_hdr" >&5
11045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11046   echo $ac_n "(cached) $ac_c" 1>&6
11047 else
11048   cat > conftest.$ac_ext <<EOF
11049 #line 11050 "configure"
11050 #include "confdefs.h"
11051 #include <$ac_hdr>
11052 EOF
11053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11054 { (eval echo configure:11055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11056 if test -z "$ac_err"; then
11057   rm -rf conftest*
11058   eval "ac_cv_header_$ac_safe=yes"
11059 else
11060   echo "$ac_err" >&5
11061   echo "configure: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   rm -rf conftest*
11064   eval "ac_cv_header_$ac_safe=no"
11065 fi
11066 rm -f conftest*
11067 fi
11068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11069   echo "$ac_t""yes" 1>&6
11070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11071   cat >> confdefs.h <<EOF
11072 #define $ac_tr_hdr 1
11073 EOF
11074  
11075 else
11076   echo "$ac_t""no" 1>&6
11077 fi
11078 done
11079
11080         if test $ac_cv_header_lwp_lwp_h = yes ; then
11081                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11082 echo "configure:11083: checking for lwp_create in -llwp" >&5
11083 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11085   echo $ac_n "(cached) $ac_c" 1>&6
11086 else
11087   ac_save_LIBS="$LIBS"
11088 LIBS="-llwp  $LIBS"
11089 cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 /* Override any gcc2 internal prototype to avoid an error.  */
11093 /* We use char because int might match the return type of a gcc2
11094     builtin and then its argument prototype would still apply.  */
11095 char lwp_create();
11096
11097 int main() {
11098 lwp_create()
11099 ; return 0; }
11100 EOF
11101 if { (eval echo configure:11102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11102   rm -rf conftest*
11103   eval "ac_cv_lib_$ac_lib_var=yes"
11104 else
11105   echo "configure: failed program was:" >&5
11106   cat conftest.$ac_ext >&5
11107   rm -rf conftest*
11108   eval "ac_cv_lib_$ac_lib_var=no"
11109 fi
11110 rm -f conftest*
11111 LIBS="$ac_save_LIBS"
11112
11113 fi
11114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11115   echo "$ac_t""yes" 1>&6
11116   have_lwp=yes
11117 else
11118   echo "$ac_t""no" 1>&6
11119 have_lwp=no
11120 fi
11121
11122
11123                 if test $have_lwp = yes ; then
11124                         cat >> confdefs.h <<\EOF
11125 #define HAVE_LWP 1
11126 EOF
11127
11128                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11129                         ol_link_threads=lwp
11130
11131                         if test $ol_with_yielding_select = auto ; then
11132                                 ol_with_yielding_select=no
11133                         fi
11134                 fi
11135         fi
11136 fi
11137
11138 if test $ol_with_yielding_select = yes ; then
11139         cat >> confdefs.h <<\EOF
11140 #define HAVE_YIELDING_SELECT 1
11141 EOF
11142
11143 fi
11144
11145 if test $ol_with_threads = manual ; then
11146                 ol_link_threads=yes
11147
11148         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11149
11150         for ac_hdr in pthread.h sched.h
11151 do
11152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11154 echo "configure:11155: checking for $ac_hdr" >&5
11155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   cat > conftest.$ac_ext <<EOF
11159 #line 11160 "configure"
11160 #include "confdefs.h"
11161 #include <$ac_hdr>
11162 EOF
11163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11164 { (eval echo configure:11165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11166 if test -z "$ac_err"; then
11167   rm -rf conftest*
11168   eval "ac_cv_header_$ac_safe=yes"
11169 else
11170   echo "$ac_err" >&5
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -rf conftest*
11174   eval "ac_cv_header_$ac_safe=no"
11175 fi
11176 rm -f conftest*
11177 fi
11178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11179   echo "$ac_t""yes" 1>&6
11180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11181   cat >> confdefs.h <<EOF
11182 #define $ac_tr_hdr 1
11183 EOF
11184  
11185 else
11186   echo "$ac_t""no" 1>&6
11187 fi
11188 done
11189
11190         for ac_func in sched_yield pthread_yield
11191 do
11192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11193 echo "configure:11194: checking for $ac_func" >&5
11194 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11195   echo $ac_n "(cached) $ac_c" 1>&6
11196 else
11197   cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 /* System header to define __stub macros and hopefully few prototypes,
11201     which can conflict with char $ac_func(); below.  */
11202 #include <assert.h>
11203 /* Override any gcc2 internal prototype to avoid an error.  */
11204 /* We use char because int might match the return type of a gcc2
11205     builtin and then its argument prototype would still apply.  */
11206 char $ac_func();
11207 char (*f)();
11208
11209 int main() {
11210
11211 /* The GNU C library defines this for functions which it implements
11212     to always fail with ENOSYS.  Some functions are actually named
11213     something starting with __ and the normal name is an alias.  */
11214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11215 choke me
11216 #else
11217 f = $ac_func;
11218 #endif
11219
11220 ; return 0; }
11221 EOF
11222 if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11223   rm -rf conftest*
11224   eval "ac_cv_func_$ac_func=yes"
11225 else
11226   echo "configure: failed program was:" >&5
11227   cat conftest.$ac_ext >&5
11228   rm -rf conftest*
11229   eval "ac_cv_func_$ac_func=no"
11230 fi
11231 rm -f conftest*
11232 fi
11233
11234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11235   echo "$ac_t""yes" 1>&6
11236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11237   cat >> confdefs.h <<EOF
11238 #define $ac_tr_func 1
11239 EOF
11240  
11241 else
11242   echo "$ac_t""no" 1>&6
11243 fi
11244 done
11245
11246         
11247         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11248 echo "configure:11249: checking for LinuxThreads pthread.h" >&5
11249 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11250   echo $ac_n "(cached) $ac_c" 1>&6
11251 else
11252   cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 #include <pthread.h>
11256 EOF
11257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11258   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11259   rm -rf conftest*
11260   ol_cv_header_linux_threads=yes
11261 else
11262   rm -rf conftest*
11263   ol_cv_header_linux_threads=no
11264 fi
11265 rm -f conftest*
11266
11267                 
11268 fi
11269
11270 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11271         if test $ol_cv_header_linux_threads = yes; then
11272                 cat >> confdefs.h <<\EOF
11273 #define HAVE_LINUX_THREADS 1
11274 EOF
11275
11276         fi
11277
11278
11279         for ac_hdr in mach/cthreads.h
11280 do
11281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11283 echo "configure:11284: checking for $ac_hdr" >&5
11284 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11285   echo $ac_n "(cached) $ac_c" 1>&6
11286 else
11287   cat > conftest.$ac_ext <<EOF
11288 #line 11289 "configure"
11289 #include "confdefs.h"
11290 #include <$ac_hdr>
11291 EOF
11292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11293 { (eval echo configure:11294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11295 if test -z "$ac_err"; then
11296   rm -rf conftest*
11297   eval "ac_cv_header_$ac_safe=yes"
11298 else
11299   echo "$ac_err" >&5
11300   echo "configure: failed program was:" >&5
11301   cat conftest.$ac_ext >&5
11302   rm -rf conftest*
11303   eval "ac_cv_header_$ac_safe=no"
11304 fi
11305 rm -f conftest*
11306 fi
11307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11308   echo "$ac_t""yes" 1>&6
11309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11310   cat >> confdefs.h <<EOF
11311 #define $ac_tr_hdr 1
11312 EOF
11313  
11314 else
11315   echo "$ac_t""no" 1>&6
11316 fi
11317 done
11318
11319         for ac_hdr in lwp/lwp.h
11320 do
11321 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11322 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11323 echo "configure:11324: checking for $ac_hdr" >&5
11324 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11325   echo $ac_n "(cached) $ac_c" 1>&6
11326 else
11327   cat > conftest.$ac_ext <<EOF
11328 #line 11329 "configure"
11329 #include "confdefs.h"
11330 #include <$ac_hdr>
11331 EOF
11332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11333 { (eval echo configure:11334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11335 if test -z "$ac_err"; then
11336   rm -rf conftest*
11337   eval "ac_cv_header_$ac_safe=yes"
11338 else
11339   echo "$ac_err" >&5
11340   echo "configure: failed program was:" >&5
11341   cat conftest.$ac_ext >&5
11342   rm -rf conftest*
11343   eval "ac_cv_header_$ac_safe=no"
11344 fi
11345 rm -f conftest*
11346 fi
11347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11348   echo "$ac_t""yes" 1>&6
11349     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11350   cat >> confdefs.h <<EOF
11351 #define $ac_tr_hdr 1
11352 EOF
11353  
11354 else
11355   echo "$ac_t""no" 1>&6
11356 fi
11357 done
11358
11359         for ac_hdr in thread.h synch.h
11360 do
11361 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11362 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11363 echo "configure:11364: checking for $ac_hdr" >&5
11364 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11365   echo $ac_n "(cached) $ac_c" 1>&6
11366 else
11367   cat > conftest.$ac_ext <<EOF
11368 #line 11369 "configure"
11369 #include "confdefs.h"
11370 #include <$ac_hdr>
11371 EOF
11372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11373 { (eval echo configure:11374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11375 if test -z "$ac_err"; then
11376   rm -rf conftest*
11377   eval "ac_cv_header_$ac_safe=yes"
11378 else
11379   echo "$ac_err" >&5
11380   echo "configure: failed program was:" >&5
11381   cat conftest.$ac_ext >&5
11382   rm -rf conftest*
11383   eval "ac_cv_header_$ac_safe=no"
11384 fi
11385 rm -f conftest*
11386 fi
11387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11388   echo "$ac_t""yes" 1>&6
11389     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11390   cat >> confdefs.h <<EOF
11391 #define $ac_tr_hdr 1
11392 EOF
11393  
11394 else
11395   echo "$ac_t""no" 1>&6
11396 fi
11397 done
11398
11399 fi
11400
11401 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11402                         cat >> confdefs.h <<\EOF
11403 #define REENTRANT 1
11404 EOF
11405
11406         cat >> confdefs.h <<\EOF
11407 #define _REENTRANT 1
11408 EOF
11409
11410         cat >> confdefs.h <<\EOF
11411 #define THREAD_SAFE 1
11412 EOF
11413
11414         cat >> confdefs.h <<\EOF
11415 #define _THREAD_SAFE 1
11416 EOF
11417
11418         cat >> confdefs.h <<\EOF
11419 #define THREADSAFE 1
11420 EOF
11421
11422         cat >> confdefs.h <<\EOF
11423 #define _THREADSAFE 1
11424 EOF
11425
11426         cat >> confdefs.h <<\EOF
11427 #define _SGI_MP_SOURCE 1
11428 EOF
11429
11430
11431                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11432 echo "configure:11433: checking for thread specific errno" >&5
11433 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11434   echo $ac_n "(cached) $ac_c" 1>&6
11435 else
11436   
11437                 cat > conftest.$ac_ext <<EOF
11438 #line 11439 "configure"
11439 #include "confdefs.h"
11440 #include <errno.h>
11441 int main() {
11442 errno = 0;
11443 ; return 0; }
11444 EOF
11445 if { (eval echo configure:11446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11446   rm -rf conftest*
11447   ol_cv_errno_thread_specific=yes
11448 else
11449   echo "configure: failed program was:" >&5
11450   cat conftest.$ac_ext >&5
11451   rm -rf conftest*
11452   ol_cv_errno_thread_specific=no
11453 fi
11454 rm -f conftest*
11455         
11456 fi
11457
11458 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11459
11460                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11461 echo "configure:11462: checking for thread specific h_errno" >&5
11462 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11463   echo $ac_n "(cached) $ac_c" 1>&6
11464 else
11465   
11466                 cat > conftest.$ac_ext <<EOF
11467 #line 11468 "configure"
11468 #include "confdefs.h"
11469 #include <netdb.h>
11470 int main() {
11471 h_errno = 0;
11472 ; return 0; }
11473 EOF
11474 if { (eval echo configure:11475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11475   rm -rf conftest*
11476   ol_cv_h_errno_thread_specific=yes
11477 else
11478   echo "configure: failed program was:" >&5
11479   cat conftest.$ac_ext >&5
11480   rm -rf conftest*
11481   ol_cv_h_errno_thread_specific=no
11482 fi
11483 rm -f conftest*
11484         
11485 fi
11486
11487 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11488
11489         if test $ol_cv_errno_thread_specific != yes \
11490                 -o $ol_cv_h_errno_thread_specific != yes ; then
11491                 LIBS="$LTHREAD_LIBS $LIBS"
11492                 LTHREAD_LIBS=""
11493         fi
11494
11495 fi  
11496
11497 if test $ol_link_threads = no ; then
11498         if test $ol_with_threads = yes ; then
11499                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11500         fi
11501
11502         if test $ol_with_threads = auto ; then
11503                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11504                 ol_with_threads=no
11505         fi
11506
11507         cat >> confdefs.h <<\EOF
11508 #define NO_THREADS 1
11509 EOF
11510
11511         LTHREAD_LIBS=""
11512 fi
11513
11514 if test $ol_link_threads != no ; then
11515         cat >> confdefs.h <<\EOF
11516 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11517 EOF
11518
11519 fi
11520
11521 ol_link_ldbm=no 
11522
11523 if test $ol_with_ldbm_api = auto \
11524         -o $ol_with_ldbm_api = berkeley \
11525         -o $ol_with_ldbm_api = bcompat ; then
11526
11527         if test $ol_with_ldbm_api = bcompat; then \
11528                 ol_cv_berkeley_db=no
11529 for ac_hdr in db_185.h db.h
11530 do
11531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11533 echo "configure:11534: checking for $ac_hdr" >&5
11534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11535   echo $ac_n "(cached) $ac_c" 1>&6
11536 else
11537   cat > conftest.$ac_ext <<EOF
11538 #line 11539 "configure"
11539 #include "confdefs.h"
11540 #include <$ac_hdr>
11541 EOF
11542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11543 { (eval echo configure:11544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11545 if test -z "$ac_err"; then
11546   rm -rf conftest*
11547   eval "ac_cv_header_$ac_safe=yes"
11548 else
11549   echo "$ac_err" >&5
11550   echo "configure: failed program was:" >&5
11551   cat conftest.$ac_ext >&5
11552   rm -rf conftest*
11553   eval "ac_cv_header_$ac_safe=no"
11554 fi
11555 rm -f conftest*
11556 fi
11557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11558   echo "$ac_t""yes" 1>&6
11559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11560   cat >> confdefs.h <<EOF
11561 #define $ac_tr_hdr 1
11562 EOF
11563  
11564 else
11565   echo "$ac_t""no" 1>&6
11566 fi
11567 done
11568
11569 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11570         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11571 echo "configure:11572: checking if Berkeley DB header compatibility" >&5
11572 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11573   echo $ac_n "(cached) $ac_c" 1>&6
11574 else
11575   
11576                 cat > conftest.$ac_ext <<EOF
11577 #line 11578 "configure"
11578 #include "confdefs.h"
11579
11580 #if HAVE_DB_185_H
11581 #       include <db_185.h>
11582 #else
11583 #       include <db.h>
11584 #endif
11585
11586  /* this check could be improved */
11587 #ifndef DB_VERSION_MAJOR
11588 #       define DB_VERSION_MAJOR 1
11589 #endif
11590
11591 #if DB_VERSION_MAJOR == 1 
11592         __db_version_1
11593 #endif
11594
11595 EOF
11596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11597   egrep "__db_version_1" >/dev/null 2>&1; then
11598   rm -rf conftest*
11599   ol_cv_header_db1=yes
11600 else
11601   rm -rf conftest*
11602   ol_cv_header_db1=no
11603 fi
11604 rm -f conftest*
11605
11606 fi
11607
11608 echo "$ac_t""$ol_cv_header_db1" 1>&6
11609
11610         if test ol_cv_header_db1=yes ; then
11611                 ol_cv_lib_db=no
11612 if test $ol_cv_lib_db = no ; then
11613         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11614 echo "configure:11615: checking for Berkeley DB link (default)" >&5
11615 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11616   echo $ac_n "(cached) $ac_c" 1>&6
11617 else
11618   
11619         ol_DB_LIB=
11620         ol_LIBS=$LIBS
11621         LIBS="$ol_DB_LIB $LIBS"
11622
11623         cat > conftest.$ac_ext <<EOF
11624 #line 11625 "configure"
11625 #include "confdefs.h"
11626
11627 #ifdef HAVE_DB_185_H
11628 # include <db_185.h>
11629 #else
11630 # include <db.h>
11631 #endif
11632
11633 #ifndef DB_VERSION_MAJOR
11634 # define DB_VERSION_MAJOR 1
11635 #endif
11636
11637 #ifndef NULL
11638 #define NULL ((void*)0)
11639 #endif
11640
11641 int main() {
11642
11643 #if DB_VERSION_MAJOR > 2
11644         db_env_create( NULL, 0 );
11645 #elif DB_VERSION_MAJOR > 1
11646         db_appexit( NULL );
11647 #else
11648         (void) dbopen( NULL, 0, 0, 0, NULL);
11649 #endif
11650
11651 ; return 0; }
11652 EOF
11653 if { (eval echo configure:11654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11654   rm -rf conftest*
11655   ol_cv_db_none=yes
11656 else
11657   echo "configure: failed program was:" >&5
11658   cat conftest.$ac_ext >&5
11659   rm -rf conftest*
11660   ol_cv_db_none=no
11661 fi
11662 rm -f conftest*
11663
11664         LIBS="$ol_LIBS"
11665
11666 fi
11667
11668 echo "$ac_t""$ol_cv_db_none" 1>&6
11669
11670         if test $ol_cv_db_none = yes ; then
11671                 ol_cv_lib_db=yes
11672         fi
11673 fi
11674
11675 if test $ol_cv_lib_db = no ; then
11676         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11677 echo "configure:11678: checking for Berkeley DB link (-ldb)" >&5
11678 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11679   echo $ac_n "(cached) $ac_c" 1>&6
11680 else
11681   
11682         ol_DB_LIB=-ldb
11683         ol_LIBS=$LIBS
11684         LIBS="$ol_DB_LIB $LIBS"
11685
11686         cat > conftest.$ac_ext <<EOF
11687 #line 11688 "configure"
11688 #include "confdefs.h"
11689
11690 #ifdef HAVE_DB_185_H
11691 # include <db_185.h>
11692 #else
11693 # include <db.h>
11694 #endif
11695
11696 #ifndef DB_VERSION_MAJOR
11697 # define DB_VERSION_MAJOR 1
11698 #endif
11699
11700 #ifndef NULL
11701 #define NULL ((void*)0)
11702 #endif
11703
11704 int main() {
11705
11706 #if DB_VERSION_MAJOR > 2
11707         db_env_create( NULL, 0 );
11708 #elif DB_VERSION_MAJOR > 1
11709         db_appexit( NULL );
11710 #else
11711         (void) dbopen( NULL, 0, 0, 0, NULL);
11712 #endif
11713
11714 ; return 0; }
11715 EOF
11716 if { (eval echo configure:11717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11717   rm -rf conftest*
11718   ol_cv_db_db=yes
11719 else
11720   echo "configure: failed program was:" >&5
11721   cat conftest.$ac_ext >&5
11722   rm -rf conftest*
11723   ol_cv_db_db=no
11724 fi
11725 rm -f conftest*
11726
11727         LIBS="$ol_LIBS"
11728
11729 fi
11730
11731 echo "$ac_t""$ol_cv_db_db" 1>&6
11732
11733         if test $ol_cv_db_db = yes ; then
11734                 ol_cv_lib_db=-ldb
11735         fi
11736 fi
11737
11738 if test $ol_cv_lib_db = no ; then
11739         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11740 echo "configure:11741: checking for Berkeley DB link (-ldb3)" >&5
11741 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11742   echo $ac_n "(cached) $ac_c" 1>&6
11743 else
11744   
11745         ol_DB_LIB=-ldb3
11746         ol_LIBS=$LIBS
11747         LIBS="$ol_DB_LIB $LIBS"
11748
11749         cat > conftest.$ac_ext <<EOF
11750 #line 11751 "configure"
11751 #include "confdefs.h"
11752
11753 #ifdef HAVE_DB_185_H
11754 # include <db_185.h>
11755 #else
11756 # include <db.h>
11757 #endif
11758
11759 #ifndef DB_VERSION_MAJOR
11760 # define DB_VERSION_MAJOR 1
11761 #endif
11762
11763 #ifndef NULL
11764 #define NULL ((void*)0)
11765 #endif
11766
11767 int main() {
11768
11769 #if DB_VERSION_MAJOR > 2
11770         db_env_create( NULL, 0 );
11771 #elif DB_VERSION_MAJOR > 1
11772         db_appexit( NULL );
11773 #else
11774         (void) dbopen( NULL, 0, 0, 0, NULL);
11775 #endif
11776
11777 ; return 0; }
11778 EOF
11779 if { (eval echo configure:11780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11780   rm -rf conftest*
11781   ol_cv_db_db3=yes
11782 else
11783   echo "configure: failed program was:" >&5
11784   cat conftest.$ac_ext >&5
11785   rm -rf conftest*
11786   ol_cv_db_db3=no
11787 fi
11788 rm -f conftest*
11789
11790         LIBS="$ol_LIBS"
11791
11792 fi
11793
11794 echo "$ac_t""$ol_cv_db_db3" 1>&6
11795
11796         if test $ol_cv_db_db3 = yes ; then
11797                 ol_cv_lib_db=-ldb3
11798         fi
11799 fi
11800
11801 if test $ol_cv_lib_db = no ; then
11802         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11803 echo "configure:11804: checking for Berkeley DB link (-ldb2)" >&5
11804 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11805   echo $ac_n "(cached) $ac_c" 1>&6
11806 else
11807   
11808         ol_DB_LIB=-ldb2
11809         ol_LIBS=$LIBS
11810         LIBS="$ol_DB_LIB $LIBS"
11811
11812         cat > conftest.$ac_ext <<EOF
11813 #line 11814 "configure"
11814 #include "confdefs.h"
11815
11816 #ifdef HAVE_DB_185_H
11817 # include <db_185.h>
11818 #else
11819 # include <db.h>
11820 #endif
11821
11822 #ifndef DB_VERSION_MAJOR
11823 # define DB_VERSION_MAJOR 1
11824 #endif
11825
11826 #ifndef NULL
11827 #define NULL ((void*)0)
11828 #endif
11829
11830 int main() {
11831
11832 #if DB_VERSION_MAJOR > 2
11833         db_env_create( NULL, 0 );
11834 #elif DB_VERSION_MAJOR > 1
11835         db_appexit( NULL );
11836 #else
11837         (void) dbopen( NULL, 0, 0, 0, NULL);
11838 #endif
11839
11840 ; return 0; }
11841 EOF
11842 if { (eval echo configure:11843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11843   rm -rf conftest*
11844   ol_cv_db_db2=yes
11845 else
11846   echo "configure: failed program was:" >&5
11847   cat conftest.$ac_ext >&5
11848   rm -rf conftest*
11849   ol_cv_db_db2=no
11850 fi
11851 rm -f conftest*
11852
11853         LIBS="$ol_LIBS"
11854
11855 fi
11856
11857 echo "$ac_t""$ol_cv_db_db2" 1>&6
11858
11859         if test $ol_cv_db_db2 = yes ; then
11860                 ol_cv_lib_db=-ldb2
11861         fi
11862 fi
11863
11864 if test $ol_cv_lib_db = no ; then
11865         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11866 echo "configure:11867: checking for Berkeley DB link (-ldb1)" >&5
11867 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11868   echo $ac_n "(cached) $ac_c" 1>&6
11869 else
11870   
11871         ol_DB_LIB=-ldb1
11872         ol_LIBS=$LIBS
11873         LIBS="$ol_DB_LIB $LIBS"
11874
11875         cat > conftest.$ac_ext <<EOF
11876 #line 11877 "configure"
11877 #include "confdefs.h"
11878
11879 #ifdef HAVE_DB_185_H
11880 # include <db_185.h>
11881 #else
11882 # include <db.h>
11883 #endif
11884
11885 #ifndef DB_VERSION_MAJOR
11886 # define DB_VERSION_MAJOR 1
11887 #endif
11888
11889 #ifndef NULL
11890 #define NULL ((void*)0)
11891 #endif
11892
11893 int main() {
11894
11895 #if DB_VERSION_MAJOR > 2
11896         db_env_create( NULL, 0 );
11897 #elif DB_VERSION_MAJOR > 1
11898         db_appexit( NULL );
11899 #else
11900         (void) dbopen( NULL, 0, 0, 0, NULL);
11901 #endif
11902
11903 ; return 0; }
11904 EOF
11905 if { (eval echo configure:11906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11906   rm -rf conftest*
11907   ol_cv_db_db1=yes
11908 else
11909   echo "configure: failed program was:" >&5
11910   cat conftest.$ac_ext >&5
11911   rm -rf conftest*
11912   ol_cv_db_db1=no
11913 fi
11914 rm -f conftest*
11915
11916         LIBS="$ol_LIBS"
11917
11918 fi
11919
11920 echo "$ac_t""$ol_cv_db_db1" 1>&6
11921
11922         if test $ol_cv_db_db1 = yes ; then
11923                 ol_cv_lib_db=-ldb1
11924         fi
11925 fi
11926
11927
11928                 if test "$ol_cv_lib_db" != no ; then
11929                         ol_cv_berkeley_db=yes
11930                 fi
11931         fi
11932 fi
11933
11934         else
11935                 ol_cv_berkeley_db=no
11936 for ac_hdr in db.h
11937 do
11938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11940 echo "configure:11941: checking for $ac_hdr" >&5
11941 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11942   echo $ac_n "(cached) $ac_c" 1>&6
11943 else
11944   cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947 #include <$ac_hdr>
11948 EOF
11949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11950 { (eval echo configure:11951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11952 if test -z "$ac_err"; then
11953   rm -rf conftest*
11954   eval "ac_cv_header_$ac_safe=yes"
11955 else
11956   echo "$ac_err" >&5
11957   echo "configure: failed program was:" >&5
11958   cat conftest.$ac_ext >&5
11959   rm -rf conftest*
11960   eval "ac_cv_header_$ac_safe=no"
11961 fi
11962 rm -f conftest*
11963 fi
11964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11965   echo "$ac_t""yes" 1>&6
11966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11967   cat >> confdefs.h <<EOF
11968 #define $ac_tr_hdr 1
11969 EOF
11970  
11971 else
11972   echo "$ac_t""no" 1>&6
11973 fi
11974 done
11975
11976 if test $ac_cv_header_db_h = yes; then
11977         ol_cv_lib_db=no
11978 if test $ol_cv_lib_db = no ; then
11979         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11980 echo "configure:11981: checking for Berkeley DB link (default)" >&5
11981 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11982   echo $ac_n "(cached) $ac_c" 1>&6
11983 else
11984   
11985         ol_DB_LIB=
11986         ol_LIBS=$LIBS
11987         LIBS="$ol_DB_LIB $LIBS"
11988
11989         cat > conftest.$ac_ext <<EOF
11990 #line 11991 "configure"
11991 #include "confdefs.h"
11992
11993 #ifdef HAVE_DB_185_H
11994 # include <db_185.h>
11995 #else
11996 # include <db.h>
11997 #endif
11998
11999 #ifndef DB_VERSION_MAJOR
12000 # define DB_VERSION_MAJOR 1
12001 #endif
12002
12003 #ifndef NULL
12004 #define NULL ((void*)0)
12005 #endif
12006
12007 int main() {
12008
12009 #if DB_VERSION_MAJOR > 2
12010         db_env_create( NULL, 0 );
12011 #elif DB_VERSION_MAJOR > 1
12012         db_appexit( NULL );
12013 #else
12014         (void) dbopen( NULL, 0, 0, 0, NULL);
12015 #endif
12016
12017 ; return 0; }
12018 EOF
12019 if { (eval echo configure:12020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12020   rm -rf conftest*
12021   ol_cv_db_none=yes
12022 else
12023   echo "configure: failed program was:" >&5
12024   cat conftest.$ac_ext >&5
12025   rm -rf conftest*
12026   ol_cv_db_none=no
12027 fi
12028 rm -f conftest*
12029
12030         LIBS="$ol_LIBS"
12031
12032 fi
12033
12034 echo "$ac_t""$ol_cv_db_none" 1>&6
12035
12036         if test $ol_cv_db_none = yes ; then
12037                 ol_cv_lib_db=yes
12038         fi
12039 fi
12040
12041 if test $ol_cv_lib_db = no ; then
12042         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12043 echo "configure:12044: checking for Berkeley DB link (-ldb)" >&5
12044 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12045   echo $ac_n "(cached) $ac_c" 1>&6
12046 else
12047   
12048         ol_DB_LIB=-ldb
12049         ol_LIBS=$LIBS
12050         LIBS="$ol_DB_LIB $LIBS"
12051
12052         cat > conftest.$ac_ext <<EOF
12053 #line 12054 "configure"
12054 #include "confdefs.h"
12055
12056 #ifdef HAVE_DB_185_H
12057 # include <db_185.h>
12058 #else
12059 # include <db.h>
12060 #endif
12061
12062 #ifndef DB_VERSION_MAJOR
12063 # define DB_VERSION_MAJOR 1
12064 #endif
12065
12066 #ifndef NULL
12067 #define NULL ((void*)0)
12068 #endif
12069
12070 int main() {
12071
12072 #if DB_VERSION_MAJOR > 2
12073         db_env_create( NULL, 0 );
12074 #elif DB_VERSION_MAJOR > 1
12075         db_appexit( NULL );
12076 #else
12077         (void) dbopen( NULL, 0, 0, 0, NULL);
12078 #endif
12079
12080 ; return 0; }
12081 EOF
12082 if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12083   rm -rf conftest*
12084   ol_cv_db_db=yes
12085 else
12086   echo "configure: failed program was:" >&5
12087   cat conftest.$ac_ext >&5
12088   rm -rf conftest*
12089   ol_cv_db_db=no
12090 fi
12091 rm -f conftest*
12092
12093         LIBS="$ol_LIBS"
12094
12095 fi
12096
12097 echo "$ac_t""$ol_cv_db_db" 1>&6
12098
12099         if test $ol_cv_db_db = yes ; then
12100                 ol_cv_lib_db=-ldb
12101         fi
12102 fi
12103
12104 if test $ol_cv_lib_db = no ; then
12105         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12106 echo "configure:12107: checking for Berkeley DB link (-ldb3)" >&5
12107 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12108   echo $ac_n "(cached) $ac_c" 1>&6
12109 else
12110   
12111         ol_DB_LIB=-ldb3
12112         ol_LIBS=$LIBS
12113         LIBS="$ol_DB_LIB $LIBS"
12114
12115         cat > conftest.$ac_ext <<EOF
12116 #line 12117 "configure"
12117 #include "confdefs.h"
12118
12119 #ifdef HAVE_DB_185_H
12120 # include <db_185.h>
12121 #else
12122 # include <db.h>
12123 #endif
12124
12125 #ifndef DB_VERSION_MAJOR
12126 # define DB_VERSION_MAJOR 1
12127 #endif
12128
12129 #ifndef NULL
12130 #define NULL ((void*)0)
12131 #endif
12132
12133 int main() {
12134
12135 #if DB_VERSION_MAJOR > 2
12136         db_env_create( NULL, 0 );
12137 #elif DB_VERSION_MAJOR > 1
12138         db_appexit( NULL );
12139 #else
12140         (void) dbopen( NULL, 0, 0, 0, NULL);
12141 #endif
12142
12143 ; return 0; }
12144 EOF
12145 if { (eval echo configure:12146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12146   rm -rf conftest*
12147   ol_cv_db_db3=yes
12148 else
12149   echo "configure: failed program was:" >&5
12150   cat conftest.$ac_ext >&5
12151   rm -rf conftest*
12152   ol_cv_db_db3=no
12153 fi
12154 rm -f conftest*
12155
12156         LIBS="$ol_LIBS"
12157
12158 fi
12159
12160 echo "$ac_t""$ol_cv_db_db3" 1>&6
12161
12162         if test $ol_cv_db_db3 = yes ; then
12163                 ol_cv_lib_db=-ldb3
12164         fi
12165 fi
12166
12167 if test $ol_cv_lib_db = no ; then
12168         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12169 echo "configure:12170: checking for Berkeley DB link (-ldb2)" >&5
12170 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12171   echo $ac_n "(cached) $ac_c" 1>&6
12172 else
12173   
12174         ol_DB_LIB=-ldb2
12175         ol_LIBS=$LIBS
12176         LIBS="$ol_DB_LIB $LIBS"
12177
12178         cat > conftest.$ac_ext <<EOF
12179 #line 12180 "configure"
12180 #include "confdefs.h"
12181
12182 #ifdef HAVE_DB_185_H
12183 # include <db_185.h>
12184 #else
12185 # include <db.h>
12186 #endif
12187
12188 #ifndef DB_VERSION_MAJOR
12189 # define DB_VERSION_MAJOR 1
12190 #endif
12191
12192 #ifndef NULL
12193 #define NULL ((void*)0)
12194 #endif
12195
12196 int main() {
12197
12198 #if DB_VERSION_MAJOR > 2
12199         db_env_create( NULL, 0 );
12200 #elif DB_VERSION_MAJOR > 1
12201         db_appexit( NULL );
12202 #else
12203         (void) dbopen( NULL, 0, 0, 0, NULL);
12204 #endif
12205
12206 ; return 0; }
12207 EOF
12208 if { (eval echo configure:12209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12209   rm -rf conftest*
12210   ol_cv_db_db2=yes
12211 else
12212   echo "configure: failed program was:" >&5
12213   cat conftest.$ac_ext >&5
12214   rm -rf conftest*
12215   ol_cv_db_db2=no
12216 fi
12217 rm -f conftest*
12218
12219         LIBS="$ol_LIBS"
12220
12221 fi
12222
12223 echo "$ac_t""$ol_cv_db_db2" 1>&6
12224
12225         if test $ol_cv_db_db2 = yes ; then
12226                 ol_cv_lib_db=-ldb2
12227         fi
12228 fi
12229
12230 if test $ol_cv_lib_db = no ; then
12231         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12232 echo "configure:12233: checking for Berkeley DB link (-ldb1)" >&5
12233 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12234   echo $ac_n "(cached) $ac_c" 1>&6
12235 else
12236   
12237         ol_DB_LIB=-ldb1
12238         ol_LIBS=$LIBS
12239         LIBS="$ol_DB_LIB $LIBS"
12240
12241         cat > conftest.$ac_ext <<EOF
12242 #line 12243 "configure"
12243 #include "confdefs.h"
12244
12245 #ifdef HAVE_DB_185_H
12246 # include <db_185.h>
12247 #else
12248 # include <db.h>
12249 #endif
12250
12251 #ifndef DB_VERSION_MAJOR
12252 # define DB_VERSION_MAJOR 1
12253 #endif
12254
12255 #ifndef NULL
12256 #define NULL ((void*)0)
12257 #endif
12258
12259 int main() {
12260
12261 #if DB_VERSION_MAJOR > 2
12262         db_env_create( NULL, 0 );
12263 #elif DB_VERSION_MAJOR > 1
12264         db_appexit( NULL );
12265 #else
12266         (void) dbopen( NULL, 0, 0, 0, NULL);
12267 #endif
12268
12269 ; return 0; }
12270 EOF
12271 if { (eval echo configure:12272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12272   rm -rf conftest*
12273   ol_cv_db_db1=yes
12274 else
12275   echo "configure: failed program was:" >&5
12276   cat conftest.$ac_ext >&5
12277   rm -rf conftest*
12278   ol_cv_db_db1=no
12279 fi
12280 rm -f conftest*
12281
12282         LIBS="$ol_LIBS"
12283
12284 fi
12285
12286 echo "$ac_t""$ol_cv_db_db1" 1>&6
12287
12288         if test $ol_cv_db_db1 = yes ; then
12289                 ol_cv_lib_db=-ldb1
12290         fi
12291 fi
12292
12293
12294         if test "$ol_cv_lib_db" != no ; then
12295                 ol_cv_berkeley_db=yes
12296                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12297 echo "configure:12298: checking for Berkeley DB thread support" >&5
12298 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12299   echo $ac_n "(cached) $ac_c" 1>&6
12300 else
12301   
12302         ol_LIBS="$LIBS"
12303         if test $ol_cv_lib_db != yes ; then
12304                 LIBS="$ol_cv_lib_db"
12305         fi
12306
12307         if test "$cross_compiling" = yes; then
12308   ol_cv_berkeley_db_thread=cross
12309 else
12310   cat > conftest.$ac_ext <<EOF
12311 #line 12312 "configure"
12312 #include "confdefs.h"
12313
12314 #ifdef HAVE_DB_185_H
12315         choke me;
12316 #else
12317 #include <db.h>
12318 #endif
12319 #ifndef NULL
12320 #define NULL ((void *)0)
12321 #endif
12322 main()
12323 {
12324         int rc;
12325         u_int32_t flags = DB_CREATE | DB_THREAD;
12326
12327 #if DB_VERSION_MAJOR > 2
12328         DB_ENV *env = NULL;
12329
12330         rc = db_env_create( &env, 0 );
12331
12332         if( rc == 0 ) {
12333 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12334                 rc = env->open( env, NULL, flags, 0 );
12335 #else
12336                 rc = env->open( env, NULL, NULL, flags, 0 );
12337 #endif
12338         }
12339
12340 #else
12341         DB_ENV env;
12342         memset( &env, '\0', sizeof(env) );
12343
12344         rc = db_appinit( NULL, NULL, &env, flags );
12345
12346         if( rc == 0 ) {
12347                 db_appexit( &env );
12348         }
12349 #endif
12350 #if DB_VERSION_MAJOR > 2
12351 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12352         env->remove( env, NULL, DB_FORCE);
12353 #else
12354         env->remove( env, NULL, NULL, DB_FORCE);
12355 #endif
12356 #endif
12357
12358         return rc;
12359 }
12360 EOF
12361 if { (eval echo configure:12362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12362 then
12363   ol_cv_berkeley_db_thread=yes
12364 else
12365   echo "configure: failed program was:" >&5
12366   cat conftest.$ac_ext >&5
12367   rm -fr conftest*
12368   ol_cv_berkeley_db_thread=no
12369 fi
12370 rm -fr conftest*
12371 fi
12372
12373
12374         LIBS="$ol_LIBS"
12375
12376         if test $ol_cv_berkeley_db_thread != no ; then
12377                 cat >> confdefs.h <<\EOF
12378 #define HAVE_BERKELEY_DB_THREAD 1
12379 EOF
12380
12381         fi
12382
12383 fi
12384
12385 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12386         fi
12387 fi
12388
12389         fi
12390
12391         if test $ol_cv_berkeley_db != no ; then
12392                 cat >> confdefs.h <<\EOF
12393 #define HAVE_BERKELEY_DB 1
12394 EOF
12395
12396
12397                 ol_link_ldbm=berkeley
12398                 ol_with_ldbm_api=db
12399
12400                 if test $ol_with_ldbm_type = hash ; then
12401                         cat >> confdefs.h <<\EOF
12402 #define LDBM_USE_DBHASH 1
12403 EOF
12404
12405                 else
12406                         cat >> confdefs.h <<\EOF
12407 #define LDBM_USE_DBBTREE 1
12408 EOF
12409
12410                 fi
12411
12412                                                 if test $ol_cv_lib_db != yes ; then
12413                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12414                 fi
12415         fi
12416 fi
12417
12418 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12419         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12420         ol_with_ldbm_api=none
12421 fi
12422
12423 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12424         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12425 echo "configure:12426: checking for MDBM library" >&5
12426 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12427   echo $ac_n "(cached) $ac_c" 1>&6
12428 else
12429         ol_LIBS="$LIBS"
12430         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12431 echo "configure:12432: checking for mdbm_set_chain" >&5
12432 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12433   echo $ac_n "(cached) $ac_c" 1>&6
12434 else
12435   cat > conftest.$ac_ext <<EOF
12436 #line 12437 "configure"
12437 #include "confdefs.h"
12438 /* System header to define __stub macros and hopefully few prototypes,
12439     which can conflict with char mdbm_set_chain(); below.  */
12440 #include <assert.h>
12441 /* Override any gcc2 internal prototype to avoid an error.  */
12442 /* We use char because int might match the return type of a gcc2
12443     builtin and then its argument prototype would still apply.  */
12444 char mdbm_set_chain();
12445 char (*f)();
12446
12447 int main() {
12448
12449 /* The GNU C library defines this for functions which it implements
12450     to always fail with ENOSYS.  Some functions are actually named
12451     something starting with __ and the normal name is an alias.  */
12452 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12453 choke me
12454 #else
12455 f = mdbm_set_chain;
12456 #endif
12457
12458 ; return 0; }
12459 EOF
12460 if { (eval echo configure:12461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12461   rm -rf conftest*
12462   eval "ac_cv_func_mdbm_set_chain=yes"
12463 else
12464   echo "configure: failed program was:" >&5
12465   cat conftest.$ac_ext >&5
12466   rm -rf conftest*
12467   eval "ac_cv_func_mdbm_set_chain=no"
12468 fi
12469 rm -f conftest*
12470 fi
12471
12472 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12473   echo "$ac_t""yes" 1>&6
12474   ol_cv_lib_mdbm=yes
12475 else
12476   echo "$ac_t""no" 1>&6
12477
12478                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12479 echo "configure:12480: checking for mdbm_set_chain in -lmdbm" >&5
12480 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12481 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12482   echo $ac_n "(cached) $ac_c" 1>&6
12483 else
12484   ac_save_LIBS="$LIBS"
12485 LIBS="-lmdbm  $LIBS"
12486 cat > conftest.$ac_ext <<EOF
12487 #line 12488 "configure"
12488 #include "confdefs.h"
12489 /* Override any gcc2 internal prototype to avoid an error.  */
12490 /* We use char because int might match the return type of a gcc2
12491     builtin and then its argument prototype would still apply.  */
12492 char mdbm_set_chain();
12493
12494 int main() {
12495 mdbm_set_chain()
12496 ; return 0; }
12497 EOF
12498 if { (eval echo configure:12499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12499   rm -rf conftest*
12500   eval "ac_cv_lib_$ac_lib_var=yes"
12501 else
12502   echo "configure: failed program was:" >&5
12503   cat conftest.$ac_ext >&5
12504   rm -rf conftest*
12505   eval "ac_cv_lib_$ac_lib_var=no"
12506 fi
12507 rm -f conftest*
12508 LIBS="$ac_save_LIBS"
12509
12510 fi
12511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12512   echo "$ac_t""yes" 1>&6
12513   ol_cv_lib_mdbm=-lmdbm
12514 else
12515   echo "$ac_t""no" 1>&6
12516 ol_cv_lib_mdbm=no
12517 fi
12518
12519         
12520 fi
12521
12522         LIBS="$ol_LIBS"
12523
12524 fi
12525
12526 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12527
12528
12529  for ac_hdr in mdbm.h
12530 do
12531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12533 echo "configure:12534: checking for $ac_hdr" >&5
12534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12535   echo $ac_n "(cached) $ac_c" 1>&6
12536 else
12537   cat > conftest.$ac_ext <<EOF
12538 #line 12539 "configure"
12539 #include "confdefs.h"
12540 #include <$ac_hdr>
12541 EOF
12542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12543 { (eval echo configure:12544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12545 if test -z "$ac_err"; then
12546   rm -rf conftest*
12547   eval "ac_cv_header_$ac_safe=yes"
12548 else
12549   echo "$ac_err" >&5
12550   echo "configure: failed program was:" >&5
12551   cat conftest.$ac_ext >&5
12552   rm -rf conftest*
12553   eval "ac_cv_header_$ac_safe=no"
12554 fi
12555 rm -f conftest*
12556 fi
12557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12558   echo "$ac_t""yes" 1>&6
12559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12560   cat >> confdefs.h <<EOF
12561 #define $ac_tr_hdr 1
12562 EOF
12563  
12564 else
12565   echo "$ac_t""no" 1>&6
12566 fi
12567 done
12568
12569  echo $ac_n "checking for db""... $ac_c" 1>&6
12570 echo "configure:12571: checking for db" >&5
12571 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12572   echo $ac_n "(cached) $ac_c" 1>&6
12573 else
12574   
12575         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12576                 ol_cv_mdbm=no
12577         else
12578                 ol_cv_mdbm=yes
12579         fi
12580
12581 fi
12582
12583 echo "$ac_t""$ol_cv_mdbm" 1>&6
12584  if test $ol_cv_mdbm = yes ; then
12585         cat >> confdefs.h <<\EOF
12586 #define HAVE_MDBM 1
12587 EOF
12588
12589  fi
12590
12591
12592         if test $ol_cv_mdbm = yes ; then
12593                 ol_link_ldbm=mdbm
12594                 ol_with_ldbm_api=mdbm
12595                 if test $ol_cv_lib_mdbm != yes ; then
12596                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12597                 fi
12598         fi
12599 fi
12600
12601 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12602         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12603 echo "configure:12604: checking for GDBM library" >&5
12604 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12605   echo $ac_n "(cached) $ac_c" 1>&6
12606 else
12607         ol_LIBS="$LIBS"
12608         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12609 echo "configure:12610: checking for gdbm_open" >&5
12610 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12611   echo $ac_n "(cached) $ac_c" 1>&6
12612 else
12613   cat > conftest.$ac_ext <<EOF
12614 #line 12615 "configure"
12615 #include "confdefs.h"
12616 /* System header to define __stub macros and hopefully few prototypes,
12617     which can conflict with char gdbm_open(); below.  */
12618 #include <assert.h>
12619 /* Override any gcc2 internal prototype to avoid an error.  */
12620 /* We use char because int might match the return type of a gcc2
12621     builtin and then its argument prototype would still apply.  */
12622 char gdbm_open();
12623 char (*f)();
12624
12625 int main() {
12626
12627 /* The GNU C library defines this for functions which it implements
12628     to always fail with ENOSYS.  Some functions are actually named
12629     something starting with __ and the normal name is an alias.  */
12630 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12631 choke me
12632 #else
12633 f = gdbm_open;
12634 #endif
12635
12636 ; return 0; }
12637 EOF
12638 if { (eval echo configure:12639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12639   rm -rf conftest*
12640   eval "ac_cv_func_gdbm_open=yes"
12641 else
12642   echo "configure: failed program was:" >&5
12643   cat conftest.$ac_ext >&5
12644   rm -rf conftest*
12645   eval "ac_cv_func_gdbm_open=no"
12646 fi
12647 rm -f conftest*
12648 fi
12649
12650 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12651   echo "$ac_t""yes" 1>&6
12652   ol_cv_lib_gdbm=yes
12653 else
12654   echo "$ac_t""no" 1>&6
12655
12656                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12657 echo "configure:12658: checking for gdbm_open in -lgdbm" >&5
12658 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12659 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12660   echo $ac_n "(cached) $ac_c" 1>&6
12661 else
12662   ac_save_LIBS="$LIBS"
12663 LIBS="-lgdbm  $LIBS"
12664 cat > conftest.$ac_ext <<EOF
12665 #line 12666 "configure"
12666 #include "confdefs.h"
12667 /* Override any gcc2 internal prototype to avoid an error.  */
12668 /* We use char because int might match the return type of a gcc2
12669     builtin and then its argument prototype would still apply.  */
12670 char gdbm_open();
12671
12672 int main() {
12673 gdbm_open()
12674 ; return 0; }
12675 EOF
12676 if { (eval echo configure:12677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12677   rm -rf conftest*
12678   eval "ac_cv_lib_$ac_lib_var=yes"
12679 else
12680   echo "configure: failed program was:" >&5
12681   cat conftest.$ac_ext >&5
12682   rm -rf conftest*
12683   eval "ac_cv_lib_$ac_lib_var=no"
12684 fi
12685 rm -f conftest*
12686 LIBS="$ac_save_LIBS"
12687
12688 fi
12689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12690   echo "$ac_t""yes" 1>&6
12691   ol_cv_lib_gdbm=-lgdbm
12692 else
12693   echo "$ac_t""no" 1>&6
12694 ol_cv_lib_gdbm=no
12695 fi
12696
12697         
12698 fi
12699
12700         LIBS="$ol_LIBS"
12701
12702 fi
12703
12704 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12705
12706
12707  for ac_hdr in gdbm.h
12708 do
12709 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12710 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12711 echo "configure:12712: checking for $ac_hdr" >&5
12712 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12713   echo $ac_n "(cached) $ac_c" 1>&6
12714 else
12715   cat > conftest.$ac_ext <<EOF
12716 #line 12717 "configure"
12717 #include "confdefs.h"
12718 #include <$ac_hdr>
12719 EOF
12720 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12721 { (eval echo configure:12722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12722 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12723 if test -z "$ac_err"; then
12724   rm -rf conftest*
12725   eval "ac_cv_header_$ac_safe=yes"
12726 else
12727   echo "$ac_err" >&5
12728   echo "configure: failed program was:" >&5
12729   cat conftest.$ac_ext >&5
12730   rm -rf conftest*
12731   eval "ac_cv_header_$ac_safe=no"
12732 fi
12733 rm -f conftest*
12734 fi
12735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12736   echo "$ac_t""yes" 1>&6
12737     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12738   cat >> confdefs.h <<EOF
12739 #define $ac_tr_hdr 1
12740 EOF
12741  
12742 else
12743   echo "$ac_t""no" 1>&6
12744 fi
12745 done
12746
12747  echo $ac_n "checking for db""... $ac_c" 1>&6
12748 echo "configure:12749: checking for db" >&5
12749 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12750   echo $ac_n "(cached) $ac_c" 1>&6
12751 else
12752   
12753         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12754                 ol_cv_gdbm=no
12755         else
12756                 ol_cv_gdbm=yes
12757         fi
12758
12759 fi
12760
12761 echo "$ac_t""$ol_cv_gdbm" 1>&6
12762  if test $ol_cv_gdbm = yes ; then
12763         cat >> confdefs.h <<\EOF
12764 #define HAVE_GDBM 1
12765 EOF
12766
12767  fi
12768
12769
12770         if test $ol_cv_gdbm = yes ; then
12771                 ol_link_ldbm=gdbm
12772                 ol_with_ldbm_api=gdbm
12773
12774                 if test $ol_cv_lib_gdbm != yes ; then
12775                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12776                 fi
12777         fi
12778 fi
12779
12780 if test $ol_with_ldbm_api = ndbm ; then
12781         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12782 echo "configure:12783: checking for NDBM library" >&5
12783 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12784   echo $ac_n "(cached) $ac_c" 1>&6
12785 else
12786         ol_LIBS="$LIBS"
12787         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12788 echo "configure:12789: checking for dbm_open" >&5
12789 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12790   echo $ac_n "(cached) $ac_c" 1>&6
12791 else
12792   cat > conftest.$ac_ext <<EOF
12793 #line 12794 "configure"
12794 #include "confdefs.h"
12795 /* System header to define __stub macros and hopefully few prototypes,
12796     which can conflict with char dbm_open(); below.  */
12797 #include <assert.h>
12798 /* Override any gcc2 internal prototype to avoid an error.  */
12799 /* We use char because int might match the return type of a gcc2
12800     builtin and then its argument prototype would still apply.  */
12801 char dbm_open();
12802 char (*f)();
12803
12804 int main() {
12805
12806 /* The GNU C library defines this for functions which it implements
12807     to always fail with ENOSYS.  Some functions are actually named
12808     something starting with __ and the normal name is an alias.  */
12809 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12810 choke me
12811 #else
12812 f = dbm_open;
12813 #endif
12814
12815 ; return 0; }
12816 EOF
12817 if { (eval echo configure:12818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12818   rm -rf conftest*
12819   eval "ac_cv_func_dbm_open=yes"
12820 else
12821   echo "configure: failed program was:" >&5
12822   cat conftest.$ac_ext >&5
12823   rm -rf conftest*
12824   eval "ac_cv_func_dbm_open=no"
12825 fi
12826 rm -f conftest*
12827 fi
12828
12829 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12830   echo "$ac_t""yes" 1>&6
12831   ol_cv_lib_ndbm=yes
12832 else
12833   echo "$ac_t""no" 1>&6
12834
12835                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12836 echo "configure:12837: checking for dbm_open in -lndbm" >&5
12837 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12839   echo $ac_n "(cached) $ac_c" 1>&6
12840 else
12841   ac_save_LIBS="$LIBS"
12842 LIBS="-lndbm  $LIBS"
12843 cat > conftest.$ac_ext <<EOF
12844 #line 12845 "configure"
12845 #include "confdefs.h"
12846 /* Override any gcc2 internal prototype to avoid an error.  */
12847 /* We use char because int might match the return type of a gcc2
12848     builtin and then its argument prototype would still apply.  */
12849 char dbm_open();
12850
12851 int main() {
12852 dbm_open()
12853 ; return 0; }
12854 EOF
12855 if { (eval echo configure:12856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12856   rm -rf conftest*
12857   eval "ac_cv_lib_$ac_lib_var=yes"
12858 else
12859   echo "configure: failed program was:" >&5
12860   cat conftest.$ac_ext >&5
12861   rm -rf conftest*
12862   eval "ac_cv_lib_$ac_lib_var=no"
12863 fi
12864 rm -f conftest*
12865 LIBS="$ac_save_LIBS"
12866
12867 fi
12868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12869   echo "$ac_t""yes" 1>&6
12870   ol_cv_lib_ndbm=-lndbm
12871 else
12872   echo "$ac_t""no" 1>&6
12873
12874                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12875 echo "configure:12876: checking for dbm_open in -ldbm" >&5
12876 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12877 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12878   echo $ac_n "(cached) $ac_c" 1>&6
12879 else
12880   ac_save_LIBS="$LIBS"
12881 LIBS="-ldbm  $LIBS"
12882 cat > conftest.$ac_ext <<EOF
12883 #line 12884 "configure"
12884 #include "confdefs.h"
12885 /* Override any gcc2 internal prototype to avoid an error.  */
12886 /* We use char because int might match the return type of a gcc2
12887     builtin and then its argument prototype would still apply.  */
12888 char dbm_open();
12889
12890 int main() {
12891 dbm_open()
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_lib_$ac_lib_var=yes"
12897 else
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   eval "ac_cv_lib_$ac_lib_var=no"
12902 fi
12903 rm -f conftest*
12904 LIBS="$ac_save_LIBS"
12905
12906 fi
12907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12908   echo "$ac_t""yes" 1>&6
12909   ol_cv_lib_ndbm=-ldbm
12910 else
12911   echo "$ac_t""no" 1>&6
12912 ol_cv_lib_ndbm=no
12913 fi
12914                 
12915 fi
12916
12917         
12918 fi
12919
12920         LIBS="$ol_LIBS"
12921
12922 fi
12923
12924 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12925
12926
12927  for ac_hdr in ndbm.h
12928 do
12929 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12930 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12931 echo "configure:12932: checking for $ac_hdr" >&5
12932 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12933   echo $ac_n "(cached) $ac_c" 1>&6
12934 else
12935   cat > conftest.$ac_ext <<EOF
12936 #line 12937 "configure"
12937 #include "confdefs.h"
12938 #include <$ac_hdr>
12939 EOF
12940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12941 { (eval echo configure:12942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12943 if test -z "$ac_err"; then
12944   rm -rf conftest*
12945   eval "ac_cv_header_$ac_safe=yes"
12946 else
12947   echo "$ac_err" >&5
12948   echo "configure: failed program was:" >&5
12949   cat conftest.$ac_ext >&5
12950   rm -rf conftest*
12951   eval "ac_cv_header_$ac_safe=no"
12952 fi
12953 rm -f conftest*
12954 fi
12955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12956   echo "$ac_t""yes" 1>&6
12957     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12958   cat >> confdefs.h <<EOF
12959 #define $ac_tr_hdr 1
12960 EOF
12961  
12962 else
12963   echo "$ac_t""no" 1>&6
12964 fi
12965 done
12966
12967  echo $ac_n "checking for db""... $ac_c" 1>&6
12968 echo "configure:12969: checking for db" >&5
12969 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12970   echo $ac_n "(cached) $ac_c" 1>&6
12971 else
12972   
12973         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12974                 ol_cv_ndbm=no
12975         else
12976                 ol_cv_ndbm=yes
12977         fi
12978
12979 fi
12980
12981 echo "$ac_t""$ol_cv_ndbm" 1>&6
12982  if test $ol_cv_ndbm = yes ; then
12983         cat >> confdefs.h <<\EOF
12984 #define HAVE_NDBM 1
12985 EOF
12986
12987  fi
12988
12989
12990         if test $ol_cv_ndbm = yes ; then
12991                 ol_link_ldbm=ndbm
12992                 ol_with_ldbm_api=ndbm
12993
12994                 if test $ol_cv_lib_ndbm != yes ; then
12995                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12996                 fi
12997         fi
12998 fi
12999
13000 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13001         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13002         if test $ol_enable_ldbm = yes ; then
13003                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13004         fi
13005
13006         echo "configure: warning: disabling LDBM" 1>&2
13007         ol_enable_ldbm=no
13008 fi
13009
13010 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13011         LINK_BINS_DYNAMIC="yes"
13012 else
13013         LINK_BINS_DYNAMIC="no"
13014 fi
13015
13016 if test $ol_enable_wrappers != no ; then
13017         for ac_hdr in tcpd.h
13018 do
13019 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13020 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13021 echo "configure:13022: checking for $ac_hdr" >&5
13022 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13023   echo $ac_n "(cached) $ac_c" 1>&6
13024 else
13025   cat > conftest.$ac_ext <<EOF
13026 #line 13027 "configure"
13027 #include "confdefs.h"
13028 #include <$ac_hdr>
13029 EOF
13030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13031 { (eval echo configure:13032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13033 if test -z "$ac_err"; then
13034   rm -rf conftest*
13035   eval "ac_cv_header_$ac_safe=yes"
13036 else
13037   echo "$ac_err" >&5
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -rf conftest*
13041   eval "ac_cv_header_$ac_safe=no"
13042 fi
13043 rm -f conftest*
13044 fi
13045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13046   echo "$ac_t""yes" 1>&6
13047     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13048   cat >> confdefs.h <<EOF
13049 #define $ac_tr_hdr 1
13050 EOF
13051  
13052 else
13053   echo "$ac_t""no" 1>&6
13054 fi
13055 done
13056
13057
13058         if test $ac_cv_header_tcpd_h != yes ; then
13059                 have_wrappers=no
13060         else
13061                 cat > conftest.$ac_ext <<EOF
13062 #line 13063 "configure"
13063 #include "confdefs.h"
13064
13065 int allow_severity = 0;
13066 int deny_severity  = 0;
13067                 
13068 int main() {
13069 hosts_access()
13070 ; return 0; }
13071 EOF
13072 if { (eval echo configure:13073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13073   rm -rf conftest*
13074   have_wrappers=yes
13075 else
13076   echo "configure: failed program was:" >&5
13077   cat conftest.$ac_ext >&5
13078   rm -rf conftest*
13079   have_wrappers=no
13080 fi
13081 rm -f conftest*
13082         fi
13083
13084         if test $have_wrappers = yes ; then
13085                 cat >> confdefs.h <<\EOF
13086 #define HAVE_TCPD 1
13087 EOF
13088
13089                 WRAP_LIBS="-lwrap"
13090
13091                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13092 echo "configure:13093: checking for main in -lnsl" >&5
13093 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13095   echo $ac_n "(cached) $ac_c" 1>&6
13096 else
13097   ac_save_LIBS="$LIBS"
13098 LIBS="-lnsl  $LIBS"
13099 cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102
13103 int main() {
13104 main()
13105 ; return 0; }
13106 EOF
13107 if { (eval echo configure:13108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13108   rm -rf conftest*
13109   eval "ac_cv_lib_$ac_lib_var=yes"
13110 else
13111   echo "configure: failed program was:" >&5
13112   cat conftest.$ac_ext >&5
13113   rm -rf conftest*
13114   eval "ac_cv_lib_$ac_lib_var=no"
13115 fi
13116 rm -f conftest*
13117 LIBS="$ac_save_LIBS"
13118
13119 fi
13120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13121   echo "$ac_t""yes" 1>&6
13122     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13123     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13124   cat >> confdefs.h <<EOF
13125 #define $ac_tr_lib 1
13126 EOF
13127
13128   LIBS="-lnsl $LIBS"
13129
13130 else
13131   echo "$ac_t""no" 1>&6
13132 fi
13133
13134         else
13135                 echo "configure: warning: could not find -lwrap" 1>&2
13136                 if test $ol_enable_wrappers = yes ; then
13137                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13138                 fi
13139
13140                 echo "configure: warning: disabling wrappers support" 1>&2
13141                 ol_enable_wrappers=no
13142                 WRAP_LIBS=""
13143         fi
13144 fi
13145
13146 if test $ol_enable_syslog != no ; then
13147         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13148 echo "configure:13149: checking for openlog" >&5
13149 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13150   echo $ac_n "(cached) $ac_c" 1>&6
13151 else
13152   cat > conftest.$ac_ext <<EOF
13153 #line 13154 "configure"
13154 #include "confdefs.h"
13155 /* System header to define __stub macros and hopefully few prototypes,
13156     which can conflict with char openlog(); below.  */
13157 #include <assert.h>
13158 /* Override any gcc2 internal prototype to avoid an error.  */
13159 /* We use char because int might match the return type of a gcc2
13160     builtin and then its argument prototype would still apply.  */
13161 char openlog();
13162 char (*f)();
13163
13164 int main() {
13165
13166 /* The GNU C library defines this for functions which it implements
13167     to always fail with ENOSYS.  Some functions are actually named
13168     something starting with __ and the normal name is an alias.  */
13169 #if defined (__stub_openlog) || defined (__stub___openlog)
13170 choke me
13171 #else
13172 f = openlog;
13173 #endif
13174
13175 ; return 0; }
13176 EOF
13177 if { (eval echo configure:13178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13178   rm -rf conftest*
13179   eval "ac_cv_func_openlog=yes"
13180 else
13181   echo "configure: failed program was:" >&5
13182   cat conftest.$ac_ext >&5
13183   rm -rf conftest*
13184   eval "ac_cv_func_openlog=no"
13185 fi
13186 rm -f conftest*
13187 fi
13188
13189 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13190   echo "$ac_t""yes" 1>&6
13191   :
13192 else
13193   echo "$ac_t""no" 1>&6
13194 fi
13195
13196         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13197                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13198         fi
13199         ol_enable_syslog=$ac_cv_func_openlog
13200 fi
13201
13202 ol_link_sql=no
13203 if test $ol_enable_sql != no ; then
13204         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13205 echo "configure:13206: checking for SQLDriverConnect in -liodbc" >&5
13206 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13208   echo $ac_n "(cached) $ac_c" 1>&6
13209 else
13210   ac_save_LIBS="$LIBS"
13211 LIBS="-liodbc  $LIBS"
13212 cat > conftest.$ac_ext <<EOF
13213 #line 13214 "configure"
13214 #include "confdefs.h"
13215 /* Override any gcc2 internal prototype to avoid an error.  */
13216 /* We use char because int might match the return type of a gcc2
13217     builtin and then its argument prototype would still apply.  */
13218 char SQLDriverConnect();
13219
13220 int main() {
13221 SQLDriverConnect()
13222 ; return 0; }
13223 EOF
13224 if { (eval echo configure:13225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13225   rm -rf conftest*
13226   eval "ac_cv_lib_$ac_lib_var=yes"
13227 else
13228   echo "configure: failed program was:" >&5
13229   cat conftest.$ac_ext >&5
13230   rm -rf conftest*
13231   eval "ac_cv_lib_$ac_lib_var=no"
13232 fi
13233 rm -f conftest*
13234 LIBS="$ac_save_LIBS"
13235
13236 fi
13237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13238   echo "$ac_t""yes" 1>&6
13239   have_iodbc=yes
13240 else
13241   echo "$ac_t""no" 1>&6
13242 have_iodbc=no
13243 fi
13244
13245         if test $have_iodbc = yes ; then
13246                 ol_link_sql="-liodbc"
13247         else
13248                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13249 echo "configure:13250: checking for SQLDriverConnect in -lodbc" >&5
13250 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13251 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13252   echo $ac_n "(cached) $ac_c" 1>&6
13253 else
13254   ac_save_LIBS="$LIBS"
13255 LIBS="-lodbc  $LIBS"
13256 cat > conftest.$ac_ext <<EOF
13257 #line 13258 "configure"
13258 #include "confdefs.h"
13259 /* Override any gcc2 internal prototype to avoid an error.  */
13260 /* We use char because int might match the return type of a gcc2
13261     builtin and then its argument prototype would still apply.  */
13262 char SQLDriverConnect();
13263
13264 int main() {
13265 SQLDriverConnect()
13266 ; return 0; }
13267 EOF
13268 if { (eval echo configure:13269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13269   rm -rf conftest*
13270   eval "ac_cv_lib_$ac_lib_var=yes"
13271 else
13272   echo "configure: failed program was:" >&5
13273   cat conftest.$ac_ext >&5
13274   rm -rf conftest*
13275   eval "ac_cv_lib_$ac_lib_var=no"
13276 fi
13277 rm -f conftest*
13278 LIBS="$ac_save_LIBS"
13279
13280 fi
13281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13282   echo "$ac_t""yes" 1>&6
13283   have_odbc=yes
13284 else
13285   echo "$ac_t""no" 1>&6
13286 have_odbc=no
13287 fi
13288
13289                 if test $have_odbc = yes ; then
13290                         ol_link_sql="-lodbc"
13291                 fi
13292         fi
13293
13294         if test $ol_link_sql != no ; then
13295                 SLAPD_SQL_LIBS="$ol_link_sql"
13296
13297         elif test $ol_enable_sql != auto ; then
13298                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13299         fi
13300 fi
13301
13302 ol_link_termcap=no
13303 for ac_hdr in termcap.h ncurses.h
13304 do
13305 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13306 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13307 echo "configure:13308: checking for $ac_hdr" >&5
13308 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13309   echo $ac_n "(cached) $ac_c" 1>&6
13310 else
13311   cat > conftest.$ac_ext <<EOF
13312 #line 13313 "configure"
13313 #include "confdefs.h"
13314 #include <$ac_hdr>
13315 EOF
13316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13317 { (eval echo configure:13318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13319 if test -z "$ac_err"; then
13320   rm -rf conftest*
13321   eval "ac_cv_header_$ac_safe=yes"
13322 else
13323   echo "$ac_err" >&5
13324   echo "configure: failed program was:" >&5
13325   cat conftest.$ac_ext >&5
13326   rm -rf conftest*
13327   eval "ac_cv_header_$ac_safe=no"
13328 fi
13329 rm -f conftest*
13330 fi
13331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13332   echo "$ac_t""yes" 1>&6
13333     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13334   cat >> confdefs.h <<EOF
13335 #define $ac_tr_hdr 1
13336 EOF
13337  
13338 else
13339   echo "$ac_t""no" 1>&6
13340 fi
13341 done
13342
13343
13344 if test $ol_link_termcap = no ; then
13345         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13346 echo "configure:13347: checking for tputs in -ltermcap" >&5
13347 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13348 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13349   echo $ac_n "(cached) $ac_c" 1>&6
13350 else
13351   ac_save_LIBS="$LIBS"
13352 LIBS="-ltermcap  $LIBS"
13353 cat > conftest.$ac_ext <<EOF
13354 #line 13355 "configure"
13355 #include "confdefs.h"
13356 /* Override any gcc2 internal prototype to avoid an error.  */
13357 /* We use char because int might match the return type of a gcc2
13358     builtin and then its argument prototype would still apply.  */
13359 char tputs();
13360
13361 int main() {
13362 tputs()
13363 ; return 0; }
13364 EOF
13365 if { (eval echo configure:13366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13366   rm -rf conftest*
13367   eval "ac_cv_lib_$ac_lib_var=yes"
13368 else
13369   echo "configure: failed program was:" >&5
13370   cat conftest.$ac_ext >&5
13371   rm -rf conftest*
13372   eval "ac_cv_lib_$ac_lib_var=no"
13373 fi
13374 rm -f conftest*
13375 LIBS="$ac_save_LIBS"
13376
13377 fi
13378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13379   echo "$ac_t""yes" 1>&6
13380   have_termcap=yes
13381 else
13382   echo "$ac_t""no" 1>&6
13383 have_termcap=no
13384 fi
13385
13386         if test $have_termcap = yes ; then
13387                 cat >> confdefs.h <<\EOF
13388 #define HAVE_TERMCAP 1
13389 EOF
13390
13391                 ol_link_termcap=yes
13392                 TERMCAP_LIBS=-ltermcap
13393         fi
13394 fi
13395
13396 if test $ol_link_termcap = no ; then
13397         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13398 echo "configure:13399: checking for initscr in -lncurses" >&5
13399 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13401   echo $ac_n "(cached) $ac_c" 1>&6
13402 else
13403   ac_save_LIBS="$LIBS"
13404 LIBS="-lncurses  $LIBS"
13405 cat > conftest.$ac_ext <<EOF
13406 #line 13407 "configure"
13407 #include "confdefs.h"
13408 /* Override any gcc2 internal prototype to avoid an error.  */
13409 /* We use char because int might match the return type of a gcc2
13410     builtin and then its argument prototype would still apply.  */
13411 char initscr();
13412
13413 int main() {
13414 initscr()
13415 ; return 0; }
13416 EOF
13417 if { (eval echo configure:13418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13418   rm -rf conftest*
13419   eval "ac_cv_lib_$ac_lib_var=yes"
13420 else
13421   echo "configure: failed program was:" >&5
13422   cat conftest.$ac_ext >&5
13423   rm -rf conftest*
13424   eval "ac_cv_lib_$ac_lib_var=no"
13425 fi
13426 rm -f conftest*
13427 LIBS="$ac_save_LIBS"
13428
13429 fi
13430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13431   echo "$ac_t""yes" 1>&6
13432   have_ncurses=yes
13433 else
13434   echo "$ac_t""no" 1>&6
13435 have_ncurses=no
13436 fi
13437
13438         if test $have_ncurses = yes ; then
13439                 cat >> confdefs.h <<\EOF
13440 #define HAVE_NCURSES 1
13441 EOF
13442
13443                 ol_link_termcap=yes
13444                 TERMCAP_LIBS=-lncurses
13445         fi
13446 fi
13447
13448 if test $ol_link_termcap = no ; then
13449         cat >> confdefs.h <<\EOF
13450 #define NO_TERMCAP 1
13451 EOF
13452
13453         TERMCAP_LIBS=
13454 fi
13455
13456 ol_link_sasl=no
13457 ol_link_spasswd=no
13458 if test $ol_with_cyrus_sasl != no ; then
13459         for ac_hdr in sasl.h
13460 do
13461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13463 echo "configure:13464: checking for $ac_hdr" >&5
13464 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13465   echo $ac_n "(cached) $ac_c" 1>&6
13466 else
13467   cat > conftest.$ac_ext <<EOF
13468 #line 13469 "configure"
13469 #include "confdefs.h"
13470 #include <$ac_hdr>
13471 EOF
13472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13473 { (eval echo configure:13474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13475 if test -z "$ac_err"; then
13476   rm -rf conftest*
13477   eval "ac_cv_header_$ac_safe=yes"
13478 else
13479   echo "$ac_err" >&5
13480   echo "configure: failed program was:" >&5
13481   cat conftest.$ac_ext >&5
13482   rm -rf conftest*
13483   eval "ac_cv_header_$ac_safe=no"
13484 fi
13485 rm -f conftest*
13486 fi
13487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13488   echo "$ac_t""yes" 1>&6
13489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13490   cat >> confdefs.h <<EOF
13491 #define $ac_tr_hdr 1
13492 EOF
13493  
13494 else
13495   echo "$ac_t""no" 1>&6
13496 fi
13497 done
13498
13499
13500         if test $ac_cv_header_sasl_h = yes ; then
13501                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13502 echo "configure:13503: checking for sasl_client_init in -lsasl" >&5
13503 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13505   echo $ac_n "(cached) $ac_c" 1>&6
13506 else
13507   ac_save_LIBS="$LIBS"
13508 LIBS="-lsasl  $LIBS"
13509 cat > conftest.$ac_ext <<EOF
13510 #line 13511 "configure"
13511 #include "confdefs.h"
13512 /* Override any gcc2 internal prototype to avoid an error.  */
13513 /* We use char because int might match the return type of a gcc2
13514     builtin and then its argument prototype would still apply.  */
13515 char sasl_client_init();
13516
13517 int main() {
13518 sasl_client_init()
13519 ; return 0; }
13520 EOF
13521 if { (eval echo configure:13522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13522   rm -rf conftest*
13523   eval "ac_cv_lib_$ac_lib_var=yes"
13524 else
13525   echo "configure: failed program was:" >&5
13526   cat conftest.$ac_ext >&5
13527   rm -rf conftest*
13528   eval "ac_cv_lib_$ac_lib_var=no"
13529 fi
13530 rm -f conftest*
13531 LIBS="$ac_save_LIBS"
13532
13533 fi
13534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13535   echo "$ac_t""yes" 1>&6
13536   have_cyrus_sasl=yes
13537 else
13538   echo "$ac_t""no" 1>&6
13539 have_cyrus_sasl=no
13540 fi
13541
13542
13543                 if test $have_cyrus_sasl != no ; then
13544                         SASL_LIBS="-lsasl"
13545                         cat >> confdefs.h <<\EOF
13546 #define HAVE_CYRUS_SASL 1
13547 EOF
13548
13549                         ol_link_sasl=yes
13550                 fi
13551         fi
13552
13553         if test $ol_link_sasl = no ; then
13554                 if test $ol_with_cyrus_sasl != auto ; then
13555                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13556                 else
13557                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13558                         echo "configure: warning: SASL authentication not supported!" 1>&2
13559                         if test $ol_link_tls = no ; then
13560                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13561                         fi
13562                 fi
13563
13564         elif test $ol_enable_spasswd != no ; then
13565                 ol_link_spasswd=yes
13566         fi
13567
13568 else
13569         echo "configure: warning: SASL authentication not supported!" 1>&2
13570         if test $ol_link_tls = no ; then
13571                 echo "configure: warning: Strong authentication not supported!" 1>&2
13572         fi
13573 fi
13574
13575 if test $cross_compiling != yes ; then
13576         dev=no
13577         if test -r /dev/urandom ; then
13578                 dev="/dev/urandom";
13579         elif test -r /idev/urandom ; then
13580                 dev="/idev/urandom";
13581         elif test -r /dev/srandom ; then
13582                 dev="/dev/srandom";
13583         elif test -r /dev/random ; then
13584                 dev="/dev/random";
13585         elif test -r /idev/random ; then
13586                 dev="/idev/random";
13587         fi
13588
13589         if test $dev != no ; then
13590                 cat >> confdefs.h <<EOF
13591 #define URANDOM_DEVICE "$dev"
13592 EOF
13593
13594         fi
13595 fi
13596
13597 ol_link_fetch=no
13598 if test $ol_with_fetch != no ; then
13599         ol_LIBS=$LIBS
13600 LIBS="-lfetch -lcom_err $LIBS"
13601 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13602 echo "configure:13603: checking fetch(3) library" >&5
13603 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13604   echo $ac_n "(cached) $ac_c" 1>&6
13605 else
13606   
13607         cat > conftest.$ac_ext <<EOF
13608 #line 13609 "configure"
13609 #include "confdefs.h"
13610
13611 #include <sys/param.h>
13612 #include <stdio.h>
13613 #include <fetch.h>
13614 int main() {
13615 struct url *u = fetchParseURL("file:///"); 
13616 ; return 0; }
13617 EOF
13618 if { (eval echo configure:13619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13619   rm -rf conftest*
13620   ol_cv_lib_fetch=yes
13621 else
13622   echo "configure: failed program was:" >&5
13623   cat conftest.$ac_ext >&5
13624   rm -rf conftest*
13625   ol_cv_lib_fetch=no
13626 fi
13627 rm -f conftest*
13628 fi
13629
13630 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13631 LIBS=$ol_LIBS
13632 if test $ol_cv_lib_fetch != no ; then
13633         ol_link_fetch="-lfetch -lcom_err"
13634         cat >> confdefs.h <<\EOF
13635 #define HAVE_FETCH 1
13636 EOF
13637
13638 fi
13639
13640
13641         if test $ol_cv_lib_fetch != no ; then
13642                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13643                 ol_link_fetch=freebsd
13644
13645         elif test $ol_with_fetch != auto ; then
13646                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13647         fi 
13648 fi
13649
13650 ol_link_readline=no
13651 if test $ol_with_readline != no ; then
13652         for ac_hdr in readline/readline.h readline/history.h
13653 do
13654 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13655 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13656 echo "configure:13657: checking for $ac_hdr" >&5
13657 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13658   echo $ac_n "(cached) $ac_c" 1>&6
13659 else
13660   cat > conftest.$ac_ext <<EOF
13661 #line 13662 "configure"
13662 #include "confdefs.h"
13663 #include <$ac_hdr>
13664 EOF
13665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13666 { (eval echo configure:13667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13668 if test -z "$ac_err"; then
13669   rm -rf conftest*
13670   eval "ac_cv_header_$ac_safe=yes"
13671 else
13672   echo "$ac_err" >&5
13673   echo "configure: failed program was:" >&5
13674   cat conftest.$ac_ext >&5
13675   rm -rf conftest*
13676   eval "ac_cv_header_$ac_safe=no"
13677 fi
13678 rm -f conftest*
13679 fi
13680 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13681   echo "$ac_t""yes" 1>&6
13682     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13683   cat >> confdefs.h <<EOF
13684 #define $ac_tr_hdr 1
13685 EOF
13686  
13687 else
13688   echo "$ac_t""no" 1>&6
13689 fi
13690 done
13691
13692
13693         if test $ac_cv_header_readline_readline_h = yes ; then
13694                 save_LIBS="$LIBS"
13695                 LIBS="$TERMCAP_LIBS $LIBS"
13696                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13697 echo "configure:13698: checking for readline in -lreadline" >&5
13698 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13700   echo $ac_n "(cached) $ac_c" 1>&6
13701 else
13702   ac_save_LIBS="$LIBS"
13703 LIBS="-lreadline  $LIBS"
13704 cat > conftest.$ac_ext <<EOF
13705 #line 13706 "configure"
13706 #include "confdefs.h"
13707 /* Override any gcc2 internal prototype to avoid an error.  */
13708 /* We use char because int might match the return type of a gcc2
13709     builtin and then its argument prototype would still apply.  */
13710 char readline();
13711
13712 int main() {
13713 readline()
13714 ; return 0; }
13715 EOF
13716 if { (eval echo configure:13717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13717   rm -rf conftest*
13718   eval "ac_cv_lib_$ac_lib_var=yes"
13719 else
13720   echo "configure: failed program was:" >&5
13721   cat conftest.$ac_ext >&5
13722   rm -rf conftest*
13723   eval "ac_cv_lib_$ac_lib_var=no"
13724 fi
13725 rm -f conftest*
13726 LIBS="$ac_save_LIBS"
13727
13728 fi
13729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13730   echo "$ac_t""yes" 1>&6
13731   have_readline=yes
13732 else
13733   echo "$ac_t""no" 1>&6
13734 have_readline=no
13735 fi
13736
13737                 LIBS="$save_LIBS"
13738                         
13739                 if test $have_readline = yes ; then
13740                         ol_with_readline=found
13741                         ol_link_readline=yes
13742
13743                         READLINE_LIBS="-lreadline"
13744                 fi
13745         fi
13746 fi
13747
13748 if test $ol_link_readline = yes ; then
13749         cat >> confdefs.h <<\EOF
13750 #define HAVE_READLINE 1
13751 EOF
13752
13753 fi
13754
13755
13756 if test $ol_enable_crypt != no ; then
13757         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13758 echo "configure:13759: checking for crypt" >&5
13759 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13760   echo $ac_n "(cached) $ac_c" 1>&6
13761 else
13762   cat > conftest.$ac_ext <<EOF
13763 #line 13764 "configure"
13764 #include "confdefs.h"
13765 /* System header to define __stub macros and hopefully few prototypes,
13766     which can conflict with char crypt(); below.  */
13767 #include <assert.h>
13768 /* Override any gcc2 internal prototype to avoid an error.  */
13769 /* We use char because int might match the return type of a gcc2
13770     builtin and then its argument prototype would still apply.  */
13771 char crypt();
13772 char (*f)();
13773
13774 int main() {
13775
13776 /* The GNU C library defines this for functions which it implements
13777     to always fail with ENOSYS.  Some functions are actually named
13778     something starting with __ and the normal name is an alias.  */
13779 #if defined (__stub_crypt) || defined (__stub___crypt)
13780 choke me
13781 #else
13782 f = crypt;
13783 #endif
13784
13785 ; return 0; }
13786 EOF
13787 if { (eval echo configure:13788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13788   rm -rf conftest*
13789   eval "ac_cv_func_crypt=yes"
13790 else
13791   echo "configure: failed program was:" >&5
13792   cat conftest.$ac_ext >&5
13793   rm -rf conftest*
13794   eval "ac_cv_func_crypt=no"
13795 fi
13796 rm -f conftest*
13797 fi
13798
13799 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13800   echo "$ac_t""yes" 1>&6
13801   have_crypt=yes
13802 else
13803   echo "$ac_t""no" 1>&6
13804
13805                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13806 echo "configure:13807: checking for crypt in -lcrypt" >&5
13807 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13809   echo $ac_n "(cached) $ac_c" 1>&6
13810 else
13811   ac_save_LIBS="$LIBS"
13812 LIBS="-lcrypt  $LIBS"
13813 cat > conftest.$ac_ext <<EOF
13814 #line 13815 "configure"
13815 #include "confdefs.h"
13816 /* Override any gcc2 internal prototype to avoid an error.  */
13817 /* We use char because int might match the return type of a gcc2
13818     builtin and then its argument prototype would still apply.  */
13819 char crypt();
13820
13821 int main() {
13822 crypt()
13823 ; return 0; }
13824 EOF
13825 if { (eval echo configure:13826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13826   rm -rf conftest*
13827   eval "ac_cv_lib_$ac_lib_var=yes"
13828 else
13829   echo "configure: failed program was:" >&5
13830   cat conftest.$ac_ext >&5
13831   rm -rf conftest*
13832   eval "ac_cv_lib_$ac_lib_var=no"
13833 fi
13834 rm -f conftest*
13835 LIBS="$ac_save_LIBS"
13836
13837 fi
13838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13839   echo "$ac_t""yes" 1>&6
13840   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13841                         have_crypt=yes
13842 else
13843   echo "$ac_t""no" 1>&6
13844 have_crypt=no
13845 fi
13846
13847 fi
13848
13849
13850         if test $have_crypt = yes ; then
13851                 cat >> confdefs.h <<\EOF
13852 #define HAVE_CRYPT 1
13853 EOF
13854
13855         else
13856                 echo "configure: warning: could not find crypt" 1>&2
13857                 if test $ol_enable_crypt = yes ; then
13858                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13859                 fi
13860
13861                 echo "configure: warning: disabling crypt support" 1>&2
13862                 ol_enable_crypt=no
13863         fi
13864 fi
13865
13866 if test $ol_enable_proctitle != no ; then
13867         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13868 echo "configure:13869: checking for setproctitle" >&5
13869 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13870   echo $ac_n "(cached) $ac_c" 1>&6
13871 else
13872   cat > conftest.$ac_ext <<EOF
13873 #line 13874 "configure"
13874 #include "confdefs.h"
13875 /* System header to define __stub macros and hopefully few prototypes,
13876     which can conflict with char setproctitle(); below.  */
13877 #include <assert.h>
13878 /* Override any gcc2 internal prototype to avoid an error.  */
13879 /* We use char because int might match the return type of a gcc2
13880     builtin and then its argument prototype would still apply.  */
13881 char setproctitle();
13882 char (*f)();
13883
13884 int main() {
13885
13886 /* The GNU C library defines this for functions which it implements
13887     to always fail with ENOSYS.  Some functions are actually named
13888     something starting with __ and the normal name is an alias.  */
13889 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13890 choke me
13891 #else
13892 f = setproctitle;
13893 #endif
13894
13895 ; return 0; }
13896 EOF
13897 if { (eval echo configure:13898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13898   rm -rf conftest*
13899   eval "ac_cv_func_setproctitle=yes"
13900 else
13901   echo "configure: failed program was:" >&5
13902   cat conftest.$ac_ext >&5
13903   rm -rf conftest*
13904   eval "ac_cv_func_setproctitle=no"
13905 fi
13906 rm -f conftest*
13907 fi
13908
13909 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13910   echo "$ac_t""yes" 1>&6
13911   have_setproctitle=yes
13912 else
13913   echo "$ac_t""no" 1>&6
13914
13915                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13916 echo "configure:13917: checking for setproctitle in -lutil" >&5
13917 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13919   echo $ac_n "(cached) $ac_c" 1>&6
13920 else
13921   ac_save_LIBS="$LIBS"
13922 LIBS="-lutil  $LIBS"
13923 cat > conftest.$ac_ext <<EOF
13924 #line 13925 "configure"
13925 #include "confdefs.h"
13926 /* Override any gcc2 internal prototype to avoid an error.  */
13927 /* We use char because int might match the return type of a gcc2
13928     builtin and then its argument prototype would still apply.  */
13929 char setproctitle();
13930
13931 int main() {
13932 setproctitle()
13933 ; return 0; }
13934 EOF
13935 if { (eval echo configure:13936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13936   rm -rf conftest*
13937   eval "ac_cv_lib_$ac_lib_var=yes"
13938 else
13939   echo "configure: failed program was:" >&5
13940   cat conftest.$ac_ext >&5
13941   rm -rf conftest*
13942   eval "ac_cv_lib_$ac_lib_var=no"
13943 fi
13944 rm -f conftest*
13945 LIBS="$ac_save_LIBS"
13946
13947 fi
13948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13949   echo "$ac_t""yes" 1>&6
13950   have_setproctitle=yes
13951                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13952 else
13953   echo "$ac_t""no" 1>&6
13954 have_setproctitle=no
13955                         LIBOBJS="$LIBOBJS setproctitle.o"
13956                         LIBSRCS="$LIBSRCS setproctitle.c"
13957 fi
13958
13959 fi
13960
13961
13962         if test $have_setproctitle = yes ; then
13963                 cat >> confdefs.h <<\EOF
13964 #define HAVE_SETPROCTITLE 1
13965 EOF
13966
13967         fi
13968 fi
13969
13970 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13971 echo "configure:13972: checking for ANSI C header files" >&5
13972 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13973   echo $ac_n "(cached) $ac_c" 1>&6
13974 else
13975   cat > conftest.$ac_ext <<EOF
13976 #line 13977 "configure"
13977 #include "confdefs.h"
13978 #include <stdlib.h>
13979 #include <stdarg.h>
13980 #include <string.h>
13981 #include <float.h>
13982 EOF
13983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13984 { (eval echo configure:13985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13986 if test -z "$ac_err"; then
13987   rm -rf conftest*
13988   ac_cv_header_stdc=yes
13989 else
13990   echo "$ac_err" >&5
13991   echo "configure: failed program was:" >&5
13992   cat conftest.$ac_ext >&5
13993   rm -rf conftest*
13994   ac_cv_header_stdc=no
13995 fi
13996 rm -f conftest*
13997
13998 if test $ac_cv_header_stdc = yes; then
13999   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14000 cat > conftest.$ac_ext <<EOF
14001 #line 14002 "configure"
14002 #include "confdefs.h"
14003 #include <string.h>
14004 EOF
14005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14006   egrep "memchr" >/dev/null 2>&1; then
14007   :
14008 else
14009   rm -rf conftest*
14010   ac_cv_header_stdc=no
14011 fi
14012 rm -f conftest*
14013
14014 fi
14015
14016 if test $ac_cv_header_stdc = yes; then
14017   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14018 cat > conftest.$ac_ext <<EOF
14019 #line 14020 "configure"
14020 #include "confdefs.h"
14021 #include <stdlib.h>
14022 EOF
14023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14024   egrep "free" >/dev/null 2>&1; then
14025   :
14026 else
14027   rm -rf conftest*
14028   ac_cv_header_stdc=no
14029 fi
14030 rm -f conftest*
14031
14032 fi
14033
14034 if test $ac_cv_header_stdc = yes; then
14035   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14036 if test "$cross_compiling" = yes; then
14037   :
14038 else
14039   cat > conftest.$ac_ext <<EOF
14040 #line 14041 "configure"
14041 #include "confdefs.h"
14042 #include <ctype.h>
14043 #if ((' ' & 0x0FF) == 0x020)
14044 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14045 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14046 #else
14047 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14048  || ('j' <= (c) && (c) <= 'r') \
14049  || ('s' <= (c) && (c) <= 'z'))
14050 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14051 #endif
14052 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14053 int main () { int i; for (i = 0; i < 256; i++)
14054 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14055 exit (0); }
14056
14057 EOF
14058 if { (eval echo configure:14059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14059 then
14060   :
14061 else
14062   echo "configure: failed program was:" >&5
14063   cat conftest.$ac_ext >&5
14064   rm -fr conftest*
14065   ac_cv_header_stdc=no
14066 fi
14067 rm -fr conftest*
14068 fi
14069
14070 fi
14071 fi
14072
14073 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14074 if test $ac_cv_header_stdc = yes; then
14075   cat >> confdefs.h <<\EOF
14076 #define STDC_HEADERS 1
14077 EOF
14078
14079 fi
14080
14081 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14082 echo "configure:14083: checking for mode_t" >&5
14083 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14084   echo $ac_n "(cached) $ac_c" 1>&6
14085 else
14086   cat > conftest.$ac_ext <<EOF
14087 #line 14088 "configure"
14088 #include "confdefs.h"
14089 #include <sys/types.h>
14090 #if STDC_HEADERS
14091 #include <stdlib.h>
14092 #include <stddef.h>
14093 #endif
14094
14095 EOF
14096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14097   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14098   rm -rf conftest*
14099   eval "ac_cv_type_mode_t=yes"
14100 else
14101   rm -rf conftest*
14102   eval "ac_cv_type_mode_t=no"
14103 fi
14104 rm -f conftest*
14105
14106 fi
14107 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14108   echo "$ac_t""yes" 1>&6
14109 else
14110   echo "$ac_t""no" 1>&6
14111   cat >> confdefs.h <<EOF
14112 #define mode_t int
14113 EOF
14114
14115 fi
14116
14117 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14118 echo "configure:14119: checking for off_t" >&5
14119 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14120   echo $ac_n "(cached) $ac_c" 1>&6
14121 else
14122   cat > conftest.$ac_ext <<EOF
14123 #line 14124 "configure"
14124 #include "confdefs.h"
14125 #include <sys/types.h>
14126 #if STDC_HEADERS
14127 #include <stdlib.h>
14128 #include <stddef.h>
14129 #endif
14130
14131 EOF
14132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14133   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14134   rm -rf conftest*
14135   eval "ac_cv_type_off_t=yes"
14136 else
14137   rm -rf conftest*
14138   eval "ac_cv_type_off_t=no"
14139 fi
14140 rm -f conftest*
14141
14142 fi
14143 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14144   echo "$ac_t""yes" 1>&6
14145 else
14146   echo "$ac_t""no" 1>&6
14147   cat >> confdefs.h <<EOF
14148 #define off_t long
14149 EOF
14150
14151 fi
14152
14153 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14154 echo "configure:14155: checking for pid_t" >&5
14155 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14156   echo $ac_n "(cached) $ac_c" 1>&6
14157 else
14158   cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161 #include <sys/types.h>
14162 #if STDC_HEADERS
14163 #include <stdlib.h>
14164 #include <stddef.h>
14165 #endif
14166
14167 EOF
14168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14169   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14170   rm -rf conftest*
14171   eval "ac_cv_type_pid_t=yes"
14172 else
14173   rm -rf conftest*
14174   eval "ac_cv_type_pid_t=no"
14175 fi
14176 rm -f conftest*
14177
14178 fi
14179 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14180   echo "$ac_t""yes" 1>&6
14181 else
14182   echo "$ac_t""no" 1>&6
14183   cat >> confdefs.h <<EOF
14184 #define pid_t int
14185 EOF
14186
14187 fi
14188
14189 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14190 echo "configure:14191: checking for ptrdiff_t" >&5
14191 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14192   echo $ac_n "(cached) $ac_c" 1>&6
14193 else
14194   cat > conftest.$ac_ext <<EOF
14195 #line 14196 "configure"
14196 #include "confdefs.h"
14197 #include <stddef.h>
14198 int main() {
14199 ptrdiff_t p
14200 ; return 0; }
14201 EOF
14202 if { (eval echo configure:14203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14203   rm -rf conftest*
14204   am_cv_type_ptrdiff_t=yes
14205 else
14206   echo "configure: failed program was:" >&5
14207   cat conftest.$ac_ext >&5
14208   rm -rf conftest*
14209   am_cv_type_ptrdiff_t=no
14210 fi
14211 rm -f conftest*
14212 fi
14213
14214 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14215    if test $am_cv_type_ptrdiff_t = yes; then
14216      cat >> confdefs.h <<\EOF
14217 #define HAVE_PTRDIFF_T 1
14218 EOF
14219
14220    fi
14221
14222 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14223 echo "configure:14224: checking return type of signal handlers" >&5
14224 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14225   echo $ac_n "(cached) $ac_c" 1>&6
14226 else
14227   cat > conftest.$ac_ext <<EOF
14228 #line 14229 "configure"
14229 #include "confdefs.h"
14230 #include <sys/types.h>
14231 #include <signal.h>
14232 #ifdef signal
14233 #undef signal
14234 #endif
14235 #ifdef __cplusplus
14236 extern "C" void (*signal (int, void (*)(int)))(int);
14237 #else
14238 void (*signal ()) ();
14239 #endif
14240
14241 int main() {
14242 int i;
14243 ; return 0; }
14244 EOF
14245 if { (eval echo configure:14246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14246   rm -rf conftest*
14247   ac_cv_type_signal=void
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251   rm -rf conftest*
14252   ac_cv_type_signal=int
14253 fi
14254 rm -f conftest*
14255 fi
14256
14257 echo "$ac_t""$ac_cv_type_signal" 1>&6
14258 cat >> confdefs.h <<EOF
14259 #define RETSIGTYPE $ac_cv_type_signal
14260 EOF
14261
14262
14263 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14264 echo "configure:14265: checking for size_t" >&5
14265 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14266   echo $ac_n "(cached) $ac_c" 1>&6
14267 else
14268   cat > conftest.$ac_ext <<EOF
14269 #line 14270 "configure"
14270 #include "confdefs.h"
14271 #include <sys/types.h>
14272 #if STDC_HEADERS
14273 #include <stdlib.h>
14274 #include <stddef.h>
14275 #endif
14276
14277 EOF
14278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14279   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14280   rm -rf conftest*
14281   eval "ac_cv_type_size_t=yes"
14282 else
14283   rm -rf conftest*
14284   eval "ac_cv_type_size_t=no"
14285 fi
14286 rm -f conftest*
14287
14288 fi
14289 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14290   echo "$ac_t""yes" 1>&6
14291 else
14292   echo "$ac_t""no" 1>&6
14293   cat >> confdefs.h <<EOF
14294 #define size_t unsigned
14295 EOF
14296
14297 fi
14298
14299
14300 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14301 echo "configure:14302: checking for ssize_t" >&5
14302 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14303   echo $ac_n "(cached) $ac_c" 1>&6
14304 else
14305   cat > conftest.$ac_ext <<EOF
14306 #line 14307 "configure"
14307 #include "confdefs.h"
14308 #include <sys/types.h>
14309 #if STDC_HEADERS
14310 #include <stdlib.h>
14311 #include <stddef.h>
14312 #endif
14313
14314 EOF
14315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14316   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14317   rm -rf conftest*
14318   eval "ac_cv_type_ssize_t=yes"
14319 else
14320   rm -rf conftest*
14321   eval "ac_cv_type_ssize_t=no"
14322 fi
14323 rm -f conftest*
14324
14325 fi
14326 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14327   echo "$ac_t""yes" 1>&6
14328 else
14329   echo "$ac_t""no" 1>&6
14330   cat >> confdefs.h <<EOF
14331 #define ssize_t signed int
14332 EOF
14333
14334 fi
14335
14336 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14337 echo "configure:14338: checking for caddr_t" >&5
14338 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14339   echo $ac_n "(cached) $ac_c" 1>&6
14340 else
14341   cat > conftest.$ac_ext <<EOF
14342 #line 14343 "configure"
14343 #include "confdefs.h"
14344 #include <sys/types.h>
14345 #if STDC_HEADERS
14346 #include <stdlib.h>
14347 #include <stddef.h>
14348 #endif
14349
14350 EOF
14351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14352   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14353   rm -rf conftest*
14354   eval "ac_cv_type_caddr_t=yes"
14355 else
14356   rm -rf conftest*
14357   eval "ac_cv_type_caddr_t=no"
14358 fi
14359 rm -f conftest*
14360
14361 fi
14362 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14363   echo "$ac_t""yes" 1>&6
14364 else
14365   echo "$ac_t""no" 1>&6
14366   cat >> confdefs.h <<EOF
14367 #define caddr_t char *
14368 EOF
14369
14370 fi
14371
14372
14373 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14374 echo "configure:14375: checking for socklen_t" >&5
14375 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14376   echo $ac_n "(cached) $ac_c" 1>&6
14377 else
14378   cat > conftest.$ac_ext <<EOF
14379 #line 14380 "configure"
14380 #include "confdefs.h"
14381
14382 #ifdef HAVE_SYS_TYPES_H
14383 #include <sys/types.h>
14384 #endif
14385 #ifdef HAVE_SYS_SOCKET_H
14386 #include <sys/socket.h>
14387 #endif
14388
14389 int main() {
14390 socklen_t len;
14391 ; return 0; }
14392 EOF
14393 if { (eval echo configure:14394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14394   rm -rf conftest*
14395   ol_cv_type_socklen_t=yes
14396 else
14397   echo "configure: failed program was:" >&5
14398   cat conftest.$ac_ext >&5
14399   rm -rf conftest*
14400   ol_cv_type_socklen_t=no
14401 fi
14402 rm -f conftest*
14403 fi
14404
14405 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14406   if test $ol_cv_type_socklen_t = no; then
14407     cat >> confdefs.h <<\EOF
14408 #define socklen_t int
14409 EOF
14410
14411   fi
14412  
14413 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14414 echo "configure:14415: checking for member st_blksize in aggregate type struct stat" >&5
14415 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14416   echo $ac_n "(cached) $ac_c" 1>&6
14417 else
14418   cat > conftest.$ac_ext <<EOF
14419 #line 14420 "configure"
14420 #include "confdefs.h"
14421 #include <sys/types.h>
14422 #include <sys/stat.h>
14423 int main() {
14424 struct stat foo; foo.st_blksize;
14425 ; return 0; }
14426 EOF
14427 if { (eval echo configure:14428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14428   rm -rf conftest*
14429   ac_cv_c_struct_member_st_blksize=yes
14430 else
14431   echo "configure: failed program was:" >&5
14432   cat conftest.$ac_ext >&5
14433   rm -rf conftest*
14434   ac_cv_c_struct_member_st_blksize=no
14435 fi
14436 rm -f conftest*
14437 fi
14438
14439 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14440 st_blksize="$ac_cv_c_struct_member_st_blksize"
14441 if test $ac_cv_c_struct_member_st_blksize = yes; then
14442   cat >> confdefs.h <<\EOF
14443 #define HAVE_ST_BLKSIZE 1
14444 EOF
14445
14446 fi
14447
14448 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14449 echo "configure:14450: checking whether time.h and sys/time.h may both be included" >&5
14450 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14451   echo $ac_n "(cached) $ac_c" 1>&6
14452 else
14453   cat > conftest.$ac_ext <<EOF
14454 #line 14455 "configure"
14455 #include "confdefs.h"
14456 #include <sys/types.h>
14457 #include <sys/time.h>
14458 #include <time.h>
14459 int main() {
14460 struct tm *tp;
14461 ; return 0; }
14462 EOF
14463 if { (eval echo configure:14464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14464   rm -rf conftest*
14465   ac_cv_header_time=yes
14466 else
14467   echo "configure: failed program was:" >&5
14468   cat conftest.$ac_ext >&5
14469   rm -rf conftest*
14470   ac_cv_header_time=no
14471 fi
14472 rm -f conftest*
14473 fi
14474
14475 echo "$ac_t""$ac_cv_header_time" 1>&6
14476 if test $ac_cv_header_time = yes; then
14477   cat >> confdefs.h <<\EOF
14478 #define TIME_WITH_SYS_TIME 1
14479 EOF
14480
14481 fi
14482
14483 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14484 echo "configure:14485: checking whether struct tm is in sys/time.h or time.h" >&5
14485 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14486   echo $ac_n "(cached) $ac_c" 1>&6
14487 else
14488   cat > conftest.$ac_ext <<EOF
14489 #line 14490 "configure"
14490 #include "confdefs.h"
14491 #include <sys/types.h>
14492 #include <time.h>
14493 int main() {
14494 struct tm *tp; tp->tm_sec;
14495 ; return 0; }
14496 EOF
14497 if { (eval echo configure:14498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14498   rm -rf conftest*
14499   ac_cv_struct_tm=time.h
14500 else
14501   echo "configure: failed program was:" >&5
14502   cat conftest.$ac_ext >&5
14503   rm -rf conftest*
14504   ac_cv_struct_tm=sys/time.h
14505 fi
14506 rm -f conftest*
14507 fi
14508
14509 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14510 if test $ac_cv_struct_tm = sys/time.h; then
14511   cat >> confdefs.h <<\EOF
14512 #define TM_IN_SYS_TIME 1
14513 EOF
14514
14515 fi
14516
14517 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14518 echo "configure:14519: checking for uid_t in sys/types.h" >&5
14519 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14520   echo $ac_n "(cached) $ac_c" 1>&6
14521 else
14522   cat > conftest.$ac_ext <<EOF
14523 #line 14524 "configure"
14524 #include "confdefs.h"
14525 #include <sys/types.h>
14526 EOF
14527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14528   egrep "uid_t" >/dev/null 2>&1; then
14529   rm -rf conftest*
14530   ac_cv_type_uid_t=yes
14531 else
14532   rm -rf conftest*
14533   ac_cv_type_uid_t=no
14534 fi
14535 rm -f conftest*
14536
14537 fi
14538
14539 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14540 if test $ac_cv_type_uid_t = no; then
14541   cat >> confdefs.h <<\EOF
14542 #define uid_t int
14543 EOF
14544
14545   cat >> confdefs.h <<\EOF
14546 #define gid_t int
14547 EOF
14548
14549 fi
14550
14551 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14552 echo "configure:14553: checking for sig_atomic_t" >&5
14553 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14554   echo $ac_n "(cached) $ac_c" 1>&6
14555 else
14556   cat > conftest.$ac_ext <<EOF
14557 #line 14558 "configure"
14558 #include "confdefs.h"
14559 #include <signal.h>
14560 int main() {
14561 sig_atomic_t atomic;
14562 ; return 0; }
14563 EOF
14564 if { (eval echo configure:14565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14565   rm -rf conftest*
14566   ol_cv_type_sig_atomic_t=yes
14567 else
14568   echo "configure: failed program was:" >&5
14569   cat conftest.$ac_ext >&5
14570   rm -rf conftest*
14571   ol_cv_type_sig_atomic_t=no
14572 fi
14573 rm -f conftest*
14574 fi
14575
14576 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14577   if test $ol_cv_type_sig_atomic_t = no; then
14578     cat >> confdefs.h <<\EOF
14579 #define sig_atomic_t int
14580 EOF
14581
14582   fi
14583  
14584
14585
14586 # test for pw_gecos in struct passwd
14587 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14588 echo "configure:14589: checking struct passwd for pw_gecos" >&5
14589 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14590   echo $ac_n "(cached) $ac_c" 1>&6
14591 else
14592   
14593         cat > conftest.$ac_ext <<EOF
14594 #line 14595 "configure"
14595 #include "confdefs.h"
14596 #include <pwd.h>
14597 int main() {
14598
14599         struct passwd pwd;
14600         pwd.pw_gecos = pwd.pw_name;
14601
14602 ; return 0; }
14603 EOF
14604 if { (eval echo configure:14605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14605   rm -rf conftest*
14606   ol_cv_struct_passwd_pw_gecos=yes
14607 else
14608   echo "configure: failed program was:" >&5
14609   cat conftest.$ac_ext >&5
14610   rm -rf conftest*
14611   ol_cv_struct_passwd_pw_gecos=no
14612 fi
14613 rm -f conftest*
14614 fi
14615
14616 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14617 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14618         cat >> confdefs.h <<\EOF
14619 #define HAVE_PW_GECOS 1
14620 EOF
14621
14622 fi
14623
14624 # test for pw_passwd in struct passwd
14625 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14626 echo "configure:14627: checking struct passwd for pw_passwd" >&5
14627 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14628   echo $ac_n "(cached) $ac_c" 1>&6
14629 else
14630   
14631         cat > conftest.$ac_ext <<EOF
14632 #line 14633 "configure"
14633 #include "confdefs.h"
14634 #include <pwd.h>
14635 int main() {
14636
14637         struct passwd pwd;
14638         pwd.pw_passwd = pwd.pw_name;
14639
14640 ; return 0; }
14641 EOF
14642 if { (eval echo configure:14643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14643   rm -rf conftest*
14644   ol_cv_struct_passwd_pw_passwd=yes
14645 else
14646   echo "configure: failed program was:" >&5
14647   cat conftest.$ac_ext >&5
14648   rm -rf conftest*
14649   ol_cv_struct_passwd_pw_passwd=no
14650 fi
14651 rm -f conftest*
14652 fi
14653
14654 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14655 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14656         cat >> confdefs.h <<\EOF
14657 #define HAVE_PW_PASSWD 1
14658 EOF
14659
14660 fi
14661
14662
14663 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14664 echo "configure:14665: checking if toupper() requires islower()" >&5
14665 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14666   echo $ac_n "(cached) $ac_c" 1>&6
14667 else
14668   
14669         if test "$cross_compiling" = yes; then
14670   ol_cv_c_upper_lower=safe
14671 else
14672   cat > conftest.$ac_ext <<EOF
14673 #line 14674 "configure"
14674 #include "confdefs.h"
14675
14676 #include <ctype.h>
14677 main()
14678 {
14679         if ('C' == toupper('C'))
14680                 exit(0);
14681         else
14682                 exit(1);
14683 }
14684 EOF
14685 if { (eval echo configure:14686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14686 then
14687   ol_cv_c_upper_lower=no
14688 else
14689   echo "configure: failed program was:" >&5
14690   cat conftest.$ac_ext >&5
14691   rm -fr conftest*
14692   ol_cv_c_upper_lower=yes
14693 fi
14694 rm -fr conftest*
14695 fi
14696
14697 fi
14698
14699 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14700 if test $ol_cv_c_upper_lower != no ; then
14701         cat >> confdefs.h <<\EOF
14702 #define C_UPPER_LOWER 1
14703 EOF
14704
14705 fi
14706
14707 echo $ac_n "checking for working const""... $ac_c" 1>&6
14708 echo "configure:14709: checking for working const" >&5
14709 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14710   echo $ac_n "(cached) $ac_c" 1>&6
14711 else
14712   cat > conftest.$ac_ext <<EOF
14713 #line 14714 "configure"
14714 #include "confdefs.h"
14715
14716 int main() {
14717
14718 /* Ultrix mips cc rejects this.  */
14719 typedef int charset[2]; const charset x;
14720 /* SunOS 4.1.1 cc rejects this.  */
14721 char const *const *ccp;
14722 char **p;
14723 /* NEC SVR4.0.2 mips cc rejects this.  */
14724 struct point {int x, y;};
14725 static struct point const zero = {0,0};
14726 /* AIX XL C 1.02.0.0 rejects this.
14727    It does not let you subtract one const X* pointer from another in an arm
14728    of an if-expression whose if-part is not a constant expression */
14729 const char *g = "string";
14730 ccp = &g + (g ? g-g : 0);
14731 /* HPUX 7.0 cc rejects these. */
14732 ++ccp;
14733 p = (char**) ccp;
14734 ccp = (char const *const *) p;
14735 { /* SCO 3.2v4 cc rejects this.  */
14736   char *t;
14737   char const *s = 0 ? (char *) 0 : (char const *) 0;
14738
14739   *t++ = 0;
14740 }
14741 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14742   int x[] = {25, 17};
14743   const int *foo = &x[0];
14744   ++foo;
14745 }
14746 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14747   typedef const int *iptr;
14748   iptr p = 0;
14749   ++p;
14750 }
14751 { /* AIX XL C 1.02.0.0 rejects this saying
14752      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14753   struct s { int j; const int *ap[3]; };
14754   struct s *b; b->j = 5;
14755 }
14756 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14757   const int foo = 10;
14758 }
14759
14760 ; return 0; }
14761 EOF
14762 if { (eval echo configure:14763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14763   rm -rf conftest*
14764   ac_cv_c_const=yes
14765 else
14766   echo "configure: failed program was:" >&5
14767   cat conftest.$ac_ext >&5
14768   rm -rf conftest*
14769   ac_cv_c_const=no
14770 fi
14771 rm -f conftest*
14772 fi
14773
14774 echo "$ac_t""$ac_cv_c_const" 1>&6
14775 if test $ac_cv_c_const = no; then
14776   cat >> confdefs.h <<\EOF
14777 #define const 
14778 EOF
14779
14780 fi
14781
14782 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14783 echo "configure:14784: checking if compiler understands volatile" >&5
14784 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14785   echo $ac_n "(cached) $ac_c" 1>&6
14786 else
14787   cat > conftest.$ac_ext <<EOF
14788 #line 14789 "configure"
14789 #include "confdefs.h"
14790 int x, y, z;
14791 int main() {
14792 volatile int a; int * volatile b = x ? &y : &z;
14793       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14794       *b = 0;
14795 ; return 0; }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14798   rm -rf conftest*
14799   ol_cv_c_volatile=yes
14800 else
14801   echo "configure: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   rm -rf conftest*
14804   ol_cv_c_volatile=no
14805 fi
14806 rm -f conftest*
14807 fi
14808
14809 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14810   if test $ol_cv_c_volatile = yes; then
14811     : 
14812   else
14813     cat >> confdefs.h <<\EOF
14814 #define volatile 
14815 EOF
14816
14817   fi
14818  
14819
14820 if test $cross_compiling = yes ; then
14821         cat >> confdefs.h <<\EOF
14822 #define CROSS_COMPILING 1
14823 EOF
14824
14825 else
14826         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14827 echo "configure:14828: checking whether byte ordering is bigendian" >&5
14828 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14829   echo $ac_n "(cached) $ac_c" 1>&6
14830 else
14831   ac_cv_c_bigendian=unknown
14832 # See if sys/param.h defines the BYTE_ORDER macro.
14833 cat > conftest.$ac_ext <<EOF
14834 #line 14835 "configure"
14835 #include "confdefs.h"
14836 #include <sys/types.h>
14837 #include <sys/param.h>
14838 int main() {
14839
14840 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14841  bogus endian macros
14842 #endif
14843 ; return 0; }
14844 EOF
14845 if { (eval echo configure:14846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14846   rm -rf conftest*
14847   # It does; now see whether it defined to BIG_ENDIAN or not.
14848 cat > conftest.$ac_ext <<EOF
14849 #line 14850 "configure"
14850 #include "confdefs.h"
14851 #include <sys/types.h>
14852 #include <sys/param.h>
14853 int main() {
14854
14855 #if BYTE_ORDER != BIG_ENDIAN
14856  not big endian
14857 #endif
14858 ; return 0; }
14859 EOF
14860 if { (eval echo configure:14861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14861   rm -rf conftest*
14862   ac_cv_c_bigendian=yes
14863 else
14864   echo "configure: failed program was:" >&5
14865   cat conftest.$ac_ext >&5
14866   rm -rf conftest*
14867   ac_cv_c_bigendian=no
14868 fi
14869 rm -f conftest*
14870 else
14871   echo "configure: failed program was:" >&5
14872   cat conftest.$ac_ext >&5
14873 fi
14874 rm -f conftest*
14875 if test $ac_cv_c_bigendian = unknown; then
14876 if test "$cross_compiling" = yes; then
14877     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14878 else
14879   cat > conftest.$ac_ext <<EOF
14880 #line 14881 "configure"
14881 #include "confdefs.h"
14882 main () {
14883   /* Are we little or big endian?  From Harbison&Steele.  */
14884   union
14885   {
14886     long l;
14887     char c[sizeof (long)];
14888   } u;
14889   u.l = 1;
14890   exit (u.c[sizeof (long) - 1] == 1);
14891 }
14892 EOF
14893 if { (eval echo configure:14894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14894 then
14895   ac_cv_c_bigendian=no
14896 else
14897   echo "configure: failed program was:" >&5
14898   cat conftest.$ac_ext >&5
14899   rm -fr conftest*
14900   ac_cv_c_bigendian=yes
14901 fi
14902 rm -fr conftest*
14903 fi
14904
14905 fi
14906 fi
14907
14908 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14909 if test $ac_cv_c_bigendian = yes; then
14910   cat >> confdefs.h <<\EOF
14911 #define WORDS_BIGENDIAN 1
14912 EOF
14913
14914 fi
14915
14916 fi
14917
14918 echo $ac_n "checking size of short""... $ac_c" 1>&6
14919 echo "configure:14920: checking size of short" >&5 
14920 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14921   echo $ac_n "(cached) $ac_c" 1>&6
14922 else
14923   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14924   cat > conftest.$ac_ext <<EOF
14925 #line 14926 "configure"
14926 #include "confdefs.h"
14927 #include "confdefs.h" 
14928 #include <sys/types.h> 
14929  
14930
14931 int main() {
14932 switch (0) case 0: case (sizeof (short) == $ac_size):;
14933 ; return 0; }
14934 EOF
14935 if { (eval echo configure:14936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14936   rm -rf conftest*
14937   ac_cv_sizeof_short=$ac_size
14938 else
14939   echo "configure: failed program was:" >&5
14940   cat conftest.$ac_ext >&5
14941 fi
14942 rm -f conftest* 
14943   if test x$ac_cv_sizeof_short != x ; then break; fi 
14944 done 
14945
14946 fi
14947  
14948 if test x$ac_cv_sizeof_short = x ; then 
14949   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14950 fi 
14951 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14952 cat >> confdefs.h <<EOF
14953 #define SIZEOF_SHORT $ac_cv_sizeof_short
14954 EOF
14955  
14956  
14957 echo $ac_n "checking size of int""... $ac_c" 1>&6
14958 echo "configure:14959: checking size of int" >&5 
14959 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14960   echo $ac_n "(cached) $ac_c" 1>&6
14961 else
14962   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14963   cat > conftest.$ac_ext <<EOF
14964 #line 14965 "configure"
14965 #include "confdefs.h"
14966 #include "confdefs.h" 
14967 #include <sys/types.h> 
14968  
14969
14970 int main() {
14971 switch (0) case 0: case (sizeof (int) == $ac_size):;
14972 ; return 0; }
14973 EOF
14974 if { (eval echo configure:14975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14975   rm -rf conftest*
14976   ac_cv_sizeof_int=$ac_size
14977 else
14978   echo "configure: failed program was:" >&5
14979   cat conftest.$ac_ext >&5
14980 fi
14981 rm -f conftest* 
14982   if test x$ac_cv_sizeof_int != x ; then break; fi 
14983 done 
14984
14985 fi
14986  
14987 if test x$ac_cv_sizeof_int = x ; then 
14988   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14989 fi 
14990 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14991 cat >> confdefs.h <<EOF
14992 #define SIZEOF_INT $ac_cv_sizeof_int
14993 EOF
14994  
14995  
14996 echo $ac_n "checking size of long""... $ac_c" 1>&6
14997 echo "configure:14998: checking size of long" >&5 
14998 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14999   echo $ac_n "(cached) $ac_c" 1>&6
15000 else
15001   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15002   cat > conftest.$ac_ext <<EOF
15003 #line 15004 "configure"
15004 #include "confdefs.h"
15005 #include "confdefs.h" 
15006 #include <sys/types.h> 
15007  
15008
15009 int main() {
15010 switch (0) case 0: case (sizeof (long) == $ac_size):;
15011 ; return 0; }
15012 EOF
15013 if { (eval echo configure:15014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15014   rm -rf conftest*
15015   ac_cv_sizeof_long=$ac_size
15016 else
15017   echo "configure: failed program was:" >&5
15018   cat conftest.$ac_ext >&5
15019 fi
15020 rm -f conftest* 
15021   if test x$ac_cv_sizeof_long != x ; then break; fi 
15022 done 
15023
15024 fi
15025  
15026 if test x$ac_cv_sizeof_long = x ; then 
15027   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15028 fi 
15029 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15030 cat >> confdefs.h <<EOF
15031 #define SIZEOF_LONG $ac_cv_sizeof_long
15032 EOF
15033  
15034
15035
15036 if test "$ac_cv_sizeof_int" -lt 4 ; then
15037         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15038
15039         cat >> confdefs.h <<\EOF
15040 #define LBER_INT_T long
15041 EOF
15042
15043 else
15044         cat >> confdefs.h <<\EOF
15045 #define LBER_INT_T int
15046 EOF
15047
15048 fi
15049
15050 cat >> confdefs.h <<\EOF
15051 #define LBER_LEN_T long
15052 EOF
15053
15054 cat >> confdefs.h <<\EOF
15055 #define LBER_SOCKET_T int
15056 EOF
15057
15058 cat >> confdefs.h <<\EOF
15059 #define LBER_TAG_T long
15060 EOF
15061
15062
15063 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15064 echo "configure:15065: checking for 8-bit clean memcmp" >&5
15065 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15066   echo $ac_n "(cached) $ac_c" 1>&6
15067 else
15068   if test "$cross_compiling" = yes; then
15069   ac_cv_func_memcmp_clean=no
15070 else
15071   cat > conftest.$ac_ext <<EOF
15072 #line 15073 "configure"
15073 #include "confdefs.h"
15074
15075 main()
15076 {
15077   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15078   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15079 }
15080
15081 EOF
15082 if { (eval echo configure:15083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15083 then
15084   ac_cv_func_memcmp_clean=yes
15085 else
15086   echo "configure: failed program was:" >&5
15087   cat conftest.$ac_ext >&5
15088   rm -fr conftest*
15089   ac_cv_func_memcmp_clean=no
15090 fi
15091 rm -fr conftest*
15092 fi
15093
15094 fi
15095
15096 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15097 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15098
15099 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15100 echo "configure:15101: checking for strftime" >&5
15101 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15102   echo $ac_n "(cached) $ac_c" 1>&6
15103 else
15104   cat > conftest.$ac_ext <<EOF
15105 #line 15106 "configure"
15106 #include "confdefs.h"
15107 /* System header to define __stub macros and hopefully few prototypes,
15108     which can conflict with char strftime(); below.  */
15109 #include <assert.h>
15110 /* Override any gcc2 internal prototype to avoid an error.  */
15111 /* We use char because int might match the return type of a gcc2
15112     builtin and then its argument prototype would still apply.  */
15113 char strftime();
15114 char (*f)();
15115
15116 int main() {
15117
15118 /* The GNU C library defines this for functions which it implements
15119     to always fail with ENOSYS.  Some functions are actually named
15120     something starting with __ and the normal name is an alias.  */
15121 #if defined (__stub_strftime) || defined (__stub___strftime)
15122 choke me
15123 #else
15124 f = strftime;
15125 #endif
15126
15127 ; return 0; }
15128 EOF
15129 if { (eval echo configure:15130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15130   rm -rf conftest*
15131   eval "ac_cv_func_strftime=yes"
15132 else
15133   echo "configure: failed program was:" >&5
15134   cat conftest.$ac_ext >&5
15135   rm -rf conftest*
15136   eval "ac_cv_func_strftime=no"
15137 fi
15138 rm -f conftest*
15139 fi
15140
15141 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15142   echo "$ac_t""yes" 1>&6
15143   cat >> confdefs.h <<\EOF
15144 #define HAVE_STRFTIME 1
15145 EOF
15146
15147 else
15148   echo "$ac_t""no" 1>&6
15149 # strftime is in -lintl on SCO UNIX.
15150 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15151 echo "configure:15152: checking for strftime in -lintl" >&5
15152 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15154   echo $ac_n "(cached) $ac_c" 1>&6
15155 else
15156   ac_save_LIBS="$LIBS"
15157 LIBS="-lintl  $LIBS"
15158 cat > conftest.$ac_ext <<EOF
15159 #line 15160 "configure"
15160 #include "confdefs.h"
15161 /* Override any gcc2 internal prototype to avoid an error.  */
15162 /* We use char because int might match the return type of a gcc2
15163     builtin and then its argument prototype would still apply.  */
15164 char strftime();
15165
15166 int main() {
15167 strftime()
15168 ; return 0; }
15169 EOF
15170 if { (eval echo configure:15171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15171   rm -rf conftest*
15172   eval "ac_cv_lib_$ac_lib_var=yes"
15173 else
15174   echo "configure: failed program was:" >&5
15175   cat conftest.$ac_ext >&5
15176   rm -rf conftest*
15177   eval "ac_cv_lib_$ac_lib_var=no"
15178 fi
15179 rm -f conftest*
15180 LIBS="$ac_save_LIBS"
15181
15182 fi
15183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15184   echo "$ac_t""yes" 1>&6
15185   cat >> confdefs.h <<\EOF
15186 #define HAVE_STRFTIME 1
15187 EOF
15188
15189 LIBS="-lintl $LIBS"
15190 else
15191   echo "$ac_t""no" 1>&6
15192 fi
15193
15194 fi
15195
15196
15197 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15198 echo "configure:15199: checking for inet_aton()" >&5
15199 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15200   echo $ac_n "(cached) $ac_c" 1>&6
15201 else
15202   cat > conftest.$ac_ext <<EOF
15203 #line 15204 "configure"
15204 #include "confdefs.h"
15205
15206 #ifdef HAVE_SYS_TYPES_H
15207 #       include <sys/types.h>
15208 #endif
15209 #ifdef HAVE_SYS_SOCKET_H
15210 #       include <sys/socket.h>
15211 #       ifdef HAVE_SYS_SELECT_H
15212 #               include <sys/select.h>
15213 #       endif
15214 #       include <netinet/in.h>
15215 #       ifdef HAVE_ARPA_INET_H
15216 #               include <arpa/inet.h>
15217 #       endif
15218 #endif
15219
15220 int main() {
15221 struct in_addr in;
15222 int rc = inet_aton( "255.255.255.255", &in );
15223 ; return 0; }
15224 EOF
15225 if { (eval echo configure:15226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15226   rm -rf conftest*
15227   ol_cv_func_inet_aton=yes
15228 else
15229   echo "configure: failed program was:" >&5
15230   cat conftest.$ac_ext >&5
15231   rm -rf conftest*
15232   ol_cv_func_inet_aton=no
15233 fi
15234 rm -f conftest*
15235 fi
15236
15237 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15238   if test $ol_cv_func_inet_aton != no; then
15239     cat >> confdefs.h <<\EOF
15240 #define HAVE_INET_ATON 1
15241 EOF
15242
15243   fi
15244  
15245
15246 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15247 echo "configure:15248: checking for _spawnlp" >&5
15248 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15249   echo $ac_n "(cached) $ac_c" 1>&6
15250 else
15251   cat > conftest.$ac_ext <<EOF
15252 #line 15253 "configure"
15253 #include "confdefs.h"
15254 /* System header to define __stub macros and hopefully few prototypes,
15255     which can conflict with char _spawnlp(); below.  */
15256 #include <assert.h>
15257 /* Override any gcc2 internal prototype to avoid an error.  */
15258 /* We use char because int might match the return type of a gcc2
15259     builtin and then its argument prototype would still apply.  */
15260 char _spawnlp();
15261 char (*f)();
15262
15263 int main() {
15264
15265 /* The GNU C library defines this for functions which it implements
15266     to always fail with ENOSYS.  Some functions are actually named
15267     something starting with __ and the normal name is an alias.  */
15268 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15269 choke me
15270 #else
15271 f = _spawnlp;
15272 #endif
15273
15274 ; return 0; }
15275 EOF
15276 if { (eval echo configure:15277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15277   rm -rf conftest*
15278   eval "ac_cv_func__spawnlp=yes"
15279 else
15280   echo "configure: failed program was:" >&5
15281   cat conftest.$ac_ext >&5
15282   rm -rf conftest*
15283   eval "ac_cv_func__spawnlp=no"
15284 fi
15285 rm -f conftest*
15286 fi
15287
15288 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15289   echo "$ac_t""yes" 1>&6
15290   cat >> confdefs.h <<\EOF
15291 #define HAVE_SPAWNLP 1
15292 EOF
15293
15294 else
15295   echo "$ac_t""no" 1>&6
15296 fi
15297
15298
15299 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15300 echo "configure:15301: checking for _snprintf" >&5
15301 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15302   echo $ac_n "(cached) $ac_c" 1>&6
15303 else
15304   cat > conftest.$ac_ext <<EOF
15305 #line 15306 "configure"
15306 #include "confdefs.h"
15307 /* System header to define __stub macros and hopefully few prototypes,
15308     which can conflict with char _snprintf(); below.  */
15309 #include <assert.h>
15310 /* Override any gcc2 internal prototype to avoid an error.  */
15311 /* We use char because int might match the return type of a gcc2
15312     builtin and then its argument prototype would still apply.  */
15313 char _snprintf();
15314 char (*f)();
15315
15316 int main() {
15317
15318 /* The GNU C library defines this for functions which it implements
15319     to always fail with ENOSYS.  Some functions are actually named
15320     something starting with __ and the normal name is an alias.  */
15321 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15322 choke me
15323 #else
15324 f = _snprintf;
15325 #endif
15326
15327 ; return 0; }
15328 EOF
15329 if { (eval echo configure:15330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15330   rm -rf conftest*
15331   eval "ac_cv_func__snprintf=yes"
15332 else
15333   echo "configure: failed program was:" >&5
15334   cat conftest.$ac_ext >&5
15335   rm -rf conftest*
15336   eval "ac_cv_func__snprintf=no"
15337 fi
15338 rm -f conftest*
15339 fi
15340
15341 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15342   echo "$ac_t""yes" 1>&6
15343   ac_cv_func_snprintf=yes
15344         cat >> confdefs.h <<\EOF
15345 #define snprintf _snprintf
15346 EOF
15347
15348
15349 else
15350   echo "$ac_t""no" 1>&6
15351 fi
15352
15353
15354 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15355 echo "configure:15356: checking for _vsnprintf" >&5
15356 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15357   echo $ac_n "(cached) $ac_c" 1>&6
15358 else
15359   cat > conftest.$ac_ext <<EOF
15360 #line 15361 "configure"
15361 #include "confdefs.h"
15362 /* System header to define __stub macros and hopefully few prototypes,
15363     which can conflict with char _vsnprintf(); below.  */
15364 #include <assert.h>
15365 /* Override any gcc2 internal prototype to avoid an error.  */
15366 /* We use char because int might match the return type of a gcc2
15367     builtin and then its argument prototype would still apply.  */
15368 char _vsnprintf();
15369 char (*f)();
15370
15371 int main() {
15372
15373 /* The GNU C library defines this for functions which it implements
15374     to always fail with ENOSYS.  Some functions are actually named
15375     something starting with __ and the normal name is an alias.  */
15376 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15377 choke me
15378 #else
15379 f = _vsnprintf;
15380 #endif
15381
15382 ; return 0; }
15383 EOF
15384 if { (eval echo configure:15385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15385   rm -rf conftest*
15386   eval "ac_cv_func__vsnprintf=yes"
15387 else
15388   echo "configure: failed program was:" >&5
15389   cat conftest.$ac_ext >&5
15390   rm -rf conftest*
15391   eval "ac_cv_func__vsnprintf=no"
15392 fi
15393 rm -f conftest*
15394 fi
15395
15396 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15397   echo "$ac_t""yes" 1>&6
15398   ac_cv_func_vsnprintf=yes
15399         cat >> confdefs.h <<\EOF
15400 #define vsnprintf _vsnprintf
15401 EOF
15402
15403
15404 else
15405   echo "$ac_t""no" 1>&6
15406 fi
15407
15408
15409 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15410 echo "configure:15411: checking for vprintf" >&5
15411 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15412   echo $ac_n "(cached) $ac_c" 1>&6
15413 else
15414   cat > conftest.$ac_ext <<EOF
15415 #line 15416 "configure"
15416 #include "confdefs.h"
15417 /* System header to define __stub macros and hopefully few prototypes,
15418     which can conflict with char vprintf(); below.  */
15419 #include <assert.h>
15420 /* Override any gcc2 internal prototype to avoid an error.  */
15421 /* We use char because int might match the return type of a gcc2
15422     builtin and then its argument prototype would still apply.  */
15423 char vprintf();
15424 char (*f)();
15425
15426 int main() {
15427
15428 /* The GNU C library defines this for functions which it implements
15429     to always fail with ENOSYS.  Some functions are actually named
15430     something starting with __ and the normal name is an alias.  */
15431 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15432 choke me
15433 #else
15434 f = vprintf;
15435 #endif
15436
15437 ; return 0; }
15438 EOF
15439 if { (eval echo configure:15440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15440   rm -rf conftest*
15441   eval "ac_cv_func_vprintf=yes"
15442 else
15443   echo "configure: failed program was:" >&5
15444   cat conftest.$ac_ext >&5
15445   rm -rf conftest*
15446   eval "ac_cv_func_vprintf=no"
15447 fi
15448 rm -f conftest*
15449 fi
15450
15451 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15452   echo "$ac_t""yes" 1>&6
15453   cat >> confdefs.h <<\EOF
15454 #define HAVE_VPRINTF 1
15455 EOF
15456
15457 else
15458   echo "$ac_t""no" 1>&6
15459 fi
15460
15461 if test "$ac_cv_func_vprintf" != yes; then
15462 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15463 echo "configure:15464: checking for _doprnt" >&5
15464 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15465   echo $ac_n "(cached) $ac_c" 1>&6
15466 else
15467   cat > conftest.$ac_ext <<EOF
15468 #line 15469 "configure"
15469 #include "confdefs.h"
15470 /* System header to define __stub macros and hopefully few prototypes,
15471     which can conflict with char _doprnt(); below.  */
15472 #include <assert.h>
15473 /* Override any gcc2 internal prototype to avoid an error.  */
15474 /* We use char because int might match the return type of a gcc2
15475     builtin and then its argument prototype would still apply.  */
15476 char _doprnt();
15477 char (*f)();
15478
15479 int main() {
15480
15481 /* The GNU C library defines this for functions which it implements
15482     to always fail with ENOSYS.  Some functions are actually named
15483     something starting with __ and the normal name is an alias.  */
15484 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15485 choke me
15486 #else
15487 f = _doprnt;
15488 #endif
15489
15490 ; return 0; }
15491 EOF
15492 if { (eval echo configure:15493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15493   rm -rf conftest*
15494   eval "ac_cv_func__doprnt=yes"
15495 else
15496   echo "configure: failed program was:" >&5
15497   cat conftest.$ac_ext >&5
15498   rm -rf conftest*
15499   eval "ac_cv_func__doprnt=no"
15500 fi
15501 rm -f conftest*
15502 fi
15503
15504 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15505   echo "$ac_t""yes" 1>&6
15506   cat >> confdefs.h <<\EOF
15507 #define HAVE_DOPRNT 1
15508 EOF
15509
15510 else
15511   echo "$ac_t""no" 1>&6
15512 fi
15513
15514 fi
15515
15516
15517 if test $ac_cv_func_vprintf = yes ; then
15518                 for ac_func in vsnprintf vsprintf
15519 do
15520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15521 echo "configure:15522: checking for $ac_func" >&5
15522 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15523   echo $ac_n "(cached) $ac_c" 1>&6
15524 else
15525   cat > conftest.$ac_ext <<EOF
15526 #line 15527 "configure"
15527 #include "confdefs.h"
15528 /* System header to define __stub macros and hopefully few prototypes,
15529     which can conflict with char $ac_func(); below.  */
15530 #include <assert.h>
15531 /* Override any gcc2 internal prototype to avoid an error.  */
15532 /* We use char because int might match the return type of a gcc2
15533     builtin and then its argument prototype would still apply.  */
15534 char $ac_func();
15535 char (*f)();
15536
15537 int main() {
15538
15539 /* The GNU C library defines this for functions which it implements
15540     to always fail with ENOSYS.  Some functions are actually named
15541     something starting with __ and the normal name is an alias.  */
15542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15543 choke me
15544 #else
15545 f = $ac_func;
15546 #endif
15547
15548 ; return 0; }
15549 EOF
15550 if { (eval echo configure:15551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15551   rm -rf conftest*
15552   eval "ac_cv_func_$ac_func=yes"
15553 else
15554   echo "configure: failed program was:" >&5
15555   cat conftest.$ac_ext >&5
15556   rm -rf conftest*
15557   eval "ac_cv_func_$ac_func=no"
15558 fi
15559 rm -f conftest*
15560 fi
15561
15562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15563   echo "$ac_t""yes" 1>&6
15564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15565   cat >> confdefs.h <<EOF
15566 #define $ac_tr_func 1
15567 EOF
15568  
15569 else
15570   echo "$ac_t""no" 1>&6
15571 fi
15572 done
15573
15574 fi
15575
15576 for ac_func in \
15577         bcopy                   \
15578         closesocket             \
15579         chroot                  \
15580         endgrent                \
15581         endpwent                \
15582         fcntl                   \
15583         flock                   \
15584         getdtablesize   \
15585         getgrgid                \
15586         gethostname             \
15587         getpass                 \
15588         getpassphrase   \
15589         getpwuid                \
15590         getpwnam                \
15591         getspnam                \
15592         gettimeofday    \
15593         initgroups              \
15594         lockf                   \
15595         memcpy                  \
15596         memmove                 \
15597         mkstemp                 \
15598         pipe                    \
15599         read                    \
15600         recv                    \
15601         recvfrom                \
15602         setpwfile               \
15603         setgid                  \
15604         setegid                 \
15605         setsid                  \
15606         setuid                  \
15607         seteuid                 \
15608         sigaction               \
15609         signal                  \
15610         sigset                  \
15611         snprintf                \
15612         strdup                  \
15613         strerror                \
15614         strpbrk                 \
15615         strrchr                 \
15616         strsep                  \
15617         strstr                  \
15618         strtol                  \
15619         strtoul                 \
15620         strspn                  \
15621         sysconf                 \
15622         waitpid                 \
15623         wait4                   \
15624         write                   \
15625         send                    \
15626         sendto                  \
15627
15628 do
15629 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15630 echo "configure:15631: checking for $ac_func" >&5
15631 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15632   echo $ac_n "(cached) $ac_c" 1>&6
15633 else
15634   cat > conftest.$ac_ext <<EOF
15635 #line 15636 "configure"
15636 #include "confdefs.h"
15637 /* System header to define __stub macros and hopefully few prototypes,
15638     which can conflict with char $ac_func(); below.  */
15639 #include <assert.h>
15640 /* Override any gcc2 internal prototype to avoid an error.  */
15641 /* We use char because int might match the return type of a gcc2
15642     builtin and then its argument prototype would still apply.  */
15643 char $ac_func();
15644 char (*f)();
15645
15646 int main() {
15647
15648 /* The GNU C library defines this for functions which it implements
15649     to always fail with ENOSYS.  Some functions are actually named
15650     something starting with __ and the normal name is an alias.  */
15651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15652 choke me
15653 #else
15654 f = $ac_func;
15655 #endif
15656
15657 ; return 0; }
15658 EOF
15659 if { (eval echo configure:15660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15660   rm -rf conftest*
15661   eval "ac_cv_func_$ac_func=yes"
15662 else
15663   echo "configure: failed program was:" >&5
15664   cat conftest.$ac_ext >&5
15665   rm -rf conftest*
15666   eval "ac_cv_func_$ac_func=no"
15667 fi
15668 rm -f conftest*
15669 fi
15670
15671 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15672   echo "$ac_t""yes" 1>&6
15673     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15674   cat >> confdefs.h <<EOF
15675 #define $ac_tr_func 1
15676 EOF
15677  
15678 else
15679   echo "$ac_t""no" 1>&6
15680 fi
15681 done
15682
15683
15684 for ac_func in getopt tempnam
15685 do
15686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15687 echo "configure:15688: checking for $ac_func" >&5
15688 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15689   echo $ac_n "(cached) $ac_c" 1>&6
15690 else
15691   cat > conftest.$ac_ext <<EOF
15692 #line 15693 "configure"
15693 #include "confdefs.h"
15694 /* System header to define __stub macros and hopefully few prototypes,
15695     which can conflict with char $ac_func(); below.  */
15696 #include <assert.h>
15697 /* Override any gcc2 internal prototype to avoid an error.  */
15698 /* We use char because int might match the return type of a gcc2
15699     builtin and then its argument prototype would still apply.  */
15700 char $ac_func();
15701 char (*f)();
15702
15703 int main() {
15704
15705 /* The GNU C library defines this for functions which it implements
15706     to always fail with ENOSYS.  Some functions are actually named
15707     something starting with __ and the normal name is an alias.  */
15708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15709 choke me
15710 #else
15711 f = $ac_func;
15712 #endif
15713
15714 ; return 0; }
15715 EOF
15716 if { (eval echo configure:15717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15717   rm -rf conftest*
15718   eval "ac_cv_func_$ac_func=yes"
15719 else
15720   echo "configure: failed program was:" >&5
15721   cat conftest.$ac_ext >&5
15722   rm -rf conftest*
15723   eval "ac_cv_func_$ac_func=no"
15724 fi
15725 rm -f conftest*
15726 fi
15727
15728 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15729   echo "$ac_t""yes" 1>&6
15730     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15731   cat >> confdefs.h <<EOF
15732 #define $ac_tr_func 1
15733 EOF
15734  
15735 else
15736   echo "$ac_t""no" 1>&6
15737 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15738 fi
15739 done
15740
15741
15742
15743 if test "$ac_cv_func_getopt" != yes; then
15744     LIBSRCS="$LIBSRCS getopt.c"
15745 fi
15746
15747 if test "$ac_cv_func_tempnam" != yes; then
15748     LIBSRCS="$LIBSRCS tempnam.c"
15749 fi
15750
15751 # Check Configuration
15752 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15753 echo "configure:15754: checking declaration of sys_errlist" >&5
15754 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15755   echo $ac_n "(cached) $ac_c" 1>&6
15756 else
15757   
15758         cat > conftest.$ac_ext <<EOF
15759 #line 15760 "configure"
15760 #include "confdefs.h"
15761
15762 #include <stdio.h>
15763 #include <sys/types.h>
15764 #include <errno.h>
15765 #ifdef WINNT
15766 #include <stdlib.h>
15767 #endif 
15768 int main() {
15769 char *c = (char *) *sys_errlist
15770 ; return 0; }
15771 EOF
15772 if { (eval echo configure:15773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15773   rm -rf conftest*
15774   ol_cv_dcl_sys_errlist=yes
15775         ol_cv_have_sys_errlist=yes
15776 else
15777   echo "configure: failed program was:" >&5
15778   cat conftest.$ac_ext >&5
15779   rm -rf conftest*
15780   ol_cv_dcl_sys_errlist=no
15781 fi
15782 rm -f conftest*
15783 fi
15784
15785 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15786 #
15787 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15788 if test $ol_cv_dcl_sys_errlist = no ; then
15789         cat >> confdefs.h <<\EOF
15790 #define DECL_SYS_ERRLIST 1
15791 EOF
15792
15793
15794         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15795 echo "configure:15796: checking existence of sys_errlist" >&5
15796 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15797   echo $ac_n "(cached) $ac_c" 1>&6
15798 else
15799   
15800                 cat > conftest.$ac_ext <<EOF
15801 #line 15802 "configure"
15802 #include "confdefs.h"
15803 #include <errno.h>
15804 int main() {
15805 char *c = (char *) *sys_errlist
15806 ; return 0; }
15807 EOF
15808 if { (eval echo configure:15809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15809   rm -rf conftest*
15810   ol_cv_have_sys_errlist=yes
15811 else
15812   echo "configure: failed program was:" >&5
15813   cat conftest.$ac_ext >&5
15814   rm -rf conftest*
15815   ol_cv_have_sys_errlist=no
15816 fi
15817 rm -f conftest*
15818 fi
15819
15820 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15821 fi
15822 if test $ol_cv_have_sys_errlist = yes ; then
15823         cat >> confdefs.h <<\EOF
15824 #define HAVE_SYS_ERRLIST 1
15825 EOF
15826
15827 fi
15828
15829
15830
15831 if test "$ol_enable_debug" != no ; then
15832         cat >> confdefs.h <<\EOF
15833 #define LDAP_DEBUG 1
15834 EOF
15835
15836 fi
15837 if test "$ol_enable_syslog" = yes ; then
15838         cat >> confdefs.h <<\EOF
15839 #define LDAP_SYSLOG 1
15840 EOF
15841
15842 fi
15843 if test "$ol_enable_cache" = no ; then
15844         cat >> confdefs.h <<\EOF
15845 #define LDAP_NOCACHE 1
15846 EOF
15847
15848 fi
15849 if test "$ol_link_kbind" != no ; then
15850         cat >> confdefs.h <<\EOF
15851 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15852 EOF
15853
15854 fi
15855 if test "$ol_enable_proctitle" != no ; then
15856         cat >> confdefs.h <<\EOF
15857 #define LDAP_PROCTITLE 1
15858 EOF
15859
15860 fi
15861 if test "$ol_enable_referrals" != no ; then
15862         cat >> confdefs.h <<\EOF
15863 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15864 EOF
15865
15866 fi
15867 if test "$ol_enable_local" != no; then
15868         cat >> confdefs.h <<\EOF
15869 #define LDAP_PF_LOCAL 1
15870 EOF
15871
15872 fi
15873 if test "$ol_link_ipv6" != no; then
15874         cat >> confdefs.h <<\EOF
15875 #define LDAP_PF_INET6 1
15876 EOF
15877
15878 fi
15879 if test "$ol_enable_cleartext" != no ; then
15880         cat >> confdefs.h <<\EOF
15881 #define SLAPD_CLEARTEXT 1
15882 EOF
15883
15884 fi
15885 if test "$ol_enable_crypt" != no ; then
15886         cat >> confdefs.h <<\EOF
15887 #define SLAPD_CRYPT 1
15888 EOF
15889
15890 fi
15891 if test "$ol_link_kpasswd" != no ; then
15892         cat >> confdefs.h <<\EOF
15893 #define SLAPD_KPASSWD 1
15894 EOF
15895
15896 fi
15897 if test "$ol_link_spasswd" != no ; then
15898         cat >> confdefs.h <<\EOF
15899 #define SLAPD_SPASSWD 1
15900 EOF
15901
15902 fi
15903 if test "$ol_enable_phonetic" != no ; then
15904         cat >> confdefs.h <<\EOF
15905 #define SLAPD_PHONETIC 1
15906 EOF
15907
15908 fi
15909 if test "$ol_enable_rlookups" != no ; then
15910         cat >> confdefs.h <<\EOF
15911 #define SLAPD_RLOOKUPS 1
15912 EOF
15913
15914 fi
15915 if test "$ol_enable_aci" != no ; then
15916         cat >> confdefs.h <<\EOF
15917 #define SLAPD_ACI_ENABLED 1
15918 EOF
15919
15920 fi
15921
15922 if test "$ol_link_modules" != no ; then
15923         cat >> confdefs.h <<\EOF
15924 #define SLAPD_MODULES 1
15925 EOF
15926
15927         BUILD_SLAPD=yes
15928         SLAPD_MODULES_LDFLAGS="-dlopen self"
15929 fi
15930
15931 if test "$ol_link_dnssrv" != no ; then
15932         cat >> confdefs.h <<\EOF
15933 #define SLAPD_DNSSRV 1
15934 EOF
15935
15936         BUILD_SLAPD=yes
15937         BUILD_DNSSRV=yes
15938         if test "$ol_with_dnssrv_module" != static ; then
15939                 cat >> confdefs.h <<\EOF
15940 #define SLAPD_DNSSRV_DYNAMIC 1
15941 EOF
15942
15943                 BUILD_DNSSRV=mod
15944                 BUILD_DNSSRV_DYNAMIC=shared
15945                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15946         fi
15947 fi
15948
15949 if test "$ol_enable_ldap" != no ; then
15950         cat >> confdefs.h <<\EOF
15951 #define SLAPD_LDAP 1
15952 EOF
15953
15954         BUILD_SLAPD=yes
15955         BUILD_LDAP=yes
15956         if test "$ol_with_ldap_module" != static ; then
15957                 cat >> confdefs.h <<\EOF
15958 #define SLAPD_LDAP_DYNAMIC 1
15959 EOF
15960
15961                 BUILD_LDAP=mod
15962                 BUILD_LDAP_DYNAMIC=shared
15963                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15964         fi
15965 fi
15966
15967 if test "$ol_link_ldbm" != no ; then
15968         cat >> confdefs.h <<\EOF
15969 #define SLAPD_LDBM 1
15970 EOF
15971
15972         BUILD_SLAPD=yes
15973         BUILD_LDBM=yes
15974         if test "$ol_with_ldbm_module" != static ; then
15975                 cat >> confdefs.h <<\EOF
15976 #define SLAPD_LDBM_DYNAMIC 1
15977 EOF
15978
15979                 BUILD_LDBM=mod
15980                 BUILD_LDBM_DYNAMIC=shared
15981                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15982         fi
15983 fi
15984
15985 if test "$ol_enable_passwd" != no ; then
15986         cat >> confdefs.h <<\EOF
15987 #define SLAPD_PASSWD 1
15988 EOF
15989
15990         BUILD_SLAPD=yes
15991         BUILD_PASSWD=yes
15992         if test "$ol_with_passwd_module" != static ; then
15993                 cat >> confdefs.h <<\EOF
15994 #define SLAPD_PASSWD_DYNAMIC 1
15995 EOF
15996
15997                 BUILD_PASSWD=mod
15998                 BUILD_PASSWD_DYNAMIC=shared
15999                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16000         fi
16001 fi
16002
16003 if test "$ol_enable_shell" != no ; then
16004         cat >> confdefs.h <<\EOF
16005 #define SLAPD_SHELL 1
16006 EOF
16007
16008         BUILD_SLAPD=yes
16009         BUILD_SHELL=yes
16010         if test "$ol_with_shell_module" != static ; then
16011                 cat >> confdefs.h <<\EOF
16012 #define SLAPD_SHELL_DYNAMIC 1
16013 EOF
16014
16015                 BUILD_SHELL=mod
16016                 BUILD_SHELL_DYNAMIC=shared
16017                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16018         fi
16019 fi
16020
16021 if test "$ol_enable_sql" != no ; then
16022         cat >> confdefs.h <<\EOF
16023 #define SLAPD_SQL 1
16024 EOF
16025
16026         BUILD_SLAPD=yes
16027         BUILD_SQL=yes
16028         if test "$ol_with_sql_module" != static; then
16029                 cat >> confdefs.h <<\EOF
16030 #define SLAPD_SQL_DYNAMIC 1
16031 EOF
16032
16033                 BUILD_SQL=mod
16034                 BUILD_SQL_DYNAMIC=shared
16035                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16036         fi
16037 fi
16038
16039 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16040         $BUILD_SLAPD = yes ; then
16041         BUILD_SLURPD=yes
16042 fi
16043
16044
16045 if test "$LINK_BINS_DYNAMIC" = yes; then
16046     LIB_LINKAGE=DYN
16047     LT_LIB_LINKAGE=shared
16048 else
16049     LIB_LINKAGE=STAT
16050     LT_LIB_LINKAGE=static
16051 fi
16052
16053 if test "$ac_cv_mingw32" = yes ; then
16054     PLAT=NT
16055     DYN_EXT=dll
16056 else
16057     PLAT=UNIX
16058     DYN_EXT=so
16059 fi
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069   
16070   
16071   
16072   
16073   
16074   
16075   
16076   
16077   
16078   
16079   
16080   
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111 trap '' 1 2 15
16112
16113 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16114
16115 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16116 # Let make expand exec_prefix.
16117 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16118
16119 # Any assignment to VPATH causes Sun make to only execute
16120 # the first set of double-colon rules, so remove it if not needed.
16121 # If there is a colon in the path, we need to keep it.
16122 if test "x$srcdir" = x.; then
16123   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16124 fi
16125
16126 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16127
16128 DEFS=-DHAVE_CONFIG_H
16129
16130 # Without the "./", some shells look in PATH for config.status.
16131 : ${CONFIG_STATUS=./config.status}
16132
16133 echo creating $CONFIG_STATUS
16134 rm -f $CONFIG_STATUS
16135 cat > $CONFIG_STATUS <<EOF
16136 #! /bin/sh
16137 # Generated automatically by configure.
16138 # Run this file to recreate the current configuration.
16139 # This directory was configured as follows,
16140 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16141 #
16142 # $0 $ac_configure_args
16143 #
16144 # Compiler output produced by configure, useful for debugging
16145 # configure, is in ./config.log if it exists.
16146
16147 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16148 for ac_option
16149 do
16150   case "\$ac_option" in
16151   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16152     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16153     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16154   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16155     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16156     exit 0 ;;
16157   -help | --help | --hel | --he | --h)
16158     echo "\$ac_cs_usage"; exit 0 ;;
16159   *) echo "\$ac_cs_usage"; exit 1 ;;
16160   esac
16161 done
16162
16163 ac_given_srcdir=$srcdir
16164 ac_given_INSTALL="$INSTALL"
16165
16166 trap 'rm -fr `echo "\
16167 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16168 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16169 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16170 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16171 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16172 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16173 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16174 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16175 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16176 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16177 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16178 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16179 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16180 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16181 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16182 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16183 include/Makefile:build/top.mk:include/Makefile.in \
16184 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16185 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16186 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16187 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16188 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16189 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16190 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16191 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16192 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16193 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16194 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16195 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16196 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16197 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16198 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16199 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16200 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16201 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16202 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16203 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16204 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16205 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16206 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16207 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16208  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16209 EOF
16210 cat >> $CONFIG_STATUS <<EOF
16211
16212 # Protect against being on the right side of a sed subst in config.status.
16213 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16214  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16215 $ac_vpsub
16216 $extrasub
16217 s%@SHELL@%$SHELL%g
16218 s%@CFLAGS@%$CFLAGS%g
16219 s%@CPPFLAGS@%$CPPFLAGS%g
16220 s%@CXXFLAGS@%$CXXFLAGS%g
16221 s%@FFLAGS@%$FFLAGS%g
16222 s%@DEFS@%$DEFS%g
16223 s%@LDFLAGS@%$LDFLAGS%g
16224 s%@LIBS@%$LIBS%g
16225 s%@exec_prefix@%$exec_prefix%g
16226 s%@prefix@%$prefix%g
16227 s%@program_transform_name@%$program_transform_name%g
16228 s%@bindir@%$bindir%g
16229 s%@sbindir@%$sbindir%g
16230 s%@libexecdir@%$libexecdir%g
16231 s%@datadir@%$datadir%g
16232 s%@sysconfdir@%$sysconfdir%g
16233 s%@sharedstatedir@%$sharedstatedir%g
16234 s%@localstatedir@%$localstatedir%g
16235 s%@libdir@%$libdir%g
16236 s%@includedir@%$includedir%g
16237 s%@oldincludedir@%$oldincludedir%g
16238 s%@infodir@%$infodir%g
16239 s%@mandir@%$mandir%g
16240 s%@host@%$host%g
16241 s%@host_alias@%$host_alias%g
16242 s%@host_cpu@%$host_cpu%g
16243 s%@host_vendor@%$host_vendor%g
16244 s%@host_os@%$host_os%g
16245 s%@target@%$target%g
16246 s%@target_alias@%$target_alias%g
16247 s%@target_cpu@%$target_cpu%g
16248 s%@target_vendor@%$target_vendor%g
16249 s%@target_os@%$target_os%g
16250 s%@build@%$build%g
16251 s%@build_alias@%$build_alias%g
16252 s%@build_cpu@%$build_cpu%g
16253 s%@build_vendor@%$build_vendor%g
16254 s%@build_os@%$build_os%g
16255 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16256 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16257 s%@INSTALL_DATA@%$INSTALL_DATA%g
16258 s%@PACKAGE@%$PACKAGE%g
16259 s%@VERSION@%$VERSION%g
16260 s%@ACLOCAL@%$ACLOCAL%g
16261 s%@AUTOCONF@%$AUTOCONF%g
16262 s%@AUTOMAKE@%$AUTOMAKE%g
16263 s%@AUTOHEADER@%$AUTOHEADER%g
16264 s%@MAKEINFO@%$MAKEINFO%g
16265 s%@install_sh@%$install_sh%g
16266 s%@AMTAR@%$AMTAR%g
16267 s%@AWK@%$AWK%g
16268 s%@AMTARFLAGS@%$AMTARFLAGS%g
16269 s%@SET_MAKE@%$SET_MAKE%g
16270 s%@top_builddir@%$top_builddir%g
16271 s%@ldap_subdir@%$ldap_subdir%g
16272 s%@CC@%$CC%g
16273 s%@RANLIB@%$RANLIB%g
16274 s%@LN_S@%$LN_S%g
16275 s%@DLLTOOL@%$DLLTOOL%g
16276 s%@AS@%$AS%g
16277 s%@OBJDUMP@%$OBJDUMP%g
16278 s%@LIBTOOL@%$LIBTOOL%g
16279 s%@LN_H@%$LN_H%g
16280 s%@SENDMAIL@%$SENDMAIL%g
16281 s%@EDITOR@%$EDITOR%g
16282 s%@FINGER@%$FINGER%g
16283 s%@CPP@%$CPP%g
16284 s%@EXEEXT@%$EXEEXT%g
16285 s%@OBJEXT@%$OBJEXT%g
16286 s%@OL_MKDEP@%$OL_MKDEP%g
16287 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16288 s%@LIBOBJS@%$LIBOBJS%g
16289 s%@LIBSRCS@%$LIBSRCS%g
16290 s%@PLAT@%$PLAT%g
16291 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16292 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16293 s%@DYN_EXT@%$DYN_EXT%g
16294 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16295 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16296 s%@BUILD_LDAP@%$BUILD_LDAP%g
16297 s%@BUILD_LDBM@%$BUILD_LDBM%g
16298 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16299 s%@BUILD_SHELL@%$BUILD_SHELL%g
16300 s%@BUILD_SQL@%$BUILD_SQL%g
16301 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16302 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16303 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16304 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16305 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16306 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16307 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16308 s%@LDAP_LIBS@%$LDAP_LIBS%g
16309 s%@LDIF_LIBS@%$LDIF_LIBS%g
16310 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16311 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16312 s%@LDBM_LIBS@%$LDBM_LIBS%g
16313 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16314 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16315 s%@WRAP_LIBS@%$WRAP_LIBS%g
16316 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16317 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16318 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16319 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16320 s%@KRB4_LIBS@%$KRB4_LIBS%g
16321 s%@KRB5_LIBS@%$KRB5_LIBS%g
16322 s%@READLINE_LIBS@%$READLINE_LIBS%g
16323 s%@SASL_LIBS@%$SASL_LIBS%g
16324 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16325 s%@TLS_LIBS@%$TLS_LIBS%g
16326 s%@MODULES_LIBS@%$MODULES_LIBS%g
16327 s%@AUTH_LIBS@%$AUTH_LIBS%g
16328 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16329 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16330 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16331
16332 CEOF
16333 EOF
16334
16335 cat >> $CONFIG_STATUS <<\EOF
16336
16337 # Split the substitutions into bite-sized pieces for seds with
16338 # small command number limits, like on Digital OSF/1 and HP-UX.
16339 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16340 ac_file=1 # Number of current file.
16341 ac_beg=1 # First line for current file.
16342 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16343 ac_more_lines=:
16344 ac_sed_cmds=""
16345 while $ac_more_lines; do
16346   if test $ac_beg -gt 1; then
16347     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16348   else
16349     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16350   fi
16351   if test ! -s conftest.s$ac_file; then
16352     ac_more_lines=false
16353     rm -f conftest.s$ac_file
16354   else
16355     if test -z "$ac_sed_cmds"; then
16356       ac_sed_cmds="sed -f conftest.s$ac_file"
16357     else
16358       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16359     fi
16360     ac_file=`expr $ac_file + 1`
16361     ac_beg=$ac_end
16362     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16363   fi
16364 done
16365 if test -z "$ac_sed_cmds"; then
16366   ac_sed_cmds=cat
16367 fi
16368 EOF
16369
16370 cat >> $CONFIG_STATUS <<EOF
16371
16372 CONFIG_FILES=\${CONFIG_FILES-"\
16373 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16374 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16375 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16376 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16377 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16378 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16379 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16380 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16381 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16382 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16383 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16384 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16385 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16386 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16387 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16388 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16389 include/Makefile:build/top.mk:include/Makefile.in \
16390 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16391 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16392 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16393 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16394 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16395 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16396 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16397 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16398 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16399 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16400 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16401 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16402 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16403 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16404 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16405 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16406 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16407 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16408 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16409 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16410 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16411 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16412 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16413 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16414 "}
16415 EOF
16416 cat >> $CONFIG_STATUS <<\EOF
16417 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16418   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16419   case "$ac_file" in
16420   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16421        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16422   *) ac_file_in="${ac_file}.in" ;;
16423   esac
16424
16425   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16426
16427   # Remove last slash and all that follows it.  Not all systems have dirname.
16428   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16429   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16430     # The file is in a subdirectory.
16431     test ! -d "$ac_dir" && mkdir "$ac_dir"
16432     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16433     # A "../" for each directory in $ac_dir_suffix.
16434     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16435   else
16436     ac_dir_suffix= ac_dots=
16437   fi
16438
16439   case "$ac_given_srcdir" in
16440   .)  srcdir=.
16441       if test -z "$ac_dots"; then top_srcdir=.
16442       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16443   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16444   *) # Relative path.
16445     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16446     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16447   esac
16448
16449   case "$ac_given_INSTALL" in
16450   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16451   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16452   esac
16453
16454   echo creating "$ac_file"
16455   rm -f "$ac_file"
16456   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16457   case "$ac_file" in
16458   *[Mm]akefile*) ac_comsub="1i\\
16459 # $configure_input" ;;
16460   *) ac_comsub= ;;
16461   esac
16462
16463   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16464   sed -e "$ac_comsub
16465 s%@configure_input@%$configure_input%g
16466 s%@srcdir@%$srcdir%g
16467 s%@top_srcdir@%$top_srcdir%g
16468 s%@INSTALL@%$INSTALL%g
16469 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16470 fi; done
16471 rm -f conftest.s*
16472
16473 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16474 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16475 #
16476 # ac_d sets the value in "#define NAME VALUE" lines.
16477 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16478 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16479 ac_dC='\3'
16480 ac_dD='%g'
16481 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16482 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16483 ac_uB='\([      ]\)%\1#\2define\3'
16484 ac_uC=' '
16485 ac_uD='\4%g'
16486 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16487 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16488 ac_eB='$%\1#\2define\3'
16489 ac_eC=' '
16490 ac_eD='%g'
16491
16492 if test "${CONFIG_HEADERS+set}" != set; then
16493 EOF
16494 cat >> $CONFIG_STATUS <<EOF
16495   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16496 EOF
16497 cat >> $CONFIG_STATUS <<\EOF
16498 fi
16499 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16500   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16501   case "$ac_file" in
16502   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16503        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16504   *) ac_file_in="${ac_file}.in" ;;
16505   esac
16506
16507   echo creating $ac_file
16508
16509   rm -f conftest.frag conftest.in conftest.out
16510   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16511   cat $ac_file_inputs > conftest.in
16512
16513 EOF
16514
16515 # Transform confdefs.h into a sed script conftest.vals that substitutes
16516 # the proper values into config.h.in to produce config.h.  And first:
16517 # Protect against being on the right side of a sed subst in config.status.
16518 # Protect against being in an unquoted here document in config.status.
16519 rm -f conftest.vals
16520 cat > conftest.hdr <<\EOF
16521 s/[\\&%]/\\&/g
16522 s%[\\$`]%\\&%g
16523 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16524 s%ac_d%ac_u%gp
16525 s%ac_u%ac_e%gp
16526 EOF
16527 sed -n -f conftest.hdr confdefs.h > conftest.vals
16528 rm -f conftest.hdr
16529
16530 # This sed command replaces #undef with comments.  This is necessary, for
16531 # example, in the case of _POSIX_SOURCE, which is predefined and required
16532 # on some systems where configure will not decide to define it.
16533 cat >> conftest.vals <<\EOF
16534 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16535 EOF
16536
16537 # Break up conftest.vals because some shells have a limit on
16538 # the size of here documents, and old seds have small limits too.
16539
16540 rm -f conftest.tail
16541 while :
16542 do
16543   ac_lines=`grep -c . conftest.vals`
16544   # grep -c gives empty output for an empty file on some AIX systems.
16545   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16546   # Write a limited-size here document to conftest.frag.
16547   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16548   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16549   echo 'CEOF
16550   sed -f conftest.frag conftest.in > conftest.out
16551   rm -f conftest.in
16552   mv conftest.out conftest.in
16553 ' >> $CONFIG_STATUS
16554   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16555   rm -f conftest.vals
16556   mv conftest.tail conftest.vals
16557 done
16558 rm -f conftest.vals
16559
16560 cat >> $CONFIG_STATUS <<\EOF
16561   rm -f conftest.frag conftest.h
16562   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16563   cat conftest.in >> conftest.h
16564   rm -f conftest.in
16565   if cmp -s $ac_file conftest.h 2>/dev/null; then
16566     echo "$ac_file is unchanged"
16567     rm -f conftest.h
16568   else
16569     # Remove last slash and all that follows it.  Not all systems have dirname.
16570       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16571       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16572       # The file is in a subdirectory.
16573       test ! -d "$ac_dir" && mkdir "$ac_dir"
16574     fi
16575     rm -f $ac_file
16576     mv conftest.h $ac_file
16577   fi
16578 fi; done
16579
16580 EOF
16581 cat >> $CONFIG_STATUS <<EOF
16582
16583 EOF
16584 cat >> $CONFIG_STATUS <<\EOF
16585
16586 date > stamp-h
16587 echo Please \"make depend\" to build dependencies
16588
16589 exit 0
16590 EOF
16591 chmod +x $CONFIG_STATUS
16592 rm -fr confdefs* $ac_clean_files
16593 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16594