]> git.sur5r.net Git - openldap/blob - configure
Import ACL patch from devel
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP 
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals    enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind        enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-ipv6         enable IPv6 support (auto)"
45 ac_help="$ac_help
46   --enable-unix         enable UNIX domain socket support (auto)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --with-cyrus-sasl     with Cyrus SASL support (auto)"
51 ac_help="$ac_help
52   --with-fetch          with fetch URL support (auto)"
53 ac_help="$ac_help
54   --with-kerberos       with support (auto)"
55 ac_help="$ac_help
56   --with-readline       with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads        use threads (auto)"
59 ac_help="$ac_help
60   --with-tls            with TLS/SSL support (auto)"
61 ac_help="$ac_help
62   --with-yielding-select        with implicitly yielding select (auto)"
63 ac_help="$ac_help
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd        enable building slapd (yes)"
67 ac_help="$ac_help
68     --enable-cleartext  enable cleartext passwords (yes)"
69 ac_help="$ac_help
70     --enable-crypt      enable crypt(3) passwords (auto)"
71 ac_help="$ac_help
72     --enable-kpasswd    enable kerberos password verification (no)"
73 ac_help="$ac_help
74     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
75 ac_help="$ac_help
76     --enable-modules    enable dynamic module support (no)"
77 ac_help="$ac_help
78     --enable-multimaster        enable multimaster replication (no)"
79 ac_help="$ac_help
80     --enable-phonetic   enable phonetic/soundex (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-wrappers   enable tcp wrapper support (no)"
87 ac_help="$ac_help
88     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
89 ac_help="$ac_help
90     --enable-dnssrv     enable dnssrv backend (no)"
91 ac_help="$ac_help
92       --with-dnssrv-module      module type (static)"
93 ac_help="$ac_help
94     --enable-ldap       enable ldap backend (no)"
95 ac_help="$ac_help
96       --with-ldap-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm       enable ldbm backend (yes)"
99 ac_help="$ac_help
100       --with-ldbm-api   use LDBM API (auto)"
101 ac_help="$ac_help
102       --with-ldbm-module        module type (static)"
103 ac_help="$ac_help
104       --with-ldbm-type  use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd     enable passwd backend (no)"
107 ac_help="$ac_help
108       --with-passwd-module      module type (static)"
109 ac_help="$ac_help
110     --enable-shell      enable shell backend (no)"
111 ac_help="$ac_help
112       --with-shell-module       module type (static)"
113 ac_help="$ac_help
114     --enable-sql        enable sql backend (no)"
115 ac_help="$ac_help
116       --with-sql-module module type (static)"
117 ac_help="$ac_help
118 SLURPD (Replication Daemon) Options:"
119 ac_help="$ac_help
120   --enable-slurpd       enable building slurpd (auto)"
121 ac_help="$ac_help
122 Library Generation & Linking Options"
123 ac_help="$ac_help
124   --enable-static[=PKGS]  build static libraries [default=yes]"
125 ac_help="$ac_help
126   --enable-shared[=PKGS]  build shared libraries [default=yes]"
127 ac_help="$ac_help
128   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
129 ac_help="$ac_help
130   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
131 ac_help="$ac_help
132   --disable-libtool-lock  avoid locking (might break parallel builds)"
133
134 # Initialize some variables set by options.
135 # The variables have the same names as the options, with
136 # dashes changed to underlines.
137 build=NONE
138 cache_file=./config.cache
139 exec_prefix=NONE
140 host=NONE
141 no_create=
142 nonopt=NONE
143 no_recursion=
144 prefix=NONE
145 program_prefix=NONE
146 program_suffix=NONE
147 program_transform_name=s,x,x,
148 silent=
149 site=
150 srcdir=
151 target=NONE
152 verbose=
153 x_includes=NONE
154 x_libraries=NONE
155 bindir='${exec_prefix}/bin'
156 sbindir='${exec_prefix}/sbin'
157 libexecdir='${exec_prefix}/libexec'
158 datadir='${prefix}/share'
159 sysconfdir='${prefix}/etc'
160 sharedstatedir='${prefix}/com'
161 localstatedir='${prefix}/var'
162 libdir='${exec_prefix}/lib'
163 includedir='${prefix}/include'
164 oldincludedir='/usr/include'
165 infodir='${prefix}/info'
166 mandir='${prefix}/man'
167
168 # Initialize some other variables.
169 subdirs=
170 MFLAGS= MAKEFLAGS=
171 SHELL=${CONFIG_SHELL-/bin/sh}
172 # Maximum number of lines to put in a shell here document.
173 ac_max_here_lines=12
174
175 ac_prev=
176 for ac_option
177 do
178
179   # If the previous option needs an argument, assign it.
180   if test -n "$ac_prev"; then
181     eval "$ac_prev=\$ac_option"
182     ac_prev=
183     continue
184   fi
185
186   case "$ac_option" in
187   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
188   *) ac_optarg= ;;
189   esac
190
191   # Accept the important Cygnus configure options, so we can diagnose typos.
192
193   case "$ac_option" in
194
195   -bindir | --bindir | --bindi | --bind | --bin | --bi)
196     ac_prev=bindir ;;
197   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
198     bindir="$ac_optarg" ;;
199
200   -build | --build | --buil | --bui | --bu)
201     ac_prev=build ;;
202   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
203     build="$ac_optarg" ;;
204
205   -cache-file | --cache-file | --cache-fil | --cache-fi \
206   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
207     ac_prev=cache_file ;;
208   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
209   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
210     cache_file="$ac_optarg" ;;
211
212   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
213     ac_prev=datadir ;;
214   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
215   | --da=*)
216     datadir="$ac_optarg" ;;
217
218   -disable-* | --disable-*)
219     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
220     # Reject names that are not valid shell variable names.
221     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
222       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
223     fi
224     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
225     eval "enable_${ac_feature}=no" ;;
226
227   -enable-* | --enable-*)
228     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
229     # Reject names that are not valid shell variable names.
230     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
231       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
232     fi
233     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
234     case "$ac_option" in
235       *=*) ;;
236       *) ac_optarg=yes ;;
237     esac
238     eval "enable_${ac_feature}='$ac_optarg'" ;;
239
240   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
241   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
242   | --exec | --exe | --ex)
243     ac_prev=exec_prefix ;;
244   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
245   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
246   | --exec=* | --exe=* | --ex=*)
247     exec_prefix="$ac_optarg" ;;
248
249   -gas | --gas | --ga | --g)
250     # Obsolete; use --with-gas.
251     with_gas=yes ;;
252
253   -help | --help | --hel | --he)
254     # Omit some internal or obsolete options to make the list less imposing.
255     # This message is too long to be a string in the A/UX 3.1 sh.
256     cat << EOF
257 Usage: configure [options] [host]
258 Options: [defaults in brackets after descriptions]
259 Configuration:
260   --cache-file=FILE       cache test results in FILE
261   --help                  print this message
262   --no-create             do not create output files
263   --quiet, --silent       do not print \`checking...' messages
264   --version               print the version of autoconf that created configure
265 Directory and file names:
266   --prefix=PREFIX         install architecture-independent files in PREFIX
267                           [$ac_default_prefix]
268   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
269                           [same as prefix]
270   --bindir=DIR            user executables in DIR [EPREFIX/bin]
271   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
272   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
273   --datadir=DIR           read-only architecture-independent data in DIR
274                           [PREFIX/share]
275   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
276   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
277                           [PREFIX/com]
278   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
279   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
280   --includedir=DIR        C header files in DIR [PREFIX/include]
281   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
282   --infodir=DIR           info documentation in DIR [PREFIX/info]
283   --mandir=DIR            man documentation in DIR [PREFIX/man]
284   --srcdir=DIR            find the sources in DIR [configure dir or ..]
285   --program-prefix=PREFIX prepend PREFIX to installed program names
286   --program-suffix=SUFFIX append SUFFIX to installed program names
287   --program-transform-name=PROGRAM
288                           run sed PROGRAM on installed program names
289 EOF
290     cat << EOF
291 Host type:
292   --build=BUILD           configure for building on BUILD [BUILD=HOST]
293   --host=HOST             configure for HOST [guessed]
294   --target=TARGET         configure for TARGET [TARGET=HOST]
295 Features and packages:
296   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
297   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
298   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
299   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
300   --x-includes=DIR        X include files are in DIR
301   --x-libraries=DIR       X library files are in DIR
302 EOF
303     if test -n "$ac_help"; then
304       echo "--enable and --with options recognized:$ac_help"
305     fi
306     exit 0 ;;
307
308   -host | --host | --hos | --ho)
309     ac_prev=host ;;
310   -host=* | --host=* | --hos=* | --ho=*)
311     host="$ac_optarg" ;;
312
313   -includedir | --includedir | --includedi | --included | --include \
314   | --includ | --inclu | --incl | --inc)
315     ac_prev=includedir ;;
316   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
317   | --includ=* | --inclu=* | --incl=* | --inc=*)
318     includedir="$ac_optarg" ;;
319
320   -infodir | --infodir | --infodi | --infod | --info | --inf)
321     ac_prev=infodir ;;
322   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
323     infodir="$ac_optarg" ;;
324
325   -libdir | --libdir | --libdi | --libd)
326     ac_prev=libdir ;;
327   -libdir=* | --libdir=* | --libdi=* | --libd=*)
328     libdir="$ac_optarg" ;;
329
330   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
331   | --libexe | --libex | --libe)
332     ac_prev=libexecdir ;;
333   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
334   | --libexe=* | --libex=* | --libe=*)
335     libexecdir="$ac_optarg" ;;
336
337   -localstatedir | --localstatedir | --localstatedi | --localstated \
338   | --localstate | --localstat | --localsta | --localst \
339   | --locals | --local | --loca | --loc | --lo)
340     ac_prev=localstatedir ;;
341   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
342   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
343   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
344     localstatedir="$ac_optarg" ;;
345
346   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
347     ac_prev=mandir ;;
348   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
349     mandir="$ac_optarg" ;;
350
351   -nfp | --nfp | --nf)
352     # Obsolete; use --without-fp.
353     with_fp=no ;;
354
355   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
356   | --no-cr | --no-c)
357     no_create=yes ;;
358
359   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
360   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
361     no_recursion=yes ;;
362
363   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
364   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
365   | --oldin | --oldi | --old | --ol | --o)
366     ac_prev=oldincludedir ;;
367   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
368   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
369   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
370     oldincludedir="$ac_optarg" ;;
371
372   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
373     ac_prev=prefix ;;
374   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
375     prefix="$ac_optarg" ;;
376
377   -program-prefix | --program-prefix | --program-prefi | --program-pref \
378   | --program-pre | --program-pr | --program-p)
379     ac_prev=program_prefix ;;
380   -program-prefix=* | --program-prefix=* | --program-prefi=* \
381   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
382     program_prefix="$ac_optarg" ;;
383
384   -program-suffix | --program-suffix | --program-suffi | --program-suff \
385   | --program-suf | --program-su | --program-s)
386     ac_prev=program_suffix ;;
387   -program-suffix=* | --program-suffix=* | --program-suffi=* \
388   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
389     program_suffix="$ac_optarg" ;;
390
391   -program-transform-name | --program-transform-name \
392   | --program-transform-nam | --program-transform-na \
393   | --program-transform-n | --program-transform- \
394   | --program-transform | --program-transfor \
395   | --program-transfo | --program-transf \
396   | --program-trans | --program-tran \
397   | --progr-tra | --program-tr | --program-t)
398     ac_prev=program_transform_name ;;
399   -program-transform-name=* | --program-transform-name=* \
400   | --program-transform-nam=* | --program-transform-na=* \
401   | --program-transform-n=* | --program-transform-=* \
402   | --program-transform=* | --program-transfor=* \
403   | --program-transfo=* | --program-transf=* \
404   | --program-trans=* | --program-tran=* \
405   | --progr-tra=* | --program-tr=* | --program-t=*)
406     program_transform_name="$ac_optarg" ;;
407
408   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
409   | -silent | --silent | --silen | --sile | --sil)
410     silent=yes ;;
411
412   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
413     ac_prev=sbindir ;;
414   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
415   | --sbi=* | --sb=*)
416     sbindir="$ac_optarg" ;;
417
418   -sharedstatedir | --sharedstatedir | --sharedstatedi \
419   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
420   | --sharedst | --shareds | --shared | --share | --shar \
421   | --sha | --sh)
422     ac_prev=sharedstatedir ;;
423   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
424   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
425   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
426   | --sha=* | --sh=*)
427     sharedstatedir="$ac_optarg" ;;
428
429   -site | --site | --sit)
430     ac_prev=site ;;
431   -site=* | --site=* | --sit=*)
432     site="$ac_optarg" ;;
433
434   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
435     ac_prev=srcdir ;;
436   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
437     srcdir="$ac_optarg" ;;
438
439   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
440   | --syscon | --sysco | --sysc | --sys | --sy)
441     ac_prev=sysconfdir ;;
442   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
443   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
444     sysconfdir="$ac_optarg" ;;
445
446   -target | --target | --targe | --targ | --tar | --ta | --t)
447     ac_prev=target ;;
448   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
449     target="$ac_optarg" ;;
450
451   -v | -verbose | --verbose | --verbos | --verbo | --verb)
452     verbose=yes ;;
453
454   -version | --version | --versio | --versi | --vers)
455     echo "configure generated by autoconf version 2.13.1"
456     exit 0 ;;
457
458   -with-* | --with-*)
459     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
460     # Reject names that are not valid shell variable names.
461     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
462       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
463     fi
464     ac_package=`echo $ac_package| sed 's/-/_/g'`
465     case "$ac_option" in
466       *=*) ;;
467       *) ac_optarg=yes ;;
468     esac
469     eval "with_${ac_package}='$ac_optarg'" ;;
470
471   -without-* | --without-*)
472     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
473     # Reject names that are not valid shell variable names.
474     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
475       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
476     fi
477     ac_package=`echo $ac_package| sed 's/-/_/g'`
478     eval "with_${ac_package}=no" ;;
479
480   --x)
481     # Obsolete; use --with-x.
482     with_x=yes ;;
483
484   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
485   | --x-incl | --x-inc | --x-in | --x-i)
486     ac_prev=x_includes ;;
487   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
488   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
489     x_includes="$ac_optarg" ;;
490
491   -x-libraries | --x-libraries | --x-librarie | --x-librari \
492   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
493     ac_prev=x_libraries ;;
494   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
495   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
496     x_libraries="$ac_optarg" ;;
497
498   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
499     ;;
500
501   *)
502     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
503       echo "configure: warning: $ac_option: invalid host type" 1>&2
504     fi
505     if test "x$nonopt" != xNONE; then
506       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
507     fi
508     nonopt="$ac_option"
509     ;;
510
511   esac
512 done
513
514 if test -n "$ac_prev"; then
515   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
516 fi
517
518 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
519
520 # File descriptor usage:
521 # 0 standard input
522 # 1 file creation
523 # 2 errors and warnings
524 # 3 some systems may open it to /dev/tty
525 # 4 used on the Kubota Titan
526 # 6 checking for... messages and results
527 # 5 compiler messages saved in config.log
528 if test "$silent" = yes; then
529   exec 6>/dev/null
530 else
531   exec 6>&1
532 fi
533 exec 5>./config.log
534
535 echo "\
536 This file contains any messages produced by compilers while
537 running configure, to aid debugging if configure makes a mistake.
538 " 1>&5
539
540 # Strip out --no-create and --no-recursion so they do not pile up.
541 # Also quote any args containing shell metacharacters.
542 ac_configure_args=
543 for ac_arg
544 do
545   case "$ac_arg" in
546   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
547   | --no-cr | --no-c) ;;
548   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
549   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
550   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
551   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
552   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
553   esac
554 done
555
556 # NLS nuisances.
557 # Only set these to C if already set.  These must not be set unconditionally
558 # because not all systems understand e.g. LANG=C (notably SCO).
559 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
560 # Non-C LC_CTYPE values break the ctype check.
561 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
562 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
563 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
564 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
565
566 # confdefs.h avoids OS command line length limits that DEFS can exceed.
567 rm -rf conftest* confdefs.h
568 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
569 echo > confdefs.h
570
571 # A filename unique to this package, relative to the directory that
572 # configure is in, which we can look for to find out if srcdir is correct.
573 ac_unique_file=build/version
574
575 # Find the source files, if location was not specified.
576 if test -z "$srcdir"; then
577   ac_srcdir_defaulted=yes
578   # Try the directory containing this script, then its parent.
579   ac_prog=$0
580   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
581   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
582   srcdir=$ac_confdir
583   if test ! -r $srcdir/$ac_unique_file; then
584     srcdir=..
585   fi
586 else
587   ac_srcdir_defaulted=no
588 fi
589 if test ! -r $srcdir/$ac_unique_file; then
590   if test "$ac_srcdir_defaulted" = yes; then
591     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
592   else
593     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
594   fi
595 fi
596 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
597
598 # Prefer explicitly selected file to automatically selected ones.
599 if test -z "$CONFIG_SITE"; then
600   if test "x$prefix" != xNONE; then
601     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
602   else
603     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
604   fi
605 fi
606 for ac_site_file in $CONFIG_SITE; do
607   if test -r "$ac_site_file"; then
608     echo "loading site script $ac_site_file"
609     . "$ac_site_file"
610   fi
611 done
612
613
614 ac_ext=c
615 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
616 ac_cpp='$CPP $CPPFLAGS'
617 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
618 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
619 cross_compiling=$ac_cv_prog_cc_cross
620
621 ac_exeext=
622 ac_objext=o
623 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
624   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
625   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
626     ac_n= ac_c='
627 ' ac_t='        '
628   else
629     ac_n=-n ac_c= ac_t=
630   fi
631 else
632   ac_n= ac_c='\c' ac_t=
633 fi
634
635
636 # set unset (borrowed from autoconf 2.14a)
637 if (unset FOO) >/dev/null 2>&1; then
638   ol_unset=unset
639 else
640   ol_unset=false
641 fi
642 # unset CDPATH
643 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
644
645 ac_aux_dir=
646 for ac_dir in build $srcdir/build; do
647   if 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/install.sh; then
652     ac_aux_dir=$ac_dir
653     ac_install_sh="$ac_aux_dir/install.sh -c"
654     break
655   elif test -f $ac_dir/shtool; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/shtool install -c"
658     break
659   fi
660 done
661 if test -z "$ac_aux_dir"; then
662   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
663 fi
664 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
665 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
666 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
667
668 OL_VERSION=`cat $ac_aux_dir/version`
669 if test -z "$OL_VERSION"; then
670         { echo "configure: error: could not determine version" 1>&2; exit 1; }
671 fi
672
673 echo "Configuring OpenLDAP $OL_VERSION ..."
674
675
676 echo $ac_n "checking host system type""... $ac_c" 1>&6
677 echo "configure:678: checking host system type" >&5
678 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
679
680 # Make sure we can run config.sub.
681   if $ac_config_sub sun4 >/dev/null 2>&1; then :
682     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
683   fi
684
685   ac_cv_host_alias=$host
686   case "$ac_cv_host_alias" in
687   NONE)
688     case $nonopt in
689     NONE)
690       if ac_cv_host_alias=`$ac_config_guess`; then :
691       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
692       fi ;;
693     *) ac_cv_host_alias=$nonopt ;;
694     esac ;;
695   esac
696
697   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
698   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
699   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
700   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
701 else
702   echo $ac_n "(cached) $ac_c" 1>&6
703 fi
704
705 echo "$ac_t""$ac_cv_host" 1>&6
706
707 host=$ac_cv_host
708 host_alias=$ac_cv_host_alias
709 host_cpu=$ac_cv_host_cpu
710 host_vendor=$ac_cv_host_vendor
711 host_os=$ac_cv_host_os
712
713
714
715
716
717 echo $ac_n "checking target system type""... $ac_c" 1>&6
718 echo "configure:719: checking target system type" >&5
719 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
720
721 # Make sure we can run config.sub.
722   if $ac_config_sub sun4 >/dev/null 2>&1; then :
723     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
724   fi
725
726   ac_cv_target_alias=$target
727   case "$ac_cv_target_alias" in
728   NONE)
729     case $nonopt in
730     NONE)
731       ac_cv_target_alias=$host_alias ;;
732
733     *) ac_cv_target_alias=$nonopt ;;
734     esac ;;
735   esac
736
737   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
738   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
739   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
740   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
741 else
742   echo $ac_n "(cached) $ac_c" 1>&6
743 fi
744
745 echo "$ac_t""$ac_cv_target" 1>&6
746
747 target=$ac_cv_target
748 target_alias=$ac_cv_target_alias
749 target_cpu=$ac_cv_target_cpu
750 target_vendor=$ac_cv_target_vendor
751 target_os=$ac_cv_target_os
752
753
754
755
756
757 echo $ac_n "checking build system type""... $ac_c" 1>&6
758 echo "configure:759: checking build system type" >&5
759 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
760
761 # Make sure we can run config.sub.
762   if $ac_config_sub sun4 >/dev/null 2>&1; then :
763     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
764   fi
765
766   ac_cv_build_alias=$build
767   case "$ac_cv_build_alias" in
768   NONE)
769     case $nonopt in
770     NONE)
771       ac_cv_build_alias=$host_alias ;;
772
773     *) ac_cv_build_alias=$nonopt ;;
774     esac ;;
775   esac
776
777   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
778   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
779   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
780   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
781 else
782   echo $ac_n "(cached) $ac_c" 1>&6
783 fi
784
785 echo "$ac_t""$ac_cv_build" 1>&6
786
787 build=$ac_cv_build
788 build_alias=$ac_cv_build_alias
789 build_cpu=$ac_cv_build_cpu
790 build_vendor=$ac_cv_build_vendor
791 build_os=$ac_cv_build_os
792
793
794
795
796
797 # Do some error checking and defaulting for the host and target type.
798 # The inputs are:
799 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
800 #
801 # The rules are:
802 # 1. You are not allowed to specify --host, --target, and nonopt at the
803 #    same time.
804 # 2. Host defaults to nonopt.
805 # 3. If nonopt is not specified, then host defaults to the current host,
806 #    as determined by config.guess.
807 # 4. Target and build default to nonopt.
808 # 5. If nonopt is not specified, then target and build default to host.
809
810 # The aliases save the names the user supplied, while $host etc.
811 # will get canonicalized.
812 case $host---$target---$nonopt in
813 NONE---*---* | *---NONE---* | *---*---NONE) ;;
814 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
815 esac
816
817 test "$host_alias" != "$target_alias" &&
818   test "$program_prefix$program_suffix$program_transform_name" = \
819     NONENONEs,x,x, &&
820   program_prefix=${target_alias}-
821
822
823 # Find a good install program.  We prefer a C program (faster),
824 # so one script is as good as another.  But avoid the broken or
825 # incompatible versions:
826 # SysV /etc/install, /usr/sbin/install
827 # SunOS /usr/etc/install
828 # IRIX /sbin/install
829 # AIX /bin/install
830 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
831 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
832 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
833 # ./install, which can be erroneously created by make from ./install.sh.
834 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
835 echo "configure:836: checking for a BSD compatible install" >&5
836 if test -z "$INSTALL"; then
837 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
838   echo $ac_n "(cached) $ac_c" 1>&6
839 else
840     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
841   for ac_dir in $PATH; do
842     # Account for people who put trailing slashes in PATH elements.
843     case "$ac_dir/" in
844     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
845     *)
846       # OSF1 and SCO ODT 3.0 have their own names for install.
847       # Don't use installbsd from OSF since it installs stuff as root
848       # by default.
849       for ac_prog in ginstall scoinst install; do
850         if test -f $ac_dir/$ac_prog; then
851           if test $ac_prog = install &&
852             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
853             # AIX install.  It has an incompatible calling convention.
854             :
855           elif test $ac_prog = install &&
856             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
857             # program-specific install script used by HP pwplus--don't use.
858             :
859           else
860             ac_cv_path_install="$ac_dir/$ac_prog -c"
861             break 2
862           fi
863         fi
864       done
865       ;;
866     esac
867   done
868   IFS="$ac_save_IFS"
869
870 fi
871   if test "${ac_cv_path_install+set}" = set; then
872     INSTALL="$ac_cv_path_install"
873   else
874     # As a last resort, use the slow shell script.  We don't cache a
875     # path for INSTALL within a source directory, because that will
876     # break other packages using the cache if that directory is
877     # removed, or if the path is relative.
878     INSTALL="$ac_install_sh"
879   fi
880 fi
881 echo "$ac_t""$INSTALL" 1>&6
882
883 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
884 # It thinks the first close brace ends the variable substitution.
885 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
886
887 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
888
889 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
890
891 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
892 echo "configure:893: checking whether build environment is sane" >&5
893 # Just in case
894 sleep 1
895 echo timestamp > conftestfile
896 # Do `set' in a subshell so we don't clobber the current shell's
897 # arguments.  Must try -L first in case configure is actually a
898 # symlink; some systems play weird games with the mod time of symlinks
899 # (eg FreeBSD returns the mod time of the symlink's containing
900 # directory).
901 if (
902    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
903    if test "$*" = "X"; then
904       # -L didn't work.
905       set X `ls -t $srcdir/configure conftestfile`
906    fi
907    if test "$*" != "X $srcdir/configure conftestfile" \
908       && test "$*" != "X conftestfile $srcdir/configure"; then
909
910       # If neither matched, then we have a broken ls.  This can happen
911       # if, for instance, CONFIG_SHELL is bash and it inherits a
912       # broken ls alias from the environment.  This has actually
913       # happened.  Such a system could not be considered "sane".
914       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
915 alias in your environment" 1>&2; exit 1; }
916    fi
917
918    test "$2" = conftestfile
919    )
920 then
921    # Ok.
922    :
923 else
924    { echo "configure: error: newly created file is older than distributed files!
925 Check your system clock" 1>&2; exit 1; }
926 fi
927 rm -f conftest*
928 echo "$ac_t""yes" 1>&6
929 if test "$program_transform_name" = s,x,x,; then
930   program_transform_name=
931 else
932   # Double any \ or $.  echo might interpret backslashes.
933   cat <<\EOF_SED > conftestsed
934 s,\\,\\\\,g; s,\$,$$,g
935 EOF_SED
936   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
937   rm -f conftestsed
938 fi
939 test "$program_prefix" != NONE &&
940   program_transform_name="s,^,${program_prefix},;$program_transform_name"
941 # Use a double $ so make ignores it.
942 test "$program_suffix" != NONE &&
943   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
944
945 # sed with no file args requires a program.
946 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
947
948 for ac_prog in mawk gawk nawk awk
949 do
950 # Extract the first word of "$ac_prog", so it can be a program name with args.
951 set dummy $ac_prog; ac_word=$2
952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
953 echo "configure:954: checking for $ac_word" >&5
954 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   if test -n "$AWK"; then
958   ac_cv_prog_AWK="$AWK" # Let the user override the test.
959 else
960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
961   ac_dummy="$PATH"
962   for ac_dir in $ac_dummy; do
963     test -z "$ac_dir" && ac_dir=.
964     if test -f $ac_dir/$ac_word; then
965       ac_cv_prog_AWK="$ac_prog"
966       break
967     fi
968   done
969   IFS="$ac_save_ifs"
970 fi
971 fi
972 AWK="$ac_cv_prog_AWK"
973 if test -n "$AWK"; then
974   echo "$ac_t""$AWK" 1>&6
975 else
976   echo "$ac_t""no" 1>&6
977 fi
978
979 test -n "$AWK" && break
980 done
981
982 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
983 echo "configure:984: checking whether ${MAKE-make} sets \${MAKE}" >&5
984 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
985 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
986   echo $ac_n "(cached) $ac_c" 1>&6
987 else
988   cat > conftestmake <<\EOF
989 all:
990         @echo 'ac_maketemp="${MAKE}"'
991 EOF
992 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
993 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
994 if test -n "$ac_maketemp"; then
995   eval ac_cv_prog_make_${ac_make}_set=yes
996 else
997   eval ac_cv_prog_make_${ac_make}_set=no
998 fi
999 rm -f conftestmake
1000 fi
1001 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1002   echo "$ac_t""yes" 1>&6
1003   SET_MAKE=
1004 else
1005   echo "$ac_t""no" 1>&6
1006   SET_MAKE="MAKE=${MAKE-make}"
1007 fi
1008
1009
1010
1011 PACKAGE=OpenLDAP
1012
1013 VERSION=$OL_VERSION
1014
1015 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1016   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1017 fi
1018
1019
1020
1021 missing_dir=`cd $ac_aux_dir && pwd`
1022 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1023 echo "configure:1024: checking for working aclocal" >&5
1024 # Run test in a subshell; some versions of sh will print an error if
1025 # an executable is not found, even if stderr is redirected.
1026 # Redirect stdin to placate older versions of autoconf.  Sigh.
1027 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1028    ACLOCAL=aclocal
1029    echo "$ac_t""found" 1>&6
1030 else
1031    ACLOCAL="$missing_dir/missing aclocal"
1032    echo "$ac_t""missing" 1>&6
1033 fi
1034
1035 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1036 echo "configure:1037: checking for working autoconf" >&5
1037 # Run test in a subshell; some versions of sh will print an error if
1038 # an executable is not found, even if stderr is redirected.
1039 # Redirect stdin to placate older versions of autoconf.  Sigh.
1040 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1041    AUTOCONF=autoconf
1042    echo "$ac_t""found" 1>&6
1043 else
1044    AUTOCONF="$missing_dir/missing autoconf"
1045    echo "$ac_t""missing" 1>&6
1046 fi
1047
1048 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1049 echo "configure:1050: checking for working automake" >&5
1050 # Run test in a subshell; some versions of sh will print an error if
1051 # an executable is not found, even if stderr is redirected.
1052 # Redirect stdin to placate older versions of autoconf.  Sigh.
1053 if (automake --version) < /dev/null > /dev/null 2>&1; then
1054    AUTOMAKE=automake
1055    echo "$ac_t""found" 1>&6
1056 else
1057    AUTOMAKE="$missing_dir/missing automake"
1058    echo "$ac_t""missing" 1>&6
1059 fi
1060
1061 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1062 echo "configure:1063: checking for working autoheader" >&5
1063 # Run test in a subshell; some versions of sh will print an error if
1064 # an executable is not found, even if stderr is redirected.
1065 # Redirect stdin to placate older versions of autoconf.  Sigh.
1066 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1067    AUTOHEADER=autoheader
1068    echo "$ac_t""found" 1>&6
1069 else
1070    AUTOHEADER="$missing_dir/missing autoheader"
1071    echo "$ac_t""missing" 1>&6
1072 fi
1073
1074 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1075 echo "configure:1076: checking for working makeinfo" >&5
1076 # Run test in a subshell; some versions of sh will print an error if
1077 # an executable is not found, even if stderr is redirected.
1078 # Redirect stdin to placate older versions of autoconf.  Sigh.
1079 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1080    MAKEINFO=makeinfo
1081    echo "$ac_t""found" 1>&6
1082 else
1083    MAKEINFO="$missing_dir/missing makeinfo"
1084    echo "$ac_t""missing" 1>&6
1085 fi
1086
1087 install_sh="$missing_dir/install-sh"
1088 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1089
1090 for ac_prog in gnutar gtar tar
1091 do
1092 # Extract the first word of "$ac_prog", so it can be a program name with args.
1093 set dummy $ac_prog; ac_word=$2
1094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1095 echo "configure:1096: checking for $ac_word" >&5
1096 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1097   echo $ac_n "(cached) $ac_c" 1>&6
1098 else
1099   if test -n "$AMTAR"; then
1100   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1101 else
1102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1103   ac_dummy="$PATH"
1104   for ac_dir in $ac_dummy; do
1105     test -z "$ac_dir" && ac_dir=.
1106     if test -f $ac_dir/$ac_word; then
1107       ac_cv_prog_AMTAR="$ac_prog"
1108       break
1109     fi
1110   done
1111   IFS="$ac_save_ifs"
1112 fi
1113 fi
1114 AMTAR="$ac_cv_prog_AMTAR"
1115 if test -n "$AMTAR"; then
1116   echo "$ac_t""$AMTAR" 1>&6
1117 else
1118   echo "$ac_t""no" 1>&6
1119 fi
1120
1121 test -n "$AMTAR" && break
1122 done
1123
1124
1125 AMTARFLAGS=
1126 if test -n "$AMTAR"; then
1127   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1128         AMTARFLAGS=o
1129   fi
1130 fi
1131
1132
1133
1134 cat >> confdefs.h <<EOF
1135 #define OPENLDAP_PACKAGE "$PACKAGE"
1136 EOF
1137
1138 cat >> confdefs.h <<EOF
1139 #define OPENLDAP_VERSION "$VERSION"
1140 EOF
1141
1142
1143
1144
1145 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1146 echo "configure:1147: checking configure arguments" >&5
1147
1148
1149 top_builddir=`pwd`
1150
1151 ldap_subdir="/openldap"
1152
1153 # Check whether --with-subdir or --without-subdir was given.
1154 if test "${with_subdir+set}" = set; then
1155   withval="$with_subdir"
1156   case "$withval" in
1157         no) ldap_subdir=""
1158                 ;;
1159         yes)
1160                 ;;
1161         /*|\\*)
1162                 ldap_subdir="$withval"
1163                 ;;
1164         *)
1165                 ldap_subdir="/$withval"
1166                 ;;
1167 esac
1168
1169 fi
1170
1171
1172 # OpenLDAP --enable-debug
1173         # Check whether --enable-debug or --disable-debug was given.
1174 if test "${enable_debug+set}" = set; then
1175   enableval="$enable_debug"
1176   
1177         ol_arg=invalid
1178         for ol_val in auto yes no ; do
1179                 if test "$enableval" = "$ol_val" ; then
1180                         ol_arg="$ol_val"
1181                 fi
1182         done
1183         if test "$ol_arg" = "invalid" ; then
1184                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1185         fi
1186         ol_enable_debug="$ol_arg"
1187
1188 else
1189         ol_enable_debug="yes"
1190 fi
1191 # end --enable-debug
1192 # OpenLDAP --enable-syslog
1193         # Check whether --enable-syslog or --disable-syslog was given.
1194 if test "${enable_syslog+set}" = set; then
1195   enableval="$enable_syslog"
1196   
1197         ol_arg=invalid
1198         for ol_val in auto yes no ; do
1199                 if test "$enableval" = "$ol_val" ; then
1200                         ol_arg="$ol_val"
1201                 fi
1202         done
1203         if test "$ol_arg" = "invalid" ; then
1204                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1205         fi
1206         ol_enable_syslog="$ol_arg"
1207
1208 else
1209         ol_enable_syslog="auto"
1210 fi
1211 # end --enable-syslog
1212 # OpenLDAP --enable-proctitle
1213         # Check whether --enable-proctitle or --disable-proctitle was given.
1214 if test "${enable_proctitle+set}" = set; then
1215   enableval="$enable_proctitle"
1216   
1217         ol_arg=invalid
1218         for ol_val in auto yes no ; do
1219                 if test "$enableval" = "$ol_val" ; then
1220                         ol_arg="$ol_val"
1221                 fi
1222         done
1223         if test "$ol_arg" = "invalid" ; then
1224                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1225         fi
1226         ol_enable_proctitle="$ol_arg"
1227
1228 else
1229         ol_enable_proctitle="yes"
1230 fi
1231 # end --enable-proctitle
1232 # OpenLDAP --enable-cache
1233         # Check whether --enable-cache or --disable-cache was given.
1234 if test "${enable_cache+set}" = set; then
1235   enableval="$enable_cache"
1236   
1237         ol_arg=invalid
1238         for ol_val in auto yes no ; do
1239                 if test "$enableval" = "$ol_val" ; then
1240                         ol_arg="$ol_val"
1241                 fi
1242         done
1243         if test "$ol_arg" = "invalid" ; then
1244                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1245         fi
1246         ol_enable_cache="$ol_arg"
1247
1248 else
1249         ol_enable_cache="yes"
1250 fi
1251 # end --enable-cache
1252 # OpenLDAP --enable-referrals
1253         # Check whether --enable-referrals or --disable-referrals was given.
1254 if test "${enable_referrals+set}" = set; then
1255   enableval="$enable_referrals"
1256   
1257         ol_arg=invalid
1258         for ol_val in auto yes no ; do
1259                 if test "$enableval" = "$ol_val" ; then
1260                         ol_arg="$ol_val"
1261                 fi
1262         done
1263         if test "$ol_arg" = "invalid" ; then
1264                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1265         fi
1266         ol_enable_referrals="$ol_arg"
1267
1268 else
1269         ol_enable_referrals="yes"
1270 fi
1271 # end --enable-referrals
1272 # OpenLDAP --enable-kbind
1273         # Check whether --enable-kbind or --disable-kbind was given.
1274 if test "${enable_kbind+set}" = set; then
1275   enableval="$enable_kbind"
1276   
1277         ol_arg=invalid
1278         for ol_val in auto yes no ; do
1279                 if test "$enableval" = "$ol_val" ; then
1280                         ol_arg="$ol_val"
1281                 fi
1282         done
1283         if test "$ol_arg" = "invalid" ; then
1284                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1285         fi
1286         ol_enable_kbind="$ol_arg"
1287
1288 else
1289         ol_enable_kbind="auto"
1290 fi
1291 # end --enable-kbind
1292 # OpenLDAP --enable-cldap
1293         # Check whether --enable-cldap or --disable-cldap was given.
1294 if test "${enable_cldap+set}" = set; then
1295   enableval="$enable_cldap"
1296   
1297         ol_arg=invalid
1298         for ol_val in auto yes no ; do
1299                 if test "$enableval" = "$ol_val" ; then
1300                         ol_arg="$ol_val"
1301                 fi
1302         done
1303         if test "$ol_arg" = "invalid" ; then
1304                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1305         fi
1306         ol_enable_cldap="$ol_arg"
1307
1308 else
1309         ol_enable_cldap="no"
1310 fi
1311 # end --enable-cldap
1312 # OpenLDAP --enable-ipv6
1313         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1314 if test "${enable_ipv6+set}" = set; then
1315   enableval="$enable_ipv6"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto yes no ; do
1319                 if test "$enableval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1325         fi
1326         ol_enable_ipv6="$ol_arg"
1327
1328 else
1329         ol_enable_ipv6="auto"
1330 fi
1331 # end --enable-ipv6
1332 # OpenLDAP --enable-unix
1333         # Check whether --enable-unix or --disable-unix was given.
1334 if test "${enable_unix+set}" = set; then
1335   enableval="$enable_unix"
1336   
1337         ol_arg=invalid
1338         for ol_val in auto yes no ; do
1339                 if test "$enableval" = "$ol_val" ; then
1340                         ol_arg="$ol_val"
1341                 fi
1342         done
1343         if test "$ol_arg" = "invalid" ; then
1344                 { echo "configure: error: bad value $enableval for --enable-unix" 1>&2; exit 1; }
1345         fi
1346         ol_enable_unix="$ol_arg"
1347
1348 else
1349         ol_enable_unix="auto"
1350 fi
1351 # end --enable-unix
1352 # OpenLDAP --enable-x_compile
1353         # Check whether --enable-x_compile or --disable-x_compile was given.
1354 if test "${enable_x_compile+set}" = set; then
1355   enableval="$enable_x_compile"
1356   
1357         ol_arg=invalid
1358         for ol_val in yes no ; do
1359                 if test "$enableval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1365         fi
1366         ol_enable_x_compile="$ol_arg"
1367
1368 else
1369         ol_enable_x_compile="no"
1370 fi
1371 # end --enable-x_compile
1372
1373
1374 # OpenLDAP --with-cyrus_sasl
1375         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1376 if test "${with_cyrus_sasl+set}" = set; then
1377   withval="$with_cyrus_sasl"
1378   
1379         ol_arg=invalid
1380         for ol_val in auto yes no  ; do
1381                 if test "$withval" = "$ol_val" ; then
1382                         ol_arg="$ol_val"
1383                 fi
1384         done
1385         if test "$ol_arg" = "invalid" ; then
1386                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1387         fi
1388         ol_with_cyrus_sasl="$ol_arg"
1389
1390 else
1391         ol_with_cyrus_sasl="auto"
1392 fi
1393 # end --with-cyrus_sasl
1394
1395 # OpenLDAP --with-fetch
1396         # Check whether --with-fetch or --without-fetch was given.
1397 if test "${with_fetch+set}" = set; then
1398   withval="$with_fetch"
1399   
1400         ol_arg=invalid
1401         for ol_val in auto yes no  ; do
1402                 if test "$withval" = "$ol_val" ; then
1403                         ol_arg="$ol_val"
1404                 fi
1405         done
1406         if test "$ol_arg" = "invalid" ; then
1407                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1408         fi
1409         ol_with_fetch="$ol_arg"
1410
1411 else
1412         ol_with_fetch="auto"
1413 fi
1414 # end --with-fetch
1415
1416 # OpenLDAP --with-kerberos
1417         # Check whether --with-kerberos or --without-kerberos was given.
1418 if test "${with_kerberos+set}" = set; then
1419   withval="$with_kerberos"
1420   
1421         ol_arg=invalid
1422         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1423                 if test "$withval" = "$ol_val" ; then
1424                         ol_arg="$ol_val"
1425                 fi
1426         done
1427         if test "$ol_arg" = "invalid" ; then
1428                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1429         fi
1430         ol_with_kerberos="$ol_arg"
1431
1432 else
1433         ol_with_kerberos="auto"
1434 fi
1435 # end --with-kerberos
1436
1437 # OpenLDAP --with-readline
1438         # Check whether --with-readline or --without-readline was given.
1439 if test "${with_readline+set}" = set; then
1440   withval="$with_readline"
1441   
1442         ol_arg=invalid
1443         for ol_val in auto yes no  ; do
1444                 if test "$withval" = "$ol_val" ; then
1445                         ol_arg="$ol_val"
1446                 fi
1447         done
1448         if test "$ol_arg" = "invalid" ; then
1449                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1450         fi
1451         ol_with_readline="$ol_arg"
1452
1453 else
1454         ol_with_readline="auto"
1455 fi
1456 # end --with-readline
1457
1458 # OpenLDAP --with-threads
1459         # Check whether --with-threads or --without-threads was given.
1460 if test "${with_threads+set}" = set; then
1461   withval="$with_threads"
1462   
1463         ol_arg=invalid
1464         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1465                 if test "$withval" = "$ol_val" ; then
1466                         ol_arg="$ol_val"
1467                 fi
1468         done
1469         if test "$ol_arg" = "invalid" ; then
1470                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1471         fi
1472         ol_with_threads="$ol_arg"
1473
1474 else
1475         ol_with_threads="auto"
1476 fi
1477 # end --with-threads
1478
1479 # OpenLDAP --with-tls
1480         # Check whether --with-tls or --without-tls was given.
1481 if test "${with_tls+set}" = set; then
1482   withval="$with_tls"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto ssleay openssl yes no  ; do
1486                 if test "$withval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1492         fi
1493         ol_with_tls="$ol_arg"
1494
1495 else
1496         ol_with_tls="auto"
1497 fi
1498 # end --with-tls
1499
1500 # OpenLDAP --with-yielding_select
1501         # Check whether --with-yielding_select or --without-yielding_select was given.
1502 if test "${with_yielding_select+set}" = set; then
1503   withval="$with_yielding_select"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no manual  ; do
1507                 if test "$withval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1513         fi
1514         ol_with_yielding_select="$ol_arg"
1515
1516 else
1517         ol_with_yielding_select="auto"
1518 fi
1519 # end --with-yielding_select
1520
1521
1522
1523 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1524 if test "${with_xxslapdoptions+set}" = set; then
1525   withval="$with_xxslapdoptions"
1526   :
1527 fi
1528
1529 # OpenLDAP --enable-slapd
1530         # Check whether --enable-slapd or --disable-slapd was given.
1531 if test "${enable_slapd+set}" = set; then
1532   enableval="$enable_slapd"
1533   
1534         ol_arg=invalid
1535         for ol_val in auto yes no ; do
1536                 if test "$enableval" = "$ol_val" ; then
1537                         ol_arg="$ol_val"
1538                 fi
1539         done
1540         if test "$ol_arg" = "invalid" ; then
1541                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1542         fi
1543         ol_enable_slapd="$ol_arg"
1544
1545 else
1546         ol_enable_slapd="yes"
1547 fi
1548 # end --enable-slapd
1549 # OpenLDAP --enable-cleartext
1550         # Check whether --enable-cleartext or --disable-cleartext was given.
1551 if test "${enable_cleartext+set}" = set; then
1552   enableval="$enable_cleartext"
1553   
1554         ol_arg=invalid
1555         for ol_val in auto yes no ; do
1556                 if test "$enableval" = "$ol_val" ; then
1557                         ol_arg="$ol_val"
1558                 fi
1559         done
1560         if test "$ol_arg" = "invalid" ; then
1561                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1562         fi
1563         ol_enable_cleartext="$ol_arg"
1564
1565 else
1566         ol_enable_cleartext="yes"
1567 fi
1568 # end --enable-cleartext
1569 # OpenLDAP --enable-crypt
1570         # Check whether --enable-crypt or --disable-crypt was given.
1571 if test "${enable_crypt+set}" = set; then
1572   enableval="$enable_crypt"
1573   
1574         ol_arg=invalid
1575         for ol_val in auto yes no ; do
1576                 if test "$enableval" = "$ol_val" ; then
1577                         ol_arg="$ol_val"
1578                 fi
1579         done
1580         if test "$ol_arg" = "invalid" ; then
1581                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1582         fi
1583         ol_enable_crypt="$ol_arg"
1584
1585 else
1586         ol_enable_crypt="auto"
1587 fi
1588 # end --enable-crypt
1589 # OpenLDAP --enable-kpasswd
1590         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1591 if test "${enable_kpasswd+set}" = set; then
1592   enableval="$enable_kpasswd"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto yes no ; do
1596                 if test "$enableval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1602         fi
1603         ol_enable_kpasswd="$ol_arg"
1604
1605 else
1606         ol_enable_kpasswd="no"
1607 fi
1608 # end --enable-kpasswd
1609 # OpenLDAP --enable-spasswd
1610         # Check whether --enable-spasswd or --disable-spasswd was given.
1611 if test "${enable_spasswd+set}" = set; then
1612   enableval="$enable_spasswd"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no ; do
1616                 if test "$enableval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1622         fi
1623         ol_enable_spasswd="$ol_arg"
1624
1625 else
1626         ol_enable_spasswd="no"
1627 fi
1628 # end --enable-spasswd
1629 # OpenLDAP --enable-modules
1630         # Check whether --enable-modules or --disable-modules was given.
1631 if test "${enable_modules+set}" = set; then
1632   enableval="$enable_modules"
1633   
1634         ol_arg=invalid
1635         for ol_val in auto yes no ; do
1636                 if test "$enableval" = "$ol_val" ; then
1637                         ol_arg="$ol_val"
1638                 fi
1639         done
1640         if test "$ol_arg" = "invalid" ; then
1641                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1642         fi
1643         ol_enable_modules="$ol_arg"
1644
1645 else
1646         ol_enable_modules="no"
1647 fi
1648 # end --enable-modules
1649 # OpenLDAP --enable-multimaster
1650         # Check whether --enable-multimaster or --disable-multimaster was given.
1651 if test "${enable_multimaster+set}" = set; then
1652   enableval="$enable_multimaster"
1653   
1654         ol_arg=invalid
1655         for ol_val in auto yes no ; do
1656                 if test "$enableval" = "$ol_val" ; then
1657                         ol_arg="$ol_val"
1658                 fi
1659         done
1660         if test "$ol_arg" = "invalid" ; then
1661                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1662         fi
1663         ol_enable_multimaster="$ol_arg"
1664
1665 else
1666         ol_enable_multimaster="no"
1667 fi
1668 # end --enable-multimaster
1669 # OpenLDAP --enable-phonetic
1670         # Check whether --enable-phonetic or --disable-phonetic was given.
1671 if test "${enable_phonetic+set}" = set; then
1672   enableval="$enable_phonetic"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1682         fi
1683         ol_enable_phonetic="$ol_arg"
1684
1685 else
1686         ol_enable_phonetic="no"
1687 fi
1688 # end --enable-phonetic
1689 # OpenLDAP --enable-rlookups
1690         # Check whether --enable-rlookups or --disable-rlookups was given.
1691 if test "${enable_rlookups+set}" = set; then
1692   enableval="$enable_rlookups"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1702         fi
1703         ol_enable_rlookups="$ol_arg"
1704
1705 else
1706         ol_enable_rlookups="auto"
1707 fi
1708 # end --enable-rlookups
1709 # OpenLDAP --enable-aci
1710         # Check whether --enable-aci or --disable-aci was given.
1711 if test "${enable_aci+set}" = set; then
1712   enableval="$enable_aci"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1722         fi
1723         ol_enable_aci="$ol_arg"
1724
1725 else
1726         ol_enable_aci="no"
1727 fi
1728 # end --enable-aci
1729 # OpenLDAP --enable-wrappers
1730         # Check whether --enable-wrappers or --disable-wrappers was given.
1731 if test "${enable_wrappers+set}" = set; then
1732   enableval="$enable_wrappers"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1742         fi
1743         ol_enable_wrappers="$ol_arg"
1744
1745 else
1746         ol_enable_wrappers="no"
1747 fi
1748 # end --enable-wrappers
1749 # OpenLDAP --enable-dynamic
1750         # Check whether --enable-dynamic or --disable-dynamic was given.
1751 if test "${enable_dynamic+set}" = set; then
1752   enableval="$enable_dynamic"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1762         fi
1763         ol_enable_dynamic="$ol_arg"
1764
1765 else
1766         ol_enable_dynamic="no"
1767 fi
1768 # end --enable-dynamic
1769
1770 # OpenLDAP --enable-dnssrv
1771         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1772 if test "${enable_dnssrv+set}" = set; then
1773   enableval="$enable_dnssrv"
1774   
1775         ol_arg=invalid
1776         for ol_val in auto yes no ; do
1777                 if test "$enableval" = "$ol_val" ; then
1778                         ol_arg="$ol_val"
1779                 fi
1780         done
1781         if test "$ol_arg" = "invalid" ; then
1782                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1783         fi
1784         ol_enable_dnssrv="$ol_arg"
1785
1786 else
1787         ol_enable_dnssrv="no"
1788 fi
1789 # end --enable-dnssrv
1790 # OpenLDAP --with-dnssrv_module
1791         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1792 if test "${with_dnssrv_module+set}" = set; then
1793   withval="$with_dnssrv_module"
1794   
1795         ol_arg=invalid
1796         for ol_val in static dynamic ; do
1797                 if test "$withval" = "$ol_val" ; then
1798                         ol_arg="$ol_val"
1799                 fi
1800         done
1801         if test "$ol_arg" = "invalid" ; then
1802                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1803         fi
1804         ol_with_dnssrv_module="$ol_arg"
1805
1806 else
1807         ol_with_dnssrv_module="static"
1808 fi
1809 # end --with-dnssrv_module
1810
1811 # OpenLDAP --enable-ldap
1812         # Check whether --enable-ldap or --disable-ldap was given.
1813 if test "${enable_ldap+set}" = set; then
1814   enableval="$enable_ldap"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1824         fi
1825         ol_enable_ldap="$ol_arg"
1826
1827 else
1828         ol_enable_ldap="no"
1829 fi
1830 # end --enable-ldap
1831 # OpenLDAP --with-ldap_module
1832         # Check whether --with-ldap_module or --without-ldap_module was given.
1833 if test "${with_ldap_module+set}" = set; then
1834   withval="$with_ldap_module"
1835   
1836         ol_arg=invalid
1837         for ol_val in static dynamic ; do
1838                 if test "$withval" = "$ol_val" ; then
1839                         ol_arg="$ol_val"
1840                 fi
1841         done
1842         if test "$ol_arg" = "invalid" ; then
1843                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1844         fi
1845         ol_with_ldap_module="$ol_arg"
1846
1847 else
1848         ol_with_ldap_module="static"
1849 fi
1850 # end --with-ldap_module
1851
1852 # OpenLDAP --enable-ldbm
1853         # Check whether --enable-ldbm or --disable-ldbm was given.
1854 if test "${enable_ldbm+set}" = set; then
1855   enableval="$enable_ldbm"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1865         fi
1866         ol_enable_ldbm="$ol_arg"
1867
1868 else
1869         ol_enable_ldbm="yes"
1870 fi
1871 # end --enable-ldbm
1872 # OpenLDAP --with-ldbm_api
1873         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1874 if test "${with_ldbm_api+set}" = set; then
1875   withval="$with_ldbm_api"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1879                 if test "$withval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1885         fi
1886         ol_with_ldbm_api="$ol_arg"
1887
1888 else
1889         ol_with_ldbm_api="auto"
1890 fi
1891 # end --with-ldbm_api
1892
1893 # OpenLDAP --with-ldbm_module
1894         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1895 if test "${with_ldbm_module+set}" = set; then
1896   withval="$with_ldbm_module"
1897   
1898         ol_arg=invalid
1899         for ol_val in static dynamic ; do
1900                 if test "$withval" = "$ol_val" ; then
1901                         ol_arg="$ol_val"
1902                 fi
1903         done
1904         if test "$ol_arg" = "invalid" ; then
1905                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1906         fi
1907         ol_with_ldbm_module="$ol_arg"
1908
1909 else
1910         ol_with_ldbm_module="static"
1911 fi
1912 # end --with-ldbm_module
1913
1914 # OpenLDAP --with-ldbm_type
1915         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1916 if test "${with_ldbm_type+set}" = set; then
1917   withval="$with_ldbm_type"
1918   
1919         ol_arg=invalid
1920         for ol_val in auto btree hash ; do
1921                 if test "$withval" = "$ol_val" ; then
1922                         ol_arg="$ol_val"
1923                 fi
1924         done
1925         if test "$ol_arg" = "invalid" ; then
1926                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1927         fi
1928         ol_with_ldbm_type="$ol_arg"
1929
1930 else
1931         ol_with_ldbm_type="auto"
1932 fi
1933 # end --with-ldbm_type
1934
1935 # OpenLDAP --enable-passwd
1936         # Check whether --enable-passwd or --disable-passwd was given.
1937 if test "${enable_passwd+set}" = set; then
1938   enableval="$enable_passwd"
1939   
1940         ol_arg=invalid
1941         for ol_val in auto yes no ; do
1942                 if test "$enableval" = "$ol_val" ; then
1943                         ol_arg="$ol_val"
1944                 fi
1945         done
1946         if test "$ol_arg" = "invalid" ; then
1947                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1948         fi
1949         ol_enable_passwd="$ol_arg"
1950
1951 else
1952         ol_enable_passwd="no"
1953 fi
1954 # end --enable-passwd
1955 # OpenLDAP --with-passwd_module
1956         # Check whether --with-passwd_module or --without-passwd_module was given.
1957 if test "${with_passwd_module+set}" = set; then
1958   withval="$with_passwd_module"
1959   
1960         ol_arg=invalid
1961         for ol_val in static dynamic ; do
1962                 if test "$withval" = "$ol_val" ; then
1963                         ol_arg="$ol_val"
1964                 fi
1965         done
1966         if test "$ol_arg" = "invalid" ; then
1967                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1968         fi
1969         ol_with_passwd_module="$ol_arg"
1970
1971 else
1972         ol_with_passwd_module="static"
1973 fi
1974 # end --with-passwd_module
1975
1976 # OpenLDAP --enable-shell
1977         # Check whether --enable-shell or --disable-shell was given.
1978 if test "${enable_shell+set}" = set; then
1979   enableval="$enable_shell"
1980   
1981         ol_arg=invalid
1982         for ol_val in auto yes no ; do
1983                 if test "$enableval" = "$ol_val" ; then
1984                         ol_arg="$ol_val"
1985                 fi
1986         done
1987         if test "$ol_arg" = "invalid" ; then
1988                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1989         fi
1990         ol_enable_shell="$ol_arg"
1991
1992 else
1993         ol_enable_shell="no"
1994 fi
1995 # end --enable-shell
1996 # OpenLDAP --with-shell_module
1997         # Check whether --with-shell_module or --without-shell_module was given.
1998 if test "${with_shell_module+set}" = set; then
1999   withval="$with_shell_module"
2000   
2001         ol_arg=invalid
2002         for ol_val in static dynamic ; do
2003                 if test "$withval" = "$ol_val" ; then
2004                         ol_arg="$ol_val"
2005                 fi
2006         done
2007         if test "$ol_arg" = "invalid" ; then
2008                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2009         fi
2010         ol_with_shell_module="$ol_arg"
2011
2012 else
2013         ol_with_shell_module="static"
2014 fi
2015 # end --with-shell_module
2016
2017 # OpenLDAP --enable-sql
2018         # Check whether --enable-sql or --disable-sql was given.
2019 if test "${enable_sql+set}" = set; then
2020   enableval="$enable_sql"
2021   
2022         ol_arg=invalid
2023         for ol_val in auto yes no ; do
2024                 if test "$enableval" = "$ol_val" ; then
2025                         ol_arg="$ol_val"
2026                 fi
2027         done
2028         if test "$ol_arg" = "invalid" ; then
2029                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2030         fi
2031         ol_enable_sql="$ol_arg"
2032
2033 else
2034         ol_enable_sql="no"
2035 fi
2036 # end --enable-sql
2037 # OpenLDAP --with-sql_module
2038         # Check whether --with-sql_module or --without-sql_module was given.
2039 if test "${with_sql_module+set}" = set; then
2040   withval="$with_sql_module"
2041   
2042         ol_arg=invalid
2043         for ol_val in static dynamic ; do
2044                 if test "$withval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2050         fi
2051         ol_with_sql_module="$ol_arg"
2052
2053 else
2054         ol_with_sql_module="static"
2055 fi
2056 # end --with-sql_module
2057
2058
2059 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2060 if test "${with_xxslurpdoptions+set}" = set; then
2061   withval="$with_xxslurpdoptions"
2062   :
2063 fi
2064
2065 # OpenLDAP --enable-slurpd
2066         # Check whether --enable-slurpd or --disable-slurpd was given.
2067 if test "${enable_slurpd+set}" = set; then
2068   enableval="$enable_slurpd"
2069   
2070         ol_arg=invalid
2071         for ol_val in auto yes no ; do
2072                 if test "$enableval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2078         fi
2079         ol_enable_slurpd="$ol_arg"
2080
2081 else
2082         ol_enable_slurpd="auto"
2083 fi
2084 # end --enable-slurpd
2085
2086 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2087 if test "${with_xxliboptions+set}" = set; then
2088   withval="$with_xxliboptions"
2089   :
2090 fi
2091
2092 # Check whether --enable-static or --disable-static was given.
2093 if test "${enable_static+set}" = set; then
2094   enableval="$enable_static"
2095   p=${PACKAGE-default}
2096 case "$enableval" in
2097 yes) enable_static=yes ;;
2098 no) enable_static=no ;;
2099 *)
2100   enable_static=no
2101   # Look at the argument we got.  We use all the common list separators.
2102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2103   for pkg in $enableval; do
2104     if test "X$pkg" = "X$p"; then
2105       enable_static=yes
2106     fi
2107   done
2108   IFS="$ac_save_ifs"
2109   ;;
2110 esac
2111 else
2112   enable_static=yes
2113 fi
2114
2115 # Check whether --enable-shared or --disable-shared was given.
2116 if test "${enable_shared+set}" = set; then
2117   enableval="$enable_shared"
2118   p=${PACKAGE-default}
2119 case "$enableval" in
2120 yes) enable_shared=yes ;;
2121 no) enable_shared=no ;;
2122 *)
2123   enable_shared=no
2124   # Look at the argument we got.  We use all the common list separators.
2125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2126   for pkg in $enableval; do
2127     if test "X$pkg" = "X$p"; then
2128       enable_shared=yes
2129     fi
2130   done
2131   IFS="$ac_save_ifs"
2132   ;;
2133 esac
2134 else
2135   enable_shared=yes
2136 fi
2137
2138
2139
2140 # validate options
2141 if test $ol_enable_slapd = no ; then
2142                 if test $ol_enable_dnssrv = yes ; then
2143                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2144         fi
2145         if test $ol_enable_ldap = yes ; then
2146                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2147         fi
2148         if test $ol_enable_ldbm = yes ; then
2149                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2150         fi
2151         if test $ol_enable_passwd = yes ; then
2152                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2153         fi
2154         if test $ol_enable_shell = yes ; then
2155                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2156         fi
2157         if test $ol_enable_sql = yes ; then
2158                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2159         fi
2160         if test $ol_enable_modules = yes ; then
2161                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2162         fi
2163         if test $ol_enable_multimaster = yes ; then
2164                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2165         fi
2166         if test $ol_enable_wrappers = yes ; then
2167                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2168         fi
2169         if test $ol_enable_phonetic = yes ; then
2170                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2171         fi
2172         if test $ol_enable_rlookups = yes ; then
2173                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2174         fi
2175         if test $ol_enable_aci = yes ; then
2176                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2177         fi
2178         if test $ol_with_ldbm_api != auto ; then
2179                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2180         fi
2181         if test $ol_with_ldbm_type != auto ; then
2182                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2183         fi
2184         if test $ol_with_dnssrv_module != static ; then
2185                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2186         fi
2187         if test $ol_with_ldap_module != static ; then
2188                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2189         fi
2190         if test $ol_with_ldbm_module != static ; then
2191                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2192         fi
2193         if test $ol_with_passwd_module != static ; then
2194                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2195         fi
2196         if test $ol_with_shell_module != static ; then
2197                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2198         fi
2199         if test $ol_with_sql_module != static ; then
2200                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2201         fi
2202         if test $ol_enable_slurpd = yes ; then
2203                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2204         fi
2205
2206         # force settings to no
2207         ol_enable_dnssrv=no
2208         ol_enable_ldap=no
2209         ol_enable_ldbm=no
2210         ol_enable_passwd=no
2211         ol_enable_shell=no
2212         ol_enable_sql=no
2213
2214         ol_enable_modules=no
2215         ol_enable_multimaster=no
2216         ol_enable_phonetic=no
2217         ol_enable_rlookups=no
2218         ol_enable_aci=no
2219         ol_enable_wrappers=no
2220         ol_enable_dynamic=no
2221
2222         ol_with_ldbm_api=no
2223         ol_with_ldbm_type=no
2224
2225         ol_with_dnssrv_module=static
2226         ol_with_ldap_module=static
2227         ol_with_ldbm_module=static
2228         ol_with_passwd_module=static
2229         ol_with_shell_module=static
2230         ol_with_sql_module=static
2231
2232         ol_enable_slurpd=no
2233
2234 elif test $ol_enable_ldbm = no ; then
2235         
2236         if test $ol_with_ldbm_api != auto ; then
2237                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2238         fi
2239
2240         if test $ol_with_ldbm_type != auto ; then
2241                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2242         fi
2243
2244         if test $ol_with_ldbm_module != static ; then
2245                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2246         fi
2247
2248         if test $ol_enable_modules != yes -a \
2249                 $ol_enable_dnssrv = no -a \
2250                 $ol_enable_ldap = no -a \
2251                 $ol_enable_passwd = no -a \
2252                 $ol_enable_shell = no -a \
2253                 $ol_enable_sql = no ; then
2254                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2255         fi
2256
2257         ol_with_ldbm_api=no
2258         ol_with_ldbm_type=no
2259         ol_with_ldbm_module=static
2260
2261 else
2262                 if test $ol_with_ldbm_api = gdbm -a \
2263                 $ol_with_ldbm_type = btree ; then
2264                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2265         fi
2266         if test $ol_with_ldbm_api = mdbm -a \
2267                 $ol_with_ldbm_type = btree ; then
2268                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2269         fi
2270         if test $ol_with_ldbm_api = ndbm -a \
2271                 $ol_with_ldbm_type = btree ; then
2272                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2273         fi
2274 fi
2275
2276 if test $ol_enable_slurpd = yes ; then
2277                 if test $ol_with_threads = no ; then
2278                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2279         fi
2280 fi
2281
2282 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2283         if test $ol_with_kerberos = no ; then
2284                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2285         fi
2286 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2287         if test $ol_with_kerberos != auto ; then
2288                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2289         else
2290                 ol_with_kerberos=no
2291         fi
2292 fi
2293
2294 if test $ol_enable_spasswd = yes ; then
2295         if test $ol_with_cyrus_sasl = no ; then
2296                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2297         fi
2298         ol_link_spasswd=yes
2299 fi
2300
2301 echo "$ac_t""done" 1>&6
2302
2303 LDAP_LIBS=
2304 LDIF_LIBS=
2305 LDBM_LIBS=
2306 LTHREAD_LIBS=
2307 LUTIL_LIBS=
2308
2309 SLAPD_LIBS=
2310 SLURPD_LIBS=
2311
2312 BUILD_SLAPD=no
2313 BUILD_SLURPD=no
2314
2315 BUILD_THREAD=no
2316
2317 BUILD_DNSSRV=no
2318 BUILD_LDAP=no
2319 BUILD_LDBM=no
2320 BUILD_PASSWD=no
2321 BUILD_SHELL=no
2322 BUILD_SQL=no
2323
2324 BUILD_DNSSRV_DYNAMIC=static
2325 BUILD_LDAP_DYNAMIC=static
2326 BUILD_LDBM_DYNAMIC=static
2327 BUILD_PASSWD_DYNAMIC=static
2328 BUILD_SHELL_DYNAMIC=static
2329 BUILD_SQL_DYNAMIC=static
2330
2331 SLAPD_MODULES_LDFLAGS=
2332 SLAPD_MODULES_CPPFLAGS=
2333 SLAPD_MODULES_LIST=
2334
2335 SLAPD_SQL_LDFLAGS=
2336 SLAPD_SQL_LIBS=
2337 SLAPD_SQL_INCLUDES=
2338
2339 KRB4_LIBS=
2340 KRB5_LIBS=
2341 READLINE_LIBS=
2342 SASL_LIBS=
2343 TERMCAP_LIBS=
2344 TLS_LIBS=
2345 MODULES_LIBS=
2346 AUTH_LIBS=
2347
2348
2349
2350 cat >> confdefs.h <<\EOF
2351 #define HAVE_MKVERSION 1
2352 EOF
2353
2354
2355
2356
2357 ol_aix_threads=no
2358 case "$target" in
2359 *-*-aix*)       if test -z "$CC" ; then
2360                 case "$ol_with_threads" in
2361                 auto | yes |  posix) ol_aix_threads=yes ;;
2362                 esac
2363         fi
2364 ;;
2365 esac
2366
2367 if test $ol_aix_threads = yes ; then
2368         if test -z "${CC}" ; then
2369                 for ac_prog in cc_r xlc_r cc
2370 do
2371 # Extract the first word of "$ac_prog", so it can be a program name with args.
2372 set dummy $ac_prog; ac_word=$2
2373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2374 echo "configure:2375: checking for $ac_word" >&5
2375 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2376   echo $ac_n "(cached) $ac_c" 1>&6
2377 else
2378   if test -n "$CC"; then
2379   ac_cv_prog_CC="$CC" # Let the user override the test.
2380 else
2381   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2382   ac_dummy="$PATH"
2383   for ac_dir in $ac_dummy; do
2384     test -z "$ac_dir" && ac_dir=.
2385     if test -f $ac_dir/$ac_word; then
2386       ac_cv_prog_CC="$ac_prog"
2387       break
2388     fi
2389   done
2390   IFS="$ac_save_ifs"
2391 fi
2392 fi
2393 CC="$ac_cv_prog_CC"
2394 if test -n "$CC"; then
2395   echo "$ac_t""$CC" 1>&6
2396 else
2397   echo "$ac_t""no" 1>&6
2398 fi
2399
2400 test -n "$CC" && break
2401 done
2402
2403
2404                 if test "$CC" = cc ; then
2405                                                 if test $ol_with_threads != auto ; then
2406                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2407                         else
2408                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2409                         fi
2410                         ol_with_threads=no
2411                 fi
2412         fi
2413
2414         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2415                 ol_with_threads=posix
2416                 ol_cv_pthread_create=yes
2417         fi
2418 fi
2419
2420 if test -z "${CC}"; then
2421         for ac_prog in cc
2422 do
2423 # Extract the first word of "$ac_prog", so it can be a program name with args.
2424 set dummy $ac_prog; ac_word=$2
2425 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2426 echo "configure:2427: checking for $ac_word" >&5
2427 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2428   echo $ac_n "(cached) $ac_c" 1>&6
2429 else
2430   if test -n "$CC"; then
2431   ac_cv_prog_CC="$CC" # Let the user override the test.
2432 else
2433   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2434   ac_dummy="$PATH"
2435   for ac_dir in $ac_dummy; do
2436     test -z "$ac_dir" && ac_dir=.
2437     if test -f $ac_dir/$ac_word; then
2438       ac_cv_prog_CC="$ac_prog"
2439       break
2440     fi
2441   done
2442   IFS="$ac_save_ifs"
2443 fi
2444 fi
2445 CC="$ac_cv_prog_CC"
2446 if test -n "$CC"; then
2447   echo "$ac_t""$CC" 1>&6
2448 else
2449   echo "$ac_t""no" 1>&6
2450 fi
2451
2452 test -n "$CC" && break
2453 done
2454
2455 fi
2456
2457
2458
2459
2460 # Check whether --enable-fast-install or --disable-fast-install was given.
2461 if test "${enable_fast_install+set}" = set; then
2462   enableval="$enable_fast_install"
2463   p=${PACKAGE-default}
2464 case "$enableval" in
2465 yes) enable_fast_install=yes ;;
2466 no) enable_fast_install=no ;;
2467 *)
2468   enable_fast_install=no
2469   # Look at the argument we got.  We use all the common list separators.
2470   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2471   for pkg in $enableval; do
2472     if test "X$pkg" = "X$p"; then
2473       enable_fast_install=yes
2474     fi
2475   done
2476   IFS="$ac_save_ifs"
2477   ;;
2478 esac
2479 else
2480   enable_fast_install=yes
2481 fi
2482
2483 # Extract the first word of "ranlib", so it can be a program name with args.
2484 set dummy ranlib; ac_word=$2
2485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2486 echo "configure:2487: checking for $ac_word" >&5
2487 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   if test -n "$RANLIB"; then
2491   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2492 else
2493   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2494   ac_dummy="$PATH"
2495   for ac_dir in $ac_dummy; do
2496     test -z "$ac_dir" && ac_dir=.
2497     if test -f $ac_dir/$ac_word; then
2498       ac_cv_prog_RANLIB="ranlib"
2499       break
2500     fi
2501   done
2502   IFS="$ac_save_ifs"
2503   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2504 fi
2505 fi
2506 RANLIB="$ac_cv_prog_RANLIB"
2507 if test -n "$RANLIB"; then
2508   echo "$ac_t""$RANLIB" 1>&6
2509 else
2510   echo "$ac_t""no" 1>&6
2511 fi
2512
2513 # Extract the first word of "gcc", so it can be a program name with args.
2514 set dummy gcc; ac_word=$2
2515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2516 echo "configure:2517: checking for $ac_word" >&5
2517 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   if test -n "$CC"; then
2521   ac_cv_prog_CC="$CC" # Let the user override the test.
2522 else
2523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2524   ac_dummy="$PATH"
2525   for ac_dir in $ac_dummy; do
2526     test -z "$ac_dir" && ac_dir=.
2527     if test -f $ac_dir/$ac_word; then
2528       ac_cv_prog_CC="gcc"
2529       break
2530     fi
2531   done
2532   IFS="$ac_save_ifs"
2533 fi
2534 fi
2535 CC="$ac_cv_prog_CC"
2536 if test -n "$CC"; then
2537   echo "$ac_t""$CC" 1>&6
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541
2542 if test -z "$CC"; then
2543   # Extract the first word of "cc", so it can be a program name with args.
2544 set dummy cc; ac_word=$2
2545 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2546 echo "configure:2547: checking for $ac_word" >&5
2547 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2548   echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550   if test -n "$CC"; then
2551   ac_cv_prog_CC="$CC" # Let the user override the test.
2552 else
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2554   ac_prog_rejected=no
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       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2560         ac_prog_rejected=yes
2561         continue
2562       fi
2563       ac_cv_prog_CC="cc"
2564       break
2565     fi
2566   done
2567   IFS="$ac_save_ifs"
2568 if test $ac_prog_rejected = yes; then
2569   # We found a bogon in the path, so make sure we never use it.
2570   set dummy $ac_cv_prog_CC
2571   shift
2572   if test $# -gt 0; then
2573     # We chose a different compiler from the bogus one.
2574     # However, it has the same basename, so the bogon will be chosen
2575     # first if we set CC to just the basename; use the full file name.
2576     shift
2577     set dummy "$ac_dir/$ac_word" "$@"
2578     shift
2579     ac_cv_prog_CC="$@"
2580   fi
2581 fi
2582 fi
2583 fi
2584 CC="$ac_cv_prog_CC"
2585 if test -n "$CC"; then
2586   echo "$ac_t""$CC" 1>&6
2587 else
2588   echo "$ac_t""no" 1>&6
2589 fi
2590
2591   if test -z "$CC"; then
2592     case "`uname -s`" in
2593     *win32* | *WIN32* | *CYGWIN*)
2594       # Extract the first word of "cl", so it can be a program name with args.
2595 set dummy cl; ac_word=$2
2596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_word" >&5
2598 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   if test -n "$CC"; then
2602   ac_cv_prog_CC="$CC" # Let the user override the test.
2603 else
2604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2605   ac_dummy="$PATH"
2606   for ac_dir in $ac_dummy; do
2607     test -z "$ac_dir" && ac_dir=.
2608     if test -f $ac_dir/$ac_word; then
2609       ac_cv_prog_CC="cl"
2610       break
2611     fi
2612   done
2613   IFS="$ac_save_ifs"
2614 fi
2615 fi
2616 CC="$ac_cv_prog_CC"
2617 if test -n "$CC"; then
2618   echo "$ac_t""$CC" 1>&6
2619 else
2620   echo "$ac_t""no" 1>&6
2621 fi
2622  ;;
2623     esac
2624   fi
2625   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2626 fi
2627
2628 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2629 echo "configure:2630: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2630
2631 ac_ext=c
2632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2633 ac_cpp='$CPP $CPPFLAGS'
2634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2636 cross_compiling=$ac_cv_prog_cc_cross
2637
2638 cat > conftest.$ac_ext << EOF
2639
2640 #line 2641 "configure"
2641 #include "confdefs.h"
2642
2643 main(){return(0);}
2644 EOF
2645 if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2646   ac_cv_prog_cc_works=yes
2647   # If we can't run a trivial program, we are probably using a cross compiler.
2648   if (./conftest; exit) 2>/dev/null; then
2649     ac_cv_prog_cc_cross=no
2650   else
2651     ac_cv_prog_cc_cross=yes
2652   fi
2653 else
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   ac_cv_prog_cc_works=no
2657 fi
2658 rm -fr conftest*
2659 ac_ext=c
2660 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2661 ac_cpp='$CPP $CPPFLAGS'
2662 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2663 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2664 cross_compiling=$ac_cv_prog_cc_cross
2665
2666 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2667 if test $ac_cv_prog_cc_works = no; then
2668   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2669 fi
2670 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2671 echo "configure:2672: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2672 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2673 cross_compiling=$ac_cv_prog_cc_cross
2674
2675 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2676 echo "configure:2677: checking whether we are using GNU C" >&5
2677 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   cat > conftest.c <<EOF
2681 #ifdef __GNUC__
2682   yes;
2683 #endif
2684 EOF
2685 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2686   ac_cv_prog_gcc=yes
2687 else
2688   ac_cv_prog_gcc=no
2689 fi
2690 fi
2691
2692 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2693
2694 if test $ac_cv_prog_gcc = yes; then
2695   GCC=yes
2696 else
2697   GCC=
2698 fi
2699
2700 ac_test_CFLAGS="${CFLAGS+set}"
2701 ac_save_CFLAGS="$CFLAGS"
2702 CFLAGS=
2703 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2704 echo "configure:2705: checking whether ${CC-cc} accepts -g" >&5
2705 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2706   echo $ac_n "(cached) $ac_c" 1>&6
2707 else
2708   echo 'void f(){}' > conftest.c
2709 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2710   ac_cv_prog_cc_g=yes
2711 else
2712   ac_cv_prog_cc_g=no
2713 fi
2714 rm -f conftest*
2715
2716 fi
2717
2718 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2719 if test "$ac_test_CFLAGS" = set; then
2720   CFLAGS="$ac_save_CFLAGS"
2721 elif test $ac_cv_prog_cc_g = yes; then
2722   if test "$GCC" = yes; then
2723     CFLAGS="-g -O2"
2724   else
2725     CFLAGS="-g"
2726   fi
2727 else
2728   if test "$GCC" = yes; then
2729     CFLAGS="-O2"
2730   else
2731     CFLAGS=
2732   fi
2733 fi
2734
2735 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2736 if test "${with_gnu_ld+set}" = set; then
2737   withval="$with_gnu_ld"
2738   test "$withval" = no || with_gnu_ld=yes
2739 else
2740   with_gnu_ld=no
2741 fi
2742
2743 ac_prog=ld
2744 if test "$ac_cv_prog_gcc" = yes; then
2745   # Check if gcc -print-prog-name=ld gives a path.
2746   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2747 echo "configure:2748: checking for ld used by GCC" >&5
2748   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2749   case "$ac_prog" in
2750     # Accept absolute paths.
2751     [\\/]* | [A-Za-z]:[\\/]*)
2752       re_direlt='/[^/][^/]*/\.\./'
2753       # Canonicalize the path of ld
2754       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2755       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2756         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2757       done
2758       test -z "$LD" && LD="$ac_prog"
2759       ;;
2760   "")
2761     # If it fails, then pretend we aren't using GCC.
2762     ac_prog=ld
2763     ;;
2764   *)
2765     # If it is relative, then search for the first ld in PATH.
2766     with_gnu_ld=unknown
2767     ;;
2768   esac
2769 elif test "$with_gnu_ld" = yes; then
2770   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2771 echo "configure:2772: checking for GNU ld" >&5
2772 else
2773   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2774 echo "configure:2775: checking for non-GNU ld" >&5
2775 fi
2776 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   if test -z "$LD"; then
2780   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2781   for ac_dir in $PATH; do
2782     test -z "$ac_dir" && ac_dir=.
2783     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2784       ac_cv_path_LD="$ac_dir/$ac_prog"
2785       # Check to see if the program is GNU ld.  I'd rather use --version,
2786       # but apparently some GNU ld's only accept -v.
2787       # Break only if it was the GNU/non-GNU ld that we prefer.
2788       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2789         test "$with_gnu_ld" != no && break
2790       else
2791         test "$with_gnu_ld" != yes && break
2792       fi
2793     fi
2794   done
2795   IFS="$ac_save_ifs"
2796 else
2797   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2798 fi
2799 fi
2800
2801 LD="$ac_cv_path_LD"
2802 if test -n "$LD"; then
2803   echo "$ac_t""$LD" 1>&6
2804 else
2805   echo "$ac_t""no" 1>&6
2806 fi
2807 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2808 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2809 echo "configure:2810: checking if the linker ($LD) is GNU ld" >&5
2810 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2814 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2815   ac_cv_prog_gnu_ld=yes
2816 else
2817   ac_cv_prog_gnu_ld=no
2818 fi
2819 fi
2820
2821 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2822
2823
2824 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2825 echo "configure:2826: checking for BSD-compatible nm" >&5
2826 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2827   echo $ac_n "(cached) $ac_c" 1>&6
2828 else
2829   if test -n "$NM"; then
2830   # Let the user override the test.
2831   ac_cv_path_NM="$NM"
2832 else
2833   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2834   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2835     test -z "$ac_dir" && ac_dir=.
2836     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2837       # Check to see if the nm accepts a BSD-compat flag.
2838       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2839       #   nm: unknown option "B" ignored
2840       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2841         ac_cv_path_NM="$ac_dir/nm -B"
2842         break
2843       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2844         ac_cv_path_NM="$ac_dir/nm -p"
2845         break
2846       else
2847         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2848         continue # so that we can try to find one that supports BSD flags
2849       fi
2850     fi
2851   done
2852   IFS="$ac_save_ifs"
2853   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2854 fi
2855 fi
2856
2857 NM="$ac_cv_path_NM"
2858 echo "$ac_t""$NM" 1>&6
2859
2860 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2861 echo "configure:2862: checking whether ln -s works" >&5
2862 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2863   echo $ac_n "(cached) $ac_c" 1>&6
2864 else
2865   rm -f conftestdata
2866 if ln -s X conftestdata 2>/dev/null
2867 then
2868   rm -f conftestdata
2869   ac_cv_prog_LN_S="ln -s"
2870 else
2871   ac_cv_prog_LN_S=ln
2872 fi
2873 fi
2874 LN_S="$ac_cv_prog_LN_S"
2875 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2876   echo "$ac_t""yes" 1>&6
2877 else
2878   echo "$ac_t""no" 1>&6
2879 fi
2880
2881 if test $host != $build; then
2882   ac_tool_prefix=${host_alias}-
2883 else
2884   ac_tool_prefix=
2885 fi
2886
2887
2888 case "$target" in
2889 NONE) lt_target="$host" ;;
2890 *) lt_target="$target" ;;
2891 esac
2892
2893 # Check for any special flags to pass to ltconfig.
2894 libtool_flags="--cache-file=$cache_file"
2895 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2896 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2897 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2898 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2899 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2900 libtool_flags="$libtool_flags --enable-dlopen"
2901 libtool_flags="$libtool_flags --enable-win32-dll"
2902 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2903 if test "${enable_libtool_lock+set}" = set; then
2904   enableval="$enable_libtool_lock"
2905   :
2906 fi
2907
2908 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2909 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2910
2911 # Some flags need to be propagated to the compiler or linker for good
2912 # libtool support.
2913 case "$lt_target" in
2914 *-*-irix6*)
2915   # Find out which ABI we are using.
2916   echo '#line 2917 "configure"' > conftest.$ac_ext
2917   if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918     case "`/usr/bin/file conftest.o`" in
2919     *32-bit*)
2920       LD="${LD-ld} -32"
2921       ;;
2922     *N32*)
2923       LD="${LD-ld} -n32"
2924       ;;
2925     *64-bit*)
2926       LD="${LD-ld} -64"
2927       ;;
2928     esac
2929   fi
2930   rm -rf conftest*
2931   ;;
2932
2933 *-*-sco3.2v5*)
2934   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2935   SAVE_CFLAGS="$CFLAGS"
2936   CFLAGS="$CFLAGS -belf"
2937   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2938 echo "configure:2939: checking whether the C compiler needs -belf" >&5
2939 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2940   echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942   cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945
2946 int main() {
2947
2948 ; return 0; }
2949 EOF
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2951   rm -rf conftest*
2952   lt_cv_cc_needs_belf=yes
2953 else
2954   echo "configure: failed program was:" >&5
2955   cat conftest.$ac_ext >&5
2956   rm -rf conftest*
2957   lt_cv_cc_needs_belf=no
2958 fi
2959 rm -f conftest*
2960 fi
2961
2962 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2963   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2964     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2965     CFLAGS="$SAVE_CFLAGS"
2966   fi
2967   ;;
2968
2969 *-*-cygwin* | *-*-mingw*)
2970   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2971 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2972 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2973 echo "configure:2974: checking for $ac_word" >&5
2974 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2975   echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977   if test -n "$DLLTOOL"; then
2978   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2979 else
2980   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2981   ac_dummy="$PATH"
2982   for ac_dir in $ac_dummy; do
2983     test -z "$ac_dir" && ac_dir=.
2984     if test -f $ac_dir/$ac_word; then
2985       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2986       break
2987     fi
2988   done
2989   IFS="$ac_save_ifs"
2990 fi
2991 fi
2992 DLLTOOL="$ac_cv_prog_DLLTOOL"
2993 if test -n "$DLLTOOL"; then
2994   echo "$ac_t""$DLLTOOL" 1>&6
2995 else
2996   echo "$ac_t""no" 1>&6
2997 fi
2998
2999
3000 if test -z "$ac_cv_prog_DLLTOOL"; then
3001 if test -n "$ac_tool_prefix"; then
3002   # Extract the first word of "dlltool", so it can be a program name with args.
3003 set dummy dlltool; ac_word=$2
3004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3005 echo "configure:3006: checking for $ac_word" >&5
3006 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3007   echo $ac_n "(cached) $ac_c" 1>&6
3008 else
3009   if test -n "$DLLTOOL"; then
3010   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3011 else
3012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3013   ac_dummy="$PATH"
3014   for ac_dir in $ac_dummy; do
3015     test -z "$ac_dir" && ac_dir=.
3016     if test -f $ac_dir/$ac_word; then
3017       ac_cv_prog_DLLTOOL="dlltool"
3018       break
3019     fi
3020   done
3021   IFS="$ac_save_ifs"
3022   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3023 fi
3024 fi
3025 DLLTOOL="$ac_cv_prog_DLLTOOL"
3026 if test -n "$DLLTOOL"; then
3027   echo "$ac_t""$DLLTOOL" 1>&6
3028 else
3029   echo "$ac_t""no" 1>&6
3030 fi
3031
3032 else
3033   DLLTOOL="false"
3034 fi
3035 fi
3036
3037   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3038 set dummy ${ac_tool_prefix}as; ac_word=$2
3039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3040 echo "configure:3041: checking for $ac_word" >&5
3041 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   if test -n "$AS"; then
3045   ac_cv_prog_AS="$AS" # Let the user override the test.
3046 else
3047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3048   ac_dummy="$PATH"
3049   for ac_dir in $ac_dummy; do
3050     test -z "$ac_dir" && ac_dir=.
3051     if test -f $ac_dir/$ac_word; then
3052       ac_cv_prog_AS="${ac_tool_prefix}as"
3053       break
3054     fi
3055   done
3056   IFS="$ac_save_ifs"
3057 fi
3058 fi
3059 AS="$ac_cv_prog_AS"
3060 if test -n "$AS"; then
3061   echo "$ac_t""$AS" 1>&6
3062 else
3063   echo "$ac_t""no" 1>&6
3064 fi
3065
3066
3067 if test -z "$ac_cv_prog_AS"; then
3068 if test -n "$ac_tool_prefix"; then
3069   # Extract the first word of "as", so it can be a program name with args.
3070 set dummy as; ac_word=$2
3071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_word" >&5
3073 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   if test -n "$AS"; then
3077   ac_cv_prog_AS="$AS" # Let the user override the test.
3078 else
3079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3080   ac_dummy="$PATH"
3081   for ac_dir in $ac_dummy; do
3082     test -z "$ac_dir" && ac_dir=.
3083     if test -f $ac_dir/$ac_word; then
3084       ac_cv_prog_AS="as"
3085       break
3086     fi
3087   done
3088   IFS="$ac_save_ifs"
3089   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3090 fi
3091 fi
3092 AS="$ac_cv_prog_AS"
3093 if test -n "$AS"; then
3094   echo "$ac_t""$AS" 1>&6
3095 else
3096   echo "$ac_t""no" 1>&6
3097 fi
3098
3099 else
3100   AS="false"
3101 fi
3102 fi
3103
3104   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3105 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3106 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3107 echo "configure:3108: checking for $ac_word" >&5
3108 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3109   echo $ac_n "(cached) $ac_c" 1>&6
3110 else
3111   if test -n "$OBJDUMP"; then
3112   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3113 else
3114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3115   ac_dummy="$PATH"
3116   for ac_dir in $ac_dummy; do
3117     test -z "$ac_dir" && ac_dir=.
3118     if test -f $ac_dir/$ac_word; then
3119       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3120       break
3121     fi
3122   done
3123   IFS="$ac_save_ifs"
3124 fi
3125 fi
3126 OBJDUMP="$ac_cv_prog_OBJDUMP"
3127 if test -n "$OBJDUMP"; then
3128   echo "$ac_t""$OBJDUMP" 1>&6
3129 else
3130   echo "$ac_t""no" 1>&6
3131 fi
3132
3133
3134 if test -z "$ac_cv_prog_OBJDUMP"; then
3135 if test -n "$ac_tool_prefix"; then
3136   # Extract the first word of "objdump", so it can be a program name with args.
3137 set dummy objdump; ac_word=$2
3138 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3139 echo "configure:3140: checking for $ac_word" >&5
3140 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3141   echo $ac_n "(cached) $ac_c" 1>&6
3142 else
3143   if test -n "$OBJDUMP"; then
3144   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3145 else
3146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3147   ac_dummy="$PATH"
3148   for ac_dir in $ac_dummy; do
3149     test -z "$ac_dir" && ac_dir=.
3150     if test -f $ac_dir/$ac_word; then
3151       ac_cv_prog_OBJDUMP="objdump"
3152       break
3153     fi
3154   done
3155   IFS="$ac_save_ifs"
3156   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3157 fi
3158 fi
3159 OBJDUMP="$ac_cv_prog_OBJDUMP"
3160 if test -n "$OBJDUMP"; then
3161   echo "$ac_t""$OBJDUMP" 1>&6
3162 else
3163   echo "$ac_t""no" 1>&6
3164 fi
3165
3166 else
3167   OBJDUMP="false"
3168 fi
3169 fi
3170
3171   ;;
3172
3173 esac
3174
3175
3176 # Save cache, so that ltconfig can load it
3177
3178
3179 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3180 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3181 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3182 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3183 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3184 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3185 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3186 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3187
3188 # Reload cache, that may have been modified by ltconfig
3189
3190
3191 # This can be used to rebuild libtool when needed
3192 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3193
3194 # Always use our own libtool.
3195 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3196
3197 # Redirect the config.log output again, so that the ltconfig log is not
3198 # clobbered by the next message.
3199 exec 5>>./config.log
3200
3201
3202 for ac_prog in mawk gawk nawk awk
3203 do
3204 # Extract the first word of "$ac_prog", so it can be a program name with args.
3205 set dummy $ac_prog; ac_word=$2
3206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3207 echo "configure:3208: checking for $ac_word" >&5
3208 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   if test -n "$AWK"; then
3212   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3213 else
3214   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3215   ac_dummy="$PATH"
3216   for ac_dir in $ac_dummy; do
3217     test -z "$ac_dir" && ac_dir=.
3218     if test -f $ac_dir/$ac_word; then
3219       ac_cv_prog_AWK="$ac_prog"
3220       break
3221     fi
3222   done
3223   IFS="$ac_save_ifs"
3224 fi
3225 fi
3226 AWK="$ac_cv_prog_AWK"
3227 if test -n "$AWK"; then
3228   echo "$ac_t""$AWK" 1>&6
3229 else
3230   echo "$ac_t""no" 1>&6
3231 fi
3232
3233 test -n "$AWK" && break
3234 done
3235
3236 # test for ln hardlink support
3237 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3238 echo "configure:3239: checking whether ln works" >&5
3239 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3240   echo $ac_n "(cached) $ac_c" 1>&6
3241 else
3242   rm -f conftest.src conftest.dst
3243 echo "conftest" > conftest.src
3244 if ln conftest.src conftest.dst 2>/dev/null
3245 then
3246   ol_cv_prog_LN_H="ln"
3247 else
3248   ol_cv_prog_LN_H="cp"
3249 fi
3250 rm -f conftest.src conftest.dst
3251
3252 fi
3253 LN_H="$ol_cv_prog_LN_H"
3254 if test "$ol_cv_prog_LN_H" = "ln"; then
3255         echo "$ac_t""yes" 1>&6
3256 else
3257         echo "$ac_t""no" 1>&6
3258 fi
3259
3260 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3261 echo "configure:3262: checking whether ln -s works" >&5
3262 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3263   echo $ac_n "(cached) $ac_c" 1>&6
3264 else
3265   rm -f conftestdata
3266 if ln -s X conftestdata 2>/dev/null
3267 then
3268   rm -f conftestdata
3269   ac_cv_prog_LN_S="ln -s"
3270 else
3271   ac_cv_prog_LN_S=ln
3272 fi
3273 fi
3274 LN_S="$ac_cv_prog_LN_S"
3275 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3276   echo "$ac_t""yes" 1>&6
3277 else
3278   echo "$ac_t""no" 1>&6
3279 fi
3280
3281
3282 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3283         LN_S="$LN_H"
3284 fi
3285
3286 # Extract the first word of "sendmail", so it can be a program name with args.
3287 set dummy sendmail; ac_word=$2
3288 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3289 echo "configure:3290: checking for $ac_word" >&5
3290 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   case "$SENDMAIL" in
3294   /*)
3295   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3296   ;;
3297   ?:/*)
3298   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3299   ;;
3300   *)
3301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3302   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3303   for ac_dir in $ac_dummy; do 
3304     test -z "$ac_dir" && ac_dir=.
3305     if test -f $ac_dir/$ac_word; then
3306       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3307       break
3308     fi
3309   done
3310   IFS="$ac_save_ifs"
3311   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3312   ;;
3313 esac
3314 fi
3315 SENDMAIL="$ac_cv_path_SENDMAIL"
3316 if test -n "$SENDMAIL"; then
3317   echo "$ac_t""$SENDMAIL" 1>&6
3318 else
3319   echo "$ac_t""no" 1>&6
3320 fi
3321
3322 # Extract the first word of "vi", so it can be a program name with args.
3323 set dummy vi; ac_word=$2
3324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_word" >&5
3326 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3327   echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329   case "$EDITOR" in
3330   /*)
3331   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3332   ;;
3333   ?:/*)
3334   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3335   ;;
3336   *)
3337   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3338   ac_dummy="$PATH:/usr/ucb"
3339   for ac_dir in $ac_dummy; do 
3340     test -z "$ac_dir" && ac_dir=.
3341     if test -f $ac_dir/$ac_word; then
3342       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3343       break
3344     fi
3345   done
3346   IFS="$ac_save_ifs"
3347   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3348   ;;
3349 esac
3350 fi
3351 EDITOR="$ac_cv_path_EDITOR"
3352 if test -n "$EDITOR"; then
3353   echo "$ac_t""$EDITOR" 1>&6
3354 else
3355   echo "$ac_t""no" 1>&6
3356 fi
3357
3358 # Extract the first word of "finger", so it can be a program name with args.
3359 set dummy finger; ac_word=$2
3360 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3361 echo "configure:3362: checking for $ac_word" >&5
3362 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3363   echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365   case "$FINGER" in
3366   /*)
3367   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3368   ;;
3369   ?:/*)
3370   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3371   ;;
3372   *)
3373   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3374   ac_dummy="$PATH:/usr/ucb"
3375   for ac_dir in $ac_dummy; do 
3376     test -z "$ac_dir" && ac_dir=.
3377     if test -f $ac_dir/$ac_word; then
3378       ac_cv_path_FINGER="$ac_dir/$ac_word"
3379       break
3380     fi
3381   done
3382   IFS="$ac_save_ifs"
3383   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3384   ;;
3385 esac
3386 fi
3387 FINGER="$ac_cv_path_FINGER"
3388 if test -n "$FINGER"; then
3389   echo "$ac_t""$FINGER" 1>&6
3390 else
3391   echo "$ac_t""no" 1>&6
3392 fi
3393
3394
3395 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3396 echo "configure:3397: checking how to run the C preprocessor" >&5
3397 # On Suns, sometimes $CPP names a directory.
3398 if test -n "$CPP" && test -d "$CPP"; then
3399   CPP=
3400 fi
3401 if test -z "$CPP"; then
3402 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405     # This must be in double quotes, not single quotes, because CPP may get
3406   # substituted into the Makefile and "${CC-cc}" will confuse make.
3407   CPP="${CC-cc} -E"
3408   # On the NeXT, cc -E runs the code through the compiler's parser,
3409   # not just through cpp.
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <assert.h>
3414 Syntax Error
3415 EOF
3416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3417 { (eval echo configure:3418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3419 if test -z "$ac_err"; then
3420   :
3421 else
3422   echo "$ac_err" >&5
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   CPP="${CC-cc} -E -traditional-cpp"
3427   cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 #include <assert.h>
3431 Syntax Error
3432 EOF
3433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3434 { (eval echo configure:3435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3436 if test -z "$ac_err"; then
3437   :
3438 else
3439   echo "$ac_err" >&5
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   CPP="${CC-cc} -nologo -E"
3444   cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 #include <assert.h>
3448 Syntax Error
3449 EOF
3450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3451 { (eval echo configure:3452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3453 if test -z "$ac_err"; then
3454   :
3455 else
3456   echo "$ac_err" >&5
3457   echo "configure: failed program was:" >&5
3458   cat conftest.$ac_ext >&5
3459   rm -rf conftest*
3460   CPP=/lib/cpp
3461 fi
3462 rm -f conftest*
3463 fi
3464 rm -f conftest*
3465 fi
3466 rm -f conftest*
3467   ac_cv_prog_CPP="$CPP"
3468 fi
3469   CPP="$ac_cv_prog_CPP"
3470 else
3471   ac_cv_prog_CPP="$CPP"
3472 fi
3473 echo "$ac_t""$CPP" 1>&6
3474
3475
3476 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3477         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3478
3479 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3480         echo "configure: warning: programs compiled here do run here..." 1>&2
3481         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3482
3483 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3484         echo "configure: warning: programs compiled here do not run here..." 1>&2
3485         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3486 fi
3487
3488 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3489 echo "configure:3490: checking for AIX" >&5
3490 cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 #ifdef _AIX
3494   yes
3495 #endif
3496
3497 EOF
3498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3499   egrep "yes" >/dev/null 2>&1; then
3500   rm -rf conftest*
3501   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3502 #define _ALL_SOURCE 1
3503 EOF
3504
3505 else
3506   rm -rf conftest*
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 rm -f conftest*
3510
3511
3512 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3513 echo "configure:3514: checking for POSIXized ISC" >&5
3514 if test -d /etc/conf/kconfig.d &&
3515   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3516 then
3517   echo "$ac_t""yes" 1>&6
3518   ISC=yes # If later tests want to check for ISC.
3519   cat >> confdefs.h <<\EOF
3520 #define _POSIX_SOURCE 1
3521 EOF
3522
3523   if test "$GCC" = yes; then
3524     CC="$CC -posix"
3525   else
3526     CC="$CC -Xp"
3527   fi
3528 else
3529   echo "$ac_t""no" 1>&6
3530   ISC=
3531 fi
3532
3533 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3534 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3535 echo "configure:3536: checking for minix/config.h" >&5
3536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <minix/config.h>
3543 EOF
3544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3545 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3547 if test -z "$ac_err"; then
3548   rm -rf conftest*
3549   eval "ac_cv_header_$ac_safe=yes"
3550 else
3551   echo "$ac_err" >&5
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554   rm -rf conftest*
3555   eval "ac_cv_header_$ac_safe=no"
3556 fi
3557 rm -f conftest*
3558 fi
3559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3560   echo "$ac_t""yes" 1>&6
3561   MINIX=yes
3562 else
3563   echo "$ac_t""no" 1>&6
3564 MINIX=
3565 fi
3566
3567 if test "$MINIX" = yes; then
3568   cat >> confdefs.h <<\EOF
3569 #define _POSIX_SOURCE 1
3570 EOF
3571
3572   cat >> confdefs.h <<\EOF
3573 #define _POSIX_1_SOURCE 2
3574 EOF
3575
3576   cat >> confdefs.h <<\EOF
3577 #define _MINIX 1
3578 EOF
3579
3580 fi
3581
3582
3583 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3584 echo "configure:3585: checking for Cygwin environment" >&5
3585 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3586   echo $ac_n "(cached) $ac_c" 1>&6
3587 else
3588   cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591
3592 int main() {
3593
3594 #ifndef __CYGWIN__
3595 #define __CYGWIN__ __CYGWIN32__
3596 #endif
3597 return __CYGWIN__;
3598 ; return 0; }
3599 EOF
3600 if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3601   rm -rf conftest*
3602   ac_cv_cygwin=yes
3603 else
3604   echo "configure: failed program was:" >&5
3605   cat conftest.$ac_ext >&5
3606   rm -rf conftest*
3607   ac_cv_cygwin=no
3608 fi
3609 rm -f conftest*
3610 fi
3611
3612 echo "$ac_t""$ac_cv_cygwin" 1>&6
3613 CYGWIN=
3614 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3615 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3616 echo "configure:3617: checking for mingw32 environment" >&5
3617 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3618   echo $ac_n "(cached) $ac_c" 1>&6
3619 else
3620   cat > conftest.$ac_ext <<EOF
3621 #line 3622 "configure"
3622 #include "confdefs.h"
3623
3624 int main() {
3625 return __MINGW32__;
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3629   rm -rf conftest*
3630   ac_cv_mingw32=yes
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   ac_cv_mingw32=no
3636 fi
3637 rm -f conftest*
3638 fi
3639
3640 echo "$ac_t""$ac_cv_mingw32" 1>&6
3641 MINGW32=
3642 test "$ac_cv_mingw32" = yes && MINGW32=yes
3643 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3644 echo "configure:3645: checking for EMX OS/2 environment" >&5
3645 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3651
3652 int main() {
3653 return __EMX__;
3654 ; return 0; }
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3657   rm -rf conftest*
3658   ac_cv_emxos2=yes
3659 else
3660   echo "configure: failed program was:" >&5
3661   cat conftest.$ac_ext >&5
3662   rm -rf conftest*
3663   ac_cv_emxos2=no
3664 fi
3665 rm -f conftest*
3666 fi
3667
3668 echo "$ac_t""$ac_cv_emxos2" 1>&6
3669 EMXOS2=
3670 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3671
3672
3673
3674 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3675 echo "configure:3676: checking for executable suffix" >&5
3676 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3680   ac_cv_exeext=.exe
3681 else
3682   rm -f conftest*
3683   echo 'int main () { return 0; }' > conftest.$ac_ext
3684   ac_cv_exeext=
3685   if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3686     for file in conftest.*; do
3687       case $file in
3688       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3689       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3690       esac
3691     done
3692   else
3693     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3694   fi
3695   rm -f conftest*
3696   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3697 fi
3698 fi
3699
3700 EXEEXT=""
3701 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3702 echo "$ac_t""${ac_cv_exeext}" 1>&6
3703 ac_exeext=$EXEEXT
3704
3705 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3706 echo "configure:3707: checking for object suffix" >&5
3707 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   rm -f conftest*
3711 echo 'int i = 1;' > conftest.$ac_ext
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713   for ac_file in conftest.*; do
3714     case $ac_file in
3715     *.c) ;;
3716     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3717     esac
3718   done
3719 else
3720   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3721 fi
3722 rm -f conftest*
3723 fi
3724
3725 echo "$ac_t""$ac_cv_objext" 1>&6
3726 OBJEXT=$ac_cv_objext
3727 ac_objext=$ac_cv_objext
3728
3729
3730 cat >> confdefs.h <<EOF
3731 #define EXEEXT "${EXEEXT}"
3732 EOF
3733
3734
3735 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3736 echo "configure:3737: checking for be_app in -lbe" >&5
3737 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   ac_save_LIBS="$LIBS"
3742 LIBS="-lbe -lroot -lnet $LIBS"
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 /* Override any gcc2 internal prototype to avoid an error.  */
3747 /* We use char because int might match the return type of a gcc2
3748     builtin and then its argument prototype would still apply.  */
3749 char be_app();
3750
3751 int main() {
3752 be_app()
3753 ; return 0; }
3754 EOF
3755 if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3756   rm -rf conftest*
3757   eval "ac_cv_lib_$ac_lib_var=yes"
3758 else
3759   echo "configure: failed program was:" >&5
3760   cat conftest.$ac_ext >&5
3761   rm -rf conftest*
3762   eval "ac_cv_lib_$ac_lib_var=no"
3763 fi
3764 rm -f conftest*
3765 LIBS="$ac_save_LIBS"
3766
3767 fi
3768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3769   echo "$ac_t""yes" 1>&6
3770   LIBS="$LIBS -lbe -lroot -lnet"
3771 else
3772   echo "$ac_t""no" 1>&6
3773 :
3774 fi
3775
3776
3777
3778
3779
3780 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3781 echo "configure:3782: checking for ${CC-cc} option to accept ANSI C" >&5
3782 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   am_cv_prog_cc_stdc=no
3786 ac_save_CC="$CC"
3787 # Don't try gcc -ansi; that turns off useful extensions and
3788 # breaks some systems' header files.
3789 # AIX                   -qlanglvl=ansi
3790 # Ultrix and OSF/1      -std1
3791 # HP-UX 10.20 and later -Ae
3792 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3793 # SVR4                  -Xc -D__EXTENSIONS__
3794 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3795 do
3796   CC="$ac_save_CC $ac_arg"
3797   cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3800 #include <stdarg.h>
3801 #include <stdio.h>
3802 #include <sys/types.h>
3803 #include <sys/stat.h>
3804 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3805 struct buf { int x; };
3806 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3807 static char *e (p, i)
3808      char **p;
3809      int i;
3810 {
3811   return p[i];
3812 }
3813 static char *f (char * (*g) (char **, int), char **p, ...)
3814 {
3815   char *s;
3816   va_list v;
3817   va_start (v,p);
3818   s = g (p, va_arg (v,int));
3819   va_end (v);
3820   return s;
3821 }
3822 int test (int i, double x);
3823 struct s1 {int (*f) (int a);};
3824 struct s2 {int (*f) (double a);};
3825 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3826 int argc;
3827 char **argv;
3828
3829 int main() {
3830
3831 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3832
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3836   rm -rf conftest*
3837   am_cv_prog_cc_stdc="$ac_arg"; break
3838 else
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841 fi
3842 rm -f conftest*
3843 done
3844 CC="$ac_save_CC"
3845
3846 fi
3847
3848 if test -z "$am_cv_prog_cc_stdc"; then
3849   echo "$ac_t""none needed" 1>&6
3850 else
3851   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3852 fi
3853 case "x$am_cv_prog_cc_stdc" in
3854   x|xno) ;;
3855   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3856 esac
3857
3858 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3859         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3860 fi
3861
3862 # test for make depend flag
3863 OL_MKDEP=
3864 OL_MKDEP_FLAGS=
3865 if test -z "${MKDEP}"; then
3866         OL_MKDEP="${CC-cc}"
3867         if test -z "${MKDEP_FLAGS}"; then
3868                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3869 echo "configure:3870: checking for ${OL_MKDEP} depend flag" >&5
3870 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3871   echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873   
3874                         ol_cv_mkdep=no
3875                         for flag in "-M" "-xM"; do
3876                                 cat > conftest.c <<EOF
3877  noCode;
3878 EOF
3879                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3880                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3881                                 then
3882                                         if test ! -f conftest."${ac_object}" ; then
3883                                                 ol_cv_mkdep=$flag
3884                                                 OL_MKDEP_FLAGS="$flag"
3885                                                 break
3886                                         fi
3887                                 fi
3888                         done
3889                         rm -f conftest*
3890                 
3891 fi
3892
3893 echo "$ac_t""$ol_cv_mkdep" 1>&6
3894         else
3895                 cc_cv_mkdep=yes
3896                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3897         fi
3898 else
3899         cc_cv_mkdep=yes
3900         OL_MKDEP="${MKDEP}"
3901         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3902 fi
3903
3904
3905
3906 if test "${ol_cv_mkdep}" = no ; then
3907         # this will soon become an error
3908         echo "configure: warning: do not know how to generate dependencies" 1>&2
3909 fi
3910
3911 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3912 echo "configure:3913: checking for afopen in -ls" >&5
3913 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3914 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3915   echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917   ac_save_LIBS="$LIBS"
3918 LIBS="-ls  $LIBS"
3919 cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922 /* Override any gcc2 internal prototype to avoid an error.  */
3923 /* We use char because int might match the return type of a gcc2
3924     builtin and then its argument prototype would still apply.  */
3925 char afopen();
3926
3927 int main() {
3928 afopen()
3929 ; return 0; }
3930 EOF
3931 if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3932   rm -rf conftest*
3933   eval "ac_cv_lib_$ac_lib_var=yes"
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -rf conftest*
3938   eval "ac_cv_lib_$ac_lib_var=no"
3939 fi
3940 rm -f conftest*
3941 LIBS="$ac_save_LIBS"
3942
3943 fi
3944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3945   echo "$ac_t""yes" 1>&6
3946   
3947         AUTH_LIBS=-ls
3948         cat >> confdefs.h <<\EOF
3949 #define HAVE_AIX_SECURITY 1
3950 EOF
3951
3952
3953 else
3954   echo "$ac_t""no" 1>&6
3955 fi
3956
3957
3958
3959 for ac_func in getaddrinfo 
3960 do
3961 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3962 echo "configure:3963: checking for $ac_func" >&5
3963 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3964   echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966   cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 /* System header to define __stub macros and hopefully few prototypes,
3970     which can conflict with char $ac_func(); below.  */
3971 #include <assert.h>
3972 /* Override any gcc2 internal prototype to avoid an error.  */
3973 /* We use char because int might match the return type of a gcc2
3974     builtin and then its argument prototype would still apply.  */
3975 char $ac_func();
3976 char (*f)();
3977
3978 int main() {
3979
3980 /* The GNU C library defines this for functions which it implements
3981     to always fail with ENOSYS.  Some functions are actually named
3982     something starting with __ and the normal name is an alias.  */
3983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3984 choke me
3985 #else
3986 f = $ac_func;
3987 #endif
3988
3989 ; return 0; }
3990 EOF
3991 if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3992   rm -rf conftest*
3993   eval "ac_cv_func_$ac_func=yes"
3994 else
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997   rm -rf conftest*
3998   eval "ac_cv_func_$ac_func=no"
3999 fi
4000 rm -f conftest*
4001 fi
4002
4003 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4004   echo "$ac_t""yes" 1>&6
4005     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4006   cat >> confdefs.h <<EOF
4007 #define $ac_tr_func 1
4008 EOF
4009  
4010 else
4011   echo "$ac_t""no" 1>&6
4012 fi
4013 done
4014
4015
4016 if test $ac_cv_func_getaddrinfo = no ; then
4017         if test $ol_enable_ipv6 = yes ; then
4018                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4019         fi
4020         ol_enable_ipv6=no
4021 fi
4022
4023 if test $ol_enable_unix != no ; then
4024         for ac_hdr in sys/un.h 
4025 do
4026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4028 echo "configure:4029: checking for $ac_hdr" >&5
4029 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4030   echo $ac_n "(cached) $ac_c" 1>&6
4031 else
4032   cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 #include <$ac_hdr>
4036 EOF
4037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4038 { (eval echo configure:4039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4040 if test -z "$ac_err"; then
4041   rm -rf conftest*
4042   eval "ac_cv_header_$ac_safe=yes"
4043 else
4044   echo "$ac_err" >&5
4045   echo "configure: failed program was:" >&5
4046   cat conftest.$ac_ext >&5
4047   rm -rf conftest*
4048   eval "ac_cv_header_$ac_safe=no"
4049 fi
4050 rm -f conftest*
4051 fi
4052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4053   echo "$ac_t""yes" 1>&6
4054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4055   cat >> confdefs.h <<EOF
4056 #define $ac_tr_hdr 1
4057 EOF
4058  
4059 else
4060   echo "$ac_t""no" 1>&6
4061 fi
4062 done
4063
4064
4065         if test $ol_enable_unix = auto ; then
4066                 ol_enable_unix=$ac_cv_header_sys_un_h
4067         elif test $ac_cv_header_sys_un_h = no ; then
4068                 { echo "configure: error: UNIX domain support requires sys/un.h" 1>&2; exit 1; }
4069         fi
4070 fi
4071
4072 ol_link_modules=no
4073 if test $ol_enable_modules != no ; then
4074         for ac_hdr in ltdl.h
4075 do
4076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4078 echo "configure:4079: checking for $ac_hdr" >&5
4079 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4080   echo $ac_n "(cached) $ac_c" 1>&6
4081 else
4082   cat > conftest.$ac_ext <<EOF
4083 #line 4084 "configure"
4084 #include "confdefs.h"
4085 #include <$ac_hdr>
4086 EOF
4087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4088 { (eval echo configure:4089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4090 if test -z "$ac_err"; then
4091   rm -rf conftest*
4092   eval "ac_cv_header_$ac_safe=yes"
4093 else
4094   echo "$ac_err" >&5
4095   echo "configure: failed program was:" >&5
4096   cat conftest.$ac_ext >&5
4097   rm -rf conftest*
4098   eval "ac_cv_header_$ac_safe=no"
4099 fi
4100 rm -f conftest*
4101 fi
4102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4103   echo "$ac_t""yes" 1>&6
4104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4105   cat >> confdefs.h <<EOF
4106 #define $ac_tr_hdr 1
4107 EOF
4108  
4109 else
4110   echo "$ac_t""no" 1>&6
4111 fi
4112 done
4113
4114
4115         if test $ac_cv_header_ltdl_h = no ; then
4116                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4117         fi
4118
4119         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4120 echo "configure:4121: checking for lt_dlinit in -lltdl" >&5
4121 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4123   echo $ac_n "(cached) $ac_c" 1>&6
4124 else
4125   ac_save_LIBS="$LIBS"
4126 LIBS="-lltdl  $LIBS"
4127 cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 /* Override any gcc2 internal prototype to avoid an error.  */
4131 /* We use char because int might match the return type of a gcc2
4132     builtin and then its argument prototype would still apply.  */
4133 char lt_dlinit();
4134
4135 int main() {
4136 lt_dlinit()
4137 ; return 0; }
4138 EOF
4139 if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4140   rm -rf conftest*
4141   eval "ac_cv_lib_$ac_lib_var=yes"
4142 else
4143   echo "configure: failed program was:" >&5
4144   cat conftest.$ac_ext >&5
4145   rm -rf conftest*
4146   eval "ac_cv_lib_$ac_lib_var=no"
4147 fi
4148 rm -f conftest*
4149 LIBS="$ac_save_LIBS"
4150
4151 fi
4152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4153   echo "$ac_t""yes" 1>&6
4154   
4155             MODULES_LIBS=-lltdl
4156             cat >> confdefs.h <<\EOF
4157 #define HAVE_LIBLTDL 1
4158 EOF
4159
4160         
4161 else
4162   echo "$ac_t""no" 1>&6
4163 fi
4164
4165
4166         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4167                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4168         fi
4169         ol_link_modules=yes
4170 else
4171         ol_with_dnssrv_module=static
4172         ol_with_ldap_module=static
4173         ol_with_ldbm_module=static
4174         ol_with_passwd_module=static
4175         ol_with_shell_module=static
4176         ol_with_sql_module=static
4177 fi
4178
4179 # test for EBCDIC
4180 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4181 echo "configure:4182: checking for EBCDIC" >&5
4182 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4183   echo $ac_n "(cached) $ac_c" 1>&6
4184 else
4185   
4186         cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189
4190 #if !('M' == 0xd4)
4191 #include <__ASCII__/generate_error.h>
4192 #endif
4193
4194 EOF
4195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4196 { (eval echo configure:4197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4198 if test -z "$ac_err"; then
4199   rm -rf conftest*
4200   ol_cv_cpp_ebcdic=yes
4201 else
4202   echo "$ac_err" >&5
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   ol_cv_cpp_ebcdic=no
4207 fi
4208 rm -f conftest*
4209 fi
4210
4211 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4212 if test $ol_cv_cpp_ebcdic = yes ; then
4213         cat >> confdefs.h <<\EOF
4214 #define HAVE_EBCDIC 1
4215 EOF
4216
4217 fi
4218
4219 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4220 echo "configure:4221: checking for ANSI C header files" >&5
4221 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <stdlib.h>
4228 #include <stdarg.h>
4229 #include <string.h>
4230 #include <float.h>
4231 EOF
4232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4233 { (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4235 if test -z "$ac_err"; then
4236   rm -rf conftest*
4237   ol_cv_header_stdc=yes
4238 else
4239   echo "$ac_err" >&5
4240   echo "configure: failed program was:" >&5
4241   cat conftest.$ac_ext >&5
4242   rm -rf conftest*
4243   ol_cv_header_stdc=no
4244 fi
4245 rm -f conftest*
4246
4247 if test $ol_cv_header_stdc = yes; then
4248   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 #include <string.h>
4253 EOF
4254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4255   egrep "memchr" >/dev/null 2>&1; then
4256   :
4257 else
4258   rm -rf conftest*
4259   ol_cv_header_stdc=no
4260 fi
4261 rm -f conftest*
4262
4263 fi
4264
4265 if test $ol_cv_header_stdc = yes; then
4266   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4267 cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 #include <stdlib.h>
4271 EOF
4272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4273   egrep "free" >/dev/null 2>&1; then
4274   :
4275 else
4276   rm -rf conftest*
4277   ol_cv_header_stdc=no
4278 fi
4279 rm -f conftest*
4280
4281 fi
4282
4283 if test $ol_cv_header_stdc = yes; then
4284   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4285 if test "$cross_compiling" = yes; then
4286   :
4287 else
4288   cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <ctype.h>
4292 #ifndef HAVE_EBCDIC
4293 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4294 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4295 #else
4296 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4297                 || ('j' <= (c) && (c) <= 'r') \
4298                 || ('s' <= (c) && (c) <= 'z'))
4299 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4300 #endif
4301 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4302 int main () { int i; for (i = 0; i < 256; i++)
4303 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4304 exit (0); }
4305
4306 EOF
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4308 then
4309   :
4310 else
4311   echo "configure: failed program was:" >&5
4312   cat conftest.$ac_ext >&5
4313   rm -fr conftest*
4314   ol_cv_header_stdc=no
4315 fi
4316 rm -fr conftest*
4317 fi
4318
4319 fi
4320 fi
4321
4322 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4323 if test $ol_cv_header_stdc = yes; then
4324   cat >> confdefs.h <<\EOF
4325 #define STDC_HEADERS 1
4326 EOF
4327
4328 fi
4329 ac_cv_header_stdc=disable
4330
4331
4332 if test $ol_cv_header_stdc != yes; then
4333         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4334 fi
4335
4336 ac_header_dirent=no
4337 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4338 do
4339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4340 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4341 echo "configure:4342: checking for $ac_hdr that defines DIR" >&5
4342 if eval "test \"\${ac_cv_header_dirent_$ac_safe+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 <$ac_hdr>
4350 int main() {
4351 DIR *dirp = 0;
4352 ; return 0; }
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4355   rm -rf conftest*
4356   eval "ac_cv_header_dirent_$ac_safe=yes"
4357 else
4358   echo "configure: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   rm -rf conftest*
4361   eval "ac_cv_header_dirent_$ac_safe=no"
4362 fi
4363 rm -f conftest*
4364 fi
4365 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4366   echo "$ac_t""yes" 1>&6
4367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4368   cat >> confdefs.h <<EOF
4369 #define $ac_tr_hdr 1
4370 EOF
4371  ac_header_dirent=$ac_hdr; break
4372 else
4373   echo "$ac_t""no" 1>&6
4374 fi
4375 done
4376 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4377 if test $ac_header_dirent = dirent.h; then
4378 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4379 echo "configure:4380: checking for opendir in -ldir" >&5
4380 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4381 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   ac_save_LIBS="$LIBS"
4385 LIBS="-ldir  $LIBS"
4386 cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389 /* Override any gcc2 internal prototype to avoid an error.  */
4390 /* We use char because int might match the return type of a gcc2
4391     builtin and then its argument prototype would still apply.  */
4392 char opendir();
4393
4394 int main() {
4395 opendir()
4396 ; return 0; }
4397 EOF
4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4399   rm -rf conftest*
4400   eval "ac_cv_lib_$ac_lib_var=yes"
4401 else
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=no"
4406 fi
4407 rm -f conftest*
4408 LIBS="$ac_save_LIBS"
4409
4410 fi
4411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4412   echo "$ac_t""yes" 1>&6
4413   LIBS="$LIBS -ldir"
4414 else
4415   echo "$ac_t""no" 1>&6
4416 fi
4417
4418 else
4419 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4420 echo "configure:4421: checking for opendir in -lx" >&5
4421 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4423   echo $ac_n "(cached) $ac_c" 1>&6
4424 else
4425   ac_save_LIBS="$LIBS"
4426 LIBS="-lx  $LIBS"
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 /* Override any gcc2 internal prototype to avoid an error.  */
4431 /* We use char because int might match the return type of a gcc2
4432     builtin and then its argument prototype would still apply.  */
4433 char opendir();
4434
4435 int main() {
4436 opendir()
4437 ; return 0; }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4440   rm -rf conftest*
4441   eval "ac_cv_lib_$ac_lib_var=yes"
4442 else
4443   echo "configure: failed program was:" >&5
4444   cat conftest.$ac_ext >&5
4445   rm -rf conftest*
4446   eval "ac_cv_lib_$ac_lib_var=no"
4447 fi
4448 rm -f conftest*
4449 LIBS="$ac_save_LIBS"
4450
4451 fi
4452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4453   echo "$ac_t""yes" 1>&6
4454   LIBS="$LIBS -lx"
4455 else
4456   echo "$ac_t""no" 1>&6
4457 fi
4458
4459 fi
4460
4461 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4462 echo "configure:4463: checking for sys/wait.h that is POSIX.1 compatible" >&5
4463 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   cat > conftest.$ac_ext <<EOF
4467 #line 4468 "configure"
4468 #include "confdefs.h"
4469 #include <sys/types.h>
4470 #include <sys/wait.h>
4471 #ifndef WEXITSTATUS
4472 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4473 #endif
4474 #ifndef WIFEXITED
4475 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4476 #endif
4477 int main() {
4478 int s;
4479 wait (&s);
4480 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4484   rm -rf conftest*
4485   ac_cv_header_sys_wait_h=yes
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   ac_cv_header_sys_wait_h=no
4491 fi
4492 rm -f conftest*
4493 fi
4494
4495 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4496 if test $ac_cv_header_sys_wait_h = yes; then
4497   cat >> confdefs.h <<\EOF
4498 #define HAVE_SYS_WAIT_H 1
4499 EOF
4500
4501 fi
4502
4503 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4504 echo "configure:4505: checking POSIX termios" >&5
4505 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4506   echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508   cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <sys/types.h>
4512 #include <unistd.h>
4513 #include <termios.h>
4514 int main() {
4515 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4516    tcgetattr(0, 0);
4517 ; return 0; }
4518 EOF
4519 if { (eval echo configure:4520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4520   rm -rf conftest*
4521   am_cv_sys_posix_termios=yes
4522 else
4523   echo "configure: failed program was:" >&5
4524   cat conftest.$ac_ext >&5
4525   rm -rf conftest*
4526   am_cv_sys_posix_termios=no
4527 fi
4528 rm -f conftest*
4529 fi
4530
4531 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4532
4533
4534  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4535 echo "configure:4536: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4536 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4537   echo $ac_n "(cached) $ac_c" 1>&6
4538 else
4539   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4540
4541   gwinsz_in_termios_h=no
4542   if test $am_cv_sys_posix_termios = yes; then
4543     cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 #include <sys/types.h>
4547 #     include <termios.h>
4548 #     ifdef TIOCGWINSZ
4549         yes
4550 #     endif
4551     
4552 EOF
4553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554   egrep "yes" >/dev/null 2>&1; then
4555   rm -rf conftest*
4556   gwinsz_in_termios_h=yes
4557 fi
4558 rm -f conftest*
4559
4560   fi
4561
4562   if test $gwinsz_in_termios_h = no; then
4563     cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4566 #include <sys/types.h>
4567 #     include <sys/ioctl.h>
4568 #     ifdef TIOCGWINSZ
4569         yes
4570 #     endif
4571     
4572 EOF
4573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4574   egrep "yes" >/dev/null 2>&1; then
4575   rm -rf conftest*
4576   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4577 fi
4578 rm -f conftest*
4579
4580   fi
4581   
4582 fi
4583
4584 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4585   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4586     cat >> confdefs.h <<\EOF
4587 #define GWINSZ_IN_SYS_IOCTL 1
4588 EOF
4589
4590   fi
4591
4592 if test $am_cv_sys_posix_termios = yes ; then
4593         cat >> confdefs.h <<\EOF
4594 #define HAVE_POSIX_TERMIOS 1
4595 EOF
4596
4597 fi
4598
4599 for ac_hdr in \
4600         arpa/inet.h             \
4601         arpa/nameser.h  \
4602         assert.h                \
4603         conio.h                 \
4604         crypt.h                 \
4605         direct.h                \
4606         errno.h                 \
4607         fcntl.h                 \
4608         filio.h                 \
4609         getopt.h                \
4610         grp.h                   \
4611         io.h                    \
4612         libutil.h               \
4613         limits.h                \
4614         locale.h                \
4615         netinet/tcp.h   \
4616         malloc.h                \
4617         memory.h                \
4618         psap.h                  \
4619         pwd.h                   \
4620         process.h               \
4621         resolv.h                \
4622         sgtty.h                 \
4623         shadow.h                \
4624         stddef.h                \
4625         string.h                \
4626         strings.h               \
4627         sysexits.h              \
4628         sys/file.h              \
4629         sys/filio.h             \
4630         sys/errno.h             \
4631         sys/ioctl.h             \
4632         sys/param.h             \
4633         sys/resource.h  \
4634         sys/select.h    \
4635         sys/socket.h    \
4636         sys/syslog.h    \
4637         sys/time.h              \
4638         sys/types.h             \
4639         syslog.h                \
4640         termios.h               \
4641         unistd.h                \
4642         winsock.h               \
4643
4644 do
4645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4647 echo "configure:4648: checking for $ac_hdr" >&5
4648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4649   echo $ac_n "(cached) $ac_c" 1>&6
4650 else
4651   cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654 #include <$ac_hdr>
4655 EOF
4656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4657 { (eval echo configure:4658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4659 if test -z "$ac_err"; then
4660   rm -rf conftest*
4661   eval "ac_cv_header_$ac_safe=yes"
4662 else
4663   echo "$ac_err" >&5
4664   echo "configure: failed program was:" >&5
4665   cat conftest.$ac_ext >&5
4666   rm -rf conftest*
4667   eval "ac_cv_header_$ac_safe=no"
4668 fi
4669 rm -f conftest*
4670 fi
4671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4674   cat >> confdefs.h <<EOF
4675 #define $ac_tr_hdr 1
4676 EOF
4677  
4678 else
4679   echo "$ac_t""no" 1>&6
4680 fi
4681 done
4682
4683
4684
4685
4686 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4687 echo "configure:4688: checking for sigset in -lV3" >&5
4688 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4690   echo $ac_n "(cached) $ac_c" 1>&6
4691 else
4692   ac_save_LIBS="$LIBS"
4693 LIBS="-lV3  $LIBS"
4694 cat > conftest.$ac_ext <<EOF
4695 #line 4696 "configure"
4696 #include "confdefs.h"
4697 /* Override any gcc2 internal prototype to avoid an error.  */
4698 /* We use char because int might match the return type of a gcc2
4699     builtin and then its argument prototype would still apply.  */
4700 char sigset();
4701
4702 int main() {
4703 sigset()
4704 ; return 0; }
4705 EOF
4706 if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4707   rm -rf conftest*
4708   eval "ac_cv_lib_$ac_lib_var=yes"
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   eval "ac_cv_lib_$ac_lib_var=no"
4714 fi
4715 rm -f conftest*
4716 LIBS="$ac_save_LIBS"
4717
4718 fi
4719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4720   echo "$ac_t""yes" 1>&6
4721     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4722     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4723   cat >> confdefs.h <<EOF
4724 #define $ac_tr_lib 1
4725 EOF
4726
4727   LIBS="-lV3 $LIBS"
4728
4729 else
4730   echo "$ac_t""no" 1>&6
4731 fi
4732
4733
4734 if test $ac_cv_header_winsock_h = yes; then
4735         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4736 echo "configure:4737: checking for winsock" >&5
4737 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   cat > conftest.$ac_ext <<EOF
4741 #line 4742 "configure"
4742 #include "confdefs.h"
4743 #include <winsock.h>
4744 int main() {
4745
4746                         socket(0,0,0);
4747                         select(0,NULL,NULL,NULL,NULL);
4748                         closesocket(0);
4749                         gethostname(NULL,0);
4750         
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754   rm -rf conftest*
4755   ol_cv_winsock=yes
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   ol_cv_winsock=no
4761 fi
4762 rm -f conftest*]
4763 fi
4764
4765 echo "$ac_t""$ol_cv_winsock" 1>&6
4766
4767         if test $ol_cv_winsock = yes ; then
4768                 cat >> confdefs.h <<\EOF
4769 #define HAVE_WINSOCK 1
4770 EOF
4771
4772                 ac_cv_func_socket=yes
4773                 ac_cv_func_select=yes
4774                 ac_cv_func_closesocket=yes
4775                 ac_cv_func_gethostname=yes
4776         fi
4777 fi
4778
4779
4780 echo $ac_n "checking for socket""... $ac_c" 1>&6
4781 echo "configure:4782: checking for socket" >&5
4782 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 /* System header to define __stub macros and hopefully few prototypes,
4789     which can conflict with char socket(); below.  */
4790 #include <assert.h>
4791 /* Override any gcc2 internal prototype to avoid an error.  */
4792 /* We use char because int might match the return type of a gcc2
4793     builtin and then its argument prototype would still apply.  */
4794 char socket();
4795 char (*f)();
4796
4797 int main() {
4798
4799 /* The GNU C library defines this for functions which it implements
4800     to always fail with ENOSYS.  Some functions are actually named
4801     something starting with __ and the normal name is an alias.  */
4802 #if defined (__stub_socket) || defined (__stub___socket)
4803 choke me
4804 #else
4805 f = socket;
4806 #endif
4807
4808 ; return 0; }
4809 EOF
4810 if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4811   rm -rf conftest*
4812   eval "ac_cv_func_socket=yes"
4813 else
4814   echo "configure: failed program was:" >&5
4815   cat conftest.$ac_ext >&5
4816   rm -rf conftest*
4817   eval "ac_cv_func_socket=no"
4818 fi
4819 rm -f conftest*
4820 fi
4821
4822 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4823   echo "$ac_t""yes" 1>&6
4824   :
4825 else
4826   echo "$ac_t""no" 1>&6
4827         
4828         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4829 echo "configure:4830: checking for main in -lsocket" >&5
4830 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4832   echo $ac_n "(cached) $ac_c" 1>&6
4833 else
4834   ac_save_LIBS="$LIBS"
4835 LIBS="-lsocket  $LIBS"
4836 cat > conftest.$ac_ext <<EOF
4837 #line 4838 "configure"
4838 #include "confdefs.h"
4839
4840 int main() {
4841 main()
4842 ; return 0; }
4843 EOF
4844 if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4845   rm -rf conftest*
4846   eval "ac_cv_lib_$ac_lib_var=yes"
4847 else
4848   echo "configure: failed program was:" >&5
4849   cat conftest.$ac_ext >&5
4850   rm -rf conftest*
4851   eval "ac_cv_lib_$ac_lib_var=no"
4852 fi
4853 rm -f conftest*
4854 LIBS="$ac_save_LIBS"
4855
4856 fi
4857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4858   echo "$ac_t""yes" 1>&6
4859     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4860     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4861   cat >> confdefs.h <<EOF
4862 #define $ac_tr_lib 1
4863 EOF
4864
4865   LIBS="-lsocket $LIBS"
4866
4867 else
4868   echo "$ac_t""no" 1>&6
4869 fi
4870
4871         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4872 echo "configure:4873: checking for main in -lnet" >&5
4873 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4874 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   ac_save_LIBS="$LIBS"
4878 LIBS="-lnet  $LIBS"
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882
4883 int main() {
4884 main()
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   eval "ac_cv_lib_$ac_lib_var=yes"
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   eval "ac_cv_lib_$ac_lib_var=no"
4895 fi
4896 rm -f conftest*
4897 LIBS="$ac_save_LIBS"
4898
4899 fi
4900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4901   echo "$ac_t""yes" 1>&6
4902     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4903     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4904   cat >> confdefs.h <<EOF
4905 #define $ac_tr_lib 1
4906 EOF
4907
4908   LIBS="-lnet $LIBS"
4909
4910 else
4911   echo "$ac_t""no" 1>&6
4912 fi
4913
4914         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4915 echo "configure:4916: checking for main in -lnsl_s" >&5
4916 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4918   echo $ac_n "(cached) $ac_c" 1>&6
4919 else
4920   ac_save_LIBS="$LIBS"
4921 LIBS="-lnsl_s  $LIBS"
4922 cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4925
4926 int main() {
4927 main()
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_lib_$ac_lib_var=no"
4938 fi
4939 rm -f conftest*
4940 LIBS="$ac_save_LIBS"
4941
4942 fi
4943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4944   echo "$ac_t""yes" 1>&6
4945     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4946     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4947   cat >> confdefs.h <<EOF
4948 #define $ac_tr_lib 1
4949 EOF
4950
4951   LIBS="-lnsl_s $LIBS"
4952
4953 else
4954   echo "$ac_t""no" 1>&6
4955 fi
4956
4957         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4958 echo "configure:4959: checking for main in -lnsl" >&5
4959 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4961   echo $ac_n "(cached) $ac_c" 1>&6
4962 else
4963   ac_save_LIBS="$LIBS"
4964 LIBS="-lnsl  $LIBS"
4965 cat > conftest.$ac_ext <<EOF
4966 #line 4967 "configure"
4967 #include "confdefs.h"
4968
4969 int main() {
4970 main()
4971 ; return 0; }
4972 EOF
4973 if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4974   rm -rf conftest*
4975   eval "ac_cv_lib_$ac_lib_var=yes"
4976 else
4977   echo "configure: failed program was:" >&5
4978   cat conftest.$ac_ext >&5
4979   rm -rf conftest*
4980   eval "ac_cv_lib_$ac_lib_var=no"
4981 fi
4982 rm -f conftest*
4983 LIBS="$ac_save_LIBS"
4984
4985 fi
4986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4987   echo "$ac_t""yes" 1>&6
4988     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4990   cat >> confdefs.h <<EOF
4991 #define $ac_tr_lib 1
4992 EOF
4993
4994   LIBS="-lnsl $LIBS"
4995
4996 else
4997   echo "$ac_t""no" 1>&6
4998 fi
4999
5000         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5001 echo "configure:5002: checking for socket in -linet" >&5
5002 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   ac_save_LIBS="$LIBS"
5007 LIBS="-linet  $LIBS"
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 /* Override any gcc2 internal prototype to avoid an error.  */
5012 /* We use char because int might match the return type of a gcc2
5013     builtin and then its argument prototype would still apply.  */
5014 char socket();
5015
5016 int main() {
5017 socket()
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=no"
5028 fi
5029 rm -f conftest*
5030 LIBS="$ac_save_LIBS"
5031
5032 fi
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034   echo "$ac_t""yes" 1>&6
5035     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5037   cat >> confdefs.h <<EOF
5038 #define $ac_tr_lib 1
5039 EOF
5040
5041   LIBS="-linet $LIBS"
5042
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5048 echo "configure:5049: checking for main in -lgen" >&5
5049 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-lgen  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058
5059 int main() {
5060 main()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5080   cat >> confdefs.h <<EOF
5081 #define $ac_tr_lib 1
5082 EOF
5083
5084   LIBS="-lgen $LIBS"
5085
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089
5090
5091 fi
5092
5093
5094 echo $ac_n "checking for select""... $ac_c" 1>&6
5095 echo "configure:5096: checking for select" >&5
5096 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5097   echo $ac_n "(cached) $ac_c" 1>&6
5098 else
5099   cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102 /* System header to define __stub macros and hopefully few prototypes,
5103     which can conflict with char select(); below.  */
5104 #include <assert.h>
5105 /* Override any gcc2 internal prototype to avoid an error.  */
5106 /* We use char because int might match the return type of a gcc2
5107     builtin and then its argument prototype would still apply.  */
5108 char select();
5109 char (*f)();
5110
5111 int main() {
5112
5113 /* The GNU C library defines this for functions which it implements
5114     to always fail with ENOSYS.  Some functions are actually named
5115     something starting with __ and the normal name is an alias.  */
5116 #if defined (__stub_select) || defined (__stub___select)
5117 choke me
5118 #else
5119 f = select;
5120 #endif
5121
5122 ; return 0; }
5123 EOF
5124 if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5125   rm -rf conftest*
5126   eval "ac_cv_func_select=yes"
5127 else
5128   echo "configure: failed program was:" >&5
5129   cat conftest.$ac_ext >&5
5130   rm -rf conftest*
5131   eval "ac_cv_func_select=no"
5132 fi
5133 rm -f conftest*
5134 fi
5135
5136 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5137   echo "$ac_t""yes" 1>&6
5138   :
5139 else
5140   echo "$ac_t""no" 1>&6
5141 { echo "configure: error: select() required." 1>&2; exit 1; }
5142 fi
5143
5144
5145 if test "${ac_cv_header_winsock_h}" != yes; then
5146                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5147 echo "configure:5148: checking types of arguments for select()" >&5
5148  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5149   echo $ac_n "(cached) $ac_c" 1>&6
5150 else
5151    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5152   echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5155   echo $ac_n "(cached) $ac_c" 1>&6
5156 else
5157      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5158      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5159       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5160        cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 #ifdef HAVE_SYS_TYPES_H
5164 #include <sys/types.h>
5165 #endif
5166 #ifdef HAVE_SYS_TIME_H
5167 #include <sys/time.h>
5168 #endif
5169 #ifdef HAVE_SYS_SELECT_H
5170 #include <sys/select.h>
5171 #endif
5172 #ifdef HAVE_SYS_SOCKET_H
5173 #include <sys/socket.h>
5174 #endif
5175 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);
5176 int main() {
5177
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5181   rm -rf conftest*
5182           ac_not_found=no ; break 3
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   ac_not_found=yes
5188 fi
5189 rm -f conftest*
5190       done
5191      done
5192     done
5193    
5194 fi
5195   
5196 fi
5197  
5198 fi
5199  if test "$ac_not_found" = yes; then
5200   ac_cv_func_select_arg1=int 
5201   ac_cv_func_select_arg234='int *' 
5202   ac_cv_func_select_arg5='struct timeval *'
5203  fi
5204  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5205  cat >> confdefs.h <<EOF
5206 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5207 EOF
5208
5209  cat >> confdefs.h <<EOF
5210 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5211 EOF
5212
5213  cat >> confdefs.h <<EOF
5214 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5215 EOF
5216
5217
5218 fi
5219
5220
5221 for ac_hdr in regex.h 
5222 do
5223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5225 echo "configure:5226: checking for $ac_hdr" >&5
5226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5227   echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229   cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232 #include <$ac_hdr>
5233 EOF
5234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5235 { (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5237 if test -z "$ac_err"; then
5238   rm -rf conftest*
5239   eval "ac_cv_header_$ac_safe=yes"
5240 else
5241   echo "$ac_err" >&5
5242   echo "configure: failed program was:" >&5
5243   cat conftest.$ac_ext >&5
5244   rm -rf conftest*
5245   eval "ac_cv_header_$ac_safe=no"
5246 fi
5247 rm -f conftest*
5248 fi
5249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5250   echo "$ac_t""yes" 1>&6
5251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5252   cat >> confdefs.h <<EOF
5253 #define $ac_tr_hdr 1
5254 EOF
5255  
5256 else
5257   echo "$ac_t""no" 1>&6
5258 fi
5259 done
5260
5261 if test "$ac_cv_header_regex_h" != yes ; then
5262         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5263 fi
5264 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5265 echo "configure:5266: checking for regfree" >&5
5266 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 /* System header to define __stub macros and hopefully few prototypes,
5273     which can conflict with char regfree(); below.  */
5274 #include <assert.h>
5275 /* Override any gcc2 internal prototype to avoid an error.  */
5276 /* We use char because int might match the return type of a gcc2
5277     builtin and then its argument prototype would still apply.  */
5278 char regfree();
5279 char (*f)();
5280
5281 int main() {
5282
5283 /* The GNU C library defines this for functions which it implements
5284     to always fail with ENOSYS.  Some functions are actually named
5285     something starting with __ and the normal name is an alias.  */
5286 #if defined (__stub_regfree) || defined (__stub___regfree)
5287 choke me
5288 #else
5289 f = regfree;
5290 #endif
5291
5292 ; return 0; }
5293 EOF
5294 if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5295   rm -rf conftest*
5296   eval "ac_cv_func_regfree=yes"
5297 else
5298   echo "configure: failed program was:" >&5
5299   cat conftest.$ac_ext >&5
5300   rm -rf conftest*
5301   eval "ac_cv_func_regfree=no"
5302 fi
5303 rm -f conftest*
5304 fi
5305
5306 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5307   echo "$ac_t""yes" 1>&6
5308   :
5309 else
5310   echo "$ac_t""no" 1>&6
5311 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5312 fi
5313
5314
5315
5316 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5317 echo "configure:5318: checking for compatible POSIX regex" >&5
5318 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5319   echo $ac_n "(cached) $ac_c" 1>&6
5320 else
5321   
5322         if test "$cross_compiling" = yes; then
5323   ol_cv_c_posix_regex=cross
5324 else
5325   cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5328
5329 #include <sys/types.h>
5330 #include <regex.h>
5331 static char *pattern, *string;
5332 main()
5333 {
5334         int rc;
5335         regex_t re;
5336
5337         pattern = "^A";
5338
5339         if(regcomp(&re, pattern, 0)) {
5340                 return -1;
5341         }
5342         
5343         string = "ALL MATCH";
5344         
5345         rc = regexec(&re, string, 0, (void*)0, 0);
5346
5347         regfree(&re);
5348
5349         return rc;
5350 }
5351 EOF
5352 if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5353 then
5354   ol_cv_c_posix_regex=yes
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -fr conftest*
5359   ol_cv_c_posix_regex=no
5360 fi
5361 rm -fr conftest*
5362 fi
5363
5364 fi
5365
5366 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5367
5368 if test "$ol_cv_c_posix_regex" = no ; then
5369         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5370 fi
5371
5372 ol_link_dnssrv=no
5373 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5374 echo "configure:5375: checking for res_query" >&5
5375 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 /* System header to define __stub macros and hopefully few prototypes,
5382     which can conflict with char res_query(); below.  */
5383 #include <assert.h>
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 /* We use char because int might match the return type of a gcc2
5386     builtin and then its argument prototype would still apply.  */
5387 char res_query();
5388 char (*f)();
5389
5390 int main() {
5391
5392 /* The GNU C library defines this for functions which it implements
5393     to always fail with ENOSYS.  Some functions are actually named
5394     something starting with __ and the normal name is an alias.  */
5395 #if defined (__stub_res_query) || defined (__stub___res_query)
5396 choke me
5397 #else
5398 f = res_query;
5399 #endif
5400
5401 ; return 0; }
5402 EOF
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5404   rm -rf conftest*
5405   eval "ac_cv_func_res_query=yes"
5406 else
5407   echo "configure: failed program was:" >&5
5408   cat conftest.$ac_ext >&5
5409   rm -rf conftest*
5410   eval "ac_cv_func_res_query=no"
5411 fi
5412 rm -f conftest*
5413 fi
5414
5415 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5416   echo "$ac_t""yes" 1>&6
5417   :
5418 else
5419   echo "$ac_t""no" 1>&6
5420 fi
5421
5422 if test $ac_cv_func_res_query = no ; then 
5423         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5424 echo "configure:5425: checking for res_query in -lbind" >&5
5425 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5427   echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429   ac_save_LIBS="$LIBS"
5430 LIBS="-lbind  $LIBS"
5431 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 /* We use char because int might match the return type of a gcc2
5436     builtin and then its argument prototype would still apply.  */
5437 char res_query();
5438
5439 int main() {
5440 res_query()
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   eval "ac_cv_lib_$ac_lib_var=yes"
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   eval "ac_cv_lib_$ac_lib_var=no"
5451 fi
5452 rm -f conftest*
5453 LIBS="$ac_save_LIBS"
5454
5455 fi
5456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5457   echo "$ac_t""yes" 1>&6
5458     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5459     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5460   cat >> confdefs.h <<EOF
5461 #define $ac_tr_lib 1
5462 EOF
5463
5464   LIBS="-lbind $LIBS"
5465
5466 else
5467   echo "$ac_t""no" 1>&6
5468 fi
5469
5470         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5471 fi
5472
5473 if test $ac_cv_func_res_query = no ; then 
5474         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5475 echo "configure:5476: checking for __res_query in -lbind" >&5
5476 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5478   echo $ac_n "(cached) $ac_c" 1>&6
5479 else
5480   ac_save_LIBS="$LIBS"
5481 LIBS="-lbind  $LIBS"
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 /* Override any gcc2 internal prototype to avoid an error.  */
5486 /* We use char because int might match the return type of a gcc2
5487     builtin and then its argument prototype would still apply.  */
5488 char __res_query();
5489
5490 int main() {
5491 __res_query()
5492 ; return 0; }
5493 EOF
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=yes"
5497 else
5498   echo "configure: failed program was:" >&5
5499   cat conftest.$ac_ext >&5
5500   rm -rf conftest*
5501   eval "ac_cv_lib_$ac_lib_var=no"
5502 fi
5503 rm -f conftest*
5504 LIBS="$ac_save_LIBS"
5505
5506 fi
5507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5510     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5511   cat >> confdefs.h <<EOF
5512 #define $ac_tr_lib 1
5513 EOF
5514
5515   LIBS="-lbind $LIBS"
5516
5517 else
5518   echo "$ac_t""no" 1>&6
5519 fi
5520
5521         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5522 fi
5523
5524 if test $ac_cv_func_res_query = no ; then 
5525         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5526 echo "configure:5527: checking for res_query in -lresolv" >&5
5527 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5529   echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531   ac_save_LIBS="$LIBS"
5532 LIBS="-lresolv  $LIBS"
5533 cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536 /* Override any gcc2 internal prototype to avoid an error.  */
5537 /* We use char because int might match the return type of a gcc2
5538     builtin and then its argument prototype would still apply.  */
5539 char res_query();
5540
5541 int main() {
5542 res_query()
5543 ; return 0; }
5544 EOF
5545 if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5546   rm -rf conftest*
5547   eval "ac_cv_lib_$ac_lib_var=yes"
5548 else
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   eval "ac_cv_lib_$ac_lib_var=no"
5553 fi
5554 rm -f conftest*
5555 LIBS="$ac_save_LIBS"
5556
5557 fi
5558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5559   echo "$ac_t""yes" 1>&6
5560     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5561     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5562   cat >> confdefs.h <<EOF
5563 #define $ac_tr_lib 1
5564 EOF
5565
5566   LIBS="-lresolv $LIBS"
5567
5568 else
5569   echo "$ac_t""no" 1>&6
5570 fi
5571
5572         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5573 fi
5574
5575 if test "$ac_cv_func_res_query" = yes ; then
5576         cat >> confdefs.h <<\EOF
5577 #define HAVE_RES_QUERY 1
5578 EOF
5579
5580
5581         if test $ol_enable_dnssrv != no ; then
5582                 ol_link_dnssrv=yes
5583         fi
5584 fi
5585
5586 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5587         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5588 fi
5589
5590 ol_link_kbind=no
5591 ol_link_kpasswd=no
5592 ol_link_krb5=no
5593 ol_link_krb4=no
5594
5595 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5596         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5597
5598         for ac_hdr in krb5.h
5599 do
5600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5602 echo "configure:5603: checking for $ac_hdr" >&5
5603 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5604   echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606   cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609 #include <$ac_hdr>
5610 EOF
5611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5612 { (eval echo configure:5613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5614 if test -z "$ac_err"; then
5615   rm -rf conftest*
5616   eval "ac_cv_header_$ac_safe=yes"
5617 else
5618   echo "$ac_err" >&5
5619   echo "configure: failed program was:" >&5
5620   cat conftest.$ac_ext >&5
5621   rm -rf conftest*
5622   eval "ac_cv_header_$ac_safe=no"
5623 fi
5624 rm -f conftest*
5625 fi
5626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5627   echo "$ac_t""yes" 1>&6
5628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5629   cat >> confdefs.h <<EOF
5630 #define $ac_tr_hdr 1
5631 EOF
5632  
5633 else
5634   echo "$ac_t""no" 1>&6
5635 fi
5636 done
5637
5638
5639         if test $ac_cv_header_krb5_h = yes ; then
5640                                 for ac_hdr in heim_err.h
5641 do
5642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5644 echo "configure:5645: checking for $ac_hdr" >&5
5645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5646   echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648   cat > conftest.$ac_ext <<EOF
5649 #line 5650 "configure"
5650 #include "confdefs.h"
5651 #include <$ac_hdr>
5652 EOF
5653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5654 { (eval echo configure:5655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5656 if test -z "$ac_err"; then
5657   rm -rf conftest*
5658   eval "ac_cv_header_$ac_safe=yes"
5659 else
5660   echo "$ac_err" >&5
5661   echo "configure: failed program was:" >&5
5662   cat conftest.$ac_ext >&5
5663   rm -rf conftest*
5664   eval "ac_cv_header_$ac_safe=no"
5665 fi
5666 rm -f conftest*
5667 fi
5668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5669   echo "$ac_t""yes" 1>&6
5670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5671   cat >> confdefs.h <<EOF
5672 #define $ac_tr_hdr 1
5673 EOF
5674  
5675 else
5676   echo "$ac_t""no" 1>&6
5677 fi
5678 done
5679
5680                 if test $ac_cv_header_heim_err_h = yes ; then
5681                         krb5_impl=heimdal
5682                 else
5683                         krb5_impl=mit
5684                 fi
5685
5686                 if test $krb5_impl = mit; then
5687                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5688 echo "configure:5689: checking for main in -lkrb5" >&5
5689 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5691   echo $ac_n "(cached) $ac_c" 1>&6
5692 else
5693   ac_save_LIBS="$LIBS"
5694 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5695 cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5698
5699 int main() {
5700 main()
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=yes"
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   eval "ac_cv_lib_$ac_lib_var=no"
5711 fi
5712 rm -f conftest*
5713 LIBS="$ac_save_LIBS"
5714
5715 fi
5716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5717   echo "$ac_t""yes" 1>&6
5718   have_krb5=yes
5719                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5720 else
5721   echo "$ac_t""no" 1>&6
5722 have_krb5=no
5723 fi
5724
5725
5726                 elif test $krb5_impl = heimdal; then
5727                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5728 echo "configure:5729: checking for main in -lkrb5" >&5
5729 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5731   echo $ac_n "(cached) $ac_c" 1>&6
5732 else
5733   ac_save_LIBS="$LIBS"
5734 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738
5739 int main() {
5740 main()
5741 ; return 0; }
5742 EOF
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744   rm -rf conftest*
5745   eval "ac_cv_lib_$ac_lib_var=yes"
5746 else
5747   echo "configure: failed program was:" >&5
5748   cat conftest.$ac_ext >&5
5749   rm -rf conftest*
5750   eval "ac_cv_lib_$ac_lib_var=no"
5751 fi
5752 rm -f conftest*
5753 LIBS="$ac_save_LIBS"
5754
5755 fi
5756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5757   echo "$ac_t""yes" 1>&6
5758   have_krb5=yes
5759                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5760 else
5761   echo "$ac_t""no" 1>&6
5762 have_krb5=no
5763 fi
5764
5765
5766                         cat >> confdefs.h <<\EOF
5767 #define HAVE_HEIMDAL_KERBEROS 1
5768 EOF
5769
5770                 else
5771                         have_krb5=no
5772                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5773                 fi
5774
5775                 if test $have_krb5 = yes ; then
5776                         ol_link_krb5=yes
5777
5778                         cat >> confdefs.h <<\EOF
5779 #define HAVE_KRB5 1
5780 EOF
5781
5782
5783                         if test $ol_enable_kpasswd != no ; then
5784                                 ol_link_kpasswd=yes;
5785                         fi
5786
5787                         if test $ol_with_kerberos = k5only ; then
5788                                 ol_with_kerberos=found
5789                         fi
5790
5791                 elif test $ol_with_kerberos != auto ; then
5792                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5793                 fi
5794
5795         fi
5796 fi
5797
5798 if test $ol_link_krb5 = yes -a \
5799         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5800
5801         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5802 do
5803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5805 echo "configure:5806: checking for $ac_hdr" >&5
5806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5807   echo $ac_n "(cached) $ac_c" 1>&6
5808 else
5809   cat > conftest.$ac_ext <<EOF
5810 #line 5811 "configure"
5811 #include "confdefs.h"
5812 #include <$ac_hdr>
5813 EOF
5814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5815 { (eval echo configure:5816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5817 if test -z "$ac_err"; then
5818   rm -rf conftest*
5819   eval "ac_cv_header_$ac_safe=yes"
5820 else
5821   echo "$ac_err" >&5
5822   echo "configure: failed program was:" >&5
5823   cat conftest.$ac_ext >&5
5824   rm -rf conftest*
5825   eval "ac_cv_header_$ac_safe=no"
5826 fi
5827 rm -f conftest*
5828 fi
5829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5830   echo "$ac_t""yes" 1>&6
5831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5832   cat >> confdefs.h <<EOF
5833 #define $ac_tr_hdr 1
5834 EOF
5835  
5836 else
5837   echo "$ac_t""no" 1>&6
5838 fi
5839 done
5840
5841
5842         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5843                 if test $krb5_impl = mit; then
5844                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5845 echo "configure:5846: checking for main in -lkrb4" >&5
5846 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   ac_save_LIBS="$LIBS"
5851 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5852 cat > conftest.$ac_ext <<EOF
5853 #line 5854 "configure"
5854 #include "confdefs.h"
5855
5856 int main() {
5857 main()
5858 ; return 0; }
5859 EOF
5860 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5861   rm -rf conftest*
5862   eval "ac_cv_lib_$ac_lib_var=yes"
5863 else
5864   echo "configure: failed program was:" >&5
5865   cat conftest.$ac_ext >&5
5866   rm -rf conftest*
5867   eval "ac_cv_lib_$ac_lib_var=no"
5868 fi
5869 rm -f conftest*
5870 LIBS="$ac_save_LIBS"
5871
5872 fi
5873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5874   echo "$ac_t""yes" 1>&6
5875   have_k425=yes
5876                                 KRB4_LIBS="-lkrb4 -ldes425"
5877 else
5878   echo "$ac_t""no" 1>&6
5879 have_k425=no
5880 fi
5881
5882
5883                 elif test $krb5_impl = heimdal; then
5884                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5885 echo "configure:5886: checking for main in -lkrb4" >&5
5886 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5888   echo $ac_n "(cached) $ac_c" 1>&6
5889 else
5890   ac_save_LIBS="$LIBS"
5891 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5892 cat > conftest.$ac_ext <<EOF
5893 #line 5894 "configure"
5894 #include "confdefs.h"
5895
5896 int main() {
5897 main()
5898 ; return 0; }
5899 EOF
5900 if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901   rm -rf conftest*
5902   eval "ac_cv_lib_$ac_lib_var=yes"
5903 else
5904   echo "configure: failed program was:" >&5
5905   cat conftest.$ac_ext >&5
5906   rm -rf conftest*
5907   eval "ac_cv_lib_$ac_lib_var=no"
5908 fi
5909 rm -f conftest*
5910 LIBS="$ac_save_LIBS"
5911
5912 fi
5913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5914   echo "$ac_t""yes" 1>&6
5915   have_k425=yes
5916                                 KRB4_LIBS="-lkrb4"
5917 else
5918   echo "$ac_t""no" 1>&6
5919 have_k425=no
5920 fi
5921
5922
5923                 else
5924                         have_425=no
5925                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5926                 fi
5927
5928                 if test $have_k425 = yes ; then
5929                         ol_with_kerberos=found
5930                         ol_link_krb4=yes
5931
5932                         cat >> confdefs.h <<\EOF
5933 #define HAVE_KRB425 1
5934 EOF
5935
5936                         cat >> confdefs.h <<\EOF
5937 #define HAVE_KRB4 1
5938 EOF
5939
5940
5941                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5942 echo "configure:5943: checking for des_debug in Kerberos libraries" >&5
5943 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5944   echo $ac_n "(cached) $ac_c" 1>&6
5945 else
5946   
5947                                                                 save_LIBS="$LIBS"
5948                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5949                                 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952
5953 #include <kerberosIV/krb.h>
5954 #include <kerberosIV/des.h>
5955 extern int des_debug;
5956
5957 int main() {
5958
5959 des_debug = 1;
5960
5961 ; return 0; }
5962 EOF
5963 if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5964   rm -rf conftest*
5965   ol_cv_var_des_debug=yes
5966 else
5967   echo "configure: failed program was:" >&5
5968   cat conftest.$ac_ext >&5
5969   rm -rf conftest*
5970   ol_cv_var_des_debug=no
5971 fi
5972 rm -f conftest*
5973                                                                 LIBS="$save_LIBS"
5974                         
5975 fi
5976
5977 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5978
5979                         if test $ol_cv_var_des_debug = yes ; then
5980                                 cat >> confdefs.h <<\EOF
5981 #define HAVE_DES_DEBUG 1
5982 EOF
5983
5984                         fi
5985
5986                         LIBS="$save_LIBS"
5987                 fi
5988         fi
5989 fi
5990
5991 if test $ol_link_krb5 = yes ; then
5992         ol_with_kerberos=found
5993 fi
5994
5995 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
5996         -o $ol_with_kerberos = kth ; then
5997
5998         for ac_hdr in krb.h des.h krb-archaeology.h 
5999 do
6000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6002 echo "configure:6003: checking for $ac_hdr" >&5
6003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6004   echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6006   cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 #include <$ac_hdr>
6010 EOF
6011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6012 { (eval echo configure:6013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6014 if test -z "$ac_err"; then
6015   rm -rf conftest*
6016   eval "ac_cv_header_$ac_safe=yes"
6017 else
6018   echo "$ac_err" >&5
6019   echo "configure: failed program was:" >&5
6020   cat conftest.$ac_ext >&5
6021   rm -rf conftest*
6022   eval "ac_cv_header_$ac_safe=no"
6023 fi
6024 rm -f conftest*
6025 fi
6026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6027   echo "$ac_t""yes" 1>&6
6028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6029   cat >> confdefs.h <<EOF
6030 #define $ac_tr_hdr 1
6031 EOF
6032  
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036 done
6037
6038
6039         if test $ac_cv_header_krb_h = yes ; then
6040                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6041 echo "configure:6042: checking for main in -lkrb" >&5
6042 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6044   echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046   ac_save_LIBS="$LIBS"
6047 LIBS="-lkrb -ldes $LIBS"
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051
6052 int main() {
6053 main()
6054 ; return 0; }
6055 EOF
6056 if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6057   rm -rf conftest*
6058   eval "ac_cv_lib_$ac_lib_var=yes"
6059 else
6060   echo "configure: failed program was:" >&5
6061   cat conftest.$ac_ext >&5
6062   rm -rf conftest*
6063   eval "ac_cv_lib_$ac_lib_var=no"
6064 fi
6065 rm -f conftest*
6066 LIBS="$ac_save_LIBS"
6067
6068 fi
6069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071   have_k4=yes
6072 else
6073   echo "$ac_t""no" 1>&6
6074 have_k4=no
6075 fi
6076
6077
6078                 if test $have_k4 = yes ; then
6079                         ol_with_kerberos=found
6080                         ol_link_krb4=yes
6081
6082                         cat >> confdefs.h <<\EOF
6083 #define HAVE_KRB4 1
6084 EOF
6085
6086
6087                         KRB4_LIBS="-lkrb -ldes"
6088
6089                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6090                                 cat >> confdefs.h <<\EOF
6091 #define HAVE_KTH_KERBEROS 1
6092 EOF
6093
6094                         fi
6095                 fi
6096         fi
6097 fi
6098
6099 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6100         ol_link_kpasswd=yes;
6101 fi
6102
6103 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6104         cat >> confdefs.h <<\EOF
6105 #define HAVE_KERBEROS 1
6106 EOF
6107
6108
6109 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6110         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6111 fi
6112
6113 ol_link_tls=no
6114 if test $ol_with_tls != no ; then
6115         
6116         for ac_hdr in openssl/ssl.h ssl.h
6117 do
6118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6119 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6120 echo "configure:6121: checking for $ac_hdr" >&5
6121 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6122   echo $ac_n "(cached) $ac_c" 1>&6
6123 else
6124   cat > conftest.$ac_ext <<EOF
6125 #line 6126 "configure"
6126 #include "confdefs.h"
6127 #include <$ac_hdr>
6128 EOF
6129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6130 { (eval echo configure:6131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6132 if test -z "$ac_err"; then
6133   rm -rf conftest*
6134   eval "ac_cv_header_$ac_safe=yes"
6135 else
6136   echo "$ac_err" >&5
6137   echo "configure: failed program was:" >&5
6138   cat conftest.$ac_ext >&5
6139   rm -rf conftest*
6140   eval "ac_cv_header_$ac_safe=no"
6141 fi
6142 rm -f conftest*
6143 fi
6144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6145   echo "$ac_t""yes" 1>&6
6146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6147   cat >> confdefs.h <<EOF
6148 #define $ac_tr_hdr 1
6149 EOF
6150  
6151 else
6152   echo "$ac_t""no" 1>&6
6153 fi
6154 done
6155
6156         
6157         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6158                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6159 echo "configure:6160: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6160 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6162   echo $ac_n "(cached) $ac_c" 1>&6
6163 else
6164   ac_save_LIBS="$LIBS"
6165 LIBS="-lssl -lcrypto $LIBS"
6166 cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169 /* Override any gcc2 internal prototype to avoid an error.  */
6170 /* We use char because int might match the return type of a gcc2
6171     builtin and then its argument prototype would still apply.  */
6172 char SSLeay_add_ssl_algorithms();
6173
6174 int main() {
6175 SSLeay_add_ssl_algorithms()
6176 ; return 0; }
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179   rm -rf conftest*
6180   eval "ac_cv_lib_$ac_lib_var=yes"
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -rf conftest*
6185   eval "ac_cv_lib_$ac_lib_var=no"
6186 fi
6187 rm -f conftest*
6188 LIBS="$ac_save_LIBS"
6189
6190 fi
6191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6192   echo "$ac_t""yes" 1>&6
6193   have_ssleay=yes
6194                         need_rsaref=no
6195 else
6196   echo "$ac_t""no" 1>&6
6197 have_ssleay=no
6198 fi
6199
6200                         
6201                 if test $have_ssleay = no ; then
6202                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6203 echo "configure:6204: checking for SSL_library_init in -lssl" >&5
6204 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6205 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6206   echo $ac_n "(cached) $ac_c" 1>&6
6207 else
6208   ac_save_LIBS="$LIBS"
6209 LIBS="-lssl -lcrypto $LIBS"
6210 cat > conftest.$ac_ext <<EOF
6211 #line 6212 "configure"
6212 #include "confdefs.h"
6213 /* Override any gcc2 internal prototype to avoid an error.  */
6214 /* We use char because int might match the return type of a gcc2
6215     builtin and then its argument prototype would still apply.  */
6216 char SSL_library_init();
6217
6218 int main() {
6219 SSL_library_init()
6220 ; return 0; }
6221 EOF
6222 if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6223   rm -rf conftest*
6224   eval "ac_cv_lib_$ac_lib_var=yes"
6225 else
6226   echo "configure: failed program was:" >&5
6227   cat conftest.$ac_ext >&5
6228   rm -rf conftest*
6229   eval "ac_cv_lib_$ac_lib_var=no"
6230 fi
6231 rm -f conftest*
6232 LIBS="$ac_save_LIBS"
6233
6234 fi
6235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6236   echo "$ac_t""yes" 1>&6
6237   have_ssleay=yes
6238                                 need_rsaref=no
6239 else
6240   echo "$ac_t""no" 1>&6
6241 have_ssleay=no
6242 fi
6243
6244                 fi
6245
6246                 if test $have_ssleay = no ; then
6247                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6248 echo "configure:6249: checking for ssl3_accept in -lssl" >&5
6249 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6251   echo $ac_n "(cached) $ac_c" 1>&6
6252 else
6253   ac_save_LIBS="$LIBS"
6254 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6255 cat > conftest.$ac_ext <<EOF
6256 #line 6257 "configure"
6257 #include "confdefs.h"
6258 /* Override any gcc2 internal prototype to avoid an error.  */
6259 /* We use char because int might match the return type of a gcc2
6260     builtin and then its argument prototype would still apply.  */
6261 char ssl3_accept();
6262
6263 int main() {
6264 ssl3_accept()
6265 ; return 0; }
6266 EOF
6267 if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6268   rm -rf conftest*
6269   eval "ac_cv_lib_$ac_lib_var=yes"
6270 else
6271   echo "configure: failed program was:" >&5
6272   cat conftest.$ac_ext >&5
6273   rm -rf conftest*
6274   eval "ac_cv_lib_$ac_lib_var=no"
6275 fi
6276 rm -f conftest*
6277 LIBS="$ac_save_LIBS"
6278
6279 fi
6280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6281   echo "$ac_t""yes" 1>&6
6282   have_ssleay=yes
6283                                 need_rsaref=yes
6284 else
6285   echo "$ac_t""no" 1>&6
6286 have_ssleay=no
6287 fi
6288
6289                 fi
6290
6291                 if test $have_ssleay = yes ; then
6292                         ol_with_tls=found
6293                         ol_link_tls=yes
6294
6295                         cat >> confdefs.h <<\EOF
6296 #define HAVE_SSLEAY 1
6297 EOF
6298
6299
6300                         if test $need_rsaref = yes; then
6301                                 cat >> confdefs.h <<\EOF
6302 #define HAVE_RSAREF 1
6303 EOF
6304
6305
6306                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6307                         else
6308                                 TLS_LIBS="-lssl -lcrypto"
6309                         fi
6310                 fi
6311         fi
6312 fi
6313
6314 if test $ol_link_tls = yes ; then
6315         cat >> confdefs.h <<\EOF
6316 #define HAVE_TLS 1
6317 EOF
6318
6319 fi      
6320
6321 for ac_func in \
6322         ctime_r                 \
6323         gethostbyname_r gethostbyaddr_r \
6324
6325 do
6326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6327 echo "configure:6328: checking for $ac_func" >&5
6328 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6329   echo $ac_n "(cached) $ac_c" 1>&6
6330 else
6331   cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334 /* System header to define __stub macros and hopefully few prototypes,
6335     which can conflict with char $ac_func(); below.  */
6336 #include <assert.h>
6337 /* Override any gcc2 internal prototype to avoid an error.  */
6338 /* We use char because int might match the return type of a gcc2
6339     builtin and then its argument prototype would still apply.  */
6340 char $ac_func();
6341 char (*f)();
6342
6343 int main() {
6344
6345 /* The GNU C library defines this for functions which it implements
6346     to always fail with ENOSYS.  Some functions are actually named
6347     something starting with __ and the normal name is an alias.  */
6348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6349 choke me
6350 #else
6351 f = $ac_func;
6352 #endif
6353
6354 ; return 0; }
6355 EOF
6356 if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6357   rm -rf conftest*
6358   eval "ac_cv_func_$ac_func=yes"
6359 else
6360   echo "configure: failed program was:" >&5
6361   cat conftest.$ac_ext >&5
6362   rm -rf conftest*
6363   eval "ac_cv_func_$ac_func=no"
6364 fi
6365 rm -f conftest*
6366 fi
6367
6368 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6369   echo "$ac_t""yes" 1>&6
6370     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6371   cat >> confdefs.h <<EOF
6372 #define $ac_tr_func 1
6373 EOF
6374  
6375 else
6376   echo "$ac_t""no" 1>&6
6377 fi
6378 done
6379
6380
6381 if test "$ac_cv_func_ctime_r" = no ; then
6382         ol_cv_func_ctime_r_nargs=0
6383 else
6384         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6385 echo "configure:6386: checking number of arguments of ctime_r" >&5
6386 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6387   echo $ac_n "(cached) $ac_c" 1>&6
6388 else
6389   cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6392 #include <time.h>
6393 int main() {
6394 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6395 ; return 0; }
6396 EOF
6397 if { (eval echo configure:6398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6398   rm -rf conftest*
6399   ol_cv_func_ctime_r_nargs3=yes
6400 else
6401   echo "configure: failed program was:" >&5
6402   cat conftest.$ac_ext >&5
6403   rm -rf conftest*
6404   ol_cv_func_ctime_r_nargs3=no
6405 fi
6406 rm -f conftest*
6407
6408         cat > conftest.$ac_ext <<EOF
6409 #line 6410 "configure"
6410 #include "confdefs.h"
6411 #include <time.h>
6412 int main() {
6413 time_t ti; char *buffer; ctime_r(&ti,buffer);
6414 ; return 0; }
6415 EOF
6416 if { (eval echo configure:6417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6417   rm -rf conftest*
6418   ol_cv_func_ctime_r_nargs2=yes
6419 else
6420   echo "configure: failed program was:" >&5
6421   cat conftest.$ac_ext >&5
6422   rm -rf conftest*
6423   ol_cv_func_ctime_r_nargs2=no
6424 fi
6425 rm -f conftest*
6426
6427         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6428                 $ol_cv_func_ctime_r_nargs2 = no ; then
6429
6430                 ol_cv_func_ctime_r_nargs=3
6431
6432         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6433                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6434
6435                 ol_cv_func_ctime_r_nargs=2
6436
6437         else
6438                 ol_cv_func_ctime_r_nargs=0
6439         fi
6440   
6441 fi
6442
6443 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6444
6445   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6446         cat >> confdefs.h <<EOF
6447 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6448 EOF
6449
6450   fi
6451
6452 fi
6453
6454 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6455         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6456 echo "configure:6457: checking number of arguments of gethostbyname_r" >&5
6457 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6458   echo $ac_n "(cached) $ac_c" 1>&6
6459 else
6460   cat > conftest.$ac_ext <<EOF
6461 #line 6462 "configure"
6462 #include "confdefs.h"
6463 #include <sys/types.h>
6464 #include <sys/socket.h>
6465 #include <netinet/in.h>
6466 #include <netdb.h>
6467 #define BUFSIZE (sizeof(struct hostent)+10)
6468 int main() {
6469 struct hostent hent; char buffer[BUFSIZE];
6470                 int bufsize=BUFSIZE;int h_errno;
6471                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6472                         buffer, bufsize, &h_errno);
6473 ; return 0; }
6474 EOF
6475 if { (eval echo configure:6476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6476   rm -rf conftest*
6477   ol_cv_func_gethostbyname_r_nargs5=yes
6478 else
6479   echo "configure: failed program was:" >&5
6480   cat conftest.$ac_ext >&5
6481   rm -rf conftest*
6482   ol_cv_func_gethostbyname_r_nargs5=no
6483 fi
6484 rm -f conftest*
6485
6486         cat > conftest.$ac_ext <<EOF
6487 #line 6488 "configure"
6488 #include "confdefs.h"
6489 #include <sys/types.h>
6490 #include <sys/socket.h>
6491 #include <netinet/in.h>
6492 #include <netdb.h>
6493 #define BUFSIZE (sizeof(struct hostent)+10)
6494 int main() {
6495 struct hostent hent;struct hostent *rhent;
6496                 char buffer[BUFSIZE];
6497                 int bufsize=BUFSIZE;int h_errno;
6498                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6499                         &rhent, &h_errno);
6500 ; return 0; }
6501 EOF
6502 if { (eval echo configure:6503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6503   rm -rf conftest*
6504   ol_cv_func_gethostbyname_r_nargs6=yes
6505 else
6506   echo "configure: failed program was:" >&5
6507   cat conftest.$ac_ext >&5
6508   rm -rf conftest*
6509   ol_cv_func_gethostbyname_r_nargs6=no
6510 fi
6511 rm -f conftest*
6512
6513         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6514                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6515
6516                 ol_cv_func_gethostbyname_r_nargs=5
6517
6518         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6519                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6520
6521                 ol_cv_func_gethostbyname_r_nargs=6
6522
6523         else
6524                 ol_cv_func_gethostbyname_r_nargs=0
6525         fi
6526   
6527 fi
6528
6529 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6530   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6531         cat >> confdefs.h <<EOF
6532 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6533 EOF
6534
6535   fi
6536
6537 else
6538         ol_cv_func_gethostbyname_r_nargs=0
6539 fi
6540  
6541 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6542         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6543 echo "configure:6544: checking number of arguments of gethostbyaddr_r" >&5
6544 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6545   echo $ac_n "(cached) $ac_c" 1>&6
6546 else
6547   cat > conftest.$ac_ext <<EOF
6548 #line 6549 "configure"
6549 #include "confdefs.h"
6550 #include <sys/types.h>
6551 #include <sys/socket.h>
6552 #include <netinet/in.h>
6553 #include <netdb.h>
6554 #define BUFSIZE (sizeof(struct hostent)+10)
6555 int main() {
6556 struct hostent hent; char buffer[BUFSIZE]; 
6557             struct in_addr add;
6558             size_t alen=sizeof(struct in_addr);
6559             int bufsize=BUFSIZE;int h_errno;
6560                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6561                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6562 ; return 0; }
6563 EOF
6564 if { (eval echo configure:6565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6565   rm -rf conftest*
6566   ol_cv_func_gethostbyaddr_r_nargs7=yes
6567 else
6568   echo "configure: failed program was:" >&5
6569   cat conftest.$ac_ext >&5
6570   rm -rf conftest*
6571   ol_cv_func_gethostbyaddr_r_nargs7=no
6572 fi
6573 rm -f conftest*
6574
6575         cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578 #include <sys/types.h>
6579 #include <sys/socket.h>
6580 #include <netinet/in.h>
6581 #include <netdb.h>
6582 #define BUFSIZE (sizeof(struct hostent)+10)
6583 int main() {
6584 struct hostent hent;
6585                 struct hostent *rhent; char buffer[BUFSIZE]; 
6586                 struct in_addr add;
6587                 size_t alen=sizeof(struct in_addr);
6588                 int bufsize=BUFSIZE;int h_errno;
6589                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6590                         alen, AF_INET, &hent, buffer, bufsize, 
6591                         &rhent, &h_errno);
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6595   rm -rf conftest*
6596   ol_cv_func_gethostbyaddr_r_nargs8=yes
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   ol_cv_func_gethostbyaddr_r_nargs8=no
6602 fi
6603 rm -f conftest*
6604
6605         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6606                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6607
6608                 ol_cv_func_gethostbyaddr_r_nargs=7
6609
6610         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6611                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6612
6613                 ol_cv_func_gethostbyaddr_r_nargs=8
6614
6615         else
6616                 ol_cv_func_gethostbyaddr_r_nargs=0
6617         fi
6618   
6619 fi
6620
6621 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6622   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6623     cat >> confdefs.h <<EOF
6624 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6625 EOF
6626
6627   fi
6628
6629 else
6630         ol_cv_func_gethostbyaddr_r_nargs=0
6631 fi
6632
6633 if test "$ac_cv_func_ctime_r" = yes \
6634         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6635         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6636         -a "$ac_cv_func_gethostbyname_r" = yes \
6637         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6638         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6639         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6640         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6641         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6642         ; then
6643  
6644         cat >> confdefs.h <<\EOF
6645 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6646 EOF
6647
6648 fi
6649
6650 ol_link_threads=no
6651
6652 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6653         -o $ol_with_threads = nt ; then
6654
6655         
6656         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6657 echo "configure:6658: checking for NT Threads" >&5
6658 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6659   echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661   
6662                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6663 echo "configure:6664: checking for _beginthread" >&5
6664 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 /* System header to define __stub macros and hopefully few prototypes,
6671     which can conflict with char _beginthread(); below.  */
6672 #include <assert.h>
6673 /* Override any gcc2 internal prototype to avoid an error.  */
6674 /* We use char because int might match the return type of a gcc2
6675     builtin and then its argument prototype would still apply.  */
6676 char _beginthread();
6677 char (*f)();
6678
6679 int main() {
6680
6681 /* The GNU C library defines this for functions which it implements
6682     to always fail with ENOSYS.  Some functions are actually named
6683     something starting with __ and the normal name is an alias.  */
6684 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6685 choke me
6686 #else
6687 f = _beginthread;
6688 #endif
6689
6690 ; return 0; }
6691 EOF
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6693   rm -rf conftest*
6694   eval "ac_cv_func__beginthread=yes"
6695 else
6696   echo "configure: failed program was:" >&5
6697   cat conftest.$ac_ext >&5
6698   rm -rf conftest*
6699   eval "ac_cv_func__beginthread=no"
6700 fi
6701 rm -f conftest*
6702 fi
6703
6704 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6705   echo "$ac_t""yes" 1>&6
6706   ol_cv_nt_threads=yes
6707 else
6708   echo "$ac_t""no" 1>&6
6709 ol_cv_nt_threads=no
6710 fi
6711
6712         
6713 fi
6714
6715 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6716
6717         if test $ol_cv_nt_threads = yes ; then
6718                 cat >> confdefs.h <<\EOF
6719 #define HAVE_NT_THREADS 1
6720 EOF
6721
6722         fi
6723
6724
6725         if test "$ol_cv_nt_threads" = yes ; then
6726         ol_link_threads=nt
6727         ol_with_threads=found
6728         ol_with_yielding_select=yes
6729
6730                 cat >> confdefs.h <<\EOF
6731 #define HAVE_NT_SERVICE_MANAGER 1
6732 EOF
6733
6734                 cat >> confdefs.h <<\EOF
6735 #define HAVE_NT_EVENT_LOG 1
6736 EOF
6737
6738         fi
6739
6740         if test $ol_with_threads = nt ; then
6741                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6742         fi
6743 fi
6744
6745 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6746         -o $ol_with_threads = posix ; then
6747
6748         for ac_hdr in pthread.h
6749 do
6750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6752 echo "configure:6753: checking for $ac_hdr" >&5
6753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6754   echo $ac_n "(cached) $ac_c" 1>&6
6755 else
6756   cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6759 #include <$ac_hdr>
6760 EOF
6761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6762 { (eval echo configure:6763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6764 if test -z "$ac_err"; then
6765   rm -rf conftest*
6766   eval "ac_cv_header_$ac_safe=yes"
6767 else
6768   echo "$ac_err" >&5
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   eval "ac_cv_header_$ac_safe=no"
6773 fi
6774 rm -f conftest*
6775 fi
6776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6777   echo "$ac_t""yes" 1>&6
6778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6779   cat >> confdefs.h <<EOF
6780 #define $ac_tr_hdr 1
6781 EOF
6782  
6783 else
6784   echo "$ac_t""no" 1>&6
6785 fi
6786 done
6787
6788
6789         if test $ac_cv_header_pthread_h = yes ; then
6790                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6791 echo "configure:6792: checking POSIX thread version" >&5
6792 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6793   echo $ac_n "(cached) $ac_c" 1>&6
6794 else
6795   
6796         cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799
6800 #               include <pthread.h>
6801                 /* this check could be improved */
6802 #               ifdef PTHREAD_ONCE_INIT
6803                         pthread_version_final;
6804 #               endif
6805         
6806 EOF
6807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6808   egrep "pthread_version_final" >/dev/null 2>&1; then
6809   rm -rf conftest*
6810   ol_pthread_final=yes
6811 else
6812   rm -rf conftest*
6813   ol_pthread_final=no
6814 fi
6815 rm -f conftest*
6816
6817
6818         cat > conftest.$ac_ext <<EOF
6819 #line 6820 "configure"
6820 #include "confdefs.h"
6821
6822 #               include <pthread.h>
6823                 /* this check could be improved */
6824 #               ifdef pthread_once_init
6825                         pthread_version_draft4;
6826 #               endif
6827         
6828 EOF
6829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6830   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6831   rm -rf conftest*
6832   ol_pthread_draft4=yes
6833 else
6834   rm -rf conftest*
6835   ol_pthread_draft4=no
6836 fi
6837 rm -f conftest*
6838
6839
6840         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6841                 ol_cv_pthread_version=final
6842         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6843                 ol_cv_pthread_version=draft4
6844         else
6845                 ol_cv_pthread_version=unknown
6846         fi
6847
6848 fi
6849
6850 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6851
6852
6853                 if test $ol_cv_pthread_version = final ; then
6854                         cat >> confdefs.h <<\EOF
6855 #define HAVE_PTHREADS_FINAL 1
6856 EOF
6857
6858                 elif test $ol_cv_pthread_version = draft4 ; then
6859                         cat >> confdefs.h <<\EOF
6860 #define HAVE_PTHREADS_D4 1
6861 EOF
6862
6863                 else
6864                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6865                 fi
6866
6867                 # consider threads found
6868                 ol_with_threads=found
6869
6870                 
6871         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6872 echo "configure:6873: checking for LinuxThreads pthread.h" >&5
6873 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6874   echo $ac_n "(cached) $ac_c" 1>&6
6875 else
6876   cat > conftest.$ac_ext <<EOF
6877 #line 6878 "configure"
6878 #include "confdefs.h"
6879 #include <pthread.h>
6880 EOF
6881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6882   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6883   rm -rf conftest*
6884   ol_cv_header_linux_threads=yes
6885 else
6886   rm -rf conftest*
6887   ol_cv_header_linux_threads=no
6888 fi
6889 rm -f conftest*
6890
6891                 
6892 fi
6893
6894 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6895         if test $ol_cv_header_linux_threads = yes; then
6896                 cat >> confdefs.h <<\EOF
6897 #define HAVE_LINUX_THREADS 1
6898 EOF
6899
6900         fi
6901
6902                 
6903         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6904 echo "configure:6905: checking for GNU Pth pthread.h" >&5
6905 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6906   echo $ac_n "(cached) $ac_c" 1>&6
6907 else
6908   cat > conftest.$ac_ext <<EOF
6909 #line 6910 "configure"
6910 #include "confdefs.h"
6911 #include <pthread.h>
6912 #ifdef _POSIX_THREAD_IS_GNU_PTH
6913         __gnu_pth__;
6914 #endif
6915
6916 EOF
6917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6918   egrep "__gnu_pth__" >/dev/null 2>&1; then
6919   rm -rf conftest*
6920   ol_cv_header_gnu_pth_pthread_h=yes
6921 else
6922   rm -rf conftest*
6923   ol_cv_header_gnu_pth_pthread_h=no
6924 fi
6925 rm -f conftest*
6926
6927                 
6928 fi
6929
6930 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6931
6932
6933                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6934                         for ac_hdr in sched.h
6935 do
6936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6938 echo "configure:6939: checking for $ac_hdr" >&5
6939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6940   echo $ac_n "(cached) $ac_c" 1>&6
6941 else
6942   cat > conftest.$ac_ext <<EOF
6943 #line 6944 "configure"
6944 #include "confdefs.h"
6945 #include <$ac_hdr>
6946 EOF
6947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6948 { (eval echo configure:6949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6950 if test -z "$ac_err"; then
6951   rm -rf conftest*
6952   eval "ac_cv_header_$ac_safe=yes"
6953 else
6954   echo "$ac_err" >&5
6955   echo "configure: failed program was:" >&5
6956   cat conftest.$ac_ext >&5
6957   rm -rf conftest*
6958   eval "ac_cv_header_$ac_safe=no"
6959 fi
6960 rm -f conftest*
6961 fi
6962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6963   echo "$ac_t""yes" 1>&6
6964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6965   cat >> confdefs.h <<EOF
6966 #define $ac_tr_hdr 1
6967 EOF
6968  
6969 else
6970   echo "$ac_t""no" 1>&6
6971 fi
6972 done
6973
6974                 fi
6975
6976                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6977                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6978 echo "configure:6979: checking for pthread_create in default libraries" >&5
6979 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   
6983                 if test "$cross_compiling" = yes; then
6984   cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987 /* pthread test headers */
6988 #include <pthread.h>
6989 #ifndef NULL
6990 #define NULL (void*)0
6991 #endif
6992
6993 static void *task(p)
6994         void *p;
6995 {
6996         return (void *) (p == NULL);
6997 }
6998
6999 int main() {
7000
7001         /* pthread test function */
7002         pthread_t t;
7003         int status;
7004 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7005         /* This system (e.g. AIX) defaults detached; must override */
7006         pthread_attr_t attr;
7007
7008         status = pthread_attr_init(&attr);
7009         if( status ) exit( status );
7010
7011         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7012         if( status ) exit( status );
7013
7014 #define ATTR    &attr
7015 #else
7016 #if HAVE_PTHREADS_D4
7017 #define ATTR    pthread_attr_default
7018 #else
7019 #define ATTR    NULL
7020 #endif
7021 #endif
7022         /* make sure pthread_create() isn't just a stub */
7023         status = pthread_create(&t, ATTR, task, NULL);
7024         if( status ) exit( status );
7025
7026         /* make sure pthread_detach() isn't just a stub */
7027 #if HAVE_PTHREADS_D4
7028         status = pthread_detach( &t );
7029 #else
7030         status = pthread_detach( t );
7031 #endif
7032
7033 #ifdef HAVE_LINUX_THREADS
7034         pthread_kill_other_threads_np();
7035 #endif
7036
7037         exit( status );
7038
7039 ; return 0; }
7040 EOF
7041 if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7042   rm -rf conftest*
7043   ol_cv_pthread_create=yes
7044 else
7045   echo "configure: failed program was:" >&5
7046   cat conftest.$ac_ext >&5
7047   rm -rf conftest*
7048   ol_cv_pthread_create=no
7049 fi
7050 rm -f conftest*
7051 else
7052   cat > conftest.$ac_ext <<EOF
7053 #line 7054 "configure"
7054 #include "confdefs.h"
7055 /* pthread test headers */
7056 #include <pthread.h>
7057 #ifndef NULL
7058 #define NULL (void*)0
7059 #endif
7060
7061 static void *task(p)
7062         void *p;
7063 {
7064         return (void *) (p == NULL);
7065 }
7066
7067
7068 int main(argc, argv)
7069         int argc;
7070         char **argv;
7071 {
7072
7073         /* pthread test function */
7074         pthread_t t;
7075         int status;
7076 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7077         /* This system (e.g. AIX) defaults detached; must override */
7078         pthread_attr_t attr;
7079
7080         status = pthread_attr_init(&attr);
7081         if( status ) exit( status );
7082
7083         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7084         if( status ) exit( status );
7085
7086 #define ATTR    &attr
7087 #else
7088 #if HAVE_PTHREADS_D4
7089 #define ATTR    pthread_attr_default
7090 #else
7091 #define ATTR    NULL
7092 #endif
7093 #endif
7094         /* make sure pthread_create() isn't just a stub */
7095         status = pthread_create(&t, ATTR, task, NULL);
7096         if( status ) exit( status );
7097
7098         /* make sure pthread_detach() isn't just a stub */
7099 #if HAVE_PTHREADS_D4
7100         status = pthread_detach( &t );
7101 #else
7102         status = pthread_detach( t );
7103 #endif
7104
7105 #ifdef HAVE_LINUX_THREADS
7106         pthread_kill_other_threads_np();
7107 #endif
7108
7109         exit( status );
7110
7111 }
7112
7113 EOF
7114 if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7115 then
7116   ol_cv_pthread_create=yes
7117 else
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -fr conftest*
7121   ol_cv_pthread_create=no
7122 fi
7123 rm -fr conftest*
7124 fi
7125
7126 fi
7127
7128 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7129
7130                 if test $ol_cv_pthread_create != no ; then
7131                         ol_link_threads=posix
7132                         ol_link_pthreads=""
7133                 fi
7134                 
7135                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7136 if test "$ol_link_threads" = no ; then
7137         # try -kthread
7138         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7139 echo "configure:7140: checking for pthread link with -kthread" >&5
7140 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7141   echo $ac_n "(cached) $ac_c" 1>&6
7142 else
7143   
7144                 # save the flags
7145                 ol_LIBS="$LIBS"
7146                 LIBS="-kthread $LIBS"
7147
7148                 if test "$cross_compiling" = yes; then
7149   cat > conftest.$ac_ext <<EOF
7150 #line 7151 "configure"
7151 #include "confdefs.h"
7152 /* pthread test headers */
7153 #include <pthread.h>
7154 #ifndef NULL
7155 #define NULL (void*)0
7156 #endif
7157
7158 static void *task(p)
7159         void *p;
7160 {
7161         return (void *) (p == NULL);
7162 }
7163
7164 int main() {
7165
7166         /* pthread test function */
7167         pthread_t t;
7168         int status;
7169 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7170         /* This system (e.g. AIX) defaults detached; must override */
7171         pthread_attr_t attr;
7172
7173         status = pthread_attr_init(&attr);
7174         if( status ) exit( status );
7175
7176         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7177         if( status ) exit( status );
7178
7179 #define ATTR    &attr
7180 #else
7181 #if HAVE_PTHREADS_D4
7182 #define ATTR    pthread_attr_default
7183 #else
7184 #define ATTR    NULL
7185 #endif
7186 #endif
7187         /* make sure pthread_create() isn't just a stub */
7188         status = pthread_create(&t, ATTR, task, NULL);
7189         if( status ) exit( status );
7190
7191         /* make sure pthread_detach() isn't just a stub */
7192 #if HAVE_PTHREADS_D4
7193         status = pthread_detach( &t );
7194 #else
7195         status = pthread_detach( t );
7196 #endif
7197
7198 #ifdef HAVE_LINUX_THREADS
7199         pthread_kill_other_threads_np();
7200 #endif
7201
7202         exit( status );
7203
7204 ; return 0; }
7205 EOF
7206 if { (eval echo configure:7207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7207   rm -rf conftest*
7208   ol_cv_pthread_kthread=yes
7209 else
7210   echo "configure: failed program was:" >&5
7211   cat conftest.$ac_ext >&5
7212   rm -rf conftest*
7213   ol_cv_pthread_kthread=no
7214 fi
7215 rm -f conftest*
7216 else
7217   cat > conftest.$ac_ext <<EOF
7218 #line 7219 "configure"
7219 #include "confdefs.h"
7220 /* pthread test headers */
7221 #include <pthread.h>
7222 #ifndef NULL
7223 #define NULL (void*)0
7224 #endif
7225
7226 static void *task(p)
7227         void *p;
7228 {
7229         return (void *) (p == NULL);
7230 }
7231
7232
7233 int main(argc, argv)
7234         int argc;
7235         char **argv;
7236 {
7237
7238         /* pthread test function */
7239         pthread_t t;
7240         int status;
7241 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7242         /* This system (e.g. AIX) defaults detached; must override */
7243         pthread_attr_t attr;
7244
7245         status = pthread_attr_init(&attr);
7246         if( status ) exit( status );
7247
7248         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7249         if( status ) exit( status );
7250
7251 #define ATTR    &attr
7252 #else
7253 #if HAVE_PTHREADS_D4
7254 #define ATTR    pthread_attr_default
7255 #else
7256 #define ATTR    NULL
7257 #endif
7258 #endif
7259         /* make sure pthread_create() isn't just a stub */
7260         status = pthread_create(&t, ATTR, task, NULL);
7261         if( status ) exit( status );
7262
7263         /* make sure pthread_detach() isn't just a stub */
7264 #if HAVE_PTHREADS_D4
7265         status = pthread_detach( &t );
7266 #else
7267         status = pthread_detach( t );
7268 #endif
7269
7270 #ifdef HAVE_LINUX_THREADS
7271         pthread_kill_other_threads_np();
7272 #endif
7273
7274         exit( status );
7275
7276 }
7277
7278 EOF
7279 if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7280 then
7281   ol_cv_pthread_kthread=yes
7282 else
7283   echo "configure: failed program was:" >&5
7284   cat conftest.$ac_ext >&5
7285   rm -fr conftest*
7286   ol_cv_pthread_kthread=no
7287 fi
7288 rm -fr conftest*
7289 fi
7290
7291
7292                 # restore the LIBS
7293                 LIBS="$ol_LIBS"
7294         
7295 fi
7296
7297 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7298
7299         if test $ol_cv_pthread_kthread = yes ; then
7300                 ol_link_pthreads="-kthread"
7301                 ol_link_threads=posix
7302         fi
7303 fi
7304
7305                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7306 if test "$ol_link_threads" = no ; then
7307         # try -pthread
7308         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7309 echo "configure:7310: checking for pthread link with -pthread" >&5
7310 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7311   echo $ac_n "(cached) $ac_c" 1>&6
7312 else
7313   
7314                 # save the flags
7315                 ol_LIBS="$LIBS"
7316                 LIBS="-pthread $LIBS"
7317
7318                 if test "$cross_compiling" = yes; then
7319   cat > conftest.$ac_ext <<EOF
7320 #line 7321 "configure"
7321 #include "confdefs.h"
7322 /* pthread test headers */
7323 #include <pthread.h>
7324 #ifndef NULL
7325 #define NULL (void*)0
7326 #endif
7327
7328 static void *task(p)
7329         void *p;
7330 {
7331         return (void *) (p == NULL);
7332 }
7333
7334 int main() {
7335
7336         /* pthread test function */
7337         pthread_t t;
7338         int status;
7339 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7340         /* This system (e.g. AIX) defaults detached; must override */
7341         pthread_attr_t attr;
7342
7343         status = pthread_attr_init(&attr);
7344         if( status ) exit( status );
7345
7346         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7347         if( status ) exit( status );
7348
7349 #define ATTR    &attr
7350 #else
7351 #if HAVE_PTHREADS_D4
7352 #define ATTR    pthread_attr_default
7353 #else
7354 #define ATTR    NULL
7355 #endif
7356 #endif
7357         /* make sure pthread_create() isn't just a stub */
7358         status = pthread_create(&t, ATTR, task, NULL);
7359         if( status ) exit( status );
7360
7361         /* make sure pthread_detach() isn't just a stub */
7362 #if HAVE_PTHREADS_D4
7363         status = pthread_detach( &t );
7364 #else
7365         status = pthread_detach( t );
7366 #endif
7367
7368 #ifdef HAVE_LINUX_THREADS
7369         pthread_kill_other_threads_np();
7370 #endif
7371
7372         exit( status );
7373
7374 ; return 0; }
7375 EOF
7376 if { (eval echo configure:7377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7377   rm -rf conftest*
7378   ol_cv_pthread_pthread=yes
7379 else
7380   echo "configure: failed program was:" >&5
7381   cat conftest.$ac_ext >&5
7382   rm -rf conftest*
7383   ol_cv_pthread_pthread=no
7384 fi
7385 rm -f conftest*
7386 else
7387   cat > conftest.$ac_ext <<EOF
7388 #line 7389 "configure"
7389 #include "confdefs.h"
7390 /* pthread test headers */
7391 #include <pthread.h>
7392 #ifndef NULL
7393 #define NULL (void*)0
7394 #endif
7395
7396 static void *task(p)
7397         void *p;
7398 {
7399         return (void *) (p == NULL);
7400 }
7401
7402
7403 int main(argc, argv)
7404         int argc;
7405         char **argv;
7406 {
7407
7408         /* pthread test function */
7409         pthread_t t;
7410         int status;
7411 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7412         /* This system (e.g. AIX) defaults detached; must override */
7413         pthread_attr_t attr;
7414
7415         status = pthread_attr_init(&attr);
7416         if( status ) exit( status );
7417
7418         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7419         if( status ) exit( status );
7420
7421 #define ATTR    &attr
7422 #else
7423 #if HAVE_PTHREADS_D4
7424 #define ATTR    pthread_attr_default
7425 #else
7426 #define ATTR    NULL
7427 #endif
7428 #endif
7429         /* make sure pthread_create() isn't just a stub */
7430         status = pthread_create(&t, ATTR, task, NULL);
7431         if( status ) exit( status );
7432
7433         /* make sure pthread_detach() isn't just a stub */
7434 #if HAVE_PTHREADS_D4
7435         status = pthread_detach( &t );
7436 #else
7437         status = pthread_detach( t );
7438 #endif
7439
7440 #ifdef HAVE_LINUX_THREADS
7441         pthread_kill_other_threads_np();
7442 #endif
7443
7444         exit( status );
7445
7446 }
7447
7448 EOF
7449 if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7450 then
7451   ol_cv_pthread_pthread=yes
7452 else
7453   echo "configure: failed program was:" >&5
7454   cat conftest.$ac_ext >&5
7455   rm -fr conftest*
7456   ol_cv_pthread_pthread=no
7457 fi
7458 rm -fr conftest*
7459 fi
7460
7461
7462                 # restore the LIBS
7463                 LIBS="$ol_LIBS"
7464         
7465 fi
7466
7467 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7468
7469         if test $ol_cv_pthread_pthread = yes ; then
7470                 ol_link_pthreads="-pthread"
7471                 ol_link_threads=posix
7472         fi
7473 fi
7474
7475                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7476 if test "$ol_link_threads" = no ; then
7477         # try -pthreads
7478         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7479 echo "configure:7480: checking for pthread link with -pthreads" >&5
7480 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7481   echo $ac_n "(cached) $ac_c" 1>&6
7482 else
7483   
7484                 # save the flags
7485                 ol_LIBS="$LIBS"
7486                 LIBS="-pthreads $LIBS"
7487
7488                 if test "$cross_compiling" = yes; then
7489   cat > conftest.$ac_ext <<EOF
7490 #line 7491 "configure"
7491 #include "confdefs.h"
7492 /* pthread test headers */
7493 #include <pthread.h>
7494 #ifndef NULL
7495 #define NULL (void*)0
7496 #endif
7497
7498 static void *task(p)
7499         void *p;
7500 {
7501         return (void *) (p == NULL);
7502 }
7503
7504 int main() {
7505
7506         /* pthread test function */
7507         pthread_t t;
7508         int status;
7509 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7510         /* This system (e.g. AIX) defaults detached; must override */
7511         pthread_attr_t attr;
7512
7513         status = pthread_attr_init(&attr);
7514         if( status ) exit( status );
7515
7516         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7517         if( status ) exit( status );
7518
7519 #define ATTR    &attr
7520 #else
7521 #if HAVE_PTHREADS_D4
7522 #define ATTR    pthread_attr_default
7523 #else
7524 #define ATTR    NULL
7525 #endif
7526 #endif
7527         /* make sure pthread_create() isn't just a stub */
7528         status = pthread_create(&t, ATTR, task, NULL);
7529         if( status ) exit( status );
7530
7531         /* make sure pthread_detach() isn't just a stub */
7532 #if HAVE_PTHREADS_D4
7533         status = pthread_detach( &t );
7534 #else
7535         status = pthread_detach( t );
7536 #endif
7537
7538 #ifdef HAVE_LINUX_THREADS
7539         pthread_kill_other_threads_np();
7540 #endif
7541
7542         exit( status );
7543
7544 ; return 0; }
7545 EOF
7546 if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7547   rm -rf conftest*
7548   ol_cv_pthread_pthreads=yes
7549 else
7550   echo "configure: failed program was:" >&5
7551   cat conftest.$ac_ext >&5
7552   rm -rf conftest*
7553   ol_cv_pthread_pthreads=no
7554 fi
7555 rm -f conftest*
7556 else
7557   cat > conftest.$ac_ext <<EOF
7558 #line 7559 "configure"
7559 #include "confdefs.h"
7560 /* pthread test headers */
7561 #include <pthread.h>
7562 #ifndef NULL
7563 #define NULL (void*)0
7564 #endif
7565
7566 static void *task(p)
7567         void *p;
7568 {
7569         return (void *) (p == NULL);
7570 }
7571
7572
7573 int main(argc, argv)
7574         int argc;
7575         char **argv;
7576 {
7577
7578         /* pthread test function */
7579         pthread_t t;
7580         int status;
7581 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7582         /* This system (e.g. AIX) defaults detached; must override */
7583         pthread_attr_t attr;
7584
7585         status = pthread_attr_init(&attr);
7586         if( status ) exit( status );
7587
7588         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7589         if( status ) exit( status );
7590
7591 #define ATTR    &attr
7592 #else
7593 #if HAVE_PTHREADS_D4
7594 #define ATTR    pthread_attr_default
7595 #else
7596 #define ATTR    NULL
7597 #endif
7598 #endif
7599         /* make sure pthread_create() isn't just a stub */
7600         status = pthread_create(&t, ATTR, task, NULL);
7601         if( status ) exit( status );
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_pthreads=yes
7622 else
7623   echo "configure: failed program was:" >&5
7624   cat conftest.$ac_ext >&5
7625   rm -fr conftest*
7626   ol_cv_pthread_pthreads=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_pthreads" 1>&6
7638
7639         if test $ol_cv_pthread_pthreads = yes ; then
7640                 ol_link_pthreads="-pthreads"
7641                 ol_link_threads=posix
7642         fi
7643 fi
7644
7645                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7646 if test "$ol_link_threads" = no ; then
7647         # try -mthreads
7648         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7649 echo "configure:7650: checking for pthread link with -mthreads" >&5
7650 if eval "test \"\${ol_cv_pthread_mthreads+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="-mthreads $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 #else
7691 #if HAVE_PTHREADS_D4
7692 #define ATTR    pthread_attr_default
7693 #else
7694 #define ATTR    NULL
7695 #endif
7696 #endif
7697         /* make sure pthread_create() isn't just a stub */
7698         status = pthread_create(&t, ATTR, task, NULL);
7699         if( status ) exit( status );
7700
7701         /* make sure pthread_detach() isn't just a stub */
7702 #if HAVE_PTHREADS_D4
7703         status = pthread_detach( &t );
7704 #else
7705         status = pthread_detach( t );
7706 #endif
7707
7708 #ifdef HAVE_LINUX_THREADS
7709         pthread_kill_other_threads_np();
7710 #endif
7711
7712         exit( status );
7713
7714 ; return 0; }
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7717   rm -rf conftest*
7718   ol_cv_pthread_mthreads=yes
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -rf conftest*
7723   ol_cv_pthread_mthreads=no
7724 fi
7725 rm -f conftest*
7726 else
7727   cat > conftest.$ac_ext <<EOF
7728 #line 7729 "configure"
7729 #include "confdefs.h"
7730 /* pthread test headers */
7731 #include <pthread.h>
7732 #ifndef NULL
7733 #define NULL (void*)0
7734 #endif
7735
7736 static void *task(p)
7737         void *p;
7738 {
7739         return (void *) (p == NULL);
7740 }
7741
7742
7743 int main(argc, argv)
7744         int argc;
7745         char **argv;
7746 {
7747
7748         /* pthread test function */
7749         pthread_t t;
7750         int status;
7751 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7752         /* This system (e.g. AIX) defaults detached; must override */
7753         pthread_attr_t attr;
7754
7755         status = pthread_attr_init(&attr);
7756         if( status ) exit( status );
7757
7758         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7759         if( status ) exit( status );
7760
7761 #define ATTR    &attr
7762 #else
7763 #if HAVE_PTHREADS_D4
7764 #define ATTR    pthread_attr_default
7765 #else
7766 #define ATTR    NULL
7767 #endif
7768 #endif
7769         /* make sure pthread_create() isn't just a stub */
7770         status = pthread_create(&t, ATTR, task, NULL);
7771         if( status ) exit( status );
7772
7773         /* make sure pthread_detach() isn't just a stub */
7774 #if HAVE_PTHREADS_D4
7775         status = pthread_detach( &t );
7776 #else
7777         status = pthread_detach( t );
7778 #endif
7779
7780 #ifdef HAVE_LINUX_THREADS
7781         pthread_kill_other_threads_np();
7782 #endif
7783
7784         exit( status );
7785
7786 }
7787
7788 EOF
7789 if { (eval echo configure:7790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7790 then
7791   ol_cv_pthread_mthreads=yes
7792 else
7793   echo "configure: failed program was:" >&5
7794   cat conftest.$ac_ext >&5
7795   rm -fr conftest*
7796   ol_cv_pthread_mthreads=no
7797 fi
7798 rm -fr conftest*
7799 fi
7800
7801
7802                 # restore the LIBS
7803                 LIBS="$ol_LIBS"
7804         
7805 fi
7806
7807 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7808
7809         if test $ol_cv_pthread_mthreads = yes ; then
7810                 ol_link_pthreads="-mthreads"
7811                 ol_link_threads=posix
7812         fi
7813 fi
7814
7815                 # Pthread try link: -thread (ol_cv_pthread_thread)
7816 if test "$ol_link_threads" = no ; then
7817         # try -thread
7818         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7819 echo "configure:7820: checking for pthread link with -thread" >&5
7820 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7821   echo $ac_n "(cached) $ac_c" 1>&6
7822 else
7823   
7824                 # save the flags
7825                 ol_LIBS="$LIBS"
7826                 LIBS="-thread $LIBS"
7827
7828                 if test "$cross_compiling" = yes; then
7829   cat > conftest.$ac_ext <<EOF
7830 #line 7831 "configure"
7831 #include "confdefs.h"
7832 /* pthread test headers */
7833 #include <pthread.h>
7834 #ifndef NULL
7835 #define NULL (void*)0
7836 #endif
7837
7838 static void *task(p)
7839         void *p;
7840 {
7841         return (void *) (p == NULL);
7842 }
7843
7844 int main() {
7845
7846         /* pthread test function */
7847         pthread_t t;
7848         int status;
7849 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7850         /* This system (e.g. AIX) defaults detached; must override */
7851         pthread_attr_t attr;
7852
7853         status = pthread_attr_init(&attr);
7854         if( status ) exit( status );
7855
7856         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7857         if( status ) exit( status );
7858
7859 #define ATTR    &attr
7860 #else
7861 #if HAVE_PTHREADS_D4
7862 #define ATTR    pthread_attr_default
7863 #else
7864 #define ATTR    NULL
7865 #endif
7866 #endif
7867         /* make sure pthread_create() isn't just a stub */
7868         status = pthread_create(&t, ATTR, task, NULL);
7869         if( status ) exit( status );
7870
7871         /* make sure pthread_detach() isn't just a stub */
7872 #if HAVE_PTHREADS_D4
7873         status = pthread_detach( &t );
7874 #else
7875         status = pthread_detach( t );
7876 #endif
7877
7878 #ifdef HAVE_LINUX_THREADS
7879         pthread_kill_other_threads_np();
7880 #endif
7881
7882         exit( status );
7883
7884 ; return 0; }
7885 EOF
7886 if { (eval echo configure:7887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7887   rm -rf conftest*
7888   ol_cv_pthread_thread=yes
7889 else
7890   echo "configure: failed program was:" >&5
7891   cat conftest.$ac_ext >&5
7892   rm -rf conftest*
7893   ol_cv_pthread_thread=no
7894 fi
7895 rm -f conftest*
7896 else
7897   cat > conftest.$ac_ext <<EOF
7898 #line 7899 "configure"
7899 #include "confdefs.h"
7900 /* pthread test headers */
7901 #include <pthread.h>
7902 #ifndef NULL
7903 #define NULL (void*)0
7904 #endif
7905
7906 static void *task(p)
7907         void *p;
7908 {
7909         return (void *) (p == NULL);
7910 }
7911
7912
7913 int main(argc, argv)
7914         int argc;
7915         char **argv;
7916 {
7917
7918         /* pthread test function */
7919         pthread_t t;
7920         int status;
7921 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7922         /* This system (e.g. AIX) defaults detached; must override */
7923         pthread_attr_t attr;
7924
7925         status = pthread_attr_init(&attr);
7926         if( status ) exit( status );
7927
7928         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7929         if( status ) exit( status );
7930
7931 #define ATTR    &attr
7932 #else
7933 #if HAVE_PTHREADS_D4
7934 #define ATTR    pthread_attr_default
7935 #else
7936 #define ATTR    NULL
7937 #endif
7938 #endif
7939         /* make sure pthread_create() isn't just a stub */
7940         status = pthread_create(&t, ATTR, task, NULL);
7941         if( status ) exit( status );
7942
7943         /* make sure pthread_detach() isn't just a stub */
7944 #if HAVE_PTHREADS_D4
7945         status = pthread_detach( &t );
7946 #else
7947         status = pthread_detach( t );
7948 #endif
7949
7950 #ifdef HAVE_LINUX_THREADS
7951         pthread_kill_other_threads_np();
7952 #endif
7953
7954         exit( status );
7955
7956 }
7957
7958 EOF
7959 if { (eval echo configure:7960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7960 then
7961   ol_cv_pthread_thread=yes
7962 else
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -fr conftest*
7966   ol_cv_pthread_thread=no
7967 fi
7968 rm -fr conftest*
7969 fi
7970
7971
7972                 # restore the LIBS
7973                 LIBS="$ol_LIBS"
7974         
7975 fi
7976
7977 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7978
7979         if test $ol_cv_pthread_thread = yes ; then
7980                 ol_link_pthreads="-thread"
7981                 ol_link_threads=posix
7982         fi
7983 fi
7984
7985
7986                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7987 if test "$ol_link_threads" = no ; then
7988         # try -lpthread -lmach -lexc -lc_r
7989         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7990 echo "configure:7991: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7991 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7992   echo $ac_n "(cached) $ac_c" 1>&6
7993 else
7994   
7995                 # save the flags
7996                 ol_LIBS="$LIBS"
7997                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7998
7999                 if test "$cross_compiling" = yes; then
8000   cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003 /* pthread test headers */
8004 #include <pthread.h>
8005 #ifndef NULL
8006 #define NULL (void*)0
8007 #endif
8008
8009 static void *task(p)
8010         void *p;
8011 {
8012         return (void *) (p == NULL);
8013 }
8014
8015 int main() {
8016
8017         /* pthread test function */
8018         pthread_t t;
8019         int status;
8020 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8021         /* This system (e.g. AIX) defaults detached; must override */
8022         pthread_attr_t attr;
8023
8024         status = pthread_attr_init(&attr);
8025         if( status ) exit( status );
8026
8027         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8028         if( status ) exit( status );
8029
8030 #define ATTR    &attr
8031 #else
8032 #if HAVE_PTHREADS_D4
8033 #define ATTR    pthread_attr_default
8034 #else
8035 #define ATTR    NULL
8036 #endif
8037 #endif
8038         /* make sure pthread_create() isn't just a stub */
8039         status = pthread_create(&t, ATTR, task, NULL);
8040         if( status ) exit( status );
8041
8042         /* make sure pthread_detach() isn't just a stub */
8043 #if HAVE_PTHREADS_D4
8044         status = pthread_detach( &t );
8045 #else
8046         status = pthread_detach( t );
8047 #endif
8048
8049 #ifdef HAVE_LINUX_THREADS
8050         pthread_kill_other_threads_np();
8051 #endif
8052
8053         exit( status );
8054
8055 ; return 0; }
8056 EOF
8057 if { (eval echo configure:8058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8058   rm -rf conftest*
8059   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8060 else
8061   echo "configure: failed program was:" >&5
8062   cat conftest.$ac_ext >&5
8063   rm -rf conftest*
8064   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8065 fi
8066 rm -f conftest*
8067 else
8068   cat > conftest.$ac_ext <<EOF
8069 #line 8070 "configure"
8070 #include "confdefs.h"
8071 /* pthread test headers */
8072 #include <pthread.h>
8073 #ifndef NULL
8074 #define NULL (void*)0
8075 #endif
8076
8077 static void *task(p)
8078         void *p;
8079 {
8080         return (void *) (p == NULL);
8081 }
8082
8083
8084 int main(argc, argv)
8085         int argc;
8086         char **argv;
8087 {
8088
8089         /* pthread test function */
8090         pthread_t t;
8091         int status;
8092 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8093         /* This system (e.g. AIX) defaults detached; must override */
8094         pthread_attr_t attr;
8095
8096         status = pthread_attr_init(&attr);
8097         if( status ) exit( status );
8098
8099         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8100         if( status ) exit( status );
8101
8102 #define ATTR    &attr
8103 #else
8104 #if HAVE_PTHREADS_D4
8105 #define ATTR    pthread_attr_default
8106 #else
8107 #define ATTR    NULL
8108 #endif
8109 #endif
8110         /* make sure pthread_create() isn't just a stub */
8111         status = pthread_create(&t, ATTR, task, NULL);
8112         if( status ) exit( status );
8113
8114         /* make sure pthread_detach() isn't just a stub */
8115 #if HAVE_PTHREADS_D4
8116         status = pthread_detach( &t );
8117 #else
8118         status = pthread_detach( t );
8119 #endif
8120
8121 #ifdef HAVE_LINUX_THREADS
8122         pthread_kill_other_threads_np();
8123 #endif
8124
8125         exit( status );
8126
8127 }
8128
8129 EOF
8130 if { (eval echo configure:8131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8131 then
8132   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8133 else
8134   echo "configure: failed program was:" >&5
8135   cat conftest.$ac_ext >&5
8136   rm -fr conftest*
8137   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8138 fi
8139 rm -fr conftest*
8140 fi
8141
8142
8143                 # restore the LIBS
8144                 LIBS="$ol_LIBS"
8145         
8146 fi
8147
8148 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8149
8150         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8151                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8152                 ol_link_threads=posix
8153         fi
8154 fi
8155
8156                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8157 if test "$ol_link_threads" = no ; then
8158         # try -lpthread -lmach -lexc
8159         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8160 echo "configure:8161: checking for pthread link with -lpthread -lmach -lexc" >&5
8161 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8162   echo $ac_n "(cached) $ac_c" 1>&6
8163 else
8164   
8165                 # save the flags
8166                 ol_LIBS="$LIBS"
8167                 LIBS="-lpthread -lmach -lexc $LIBS"
8168
8169                 if test "$cross_compiling" = yes; then
8170   cat > conftest.$ac_ext <<EOF
8171 #line 8172 "configure"
8172 #include "confdefs.h"
8173 /* pthread test headers */
8174 #include <pthread.h>
8175 #ifndef NULL
8176 #define NULL (void*)0
8177 #endif
8178
8179 static void *task(p)
8180         void *p;
8181 {
8182         return (void *) (p == NULL);
8183 }
8184
8185 int main() {
8186
8187         /* pthread test function */
8188         pthread_t t;
8189         int status;
8190 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8191         /* This system (e.g. AIX) defaults detached; must override */
8192         pthread_attr_t attr;
8193
8194         status = pthread_attr_init(&attr);
8195         if( status ) exit( status );
8196
8197         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8198         if( status ) exit( status );
8199
8200 #define ATTR    &attr
8201 #else
8202 #if HAVE_PTHREADS_D4
8203 #define ATTR    pthread_attr_default
8204 #else
8205 #define ATTR    NULL
8206 #endif
8207 #endif
8208         /* make sure pthread_create() isn't just a stub */
8209         status = pthread_create(&t, ATTR, task, NULL);
8210         if( status ) exit( status );
8211
8212         /* make sure pthread_detach() isn't just a stub */
8213 #if HAVE_PTHREADS_D4
8214         status = pthread_detach( &t );
8215 #else
8216         status = pthread_detach( t );
8217 #endif
8218
8219 #ifdef HAVE_LINUX_THREADS
8220         pthread_kill_other_threads_np();
8221 #endif
8222
8223         exit( status );
8224
8225 ; return 0; }
8226 EOF
8227 if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8228   rm -rf conftest*
8229   ol_cv_pthread_lpthread_lmach_lexc=yes
8230 else
8231   echo "configure: failed program was:" >&5
8232   cat conftest.$ac_ext >&5
8233   rm -rf conftest*
8234   ol_cv_pthread_lpthread_lmach_lexc=no
8235 fi
8236 rm -f conftest*
8237 else
8238   cat > conftest.$ac_ext <<EOF
8239 #line 8240 "configure"
8240 #include "confdefs.h"
8241 /* pthread test headers */
8242 #include <pthread.h>
8243 #ifndef NULL
8244 #define NULL (void*)0
8245 #endif
8246
8247 static void *task(p)
8248         void *p;
8249 {
8250         return (void *) (p == NULL);
8251 }
8252
8253
8254 int main(argc, argv)
8255         int argc;
8256         char **argv;
8257 {
8258
8259         /* pthread test function */
8260         pthread_t t;
8261         int status;
8262 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8263         /* This system (e.g. AIX) defaults detached; must override */
8264         pthread_attr_t attr;
8265
8266         status = pthread_attr_init(&attr);
8267         if( status ) exit( status );
8268
8269         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8270         if( status ) exit( status );
8271
8272 #define ATTR    &attr
8273 #else
8274 #if HAVE_PTHREADS_D4
8275 #define ATTR    pthread_attr_default
8276 #else
8277 #define ATTR    NULL
8278 #endif
8279 #endif
8280         /* make sure pthread_create() isn't just a stub */
8281         status = pthread_create(&t, ATTR, task, NULL);
8282         if( status ) exit( status );
8283
8284         /* make sure pthread_detach() isn't just a stub */
8285 #if HAVE_PTHREADS_D4
8286         status = pthread_detach( &t );
8287 #else
8288         status = pthread_detach( t );
8289 #endif
8290
8291 #ifdef HAVE_LINUX_THREADS
8292         pthread_kill_other_threads_np();
8293 #endif
8294
8295         exit( status );
8296
8297 }
8298
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8301 then
8302   ol_cv_pthread_lpthread_lmach_lexc=yes
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -fr conftest*
8307   ol_cv_pthread_lpthread_lmach_lexc=no
8308 fi
8309 rm -fr conftest*
8310 fi
8311
8312
8313                 # restore the LIBS
8314                 LIBS="$ol_LIBS"
8315         
8316 fi
8317
8318 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8319
8320         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8321                 ol_link_pthreads="-lpthread -lmach -lexc"
8322                 ol_link_threads=posix
8323         fi
8324 fi
8325
8326
8327                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8328 if test "$ol_link_threads" = no ; then
8329         # try -lpthread -Wl,-woff,85
8330         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8331 echo "configure:8332: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8332 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   
8336                 # save the flags
8337                 ol_LIBS="$LIBS"
8338                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8339
8340                 if test "$cross_compiling" = yes; then
8341   cat > conftest.$ac_ext <<EOF
8342 #line 8343 "configure"
8343 #include "confdefs.h"
8344 /* pthread test headers */
8345 #include <pthread.h>
8346 #ifndef NULL
8347 #define NULL (void*)0
8348 #endif
8349
8350 static void *task(p)
8351         void *p;
8352 {
8353         return (void *) (p == NULL);
8354 }
8355
8356 int main() {
8357
8358         /* pthread test function */
8359         pthread_t t;
8360         int status;
8361 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8362         /* This system (e.g. AIX) defaults detached; must override */
8363         pthread_attr_t attr;
8364
8365         status = pthread_attr_init(&attr);
8366         if( status ) exit( status );
8367
8368         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8369         if( status ) exit( status );
8370
8371 #define ATTR    &attr
8372 #else
8373 #if HAVE_PTHREADS_D4
8374 #define ATTR    pthread_attr_default
8375 #else
8376 #define ATTR    NULL
8377 #endif
8378 #endif
8379         /* make sure pthread_create() isn't just a stub */
8380         status = pthread_create(&t, ATTR, task, NULL);
8381         if( status ) exit( status );
8382
8383         /* make sure pthread_detach() isn't just a stub */
8384 #if HAVE_PTHREADS_D4
8385         status = pthread_detach( &t );
8386 #else
8387         status = pthread_detach( t );
8388 #endif
8389
8390 #ifdef HAVE_LINUX_THREADS
8391         pthread_kill_other_threads_np();
8392 #endif
8393
8394         exit( status );
8395
8396 ; return 0; }
8397 EOF
8398 if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8399   rm -rf conftest*
8400   ol_cv_pthread_lib_lpthread_woff=yes
8401 else
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   ol_cv_pthread_lib_lpthread_woff=no
8406 fi
8407 rm -f conftest*
8408 else
8409   cat > conftest.$ac_ext <<EOF
8410 #line 8411 "configure"
8411 #include "confdefs.h"
8412 /* pthread test headers */
8413 #include <pthread.h>
8414 #ifndef NULL
8415 #define NULL (void*)0
8416 #endif
8417
8418 static void *task(p)
8419         void *p;
8420 {
8421         return (void *) (p == NULL);
8422 }
8423
8424
8425 int main(argc, argv)
8426         int argc;
8427         char **argv;
8428 {
8429
8430         /* pthread test function */
8431         pthread_t t;
8432         int status;
8433 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8434         /* This system (e.g. AIX) defaults detached; must override */
8435         pthread_attr_t attr;
8436
8437         status = pthread_attr_init(&attr);
8438         if( status ) exit( status );
8439
8440         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8441         if( status ) exit( status );
8442
8443 #define ATTR    &attr
8444 #else
8445 #if HAVE_PTHREADS_D4
8446 #define ATTR    pthread_attr_default
8447 #else
8448 #define ATTR    NULL
8449 #endif
8450 #endif
8451         /* make sure pthread_create() isn't just a stub */
8452         status = pthread_create(&t, ATTR, task, NULL);
8453         if( status ) exit( status );
8454
8455         /* make sure pthread_detach() isn't just a stub */
8456 #if HAVE_PTHREADS_D4
8457         status = pthread_detach( &t );
8458 #else
8459         status = pthread_detach( t );
8460 #endif
8461
8462 #ifdef HAVE_LINUX_THREADS
8463         pthread_kill_other_threads_np();
8464 #endif
8465
8466         exit( status );
8467
8468 }
8469
8470 EOF
8471 if { (eval echo configure:8472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8472 then
8473   ol_cv_pthread_lib_lpthread_woff=yes
8474 else
8475   echo "configure: failed program was:" >&5
8476   cat conftest.$ac_ext >&5
8477   rm -fr conftest*
8478   ol_cv_pthread_lib_lpthread_woff=no
8479 fi
8480 rm -fr conftest*
8481 fi
8482
8483
8484                 # restore the LIBS
8485                 LIBS="$ol_LIBS"
8486         
8487 fi
8488
8489 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8490
8491         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8492                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8493                 ol_link_threads=posix
8494         fi
8495 fi
8496
8497
8498                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8499 if test "$ol_link_threads" = no ; then
8500         # try -lpthread
8501         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8502 echo "configure:8503: checking for pthread link with -lpthread" >&5
8503 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8504   echo $ac_n "(cached) $ac_c" 1>&6
8505 else
8506   
8507                 # save the flags
8508                 ol_LIBS="$LIBS"
8509                 LIBS="-lpthread $LIBS"
8510
8511                 if test "$cross_compiling" = yes; then
8512   cat > conftest.$ac_ext <<EOF
8513 #line 8514 "configure"
8514 #include "confdefs.h"
8515 /* pthread test headers */
8516 #include <pthread.h>
8517 #ifndef NULL
8518 #define NULL (void*)0
8519 #endif
8520
8521 static void *task(p)
8522         void *p;
8523 {
8524         return (void *) (p == NULL);
8525 }
8526
8527 int main() {
8528
8529         /* pthread test function */
8530         pthread_t t;
8531         int status;
8532 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8533         /* This system (e.g. AIX) defaults detached; must override */
8534         pthread_attr_t attr;
8535
8536         status = pthread_attr_init(&attr);
8537         if( status ) exit( status );
8538
8539         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8540         if( status ) exit( status );
8541
8542 #define ATTR    &attr
8543 #else
8544 #if HAVE_PTHREADS_D4
8545 #define ATTR    pthread_attr_default
8546 #else
8547 #define ATTR    NULL
8548 #endif
8549 #endif
8550         /* make sure pthread_create() isn't just a stub */
8551         status = pthread_create(&t, ATTR, task, NULL);
8552         if( status ) exit( status );
8553
8554         /* make sure pthread_detach() isn't just a stub */
8555 #if HAVE_PTHREADS_D4
8556         status = pthread_detach( &t );
8557 #else
8558         status = pthread_detach( t );
8559 #endif
8560
8561 #ifdef HAVE_LINUX_THREADS
8562         pthread_kill_other_threads_np();
8563 #endif
8564
8565         exit( status );
8566
8567 ; return 0; }
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8570   rm -rf conftest*
8571   ol_cv_pthread_lpthread=yes
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -rf conftest*
8576   ol_cv_pthread_lpthread=no
8577 fi
8578 rm -f conftest*
8579 else
8580   cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8583 /* pthread test headers */
8584 #include <pthread.h>
8585 #ifndef NULL
8586 #define NULL (void*)0
8587 #endif
8588
8589 static void *task(p)
8590         void *p;
8591 {
8592         return (void *) (p == NULL);
8593 }
8594
8595
8596 int main(argc, argv)
8597         int argc;
8598         char **argv;
8599 {
8600
8601         /* pthread test function */
8602         pthread_t t;
8603         int status;
8604 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8605         /* This system (e.g. AIX) defaults detached; must override */
8606         pthread_attr_t attr;
8607
8608         status = pthread_attr_init(&attr);
8609         if( status ) exit( status );
8610
8611         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8612         if( status ) exit( status );
8613
8614 #define ATTR    &attr
8615 #else
8616 #if HAVE_PTHREADS_D4
8617 #define ATTR    pthread_attr_default
8618 #else
8619 #define ATTR    NULL
8620 #endif
8621 #endif
8622         /* make sure pthread_create() isn't just a stub */
8623         status = pthread_create(&t, ATTR, task, NULL);
8624         if( status ) exit( status );
8625
8626         /* make sure pthread_detach() isn't just a stub */
8627 #if HAVE_PTHREADS_D4
8628         status = pthread_detach( &t );
8629 #else
8630         status = pthread_detach( t );
8631 #endif
8632
8633 #ifdef HAVE_LINUX_THREADS
8634         pthread_kill_other_threads_np();
8635 #endif
8636
8637         exit( status );
8638
8639 }
8640
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8643 then
8644   ol_cv_pthread_lpthread=yes
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -fr conftest*
8649   ol_cv_pthread_lpthread=no
8650 fi
8651 rm -fr conftest*
8652 fi
8653
8654
8655                 # restore the LIBS
8656                 LIBS="$ol_LIBS"
8657         
8658 fi
8659
8660 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8661
8662         if test $ol_cv_pthread_lpthread = yes ; then
8663                 ol_link_pthreads="-lpthread"
8664                 ol_link_threads=posix
8665         fi
8666 fi
8667
8668                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8669 if test "$ol_link_threads" = no ; then
8670         # try -lc_r
8671         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8672 echo "configure:8673: checking for pthread link with -lc_r" >&5
8673 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8674   echo $ac_n "(cached) $ac_c" 1>&6
8675 else
8676   
8677                 # save the flags
8678                 ol_LIBS="$LIBS"
8679                 LIBS="-lc_r $LIBS"
8680
8681                 if test "$cross_compiling" = yes; then
8682   cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 /* pthread test headers */
8686 #include <pthread.h>
8687 #ifndef NULL
8688 #define NULL (void*)0
8689 #endif
8690
8691 static void *task(p)
8692         void *p;
8693 {
8694         return (void *) (p == NULL);
8695 }
8696
8697 int main() {
8698
8699         /* pthread test function */
8700         pthread_t t;
8701         int status;
8702 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8703         /* This system (e.g. AIX) defaults detached; must override */
8704         pthread_attr_t attr;
8705
8706         status = pthread_attr_init(&attr);
8707         if( status ) exit( status );
8708
8709         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8710         if( status ) exit( status );
8711
8712 #define ATTR    &attr
8713 #else
8714 #if HAVE_PTHREADS_D4
8715 #define ATTR    pthread_attr_default
8716 #else
8717 #define ATTR    NULL
8718 #endif
8719 #endif
8720         /* make sure pthread_create() isn't just a stub */
8721         status = pthread_create(&t, ATTR, task, NULL);
8722         if( status ) exit( status );
8723
8724         /* make sure pthread_detach() isn't just a stub */
8725 #if HAVE_PTHREADS_D4
8726         status = pthread_detach( &t );
8727 #else
8728         status = pthread_detach( t );
8729 #endif
8730
8731 #ifdef HAVE_LINUX_THREADS
8732         pthread_kill_other_threads_np();
8733 #endif
8734
8735         exit( status );
8736
8737 ; return 0; }
8738 EOF
8739 if { (eval echo configure:8740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8740   rm -rf conftest*
8741   ol_cv_pthread_lc_r=yes
8742 else
8743   echo "configure: failed program was:" >&5
8744   cat conftest.$ac_ext >&5
8745   rm -rf conftest*
8746   ol_cv_pthread_lc_r=no
8747 fi
8748 rm -f conftest*
8749 else
8750   cat > conftest.$ac_ext <<EOF
8751 #line 8752 "configure"
8752 #include "confdefs.h"
8753 /* pthread test headers */
8754 #include <pthread.h>
8755 #ifndef NULL
8756 #define NULL (void*)0
8757 #endif
8758
8759 static void *task(p)
8760         void *p;
8761 {
8762         return (void *) (p == NULL);
8763 }
8764
8765
8766 int main(argc, argv)
8767         int argc;
8768         char **argv;
8769 {
8770
8771         /* pthread test function */
8772         pthread_t t;
8773         int status;
8774 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8775         /* This system (e.g. AIX) defaults detached; must override */
8776         pthread_attr_t attr;
8777
8778         status = pthread_attr_init(&attr);
8779         if( status ) exit( status );
8780
8781         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8782         if( status ) exit( status );
8783
8784 #define ATTR    &attr
8785 #else
8786 #if HAVE_PTHREADS_D4
8787 #define ATTR    pthread_attr_default
8788 #else
8789 #define ATTR    NULL
8790 #endif
8791 #endif
8792         /* make sure pthread_create() isn't just a stub */
8793         status = pthread_create(&t, ATTR, task, NULL);
8794         if( status ) exit( status );
8795
8796         /* make sure pthread_detach() isn't just a stub */
8797 #if HAVE_PTHREADS_D4
8798         status = pthread_detach( &t );
8799 #else
8800         status = pthread_detach( t );
8801 #endif
8802
8803 #ifdef HAVE_LINUX_THREADS
8804         pthread_kill_other_threads_np();
8805 #endif
8806
8807         exit( status );
8808
8809 }
8810
8811 EOF
8812 if { (eval echo configure:8813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8813 then
8814   ol_cv_pthread_lc_r=yes
8815 else
8816   echo "configure: failed program was:" >&5
8817   cat conftest.$ac_ext >&5
8818   rm -fr conftest*
8819   ol_cv_pthread_lc_r=no
8820 fi
8821 rm -fr conftest*
8822 fi
8823
8824
8825                 # restore the LIBS
8826                 LIBS="$ol_LIBS"
8827         
8828 fi
8829
8830 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8831
8832         if test $ol_cv_pthread_lc_r = yes ; then
8833                 ol_link_pthreads="-lc_r"
8834                 ol_link_threads=posix
8835         fi
8836 fi
8837
8838
8839                 # Pthread try link: -threads (ol_cv_pthread_threads)
8840 if test "$ol_link_threads" = no ; then
8841         # try -threads
8842         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8843 echo "configure:8844: checking for pthread link with -threads" >&5
8844 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8845   echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847   
8848                 # save the flags
8849                 ol_LIBS="$LIBS"
8850                 LIBS="-threads $LIBS"
8851
8852                 if test "$cross_compiling" = yes; then
8853   cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 /* pthread test headers */
8857 #include <pthread.h>
8858 #ifndef NULL
8859 #define NULL (void*)0
8860 #endif
8861
8862 static void *task(p)
8863         void *p;
8864 {
8865         return (void *) (p == NULL);
8866 }
8867
8868 int main() {
8869
8870         /* pthread test function */
8871         pthread_t t;
8872         int status;
8873 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8874         /* This system (e.g. AIX) defaults detached; must override */
8875         pthread_attr_t attr;
8876
8877         status = pthread_attr_init(&attr);
8878         if( status ) exit( status );
8879
8880         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8881         if( status ) exit( status );
8882
8883 #define ATTR    &attr
8884 #else
8885 #if HAVE_PTHREADS_D4
8886 #define ATTR    pthread_attr_default
8887 #else
8888 #define ATTR    NULL
8889 #endif
8890 #endif
8891         /* make sure pthread_create() isn't just a stub */
8892         status = pthread_create(&t, ATTR, task, NULL);
8893         if( status ) exit( status );
8894
8895         /* make sure pthread_detach() isn't just a stub */
8896 #if HAVE_PTHREADS_D4
8897         status = pthread_detach( &t );
8898 #else
8899         status = pthread_detach( t );
8900 #endif
8901
8902 #ifdef HAVE_LINUX_THREADS
8903         pthread_kill_other_threads_np();
8904 #endif
8905
8906         exit( status );
8907
8908 ; return 0; }
8909 EOF
8910 if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8911   rm -rf conftest*
8912   ol_cv_pthread_threads=yes
8913 else
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -rf conftest*
8917   ol_cv_pthread_threads=no
8918 fi
8919 rm -f conftest*
8920 else
8921   cat > conftest.$ac_ext <<EOF
8922 #line 8923 "configure"
8923 #include "confdefs.h"
8924 /* pthread test headers */
8925 #include <pthread.h>
8926 #ifndef NULL
8927 #define NULL (void*)0
8928 #endif
8929
8930 static void *task(p)
8931         void *p;
8932 {
8933         return (void *) (p == NULL);
8934 }
8935
8936
8937 int main(argc, argv)
8938         int argc;
8939         char **argv;
8940 {
8941
8942         /* pthread test function */
8943         pthread_t t;
8944         int status;
8945 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8946         /* This system (e.g. AIX) defaults detached; must override */
8947         pthread_attr_t attr;
8948
8949         status = pthread_attr_init(&attr);
8950         if( status ) exit( status );
8951
8952         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8953         if( status ) exit( status );
8954
8955 #define ATTR    &attr
8956 #else
8957 #if HAVE_PTHREADS_D4
8958 #define ATTR    pthread_attr_default
8959 #else
8960 #define ATTR    NULL
8961 #endif
8962 #endif
8963         /* make sure pthread_create() isn't just a stub */
8964         status = pthread_create(&t, ATTR, task, NULL);
8965         if( status ) exit( status );
8966
8967         /* make sure pthread_detach() isn't just a stub */
8968 #if HAVE_PTHREADS_D4
8969         status = pthread_detach( &t );
8970 #else
8971         status = pthread_detach( t );
8972 #endif
8973
8974 #ifdef HAVE_LINUX_THREADS
8975         pthread_kill_other_threads_np();
8976 #endif
8977
8978         exit( status );
8979
8980 }
8981
8982 EOF
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8984 then
8985   ol_cv_pthread_threads=yes
8986 else
8987   echo "configure: failed program was:" >&5
8988   cat conftest.$ac_ext >&5
8989   rm -fr conftest*
8990   ol_cv_pthread_threads=no
8991 fi
8992 rm -fr conftest*
8993 fi
8994
8995
8996                 # restore the LIBS
8997                 LIBS="$ol_LIBS"
8998         
8999 fi
9000
9001 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9002
9003         if test $ol_cv_pthread_threads = yes ; then
9004                 ol_link_pthreads="-threads"
9005                 ol_link_threads=posix
9006         fi
9007 fi
9008
9009
9010                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9011 if test "$ol_link_threads" = no ; then
9012         # try -lpthreads -lmach -lexc -lc_r
9013         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9014 echo "configure:9015: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9015 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9016   echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018   
9019                 # save the flags
9020                 ol_LIBS="$LIBS"
9021                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9022
9023                 if test "$cross_compiling" = yes; then
9024   cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027 /* pthread test headers */
9028 #include <pthread.h>
9029 #ifndef NULL
9030 #define NULL (void*)0
9031 #endif
9032
9033 static void *task(p)
9034         void *p;
9035 {
9036         return (void *) (p == NULL);
9037 }
9038
9039 int main() {
9040
9041         /* pthread test function */
9042         pthread_t t;
9043         int status;
9044 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9045         /* This system (e.g. AIX) defaults detached; must override */
9046         pthread_attr_t attr;
9047
9048         status = pthread_attr_init(&attr);
9049         if( status ) exit( status );
9050
9051         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9052         if( status ) exit( status );
9053
9054 #define ATTR    &attr
9055 #else
9056 #if HAVE_PTHREADS_D4
9057 #define ATTR    pthread_attr_default
9058 #else
9059 #define ATTR    NULL
9060 #endif
9061 #endif
9062         /* make sure pthread_create() isn't just a stub */
9063         status = pthread_create(&t, ATTR, task, NULL);
9064         if( status ) exit( status );
9065
9066         /* make sure pthread_detach() isn't just a stub */
9067 #if HAVE_PTHREADS_D4
9068         status = pthread_detach( &t );
9069 #else
9070         status = pthread_detach( t );
9071 #endif
9072
9073 #ifdef HAVE_LINUX_THREADS
9074         pthread_kill_other_threads_np();
9075 #endif
9076
9077         exit( status );
9078
9079 ; return 0; }
9080 EOF
9081 if { (eval echo configure:9082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9082   rm -rf conftest*
9083   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9084 else
9085   echo "configure: failed program was:" >&5
9086   cat conftest.$ac_ext >&5
9087   rm -rf conftest*
9088   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9089 fi
9090 rm -f conftest*
9091 else
9092   cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095 /* pthread test headers */
9096 #include <pthread.h>
9097 #ifndef NULL
9098 #define NULL (void*)0
9099 #endif
9100
9101 static void *task(p)
9102         void *p;
9103 {
9104         return (void *) (p == NULL);
9105 }
9106
9107
9108 int main(argc, argv)
9109         int argc;
9110         char **argv;
9111 {
9112
9113         /* pthread test function */
9114         pthread_t t;
9115         int status;
9116 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9117         /* This system (e.g. AIX) defaults detached; must override */
9118         pthread_attr_t attr;
9119
9120         status = pthread_attr_init(&attr);
9121         if( status ) exit( status );
9122
9123         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9124         if( status ) exit( status );
9125
9126 #define ATTR    &attr
9127 #else
9128 #if HAVE_PTHREADS_D4
9129 #define ATTR    pthread_attr_default
9130 #else
9131 #define ATTR    NULL
9132 #endif
9133 #endif
9134         /* make sure pthread_create() isn't just a stub */
9135         status = pthread_create(&t, ATTR, task, NULL);
9136         if( status ) exit( status );
9137
9138         /* make sure pthread_detach() isn't just a stub */
9139 #if HAVE_PTHREADS_D4
9140         status = pthread_detach( &t );
9141 #else
9142         status = pthread_detach( t );
9143 #endif
9144
9145 #ifdef HAVE_LINUX_THREADS
9146         pthread_kill_other_threads_np();
9147 #endif
9148
9149         exit( status );
9150
9151 }
9152
9153 EOF
9154 if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9155 then
9156   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9157 else
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -fr conftest*
9161   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9162 fi
9163 rm -fr conftest*
9164 fi
9165
9166
9167                 # restore the LIBS
9168                 LIBS="$ol_LIBS"
9169         
9170 fi
9171
9172 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9173
9174         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9175                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9176                 ol_link_threads=posix
9177         fi
9178 fi
9179
9180                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9181 if test "$ol_link_threads" = no ; then
9182         # try -lpthreads -lmach -lexc
9183         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9184 echo "configure:9185: checking for pthread link with -lpthreads -lmach -lexc" >&5
9185 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9186   echo $ac_n "(cached) $ac_c" 1>&6
9187 else
9188   
9189                 # save the flags
9190                 ol_LIBS="$LIBS"
9191                 LIBS="-lpthreads -lmach -lexc $LIBS"
9192
9193                 if test "$cross_compiling" = yes; then
9194   cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 /* pthread test headers */
9198 #include <pthread.h>
9199 #ifndef NULL
9200 #define NULL (void*)0
9201 #endif
9202
9203 static void *task(p)
9204         void *p;
9205 {
9206         return (void *) (p == NULL);
9207 }
9208
9209 int main() {
9210
9211         /* pthread test function */
9212         pthread_t t;
9213         int status;
9214 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9215         /* This system (e.g. AIX) defaults detached; must override */
9216         pthread_attr_t attr;
9217
9218         status = pthread_attr_init(&attr);
9219         if( status ) exit( status );
9220
9221         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9222         if( status ) exit( status );
9223
9224 #define ATTR    &attr
9225 #else
9226 #if HAVE_PTHREADS_D4
9227 #define ATTR    pthread_attr_default
9228 #else
9229 #define ATTR    NULL
9230 #endif
9231 #endif
9232         /* make sure pthread_create() isn't just a stub */
9233         status = pthread_create(&t, ATTR, task, NULL);
9234         if( status ) exit( status );
9235
9236         /* make sure pthread_detach() isn't just a stub */
9237 #if HAVE_PTHREADS_D4
9238         status = pthread_detach( &t );
9239 #else
9240         status = pthread_detach( t );
9241 #endif
9242
9243 #ifdef HAVE_LINUX_THREADS
9244         pthread_kill_other_threads_np();
9245 #endif
9246
9247         exit( status );
9248
9249 ; return 0; }
9250 EOF
9251 if { (eval echo configure:9252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9252   rm -rf conftest*
9253   ol_cv_pthread_lpthreads_lmach_lexc=yes
9254 else
9255   echo "configure: failed program was:" >&5
9256   cat conftest.$ac_ext >&5
9257   rm -rf conftest*
9258   ol_cv_pthread_lpthreads_lmach_lexc=no
9259 fi
9260 rm -f conftest*
9261 else
9262   cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 /* pthread test headers */
9266 #include <pthread.h>
9267 #ifndef NULL
9268 #define NULL (void*)0
9269 #endif
9270
9271 static void *task(p)
9272         void *p;
9273 {
9274         return (void *) (p == NULL);
9275 }
9276
9277
9278 int main(argc, argv)
9279         int argc;
9280         char **argv;
9281 {
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 #else
9298 #if HAVE_PTHREADS_D4
9299 #define ATTR    pthread_attr_default
9300 #else
9301 #define ATTR    NULL
9302 #endif
9303 #endif
9304         /* make sure pthread_create() isn't just a stub */
9305         status = pthread_create(&t, ATTR, task, NULL);
9306         if( status ) exit( status );
9307
9308         /* make sure pthread_detach() isn't just a stub */
9309 #if HAVE_PTHREADS_D4
9310         status = pthread_detach( &t );
9311 #else
9312         status = pthread_detach( t );
9313 #endif
9314
9315 #ifdef HAVE_LINUX_THREADS
9316         pthread_kill_other_threads_np();
9317 #endif
9318
9319         exit( status );
9320
9321 }
9322
9323 EOF
9324 if { (eval echo configure:9325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9325 then
9326   ol_cv_pthread_lpthreads_lmach_lexc=yes
9327 else
9328   echo "configure: failed program was:" >&5
9329   cat conftest.$ac_ext >&5
9330   rm -fr conftest*
9331   ol_cv_pthread_lpthreads_lmach_lexc=no
9332 fi
9333 rm -fr conftest*
9334 fi
9335
9336
9337                 # restore the LIBS
9338                 LIBS="$ol_LIBS"
9339         
9340 fi
9341
9342 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9343
9344         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9345                 ol_link_pthreads="-lpthreads -lmach -lexc"
9346                 ol_link_threads=posix
9347         fi
9348 fi
9349
9350                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9351 if test "$ol_link_threads" = no ; then
9352         # try -lpthreads -lexc
9353         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9354 echo "configure:9355: checking for pthread link with -lpthreads -lexc" >&5
9355 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9356   echo $ac_n "(cached) $ac_c" 1>&6
9357 else
9358   
9359                 # save the flags
9360                 ol_LIBS="$LIBS"
9361                 LIBS="-lpthreads -lexc $LIBS"
9362
9363                 if test "$cross_compiling" = yes; then
9364   cat > conftest.$ac_ext <<EOF
9365 #line 9366 "configure"
9366 #include "confdefs.h"
9367 /* pthread test headers */
9368 #include <pthread.h>
9369 #ifndef NULL
9370 #define NULL (void*)0
9371 #endif
9372
9373 static void *task(p)
9374         void *p;
9375 {
9376         return (void *) (p == NULL);
9377 }
9378
9379 int main() {
9380
9381         /* pthread test function */
9382         pthread_t t;
9383         int status;
9384 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9385         /* This system (e.g. AIX) defaults detached; must override */
9386         pthread_attr_t attr;
9387
9388         status = pthread_attr_init(&attr);
9389         if( status ) exit( status );
9390
9391         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9392         if( status ) exit( status );
9393
9394 #define ATTR    &attr
9395 #else
9396 #if HAVE_PTHREADS_D4
9397 #define ATTR    pthread_attr_default
9398 #else
9399 #define ATTR    NULL
9400 #endif
9401 #endif
9402         /* make sure pthread_create() isn't just a stub */
9403         status = pthread_create(&t, ATTR, task, NULL);
9404         if( status ) exit( status );
9405
9406         /* make sure pthread_detach() isn't just a stub */
9407 #if HAVE_PTHREADS_D4
9408         status = pthread_detach( &t );
9409 #else
9410         status = pthread_detach( t );
9411 #endif
9412
9413 #ifdef HAVE_LINUX_THREADS
9414         pthread_kill_other_threads_np();
9415 #endif
9416
9417         exit( status );
9418
9419 ; return 0; }
9420 EOF
9421 if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9422   rm -rf conftest*
9423   ol_cv_pthread_lpthreads_lexc=yes
9424 else
9425   echo "configure: failed program was:" >&5
9426   cat conftest.$ac_ext >&5
9427   rm -rf conftest*
9428   ol_cv_pthread_lpthreads_lexc=no
9429 fi
9430 rm -f conftest*
9431 else
9432   cat > conftest.$ac_ext <<EOF
9433 #line 9434 "configure"
9434 #include "confdefs.h"
9435 /* pthread test headers */
9436 #include <pthread.h>
9437 #ifndef NULL
9438 #define NULL (void*)0
9439 #endif
9440
9441 static void *task(p)
9442         void *p;
9443 {
9444         return (void *) (p == NULL);
9445 }
9446
9447
9448 int main(argc, argv)
9449         int argc;
9450         char **argv;
9451 {
9452
9453         /* pthread test function */
9454         pthread_t t;
9455         int status;
9456 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9457         /* This system (e.g. AIX) defaults detached; must override */
9458         pthread_attr_t attr;
9459
9460         status = pthread_attr_init(&attr);
9461         if( status ) exit( status );
9462
9463         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9464         if( status ) exit( status );
9465
9466 #define ATTR    &attr
9467 #else
9468 #if HAVE_PTHREADS_D4
9469 #define ATTR    pthread_attr_default
9470 #else
9471 #define ATTR    NULL
9472 #endif
9473 #endif
9474         /* make sure pthread_create() isn't just a stub */
9475         status = pthread_create(&t, ATTR, task, NULL);
9476         if( status ) exit( status );
9477
9478         /* make sure pthread_detach() isn't just a stub */
9479 #if HAVE_PTHREADS_D4
9480         status = pthread_detach( &t );
9481 #else
9482         status = pthread_detach( t );
9483 #endif
9484
9485 #ifdef HAVE_LINUX_THREADS
9486         pthread_kill_other_threads_np();
9487 #endif
9488
9489         exit( status );
9490
9491 }
9492
9493 EOF
9494 if { (eval echo configure:9495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9495 then
9496   ol_cv_pthread_lpthreads_lexc=yes
9497 else
9498   echo "configure: failed program was:" >&5
9499   cat conftest.$ac_ext >&5
9500   rm -fr conftest*
9501   ol_cv_pthread_lpthreads_lexc=no
9502 fi
9503 rm -fr conftest*
9504 fi
9505
9506
9507                 # restore the LIBS
9508                 LIBS="$ol_LIBS"
9509         
9510 fi
9511
9512 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9513
9514         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9515                 ol_link_pthreads="-lpthreads -lexc"
9516                 ol_link_threads=posix
9517         fi
9518 fi
9519
9520
9521                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9522 if test "$ol_link_threads" = no ; then
9523         # try -lpthreads
9524         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9525 echo "configure:9526: checking for pthread link with -lpthreads" >&5
9526 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529   
9530                 # save the flags
9531                 ol_LIBS="$LIBS"
9532                 LIBS="-lpthreads $LIBS"
9533
9534                 if test "$cross_compiling" = yes; then
9535   cat > conftest.$ac_ext <<EOF
9536 #line 9537 "configure"
9537 #include "confdefs.h"
9538 /* pthread test headers */
9539 #include <pthread.h>
9540 #ifndef NULL
9541 #define NULL (void*)0
9542 #endif
9543
9544 static void *task(p)
9545         void *p;
9546 {
9547         return (void *) (p == NULL);
9548 }
9549
9550 int main() {
9551
9552         /* pthread test function */
9553         pthread_t t;
9554         int status;
9555 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9556         /* This system (e.g. AIX) defaults detached; must override */
9557         pthread_attr_t attr;
9558
9559         status = pthread_attr_init(&attr);
9560         if( status ) exit( status );
9561
9562         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9563         if( status ) exit( status );
9564
9565 #define ATTR    &attr
9566 #else
9567 #if HAVE_PTHREADS_D4
9568 #define ATTR    pthread_attr_default
9569 #else
9570 #define ATTR    NULL
9571 #endif
9572 #endif
9573         /* make sure pthread_create() isn't just a stub */
9574         status = pthread_create(&t, ATTR, task, NULL);
9575         if( status ) exit( status );
9576
9577         /* make sure pthread_detach() isn't just a stub */
9578 #if HAVE_PTHREADS_D4
9579         status = pthread_detach( &t );
9580 #else
9581         status = pthread_detach( t );
9582 #endif
9583
9584 #ifdef HAVE_LINUX_THREADS
9585         pthread_kill_other_threads_np();
9586 #endif
9587
9588         exit( status );
9589
9590 ; return 0; }
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9593   rm -rf conftest*
9594   ol_cv_pthread_lib_lpthreads=yes
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   ol_cv_pthread_lib_lpthreads=no
9600 fi
9601 rm -f conftest*
9602 else
9603   cat > conftest.$ac_ext <<EOF
9604 #line 9605 "configure"
9605 #include "confdefs.h"
9606 /* pthread test headers */
9607 #include <pthread.h>
9608 #ifndef NULL
9609 #define NULL (void*)0
9610 #endif
9611
9612 static void *task(p)
9613         void *p;
9614 {
9615         return (void *) (p == NULL);
9616 }
9617
9618
9619 int main(argc, argv)
9620         int argc;
9621         char **argv;
9622 {
9623
9624         /* pthread test function */
9625         pthread_t t;
9626         int status;
9627 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9628         /* This system (e.g. AIX) defaults detached; must override */
9629         pthread_attr_t attr;
9630
9631         status = pthread_attr_init(&attr);
9632         if( status ) exit( status );
9633
9634         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9635         if( status ) exit( status );
9636
9637 #define ATTR    &attr
9638 #else
9639 #if HAVE_PTHREADS_D4
9640 #define ATTR    pthread_attr_default
9641 #else
9642 #define ATTR    NULL
9643 #endif
9644 #endif
9645         /* make sure pthread_create() isn't just a stub */
9646         status = pthread_create(&t, ATTR, task, NULL);
9647         if( status ) exit( status );
9648
9649         /* make sure pthread_detach() isn't just a stub */
9650 #if HAVE_PTHREADS_D4
9651         status = pthread_detach( &t );
9652 #else
9653         status = pthread_detach( t );
9654 #endif
9655
9656 #ifdef HAVE_LINUX_THREADS
9657         pthread_kill_other_threads_np();
9658 #endif
9659
9660         exit( status );
9661
9662 }
9663
9664 EOF
9665 if { (eval echo configure:9666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9666 then
9667   ol_cv_pthread_lib_lpthreads=yes
9668 else
9669   echo "configure: failed program was:" >&5
9670   cat conftest.$ac_ext >&5
9671   rm -fr conftest*
9672   ol_cv_pthread_lib_lpthreads=no
9673 fi
9674 rm -fr conftest*
9675 fi
9676
9677
9678                 # restore the LIBS
9679                 LIBS="$ol_LIBS"
9680         
9681 fi
9682
9683 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9684
9685         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9686                 ol_link_pthreads="-lpthreads"
9687                 ol_link_threads=posix
9688         fi
9689 fi
9690
9691
9692                 if test $ol_link_threads != no ; then
9693                         cat >> confdefs.h <<\EOF
9694 #define HAVE_PTHREADS 1
9695 EOF
9696
9697
9698                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9699
9700                                                 save_CPPFLAGS="$CPPFLAGS"
9701                         save_LIBS="$LIBS"
9702                         LIBS="$LTHREAD_LIBS $LIBS"
9703
9704                                                                                                 for ac_func in sched_yield pthread_yield
9705 do
9706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9707 echo "configure:9708: checking for $ac_func" >&5
9708 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9709   echo $ac_n "(cached) $ac_c" 1>&6
9710 else
9711   cat > conftest.$ac_ext <<EOF
9712 #line 9713 "configure"
9713 #include "confdefs.h"
9714 /* System header to define __stub macros and hopefully few prototypes,
9715     which can conflict with char $ac_func(); below.  */
9716 #include <assert.h>
9717 /* Override any gcc2 internal prototype to avoid an error.  */
9718 /* We use char because int might match the return type of a gcc2
9719     builtin and then its argument prototype would still apply.  */
9720 char $ac_func();
9721 char (*f)();
9722
9723 int main() {
9724
9725 /* The GNU C library defines this for functions which it implements
9726     to always fail with ENOSYS.  Some functions are actually named
9727     something starting with __ and the normal name is an alias.  */
9728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9729 choke me
9730 #else
9731 f = $ac_func;
9732 #endif
9733
9734 ; return 0; }
9735 EOF
9736 if { (eval echo configure:9737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9737   rm -rf conftest*
9738   eval "ac_cv_func_$ac_func=yes"
9739 else
9740   echo "configure: failed program was:" >&5
9741   cat conftest.$ac_ext >&5
9742   rm -rf conftest*
9743   eval "ac_cv_func_$ac_func=no"
9744 fi
9745 rm -f conftest*
9746 fi
9747
9748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9749   echo "$ac_t""yes" 1>&6
9750     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9751   cat >> confdefs.h <<EOF
9752 #define $ac_tr_func 1
9753 EOF
9754  
9755 else
9756   echo "$ac_t""no" 1>&6
9757 fi
9758 done
9759
9760
9761                         if test $ac_cv_func_sched_yield = no -a \
9762                                 $ac_cv_func_pthread_yield = no ; then
9763                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9764 echo "configure:9765: checking for sched_yield in -lrt" >&5
9765 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9767   echo $ac_n "(cached) $ac_c" 1>&6
9768 else
9769   ac_save_LIBS="$LIBS"
9770 LIBS="-lrt  $LIBS"
9771 cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 /* Override any gcc2 internal prototype to avoid an error.  */
9775 /* We use char because int might match the return type of a gcc2
9776     builtin and then its argument prototype would still apply.  */
9777 char sched_yield();
9778
9779 int main() {
9780 sched_yield()
9781 ; return 0; }
9782 EOF
9783 if { (eval echo configure:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9784   rm -rf conftest*
9785   eval "ac_cv_lib_$ac_lib_var=yes"
9786 else
9787   echo "configure: failed program was:" >&5
9788   cat conftest.$ac_ext >&5
9789   rm -rf conftest*
9790   eval "ac_cv_lib_$ac_lib_var=no"
9791 fi
9792 rm -f conftest*
9793 LIBS="$ac_save_LIBS"
9794
9795 fi
9796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9797   echo "$ac_t""yes" 1>&6
9798   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9799                                         cat >> confdefs.h <<\EOF
9800 #define HAVE_SCHED_YIELD 1
9801 EOF
9802
9803                                         ac_cv_func_sched_yield=yes
9804 else
9805   echo "$ac_t""no" 1>&6
9806 ac_cv_func_sched_yield=no
9807 fi
9808
9809                         fi
9810                         if test $ac_cv_func_sched_yield = no -a \
9811                                 $ac_cv_func_pthread_yield = no ; then
9812                                                                                                 for ac_func in thr_yield
9813 do
9814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9815 echo "configure:9816: checking for $ac_func" >&5
9816 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9817   echo $ac_n "(cached) $ac_c" 1>&6
9818 else
9819   cat > conftest.$ac_ext <<EOF
9820 #line 9821 "configure"
9821 #include "confdefs.h"
9822 /* System header to define __stub macros and hopefully few prototypes,
9823     which can conflict with char $ac_func(); below.  */
9824 #include <assert.h>
9825 /* Override any gcc2 internal prototype to avoid an error.  */
9826 /* We use char because int might match the return type of a gcc2
9827     builtin and then its argument prototype would still apply.  */
9828 char $ac_func();
9829 char (*f)();
9830
9831 int main() {
9832
9833 /* The GNU C library defines this for functions which it implements
9834     to always fail with ENOSYS.  Some functions are actually named
9835     something starting with __ and the normal name is an alias.  */
9836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9837 choke me
9838 #else
9839 f = $ac_func;
9840 #endif
9841
9842 ; return 0; }
9843 EOF
9844 if { (eval echo configure:9845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9845   rm -rf conftest*
9846   eval "ac_cv_func_$ac_func=yes"
9847 else
9848   echo "configure: failed program was:" >&5
9849   cat conftest.$ac_ext >&5
9850   rm -rf conftest*
9851   eval "ac_cv_func_$ac_func=no"
9852 fi
9853 rm -f conftest*
9854 fi
9855
9856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9857   echo "$ac_t""yes" 1>&6
9858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9859   cat >> confdefs.h <<EOF
9860 #define $ac_tr_func 1
9861 EOF
9862  
9863 else
9864   echo "$ac_t""no" 1>&6
9865 fi
9866 done
9867
9868                         fi
9869                         if test $ac_cv_func_sched_yield = no -a \
9870                                 $ac_cv_func_pthread_yield = no -a \
9871                                 "$ac_cv_func_thr_yield" = no ; then
9872                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9873                         fi
9874
9875                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9876 do
9877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9878 echo "configure:9879: checking for $ac_func" >&5
9879 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9880   echo $ac_n "(cached) $ac_c" 1>&6
9881 else
9882   cat > conftest.$ac_ext <<EOF
9883 #line 9884 "configure"
9884 #include "confdefs.h"
9885 /* System header to define __stub macros and hopefully few prototypes,
9886     which can conflict with char $ac_func(); below.  */
9887 #include <assert.h>
9888 /* Override any gcc2 internal prototype to avoid an error.  */
9889 /* We use char because int might match the return type of a gcc2
9890     builtin and then its argument prototype would still apply.  */
9891 char $ac_func();
9892 char (*f)();
9893
9894 int main() {
9895
9896 /* The GNU C library defines this for functions which it implements
9897     to always fail with ENOSYS.  Some functions are actually named
9898     something starting with __ and the normal name is an alias.  */
9899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9900 choke me
9901 #else
9902 f = $ac_func;
9903 #endif
9904
9905 ; return 0; }
9906 EOF
9907 if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9908   rm -rf conftest*
9909   eval "ac_cv_func_$ac_func=yes"
9910 else
9911   echo "configure: failed program was:" >&5
9912   cat conftest.$ac_ext >&5
9913   rm -rf conftest*
9914   eval "ac_cv_func_$ac_func=no"
9915 fi
9916 rm -f conftest*
9917 fi
9918
9919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9920   echo "$ac_t""yes" 1>&6
9921     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9922   cat >> confdefs.h <<EOF
9923 #define $ac_tr_func 1
9924 EOF
9925  
9926 else
9927   echo "$ac_t""no" 1>&6
9928 fi
9929 done
9930
9931
9932                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9933 echo "configure:9934: checking for pthread_detach with <pthread.h>" >&5
9934 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9935   echo $ac_n "(cached) $ac_c" 1>&6
9936 else
9937   
9938                                                                 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941
9942 #include <pthread.h>
9943 #ifndef NULL
9944 #define NULL (void*)0
9945 #endif
9946
9947 int main() {
9948 pthread_detach(NULL);
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9952   rm -rf conftest*
9953   ol_cv_func_pthread_detach=yes
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   ol_cv_func_pthread_detach=no
9959 fi
9960 rm -f conftest*
9961                         
9962 fi
9963
9964 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9965
9966                         if test $ol_cv_func_pthread_detach = no ; then
9967                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9968                         fi
9969
9970                         cat >> confdefs.h <<\EOF
9971 #define HAVE_PTHREAD_DETACH 1
9972 EOF
9973
9974
9975                                                 for ac_func in \
9976                                 pthread_setconcurrency \
9977                                 pthread_getconcurrency \
9978                                 thr_setconcurrency \
9979                                 thr_getconcurrency \
9980                         
9981 do
9982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9983 echo "configure:9984: checking for $ac_func" >&5
9984 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 /* System header to define __stub macros and hopefully few prototypes,
9991     which can conflict with char $ac_func(); below.  */
9992 #include <assert.h>
9993 /* Override any gcc2 internal prototype to avoid an error.  */
9994 /* We use char because int might match the return type of a gcc2
9995     builtin and then its argument prototype would still apply.  */
9996 char $ac_func();
9997 char (*f)();
9998
9999 int main() {
10000
10001 /* The GNU C library defines this for functions which it implements
10002     to always fail with ENOSYS.  Some functions are actually named
10003     something starting with __ and the normal name is an alias.  */
10004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10005 choke me
10006 #else
10007 f = $ac_func;
10008 #endif
10009
10010 ; return 0; }
10011 EOF
10012 if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10013   rm -rf conftest*
10014   eval "ac_cv_func_$ac_func=yes"
10015 else
10016   echo "configure: failed program was:" >&5
10017   cat conftest.$ac_ext >&5
10018   rm -rf conftest*
10019   eval "ac_cv_func_$ac_func=no"
10020 fi
10021 rm -f conftest*
10022 fi
10023
10024 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10025   echo "$ac_t""yes" 1>&6
10026     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10027   cat >> confdefs.h <<EOF
10028 #define $ac_tr_func 1
10029 EOF
10030  
10031 else
10032   echo "$ac_t""no" 1>&6
10033 fi
10034 done
10035
10036
10037                         
10038         for ac_func in pthread_kill_other_threads_np
10039 do
10040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10041 echo "configure:10042: checking for $ac_func" >&5
10042 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10043   echo $ac_n "(cached) $ac_c" 1>&6
10044 else
10045   cat > conftest.$ac_ext <<EOF
10046 #line 10047 "configure"
10047 #include "confdefs.h"
10048 /* System header to define __stub macros and hopefully few prototypes,
10049     which can conflict with char $ac_func(); below.  */
10050 #include <assert.h>
10051 /* Override any gcc2 internal prototype to avoid an error.  */
10052 /* We use char because int might match the return type of a gcc2
10053     builtin and then its argument prototype would still apply.  */
10054 char $ac_func();
10055 char (*f)();
10056
10057 int main() {
10058
10059 /* The GNU C library defines this for functions which it implements
10060     to always fail with ENOSYS.  Some functions are actually named
10061     something starting with __ and the normal name is an alias.  */
10062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10063 choke me
10064 #else
10065 f = $ac_func;
10066 #endif
10067
10068 ; return 0; }
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10071   rm -rf conftest*
10072   eval "ac_cv_func_$ac_func=yes"
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   rm -rf conftest*
10077   eval "ac_cv_func_$ac_func=no"
10078 fi
10079 rm -f conftest*
10080 fi
10081
10082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10083   echo "$ac_t""yes" 1>&6
10084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10085   cat >> confdefs.h <<EOF
10086 #define $ac_tr_func 1
10087 EOF
10088  
10089 else
10090   echo "$ac_t""no" 1>&6
10091 fi
10092 done
10093
10094         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10095 echo "configure:10096: checking for LinuxThreads implementation" >&5
10096 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10097   echo $ac_n "(cached) $ac_c" 1>&6
10098 else
10099   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10100 fi
10101
10102 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10103
10104                         
10105         
10106         
10107         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10108 echo "configure:10109: checking for LinuxThreads consistency" >&5
10109 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   
10113                 if test $ol_cv_header_linux_threads = yes -a \
10114                         $ol_cv_sys_linux_threads = yes; then
10115                         ol_cv_linux_threads=yes
10116                 elif test $ol_cv_header_linux_threads = no -a \
10117                         $ol_cv_sys_linux_threads = no; then
10118                         ol_cv_linux_threads=no
10119                 else
10120                         ol_cv_linux_threads=error
10121                 fi
10122         
10123 fi
10124
10125 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10126
10127
10128                         if test $ol_cv_linux_threads = error; then
10129                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10130                         fi
10131
10132                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10133 echo "configure:10134: checking if pthread_create() works" >&5
10134 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10135   echo $ac_n "(cached) $ac_c" 1>&6
10136 else
10137   
10138                         if test "$cross_compiling" = yes; then
10139                                 ol_cv_pthread_create_works=yes
10140 else
10141   cat > conftest.$ac_ext <<EOF
10142 #line 10143 "configure"
10143 #include "confdefs.h"
10144 /* pthread test headers */
10145 #include <pthread.h>
10146 #ifndef NULL
10147 #define NULL (void*)0
10148 #endif
10149
10150 static void *task(p)
10151         void *p;
10152 {
10153         return (void *) (p == NULL);
10154 }
10155
10156
10157 int main(argc, argv)
10158         int argc;
10159         char **argv;
10160 {
10161
10162         /* pthread test function */
10163         pthread_t t;
10164         int status;
10165 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10166         /* This system (e.g. AIX) defaults detached; must override */
10167         pthread_attr_t attr;
10168
10169         status = pthread_attr_init(&attr);
10170         if( status ) exit( status );
10171
10172         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10173         if( status ) exit( status );
10174
10175 #define ATTR    &attr
10176 #else
10177 #if HAVE_PTHREADS_D4
10178 #define ATTR    pthread_attr_default
10179 #else
10180 #define ATTR    NULL
10181 #endif
10182 #endif
10183         /* make sure pthread_create() isn't just a stub */
10184         status = pthread_create(&t, ATTR, task, NULL);
10185         if( status ) exit( status );
10186
10187         /* make sure pthread_detach() isn't just a stub */
10188 #if HAVE_PTHREADS_D4
10189         status = pthread_detach( &t );
10190 #else
10191         status = pthread_detach( t );
10192 #endif
10193
10194 #ifdef HAVE_LINUX_THREADS
10195         pthread_kill_other_threads_np();
10196 #endif
10197
10198         exit( status );
10199
10200 }
10201
10202 EOF
10203 if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10204 then
10205   ol_cv_pthread_create_works=yes
10206 else
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -fr conftest*
10210   ol_cv_pthread_create_works=no
10211 fi
10212 rm -fr conftest*
10213 fi
10214
10215 fi
10216
10217 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10218
10219                         if test $ol_cv_pthread_create_works = no ; then
10220                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10221                         fi
10222
10223                                                 if test $ol_with_yielding_select = auto ; then
10224                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10225 echo "configure:10226: checking if select yields when using pthreads" >&5
10226 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10227   echo $ac_n "(cached) $ac_c" 1>&6
10228 else
10229   
10230                                 if test "$cross_compiling" = yes; then
10231   ol_cv_pthread_select_yields=cross
10232 else
10233   cat > conftest.$ac_ext <<EOF
10234 #line 10235 "configure"
10235 #include "confdefs.h"
10236
10237 #include <sys/types.h>
10238 #include <sys/time.h>
10239 #include <unistd.h>
10240 #include <pthread.h>
10241 #ifndef NULL
10242 #define NULL (void*) 0
10243 #endif
10244
10245 static int fildes[2];
10246
10247 static void *task(p)
10248         void *p;
10249 {
10250         int i;
10251         struct timeval tv;
10252
10253         fd_set rfds;
10254
10255         tv.tv_sec=10;
10256         tv.tv_usec=0;
10257
10258         FD_ZERO(&rfds);
10259         FD_SET(fildes[0], &rfds);
10260
10261         /* we're not interested in any fds */
10262         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10263
10264         if(i < 0) {
10265                 perror("select");
10266                 exit(10);
10267         }
10268
10269         exit(0); /* if we exit here, the select blocked the whole process */
10270 }
10271
10272 int main(argc, argv)
10273         int argc;
10274         char **argv;
10275 {
10276         pthread_t t;
10277
10278         /* create a pipe to select */
10279         if(pipe(&fildes[0])) {
10280                 perror("select");
10281                 exit(1);
10282         }
10283
10284 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10285         (void) pthread_setconcurrency(2);
10286 #else
10287 #ifdef HAVE_THR_SETCONCURRENCY
10288         /* Set Solaris LWP concurrency to 2 */
10289         thr_setconcurrency(2);
10290 #endif
10291 #endif
10292
10293 #if HAVE_PTHREADS_D4
10294         pthread_create(&t, pthread_attr_default, task, NULL);
10295 #else
10296         pthread_create(&t, NULL, task, NULL);
10297 #endif
10298
10299 #if HAVE_SCHED_YIELD
10300         sched_yield();  /* make sure task runs first */
10301 #else
10302 #ifdef HAVE_PTHREAD_YIELD
10303         pthread_yield();        /* make sure task runs first */
10304 #endif
10305 #endif
10306
10307         exit(2);
10308 }
10309 EOF
10310 if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10311 then
10312   ol_cv_pthread_select_yields=no
10313 else
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316   rm -fr conftest*
10317   ol_cv_pthread_select_yields=yes
10318 fi
10319 rm -fr conftest*
10320 fi
10321
10322 fi
10323
10324 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10325
10326                                 if test $ol_cv_pthread_select_yields = cross ; then
10327                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10328                                 fi
10329
10330                                 if test $ol_cv_pthread_select_yields = yes ; then
10331                                         ol_with_yielding_select=yes
10332                                 fi
10333                         fi
10334
10335                                                 CPPFLAGS="$save_CPPFLAGS"
10336                         LIBS="$save_LIBS"
10337                 else
10338                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10339                 fi
10340         fi
10341
10342         if test $ol_with_threads = posix ; then
10343                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10344         fi
10345 fi
10346
10347 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10348         -o $ol_with_threads = mach ; then
10349
10350                 for ac_hdr in mach/cthreads.h
10351 do
10352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10354 echo "configure:10355: checking for $ac_hdr" >&5
10355 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10356   echo $ac_n "(cached) $ac_c" 1>&6
10357 else
10358   cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10361 #include <$ac_hdr>
10362 EOF
10363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10364 { (eval echo configure:10365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10366 if test -z "$ac_err"; then
10367   rm -rf conftest*
10368   eval "ac_cv_header_$ac_safe=yes"
10369 else
10370   echo "$ac_err" >&5
10371   echo "configure: failed program was:" >&5
10372   cat conftest.$ac_ext >&5
10373   rm -rf conftest*
10374   eval "ac_cv_header_$ac_safe=no"
10375 fi
10376 rm -f conftest*
10377 fi
10378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10379   echo "$ac_t""yes" 1>&6
10380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10381   cat >> confdefs.h <<EOF
10382 #define $ac_tr_hdr 1
10383 EOF
10384  
10385 else
10386   echo "$ac_t""no" 1>&6
10387 fi
10388 done
10389
10390         if test $ac_cv_header_mach_cthreads_h = yes ; then
10391                 ol_with_threads=found
10392
10393                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10394 echo "configure:10395: checking for cthread_fork" >&5
10395 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10396   echo $ac_n "(cached) $ac_c" 1>&6
10397 else
10398   cat > conftest.$ac_ext <<EOF
10399 #line 10400 "configure"
10400 #include "confdefs.h"
10401 /* System header to define __stub macros and hopefully few prototypes,
10402     which can conflict with char cthread_fork(); below.  */
10403 #include <assert.h>
10404 /* Override any gcc2 internal prototype to avoid an error.  */
10405 /* We use char because int might match the return type of a gcc2
10406     builtin and then its argument prototype would still apply.  */
10407 char cthread_fork();
10408 char (*f)();
10409
10410 int main() {
10411
10412 /* The GNU C library defines this for functions which it implements
10413     to always fail with ENOSYS.  Some functions are actually named
10414     something starting with __ and the normal name is an alias.  */
10415 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10416 choke me
10417 #else
10418 f = cthread_fork;
10419 #endif
10420
10421 ; return 0; }
10422 EOF
10423 if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10424   rm -rf conftest*
10425   eval "ac_cv_func_cthread_fork=yes"
10426 else
10427   echo "configure: failed program was:" >&5
10428   cat conftest.$ac_ext >&5
10429   rm -rf conftest*
10430   eval "ac_cv_func_cthread_fork=no"
10431 fi
10432 rm -f conftest*
10433 fi
10434
10435 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10436   echo "$ac_t""yes" 1>&6
10437   ol_link_threads=yes
10438 else
10439   echo "$ac_t""no" 1>&6
10440 fi
10441
10442
10443                 if test $ol_link_threads = no ; then
10444                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10445 echo "configure:10446: checking for cthread_fork with -all_load" >&5
10446 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10447   echo $ac_n "(cached) $ac_c" 1>&6
10448 else
10449   
10450                                                                 save_LIBS="$LIBS"
10451                                 LIBS="-all_load $LIBS"
10452                                 cat > conftest.$ac_ext <<EOF
10453 #line 10454 "configure"
10454 #include "confdefs.h"
10455 #include <mach/cthreads.h>
10456 int main() {
10457
10458                                         cthread_fork((void *)0, (void *)0);
10459                                         
10460 ; return 0; }
10461 EOF
10462 if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10463   rm -rf conftest*
10464   ol_cv_cthread_all_load=yes
10465 else
10466   echo "configure: failed program was:" >&5
10467   cat conftest.$ac_ext >&5
10468   rm -rf conftest*
10469   ol_cv_cthread_all_load=no
10470 fi
10471 rm -f conftest*
10472                                                                 LIBS="$save_LIBS"
10473                         
10474 fi
10475
10476 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10477
10478                         if test $ol_cv_cthread_all_load = yes ; then
10479                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10480                                 ol_link_threads=mach
10481                         fi
10482                 fi
10483
10484                 if test $ol_link_threads != no ; then
10485                         : check for cthread specific functionality here
10486                         cat >> confdefs.h <<\EOF
10487 #define HAVE_MACH_CTHREADS 1
10488 EOF
10489
10490                 else
10491                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10492                 fi
10493         fi
10494
10495         if test $ol_with_threads = mach ; then
10496                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10497         fi
10498 fi
10499
10500 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10501         -o $ol_with_threads = pth ; then
10502
10503         for ac_hdr in pth.h
10504 do
10505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10507 echo "configure:10508: checking for $ac_hdr" >&5
10508 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10509   echo $ac_n "(cached) $ac_c" 1>&6
10510 else
10511   cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514 #include <$ac_hdr>
10515 EOF
10516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10517 { (eval echo configure:10518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10519 if test -z "$ac_err"; then
10520   rm -rf conftest*
10521   eval "ac_cv_header_$ac_safe=yes"
10522 else
10523   echo "$ac_err" >&5
10524   echo "configure: failed program was:" >&5
10525   cat conftest.$ac_ext >&5
10526   rm -rf conftest*
10527   eval "ac_cv_header_$ac_safe=no"
10528 fi
10529 rm -f conftest*
10530 fi
10531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10532   echo "$ac_t""yes" 1>&6
10533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10534   cat >> confdefs.h <<EOF
10535 #define $ac_tr_hdr 1
10536 EOF
10537  
10538 else
10539   echo "$ac_t""no" 1>&6
10540 fi
10541 done
10542
10543
10544         if test $ac_cv_header_pth_h = yes ; then
10545                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10546 echo "configure:10547: checking for pth_version in -lpth" >&5
10547 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10549   echo $ac_n "(cached) $ac_c" 1>&6
10550 else
10551   ac_save_LIBS="$LIBS"
10552 LIBS="-lpth  $LIBS"
10553 cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 /* Override any gcc2 internal prototype to avoid an error.  */
10557 /* We use char because int might match the return type of a gcc2
10558     builtin and then its argument prototype would still apply.  */
10559 char pth_version();
10560
10561 int main() {
10562 pth_version()
10563 ; return 0; }
10564 EOF
10565 if { (eval echo configure:10566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10566   rm -rf conftest*
10567   eval "ac_cv_lib_$ac_lib_var=yes"
10568 else
10569   echo "configure: failed program was:" >&5
10570   cat conftest.$ac_ext >&5
10571   rm -rf conftest*
10572   eval "ac_cv_lib_$ac_lib_var=no"
10573 fi
10574 rm -f conftest*
10575 LIBS="$ac_save_LIBS"
10576
10577 fi
10578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10579   echo "$ac_t""yes" 1>&6
10580   have_pth=yes
10581 else
10582   echo "$ac_t""no" 1>&6
10583 have_pth=no
10584 fi
10585
10586
10587                 if test $have_pth = yes ; then
10588                         cat >> confdefs.h <<\EOF
10589 #define HAVE_GNU_PTH 1
10590 EOF
10591
10592                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10593                         ol_link_threads=pth
10594
10595                         if test $ol_with_yielding_select = auto ; then
10596                                 ol_with_yielding_select=yes
10597                         fi
10598                 fi
10599         fi
10600 fi
10601
10602 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10603         -o $ol_with_threads = lwp ; then
10604
10605                 for ac_hdr in thread.h synch.h
10606 do
10607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10609 echo "configure:10610: checking for $ac_hdr" >&5
10610 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10611   echo $ac_n "(cached) $ac_c" 1>&6
10612 else
10613   cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616 #include <$ac_hdr>
10617 EOF
10618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10619 { (eval echo configure:10620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10621 if test -z "$ac_err"; then
10622   rm -rf conftest*
10623   eval "ac_cv_header_$ac_safe=yes"
10624 else
10625   echo "$ac_err" >&5
10626   echo "configure: failed program was:" >&5
10627   cat conftest.$ac_ext >&5
10628   rm -rf conftest*
10629   eval "ac_cv_header_$ac_safe=no"
10630 fi
10631 rm -f conftest*
10632 fi
10633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10634   echo "$ac_t""yes" 1>&6
10635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10636   cat >> confdefs.h <<EOF
10637 #define $ac_tr_hdr 1
10638 EOF
10639  
10640 else
10641   echo "$ac_t""no" 1>&6
10642 fi
10643 done
10644
10645         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10646                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10647 echo "configure:10648: checking for thr_create in -lthread" >&5
10648 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10650   echo $ac_n "(cached) $ac_c" 1>&6
10651 else
10652   ac_save_LIBS="$LIBS"
10653 LIBS="-lthread  $LIBS"
10654 cat > conftest.$ac_ext <<EOF
10655 #line 10656 "configure"
10656 #include "confdefs.h"
10657 /* Override any gcc2 internal prototype to avoid an error.  */
10658 /* We use char because int might match the return type of a gcc2
10659     builtin and then its argument prototype would still apply.  */
10660 char thr_create();
10661
10662 int main() {
10663 thr_create()
10664 ; return 0; }
10665 EOF
10666 if { (eval echo configure:10667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10667   rm -rf conftest*
10668   eval "ac_cv_lib_$ac_lib_var=yes"
10669 else
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672   rm -rf conftest*
10673   eval "ac_cv_lib_$ac_lib_var=no"
10674 fi
10675 rm -f conftest*
10676 LIBS="$ac_save_LIBS"
10677
10678 fi
10679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10680   echo "$ac_t""yes" 1>&6
10681   have_thr=yes
10682 else
10683   echo "$ac_t""no" 1>&6
10684 have_thr=no
10685 fi
10686
10687
10688                 if test $have_thr = yes ; then
10689                         cat >> confdefs.h <<\EOF
10690 #define HAVE_THR 1
10691 EOF
10692
10693                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10694                         ol_link_threads=thr
10695
10696                         if test $ol_with_yielding_select = auto ; then
10697                                 ol_with_yielding_select=yes
10698                         fi
10699
10700                                                 for ac_func in \
10701                                 thr_setconcurrency \
10702                                 thr_getconcurrency \
10703                         
10704 do
10705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10706 echo "configure:10707: checking for $ac_func" >&5
10707 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10708   echo $ac_n "(cached) $ac_c" 1>&6
10709 else
10710   cat > conftest.$ac_ext <<EOF
10711 #line 10712 "configure"
10712 #include "confdefs.h"
10713 /* System header to define __stub macros and hopefully few prototypes,
10714     which can conflict with char $ac_func(); below.  */
10715 #include <assert.h>
10716 /* Override any gcc2 internal prototype to avoid an error.  */
10717 /* We use char because int might match the return type of a gcc2
10718     builtin and then its argument prototype would still apply.  */
10719 char $ac_func();
10720 char (*f)();
10721
10722 int main() {
10723
10724 /* The GNU C library defines this for functions which it implements
10725     to always fail with ENOSYS.  Some functions are actually named
10726     something starting with __ and the normal name is an alias.  */
10727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10728 choke me
10729 #else
10730 f = $ac_func;
10731 #endif
10732
10733 ; return 0; }
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10736   rm -rf conftest*
10737   eval "ac_cv_func_$ac_func=yes"
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -rf conftest*
10742   eval "ac_cv_func_$ac_func=no"
10743 fi
10744 rm -f conftest*
10745 fi
10746
10747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10748   echo "$ac_t""yes" 1>&6
10749     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10750   cat >> confdefs.h <<EOF
10751 #define $ac_tr_func 1
10752 EOF
10753  
10754 else
10755   echo "$ac_t""no" 1>&6
10756 fi
10757 done
10758
10759                 fi
10760         fi
10761
10762                 for ac_hdr in lwp/lwp.h
10763 do
10764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10766 echo "configure:10767: checking for $ac_hdr" >&5
10767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10768   echo $ac_n "(cached) $ac_c" 1>&6
10769 else
10770   cat > conftest.$ac_ext <<EOF
10771 #line 10772 "configure"
10772 #include "confdefs.h"
10773 #include <$ac_hdr>
10774 EOF
10775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10776 { (eval echo configure:10777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10778 if test -z "$ac_err"; then
10779   rm -rf conftest*
10780   eval "ac_cv_header_$ac_safe=yes"
10781 else
10782   echo "$ac_err" >&5
10783   echo "configure: failed program was:" >&5
10784   cat conftest.$ac_ext >&5
10785   rm -rf conftest*
10786   eval "ac_cv_header_$ac_safe=no"
10787 fi
10788 rm -f conftest*
10789 fi
10790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10791   echo "$ac_t""yes" 1>&6
10792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10793   cat >> confdefs.h <<EOF
10794 #define $ac_tr_hdr 1
10795 EOF
10796  
10797 else
10798   echo "$ac_t""no" 1>&6
10799 fi
10800 done
10801
10802         if test $ac_cv_header_lwp_lwp_h = yes ; then
10803                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10804 echo "configure:10805: checking for lwp_create in -llwp" >&5
10805 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10807   echo $ac_n "(cached) $ac_c" 1>&6
10808 else
10809   ac_save_LIBS="$LIBS"
10810 LIBS="-llwp  $LIBS"
10811 cat > conftest.$ac_ext <<EOF
10812 #line 10813 "configure"
10813 #include "confdefs.h"
10814 /* Override any gcc2 internal prototype to avoid an error.  */
10815 /* We use char because int might match the return type of a gcc2
10816     builtin and then its argument prototype would still apply.  */
10817 char lwp_create();
10818
10819 int main() {
10820 lwp_create()
10821 ; return 0; }
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10824   rm -rf conftest*
10825   eval "ac_cv_lib_$ac_lib_var=yes"
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -rf conftest*
10830   eval "ac_cv_lib_$ac_lib_var=no"
10831 fi
10832 rm -f conftest*
10833 LIBS="$ac_save_LIBS"
10834
10835 fi
10836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10837   echo "$ac_t""yes" 1>&6
10838   have_lwp=yes
10839 else
10840   echo "$ac_t""no" 1>&6
10841 have_lwp=no
10842 fi
10843
10844
10845                 if test $have_lwp = yes ; then
10846                         cat >> confdefs.h <<\EOF
10847 #define HAVE_LWP 1
10848 EOF
10849
10850                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10851                         ol_link_threads=lwp
10852
10853                         if test $ol_with_yielding_select = auto ; then
10854                                 ol_with_yielding_select=no
10855                         fi
10856                 fi
10857         fi
10858 fi
10859
10860 if test $ol_with_yielding_select = yes ; then
10861         cat >> confdefs.h <<\EOF
10862 #define HAVE_YIELDING_SELECT 1
10863 EOF
10864
10865 fi
10866
10867 if test $ol_with_threads = manual ; then
10868                 ol_link_threads=yes
10869
10870         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10871
10872         for ac_hdr in pthread.h sched.h
10873 do
10874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10876 echo "configure:10877: checking for $ac_hdr" >&5
10877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 #include <$ac_hdr>
10884 EOF
10885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10886 { (eval echo configure:10887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10888 if test -z "$ac_err"; then
10889   rm -rf conftest*
10890   eval "ac_cv_header_$ac_safe=yes"
10891 else
10892   echo "$ac_err" >&5
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   eval "ac_cv_header_$ac_safe=no"
10897 fi
10898 rm -f conftest*
10899 fi
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10903   cat >> confdefs.h <<EOF
10904 #define $ac_tr_hdr 1
10905 EOF
10906  
10907 else
10908   echo "$ac_t""no" 1>&6
10909 fi
10910 done
10911
10912         for ac_func in sched_yield pthread_yield
10913 do
10914 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10915 echo "configure:10916: checking for $ac_func" >&5
10916 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10917   echo $ac_n "(cached) $ac_c" 1>&6
10918 else
10919   cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922 /* System header to define __stub macros and hopefully few prototypes,
10923     which can conflict with char $ac_func(); below.  */
10924 #include <assert.h>
10925 /* Override any gcc2 internal prototype to avoid an error.  */
10926 /* We use char because int might match the return type of a gcc2
10927     builtin and then its argument prototype would still apply.  */
10928 char $ac_func();
10929 char (*f)();
10930
10931 int main() {
10932
10933 /* The GNU C library defines this for functions which it implements
10934     to always fail with ENOSYS.  Some functions are actually named
10935     something starting with __ and the normal name is an alias.  */
10936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10937 choke me
10938 #else
10939 f = $ac_func;
10940 #endif
10941
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_func_$ac_func=yes"
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_func_$ac_func=no"
10952 fi
10953 rm -f conftest*
10954 fi
10955
10956 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10957   echo "$ac_t""yes" 1>&6
10958     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10959   cat >> confdefs.h <<EOF
10960 #define $ac_tr_func 1
10961 EOF
10962  
10963 else
10964   echo "$ac_t""no" 1>&6
10965 fi
10966 done
10967
10968         
10969         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10970 echo "configure:10971: checking for LinuxThreads pthread.h" >&5
10971 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10972   echo $ac_n "(cached) $ac_c" 1>&6
10973 else
10974   cat > conftest.$ac_ext <<EOF
10975 #line 10976 "configure"
10976 #include "confdefs.h"
10977 #include <pthread.h>
10978 EOF
10979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10980   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10981   rm -rf conftest*
10982   ol_cv_header_linux_threads=yes
10983 else
10984   rm -rf conftest*
10985   ol_cv_header_linux_threads=no
10986 fi
10987 rm -f conftest*
10988
10989                 
10990 fi
10991
10992 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10993         if test $ol_cv_header_linux_threads = yes; then
10994                 cat >> confdefs.h <<\EOF
10995 #define HAVE_LINUX_THREADS 1
10996 EOF
10997
10998         fi
10999
11000
11001         for ac_hdr in mach/cthreads.h
11002 do
11003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11005 echo "configure:11006: checking for $ac_hdr" >&5
11006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11007   echo $ac_n "(cached) $ac_c" 1>&6
11008 else
11009   cat > conftest.$ac_ext <<EOF
11010 #line 11011 "configure"
11011 #include "confdefs.h"
11012 #include <$ac_hdr>
11013 EOF
11014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11015 { (eval echo configure:11016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11017 if test -z "$ac_err"; then
11018   rm -rf conftest*
11019   eval "ac_cv_header_$ac_safe=yes"
11020 else
11021   echo "$ac_err" >&5
11022   echo "configure: failed program was:" >&5
11023   cat conftest.$ac_ext >&5
11024   rm -rf conftest*
11025   eval "ac_cv_header_$ac_safe=no"
11026 fi
11027 rm -f conftest*
11028 fi
11029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11030   echo "$ac_t""yes" 1>&6
11031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11032   cat >> confdefs.h <<EOF
11033 #define $ac_tr_hdr 1
11034 EOF
11035  
11036 else
11037   echo "$ac_t""no" 1>&6
11038 fi
11039 done
11040
11041         for ac_hdr in lwp/lwp.h
11042 do
11043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11045 echo "configure:11046: checking for $ac_hdr" >&5
11046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 #include <$ac_hdr>
11053 EOF
11054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11055 { (eval echo configure:11056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11057 if test -z "$ac_err"; then
11058   rm -rf conftest*
11059   eval "ac_cv_header_$ac_safe=yes"
11060 else
11061   echo "$ac_err" >&5
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   eval "ac_cv_header_$ac_safe=no"
11066 fi
11067 rm -f conftest*
11068 fi
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11072   cat >> confdefs.h <<EOF
11073 #define $ac_tr_hdr 1
11074 EOF
11075  
11076 else
11077   echo "$ac_t""no" 1>&6
11078 fi
11079 done
11080
11081         for ac_hdr in thread.h synch.h
11082 do
11083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11085 echo "configure:11086: checking for $ac_hdr" >&5
11086 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089   cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 #include <$ac_hdr>
11093 EOF
11094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11095 { (eval echo configure:11096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11097 if test -z "$ac_err"; then
11098   rm -rf conftest*
11099   eval "ac_cv_header_$ac_safe=yes"
11100 else
11101   echo "$ac_err" >&5
11102   echo "configure: failed program was:" >&5
11103   cat conftest.$ac_ext >&5
11104   rm -rf conftest*
11105   eval "ac_cv_header_$ac_safe=no"
11106 fi
11107 rm -f conftest*
11108 fi
11109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11110   echo "$ac_t""yes" 1>&6
11111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11112   cat >> confdefs.h <<EOF
11113 #define $ac_tr_hdr 1
11114 EOF
11115  
11116 else
11117   echo "$ac_t""no" 1>&6
11118 fi
11119 done
11120
11121 fi
11122
11123 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11124                         cat >> confdefs.h <<\EOF
11125 #define REENTRANT 1
11126 EOF
11127
11128         cat >> confdefs.h <<\EOF
11129 #define _REENTRANT 1
11130 EOF
11131
11132         cat >> confdefs.h <<\EOF
11133 #define THREAD_SAFE 1
11134 EOF
11135
11136         cat >> confdefs.h <<\EOF
11137 #define _THREAD_SAFE 1
11138 EOF
11139
11140         cat >> confdefs.h <<\EOF
11141 #define THREADSAFE 1
11142 EOF
11143
11144         cat >> confdefs.h <<\EOF
11145 #define _THREADSAFE 1
11146 EOF
11147
11148         cat >> confdefs.h <<\EOF
11149 #define _SGI_MP_SOURCE 1
11150 EOF
11151
11152
11153                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11154 echo "configure:11155: checking for thread specific errno" >&5
11155 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   
11159                 cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 #include <errno.h>
11163 int main() {
11164 errno = 0;
11165 ; return 0; }
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11168   rm -rf conftest*
11169   ol_cv_errno_thread_specific=yes
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -rf conftest*
11174   ol_cv_errno_thread_specific=no
11175 fi
11176 rm -f conftest*
11177         
11178 fi
11179
11180 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11181
11182                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11183 echo "configure:11184: checking for thread specific h_errno" >&5
11184 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11185   echo $ac_n "(cached) $ac_c" 1>&6
11186 else
11187   
11188                 cat > conftest.$ac_ext <<EOF
11189 #line 11190 "configure"
11190 #include "confdefs.h"
11191 #include <netdb.h>
11192 int main() {
11193 h_errno = 0;
11194 ; return 0; }
11195 EOF
11196 if { (eval echo configure:11197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11197   rm -rf conftest*
11198   ol_cv_h_errno_thread_specific=yes
11199 else
11200   echo "configure: failed program was:" >&5
11201   cat conftest.$ac_ext >&5
11202   rm -rf conftest*
11203   ol_cv_h_errno_thread_specific=no
11204 fi
11205 rm -f conftest*
11206         
11207 fi
11208
11209 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11210
11211         if test $ol_cv_errno_thread_specific != yes \
11212                 -o $ol_cv_h_errno_thread_specific != yes ; then
11213                 LIBS="$LTHREAD_LIBS $LIBS"
11214                 LTHREAD_LIBS=""
11215         fi
11216
11217 fi  
11218
11219 if test $ol_link_threads = no ; then
11220         if test $ol_with_threads = yes ; then
11221                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11222         fi
11223
11224         if test $ol_with_threads = auto ; then
11225                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11226                 ol_with_threads=no
11227         fi
11228
11229         cat >> confdefs.h <<\EOF
11230 #define NO_THREADS 1
11231 EOF
11232
11233         LTHREAD_LIBS=""
11234 fi
11235
11236 if test $ol_link_threads != no ; then
11237         cat >> confdefs.h <<\EOF
11238 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11239 EOF
11240
11241 fi
11242
11243 ol_link_ldbm=no 
11244
11245 if test $ol_with_ldbm_api = auto \
11246         -o $ol_with_ldbm_api = berkeley \
11247         -o $ol_with_ldbm_api = bcompat ; then
11248
11249         if test $ol_with_ldbm_api = bcompat; then \
11250                 ol_cv_berkeley_db=no
11251 for ac_hdr in db_185.h db.h
11252 do
11253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11255 echo "configure:11256: checking for $ac_hdr" >&5
11256 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11257   echo $ac_n "(cached) $ac_c" 1>&6
11258 else
11259   cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 #include <$ac_hdr>
11263 EOF
11264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11265 { (eval echo configure:11266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11267 if test -z "$ac_err"; then
11268   rm -rf conftest*
11269   eval "ac_cv_header_$ac_safe=yes"
11270 else
11271   echo "$ac_err" >&5
11272   echo "configure: failed program was:" >&5
11273   cat conftest.$ac_ext >&5
11274   rm -rf conftest*
11275   eval "ac_cv_header_$ac_safe=no"
11276 fi
11277 rm -f conftest*
11278 fi
11279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11280   echo "$ac_t""yes" 1>&6
11281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11282   cat >> confdefs.h <<EOF
11283 #define $ac_tr_hdr 1
11284 EOF
11285  
11286 else
11287   echo "$ac_t""no" 1>&6
11288 fi
11289 done
11290
11291 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11292         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11293 echo "configure:11294: checking if Berkeley DB header compatibility" >&5
11294 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11295   echo $ac_n "(cached) $ac_c" 1>&6
11296 else
11297   
11298                 cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301
11302 #if HAVE_DB_185_H
11303 #       include <db_185.h>
11304 #else
11305 #       include <db.h>
11306 #endif
11307
11308  /* this check could be improved */
11309 #ifndef DB_VERSION_MAJOR
11310 #       define DB_VERSION_MAJOR 1
11311 #endif
11312
11313 #if DB_VERSION_MAJOR == 1 
11314         __db_version_1
11315 #endif
11316
11317 EOF
11318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11319   egrep "__db_version_1" >/dev/null 2>&1; then
11320   rm -rf conftest*
11321   ol_cv_header_db1=yes
11322 else
11323   rm -rf conftest*
11324   ol_cv_header_db1=no
11325 fi
11326 rm -f conftest*
11327
11328 fi
11329
11330 echo "$ac_t""$ol_cv_header_db1" 1>&6
11331
11332         if test ol_cv_header_db1=yes ; then
11333                 ol_cv_lib_db=no
11334 if test $ol_cv_lib_db = no ; then
11335         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11336 echo "configure:11337: checking for Berkeley DB link (default)" >&5
11337 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11338   echo $ac_n "(cached) $ac_c" 1>&6
11339 else
11340   
11341         ol_DB_LIB=
11342         ol_LIBS=$LIBS
11343         LIBS="$ol_DB_LIB $LIBS"
11344
11345         cat > conftest.$ac_ext <<EOF
11346 #line 11347 "configure"
11347 #include "confdefs.h"
11348
11349 #ifdef HAVE_DB_185_H
11350 # include <db_185.h>
11351 #else
11352 # include <db.h>
11353 #endif
11354
11355 #ifndef DB_VERSION_MAJOR
11356 # define DB_VERSION_MAJOR 1
11357 #endif
11358
11359 #ifndef NULL
11360 #define NULL ((void*)0)
11361 #endif
11362
11363 int main() {
11364
11365 #if DB_VERSION_MAJOR > 2
11366         db_env_create( NULL, 0 );
11367 #elif DB_VERSION_MAJOR > 1
11368         db_appexit( NULL );
11369 #else
11370         (void) dbopen( NULL, 0, 0, 0, NULL);
11371 #endif
11372
11373 ; return 0; }
11374 EOF
11375 if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11376   rm -rf conftest*
11377   ol_cv_db_none=yes
11378 else
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   ol_cv_db_none=no
11383 fi
11384 rm -f conftest*
11385
11386         LIBS="$ol_LIBS"
11387
11388 fi
11389
11390 echo "$ac_t""$ol_cv_db_none" 1>&6
11391
11392         if test $ol_cv_db_none = yes ; then
11393                 ol_cv_lib_db=yes
11394         fi
11395 fi
11396
11397 if test $ol_cv_lib_db = no ; then
11398         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11399 echo "configure:11400: checking for Berkeley DB link (-ldb)" >&5
11400 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11401   echo $ac_n "(cached) $ac_c" 1>&6
11402 else
11403   
11404         ol_DB_LIB=-ldb
11405         ol_LIBS=$LIBS
11406         LIBS="$ol_DB_LIB $LIBS"
11407
11408         cat > conftest.$ac_ext <<EOF
11409 #line 11410 "configure"
11410 #include "confdefs.h"
11411
11412 #ifdef HAVE_DB_185_H
11413 # include <db_185.h>
11414 #else
11415 # include <db.h>
11416 #endif
11417
11418 #ifndef DB_VERSION_MAJOR
11419 # define DB_VERSION_MAJOR 1
11420 #endif
11421
11422 #ifndef NULL
11423 #define NULL ((void*)0)
11424 #endif
11425
11426 int main() {
11427
11428 #if DB_VERSION_MAJOR > 2
11429         db_env_create( NULL, 0 );
11430 #elif DB_VERSION_MAJOR > 1
11431         db_appexit( NULL );
11432 #else
11433         (void) dbopen( NULL, 0, 0, 0, NULL);
11434 #endif
11435
11436 ; return 0; }
11437 EOF
11438 if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11439   rm -rf conftest*
11440   ol_cv_db_db=yes
11441 else
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   ol_cv_db_db=no
11446 fi
11447 rm -f conftest*
11448
11449         LIBS="$ol_LIBS"
11450
11451 fi
11452
11453 echo "$ac_t""$ol_cv_db_db" 1>&6
11454
11455         if test $ol_cv_db_db = yes ; then
11456                 ol_cv_lib_db=-ldb
11457         fi
11458 fi
11459
11460 if test $ol_cv_lib_db = no ; then
11461         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11462 echo "configure:11463: checking for Berkeley DB link (-ldb3)" >&5
11463 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   
11467         ol_DB_LIB=-ldb3
11468         ol_LIBS=$LIBS
11469         LIBS="$ol_DB_LIB $LIBS"
11470
11471         cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474
11475 #ifdef HAVE_DB_185_H
11476 # include <db_185.h>
11477 #else
11478 # include <db.h>
11479 #endif
11480
11481 #ifndef DB_VERSION_MAJOR
11482 # define DB_VERSION_MAJOR 1
11483 #endif
11484
11485 #ifndef NULL
11486 #define NULL ((void*)0)
11487 #endif
11488
11489 int main() {
11490
11491 #if DB_VERSION_MAJOR > 2
11492         db_env_create( NULL, 0 );
11493 #elif DB_VERSION_MAJOR > 1
11494         db_appexit( NULL );
11495 #else
11496         (void) dbopen( NULL, 0, 0, 0, NULL);
11497 #endif
11498
11499 ; return 0; }
11500 EOF
11501 if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11502   rm -rf conftest*
11503   ol_cv_db_db3=yes
11504 else
11505   echo "configure: failed program was:" >&5
11506   cat conftest.$ac_ext >&5
11507   rm -rf conftest*
11508   ol_cv_db_db3=no
11509 fi
11510 rm -f conftest*
11511
11512         LIBS="$ol_LIBS"
11513
11514 fi
11515
11516 echo "$ac_t""$ol_cv_db_db3" 1>&6
11517
11518         if test $ol_cv_db_db3 = yes ; then
11519                 ol_cv_lib_db=-ldb3
11520         fi
11521 fi
11522
11523 if test $ol_cv_lib_db = no ; then
11524         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11525 echo "configure:11526: checking for Berkeley DB link (-ldb2)" >&5
11526 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11527   echo $ac_n "(cached) $ac_c" 1>&6
11528 else
11529   
11530         ol_DB_LIB=-ldb2
11531         ol_LIBS=$LIBS
11532         LIBS="$ol_DB_LIB $LIBS"
11533
11534         cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11537
11538 #ifdef HAVE_DB_185_H
11539 # include <db_185.h>
11540 #else
11541 # include <db.h>
11542 #endif
11543
11544 #ifndef DB_VERSION_MAJOR
11545 # define DB_VERSION_MAJOR 1
11546 #endif
11547
11548 #ifndef NULL
11549 #define NULL ((void*)0)
11550 #endif
11551
11552 int main() {
11553
11554 #if DB_VERSION_MAJOR > 2
11555         db_env_create( NULL, 0 );
11556 #elif DB_VERSION_MAJOR > 1
11557         db_appexit( NULL );
11558 #else
11559         (void) dbopen( NULL, 0, 0, 0, NULL);
11560 #endif
11561
11562 ; return 0; }
11563 EOF
11564 if { (eval echo configure:11565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11565   rm -rf conftest*
11566   ol_cv_db_db2=yes
11567 else
11568   echo "configure: failed program was:" >&5
11569   cat conftest.$ac_ext >&5
11570   rm -rf conftest*
11571   ol_cv_db_db2=no
11572 fi
11573 rm -f conftest*
11574
11575         LIBS="$ol_LIBS"
11576
11577 fi
11578
11579 echo "$ac_t""$ol_cv_db_db2" 1>&6
11580
11581         if test $ol_cv_db_db2 = yes ; then
11582                 ol_cv_lib_db=-ldb2
11583         fi
11584 fi
11585
11586 if test $ol_cv_lib_db = no ; then
11587         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11588 echo "configure:11589: checking for Berkeley DB link (-ldb1)" >&5
11589 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   
11593         ol_DB_LIB=-ldb1
11594         ol_LIBS=$LIBS
11595         LIBS="$ol_DB_LIB $LIBS"
11596
11597         cat > conftest.$ac_ext <<EOF
11598 #line 11599 "configure"
11599 #include "confdefs.h"
11600
11601 #ifdef HAVE_DB_185_H
11602 # include <db_185.h>
11603 #else
11604 # include <db.h>
11605 #endif
11606
11607 #ifndef DB_VERSION_MAJOR
11608 # define DB_VERSION_MAJOR 1
11609 #endif
11610
11611 #ifndef NULL
11612 #define NULL ((void*)0)
11613 #endif
11614
11615 int main() {
11616
11617 #if DB_VERSION_MAJOR > 2
11618         db_env_create( NULL, 0 );
11619 #elif DB_VERSION_MAJOR > 1
11620         db_appexit( NULL );
11621 #else
11622         (void) dbopen( NULL, 0, 0, 0, NULL);
11623 #endif
11624
11625 ; return 0; }
11626 EOF
11627 if { (eval echo configure:11628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11628   rm -rf conftest*
11629   ol_cv_db_db1=yes
11630 else
11631   echo "configure: failed program was:" >&5
11632   cat conftest.$ac_ext >&5
11633   rm -rf conftest*
11634   ol_cv_db_db1=no
11635 fi
11636 rm -f conftest*
11637
11638         LIBS="$ol_LIBS"
11639
11640 fi
11641
11642 echo "$ac_t""$ol_cv_db_db1" 1>&6
11643
11644         if test $ol_cv_db_db1 = yes ; then
11645                 ol_cv_lib_db=-ldb1
11646         fi
11647 fi
11648
11649
11650                 if test "$ol_cv_lib_db" != no ; then
11651                         ol_cv_berkeley_db=yes
11652                 fi
11653         fi
11654 fi
11655
11656         else
11657                 ol_cv_berkeley_db=no
11658 for ac_hdr in db.h
11659 do
11660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11662 echo "configure:11663: checking for $ac_hdr" >&5
11663 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11664   echo $ac_n "(cached) $ac_c" 1>&6
11665 else
11666   cat > conftest.$ac_ext <<EOF
11667 #line 11668 "configure"
11668 #include "confdefs.h"
11669 #include <$ac_hdr>
11670 EOF
11671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11672 { (eval echo configure:11673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11674 if test -z "$ac_err"; then
11675   rm -rf conftest*
11676   eval "ac_cv_header_$ac_safe=yes"
11677 else
11678   echo "$ac_err" >&5
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -rf conftest*
11682   eval "ac_cv_header_$ac_safe=no"
11683 fi
11684 rm -f conftest*
11685 fi
11686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11687   echo "$ac_t""yes" 1>&6
11688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11689   cat >> confdefs.h <<EOF
11690 #define $ac_tr_hdr 1
11691 EOF
11692  
11693 else
11694   echo "$ac_t""no" 1>&6
11695 fi
11696 done
11697
11698 if test $ac_cv_header_db_h = yes; then
11699         ol_cv_lib_db=no
11700 if test $ol_cv_lib_db = no ; then
11701         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11702 echo "configure:11703: checking for Berkeley DB link (default)" >&5
11703 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11704   echo $ac_n "(cached) $ac_c" 1>&6
11705 else
11706   
11707         ol_DB_LIB=
11708         ol_LIBS=$LIBS
11709         LIBS="$ol_DB_LIB $LIBS"
11710
11711         cat > conftest.$ac_ext <<EOF
11712 #line 11713 "configure"
11713 #include "confdefs.h"
11714
11715 #ifdef HAVE_DB_185_H
11716 # include <db_185.h>
11717 #else
11718 # include <db.h>
11719 #endif
11720
11721 #ifndef DB_VERSION_MAJOR
11722 # define DB_VERSION_MAJOR 1
11723 #endif
11724
11725 #ifndef NULL
11726 #define NULL ((void*)0)
11727 #endif
11728
11729 int main() {
11730
11731 #if DB_VERSION_MAJOR > 2
11732         db_env_create( NULL, 0 );
11733 #elif DB_VERSION_MAJOR > 1
11734         db_appexit( NULL );
11735 #else
11736         (void) dbopen( NULL, 0, 0, 0, NULL);
11737 #endif
11738
11739 ; return 0; }
11740 EOF
11741 if { (eval echo configure:11742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11742   rm -rf conftest*
11743   ol_cv_db_none=yes
11744 else
11745   echo "configure: failed program was:" >&5
11746   cat conftest.$ac_ext >&5
11747   rm -rf conftest*
11748   ol_cv_db_none=no
11749 fi
11750 rm -f conftest*
11751
11752         LIBS="$ol_LIBS"
11753
11754 fi
11755
11756 echo "$ac_t""$ol_cv_db_none" 1>&6
11757
11758         if test $ol_cv_db_none = yes ; then
11759                 ol_cv_lib_db=yes
11760         fi
11761 fi
11762
11763 if test $ol_cv_lib_db = no ; then
11764         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11765 echo "configure:11766: checking for Berkeley DB link (-ldb)" >&5
11766 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11767   echo $ac_n "(cached) $ac_c" 1>&6
11768 else
11769   
11770         ol_DB_LIB=-ldb
11771         ol_LIBS=$LIBS
11772         LIBS="$ol_DB_LIB $LIBS"
11773
11774         cat > conftest.$ac_ext <<EOF
11775 #line 11776 "configure"
11776 #include "confdefs.h"
11777
11778 #ifdef HAVE_DB_185_H
11779 # include <db_185.h>
11780 #else
11781 # include <db.h>
11782 #endif
11783
11784 #ifndef DB_VERSION_MAJOR
11785 # define DB_VERSION_MAJOR 1
11786 #endif
11787
11788 #ifndef NULL
11789 #define NULL ((void*)0)
11790 #endif
11791
11792 int main() {
11793
11794 #if DB_VERSION_MAJOR > 2
11795         db_env_create( NULL, 0 );
11796 #elif DB_VERSION_MAJOR > 1
11797         db_appexit( NULL );
11798 #else
11799         (void) dbopen( NULL, 0, 0, 0, NULL);
11800 #endif
11801
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11805   rm -rf conftest*
11806   ol_cv_db_db=yes
11807 else
11808   echo "configure: failed program was:" >&5
11809   cat conftest.$ac_ext >&5
11810   rm -rf conftest*
11811   ol_cv_db_db=no
11812 fi
11813 rm -f conftest*
11814
11815         LIBS="$ol_LIBS"
11816
11817 fi
11818
11819 echo "$ac_t""$ol_cv_db_db" 1>&6
11820
11821         if test $ol_cv_db_db = yes ; then
11822                 ol_cv_lib_db=-ldb
11823         fi
11824 fi
11825
11826 if test $ol_cv_lib_db = no ; then
11827         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11828 echo "configure:11829: checking for Berkeley DB link (-ldb3)" >&5
11829 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11830   echo $ac_n "(cached) $ac_c" 1>&6
11831 else
11832   
11833         ol_DB_LIB=-ldb3
11834         ol_LIBS=$LIBS
11835         LIBS="$ol_DB_LIB $LIBS"
11836
11837         cat > conftest.$ac_ext <<EOF
11838 #line 11839 "configure"
11839 #include "confdefs.h"
11840
11841 #ifdef HAVE_DB_185_H
11842 # include <db_185.h>
11843 #else
11844 # include <db.h>
11845 #endif
11846
11847 #ifndef DB_VERSION_MAJOR
11848 # define DB_VERSION_MAJOR 1
11849 #endif
11850
11851 #ifndef NULL
11852 #define NULL ((void*)0)
11853 #endif
11854
11855 int main() {
11856
11857 #if DB_VERSION_MAJOR > 2
11858         db_env_create( NULL, 0 );
11859 #elif DB_VERSION_MAJOR > 1
11860         db_appexit( NULL );
11861 #else
11862         (void) dbopen( NULL, 0, 0, 0, NULL);
11863 #endif
11864
11865 ; return 0; }
11866 EOF
11867 if { (eval echo configure:11868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11868   rm -rf conftest*
11869   ol_cv_db_db3=yes
11870 else
11871   echo "configure: failed program was:" >&5
11872   cat conftest.$ac_ext >&5
11873   rm -rf conftest*
11874   ol_cv_db_db3=no
11875 fi
11876 rm -f conftest*
11877
11878         LIBS="$ol_LIBS"
11879
11880 fi
11881
11882 echo "$ac_t""$ol_cv_db_db3" 1>&6
11883
11884         if test $ol_cv_db_db3 = yes ; then
11885                 ol_cv_lib_db=-ldb3
11886         fi
11887 fi
11888
11889 if test $ol_cv_lib_db = no ; then
11890         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11891 echo "configure:11892: checking for Berkeley DB link (-ldb2)" >&5
11892 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11893   echo $ac_n "(cached) $ac_c" 1>&6
11894 else
11895   
11896         ol_DB_LIB=-ldb2
11897         ol_LIBS=$LIBS
11898         LIBS="$ol_DB_LIB $LIBS"
11899
11900         cat > conftest.$ac_ext <<EOF
11901 #line 11902 "configure"
11902 #include "confdefs.h"
11903
11904 #ifdef HAVE_DB_185_H
11905 # include <db_185.h>
11906 #else
11907 # include <db.h>
11908 #endif
11909
11910 #ifndef DB_VERSION_MAJOR
11911 # define DB_VERSION_MAJOR 1
11912 #endif
11913
11914 #ifndef NULL
11915 #define NULL ((void*)0)
11916 #endif
11917
11918 int main() {
11919
11920 #if DB_VERSION_MAJOR > 2
11921         db_env_create( NULL, 0 );
11922 #elif DB_VERSION_MAJOR > 1
11923         db_appexit( NULL );
11924 #else
11925         (void) dbopen( NULL, 0, 0, 0, NULL);
11926 #endif
11927
11928 ; return 0; }
11929 EOF
11930 if { (eval echo configure:11931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11931   rm -rf conftest*
11932   ol_cv_db_db2=yes
11933 else
11934   echo "configure: failed program was:" >&5
11935   cat conftest.$ac_ext >&5
11936   rm -rf conftest*
11937   ol_cv_db_db2=no
11938 fi
11939 rm -f conftest*
11940
11941         LIBS="$ol_LIBS"
11942
11943 fi
11944
11945 echo "$ac_t""$ol_cv_db_db2" 1>&6
11946
11947         if test $ol_cv_db_db2 = yes ; then
11948                 ol_cv_lib_db=-ldb2
11949         fi
11950 fi
11951
11952 if test $ol_cv_lib_db = no ; then
11953         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11954 echo "configure:11955: checking for Berkeley DB link (-ldb1)" >&5
11955 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   
11959         ol_DB_LIB=-ldb1
11960         ol_LIBS=$LIBS
11961         LIBS="$ol_DB_LIB $LIBS"
11962
11963         cat > conftest.$ac_ext <<EOF
11964 #line 11965 "configure"
11965 #include "confdefs.h"
11966
11967 #ifdef HAVE_DB_185_H
11968 # include <db_185.h>
11969 #else
11970 # include <db.h>
11971 #endif
11972
11973 #ifndef DB_VERSION_MAJOR
11974 # define DB_VERSION_MAJOR 1
11975 #endif
11976
11977 #ifndef NULL
11978 #define NULL ((void*)0)
11979 #endif
11980
11981 int main() {
11982
11983 #if DB_VERSION_MAJOR > 2
11984         db_env_create( NULL, 0 );
11985 #elif DB_VERSION_MAJOR > 1
11986         db_appexit( NULL );
11987 #else
11988         (void) dbopen( NULL, 0, 0, 0, NULL);
11989 #endif
11990
11991 ; return 0; }
11992 EOF
11993 if { (eval echo configure:11994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11994   rm -rf conftest*
11995   ol_cv_db_db1=yes
11996 else
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -rf conftest*
12000   ol_cv_db_db1=no
12001 fi
12002 rm -f conftest*
12003
12004         LIBS="$ol_LIBS"
12005
12006 fi
12007
12008 echo "$ac_t""$ol_cv_db_db1" 1>&6
12009
12010         if test $ol_cv_db_db1 = yes ; then
12011                 ol_cv_lib_db=-ldb1
12012         fi
12013 fi
12014
12015
12016         if test "$ol_cv_lib_db" != no ; then
12017                 ol_cv_berkeley_db=yes
12018                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12019 echo "configure:12020: checking for Berkeley DB thread support" >&5
12020 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12021   echo $ac_n "(cached) $ac_c" 1>&6
12022 else
12023   
12024         ol_LIBS="$LIBS"
12025         if test $ol_cv_lib_db != yes ; then
12026                 LIBS="$ol_cv_lib_db"
12027         fi
12028
12029         if test "$cross_compiling" = yes; then
12030   ol_cv_berkeley_db_thread=cross
12031 else
12032   cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12035
12036 #ifdef HAVE_DB_185_H
12037         choke me;
12038 #else
12039 #include <db.h>
12040 #endif
12041 #ifndef NULL
12042 #define NULL ((void *)0)
12043 #endif
12044 main()
12045 {
12046         int rc;
12047         u_int32_t flags = DB_CREATE | DB_THREAD;
12048
12049
12050 #if DB_VERSION_MAJOR > 2
12051         DB_ENV *env = NULL;
12052
12053         rc = db_env_create( &env, 0 );
12054
12055         if( rc == 0 ) {
12056                 rc = env->open( env, NULL, NULL, flags, 0 );
12057         }
12058
12059 #else
12060         DB_ENV env;
12061         memset( &env, '\0', sizeof(env) );
12062
12063         rc = db_appinit( NULL, NULL, &env, flags );
12064
12065         if( rc == 0 ) {
12066                 db_appexit( &env );
12067         }
12068 #endif
12069
12070         return rc;
12071 }
12072 EOF
12073 if { (eval echo configure:12074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12074 then
12075   ol_cv_berkeley_db_thread=yes
12076 else
12077   echo "configure: failed program was:" >&5
12078   cat conftest.$ac_ext >&5
12079   rm -fr conftest*
12080   ol_cv_berkeley_db_thread=no
12081 fi
12082 rm -fr conftest*
12083 fi
12084
12085
12086         LIBS="$ol_LIBS"
12087
12088         if test $ol_cv_berkeley_db_thread != no ; then
12089                 cat >> confdefs.h <<\EOF
12090 #define HAVE_BERKELEY_DB_THREAD 1
12091 EOF
12092
12093         fi
12094
12095 fi
12096
12097 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12098         fi
12099 fi
12100
12101         fi
12102
12103         if test $ol_cv_berkeley_db != no ; then
12104                 cat >> confdefs.h <<\EOF
12105 #define HAVE_BERKELEY_DB 1
12106 EOF
12107
12108
12109                 ol_link_ldbm=berkeley
12110                 ol_with_ldbm_api=db
12111
12112                 if test $ol_with_ldbm_type = hash ; then
12113                         cat >> confdefs.h <<\EOF
12114 #define LDBM_USE_DBHASH 1
12115 EOF
12116
12117                 else
12118                         cat >> confdefs.h <<\EOF
12119 #define LDBM_USE_DBBTREE 1
12120 EOF
12121
12122                 fi
12123
12124                                                 if test $ol_cv_lib_db != yes ; then
12125                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12126                 fi
12127         fi
12128 fi
12129
12130 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12131         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12132         ol_with_ldbm_api=none
12133 fi
12134
12135 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12136         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12137 echo "configure:12138: checking for MDBM library" >&5
12138 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141         ol_LIBS="$LIBS"
12142         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12143 echo "configure:12144: checking for mdbm_set_chain" >&5
12144 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12145   echo $ac_n "(cached) $ac_c" 1>&6
12146 else
12147   cat > conftest.$ac_ext <<EOF
12148 #line 12149 "configure"
12149 #include "confdefs.h"
12150 /* System header to define __stub macros and hopefully few prototypes,
12151     which can conflict with char mdbm_set_chain(); below.  */
12152 #include <assert.h>
12153 /* Override any gcc2 internal prototype to avoid an error.  */
12154 /* We use char because int might match the return type of a gcc2
12155     builtin and then its argument prototype would still apply.  */
12156 char mdbm_set_chain();
12157 char (*f)();
12158
12159 int main() {
12160
12161 /* The GNU C library defines this for functions which it implements
12162     to always fail with ENOSYS.  Some functions are actually named
12163     something starting with __ and the normal name is an alias.  */
12164 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12165 choke me
12166 #else
12167 f = mdbm_set_chain;
12168 #endif
12169
12170 ; return 0; }
12171 EOF
12172 if { (eval echo configure:12173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12173   rm -rf conftest*
12174   eval "ac_cv_func_mdbm_set_chain=yes"
12175 else
12176   echo "configure: failed program was:" >&5
12177   cat conftest.$ac_ext >&5
12178   rm -rf conftest*
12179   eval "ac_cv_func_mdbm_set_chain=no"
12180 fi
12181 rm -f conftest*
12182 fi
12183
12184 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12185   echo "$ac_t""yes" 1>&6
12186   ol_cv_lib_mdbm=yes
12187 else
12188   echo "$ac_t""no" 1>&6
12189
12190                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12191 echo "configure:12192: checking for mdbm_set_chain in -lmdbm" >&5
12192 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12194   echo $ac_n "(cached) $ac_c" 1>&6
12195 else
12196   ac_save_LIBS="$LIBS"
12197 LIBS="-lmdbm  $LIBS"
12198 cat > conftest.$ac_ext <<EOF
12199 #line 12200 "configure"
12200 #include "confdefs.h"
12201 /* Override any gcc2 internal prototype to avoid an error.  */
12202 /* We use char because int might match the return type of a gcc2
12203     builtin and then its argument prototype would still apply.  */
12204 char mdbm_set_chain();
12205
12206 int main() {
12207 mdbm_set_chain()
12208 ; return 0; }
12209 EOF
12210 if { (eval echo configure:12211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12211   rm -rf conftest*
12212   eval "ac_cv_lib_$ac_lib_var=yes"
12213 else
12214   echo "configure: failed program was:" >&5
12215   cat conftest.$ac_ext >&5
12216   rm -rf conftest*
12217   eval "ac_cv_lib_$ac_lib_var=no"
12218 fi
12219 rm -f conftest*
12220 LIBS="$ac_save_LIBS"
12221
12222 fi
12223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12224   echo "$ac_t""yes" 1>&6
12225   ol_cv_lib_mdbm=-lmdbm
12226 else
12227   echo "$ac_t""no" 1>&6
12228 ol_cv_lib_mdbm=no
12229 fi
12230
12231         
12232 fi
12233
12234         LIBS="$ol_LIBS"
12235
12236 fi
12237
12238 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12239
12240
12241  for ac_hdr in mdbm.h
12242 do
12243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12245 echo "configure:12246: checking for $ac_hdr" >&5
12246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12247   echo $ac_n "(cached) $ac_c" 1>&6
12248 else
12249   cat > conftest.$ac_ext <<EOF
12250 #line 12251 "configure"
12251 #include "confdefs.h"
12252 #include <$ac_hdr>
12253 EOF
12254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12255 { (eval echo configure:12256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12257 if test -z "$ac_err"; then
12258   rm -rf conftest*
12259   eval "ac_cv_header_$ac_safe=yes"
12260 else
12261   echo "$ac_err" >&5
12262   echo "configure: failed program was:" >&5
12263   cat conftest.$ac_ext >&5
12264   rm -rf conftest*
12265   eval "ac_cv_header_$ac_safe=no"
12266 fi
12267 rm -f conftest*
12268 fi
12269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12270   echo "$ac_t""yes" 1>&6
12271     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12272   cat >> confdefs.h <<EOF
12273 #define $ac_tr_hdr 1
12274 EOF
12275  
12276 else
12277   echo "$ac_t""no" 1>&6
12278 fi
12279 done
12280
12281  echo $ac_n "checking for db""... $ac_c" 1>&6
12282 echo "configure:12283: checking for db" >&5
12283 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12284   echo $ac_n "(cached) $ac_c" 1>&6
12285 else
12286   
12287         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12288                 ol_cv_mdbm=no
12289         else
12290                 ol_cv_mdbm=yes
12291         fi
12292
12293 fi
12294
12295 echo "$ac_t""$ol_cv_mdbm" 1>&6
12296  if test $ol_cv_mdbm = yes ; then
12297         cat >> confdefs.h <<\EOF
12298 #define HAVE_MDBM 1
12299 EOF
12300
12301  fi
12302
12303
12304         if test $ol_cv_mdbm = yes ; then
12305                 ol_link_ldbm=mdbm
12306                 ol_with_ldbm_api=mdbm
12307                 if test $ol_cv_lib_mdbm != yes ; then
12308                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12309                 fi
12310         fi
12311 fi
12312
12313 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12314         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12315 echo "configure:12316: checking for GDBM library" >&5
12316 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12317   echo $ac_n "(cached) $ac_c" 1>&6
12318 else
12319         ol_LIBS="$LIBS"
12320         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12321 echo "configure:12322: checking for gdbm_open" >&5
12322 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12323   echo $ac_n "(cached) $ac_c" 1>&6
12324 else
12325   cat > conftest.$ac_ext <<EOF
12326 #line 12327 "configure"
12327 #include "confdefs.h"
12328 /* System header to define __stub macros and hopefully few prototypes,
12329     which can conflict with char gdbm_open(); below.  */
12330 #include <assert.h>
12331 /* Override any gcc2 internal prototype to avoid an error.  */
12332 /* We use char because int might match the return type of a gcc2
12333     builtin and then its argument prototype would still apply.  */
12334 char gdbm_open();
12335 char (*f)();
12336
12337 int main() {
12338
12339 /* The GNU C library defines this for functions which it implements
12340     to always fail with ENOSYS.  Some functions are actually named
12341     something starting with __ and the normal name is an alias.  */
12342 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12343 choke me
12344 #else
12345 f = gdbm_open;
12346 #endif
12347
12348 ; return 0; }
12349 EOF
12350 if { (eval echo configure:12351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12351   rm -rf conftest*
12352   eval "ac_cv_func_gdbm_open=yes"
12353 else
12354   echo "configure: failed program was:" >&5
12355   cat conftest.$ac_ext >&5
12356   rm -rf conftest*
12357   eval "ac_cv_func_gdbm_open=no"
12358 fi
12359 rm -f conftest*
12360 fi
12361
12362 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12363   echo "$ac_t""yes" 1>&6
12364   ol_cv_lib_gdbm=yes
12365 else
12366   echo "$ac_t""no" 1>&6
12367
12368                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12369 echo "configure:12370: checking for gdbm_open in -lgdbm" >&5
12370 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12372   echo $ac_n "(cached) $ac_c" 1>&6
12373 else
12374   ac_save_LIBS="$LIBS"
12375 LIBS="-lgdbm  $LIBS"
12376 cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379 /* Override any gcc2 internal prototype to avoid an error.  */
12380 /* We use char because int might match the return type of a gcc2
12381     builtin and then its argument prototype would still apply.  */
12382 char gdbm_open();
12383
12384 int main() {
12385 gdbm_open()
12386 ; return 0; }
12387 EOF
12388 if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12389   rm -rf conftest*
12390   eval "ac_cv_lib_$ac_lib_var=yes"
12391 else
12392   echo "configure: failed program was:" >&5
12393   cat conftest.$ac_ext >&5
12394   rm -rf conftest*
12395   eval "ac_cv_lib_$ac_lib_var=no"
12396 fi
12397 rm -f conftest*
12398 LIBS="$ac_save_LIBS"
12399
12400 fi
12401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12402   echo "$ac_t""yes" 1>&6
12403   ol_cv_lib_gdbm=-lgdbm
12404 else
12405   echo "$ac_t""no" 1>&6
12406 ol_cv_lib_gdbm=no
12407 fi
12408
12409         
12410 fi
12411
12412         LIBS="$ol_LIBS"
12413
12414 fi
12415
12416 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12417
12418
12419  for ac_hdr in gdbm.h
12420 do
12421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12423 echo "configure:12424: checking for $ac_hdr" >&5
12424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12425   echo $ac_n "(cached) $ac_c" 1>&6
12426 else
12427   cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430 #include <$ac_hdr>
12431 EOF
12432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12433 { (eval echo configure:12434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12435 if test -z "$ac_err"; then
12436   rm -rf conftest*
12437   eval "ac_cv_header_$ac_safe=yes"
12438 else
12439   echo "$ac_err" >&5
12440   echo "configure: failed program was:" >&5
12441   cat conftest.$ac_ext >&5
12442   rm -rf conftest*
12443   eval "ac_cv_header_$ac_safe=no"
12444 fi
12445 rm -f conftest*
12446 fi
12447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12448   echo "$ac_t""yes" 1>&6
12449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12450   cat >> confdefs.h <<EOF
12451 #define $ac_tr_hdr 1
12452 EOF
12453  
12454 else
12455   echo "$ac_t""no" 1>&6
12456 fi
12457 done
12458
12459  echo $ac_n "checking for db""... $ac_c" 1>&6
12460 echo "configure:12461: checking for db" >&5
12461 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12462   echo $ac_n "(cached) $ac_c" 1>&6
12463 else
12464   
12465         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12466                 ol_cv_gdbm=no
12467         else
12468                 ol_cv_gdbm=yes
12469         fi
12470
12471 fi
12472
12473 echo "$ac_t""$ol_cv_gdbm" 1>&6
12474  if test $ol_cv_gdbm = yes ; then
12475         cat >> confdefs.h <<\EOF
12476 #define HAVE_GDBM 1
12477 EOF
12478
12479  fi
12480
12481
12482         if test $ol_cv_gdbm = yes ; then
12483                 ol_link_ldbm=gdbm
12484                 ol_with_ldbm_api=gdbm
12485
12486                 if test $ol_cv_lib_gdbm != yes ; then
12487                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12488                 fi
12489         fi
12490 fi
12491
12492 if test $ol_with_ldbm_api = ndbm ; then
12493         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12494 echo "configure:12495: checking for NDBM library" >&5
12495 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12496   echo $ac_n "(cached) $ac_c" 1>&6
12497 else
12498         ol_LIBS="$LIBS"
12499         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12500 echo "configure:12501: checking for dbm_open" >&5
12501 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12502   echo $ac_n "(cached) $ac_c" 1>&6
12503 else
12504   cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12507 /* System header to define __stub macros and hopefully few prototypes,
12508     which can conflict with char dbm_open(); below.  */
12509 #include <assert.h>
12510 /* Override any gcc2 internal prototype to avoid an error.  */
12511 /* We use char because int might match the return type of a gcc2
12512     builtin and then its argument prototype would still apply.  */
12513 char dbm_open();
12514 char (*f)();
12515
12516 int main() {
12517
12518 /* The GNU C library defines this for functions which it implements
12519     to always fail with ENOSYS.  Some functions are actually named
12520     something starting with __ and the normal name is an alias.  */
12521 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12522 choke me
12523 #else
12524 f = dbm_open;
12525 #endif
12526
12527 ; return 0; }
12528 EOF
12529 if { (eval echo configure:12530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12530   rm -rf conftest*
12531   eval "ac_cv_func_dbm_open=yes"
12532 else
12533   echo "configure: failed program was:" >&5
12534   cat conftest.$ac_ext >&5
12535   rm -rf conftest*
12536   eval "ac_cv_func_dbm_open=no"
12537 fi
12538 rm -f conftest*
12539 fi
12540
12541 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12542   echo "$ac_t""yes" 1>&6
12543   ol_cv_lib_ndbm=yes
12544 else
12545   echo "$ac_t""no" 1>&6
12546
12547                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12548 echo "configure:12549: checking for dbm_open in -lndbm" >&5
12549 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12551   echo $ac_n "(cached) $ac_c" 1>&6
12552 else
12553   ac_save_LIBS="$LIBS"
12554 LIBS="-lndbm  $LIBS"
12555 cat > conftest.$ac_ext <<EOF
12556 #line 12557 "configure"
12557 #include "confdefs.h"
12558 /* Override any gcc2 internal prototype to avoid an error.  */
12559 /* We use char because int might match the return type of a gcc2
12560     builtin and then its argument prototype would still apply.  */
12561 char dbm_open();
12562
12563 int main() {
12564 dbm_open()
12565 ; return 0; }
12566 EOF
12567 if { (eval echo configure:12568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12568   rm -rf conftest*
12569   eval "ac_cv_lib_$ac_lib_var=yes"
12570 else
12571   echo "configure: failed program was:" >&5
12572   cat conftest.$ac_ext >&5
12573   rm -rf conftest*
12574   eval "ac_cv_lib_$ac_lib_var=no"
12575 fi
12576 rm -f conftest*
12577 LIBS="$ac_save_LIBS"
12578
12579 fi
12580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12581   echo "$ac_t""yes" 1>&6
12582   ol_cv_lib_ndbm=-lndbm
12583 else
12584   echo "$ac_t""no" 1>&6
12585
12586                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12587 echo "configure:12588: checking for dbm_open in -ldbm" >&5
12588 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12589 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   ac_save_LIBS="$LIBS"
12593 LIBS="-ldbm  $LIBS"
12594 cat > conftest.$ac_ext <<EOF
12595 #line 12596 "configure"
12596 #include "confdefs.h"
12597 /* Override any gcc2 internal prototype to avoid an error.  */
12598 /* We use char because int might match the return type of a gcc2
12599     builtin and then its argument prototype would still apply.  */
12600 char dbm_open();
12601
12602 int main() {
12603 dbm_open()
12604 ; return 0; }
12605 EOF
12606 if { (eval echo configure:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12607   rm -rf conftest*
12608   eval "ac_cv_lib_$ac_lib_var=yes"
12609 else
12610   echo "configure: failed program was:" >&5
12611   cat conftest.$ac_ext >&5
12612   rm -rf conftest*
12613   eval "ac_cv_lib_$ac_lib_var=no"
12614 fi
12615 rm -f conftest*
12616 LIBS="$ac_save_LIBS"
12617
12618 fi
12619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12620   echo "$ac_t""yes" 1>&6
12621   ol_cv_lib_ndbm=-ldbm
12622 else
12623   echo "$ac_t""no" 1>&6
12624 ol_cv_lib_ndbm=no
12625 fi
12626                 
12627 fi
12628
12629         
12630 fi
12631
12632         LIBS="$ol_LIBS"
12633
12634 fi
12635
12636 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12637
12638
12639  for ac_hdr in ndbm.h
12640 do
12641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12643 echo "configure:12644: checking for $ac_hdr" >&5
12644 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12645   echo $ac_n "(cached) $ac_c" 1>&6
12646 else
12647   cat > conftest.$ac_ext <<EOF
12648 #line 12649 "configure"
12649 #include "confdefs.h"
12650 #include <$ac_hdr>
12651 EOF
12652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12653 { (eval echo configure:12654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12655 if test -z "$ac_err"; then
12656   rm -rf conftest*
12657   eval "ac_cv_header_$ac_safe=yes"
12658 else
12659   echo "$ac_err" >&5
12660   echo "configure: failed program was:" >&5
12661   cat conftest.$ac_ext >&5
12662   rm -rf conftest*
12663   eval "ac_cv_header_$ac_safe=no"
12664 fi
12665 rm -f conftest*
12666 fi
12667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12668   echo "$ac_t""yes" 1>&6
12669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12670   cat >> confdefs.h <<EOF
12671 #define $ac_tr_hdr 1
12672 EOF
12673  
12674 else
12675   echo "$ac_t""no" 1>&6
12676 fi
12677 done
12678
12679  echo $ac_n "checking for db""... $ac_c" 1>&6
12680 echo "configure:12681: checking for db" >&5
12681 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12682   echo $ac_n "(cached) $ac_c" 1>&6
12683 else
12684   
12685         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12686                 ol_cv_ndbm=no
12687         else
12688                 ol_cv_ndbm=yes
12689         fi
12690
12691 fi
12692
12693 echo "$ac_t""$ol_cv_ndbm" 1>&6
12694  if test $ol_cv_ndbm = yes ; then
12695         cat >> confdefs.h <<\EOF
12696 #define HAVE_NDBM 1
12697 EOF
12698
12699  fi
12700
12701
12702         if test $ol_cv_ndbm = yes ; then
12703                 ol_link_ldbm=ndbm
12704                 ol_with_ldbm_api=ndbm
12705
12706                 if test $ol_cv_lib_ndbm != yes ; then
12707                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12708                 fi
12709         fi
12710 fi
12711
12712 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12713         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12714         if test $ol_enable_ldbm = yes ; then
12715                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12716         fi
12717
12718         echo "configure: warning: disabling LDBM" 1>&2
12719         ol_enable_ldbm=no
12720 fi
12721
12722 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12723         LINK_BINS_DYNAMIC="yes"
12724 else
12725         LINK_BINS_DYNAMIC="no"
12726 fi
12727
12728 if test $ol_enable_wrappers != no ; then
12729         for ac_hdr in tcpd.h
12730 do
12731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12733 echo "configure:12734: checking for $ac_hdr" >&5
12734 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12735   echo $ac_n "(cached) $ac_c" 1>&6
12736 else
12737   cat > conftest.$ac_ext <<EOF
12738 #line 12739 "configure"
12739 #include "confdefs.h"
12740 #include <$ac_hdr>
12741 EOF
12742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12743 { (eval echo configure:12744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12745 if test -z "$ac_err"; then
12746   rm -rf conftest*
12747   eval "ac_cv_header_$ac_safe=yes"
12748 else
12749   echo "$ac_err" >&5
12750   echo "configure: failed program was:" >&5
12751   cat conftest.$ac_ext >&5
12752   rm -rf conftest*
12753   eval "ac_cv_header_$ac_safe=no"
12754 fi
12755 rm -f conftest*
12756 fi
12757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12758   echo "$ac_t""yes" 1>&6
12759     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12760   cat >> confdefs.h <<EOF
12761 #define $ac_tr_hdr 1
12762 EOF
12763  
12764 else
12765   echo "$ac_t""no" 1>&6
12766 fi
12767 done
12768
12769
12770         if test $ac_cv_header_tcpd_h != yes ; then
12771                 have_wrappers=no
12772         else
12773                 cat > conftest.$ac_ext <<EOF
12774 #line 12775 "configure"
12775 #include "confdefs.h"
12776
12777 int allow_severity = 0;
12778 int deny_severity  = 0;
12779                 
12780 int main() {
12781 hosts_access()
12782 ; return 0; }
12783 EOF
12784 if { (eval echo configure:12785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12785   rm -rf conftest*
12786   have_wrappers=yes
12787 else
12788   echo "configure: failed program was:" >&5
12789   cat conftest.$ac_ext >&5
12790   rm -rf conftest*
12791   have_wrappers=no
12792 fi
12793 rm -f conftest*
12794         fi
12795
12796         if test $have_wrappers = yes ; then
12797                 cat >> confdefs.h <<\EOF
12798 #define HAVE_TCPD 1
12799 EOF
12800
12801                 WRAP_LIBS="-lwrap"
12802
12803                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12804 echo "configure:12805: checking for main in -lnsl" >&5
12805 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12807   echo $ac_n "(cached) $ac_c" 1>&6
12808 else
12809   ac_save_LIBS="$LIBS"
12810 LIBS="-lnsl  $LIBS"
12811 cat > conftest.$ac_ext <<EOF
12812 #line 12813 "configure"
12813 #include "confdefs.h"
12814
12815 int main() {
12816 main()
12817 ; return 0; }
12818 EOF
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12820   rm -rf conftest*
12821   eval "ac_cv_lib_$ac_lib_var=yes"
12822 else
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   eval "ac_cv_lib_$ac_lib_var=no"
12827 fi
12828 rm -f conftest*
12829 LIBS="$ac_save_LIBS"
12830
12831 fi
12832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12833   echo "$ac_t""yes" 1>&6
12834     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12835     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12836   cat >> confdefs.h <<EOF
12837 #define $ac_tr_lib 1
12838 EOF
12839
12840   LIBS="-lnsl $LIBS"
12841
12842 else
12843   echo "$ac_t""no" 1>&6
12844 fi
12845
12846         else
12847                 echo "configure: warning: could not find -lwrap" 1>&2
12848                 if test $ol_enable_wrappers = yes ; then
12849                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12850                 fi
12851
12852                 echo "configure: warning: disabling wrappers support" 1>&2
12853                 ol_enable_wrappers=no
12854                 WRAP_LIBS=""
12855         fi
12856 fi
12857
12858 if test $ol_enable_syslog != no ; then
12859         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12860 echo "configure:12861: checking for openlog" >&5
12861 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12862   echo $ac_n "(cached) $ac_c" 1>&6
12863 else
12864   cat > conftest.$ac_ext <<EOF
12865 #line 12866 "configure"
12866 #include "confdefs.h"
12867 /* System header to define __stub macros and hopefully few prototypes,
12868     which can conflict with char openlog(); below.  */
12869 #include <assert.h>
12870 /* Override any gcc2 internal prototype to avoid an error.  */
12871 /* We use char because int might match the return type of a gcc2
12872     builtin and then its argument prototype would still apply.  */
12873 char openlog();
12874 char (*f)();
12875
12876 int main() {
12877
12878 /* The GNU C library defines this for functions which it implements
12879     to always fail with ENOSYS.  Some functions are actually named
12880     something starting with __ and the normal name is an alias.  */
12881 #if defined (__stub_openlog) || defined (__stub___openlog)
12882 choke me
12883 #else
12884 f = openlog;
12885 #endif
12886
12887 ; return 0; }
12888 EOF
12889 if { (eval echo configure:12890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12890   rm -rf conftest*
12891   eval "ac_cv_func_openlog=yes"
12892 else
12893   echo "configure: failed program was:" >&5
12894   cat conftest.$ac_ext >&5
12895   rm -rf conftest*
12896   eval "ac_cv_func_openlog=no"
12897 fi
12898 rm -f conftest*
12899 fi
12900
12901 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12902   echo "$ac_t""yes" 1>&6
12903   :
12904 else
12905   echo "$ac_t""no" 1>&6
12906 fi
12907
12908         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12909                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12910         fi
12911         ol_enable_syslog=$ac_cv_func_openlog
12912 fi
12913
12914 ol_link_termcap=no
12915 for ac_hdr in termcap.h ncurses.h
12916 do
12917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12919 echo "configure:12920: checking for $ac_hdr" >&5
12920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12921   echo $ac_n "(cached) $ac_c" 1>&6
12922 else
12923   cat > conftest.$ac_ext <<EOF
12924 #line 12925 "configure"
12925 #include "confdefs.h"
12926 #include <$ac_hdr>
12927 EOF
12928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12929 { (eval echo configure:12930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12931 if test -z "$ac_err"; then
12932   rm -rf conftest*
12933   eval "ac_cv_header_$ac_safe=yes"
12934 else
12935   echo "$ac_err" >&5
12936   echo "configure: failed program was:" >&5
12937   cat conftest.$ac_ext >&5
12938   rm -rf conftest*
12939   eval "ac_cv_header_$ac_safe=no"
12940 fi
12941 rm -f conftest*
12942 fi
12943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12944   echo "$ac_t""yes" 1>&6
12945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12946   cat >> confdefs.h <<EOF
12947 #define $ac_tr_hdr 1
12948 EOF
12949  
12950 else
12951   echo "$ac_t""no" 1>&6
12952 fi
12953 done
12954
12955
12956 if test $ol_link_termcap = no ; then
12957         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12958 echo "configure:12959: checking for tputs in -ltermcap" >&5
12959 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12961   echo $ac_n "(cached) $ac_c" 1>&6
12962 else
12963   ac_save_LIBS="$LIBS"
12964 LIBS="-ltermcap  $LIBS"
12965 cat > conftest.$ac_ext <<EOF
12966 #line 12967 "configure"
12967 #include "confdefs.h"
12968 /* Override any gcc2 internal prototype to avoid an error.  */
12969 /* We use char because int might match the return type of a gcc2
12970     builtin and then its argument prototype would still apply.  */
12971 char tputs();
12972
12973 int main() {
12974 tputs()
12975 ; return 0; }
12976 EOF
12977 if { (eval echo configure:12978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12978   rm -rf conftest*
12979   eval "ac_cv_lib_$ac_lib_var=yes"
12980 else
12981   echo "configure: failed program was:" >&5
12982   cat conftest.$ac_ext >&5
12983   rm -rf conftest*
12984   eval "ac_cv_lib_$ac_lib_var=no"
12985 fi
12986 rm -f conftest*
12987 LIBS="$ac_save_LIBS"
12988
12989 fi
12990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12991   echo "$ac_t""yes" 1>&6
12992   have_termcap=yes
12993 else
12994   echo "$ac_t""no" 1>&6
12995 have_termcap=no
12996 fi
12997
12998         if test $have_termcap = yes ; then
12999                 cat >> confdefs.h <<\EOF
13000 #define HAVE_TERMCAP 1
13001 EOF
13002
13003                 ol_link_termcap=yes
13004                 TERMCAP_LIBS=-ltermcap
13005         fi
13006 fi
13007
13008 if test $ol_link_termcap = no ; then
13009         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13010 echo "configure:13011: checking for initscr in -lncurses" >&5
13011 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13013   echo $ac_n "(cached) $ac_c" 1>&6
13014 else
13015   ac_save_LIBS="$LIBS"
13016 LIBS="-lncurses  $LIBS"
13017 cat > conftest.$ac_ext <<EOF
13018 #line 13019 "configure"
13019 #include "confdefs.h"
13020 /* Override any gcc2 internal prototype to avoid an error.  */
13021 /* We use char because int might match the return type of a gcc2
13022     builtin and then its argument prototype would still apply.  */
13023 char initscr();
13024
13025 int main() {
13026 initscr()
13027 ; return 0; }
13028 EOF
13029 if { (eval echo configure:13030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13030   rm -rf conftest*
13031   eval "ac_cv_lib_$ac_lib_var=yes"
13032 else
13033   echo "configure: failed program was:" >&5
13034   cat conftest.$ac_ext >&5
13035   rm -rf conftest*
13036   eval "ac_cv_lib_$ac_lib_var=no"
13037 fi
13038 rm -f conftest*
13039 LIBS="$ac_save_LIBS"
13040
13041 fi
13042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13043   echo "$ac_t""yes" 1>&6
13044   have_ncurses=yes
13045 else
13046   echo "$ac_t""no" 1>&6
13047 have_ncurses=no
13048 fi
13049
13050         if test $have_ncurses = yes ; then
13051                 cat >> confdefs.h <<\EOF
13052 #define HAVE_NCURSES 1
13053 EOF
13054
13055                 ol_link_termcap=yes
13056                 TERMCAP_LIBS=-lncurses
13057         fi
13058 fi
13059
13060 if test $ol_link_termcap = no ; then
13061         cat >> confdefs.h <<\EOF
13062 #define NO_TERMCAP 1
13063 EOF
13064
13065         TERMCAP_LIBS=
13066 fi
13067
13068 ol_link_sasl=no
13069 ol_link_spasswd=no
13070 if test $ol_with_cyrus_sasl != no ; then
13071         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13072 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13073 echo "configure:13074: checking for sasl.h" >&5
13074 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13075   echo $ac_n "(cached) $ac_c" 1>&6
13076 else
13077   cat > conftest.$ac_ext <<EOF
13078 #line 13079 "configure"
13079 #include "confdefs.h"
13080 #include <sasl.h>
13081 EOF
13082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13083 { (eval echo configure:13084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13085 if test -z "$ac_err"; then
13086   rm -rf conftest*
13087   eval "ac_cv_header_$ac_safe=yes"
13088 else
13089   echo "$ac_err" >&5
13090   echo "configure: failed program was:" >&5
13091   cat conftest.$ac_ext >&5
13092   rm -rf conftest*
13093   eval "ac_cv_header_$ac_safe=no"
13094 fi
13095 rm -f conftest*
13096 fi
13097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13098   echo "$ac_t""yes" 1>&6
13099   :
13100 else
13101   echo "$ac_t""no" 1>&6
13102 fi
13103
13104
13105         if test $ac_cv_header_sasl_h = yes ; then
13106                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13107 echo "configure:13108: checking for sasl_client_init in -lsasl" >&5
13108 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13110   echo $ac_n "(cached) $ac_c" 1>&6
13111 else
13112   ac_save_LIBS="$LIBS"
13113 LIBS="-lsasl  $LIBS"
13114 cat > conftest.$ac_ext <<EOF
13115 #line 13116 "configure"
13116 #include "confdefs.h"
13117 /* Override any gcc2 internal prototype to avoid an error.  */
13118 /* We use char because int might match the return type of a gcc2
13119     builtin and then its argument prototype would still apply.  */
13120 char sasl_client_init();
13121
13122 int main() {
13123 sasl_client_init()
13124 ; return 0; }
13125 EOF
13126 if { (eval echo configure:13127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13127   rm -rf conftest*
13128   eval "ac_cv_lib_$ac_lib_var=yes"
13129 else
13130   echo "configure: failed program was:" >&5
13131   cat conftest.$ac_ext >&5
13132   rm -rf conftest*
13133   eval "ac_cv_lib_$ac_lib_var=no"
13134 fi
13135 rm -f conftest*
13136 LIBS="$ac_save_LIBS"
13137
13138 fi
13139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13140   echo "$ac_t""yes" 1>&6
13141   have_cyrus_sasl=yes
13142 else
13143   echo "$ac_t""no" 1>&6
13144 have_cyrus_sasl=no
13145 fi
13146
13147
13148                 if test $have_cyrus_sasl != no ; then
13149                         SASL_LIBS="-lsasl"
13150                         cat >> confdefs.h <<\EOF
13151 #define HAVE_CYRUS_SASL 1
13152 EOF
13153
13154                         ol_link_sasl=yes
13155                 fi
13156         fi
13157
13158         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13159                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13160         fi
13161 fi
13162
13163 if test $cross_compiling != yes ; then
13164         dev=no
13165         if test -r /dev/urandom ; then
13166                 dev="/dev/urandom";
13167         elif test -r /idev/urandom ; then
13168                 dev="/idev/urandom";
13169         elif test -r /dev/srandom ; then
13170                 dev="/dev/srandom";
13171         elif test -r /dev/random ; then
13172                 dev="/dev/random";
13173         elif test -r /idev/random ; then
13174                 dev="/idev/random";
13175         fi
13176
13177         if test $dev != no ; then
13178                 cat >> confdefs.h <<EOF
13179 #define URANDOM_DEVICE "$dev"
13180 EOF
13181
13182         fi
13183 fi
13184
13185 ol_link_fetch=no
13186 if test $ol_with_fetch != no ; then
13187         ol_LIBS=$LIBS
13188 LIBS="-lfetch -lcom_err $LIBS"
13189 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13190 echo "configure:13191: checking fetch(3) library" >&5
13191 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13192   echo $ac_n "(cached) $ac_c" 1>&6
13193 else
13194   
13195         cat > conftest.$ac_ext <<EOF
13196 #line 13197 "configure"
13197 #include "confdefs.h"
13198
13199 #include <sys/param.h>
13200 #include <stdio.h>
13201 #include <fetch.h>
13202 int main() {
13203 struct url *u = fetchParseURL("file:///"); 
13204 ; return 0; }
13205 EOF
13206 if { (eval echo configure:13207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13207   rm -rf conftest*
13208   ol_cv_lib_fetch=yes
13209 else
13210   echo "configure: failed program was:" >&5
13211   cat conftest.$ac_ext >&5
13212   rm -rf conftest*
13213   ol_cv_lib_fetch=no
13214 fi
13215 rm -f conftest*
13216 fi
13217
13218 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13219 LIBS=$ol_LIBS
13220 if test $ol_cv_lib_fetch != no ; then
13221         ol_link_fetch="-lfetch -lcom_err"
13222         cat >> confdefs.h <<\EOF
13223 #define HAVE_FETCH 1
13224 EOF
13225
13226 fi
13227
13228
13229         if test $ol_cv_lib_fetch != no ; then
13230                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13231                 ol_link_fetch=freebsd
13232
13233         elif test $ol_with_fetch != auto ; then
13234                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13235         fi 
13236 fi
13237
13238 ol_link_readline=no
13239 if test $ol_with_readline != no ; then
13240         for ac_hdr in readline/readline.h readline/history.h
13241 do
13242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13244 echo "configure:13245: checking for $ac_hdr" >&5
13245 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13246   echo $ac_n "(cached) $ac_c" 1>&6
13247 else
13248   cat > conftest.$ac_ext <<EOF
13249 #line 13250 "configure"
13250 #include "confdefs.h"
13251 #include <$ac_hdr>
13252 EOF
13253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13254 { (eval echo configure:13255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13256 if test -z "$ac_err"; then
13257   rm -rf conftest*
13258   eval "ac_cv_header_$ac_safe=yes"
13259 else
13260   echo "$ac_err" >&5
13261   echo "configure: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   rm -rf conftest*
13264   eval "ac_cv_header_$ac_safe=no"
13265 fi
13266 rm -f conftest*
13267 fi
13268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13269   echo "$ac_t""yes" 1>&6
13270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13271   cat >> confdefs.h <<EOF
13272 #define $ac_tr_hdr 1
13273 EOF
13274  
13275 else
13276   echo "$ac_t""no" 1>&6
13277 fi
13278 done
13279
13280
13281         if test $ac_cv_header_readline_readline_h = yes ; then
13282                 save_LIBS="$LIBS"
13283                 LIBS="$TERMCAP_LIBS $LIBS"
13284                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13285 echo "configure:13286: checking for readline in -lreadline" >&5
13286 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13288   echo $ac_n "(cached) $ac_c" 1>&6
13289 else
13290   ac_save_LIBS="$LIBS"
13291 LIBS="-lreadline  $LIBS"
13292 cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 /* Override any gcc2 internal prototype to avoid an error.  */
13296 /* We use char because int might match the return type of a gcc2
13297     builtin and then its argument prototype would still apply.  */
13298 char readline();
13299
13300 int main() {
13301 readline()
13302 ; return 0; }
13303 EOF
13304 if { (eval echo configure:13305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13305   rm -rf conftest*
13306   eval "ac_cv_lib_$ac_lib_var=yes"
13307 else
13308   echo "configure: failed program was:" >&5
13309   cat conftest.$ac_ext >&5
13310   rm -rf conftest*
13311   eval "ac_cv_lib_$ac_lib_var=no"
13312 fi
13313 rm -f conftest*
13314 LIBS="$ac_save_LIBS"
13315
13316 fi
13317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13318   echo "$ac_t""yes" 1>&6
13319   have_readline=yes
13320 else
13321   echo "$ac_t""no" 1>&6
13322 have_readline=no
13323 fi
13324
13325                 LIBS="$save_LIBS"
13326                         
13327                 if test $have_readline = yes ; then
13328                         ol_with_readline=found
13329                         ol_link_readline=yes
13330
13331                         READLINE_LIBS="-lreadline"
13332                 fi
13333         fi
13334 fi
13335
13336 if test $ol_link_readline = yes ; then
13337         cat >> confdefs.h <<\EOF
13338 #define HAVE_READLINE 1
13339 EOF
13340
13341 fi
13342
13343
13344 if test $ol_enable_crypt != no ; then
13345         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13346 echo "configure:13347: checking for crypt" >&5
13347 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13348   echo $ac_n "(cached) $ac_c" 1>&6
13349 else
13350   cat > conftest.$ac_ext <<EOF
13351 #line 13352 "configure"
13352 #include "confdefs.h"
13353 /* System header to define __stub macros and hopefully few prototypes,
13354     which can conflict with char crypt(); below.  */
13355 #include <assert.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 crypt();
13360 char (*f)();
13361
13362 int main() {
13363
13364 /* The GNU C library defines this for functions which it implements
13365     to always fail with ENOSYS.  Some functions are actually named
13366     something starting with __ and the normal name is an alias.  */
13367 #if defined (__stub_crypt) || defined (__stub___crypt)
13368 choke me
13369 #else
13370 f = crypt;
13371 #endif
13372
13373 ; return 0; }
13374 EOF
13375 if { (eval echo configure:13376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13376   rm -rf conftest*
13377   eval "ac_cv_func_crypt=yes"
13378 else
13379   echo "configure: failed program was:" >&5
13380   cat conftest.$ac_ext >&5
13381   rm -rf conftest*
13382   eval "ac_cv_func_crypt=no"
13383 fi
13384 rm -f conftest*
13385 fi
13386
13387 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13388   echo "$ac_t""yes" 1>&6
13389   have_crypt=yes
13390 else
13391   echo "$ac_t""no" 1>&6
13392
13393                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13394 echo "configure:13395: checking for crypt in -lcrypt" >&5
13395 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13396 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13397   echo $ac_n "(cached) $ac_c" 1>&6
13398 else
13399   ac_save_LIBS="$LIBS"
13400 LIBS="-lcrypt  $LIBS"
13401 cat > conftest.$ac_ext <<EOF
13402 #line 13403 "configure"
13403 #include "confdefs.h"
13404 /* Override any gcc2 internal prototype to avoid an error.  */
13405 /* We use char because int might match the return type of a gcc2
13406     builtin and then its argument prototype would still apply.  */
13407 char crypt();
13408
13409 int main() {
13410 crypt()
13411 ; return 0; }
13412 EOF
13413 if { (eval echo configure:13414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13414   rm -rf conftest*
13415   eval "ac_cv_lib_$ac_lib_var=yes"
13416 else
13417   echo "configure: failed program was:" >&5
13418   cat conftest.$ac_ext >&5
13419   rm -rf conftest*
13420   eval "ac_cv_lib_$ac_lib_var=no"
13421 fi
13422 rm -f conftest*
13423 LIBS="$ac_save_LIBS"
13424
13425 fi
13426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13427   echo "$ac_t""yes" 1>&6
13428   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13429                         have_crypt=yes
13430 else
13431   echo "$ac_t""no" 1>&6
13432 have_crypt=no
13433 fi
13434
13435 fi
13436
13437
13438         if test $have_crypt = yes ; then
13439                 cat >> confdefs.h <<\EOF
13440 #define HAVE_CRYPT 1
13441 EOF
13442
13443         else
13444                 echo "configure: warning: could not find crypt" 1>&2
13445                 if test $ol_enable_crypt = yes ; then
13446                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13447                 fi
13448
13449                 echo "configure: warning: disabling crypt support" 1>&2
13450                 ol_enable_crypt=no
13451         fi
13452 fi
13453
13454 if test $ol_enable_proctitle != no ; then
13455         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13456 echo "configure:13457: checking for setproctitle" >&5
13457 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13458   echo $ac_n "(cached) $ac_c" 1>&6
13459 else
13460   cat > conftest.$ac_ext <<EOF
13461 #line 13462 "configure"
13462 #include "confdefs.h"
13463 /* System header to define __stub macros and hopefully few prototypes,
13464     which can conflict with char setproctitle(); below.  */
13465 #include <assert.h>
13466 /* Override any gcc2 internal prototype to avoid an error.  */
13467 /* We use char because int might match the return type of a gcc2
13468     builtin and then its argument prototype would still apply.  */
13469 char setproctitle();
13470 char (*f)();
13471
13472 int main() {
13473
13474 /* The GNU C library defines this for functions which it implements
13475     to always fail with ENOSYS.  Some functions are actually named
13476     something starting with __ and the normal name is an alias.  */
13477 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13478 choke me
13479 #else
13480 f = setproctitle;
13481 #endif
13482
13483 ; return 0; }
13484 EOF
13485 if { (eval echo configure:13486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13486   rm -rf conftest*
13487   eval "ac_cv_func_setproctitle=yes"
13488 else
13489   echo "configure: failed program was:" >&5
13490   cat conftest.$ac_ext >&5
13491   rm -rf conftest*
13492   eval "ac_cv_func_setproctitle=no"
13493 fi
13494 rm -f conftest*
13495 fi
13496
13497 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13498   echo "$ac_t""yes" 1>&6
13499   have_setproctitle=yes
13500 else
13501   echo "$ac_t""no" 1>&6
13502
13503                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13504 echo "configure:13505: checking for setproctitle in -lutil" >&5
13505 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13507   echo $ac_n "(cached) $ac_c" 1>&6
13508 else
13509   ac_save_LIBS="$LIBS"
13510 LIBS="-lutil  $LIBS"
13511 cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514 /* Override any gcc2 internal prototype to avoid an error.  */
13515 /* We use char because int might match the return type of a gcc2
13516     builtin and then its argument prototype would still apply.  */
13517 char setproctitle();
13518
13519 int main() {
13520 setproctitle()
13521 ; return 0; }
13522 EOF
13523 if { (eval echo configure:13524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13524   rm -rf conftest*
13525   eval "ac_cv_lib_$ac_lib_var=yes"
13526 else
13527   echo "configure: failed program was:" >&5
13528   cat conftest.$ac_ext >&5
13529   rm -rf conftest*
13530   eval "ac_cv_lib_$ac_lib_var=no"
13531 fi
13532 rm -f conftest*
13533 LIBS="$ac_save_LIBS"
13534
13535 fi
13536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13537   echo "$ac_t""yes" 1>&6
13538   have_setproctitle=yes
13539                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13540 else
13541   echo "$ac_t""no" 1>&6
13542 have_setproctitle=no
13543                         LIBOBJS="$LIBOBJS setproctitle.o"
13544                         LIBSRCS="$LIBSRCS setproctitle.c"
13545 fi
13546
13547 fi
13548
13549
13550         if test $have_setproctitle = yes ; then
13551                 cat >> confdefs.h <<\EOF
13552 #define HAVE_SETPROCTITLE 1
13553 EOF
13554
13555         fi
13556 fi
13557
13558 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13559 echo "configure:13560: checking for ANSI C header files" >&5
13560 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13561   echo $ac_n "(cached) $ac_c" 1>&6
13562 else
13563   cat > conftest.$ac_ext <<EOF
13564 #line 13565 "configure"
13565 #include "confdefs.h"
13566 #include <stdlib.h>
13567 #include <stdarg.h>
13568 #include <string.h>
13569 #include <float.h>
13570 EOF
13571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13572 { (eval echo configure:13573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13574 if test -z "$ac_err"; then
13575   rm -rf conftest*
13576   ac_cv_header_stdc=yes
13577 else
13578   echo "$ac_err" >&5
13579   echo "configure: failed program was:" >&5
13580   cat conftest.$ac_ext >&5
13581   rm -rf conftest*
13582   ac_cv_header_stdc=no
13583 fi
13584 rm -f conftest*
13585
13586 if test $ac_cv_header_stdc = yes; then
13587   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13588 cat > conftest.$ac_ext <<EOF
13589 #line 13590 "configure"
13590 #include "confdefs.h"
13591 #include <string.h>
13592 EOF
13593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13594   egrep "memchr" >/dev/null 2>&1; then
13595   :
13596 else
13597   rm -rf conftest*
13598   ac_cv_header_stdc=no
13599 fi
13600 rm -f conftest*
13601
13602 fi
13603
13604 if test $ac_cv_header_stdc = yes; then
13605   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13606 cat > conftest.$ac_ext <<EOF
13607 #line 13608 "configure"
13608 #include "confdefs.h"
13609 #include <stdlib.h>
13610 EOF
13611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13612   egrep "free" >/dev/null 2>&1; then
13613   :
13614 else
13615   rm -rf conftest*
13616   ac_cv_header_stdc=no
13617 fi
13618 rm -f conftest*
13619
13620 fi
13621
13622 if test $ac_cv_header_stdc = yes; then
13623   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13624 if test "$cross_compiling" = yes; then
13625   :
13626 else
13627   cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13630 #include <ctype.h>
13631 #if ((' ' & 0x0FF) == 0x020)
13632 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13633 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13634 #else
13635 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13636  || ('j' <= (c) && (c) <= 'r') \
13637  || ('s' <= (c) && (c) <= 'z'))
13638 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13639 #endif
13640 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13641 int main () { int i; for (i = 0; i < 256; i++)
13642 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13643 exit (0); }
13644
13645 EOF
13646 if { (eval echo configure:13647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13647 then
13648   :
13649 else
13650   echo "configure: failed program was:" >&5
13651   cat conftest.$ac_ext >&5
13652   rm -fr conftest*
13653   ac_cv_header_stdc=no
13654 fi
13655 rm -fr conftest*
13656 fi
13657
13658 fi
13659 fi
13660
13661 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13662 if test $ac_cv_header_stdc = yes; then
13663   cat >> confdefs.h <<\EOF
13664 #define STDC_HEADERS 1
13665 EOF
13666
13667 fi
13668
13669 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13670 echo "configure:13671: checking for mode_t" >&5
13671 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13672   echo $ac_n "(cached) $ac_c" 1>&6
13673 else
13674   cat > conftest.$ac_ext <<EOF
13675 #line 13676 "configure"
13676 #include "confdefs.h"
13677 #include <sys/types.h>
13678 #if STDC_HEADERS
13679 #include <stdlib.h>
13680 #include <stddef.h>
13681 #endif
13682
13683 EOF
13684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13685   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13686   rm -rf conftest*
13687   eval "ac_cv_type_mode_t=yes"
13688 else
13689   rm -rf conftest*
13690   eval "ac_cv_type_mode_t=no"
13691 fi
13692 rm -f conftest*
13693
13694 fi
13695 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13696   echo "$ac_t""yes" 1>&6
13697 else
13698   echo "$ac_t""no" 1>&6
13699   cat >> confdefs.h <<EOF
13700 #define mode_t int
13701 EOF
13702
13703 fi
13704
13705 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13706 echo "configure:13707: checking for off_t" >&5
13707 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13708   echo $ac_n "(cached) $ac_c" 1>&6
13709 else
13710   cat > conftest.$ac_ext <<EOF
13711 #line 13712 "configure"
13712 #include "confdefs.h"
13713 #include <sys/types.h>
13714 #if STDC_HEADERS
13715 #include <stdlib.h>
13716 #include <stddef.h>
13717 #endif
13718
13719 EOF
13720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13721   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13722   rm -rf conftest*
13723   eval "ac_cv_type_off_t=yes"
13724 else
13725   rm -rf conftest*
13726   eval "ac_cv_type_off_t=no"
13727 fi
13728 rm -f conftest*
13729
13730 fi
13731 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13732   echo "$ac_t""yes" 1>&6
13733 else
13734   echo "$ac_t""no" 1>&6
13735   cat >> confdefs.h <<EOF
13736 #define off_t long
13737 EOF
13738
13739 fi
13740
13741 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13742 echo "configure:13743: checking for pid_t" >&5
13743 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13744   echo $ac_n "(cached) $ac_c" 1>&6
13745 else
13746   cat > conftest.$ac_ext <<EOF
13747 #line 13748 "configure"
13748 #include "confdefs.h"
13749 #include <sys/types.h>
13750 #if STDC_HEADERS
13751 #include <stdlib.h>
13752 #include <stddef.h>
13753 #endif
13754
13755 EOF
13756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13757   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13758   rm -rf conftest*
13759   eval "ac_cv_type_pid_t=yes"
13760 else
13761   rm -rf conftest*
13762   eval "ac_cv_type_pid_t=no"
13763 fi
13764 rm -f conftest*
13765
13766 fi
13767 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13768   echo "$ac_t""yes" 1>&6
13769 else
13770   echo "$ac_t""no" 1>&6
13771   cat >> confdefs.h <<EOF
13772 #define pid_t int
13773 EOF
13774
13775 fi
13776
13777 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13778 echo "configure:13779: checking for ptrdiff_t" >&5
13779 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13780   echo $ac_n "(cached) $ac_c" 1>&6
13781 else
13782   cat > conftest.$ac_ext <<EOF
13783 #line 13784 "configure"
13784 #include "confdefs.h"
13785 #include <stddef.h>
13786 int main() {
13787 ptrdiff_t p
13788 ; return 0; }
13789 EOF
13790 if { (eval echo configure:13791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13791   rm -rf conftest*
13792   am_cv_type_ptrdiff_t=yes
13793 else
13794   echo "configure: failed program was:" >&5
13795   cat conftest.$ac_ext >&5
13796   rm -rf conftest*
13797   am_cv_type_ptrdiff_t=no
13798 fi
13799 rm -f conftest*
13800 fi
13801
13802 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13803    if test $am_cv_type_ptrdiff_t = yes; then
13804      cat >> confdefs.h <<\EOF
13805 #define HAVE_PTRDIFF_T 1
13806 EOF
13807
13808    fi
13809
13810 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13811 echo "configure:13812: checking return type of signal handlers" >&5
13812 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13813   echo $ac_n "(cached) $ac_c" 1>&6
13814 else
13815   cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818 #include <sys/types.h>
13819 #include <signal.h>
13820 #ifdef signal
13821 #undef signal
13822 #endif
13823 #ifdef __cplusplus
13824 extern "C" void (*signal (int, void (*)(int)))(int);
13825 #else
13826 void (*signal ()) ();
13827 #endif
13828
13829 int main() {
13830 int i;
13831 ; return 0; }
13832 EOF
13833 if { (eval echo configure:13834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13834   rm -rf conftest*
13835   ac_cv_type_signal=void
13836 else
13837   echo "configure: failed program was:" >&5
13838   cat conftest.$ac_ext >&5
13839   rm -rf conftest*
13840   ac_cv_type_signal=int
13841 fi
13842 rm -f conftest*
13843 fi
13844
13845 echo "$ac_t""$ac_cv_type_signal" 1>&6
13846 cat >> confdefs.h <<EOF
13847 #define RETSIGTYPE $ac_cv_type_signal
13848 EOF
13849
13850
13851 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13852 echo "configure:13853: checking for size_t" >&5
13853 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13854   echo $ac_n "(cached) $ac_c" 1>&6
13855 else
13856   cat > conftest.$ac_ext <<EOF
13857 #line 13858 "configure"
13858 #include "confdefs.h"
13859 #include <sys/types.h>
13860 #if STDC_HEADERS
13861 #include <stdlib.h>
13862 #include <stddef.h>
13863 #endif
13864
13865 EOF
13866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13867   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13868   rm -rf conftest*
13869   eval "ac_cv_type_size_t=yes"
13870 else
13871   rm -rf conftest*
13872   eval "ac_cv_type_size_t=no"
13873 fi
13874 rm -f conftest*
13875
13876 fi
13877 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13878   echo "$ac_t""yes" 1>&6
13879 else
13880   echo "$ac_t""no" 1>&6
13881   cat >> confdefs.h <<EOF
13882 #define size_t unsigned
13883 EOF
13884
13885 fi
13886
13887
13888 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13889 echo "configure:13890: checking for ssize_t" >&5
13890 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13891   echo $ac_n "(cached) $ac_c" 1>&6
13892 else
13893   cat > conftest.$ac_ext <<EOF
13894 #line 13895 "configure"
13895 #include "confdefs.h"
13896 #include <sys/types.h>
13897 #if STDC_HEADERS
13898 #include <stdlib.h>
13899 #include <stddef.h>
13900 #endif
13901
13902 EOF
13903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13904   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13905   rm -rf conftest*
13906   eval "ac_cv_type_ssize_t=yes"
13907 else
13908   rm -rf conftest*
13909   eval "ac_cv_type_ssize_t=no"
13910 fi
13911 rm -f conftest*
13912
13913 fi
13914 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13915   echo "$ac_t""yes" 1>&6
13916 else
13917   echo "$ac_t""no" 1>&6
13918   cat >> confdefs.h <<EOF
13919 #define ssize_t signed int
13920 EOF
13921
13922 fi
13923
13924 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13925 echo "configure:13926: checking for caddr_t" >&5
13926 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13927   echo $ac_n "(cached) $ac_c" 1>&6
13928 else
13929   cat > conftest.$ac_ext <<EOF
13930 #line 13931 "configure"
13931 #include "confdefs.h"
13932 #include <sys/types.h>
13933 #if STDC_HEADERS
13934 #include <stdlib.h>
13935 #include <stddef.h>
13936 #endif
13937
13938 EOF
13939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13940   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13941   rm -rf conftest*
13942   eval "ac_cv_type_caddr_t=yes"
13943 else
13944   rm -rf conftest*
13945   eval "ac_cv_type_caddr_t=no"
13946 fi
13947 rm -f conftest*
13948
13949 fi
13950 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13951   echo "$ac_t""yes" 1>&6
13952 else
13953   echo "$ac_t""no" 1>&6
13954   cat >> confdefs.h <<EOF
13955 #define caddr_t char *
13956 EOF
13957
13958 fi
13959
13960
13961 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13962 echo "configure:13963: checking for socklen_t" >&5
13963 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13964   echo $ac_n "(cached) $ac_c" 1>&6
13965 else
13966   cat > conftest.$ac_ext <<EOF
13967 #line 13968 "configure"
13968 #include "confdefs.h"
13969
13970 #ifdef HAVE_SYS_TYPES_H
13971 #include <sys/types.h>
13972 #endif
13973 #ifdef HAVE_SYS_SOCKET_H
13974 #include <sys/socket.h>
13975 #endif
13976
13977 int main() {
13978 socklen_t len;
13979 ; return 0; }
13980 EOF
13981 if { (eval echo configure:13982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13982   rm -rf conftest*
13983   ol_cv_type_socklen_t=yes
13984 else
13985   echo "configure: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   rm -rf conftest*
13988   ol_cv_type_socklen_t=no
13989 fi
13990 rm -f conftest*
13991 fi
13992
13993 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13994   if test $ol_cv_type_socklen_t = no; then
13995     cat >> confdefs.h <<\EOF
13996 #define socklen_t int
13997 EOF
13998
13999   fi
14000  
14001 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14002 echo "configure:14003: checking for member st_blksize in aggregate type struct stat" >&5
14003 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14004   echo $ac_n "(cached) $ac_c" 1>&6
14005 else
14006   cat > conftest.$ac_ext <<EOF
14007 #line 14008 "configure"
14008 #include "confdefs.h"
14009 #include <sys/types.h>
14010 #include <sys/stat.h>
14011 int main() {
14012 struct stat foo; foo.st_blksize;
14013 ; return 0; }
14014 EOF
14015 if { (eval echo configure:14016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14016   rm -rf conftest*
14017   ac_cv_c_struct_member_st_blksize=yes
14018 else
14019   echo "configure: failed program was:" >&5
14020   cat conftest.$ac_ext >&5
14021   rm -rf conftest*
14022   ac_cv_c_struct_member_st_blksize=no
14023 fi
14024 rm -f conftest*
14025 fi
14026
14027 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14028 st_blksize="$ac_cv_c_struct_member_st_blksize"
14029 if test $ac_cv_c_struct_member_st_blksize = yes; then
14030   cat >> confdefs.h <<\EOF
14031 #define HAVE_ST_BLKSIZE 1
14032 EOF
14033
14034 fi
14035
14036 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14037 echo "configure:14038: checking whether time.h and sys/time.h may both be included" >&5
14038 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14039   echo $ac_n "(cached) $ac_c" 1>&6
14040 else
14041   cat > conftest.$ac_ext <<EOF
14042 #line 14043 "configure"
14043 #include "confdefs.h"
14044 #include <sys/types.h>
14045 #include <sys/time.h>
14046 #include <time.h>
14047 int main() {
14048 struct tm *tp;
14049 ; return 0; }
14050 EOF
14051 if { (eval echo configure:14052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14052   rm -rf conftest*
14053   ac_cv_header_time=yes
14054 else
14055   echo "configure: failed program was:" >&5
14056   cat conftest.$ac_ext >&5
14057   rm -rf conftest*
14058   ac_cv_header_time=no
14059 fi
14060 rm -f conftest*
14061 fi
14062
14063 echo "$ac_t""$ac_cv_header_time" 1>&6
14064 if test $ac_cv_header_time = yes; then
14065   cat >> confdefs.h <<\EOF
14066 #define TIME_WITH_SYS_TIME 1
14067 EOF
14068
14069 fi
14070
14071 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14072 echo "configure:14073: checking whether struct tm is in sys/time.h or time.h" >&5
14073 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14074   echo $ac_n "(cached) $ac_c" 1>&6
14075 else
14076   cat > conftest.$ac_ext <<EOF
14077 #line 14078 "configure"
14078 #include "confdefs.h"
14079 #include <sys/types.h>
14080 #include <time.h>
14081 int main() {
14082 struct tm *tp; tp->tm_sec;
14083 ; return 0; }
14084 EOF
14085 if { (eval echo configure:14086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14086   rm -rf conftest*
14087   ac_cv_struct_tm=time.h
14088 else
14089   echo "configure: failed program was:" >&5
14090   cat conftest.$ac_ext >&5
14091   rm -rf conftest*
14092   ac_cv_struct_tm=sys/time.h
14093 fi
14094 rm -f conftest*
14095 fi
14096
14097 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14098 if test $ac_cv_struct_tm = sys/time.h; then
14099   cat >> confdefs.h <<\EOF
14100 #define TM_IN_SYS_TIME 1
14101 EOF
14102
14103 fi
14104
14105 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14106 echo "configure:14107: checking for uid_t in sys/types.h" >&5
14107 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14108   echo $ac_n "(cached) $ac_c" 1>&6
14109 else
14110   cat > conftest.$ac_ext <<EOF
14111 #line 14112 "configure"
14112 #include "confdefs.h"
14113 #include <sys/types.h>
14114 EOF
14115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14116   egrep "uid_t" >/dev/null 2>&1; then
14117   rm -rf conftest*
14118   ac_cv_type_uid_t=yes
14119 else
14120   rm -rf conftest*
14121   ac_cv_type_uid_t=no
14122 fi
14123 rm -f conftest*
14124
14125 fi
14126
14127 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14128 if test $ac_cv_type_uid_t = no; then
14129   cat >> confdefs.h <<\EOF
14130 #define uid_t int
14131 EOF
14132
14133   cat >> confdefs.h <<\EOF
14134 #define gid_t int
14135 EOF
14136
14137 fi
14138
14139 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14140 echo "configure:14141: checking for sig_atomic_t" >&5
14141 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14142   echo $ac_n "(cached) $ac_c" 1>&6
14143 else
14144   cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147 #include <signal.h>
14148 int main() {
14149 sig_atomic_t atomic;
14150 ; return 0; }
14151 EOF
14152 if { (eval echo configure:14153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14153   rm -rf conftest*
14154   ol_cv_type_sig_atomic_t=yes
14155 else
14156   echo "configure: failed program was:" >&5
14157   cat conftest.$ac_ext >&5
14158   rm -rf conftest*
14159   ol_cv_type_sig_atomic_t=no
14160 fi
14161 rm -f conftest*
14162 fi
14163
14164 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14165   if test $ol_cv_type_sig_atomic_t = no; then
14166     cat >> confdefs.h <<\EOF
14167 #define sig_atomic_t int
14168 EOF
14169
14170   fi
14171  
14172
14173
14174 # test for pw_gecos in struct passwd
14175 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14176 echo "configure:14177: checking struct passwd for pw_gecos" >&5
14177 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14178   echo $ac_n "(cached) $ac_c" 1>&6
14179 else
14180   
14181         cat > conftest.$ac_ext <<EOF
14182 #line 14183 "configure"
14183 #include "confdefs.h"
14184 #include <pwd.h>
14185 int main() {
14186
14187         struct passwd pwd;
14188         pwd.pw_gecos = pwd.pw_name;
14189
14190 ; return 0; }
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14193   rm -rf conftest*
14194   ol_cv_struct_passwd_pw_gecos=yes
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -rf conftest*
14199   ol_cv_struct_passwd_pw_gecos=no
14200 fi
14201 rm -f conftest*
14202 fi
14203
14204 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14205 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14206         cat >> confdefs.h <<\EOF
14207 #define HAVE_PW_GECOS 1
14208 EOF
14209
14210 fi
14211
14212 # test for pw_passwd in struct passwd
14213 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14214 echo "configure:14215: checking struct passwd for pw_passwd" >&5
14215 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14216   echo $ac_n "(cached) $ac_c" 1>&6
14217 else
14218   
14219         cat > conftest.$ac_ext <<EOF
14220 #line 14221 "configure"
14221 #include "confdefs.h"
14222 #include <pwd.h>
14223 int main() {
14224
14225         struct passwd pwd;
14226         pwd.pw_passwd = pwd.pw_name;
14227
14228 ; return 0; }
14229 EOF
14230 if { (eval echo configure:14231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14231   rm -rf conftest*
14232   ol_cv_struct_passwd_pw_passwd=yes
14233 else
14234   echo "configure: failed program was:" >&5
14235   cat conftest.$ac_ext >&5
14236   rm -rf conftest*
14237   ol_cv_struct_passwd_pw_passwd=no
14238 fi
14239 rm -f conftest*
14240 fi
14241
14242 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14243 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14244         cat >> confdefs.h <<\EOF
14245 #define HAVE_PW_PASSWD 1
14246 EOF
14247
14248 fi
14249
14250
14251 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14252 echo "configure:14253: checking if toupper() requires islower()" >&5
14253 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14254   echo $ac_n "(cached) $ac_c" 1>&6
14255 else
14256   
14257         if test "$cross_compiling" = yes; then
14258   ol_cv_c_upper_lower=safe
14259 else
14260   cat > conftest.$ac_ext <<EOF
14261 #line 14262 "configure"
14262 #include "confdefs.h"
14263
14264 #include <ctype.h>
14265 main()
14266 {
14267         if ('C' == toupper('C'))
14268                 exit(0);
14269         else
14270                 exit(1);
14271 }
14272 EOF
14273 if { (eval echo configure:14274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14274 then
14275   ol_cv_c_upper_lower=no
14276 else
14277   echo "configure: failed program was:" >&5
14278   cat conftest.$ac_ext >&5
14279   rm -fr conftest*
14280   ol_cv_c_upper_lower=yes
14281 fi
14282 rm -fr conftest*
14283 fi
14284
14285 fi
14286
14287 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14288 if test $ol_cv_c_upper_lower != no ; then
14289         cat >> confdefs.h <<\EOF
14290 #define C_UPPER_LOWER 1
14291 EOF
14292
14293 fi
14294
14295 echo $ac_n "checking for working const""... $ac_c" 1>&6
14296 echo "configure:14297: checking for working const" >&5
14297 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14298   echo $ac_n "(cached) $ac_c" 1>&6
14299 else
14300   cat > conftest.$ac_ext <<EOF
14301 #line 14302 "configure"
14302 #include "confdefs.h"
14303
14304 int main() {
14305
14306 /* Ultrix mips cc rejects this.  */
14307 typedef int charset[2]; const charset x;
14308 /* SunOS 4.1.1 cc rejects this.  */
14309 char const *const *ccp;
14310 char **p;
14311 /* NEC SVR4.0.2 mips cc rejects this.  */
14312 struct point {int x, y;};
14313 static struct point const zero = {0,0};
14314 /* AIX XL C 1.02.0.0 rejects this.
14315    It does not let you subtract one const X* pointer from another in an arm
14316    of an if-expression whose if-part is not a constant expression */
14317 const char *g = "string";
14318 ccp = &g + (g ? g-g : 0);
14319 /* HPUX 7.0 cc rejects these. */
14320 ++ccp;
14321 p = (char**) ccp;
14322 ccp = (char const *const *) p;
14323 { /* SCO 3.2v4 cc rejects this.  */
14324   char *t;
14325   char const *s = 0 ? (char *) 0 : (char const *) 0;
14326
14327   *t++ = 0;
14328 }
14329 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14330   int x[] = {25, 17};
14331   const int *foo = &x[0];
14332   ++foo;
14333 }
14334 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14335   typedef const int *iptr;
14336   iptr p = 0;
14337   ++p;
14338 }
14339 { /* AIX XL C 1.02.0.0 rejects this saying
14340      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14341   struct s { int j; const int *ap[3]; };
14342   struct s *b; b->j = 5;
14343 }
14344 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14345   const int foo = 10;
14346 }
14347
14348 ; return 0; }
14349 EOF
14350 if { (eval echo configure:14351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14351   rm -rf conftest*
14352   ac_cv_c_const=yes
14353 else
14354   echo "configure: failed program was:" >&5
14355   cat conftest.$ac_ext >&5
14356   rm -rf conftest*
14357   ac_cv_c_const=no
14358 fi
14359 rm -f conftest*
14360 fi
14361
14362 echo "$ac_t""$ac_cv_c_const" 1>&6
14363 if test $ac_cv_c_const = no; then
14364   cat >> confdefs.h <<\EOF
14365 #define const 
14366 EOF
14367
14368 fi
14369
14370 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14371 echo "configure:14372: checking if compiler understands volatile" >&5
14372 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14373   echo $ac_n "(cached) $ac_c" 1>&6
14374 else
14375   cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14378 int x, y, z;
14379 int main() {
14380 volatile int a; int * volatile b = x ? &y : &z;
14381       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14382       *b = 0;
14383 ; return 0; }
14384 EOF
14385 if { (eval echo configure:14386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14386   rm -rf conftest*
14387   ol_cv_c_volatile=yes
14388 else
14389   echo "configure: failed program was:" >&5
14390   cat conftest.$ac_ext >&5
14391   rm -rf conftest*
14392   ol_cv_c_volatile=no
14393 fi
14394 rm -f conftest*
14395 fi
14396
14397 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14398   if test $ol_cv_c_volatile = yes; then
14399     : 
14400   else
14401     cat >> confdefs.h <<\EOF
14402 #define volatile 
14403 EOF
14404
14405   fi
14406  
14407
14408 if test $cross_compiling = yes ; then
14409         cat >> confdefs.h <<\EOF
14410 #define CROSS_COMPILING 1
14411 EOF
14412
14413 else
14414         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14415 echo "configure:14416: checking whether byte ordering is bigendian" >&5
14416 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14417   echo $ac_n "(cached) $ac_c" 1>&6
14418 else
14419   ac_cv_c_bigendian=unknown
14420 # See if sys/param.h defines the BYTE_ORDER macro.
14421 cat > conftest.$ac_ext <<EOF
14422 #line 14423 "configure"
14423 #include "confdefs.h"
14424 #include <sys/types.h>
14425 #include <sys/param.h>
14426 int main() {
14427
14428 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14429  bogus endian macros
14430 #endif
14431 ; return 0; }
14432 EOF
14433 if { (eval echo configure:14434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14434   rm -rf conftest*
14435   # It does; now see whether it defined to BIG_ENDIAN or not.
14436 cat > conftest.$ac_ext <<EOF
14437 #line 14438 "configure"
14438 #include "confdefs.h"
14439 #include <sys/types.h>
14440 #include <sys/param.h>
14441 int main() {
14442
14443 #if BYTE_ORDER != BIG_ENDIAN
14444  not big endian
14445 #endif
14446 ; return 0; }
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14449   rm -rf conftest*
14450   ac_cv_c_bigendian=yes
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -rf conftest*
14455   ac_cv_c_bigendian=no
14456 fi
14457 rm -f conftest*
14458 else
14459   echo "configure: failed program was:" >&5
14460   cat conftest.$ac_ext >&5
14461 fi
14462 rm -f conftest*
14463 if test $ac_cv_c_bigendian = unknown; then
14464 if test "$cross_compiling" = yes; then
14465     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14466 else
14467   cat > conftest.$ac_ext <<EOF
14468 #line 14469 "configure"
14469 #include "confdefs.h"
14470 main () {
14471   /* Are we little or big endian?  From Harbison&Steele.  */
14472   union
14473   {
14474     long l;
14475     char c[sizeof (long)];
14476   } u;
14477   u.l = 1;
14478   exit (u.c[sizeof (long) - 1] == 1);
14479 }
14480 EOF
14481 if { (eval echo configure:14482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14482 then
14483   ac_cv_c_bigendian=no
14484 else
14485   echo "configure: failed program was:" >&5
14486   cat conftest.$ac_ext >&5
14487   rm -fr conftest*
14488   ac_cv_c_bigendian=yes
14489 fi
14490 rm -fr conftest*
14491 fi
14492
14493 fi
14494 fi
14495
14496 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14497 if test $ac_cv_c_bigendian = yes; then
14498   cat >> confdefs.h <<\EOF
14499 #define WORDS_BIGENDIAN 1
14500 EOF
14501
14502 fi
14503
14504 fi
14505
14506 echo $ac_n "checking size of short""... $ac_c" 1>&6
14507 echo "configure:14508: checking size of short" >&5 
14508 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14509   echo $ac_n "(cached) $ac_c" 1>&6
14510 else
14511   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14512   cat > conftest.$ac_ext <<EOF
14513 #line 14514 "configure"
14514 #include "confdefs.h"
14515 #include "confdefs.h" 
14516 #include <sys/types.h> 
14517  
14518
14519 int main() {
14520 switch (0) case 0: case (sizeof (short) == $ac_size):;
14521 ; return 0; }
14522 EOF
14523 if { (eval echo configure:14524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14524   rm -rf conftest*
14525   ac_cv_sizeof_short=$ac_size
14526 else
14527   echo "configure: failed program was:" >&5
14528   cat conftest.$ac_ext >&5
14529 fi
14530 rm -f conftest* 
14531   if test x$ac_cv_sizeof_short != x ; then break; fi 
14532 done 
14533
14534 fi
14535  
14536 if test x$ac_cv_sizeof_short = x ; then 
14537   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14538 fi 
14539 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14540 cat >> confdefs.h <<EOF
14541 #define SIZEOF_SHORT $ac_cv_sizeof_short
14542 EOF
14543  
14544  
14545 echo $ac_n "checking size of int""... $ac_c" 1>&6
14546 echo "configure:14547: checking size of int" >&5 
14547 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14548   echo $ac_n "(cached) $ac_c" 1>&6
14549 else
14550   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14551   cat > conftest.$ac_ext <<EOF
14552 #line 14553 "configure"
14553 #include "confdefs.h"
14554 #include "confdefs.h" 
14555 #include <sys/types.h> 
14556  
14557
14558 int main() {
14559 switch (0) case 0: case (sizeof (int) == $ac_size):;
14560 ; return 0; }
14561 EOF
14562 if { (eval echo configure:14563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14563   rm -rf conftest*
14564   ac_cv_sizeof_int=$ac_size
14565 else
14566   echo "configure: failed program was:" >&5
14567   cat conftest.$ac_ext >&5
14568 fi
14569 rm -f conftest* 
14570   if test x$ac_cv_sizeof_int != x ; then break; fi 
14571 done 
14572
14573 fi
14574  
14575 if test x$ac_cv_sizeof_int = x ; then 
14576   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14577 fi 
14578 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14579 cat >> confdefs.h <<EOF
14580 #define SIZEOF_INT $ac_cv_sizeof_int
14581 EOF
14582  
14583  
14584 echo $ac_n "checking size of long""... $ac_c" 1>&6
14585 echo "configure:14586: checking size of long" >&5 
14586 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14587   echo $ac_n "(cached) $ac_c" 1>&6
14588 else
14589   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14590   cat > conftest.$ac_ext <<EOF
14591 #line 14592 "configure"
14592 #include "confdefs.h"
14593 #include "confdefs.h" 
14594 #include <sys/types.h> 
14595  
14596
14597 int main() {
14598 switch (0) case 0: case (sizeof (long) == $ac_size):;
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14602   rm -rf conftest*
14603   ac_cv_sizeof_long=$ac_size
14604 else
14605   echo "configure: failed program was:" >&5
14606   cat conftest.$ac_ext >&5
14607 fi
14608 rm -f conftest* 
14609   if test x$ac_cv_sizeof_long != x ; then break; fi 
14610 done 
14611
14612 fi
14613  
14614 if test x$ac_cv_sizeof_long = x ; then 
14615   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14616 fi 
14617 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14618 cat >> confdefs.h <<EOF
14619 #define SIZEOF_LONG $ac_cv_sizeof_long
14620 EOF
14621  
14622
14623
14624 if test "$ac_cv_sizeof_int" -lt 4 ; then
14625         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14626
14627         cat >> confdefs.h <<\EOF
14628 #define LBER_INT_T long
14629 EOF
14630
14631 else
14632         cat >> confdefs.h <<\EOF
14633 #define LBER_INT_T int
14634 EOF
14635
14636 fi
14637
14638 cat >> confdefs.h <<\EOF
14639 #define LBER_LEN_T long
14640 EOF
14641
14642 cat >> confdefs.h <<\EOF
14643 #define LBER_SOCKET_T int
14644 EOF
14645
14646 cat >> confdefs.h <<\EOF
14647 #define LBER_TAG_T long
14648 EOF
14649
14650
14651 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14652 echo "configure:14653: checking for 8-bit clean memcmp" >&5
14653 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14654   echo $ac_n "(cached) $ac_c" 1>&6
14655 else
14656   if test "$cross_compiling" = yes; then
14657   ac_cv_func_memcmp_clean=no
14658 else
14659   cat > conftest.$ac_ext <<EOF
14660 #line 14661 "configure"
14661 #include "confdefs.h"
14662
14663 main()
14664 {
14665   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14666   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14667 }
14668
14669 EOF
14670 if { (eval echo configure:14671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14671 then
14672   ac_cv_func_memcmp_clean=yes
14673 else
14674   echo "configure: failed program was:" >&5
14675   cat conftest.$ac_ext >&5
14676   rm -fr conftest*
14677   ac_cv_func_memcmp_clean=no
14678 fi
14679 rm -fr conftest*
14680 fi
14681
14682 fi
14683
14684 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14685 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14686
14687 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14688 echo "configure:14689: checking for strftime" >&5
14689 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14690   echo $ac_n "(cached) $ac_c" 1>&6
14691 else
14692   cat > conftest.$ac_ext <<EOF
14693 #line 14694 "configure"
14694 #include "confdefs.h"
14695 /* System header to define __stub macros and hopefully few prototypes,
14696     which can conflict with char strftime(); below.  */
14697 #include <assert.h>
14698 /* Override any gcc2 internal prototype to avoid an error.  */
14699 /* We use char because int might match the return type of a gcc2
14700     builtin and then its argument prototype would still apply.  */
14701 char strftime();
14702 char (*f)();
14703
14704 int main() {
14705
14706 /* The GNU C library defines this for functions which it implements
14707     to always fail with ENOSYS.  Some functions are actually named
14708     something starting with __ and the normal name is an alias.  */
14709 #if defined (__stub_strftime) || defined (__stub___strftime)
14710 choke me
14711 #else
14712 f = strftime;
14713 #endif
14714
14715 ; return 0; }
14716 EOF
14717 if { (eval echo configure:14718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14718   rm -rf conftest*
14719   eval "ac_cv_func_strftime=yes"
14720 else
14721   echo "configure: failed program was:" >&5
14722   cat conftest.$ac_ext >&5
14723   rm -rf conftest*
14724   eval "ac_cv_func_strftime=no"
14725 fi
14726 rm -f conftest*
14727 fi
14728
14729 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14730   echo "$ac_t""yes" 1>&6
14731   cat >> confdefs.h <<\EOF
14732 #define HAVE_STRFTIME 1
14733 EOF
14734
14735 else
14736   echo "$ac_t""no" 1>&6
14737 # strftime is in -lintl on SCO UNIX.
14738 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14739 echo "configure:14740: checking for strftime in -lintl" >&5
14740 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14741 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14742   echo $ac_n "(cached) $ac_c" 1>&6
14743 else
14744   ac_save_LIBS="$LIBS"
14745 LIBS="-lintl  $LIBS"
14746 cat > conftest.$ac_ext <<EOF
14747 #line 14748 "configure"
14748 #include "confdefs.h"
14749 /* Override any gcc2 internal prototype to avoid an error.  */
14750 /* We use char because int might match the return type of a gcc2
14751     builtin and then its argument prototype would still apply.  */
14752 char strftime();
14753
14754 int main() {
14755 strftime()
14756 ; return 0; }
14757 EOF
14758 if { (eval echo configure:14759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14759   rm -rf conftest*
14760   eval "ac_cv_lib_$ac_lib_var=yes"
14761 else
14762   echo "configure: failed program was:" >&5
14763   cat conftest.$ac_ext >&5
14764   rm -rf conftest*
14765   eval "ac_cv_lib_$ac_lib_var=no"
14766 fi
14767 rm -f conftest*
14768 LIBS="$ac_save_LIBS"
14769
14770 fi
14771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14772   echo "$ac_t""yes" 1>&6
14773   cat >> confdefs.h <<\EOF
14774 #define HAVE_STRFTIME 1
14775 EOF
14776
14777 LIBS="-lintl $LIBS"
14778 else
14779   echo "$ac_t""no" 1>&6
14780 fi
14781
14782 fi
14783
14784
14785 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14786 echo "configure:14787: checking for inet_aton()" >&5
14787 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14788   echo $ac_n "(cached) $ac_c" 1>&6
14789 else
14790   cat > conftest.$ac_ext <<EOF
14791 #line 14792 "configure"
14792 #include "confdefs.h"
14793
14794 #ifdef HAVE_SYS_TYPES_H
14795 #       include <sys/types.h>
14796 #endif
14797 #ifdef HAVE_SYS_SOCKET_H
14798 #       include <sys/socket.h>
14799 #       ifdef HAVE_SYS_SELECT_H
14800 #               include <sys/select.h>
14801 #       endif
14802 #       include <netinet/in.h>
14803 #       ifdef HAVE_ARPA_INET_H
14804 #               include <arpa/inet.h>
14805 #       endif
14806 #endif
14807
14808 int main() {
14809 struct in_addr in;
14810 int rc = inet_aton( "255.255.255.255", &in );
14811 ; return 0; }
14812 EOF
14813 if { (eval echo configure:14814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14814   rm -rf conftest*
14815   ol_cv_func_inet_aton=yes
14816 else
14817   echo "configure: failed program was:" >&5
14818   cat conftest.$ac_ext >&5
14819   rm -rf conftest*
14820   ol_cv_func_inet_aton=no
14821 fi
14822 rm -f conftest*
14823 fi
14824
14825 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14826   if test $ol_cv_func_inet_aton != no; then
14827     cat >> confdefs.h <<\EOF
14828 #define HAVE_INET_ATON 1
14829 EOF
14830
14831   fi
14832  
14833
14834 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14835 echo "configure:14836: checking for _spawnlp" >&5
14836 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14837   echo $ac_n "(cached) $ac_c" 1>&6
14838 else
14839   cat > conftest.$ac_ext <<EOF
14840 #line 14841 "configure"
14841 #include "confdefs.h"
14842 /* System header to define __stub macros and hopefully few prototypes,
14843     which can conflict with char _spawnlp(); below.  */
14844 #include <assert.h>
14845 /* Override any gcc2 internal prototype to avoid an error.  */
14846 /* We use char because int might match the return type of a gcc2
14847     builtin and then its argument prototype would still apply.  */
14848 char _spawnlp();
14849 char (*f)();
14850
14851 int main() {
14852
14853 /* The GNU C library defines this for functions which it implements
14854     to always fail with ENOSYS.  Some functions are actually named
14855     something starting with __ and the normal name is an alias.  */
14856 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14857 choke me
14858 #else
14859 f = _spawnlp;
14860 #endif
14861
14862 ; return 0; }
14863 EOF
14864 if { (eval echo configure:14865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14865   rm -rf conftest*
14866   eval "ac_cv_func__spawnlp=yes"
14867 else
14868   echo "configure: failed program was:" >&5
14869   cat conftest.$ac_ext >&5
14870   rm -rf conftest*
14871   eval "ac_cv_func__spawnlp=no"
14872 fi
14873 rm -f conftest*
14874 fi
14875
14876 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14877   echo "$ac_t""yes" 1>&6
14878   cat >> confdefs.h <<\EOF
14879 #define HAVE_SPAWNLP 1
14880 EOF
14881
14882 else
14883   echo "$ac_t""no" 1>&6
14884 fi
14885
14886
14887 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14888 echo "configure:14889: checking for _snprintf" >&5
14889 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14890   echo $ac_n "(cached) $ac_c" 1>&6
14891 else
14892   cat > conftest.$ac_ext <<EOF
14893 #line 14894 "configure"
14894 #include "confdefs.h"
14895 /* System header to define __stub macros and hopefully few prototypes,
14896     which can conflict with char _snprintf(); below.  */
14897 #include <assert.h>
14898 /* Override any gcc2 internal prototype to avoid an error.  */
14899 /* We use char because int might match the return type of a gcc2
14900     builtin and then its argument prototype would still apply.  */
14901 char _snprintf();
14902 char (*f)();
14903
14904 int main() {
14905
14906 /* The GNU C library defines this for functions which it implements
14907     to always fail with ENOSYS.  Some functions are actually named
14908     something starting with __ and the normal name is an alias.  */
14909 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14910 choke me
14911 #else
14912 f = _snprintf;
14913 #endif
14914
14915 ; return 0; }
14916 EOF
14917 if { (eval echo configure:14918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14918   rm -rf conftest*
14919   eval "ac_cv_func__snprintf=yes"
14920 else
14921   echo "configure: failed program was:" >&5
14922   cat conftest.$ac_ext >&5
14923   rm -rf conftest*
14924   eval "ac_cv_func__snprintf=no"
14925 fi
14926 rm -f conftest*
14927 fi
14928
14929 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14930   echo "$ac_t""yes" 1>&6
14931   ac_cv_func_snprintf=yes
14932         cat >> confdefs.h <<\EOF
14933 #define snprintf _snprintf
14934 EOF
14935
14936
14937 else
14938   echo "$ac_t""no" 1>&6
14939 fi
14940
14941
14942 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14943 echo "configure:14944: checking for _vsnprintf" >&5
14944 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14945   echo $ac_n "(cached) $ac_c" 1>&6
14946 else
14947   cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 /* System header to define __stub macros and hopefully few prototypes,
14951     which can conflict with char _vsnprintf(); below.  */
14952 #include <assert.h>
14953 /* Override any gcc2 internal prototype to avoid an error.  */
14954 /* We use char because int might match the return type of a gcc2
14955     builtin and then its argument prototype would still apply.  */
14956 char _vsnprintf();
14957 char (*f)();
14958
14959 int main() {
14960
14961 /* The GNU C library defines this for functions which it implements
14962     to always fail with ENOSYS.  Some functions are actually named
14963     something starting with __ and the normal name is an alias.  */
14964 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14965 choke me
14966 #else
14967 f = _vsnprintf;
14968 #endif
14969
14970 ; return 0; }
14971 EOF
14972 if { (eval echo configure:14973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14973   rm -rf conftest*
14974   eval "ac_cv_func__vsnprintf=yes"
14975 else
14976   echo "configure: failed program was:" >&5
14977   cat conftest.$ac_ext >&5
14978   rm -rf conftest*
14979   eval "ac_cv_func__vsnprintf=no"
14980 fi
14981 rm -f conftest*
14982 fi
14983
14984 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14985   echo "$ac_t""yes" 1>&6
14986   ac_cv_func_vsnprintf=yes
14987         cat >> confdefs.h <<\EOF
14988 #define vsnprintf _vsnprintf
14989 EOF
14990
14991
14992 else
14993   echo "$ac_t""no" 1>&6
14994 fi
14995
14996
14997 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14998 echo "configure:14999: checking for vprintf" >&5
14999 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15000   echo $ac_n "(cached) $ac_c" 1>&6
15001 else
15002   cat > conftest.$ac_ext <<EOF
15003 #line 15004 "configure"
15004 #include "confdefs.h"
15005 /* System header to define __stub macros and hopefully few prototypes,
15006     which can conflict with char vprintf(); below.  */
15007 #include <assert.h>
15008 /* Override any gcc2 internal prototype to avoid an error.  */
15009 /* We use char because int might match the return type of a gcc2
15010     builtin and then its argument prototype would still apply.  */
15011 char vprintf();
15012 char (*f)();
15013
15014 int main() {
15015
15016 /* The GNU C library defines this for functions which it implements
15017     to always fail with ENOSYS.  Some functions are actually named
15018     something starting with __ and the normal name is an alias.  */
15019 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15020 choke me
15021 #else
15022 f = vprintf;
15023 #endif
15024
15025 ; return 0; }
15026 EOF
15027 if { (eval echo configure:15028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15028   rm -rf conftest*
15029   eval "ac_cv_func_vprintf=yes"
15030 else
15031   echo "configure: failed program was:" >&5
15032   cat conftest.$ac_ext >&5
15033   rm -rf conftest*
15034   eval "ac_cv_func_vprintf=no"
15035 fi
15036 rm -f conftest*
15037 fi
15038
15039 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15040   echo "$ac_t""yes" 1>&6
15041   cat >> confdefs.h <<\EOF
15042 #define HAVE_VPRINTF 1
15043 EOF
15044
15045 else
15046   echo "$ac_t""no" 1>&6
15047 fi
15048
15049 if test "$ac_cv_func_vprintf" != yes; then
15050 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15051 echo "configure:15052: checking for _doprnt" >&5
15052 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15053   echo $ac_n "(cached) $ac_c" 1>&6
15054 else
15055   cat > conftest.$ac_ext <<EOF
15056 #line 15057 "configure"
15057 #include "confdefs.h"
15058 /* System header to define __stub macros and hopefully few prototypes,
15059     which can conflict with char _doprnt(); below.  */
15060 #include <assert.h>
15061 /* Override any gcc2 internal prototype to avoid an error.  */
15062 /* We use char because int might match the return type of a gcc2
15063     builtin and then its argument prototype would still apply.  */
15064 char _doprnt();
15065 char (*f)();
15066
15067 int main() {
15068
15069 /* The GNU C library defines this for functions which it implements
15070     to always fail with ENOSYS.  Some functions are actually named
15071     something starting with __ and the normal name is an alias.  */
15072 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15073 choke me
15074 #else
15075 f = _doprnt;
15076 #endif
15077
15078 ; return 0; }
15079 EOF
15080 if { (eval echo configure:15081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15081   rm -rf conftest*
15082   eval "ac_cv_func__doprnt=yes"
15083 else
15084   echo "configure: failed program was:" >&5
15085   cat conftest.$ac_ext >&5
15086   rm -rf conftest*
15087   eval "ac_cv_func__doprnt=no"
15088 fi
15089 rm -f conftest*
15090 fi
15091
15092 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15093   echo "$ac_t""yes" 1>&6
15094   cat >> confdefs.h <<\EOF
15095 #define HAVE_DOPRNT 1
15096 EOF
15097
15098 else
15099   echo "$ac_t""no" 1>&6
15100 fi
15101
15102 fi
15103
15104
15105 if test $ac_cv_func_vprintf = yes ; then
15106                 for ac_func in vsnprintf vsprintf
15107 do
15108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15109 echo "configure:15110: checking for $ac_func" >&5
15110 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15111   echo $ac_n "(cached) $ac_c" 1>&6
15112 else
15113   cat > conftest.$ac_ext <<EOF
15114 #line 15115 "configure"
15115 #include "confdefs.h"
15116 /* System header to define __stub macros and hopefully few prototypes,
15117     which can conflict with char $ac_func(); below.  */
15118 #include <assert.h>
15119 /* Override any gcc2 internal prototype to avoid an error.  */
15120 /* We use char because int might match the return type of a gcc2
15121     builtin and then its argument prototype would still apply.  */
15122 char $ac_func();
15123 char (*f)();
15124
15125 int main() {
15126
15127 /* The GNU C library defines this for functions which it implements
15128     to always fail with ENOSYS.  Some functions are actually named
15129     something starting with __ and the normal name is an alias.  */
15130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15131 choke me
15132 #else
15133 f = $ac_func;
15134 #endif
15135
15136 ; return 0; }
15137 EOF
15138 if { (eval echo configure:15139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15139   rm -rf conftest*
15140   eval "ac_cv_func_$ac_func=yes"
15141 else
15142   echo "configure: failed program was:" >&5
15143   cat conftest.$ac_ext >&5
15144   rm -rf conftest*
15145   eval "ac_cv_func_$ac_func=no"
15146 fi
15147 rm -f conftest*
15148 fi
15149
15150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15151   echo "$ac_t""yes" 1>&6
15152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15153   cat >> confdefs.h <<EOF
15154 #define $ac_tr_func 1
15155 EOF
15156  
15157 else
15158   echo "$ac_t""no" 1>&6
15159 fi
15160 done
15161
15162 fi
15163
15164 for ac_func in \
15165         bcopy                   \
15166         closesocket             \
15167         chroot                  \
15168         endgrent                \
15169         endpwent                \
15170         flock                   \
15171         getdtablesize   \
15172         getgrgid                \
15173         gethostname             \
15174         getpass                 \
15175         getpassphrase   \
15176         getpwuid                \
15177         getpwnam                \
15178         getspnam                \
15179         gettimeofday    \
15180         initgroups              \
15181         lockf                   \
15182         memcpy                  \
15183         memmove                 \
15184         mkstemp                 \
15185         pipe                    \
15186         read                    \
15187         recv                    \
15188         recvfrom                \
15189         setpwfile               \
15190         setgid                  \
15191         setegid                 \
15192         setsid                  \
15193         setuid                  \
15194         seteuid                 \
15195         sigaction               \
15196         signal                  \
15197         sigset                  \
15198         snprintf                \
15199         strdup                  \
15200         strerror                \
15201         strpbrk                 \
15202         strrchr                 \
15203         strsep                  \
15204         strstr                  \
15205         strtol                  \
15206         strtoul                 \
15207         strspn                  \
15208         sysconf                 \
15209         waitpid                 \
15210         wait4                   \
15211         write                   \
15212         send                    \
15213         sendto                  \
15214
15215 do
15216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15217 echo "configure:15218: checking for $ac_func" >&5
15218 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15219   echo $ac_n "(cached) $ac_c" 1>&6
15220 else
15221   cat > conftest.$ac_ext <<EOF
15222 #line 15223 "configure"
15223 #include "confdefs.h"
15224 /* System header to define __stub macros and hopefully few prototypes,
15225     which can conflict with char $ac_func(); below.  */
15226 #include <assert.h>
15227 /* Override any gcc2 internal prototype to avoid an error.  */
15228 /* We use char because int might match the return type of a gcc2
15229     builtin and then its argument prototype would still apply.  */
15230 char $ac_func();
15231 char (*f)();
15232
15233 int main() {
15234
15235 /* The GNU C library defines this for functions which it implements
15236     to always fail with ENOSYS.  Some functions are actually named
15237     something starting with __ and the normal name is an alias.  */
15238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15239 choke me
15240 #else
15241 f = $ac_func;
15242 #endif
15243
15244 ; return 0; }
15245 EOF
15246 if { (eval echo configure:15247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15247   rm -rf conftest*
15248   eval "ac_cv_func_$ac_func=yes"
15249 else
15250   echo "configure: failed program was:" >&5
15251   cat conftest.$ac_ext >&5
15252   rm -rf conftest*
15253   eval "ac_cv_func_$ac_func=no"
15254 fi
15255 rm -f conftest*
15256 fi
15257
15258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15259   echo "$ac_t""yes" 1>&6
15260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15261   cat >> confdefs.h <<EOF
15262 #define $ac_tr_func 1
15263 EOF
15264  
15265 else
15266   echo "$ac_t""no" 1>&6
15267 fi
15268 done
15269
15270
15271 for ac_func in getopt tempnam
15272 do
15273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15274 echo "configure:15275: checking for $ac_func" >&5
15275 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15276   echo $ac_n "(cached) $ac_c" 1>&6
15277 else
15278   cat > conftest.$ac_ext <<EOF
15279 #line 15280 "configure"
15280 #include "confdefs.h"
15281 /* System header to define __stub macros and hopefully few prototypes,
15282     which can conflict with char $ac_func(); below.  */
15283 #include <assert.h>
15284 /* Override any gcc2 internal prototype to avoid an error.  */
15285 /* We use char because int might match the return type of a gcc2
15286     builtin and then its argument prototype would still apply.  */
15287 char $ac_func();
15288 char (*f)();
15289
15290 int main() {
15291
15292 /* The GNU C library defines this for functions which it implements
15293     to always fail with ENOSYS.  Some functions are actually named
15294     something starting with __ and the normal name is an alias.  */
15295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15296 choke me
15297 #else
15298 f = $ac_func;
15299 #endif
15300
15301 ; return 0; }
15302 EOF
15303 if { (eval echo configure:15304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15304   rm -rf conftest*
15305   eval "ac_cv_func_$ac_func=yes"
15306 else
15307   echo "configure: failed program was:" >&5
15308   cat conftest.$ac_ext >&5
15309   rm -rf conftest*
15310   eval "ac_cv_func_$ac_func=no"
15311 fi
15312 rm -f conftest*
15313 fi
15314
15315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15316   echo "$ac_t""yes" 1>&6
15317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15318   cat >> confdefs.h <<EOF
15319 #define $ac_tr_func 1
15320 EOF
15321  
15322 else
15323   echo "$ac_t""no" 1>&6
15324 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15325 fi
15326 done
15327
15328
15329
15330 if test "$ac_cv_func_getopt" != yes; then
15331     LIBSRCS="$LIBSRCS getopt.c"
15332 fi
15333
15334 if test "$ac_cv_func_tempnam" != yes; then
15335     LIBSRCS="$LIBSRCS tempnam.c"
15336 fi
15337
15338 # Check Configuration
15339 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15340 echo "configure:15341: checking declaration of sys_errlist" >&5
15341 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15342   echo $ac_n "(cached) $ac_c" 1>&6
15343 else
15344   
15345         cat > conftest.$ac_ext <<EOF
15346 #line 15347 "configure"
15347 #include "confdefs.h"
15348
15349 #include <stdio.h>
15350 #include <sys/types.h>
15351 #include <errno.h>
15352 #ifdef WINNT
15353 #include <stdlib.h>
15354 #endif 
15355 int main() {
15356 char *c = (char *) *sys_errlist
15357 ; return 0; }
15358 EOF
15359 if { (eval echo configure:15360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15360   rm -rf conftest*
15361   ol_cv_dcl_sys_errlist=yes
15362         ol_cv_have_sys_errlist=yes
15363 else
15364   echo "configure: failed program was:" >&5
15365   cat conftest.$ac_ext >&5
15366   rm -rf conftest*
15367   ol_cv_dcl_sys_errlist=no
15368 fi
15369 rm -f conftest*
15370 fi
15371
15372 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15373 #
15374 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15375 if test $ol_cv_dcl_sys_errlist = no ; then
15376         cat >> confdefs.h <<\EOF
15377 #define DECL_SYS_ERRLIST 1
15378 EOF
15379
15380
15381         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15382 echo "configure:15383: checking existence of sys_errlist" >&5
15383 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15384   echo $ac_n "(cached) $ac_c" 1>&6
15385 else
15386   
15387                 cat > conftest.$ac_ext <<EOF
15388 #line 15389 "configure"
15389 #include "confdefs.h"
15390 #include <errno.h>
15391 int main() {
15392 char *c = (char *) *sys_errlist
15393 ; return 0; }
15394 EOF
15395 if { (eval echo configure:15396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15396   rm -rf conftest*
15397   ol_cv_have_sys_errlist=yes
15398 else
15399   echo "configure: failed program was:" >&5
15400   cat conftest.$ac_ext >&5
15401   rm -rf conftest*
15402   ol_cv_have_sys_errlist=no
15403 fi
15404 rm -f conftest*
15405 fi
15406
15407 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15408 fi
15409 if test $ol_cv_have_sys_errlist = yes ; then
15410         cat >> confdefs.h <<\EOF
15411 #define HAVE_SYS_ERRLIST 1
15412 EOF
15413
15414 fi
15415
15416
15417
15418 if test "$ol_enable_debug" != no ; then
15419         cat >> confdefs.h <<\EOF
15420 #define LDAP_DEBUG 1
15421 EOF
15422
15423 fi
15424 if test "$ol_enable_syslog" = yes ; then
15425         cat >> confdefs.h <<\EOF
15426 #define LDAP_SYSLOG 1
15427 EOF
15428
15429 fi
15430 if test "$ol_enable_libui" = yes ; then
15431         cat >> confdefs.h <<\EOF
15432 #define LDAP_LIBUI 1
15433 EOF
15434
15435 fi
15436 if test "$ol_enable_cache" = no ; then
15437         cat >> confdefs.h <<\EOF
15438 #define LDAP_NOCACHE 1
15439 EOF
15440
15441 fi
15442 if test "$ol_link_kbind" != no ; then
15443         cat >> confdefs.h <<\EOF
15444 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15445 EOF
15446
15447 fi
15448 if test "$ol_enable_proctitle" != no ; then
15449         cat >> confdefs.h <<\EOF
15450 #define LDAP_PROCTITLE 1
15451 EOF
15452
15453 fi
15454 if test "$ol_enable_referrals" != no ; then
15455         cat >> confdefs.h <<\EOF
15456 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15457 EOF
15458
15459 fi
15460 if test "$ol_enable_cldap" != no ; then
15461         cat >> confdefs.h <<\EOF
15462 #define LDAP_CONNECTIONLESS 1
15463 EOF
15464
15465 fi
15466 if test "$ol_enable_unix" != no; then
15467         cat >> confdefs.h <<\EOF
15468 #define LDAP_PF_UNIX 1
15469 EOF
15470
15471 fi
15472 if test "$ol_enable_ipv6" != no; then
15473         cat >> confdefs.h <<\EOF
15474 #define LDAP_PF_INET6 1
15475 EOF
15476
15477 fi
15478 if test "$ol_enable_cleartext" != no ; then
15479         cat >> confdefs.h <<\EOF
15480 #define SLAPD_CLEARTEXT 1
15481 EOF
15482
15483 fi
15484 if test "$ol_enable_crypt" != no ; then
15485         cat >> confdefs.h <<\EOF
15486 #define SLAPD_CRYPT 1
15487 EOF
15488
15489 fi
15490 if test "$ol_link_kpasswd" != no ; then
15491         cat >> confdefs.h <<\EOF
15492 #define SLAPD_KPASSWD 1
15493 EOF
15494
15495 fi
15496 if test "$ol_link_spasswd" != no ; then
15497         cat >> confdefs.h <<\EOF
15498 #define SLAPD_SPASSWD 1
15499 EOF
15500
15501 fi
15502 if test "$ol_enable_multimaster" != no ; then
15503         cat >> confdefs.h <<\EOF
15504 #define SLAPD_MULTIMASTER 1
15505 EOF
15506
15507 fi
15508 if test "$ol_enable_phonetic" != no ; then
15509         cat >> confdefs.h <<\EOF
15510 #define SLAPD_PHONETIC 1
15511 EOF
15512
15513 fi
15514 if test "$ol_enable_rlookups" != no ; then
15515         cat >> confdefs.h <<\EOF
15516 #define SLAPD_RLOOKUPS 1
15517 EOF
15518
15519 fi
15520 if test "$ol_enable_aci" != no ; then
15521         cat >> confdefs.h <<\EOF
15522 #define SLAPD_ACI_ENABLED 1
15523 EOF
15524
15525 fi
15526
15527 if test "$ol_link_modules" != no ; then
15528         cat >> confdefs.h <<\EOF
15529 #define SLAPD_MODULES 1
15530 EOF
15531
15532         BUILD_SLAPD=yes
15533         SLAPD_MODULES_LDFLAGS="-dlopen self"
15534 fi
15535
15536 if test "$ol_link_dnssrv" != no ; then
15537         cat >> confdefs.h <<\EOF
15538 #define SLAPD_DNSSRV 1
15539 EOF
15540
15541         BUILD_SLAPD=yes
15542         BUILD_DNSSRV=yes
15543         if test "$ol_with_dnssrv_module" != static ; then
15544                 cat >> confdefs.h <<\EOF
15545 #define SLAPD_DNSSRV_DYNAMIC 1
15546 EOF
15547
15548                 BUILD_DNSSRV=mod
15549                 BUILD_DNSSRV_DYNAMIC=shared
15550                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15551         fi
15552 fi
15553
15554 if test "$ol_enable_ldap" != no ; then
15555         cat >> confdefs.h <<\EOF
15556 #define SLAPD_LDAP 1
15557 EOF
15558
15559         BUILD_SLAPD=yes
15560         BUILD_LDAP=yes
15561         if test "$ol_with_ldap_module" != static ; then
15562                 cat >> confdefs.h <<\EOF
15563 #define SLAPD_LDAP_DYNAMIC 1
15564 EOF
15565
15566                 BUILD_LDAP=mod
15567                 BUILD_LDAP_DYNAMIC=shared
15568                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15569         fi
15570 fi
15571
15572 if test "$ol_link_ldbm" != no ; then
15573         cat >> confdefs.h <<\EOF
15574 #define SLAPD_LDBM 1
15575 EOF
15576
15577         BUILD_SLAPD=yes
15578         BUILD_LDBM=yes
15579         if test "$ol_with_ldbm_module" != static ; then
15580                 cat >> confdefs.h <<\EOF
15581 #define SLAPD_LDBM_DYNAMIC 1
15582 EOF
15583
15584                 BUILD_LDBM=mod
15585                 BUILD_LDBM_DYNAMIC=shared
15586                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15587         fi
15588 fi
15589
15590 if test "$ol_enable_passwd" != no ; then
15591         cat >> confdefs.h <<\EOF
15592 #define SLAPD_PASSWD 1
15593 EOF
15594
15595         BUILD_SLAPD=yes
15596         BUILD_PASSWD=yes
15597         if test "$ol_with_passwd_module" != static ; then
15598                 cat >> confdefs.h <<\EOF
15599 #define SLAPD_PASSWD_DYNAMIC 1
15600 EOF
15601
15602                 BUILD_PASSWD=mod
15603                 BUILD_PASSWD_DYNAMIC=shared
15604                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15605         fi
15606 fi
15607
15608 if test "$ol_enable_shell" != no ; then
15609         cat >> confdefs.h <<\EOF
15610 #define SLAPD_SHELL 1
15611 EOF
15612
15613         BUILD_SLAPD=yes
15614         BUILD_SHELL=yes
15615         if test "$ol_with_shell_module" != static ; then
15616                 cat >> confdefs.h <<\EOF
15617 #define SLAPD_SHELL_DYNAMIC 1
15618 EOF
15619
15620                 BUILD_SHELL=mod
15621                 BUILD_SHELL_DYNAMIC=shared
15622                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15623         fi
15624 fi
15625
15626 if test "$ol_enable_sql" != no ; then
15627         cat >> confdefs.h <<\EOF
15628 #define SLAPD_SQL 1
15629 EOF
15630
15631         BUILD_SLAPD=yes
15632         BUILD_SQL=yes
15633         SLAPD_SQL_LIBS=-liodbc
15634         if test "$ol_with_sql_module" != static; then
15635                 cat >> confdefs.h <<\EOF
15636 #define SLAPD_SQL_DYNAMIC 1
15637 EOF
15638
15639                 BUILD_SQL=mod
15640                 BUILD_SQL_DYNAMIC=shared
15641                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15642         fi
15643 fi
15644
15645 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15646         $BUILD_SLAPD = yes ; then
15647         BUILD_SLURPD=yes
15648 fi
15649
15650
15651 if test "$LINK_BINS_DYNAMIC" = yes; then
15652     LIB_LINKAGE=DYN
15653     LT_LIB_LINKAGE=shared
15654 else
15655     LIB_LINKAGE=STAT
15656     LT_LIB_LINKAGE=static
15657 fi
15658
15659 if test "$ac_cv_mingw32" = yes ; then
15660     PLAT=NT
15661     DYN_EXT=dll
15662 else
15663     PLAT=UNIX
15664     DYN_EXT=so
15665 fi
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675   
15676   
15677   
15678   
15679   
15680   
15681   
15682   
15683   
15684   
15685   
15686   
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717 trap '' 1 2 15
15718
15719 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15720
15721 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15722 # Let make expand exec_prefix.
15723 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15724
15725 # Any assignment to VPATH causes Sun make to only execute
15726 # the first set of double-colon rules, so remove it if not needed.
15727 # If there is a colon in the path, we need to keep it.
15728 if test "x$srcdir" = x.; then
15729   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15730 fi
15731
15732 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15733
15734 DEFS=-DHAVE_CONFIG_H
15735
15736 # Without the "./", some shells look in PATH for config.status.
15737 : ${CONFIG_STATUS=./config.status}
15738
15739 echo creating $CONFIG_STATUS
15740 rm -f $CONFIG_STATUS
15741 cat > $CONFIG_STATUS <<EOF
15742 #! /bin/sh
15743 # Generated automatically by configure.
15744 # Run this file to recreate the current configuration.
15745 # This directory was configured as follows,
15746 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15747 #
15748 # $0 $ac_configure_args
15749 #
15750 # Compiler output produced by configure, useful for debugging
15751 # configure, is in ./config.log if it exists.
15752
15753 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15754 for ac_option
15755 do
15756   case "\$ac_option" in
15757   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15758     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15759     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15760   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15761     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15762     exit 0 ;;
15763   -help | --help | --hel | --he | --h)
15764     echo "\$ac_cs_usage"; exit 0 ;;
15765   *) echo "\$ac_cs_usage"; exit 1 ;;
15766   esac
15767 done
15768
15769 ac_given_srcdir=$srcdir
15770 ac_given_INSTALL="$INSTALL"
15771
15772 trap 'rm -fr `echo "\
15773 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15774 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15775 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15776 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15777 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15778 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15779 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15780 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15781 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15782 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15783 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15784 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15785 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15786 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15787 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15788 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15789 include/Makefile:build/top.mk:include/Makefile.in \
15790 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15791 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15792 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15793 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15794 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15795 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15796 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15797 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15798 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15799 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15800 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15801 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15802 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15803 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15804 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15805 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15806 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15807 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15808 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15809 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15810 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15811 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15812 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15813 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15814 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15815  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15816 EOF
15817 cat >> $CONFIG_STATUS <<EOF
15818
15819 # Protect against being on the right side of a sed subst in config.status.
15820 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15821  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15822 $ac_vpsub
15823 $extrasub
15824 s%@SHELL@%$SHELL%g
15825 s%@CFLAGS@%$CFLAGS%g
15826 s%@CPPFLAGS@%$CPPFLAGS%g
15827 s%@CXXFLAGS@%$CXXFLAGS%g
15828 s%@FFLAGS@%$FFLAGS%g
15829 s%@DEFS@%$DEFS%g
15830 s%@LDFLAGS@%$LDFLAGS%g
15831 s%@LIBS@%$LIBS%g
15832 s%@exec_prefix@%$exec_prefix%g
15833 s%@prefix@%$prefix%g
15834 s%@program_transform_name@%$program_transform_name%g
15835 s%@bindir@%$bindir%g
15836 s%@sbindir@%$sbindir%g
15837 s%@libexecdir@%$libexecdir%g
15838 s%@datadir@%$datadir%g
15839 s%@sysconfdir@%$sysconfdir%g
15840 s%@sharedstatedir@%$sharedstatedir%g
15841 s%@localstatedir@%$localstatedir%g
15842 s%@libdir@%$libdir%g
15843 s%@includedir@%$includedir%g
15844 s%@oldincludedir@%$oldincludedir%g
15845 s%@infodir@%$infodir%g
15846 s%@mandir@%$mandir%g
15847 s%@host@%$host%g
15848 s%@host_alias@%$host_alias%g
15849 s%@host_cpu@%$host_cpu%g
15850 s%@host_vendor@%$host_vendor%g
15851 s%@host_os@%$host_os%g
15852 s%@target@%$target%g
15853 s%@target_alias@%$target_alias%g
15854 s%@target_cpu@%$target_cpu%g
15855 s%@target_vendor@%$target_vendor%g
15856 s%@target_os@%$target_os%g
15857 s%@build@%$build%g
15858 s%@build_alias@%$build_alias%g
15859 s%@build_cpu@%$build_cpu%g
15860 s%@build_vendor@%$build_vendor%g
15861 s%@build_os@%$build_os%g
15862 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15863 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15864 s%@INSTALL_DATA@%$INSTALL_DATA%g
15865 s%@PACKAGE@%$PACKAGE%g
15866 s%@VERSION@%$VERSION%g
15867 s%@ACLOCAL@%$ACLOCAL%g
15868 s%@AUTOCONF@%$AUTOCONF%g
15869 s%@AUTOMAKE@%$AUTOMAKE%g
15870 s%@AUTOHEADER@%$AUTOHEADER%g
15871 s%@MAKEINFO@%$MAKEINFO%g
15872 s%@install_sh@%$install_sh%g
15873 s%@AMTAR@%$AMTAR%g
15874 s%@AWK@%$AWK%g
15875 s%@AMTARFLAGS@%$AMTARFLAGS%g
15876 s%@SET_MAKE@%$SET_MAKE%g
15877 s%@top_builddir@%$top_builddir%g
15878 s%@ldap_subdir@%$ldap_subdir%g
15879 s%@CC@%$CC%g
15880 s%@RANLIB@%$RANLIB%g
15881 s%@LN_S@%$LN_S%g
15882 s%@DLLTOOL@%$DLLTOOL%g
15883 s%@AS@%$AS%g
15884 s%@OBJDUMP@%$OBJDUMP%g
15885 s%@LIBTOOL@%$LIBTOOL%g
15886 s%@LN_H@%$LN_H%g
15887 s%@SENDMAIL@%$SENDMAIL%g
15888 s%@EDITOR@%$EDITOR%g
15889 s%@FINGER@%$FINGER%g
15890 s%@CPP@%$CPP%g
15891 s%@EXEEXT@%$EXEEXT%g
15892 s%@OBJEXT@%$OBJEXT%g
15893 s%@OL_MKDEP@%$OL_MKDEP%g
15894 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15895 s%@LIBOBJS@%$LIBOBJS%g
15896 s%@LIBSRCS@%$LIBSRCS%g
15897 s%@PLAT@%$PLAT%g
15898 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15899 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15900 s%@DYN_EXT@%$DYN_EXT%g
15901 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15902 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
15903 s%@BUILD_LDAP@%$BUILD_LDAP%g
15904 s%@BUILD_LDBM@%$BUILD_LDBM%g
15905 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15906 s%@BUILD_SHELL@%$BUILD_SHELL%g
15907 s%@BUILD_SQL@%$BUILD_SQL%g
15908 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
15909 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15910 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15911 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15912 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15913 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
15914 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15915 s%@LDAP_LIBS@%$LDAP_LIBS%g
15916 s%@LDIF_LIBS@%$LDIF_LIBS%g
15917 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15918 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15919 s%@LDBM_LIBS@%$LDBM_LIBS%g
15920 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15921 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15922 s%@WRAP_LIBS@%$WRAP_LIBS%g
15923 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15924 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15925 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15926 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15927 s%@KRB4_LIBS@%$KRB4_LIBS%g
15928 s%@KRB5_LIBS@%$KRB5_LIBS%g
15929 s%@READLINE_LIBS@%$READLINE_LIBS%g
15930 s%@SASL_LIBS@%$SASL_LIBS%g
15931 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15932 s%@TLS_LIBS@%$TLS_LIBS%g
15933 s%@MODULES_LIBS@%$MODULES_LIBS%g
15934 s%@AUTH_LIBS@%$AUTH_LIBS%g
15935 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
15936 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
15937 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
15938
15939 CEOF
15940 EOF
15941
15942 cat >> $CONFIG_STATUS <<\EOF
15943
15944 # Split the substitutions into bite-sized pieces for seds with
15945 # small command number limits, like on Digital OSF/1 and HP-UX.
15946 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15947 ac_file=1 # Number of current file.
15948 ac_beg=1 # First line for current file.
15949 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15950 ac_more_lines=:
15951 ac_sed_cmds=""
15952 while $ac_more_lines; do
15953   if test $ac_beg -gt 1; then
15954     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15955   else
15956     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15957   fi
15958   if test ! -s conftest.s$ac_file; then
15959     ac_more_lines=false
15960     rm -f conftest.s$ac_file
15961   else
15962     if test -z "$ac_sed_cmds"; then
15963       ac_sed_cmds="sed -f conftest.s$ac_file"
15964     else
15965       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15966     fi
15967     ac_file=`expr $ac_file + 1`
15968     ac_beg=$ac_end
15969     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15970   fi
15971 done
15972 if test -z "$ac_sed_cmds"; then
15973   ac_sed_cmds=cat
15974 fi
15975 EOF
15976
15977 cat >> $CONFIG_STATUS <<EOF
15978
15979 CONFIG_FILES=\${CONFIG_FILES-"\
15980 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15981 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15982 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15983 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15984 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15985 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15986 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15987 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15988 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15989 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15990 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15991 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15992 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15993 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15994 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15995 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15996 include/Makefile:build/top.mk:include/Makefile.in \
15997 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15998 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15999 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16000 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16001 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16002 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16003 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16004 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16005 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16006 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16007 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16008 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16009 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16010 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16011 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16012 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16013 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16014 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16015 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16016 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16017 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16018 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16019 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16020 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16021 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16022 "}
16023 EOF
16024 cat >> $CONFIG_STATUS <<\EOF
16025 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16026   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16027   case "$ac_file" in
16028   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16029        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16030   *) ac_file_in="${ac_file}.in" ;;
16031   esac
16032
16033   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16034
16035   # Remove last slash and all that follows it.  Not all systems have dirname.
16036   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16037   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16038     # The file is in a subdirectory.
16039     test ! -d "$ac_dir" && mkdir "$ac_dir"
16040     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16041     # A "../" for each directory in $ac_dir_suffix.
16042     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16043   else
16044     ac_dir_suffix= ac_dots=
16045   fi
16046
16047   case "$ac_given_srcdir" in
16048   .)  srcdir=.
16049       if test -z "$ac_dots"; then top_srcdir=.
16050       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16051   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16052   *) # Relative path.
16053     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16054     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16055   esac
16056
16057   case "$ac_given_INSTALL" in
16058   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16059   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16060   esac
16061
16062   echo creating "$ac_file"
16063   rm -f "$ac_file"
16064   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16065   case "$ac_file" in
16066   *[Mm]akefile*) ac_comsub="1i\\
16067 # $configure_input" ;;
16068   *) ac_comsub= ;;
16069   esac
16070
16071   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16072   sed -e "$ac_comsub
16073 s%@configure_input@%$configure_input%g
16074 s%@srcdir@%$srcdir%g
16075 s%@top_srcdir@%$top_srcdir%g
16076 s%@INSTALL@%$INSTALL%g
16077 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16078 fi; done
16079 rm -f conftest.s*
16080
16081 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16082 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16083 #
16084 # ac_d sets the value in "#define NAME VALUE" lines.
16085 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16086 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16087 ac_dC='\3'
16088 ac_dD='%g'
16089 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16090 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16091 ac_uB='\([      ]\)%\1#\2define\3'
16092 ac_uC=' '
16093 ac_uD='\4%g'
16094 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16095 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16096 ac_eB='$%\1#\2define\3'
16097 ac_eC=' '
16098 ac_eD='%g'
16099
16100 if test "${CONFIG_HEADERS+set}" != set; then
16101 EOF
16102 cat >> $CONFIG_STATUS <<EOF
16103   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16104 EOF
16105 cat >> $CONFIG_STATUS <<\EOF
16106 fi
16107 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16108   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16109   case "$ac_file" in
16110   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16111        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16112   *) ac_file_in="${ac_file}.in" ;;
16113   esac
16114
16115   echo creating $ac_file
16116
16117   rm -f conftest.frag conftest.in conftest.out
16118   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16119   cat $ac_file_inputs > conftest.in
16120
16121 EOF
16122
16123 # Transform confdefs.h into a sed script conftest.vals that substitutes
16124 # the proper values into config.h.in to produce config.h.  And first:
16125 # Protect against being on the right side of a sed subst in config.status.
16126 # Protect against being in an unquoted here document in config.status.
16127 rm -f conftest.vals
16128 cat > conftest.hdr <<\EOF
16129 s/[\\&%]/\\&/g
16130 s%[\\$`]%\\&%g
16131 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16132 s%ac_d%ac_u%gp
16133 s%ac_u%ac_e%gp
16134 EOF
16135 sed -n -f conftest.hdr confdefs.h > conftest.vals
16136 rm -f conftest.hdr
16137
16138 # This sed command replaces #undef with comments.  This is necessary, for
16139 # example, in the case of _POSIX_SOURCE, which is predefined and required
16140 # on some systems where configure will not decide to define it.
16141 cat >> conftest.vals <<\EOF
16142 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16143 EOF
16144
16145 # Break up conftest.vals because some shells have a limit on
16146 # the size of here documents, and old seds have small limits too.
16147
16148 rm -f conftest.tail
16149 while :
16150 do
16151   ac_lines=`grep -c . conftest.vals`
16152   # grep -c gives empty output for an empty file on some AIX systems.
16153   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16154   # Write a limited-size here document to conftest.frag.
16155   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16156   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16157   echo 'CEOF
16158   sed -f conftest.frag conftest.in > conftest.out
16159   rm -f conftest.in
16160   mv conftest.out conftest.in
16161 ' >> $CONFIG_STATUS
16162   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16163   rm -f conftest.vals
16164   mv conftest.tail conftest.vals
16165 done
16166 rm -f conftest.vals
16167
16168 cat >> $CONFIG_STATUS <<\EOF
16169   rm -f conftest.frag conftest.h
16170   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16171   cat conftest.in >> conftest.h
16172   rm -f conftest.in
16173   if cmp -s $ac_file conftest.h 2>/dev/null; then
16174     echo "$ac_file is unchanged"
16175     rm -f conftest.h
16176   else
16177     # Remove last slash and all that follows it.  Not all systems have dirname.
16178       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16179       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16180       # The file is in a subdirectory.
16181       test ! -d "$ac_dir" && mkdir "$ac_dir"
16182     fi
16183     rm -f $ac_file
16184     mv conftest.h $ac_file
16185   fi
16186 fi; done
16187
16188 EOF
16189 cat >> $CONFIG_STATUS <<EOF
16190
16191 EOF
16192 cat >> $CONFIG_STATUS <<\EOF
16193
16194 date > stamp-h
16195 echo Please \"make depend\" to build dependencies
16196
16197 exit 0
16198 EOF
16199 chmod +x $CONFIG_STATUS
16200 rm -fr confdefs* $ac_clean_files
16201 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16202