]> git.sur5r.net Git - openldap/blob - configure
1598e55b86f80927750b4597568d9951fe5dfac8
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.271 1999/11/01 16:36:10 kdz Exp  
4
5 # Copyright 1998,1999 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-1999 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-x-compile    enable cross compiling (no)"
45 ac_help="$ac_help
46   --enable-dmalloc      enable debug malloc support (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with Kerberos support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 LDAPD (X.500-to-LDAP Gateway) Options:"
63 ac_help="$ac_help
64   --enable-ldapd        enable building ldapd (no)"
65 ac_help="$ac_help
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd        enable building slapd (yes)"
69 ac_help="$ac_help
70     --enable-cleartext  enable cleartext passwords (yes)"
71 ac_help="$ac_help
72     --enable-crypt      enable crypt(3) passwords (auto)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (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-discreteaci        enable discrete rights in ACIs (no)"
87 ac_help="$ac_help
88     --enable-wrappers   enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
91 ac_help="$ac_help
92     --enable-bdb2       enable bdb2 backend (no)"
93 ac_help="$ac_help
94       --with-bdb2-module        module type (static)"
95 ac_help="$ac_help
96     --enable-ldap       enable ldap backend (no)"
97 ac_help="$ac_help
98       --with-ldap-module        module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm       enable ldbm backend (yes)"
101 ac_help="$ac_help
102       --with-ldbm-api   use LDBM API (auto)"
103 ac_help="$ac_help
104       --with-ldbm-module        module type (static)"
105 ac_help="$ac_help
106       --with-ldbm-type  use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd     enable passwd backend (no)"
109 ac_help="$ac_help
110       --with-passwd-module      module type (static)"
111 ac_help="$ac_help
112     --enable-perl       enable perl backend (no)"
113 ac_help="$ac_help
114       --with-perl-module        module type (static)"
115 ac_help="$ac_help
116     --enable-shell      enable shell backend (no)"
117 ac_help="$ac_help
118       --with-shell-module       module type (static)"
119 ac_help="$ac_help
120     --enable-tcl        enable tcl backend (no)"
121 ac_help="$ac_help
122       --with-tcl-module module type (static)"
123 ac_help="$ac_help
124 SLURPD (Replication Daemon) Options:"
125 ac_help="$ac_help
126   --enable-slurpd       enable building slurpd (auto)"
127 ac_help="$ac_help
128 Library Generation & Linking Options"
129 ac_help="$ac_help
130   --enable-static[=PKGS]  build static libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-shared[=PKGS]  build shared libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
135 ac_help="$ac_help
136   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
137 ac_help="$ac_help
138   --disable-libtool-lock  avoid locking (might break parallel builds)"
139
140 # Initialize some variables set by options.
141 # The variables have the same names as the options, with
142 # dashes changed to underlines.
143 build=NONE
144 cache_file=./config.cache
145 exec_prefix=NONE
146 host=NONE
147 no_create=
148 nonopt=NONE
149 no_recursion=
150 prefix=NONE
151 program_prefix=NONE
152 program_suffix=NONE
153 program_transform_name=s,x,x,
154 silent=
155 site=
156 srcdir=
157 target=NONE
158 verbose=
159 x_includes=NONE
160 x_libraries=NONE
161 bindir='${exec_prefix}/bin'
162 sbindir='${exec_prefix}/sbin'
163 libexecdir='${exec_prefix}/libexec'
164 datadir='${prefix}/share'
165 sysconfdir='${prefix}/etc'
166 sharedstatedir='${prefix}/com'
167 localstatedir='${prefix}/var'
168 libdir='${exec_prefix}/lib'
169 includedir='${prefix}/include'
170 oldincludedir='/usr/include'
171 infodir='${prefix}/info'
172 mandir='${prefix}/man'
173
174 # Initialize some other variables.
175 subdirs=
176 MFLAGS= MAKEFLAGS=
177 SHELL=${CONFIG_SHELL-/bin/sh}
178 # Maximum number of lines to put in a shell here document.
179 ac_max_here_lines=12
180
181 ac_prev=
182 for ac_option
183 do
184
185   # If the previous option needs an argument, assign it.
186   if test -n "$ac_prev"; then
187     eval "$ac_prev=\$ac_option"
188     ac_prev=
189     continue
190   fi
191
192   case "$ac_option" in
193   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
194   *) ac_optarg= ;;
195   esac
196
197   # Accept the important Cygnus configure options, so we can diagnose typos.
198
199   case "$ac_option" in
200
201   -bindir | --bindir | --bindi | --bind | --bin | --bi)
202     ac_prev=bindir ;;
203   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
204     bindir="$ac_optarg" ;;
205
206   -build | --build | --buil | --bui | --bu)
207     ac_prev=build ;;
208   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
209     build="$ac_optarg" ;;
210
211   -cache-file | --cache-file | --cache-fil | --cache-fi \
212   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
213     ac_prev=cache_file ;;
214   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
215   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
216     cache_file="$ac_optarg" ;;
217
218   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
219     ac_prev=datadir ;;
220   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
221   | --da=*)
222     datadir="$ac_optarg" ;;
223
224   -disable-* | --disable-*)
225     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
226     # Reject names that are not valid shell variable names.
227     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
228       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229     fi
230     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
231     eval "enable_${ac_feature}=no" ;;
232
233   -enable-* | --enable-*)
234     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
235     # Reject names that are not valid shell variable names.
236     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
237       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
238     fi
239     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
240     case "$ac_option" in
241       *=*) ;;
242       *) ac_optarg=yes ;;
243     esac
244     eval "enable_${ac_feature}='$ac_optarg'" ;;
245
246   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
247   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
248   | --exec | --exe | --ex)
249     ac_prev=exec_prefix ;;
250   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
251   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
252   | --exec=* | --exe=* | --ex=*)
253     exec_prefix="$ac_optarg" ;;
254
255   -gas | --gas | --ga | --g)
256     # Obsolete; use --with-gas.
257     with_gas=yes ;;
258
259   -help | --help | --hel | --he)
260     # Omit some internal or obsolete options to make the list less imposing.
261     # This message is too long to be a string in the A/UX 3.1 sh.
262     cat << EOF
263 Usage: configure [options] [host]
264 Options: [defaults in brackets after descriptions]
265 Configuration:
266   --cache-file=FILE       cache test results in FILE
267   --help                  print this message
268   --no-create             do not create output files
269   --quiet, --silent       do not print \`checking...' messages
270   --version               print the version of autoconf that created configure
271 Directory and file names:
272   --prefix=PREFIX         install architecture-independent files in PREFIX
273                           [$ac_default_prefix]
274   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
275                           [same as prefix]
276   --bindir=DIR            user executables in DIR [EPREFIX/bin]
277   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
278   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
279   --datadir=DIR           read-only architecture-independent data in DIR
280                           [PREFIX/share]
281   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
282   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
283                           [PREFIX/com]
284   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
285   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
286   --includedir=DIR        C header files in DIR [PREFIX/include]
287   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
288   --infodir=DIR           info documentation in DIR [PREFIX/info]
289   --mandir=DIR            man documentation in DIR [PREFIX/man]
290   --srcdir=DIR            find the sources in DIR [configure dir or ..]
291   --program-prefix=PREFIX prepend PREFIX to installed program names
292   --program-suffix=SUFFIX append SUFFIX to installed program names
293   --program-transform-name=PROGRAM
294                           run sed PROGRAM on installed program names
295 EOF
296     cat << EOF
297 Host type:
298   --build=BUILD           configure for building on BUILD [BUILD=HOST]
299   --host=HOST             configure for HOST [guessed]
300   --target=TARGET         configure for TARGET [TARGET=HOST]
301 Features and packages:
302   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
303   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
304   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
305   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
306   --x-includes=DIR        X include files are in DIR
307   --x-libraries=DIR       X library files are in DIR
308 EOF
309     if test -n "$ac_help"; then
310       echo "--enable and --with options recognized:$ac_help"
311     fi
312     exit 0 ;;
313
314   -host | --host | --hos | --ho)
315     ac_prev=host ;;
316   -host=* | --host=* | --hos=* | --ho=*)
317     host="$ac_optarg" ;;
318
319   -includedir | --includedir | --includedi | --included | --include \
320   | --includ | --inclu | --incl | --inc)
321     ac_prev=includedir ;;
322   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
323   | --includ=* | --inclu=* | --incl=* | --inc=*)
324     includedir="$ac_optarg" ;;
325
326   -infodir | --infodir | --infodi | --infod | --info | --inf)
327     ac_prev=infodir ;;
328   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
329     infodir="$ac_optarg" ;;
330
331   -libdir | --libdir | --libdi | --libd)
332     ac_prev=libdir ;;
333   -libdir=* | --libdir=* | --libdi=* | --libd=*)
334     libdir="$ac_optarg" ;;
335
336   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
337   | --libexe | --libex | --libe)
338     ac_prev=libexecdir ;;
339   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
340   | --libexe=* | --libex=* | --libe=*)
341     libexecdir="$ac_optarg" ;;
342
343   -localstatedir | --localstatedir | --localstatedi | --localstated \
344   | --localstate | --localstat | --localsta | --localst \
345   | --locals | --local | --loca | --loc | --lo)
346     ac_prev=localstatedir ;;
347   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
348   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
349   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
350     localstatedir="$ac_optarg" ;;
351
352   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
353     ac_prev=mandir ;;
354   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
355     mandir="$ac_optarg" ;;
356
357   -nfp | --nfp | --nf)
358     # Obsolete; use --without-fp.
359     with_fp=no ;;
360
361   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
362   | --no-cr | --no-c)
363     no_create=yes ;;
364
365   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
366   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
367     no_recursion=yes ;;
368
369   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
370   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
371   | --oldin | --oldi | --old | --ol | --o)
372     ac_prev=oldincludedir ;;
373   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
374   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
375   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
376     oldincludedir="$ac_optarg" ;;
377
378   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
379     ac_prev=prefix ;;
380   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
381     prefix="$ac_optarg" ;;
382
383   -program-prefix | --program-prefix | --program-prefi | --program-pref \
384   | --program-pre | --program-pr | --program-p)
385     ac_prev=program_prefix ;;
386   -program-prefix=* | --program-prefix=* | --program-prefi=* \
387   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
388     program_prefix="$ac_optarg" ;;
389
390   -program-suffix | --program-suffix | --program-suffi | --program-suff \
391   | --program-suf | --program-su | --program-s)
392     ac_prev=program_suffix ;;
393   -program-suffix=* | --program-suffix=* | --program-suffi=* \
394   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
395     program_suffix="$ac_optarg" ;;
396
397   -program-transform-name | --program-transform-name \
398   | --program-transform-nam | --program-transform-na \
399   | --program-transform-n | --program-transform- \
400   | --program-transform | --program-transfor \
401   | --program-transfo | --program-transf \
402   | --program-trans | --program-tran \
403   | --progr-tra | --program-tr | --program-t)
404     ac_prev=program_transform_name ;;
405   -program-transform-name=* | --program-transform-name=* \
406   | --program-transform-nam=* | --program-transform-na=* \
407   | --program-transform-n=* | --program-transform-=* \
408   | --program-transform=* | --program-transfor=* \
409   | --program-transfo=* | --program-transf=* \
410   | --program-trans=* | --program-tran=* \
411   | --progr-tra=* | --program-tr=* | --program-t=*)
412     program_transform_name="$ac_optarg" ;;
413
414   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
415   | -silent | --silent | --silen | --sile | --sil)
416     silent=yes ;;
417
418   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
419     ac_prev=sbindir ;;
420   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
421   | --sbi=* | --sb=*)
422     sbindir="$ac_optarg" ;;
423
424   -sharedstatedir | --sharedstatedir | --sharedstatedi \
425   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
426   | --sharedst | --shareds | --shared | --share | --shar \
427   | --sha | --sh)
428     ac_prev=sharedstatedir ;;
429   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
430   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
431   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
432   | --sha=* | --sh=*)
433     sharedstatedir="$ac_optarg" ;;
434
435   -site | --site | --sit)
436     ac_prev=site ;;
437   -site=* | --site=* | --sit=*)
438     site="$ac_optarg" ;;
439
440   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
441     ac_prev=srcdir ;;
442   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
443     srcdir="$ac_optarg" ;;
444
445   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
446   | --syscon | --sysco | --sysc | --sys | --sy)
447     ac_prev=sysconfdir ;;
448   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
449   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
450     sysconfdir="$ac_optarg" ;;
451
452   -target | --target | --targe | --targ | --tar | --ta | --t)
453     ac_prev=target ;;
454   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
455     target="$ac_optarg" ;;
456
457   -v | -verbose | --verbose | --verbos | --verbo | --verb)
458     verbose=yes ;;
459
460   -version | --version | --versio | --versi | --vers)
461     echo "configure generated by autoconf version 2.13.1"
462     exit 0 ;;
463
464   -with-* | --with-*)
465     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
466     # Reject names that are not valid shell variable names.
467     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
468       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
469     fi
470     ac_package=`echo $ac_package| sed 's/-/_/g'`
471     case "$ac_option" in
472       *=*) ;;
473       *) ac_optarg=yes ;;
474     esac
475     eval "with_${ac_package}='$ac_optarg'" ;;
476
477   -without-* | --without-*)
478     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
479     # Reject names that are not valid shell variable names.
480     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
481       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
482     fi
483     ac_package=`echo $ac_package| sed 's/-/_/g'`
484     eval "with_${ac_package}=no" ;;
485
486   --x)
487     # Obsolete; use --with-x.
488     with_x=yes ;;
489
490   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
491   | --x-incl | --x-inc | --x-in | --x-i)
492     ac_prev=x_includes ;;
493   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
494   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
495     x_includes="$ac_optarg" ;;
496
497   -x-libraries | --x-libraries | --x-librarie | --x-librari \
498   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
499     ac_prev=x_libraries ;;
500   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
501   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
502     x_libraries="$ac_optarg" ;;
503
504   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
505     ;;
506
507   *)
508     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
509       echo "configure: warning: $ac_option: invalid host type" 1>&2
510     fi
511     if test "x$nonopt" != xNONE; then
512       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
513     fi
514     nonopt="$ac_option"
515     ;;
516
517   esac
518 done
519
520 if test -n "$ac_prev"; then
521   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
522 fi
523
524 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
525
526 # File descriptor usage:
527 # 0 standard input
528 # 1 file creation
529 # 2 errors and warnings
530 # 3 some systems may open it to /dev/tty
531 # 4 used on the Kubota Titan
532 # 6 checking for... messages and results
533 # 5 compiler messages saved in config.log
534 if test "$silent" = yes; then
535   exec 6>/dev/null
536 else
537   exec 6>&1
538 fi
539 exec 5>./config.log
540
541 echo "\
542 This file contains any messages produced by compilers while
543 running configure, to aid debugging if configure makes a mistake.
544 " 1>&5
545
546 # Strip out --no-create and --no-recursion so they do not pile up.
547 # Also quote any args containing shell metacharacters.
548 ac_configure_args=
549 for ac_arg
550 do
551   case "$ac_arg" in
552   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
553   | --no-cr | --no-c) ;;
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
556   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
557   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
558   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
559   esac
560 done
561
562 # NLS nuisances.
563 # Only set these to C if already set.  These must not be set unconditionally
564 # because not all systems understand e.g. LANG=C (notably SCO).
565 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
566 # Non-C LC_CTYPE values break the ctype check.
567 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
568 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
569 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
570 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
571
572 # confdefs.h avoids OS command line length limits that DEFS can exceed.
573 rm -rf conftest* confdefs.h
574 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
575 echo > confdefs.h
576
577 # A filename unique to this package, relative to the directory that
578 # configure is in, which we can look for to find out if srcdir is correct.
579 ac_unique_file=build/version
580
581 # Find the source files, if location was not specified.
582 if test -z "$srcdir"; then
583   ac_srcdir_defaulted=yes
584   # Try the directory containing this script, then its parent.
585   ac_prog=$0
586   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
587   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
588   srcdir=$ac_confdir
589   if test ! -r $srcdir/$ac_unique_file; then
590     srcdir=..
591   fi
592 else
593   ac_srcdir_defaulted=no
594 fi
595 if test ! -r $srcdir/$ac_unique_file; then
596   if test "$ac_srcdir_defaulted" = yes; then
597     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
598   else
599     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
600   fi
601 fi
602 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
603
604 # Prefer explicitly selected file to automatically selected ones.
605 if test -z "$CONFIG_SITE"; then
606   if test "x$prefix" != xNONE; then
607     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
608   else
609     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
610   fi
611 fi
612 for ac_site_file in $CONFIG_SITE; do
613   if test -r "$ac_site_file"; then
614     echo "loading site script $ac_site_file"
615     . "$ac_site_file"
616   fi
617 done
618
619
620 ac_ext=c
621 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
622 ac_cpp='$CPP $CPPFLAGS'
623 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
624 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
625 cross_compiling=$ac_cv_prog_cc_cross
626
627 ac_exeext=
628 ac_objext=o
629 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
630   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
631   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
632     ac_n= ac_c='
633 ' ac_t='        '
634   else
635     ac_n=-n ac_c= ac_t=
636   fi
637 else
638   ac_n= ac_c='\c' ac_t=
639 fi
640
641 ac_aux_dir=
642 for ac_dir in build $srcdir/build; do
643   if test -f $ac_dir/install-sh; then
644     ac_aux_dir=$ac_dir
645     ac_install_sh="$ac_aux_dir/install-sh -c"
646     break
647   elif test -f $ac_dir/install.sh; then
648     ac_aux_dir=$ac_dir
649     ac_install_sh="$ac_aux_dir/install.sh -c"
650     break
651   fi
652 done
653 if test -z "$ac_aux_dir"; then
654   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
655 fi
656 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
657 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
658 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
659
660 OL_VERSION=`cat $ac_aux_dir/version`
661 if test -z "$OL_VERSION"; then
662         { echo "configure: error: could not determine version" 1>&2; exit 1; }
663 fi
664
665 echo "Configuring OpenLDAP $OL_VERSION ..."
666
667
668 echo $ac_n "checking host system type""... $ac_c" 1>&6
669 echo "configure:670: checking host system type" >&5
670 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
671
672 # Make sure we can run config.sub.
673   if $ac_config_sub sun4 >/dev/null 2>&1; then :
674     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
675   fi
676
677   ac_cv_host_alias=$host
678   case "$ac_cv_host_alias" in
679   NONE)
680     case $nonopt in
681     NONE)
682       if ac_cv_host_alias=`$ac_config_guess`; then :
683       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684       fi ;;
685     *) ac_cv_host_alias=$nonopt ;;
686     esac ;;
687   esac
688
689   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
690   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 else
694   echo $ac_n "(cached) $ac_c" 1>&6
695 fi
696
697 echo "$ac_t""$ac_cv_host" 1>&6
698
699 host=$ac_cv_host
700 host_alias=$ac_cv_host_alias
701 host_cpu=$ac_cv_host_cpu
702 host_vendor=$ac_cv_host_vendor
703 host_os=$ac_cv_host_os
704
705
706
707
708
709 echo $ac_n "checking target system type""... $ac_c" 1>&6
710 echo "configure:711: checking target system type" >&5
711 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
712
713 # Make sure we can run config.sub.
714   if $ac_config_sub sun4 >/dev/null 2>&1; then :
715     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
716   fi
717
718   ac_cv_target_alias=$target
719   case "$ac_cv_target_alias" in
720   NONE)
721     case $nonopt in
722     NONE)
723       ac_cv_target_alias=$host_alias ;;
724
725     *) ac_cv_target_alias=$nonopt ;;
726     esac ;;
727   esac
728
729   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
730   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
731   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
732   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
733 else
734   echo $ac_n "(cached) $ac_c" 1>&6
735 fi
736
737 echo "$ac_t""$ac_cv_target" 1>&6
738
739 target=$ac_cv_target
740 target_alias=$ac_cv_target_alias
741 target_cpu=$ac_cv_target_cpu
742 target_vendor=$ac_cv_target_vendor
743 target_os=$ac_cv_target_os
744
745
746
747
748
749 echo $ac_n "checking build system type""... $ac_c" 1>&6
750 echo "configure:751: checking build system type" >&5
751 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
752
753 # Make sure we can run config.sub.
754   if $ac_config_sub sun4 >/dev/null 2>&1; then :
755     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
756   fi
757
758   ac_cv_build_alias=$build
759   case "$ac_cv_build_alias" in
760   NONE)
761     case $nonopt in
762     NONE)
763       ac_cv_build_alias=$host_alias ;;
764
765     *) ac_cv_build_alias=$nonopt ;;
766     esac ;;
767   esac
768
769   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
770   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
771   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
772   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
773 else
774   echo $ac_n "(cached) $ac_c" 1>&6
775 fi
776
777 echo "$ac_t""$ac_cv_build" 1>&6
778
779 build=$ac_cv_build
780 build_alias=$ac_cv_build_alias
781 build_cpu=$ac_cv_build_cpu
782 build_vendor=$ac_cv_build_vendor
783 build_os=$ac_cv_build_os
784
785
786
787
788
789 # Do some error checking and defaulting for the host and target type.
790 # The inputs are:
791 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
792 #
793 # The rules are:
794 # 1. You are not allowed to specify --host, --target, and nonopt at the
795 #    same time.
796 # 2. Host defaults to nonopt.
797 # 3. If nonopt is not specified, then host defaults to the current host,
798 #    as determined by config.guess.
799 # 4. Target and build default to nonopt.
800 # 5. If nonopt is not specified, then target and build default to host.
801
802 # The aliases save the names the user supplied, while $host etc.
803 # will get canonicalized.
804 case $host---$target---$nonopt in
805 NONE---*---* | *---NONE---* | *---*---NONE) ;;
806 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
807 esac
808
809 test "$host_alias" != "$target_alias" &&
810   test "$program_prefix$program_suffix$program_transform_name" = \
811     NONENONEs,x,x, &&
812   program_prefix=${target_alias}-
813
814
815 # Find a good install program.  We prefer a C program (faster),
816 # so one script is as good as another.  But avoid the broken or
817 # incompatible versions:
818 # SysV /etc/install, /usr/sbin/install
819 # SunOS /usr/etc/install
820 # IRIX /sbin/install
821 # AIX /bin/install
822 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
823 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
824 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
825 # ./install, which can be erroneously created by make from ./install.sh.
826 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
827 echo "configure:828: checking for a BSD compatible install" >&5
828 if test -z "$INSTALL"; then
829 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
833   for ac_dir in $PATH; do
834     # Account for people who put trailing slashes in PATH elements.
835     case "$ac_dir/" in
836     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
837     *)
838       # OSF1 and SCO ODT 3.0 have their own names for install.
839       # Don't use installbsd from OSF since it installs stuff as root
840       # by default.
841       for ac_prog in ginstall scoinst install; do
842         if test -f $ac_dir/$ac_prog; then
843           if test $ac_prog = install &&
844             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
845             # AIX install.  It has an incompatible calling convention.
846             :
847           elif test $ac_prog = install &&
848             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
849             # program-specific install script used by HP pwplus--don't use.
850             :
851           else
852             ac_cv_path_install="$ac_dir/$ac_prog -c"
853             break 2
854           fi
855         fi
856       done
857       ;;
858     esac
859   done
860   IFS="$ac_save_IFS"
861
862 fi
863   if test "${ac_cv_path_install+set}" = set; then
864     INSTALL="$ac_cv_path_install"
865   else
866     # As a last resort, use the slow shell script.  We don't cache a
867     # path for INSTALL within a source directory, because that will
868     # break other packages using the cache if that directory is
869     # removed, or if the path is relative.
870     INSTALL="$ac_install_sh"
871   fi
872 fi
873 echo "$ac_t""$INSTALL" 1>&6
874
875 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
876 # It thinks the first close brace ends the variable substitution.
877 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
878
879 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
880
881 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
882
883 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
884 echo "configure:885: checking whether build environment is sane" >&5
885 # Just in case
886 sleep 1
887 echo timestamp > conftestfile
888 # Do `set' in a subshell so we don't clobber the current shell's
889 # arguments.  Must try -L first in case configure is actually a
890 # symlink; some systems play weird games with the mod time of symlinks
891 # (eg FreeBSD returns the mod time of the symlink's containing
892 # directory).
893 if (
894    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
895    if test "$*" = "X"; then
896       # -L didn't work.
897       set X `ls -t $srcdir/configure conftestfile`
898    fi
899    if test "$*" != "X $srcdir/configure conftestfile" \
900       && test "$*" != "X conftestfile $srcdir/configure"; then
901
902       # If neither matched, then we have a broken ls.  This can happen
903       # if, for instance, CONFIG_SHELL is bash and it inherits a
904       # broken ls alias from the environment.  This has actually
905       # happened.  Such a system could not be considered "sane".
906       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
907 alias in your environment" 1>&2; exit 1; }
908    fi
909
910    test "$2" = conftestfile
911    )
912 then
913    # Ok.
914    :
915 else
916    { echo "configure: error: newly created file is older than distributed files!
917 Check your system clock" 1>&2; exit 1; }
918 fi
919 rm -f conftest*
920 echo "$ac_t""yes" 1>&6
921 if test "$program_transform_name" = s,x,x,; then
922   program_transform_name=
923 else
924   # Double any \ or $.  echo might interpret backslashes.
925   cat <<\EOF_SED > conftestsed
926 s,\\,\\\\,g; s,\$,$$,g
927 EOF_SED
928   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
929   rm -f conftestsed
930 fi
931 test "$program_prefix" != NONE &&
932   program_transform_name="s,^,${program_prefix},;$program_transform_name"
933 # Use a double $ so make ignores it.
934 test "$program_suffix" != NONE &&
935   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
936
937 # sed with no file args requires a program.
938 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
939
940 for ac_prog in mawk gawk nawk awk
941 do
942 # Extract the first word of "$ac_prog", so it can be a program name with args.
943 set dummy $ac_prog; ac_word=$2
944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
945 echo "configure:946: checking for $ac_word" >&5
946 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
947   echo $ac_n "(cached) $ac_c" 1>&6
948 else
949   if test -n "$AWK"; then
950   ac_cv_prog_AWK="$AWK" # Let the user override the test.
951 else
952   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
953   ac_dummy="$PATH"
954   for ac_dir in $ac_dummy; do
955     test -z "$ac_dir" && ac_dir=.
956     if test -f $ac_dir/$ac_word; then
957       ac_cv_prog_AWK="$ac_prog"
958       break
959     fi
960   done
961   IFS="$ac_save_ifs"
962 fi
963 fi
964 AWK="$ac_cv_prog_AWK"
965 if test -n "$AWK"; then
966   echo "$ac_t""$AWK" 1>&6
967 else
968   echo "$ac_t""no" 1>&6
969 fi
970
971 test -n "$AWK" && break
972 done
973
974 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
975 echo "configure:976: checking whether ${MAKE-make} sets \${MAKE}" >&5
976 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
977 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   cat > conftestmake <<\EOF
981 all:
982         @echo 'ac_maketemp="${MAKE}"'
983 EOF
984 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
985 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
986 if test -n "$ac_maketemp"; then
987   eval ac_cv_prog_make_${ac_make}_set=yes
988 else
989   eval ac_cv_prog_make_${ac_make}_set=no
990 fi
991 rm -f conftestmake
992 fi
993 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
994   echo "$ac_t""yes" 1>&6
995   SET_MAKE=
996 else
997   echo "$ac_t""no" 1>&6
998   SET_MAKE="MAKE=${MAKE-make}"
999 fi
1000
1001
1002
1003 PACKAGE=OpenLDAP
1004
1005 VERSION=$OL_VERSION
1006
1007 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1008   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1009 fi
1010
1011
1012
1013 missing_dir=`cd $ac_aux_dir && pwd`
1014 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1015 echo "configure:1016: checking for working aclocal" >&5
1016 # Run test in a subshell; some versions of sh will print an error if
1017 # an executable is not found, even if stderr is redirected.
1018 # Redirect stdin to placate older versions of autoconf.  Sigh.
1019 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1020    ACLOCAL=aclocal
1021    echo "$ac_t""found" 1>&6
1022 else
1023    ACLOCAL="$missing_dir/missing aclocal"
1024    echo "$ac_t""missing" 1>&6
1025 fi
1026
1027 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1028 echo "configure:1029: checking for working autoconf" >&5
1029 # Run test in a subshell; some versions of sh will print an error if
1030 # an executable is not found, even if stderr is redirected.
1031 # Redirect stdin to placate older versions of autoconf.  Sigh.
1032 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1033    AUTOCONF=autoconf
1034    echo "$ac_t""found" 1>&6
1035 else
1036    AUTOCONF="$missing_dir/missing autoconf"
1037    echo "$ac_t""missing" 1>&6
1038 fi
1039
1040 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1041 echo "configure:1042: checking for working automake" >&5
1042 # Run test in a subshell; some versions of sh will print an error if
1043 # an executable is not found, even if stderr is redirected.
1044 # Redirect stdin to placate older versions of autoconf.  Sigh.
1045 if (automake --version) < /dev/null > /dev/null 2>&1; then
1046    AUTOMAKE=automake
1047    echo "$ac_t""found" 1>&6
1048 else
1049    AUTOMAKE="$missing_dir/missing automake"
1050    echo "$ac_t""missing" 1>&6
1051 fi
1052
1053 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1054 echo "configure:1055: checking for working autoheader" >&5
1055 # Run test in a subshell; some versions of sh will print an error if
1056 # an executable is not found, even if stderr is redirected.
1057 # Redirect stdin to placate older versions of autoconf.  Sigh.
1058 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1059    AUTOHEADER=autoheader
1060    echo "$ac_t""found" 1>&6
1061 else
1062    AUTOHEADER="$missing_dir/missing autoheader"
1063    echo "$ac_t""missing" 1>&6
1064 fi
1065
1066 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1067 echo "configure:1068: checking for working makeinfo" >&5
1068 # Run test in a subshell; some versions of sh will print an error if
1069 # an executable is not found, even if stderr is redirected.
1070 # Redirect stdin to placate older versions of autoconf.  Sigh.
1071 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1072    MAKEINFO=makeinfo
1073    echo "$ac_t""found" 1>&6
1074 else
1075    MAKEINFO="$missing_dir/missing makeinfo"
1076    echo "$ac_t""missing" 1>&6
1077 fi
1078
1079 install_sh="$missing_dir/install-sh"
1080 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1081
1082 for ac_prog in gnutar gtar tar
1083 do
1084 # Extract the first word of "$ac_prog", so it can be a program name with args.
1085 set dummy $ac_prog; ac_word=$2
1086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087 echo "configure:1088: checking for $ac_word" >&5
1088 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1089   echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091   if test -n "$AMTAR"; then
1092   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1093 else
1094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1095   ac_dummy="$PATH"
1096   for ac_dir in $ac_dummy; do
1097     test -z "$ac_dir" && ac_dir=.
1098     if test -f $ac_dir/$ac_word; then
1099       ac_cv_prog_AMTAR="$ac_prog"
1100       break
1101     fi
1102   done
1103   IFS="$ac_save_ifs"
1104 fi
1105 fi
1106 AMTAR="$ac_cv_prog_AMTAR"
1107 if test -n "$AMTAR"; then
1108   echo "$ac_t""$AMTAR" 1>&6
1109 else
1110   echo "$ac_t""no" 1>&6
1111 fi
1112
1113 test -n "$AMTAR" && break
1114 done
1115
1116
1117 AMTARFLAGS=
1118 if test -n "$AMTAR"; then
1119   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1120         AMTARFLAGS=o
1121   fi
1122 fi
1123
1124
1125
1126 cat >> confdefs.h <<EOF
1127 #define OPENLDAP_PACKAGE "$PACKAGE"
1128 EOF
1129
1130 cat >> confdefs.h <<EOF
1131 #define OPENLDAP_VERSION "$VERSION"
1132 EOF
1133
1134
1135
1136
1137 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1138 echo "configure:1139: checking configure arguments" >&5
1139
1140
1141 top_builddir=`pwd`
1142
1143 ldap_subdir="/openldap"
1144
1145 # Check whether --with-subdir or --without-subdir was given.
1146 if test "${with_subdir+set}" = set; then
1147   withval="$with_subdir"
1148   case "$withval" in
1149         no) ldap_subdir=""
1150                 ;;
1151         yes)
1152                 ;;
1153         /*|\\*)
1154                 ldap_subdir="$withval"
1155                 ;;
1156         *)
1157                 ldap_subdir="/$withval"
1158                 ;;
1159 esac
1160
1161 fi
1162
1163
1164 # OpenLDAP --enable-debug
1165         # Check whether --enable-debug or --disable-debug was given.
1166 if test "${enable_debug+set}" = set; then
1167   enableval="$enable_debug"
1168   
1169         ol_arg=invalid
1170         for ol_val in auto yes no ; do
1171                 if test "$enableval" = "$ol_val" ; then
1172                         ol_arg="$ol_val"
1173                 fi
1174         done
1175         if test "$ol_arg" = "invalid" ; then
1176                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1177         fi
1178         ol_enable_debug="$ol_arg"
1179
1180 else
1181         ol_enable_debug="yes"
1182 fi
1183 # end --enable-debug
1184 # OpenLDAP --enable-syslog
1185         # Check whether --enable-syslog or --disable-syslog was given.
1186 if test "${enable_syslog+set}" = set; then
1187   enableval="$enable_syslog"
1188   
1189         ol_arg=invalid
1190         for ol_val in auto yes no ; do
1191                 if test "$enableval" = "$ol_val" ; then
1192                         ol_arg="$ol_val"
1193                 fi
1194         done
1195         if test "$ol_arg" = "invalid" ; then
1196                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1197         fi
1198         ol_enable_syslog="$ol_arg"
1199
1200 else
1201         ol_enable_syslog="auto"
1202 fi
1203 # end --enable-syslog
1204 # OpenLDAP --enable-proctitle
1205         # Check whether --enable-proctitle or --disable-proctitle was given.
1206 if test "${enable_proctitle+set}" = set; then
1207   enableval="$enable_proctitle"
1208   
1209         ol_arg=invalid
1210         for ol_val in auto yes no ; do
1211                 if test "$enableval" = "$ol_val" ; then
1212                         ol_arg="$ol_val"
1213                 fi
1214         done
1215         if test "$ol_arg" = "invalid" ; then
1216                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1217         fi
1218         ol_enable_proctitle="$ol_arg"
1219
1220 else
1221         ol_enable_proctitle="yes"
1222 fi
1223 # end --enable-proctitle
1224 # OpenLDAP --enable-cache
1225         # Check whether --enable-cache or --disable-cache was given.
1226 if test "${enable_cache+set}" = set; then
1227   enableval="$enable_cache"
1228   
1229         ol_arg=invalid
1230         for ol_val in auto yes no ; do
1231                 if test "$enableval" = "$ol_val" ; then
1232                         ol_arg="$ol_val"
1233                 fi
1234         done
1235         if test "$ol_arg" = "invalid" ; then
1236                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1237         fi
1238         ol_enable_cache="$ol_arg"
1239
1240 else
1241         ol_enable_cache="yes"
1242 fi
1243 # end --enable-cache
1244 # OpenLDAP --enable-dns
1245         # Check whether --enable-dns or --disable-dns was given.
1246 if test "${enable_dns+set}" = set; then
1247   enableval="$enable_dns"
1248   
1249         ol_arg=invalid
1250         for ol_val in auto yes no ; do
1251                 if test "$enableval" = "$ol_val" ; then
1252                         ol_arg="$ol_val"
1253                 fi
1254         done
1255         if test "$ol_arg" = "invalid" ; then
1256                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1257         fi
1258         ol_enable_dns="$ol_arg"
1259
1260 else
1261         ol_enable_dns="no"
1262 fi
1263 # end --enable-dns
1264 # OpenLDAP --enable-referrals
1265         # Check whether --enable-referrals or --disable-referrals was given.
1266 if test "${enable_referrals+set}" = set; then
1267   enableval="$enable_referrals"
1268   
1269         ol_arg=invalid
1270         for ol_val in auto yes no ; do
1271                 if test "$enableval" = "$ol_val" ; then
1272                         ol_arg="$ol_val"
1273                 fi
1274         done
1275         if test "$ol_arg" = "invalid" ; then
1276                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1277         fi
1278         ol_enable_referrals="$ol_arg"
1279
1280 else
1281         ol_enable_referrals="yes"
1282 fi
1283 # end --enable-referrals
1284 # OpenLDAP --enable-cldap
1285         # Check whether --enable-cldap or --disable-cldap was given.
1286 if test "${enable_cldap+set}" = set; then
1287   enableval="$enable_cldap"
1288   
1289         ol_arg=invalid
1290         for ol_val in auto yes no ; do
1291                 if test "$enableval" = "$ol_val" ; then
1292                         ol_arg="$ol_val"
1293                 fi
1294         done
1295         if test "$ol_arg" = "invalid" ; then
1296                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1297         fi
1298         ol_enable_cldap="$ol_arg"
1299
1300 else
1301         ol_enable_cldap="no"
1302 fi
1303 # end --enable-cldap
1304 # OpenLDAP --enable-x_compile
1305         # Check whether --enable-x_compile or --disable-x_compile was given.
1306 if test "${enable_x_compile+set}" = set; then
1307   enableval="$enable_x_compile"
1308   
1309         ol_arg=invalid
1310         for ol_val in yes no ; do
1311                 if test "$enableval" = "$ol_val" ; then
1312                         ol_arg="$ol_val"
1313                 fi
1314         done
1315         if test "$ol_arg" = "invalid" ; then
1316                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1317         fi
1318         ol_enable_x_compile="$ol_arg"
1319
1320 else
1321         ol_enable_x_compile="no"
1322 fi
1323 # end --enable-x_compile
1324
1325 # OpenLDAP --enable-dmalloc
1326         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1327 if test "${enable_dmalloc+set}" = set; then
1328   enableval="$enable_dmalloc"
1329   
1330         ol_arg=invalid
1331         for ol_val in auto yes no ; do
1332                 if test "$enableval" = "$ol_val" ; then
1333                         ol_arg="$ol_val"
1334                 fi
1335         done
1336         if test "$ol_arg" = "invalid" ; then
1337                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1338         fi
1339         ol_enable_dmalloc="$ol_arg"
1340
1341 else
1342         ol_enable_dmalloc="no"
1343 fi
1344 # end --enable-dmalloc
1345
1346 # OpenLDAP --with-cyrus_sasl
1347         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1348 if test "${with_cyrus_sasl+set}" = set; then
1349   withval="$with_cyrus_sasl"
1350   
1351         ol_arg=invalid
1352         for ol_val in auto yes no  ; do
1353                 if test "$withval" = "$ol_val" ; then
1354                         ol_arg="$ol_val"
1355                 fi
1356         done
1357         if test "$ol_arg" = "invalid" ; then
1358                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1359         fi
1360         ol_with_cyrus_sasl="$ol_arg"
1361
1362 else
1363         ol_with_cyrus_sasl="auto"
1364 fi
1365 # end --with-cyrus_sasl
1366
1367 # OpenLDAP --with-fetch
1368         # Check whether --with-fetch or --without-fetch was given.
1369 if test "${with_fetch+set}" = set; then
1370   withval="$with_fetch"
1371   
1372         ol_arg=invalid
1373         for ol_val in auto yes no  ; do
1374                 if test "$withval" = "$ol_val" ; then
1375                         ol_arg="$ol_val"
1376                 fi
1377         done
1378         if test "$ol_arg" = "invalid" ; then
1379                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1380         fi
1381         ol_with_fetch="$ol_arg"
1382
1383 else
1384         ol_with_fetch="auto"
1385 fi
1386 # end --with-fetch
1387
1388 # OpenLDAP --with-kerberos
1389         # Check whether --with-kerberos or --without-kerberos was given.
1390 if test "${with_kerberos+set}" = set; then
1391   withval="$with_kerberos"
1392   
1393         ol_arg=invalid
1394         for ol_val in auto k5 kth k4 afs yes no ; do
1395                 if test "$withval" = "$ol_val" ; then
1396                         ol_arg="$ol_val"
1397                 fi
1398         done
1399         if test "$ol_arg" = "invalid" ; then
1400                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1401         fi
1402         ol_with_kerberos="$ol_arg"
1403
1404 else
1405         ol_with_kerberos="auto"
1406 fi
1407 # end --with-kerberos
1408
1409 # OpenLDAP --with-readline
1410         # Check whether --with-readline or --without-readline was given.
1411 if test "${with_readline+set}" = set; then
1412   withval="$with_readline"
1413   
1414         ol_arg=invalid
1415         for ol_val in auto yes no  ; do
1416                 if test "$withval" = "$ol_val" ; then
1417                         ol_arg="$ol_val"
1418                 fi
1419         done
1420         if test "$ol_arg" = "invalid" ; then
1421                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1422         fi
1423         ol_with_readline="$ol_arg"
1424
1425 else
1426         ol_with_readline="auto"
1427 fi
1428 # end --with-readline
1429
1430 # OpenLDAP --with-threads
1431         # Check whether --with-threads or --without-threads was given.
1432 if test "${with_threads+set}" = set; then
1433   withval="$with_threads"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1437                 if test "$withval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1443         fi
1444         ol_with_threads="$ol_arg"
1445
1446 else
1447         ol_with_threads="auto"
1448 fi
1449 # end --with-threads
1450
1451 # OpenLDAP --with-tls
1452         # Check whether --with-tls or --without-tls was given.
1453 if test "${with_tls+set}" = set; then
1454   withval="$with_tls"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto ssleay openssl yes no  ; do
1458                 if test "$withval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1464         fi
1465         ol_with_tls="$ol_arg"
1466
1467 else
1468         ol_with_tls="auto"
1469 fi
1470 # end --with-tls
1471
1472 # OpenLDAP --with-yielding_select
1473         # Check whether --with-yielding_select or --without-yielding_select was given.
1474 if test "${with_yielding_select+set}" = set; then
1475   withval="$with_yielding_select"
1476   
1477         ol_arg=invalid
1478         for ol_val in auto yes no manual  ; do
1479                 if test "$withval" = "$ol_val" ; then
1480                         ol_arg="$ol_val"
1481                 fi
1482         done
1483         if test "$ol_arg" = "invalid" ; then
1484                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1485         fi
1486         ol_with_yielding_select="$ol_arg"
1487
1488 else
1489         ol_with_yielding_select="auto"
1490 fi
1491 # end --with-yielding_select
1492
1493
1494 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1495 if test "${with_xxldapdoptions+set}" = set; then
1496   withval="$with_xxldapdoptions"
1497   :
1498 fi
1499
1500 # OpenLDAP --enable-ldapd
1501         # Check whether --enable-ldapd or --disable-ldapd was given.
1502 if test "${enable_ldapd+set}" = set; then
1503   enableval="$enable_ldapd"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$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 $enableval for --enable-ldapd" 1>&2; exit 1; }
1513         fi
1514         ol_enable_ldapd="$ol_arg"
1515
1516 else
1517         ol_enable_ldapd="no"
1518 fi
1519 # end --enable-ldapd
1520
1521 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1522 if test "${with_xxslapdoptions+set}" = set; then
1523   withval="$with_xxslapdoptions"
1524   :
1525 fi
1526
1527 # OpenLDAP --enable-slapd
1528         # Check whether --enable-slapd or --disable-slapd was given.
1529 if test "${enable_slapd+set}" = set; then
1530   enableval="$enable_slapd"
1531   
1532         ol_arg=invalid
1533         for ol_val in auto yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1540         fi
1541         ol_enable_slapd="$ol_arg"
1542
1543 else
1544         ol_enable_slapd="yes"
1545 fi
1546 # end --enable-slapd
1547 # OpenLDAP --enable-cleartext
1548         # Check whether --enable-cleartext or --disable-cleartext was given.
1549 if test "${enable_cleartext+set}" = set; then
1550   enableval="$enable_cleartext"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no ; do
1554                 if test "$enableval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1560         fi
1561         ol_enable_cleartext="$ol_arg"
1562
1563 else
1564         ol_enable_cleartext="yes"
1565 fi
1566 # end --enable-cleartext
1567 # OpenLDAP --enable-crypt
1568         # Check whether --enable-crypt or --disable-crypt was given.
1569 if test "${enable_crypt+set}" = set; then
1570   enableval="$enable_crypt"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1580         fi
1581         ol_enable_crypt="$ol_arg"
1582
1583 else
1584         ol_enable_crypt="auto"
1585 fi
1586 # end --enable-crypt
1587 # OpenLDAP --enable-modules
1588         # Check whether --enable-modules or --disable-modules was given.
1589 if test "${enable_modules+set}" = set; then
1590   enableval="$enable_modules"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1600         fi
1601         ol_enable_modules="$ol_arg"
1602
1603 else
1604         ol_enable_modules="no"
1605 fi
1606 # end --enable-modules
1607 # OpenLDAP --enable-multimaster
1608         # Check whether --enable-multimaster or --disable-multimaster was given.
1609 if test "${enable_multimaster+set}" = set; then
1610   enableval="$enable_multimaster"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1620         fi
1621         ol_enable_multimaster="$ol_arg"
1622
1623 else
1624         ol_enable_multimaster="no"
1625 fi
1626 # end --enable-multimaster
1627 # OpenLDAP --enable-phonetic
1628         # Check whether --enable-phonetic or --disable-phonetic was given.
1629 if test "${enable_phonetic+set}" = set; then
1630   enableval="$enable_phonetic"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1640         fi
1641         ol_enable_phonetic="$ol_arg"
1642
1643 else
1644         ol_enable_phonetic="no"
1645 fi
1646 # end --enable-phonetic
1647 # OpenLDAP --enable-quipu
1648         # Check whether --enable-quipu or --disable-quipu was given.
1649 if test "${enable_quipu+set}" = set; then
1650   enableval="$enable_quipu"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no ; do
1654                 if test "$enableval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1660         fi
1661         ol_enable_quipu="$ol_arg"
1662
1663 else
1664         ol_enable_quipu="no"
1665 fi
1666 # end --enable-quipu
1667 # OpenLDAP --enable-rlookups
1668         # Check whether --enable-rlookups or --disable-rlookups was given.
1669 if test "${enable_rlookups+set}" = set; then
1670   enableval="$enable_rlookups"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1680         fi
1681         ol_enable_rlookups="$ol_arg"
1682
1683 else
1684         ol_enable_rlookups="auto"
1685 fi
1686 # end --enable-rlookups
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-discreteaci
1708         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1709 if test "${enable_discreteaci+set}" = set; then
1710   enableval="$enable_discreteaci"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1720         fi
1721         ol_enable_discreteaci="$ol_arg"
1722
1723 else
1724         ol_enable_discreteaci="no"
1725 fi
1726 # end --enable-discreteaci
1727 # OpenLDAP --enable-wrappers
1728         # Check whether --enable-wrappers or --disable-wrappers was given.
1729 if test "${enable_wrappers+set}" = set; then
1730   enableval="$enable_wrappers"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1740         fi
1741         ol_enable_wrappers="$ol_arg"
1742
1743 else
1744         ol_enable_wrappers="no"
1745 fi
1746 # end --enable-wrappers
1747 # OpenLDAP --enable-dynamic
1748         # Check whether --enable-dynamic or --disable-dynamic was given.
1749 if test "${enable_dynamic+set}" = set; then
1750   enableval="$enable_dynamic"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1760         fi
1761         ol_enable_dynamic="$ol_arg"
1762
1763 else
1764         ol_enable_dynamic="no"
1765 fi
1766 # end --enable-dynamic
1767
1768 # OpenLDAP --enable-bdb2
1769         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1770 if test "${enable_bdb2+set}" = set; then
1771   enableval="$enable_bdb2"
1772   
1773         ol_arg=invalid
1774         for ol_val in auto yes no ; do
1775                 if test "$enableval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1781         fi
1782         ol_enable_bdb2="$ol_arg"
1783
1784 else
1785         ol_enable_bdb2="no"
1786 fi
1787 # end --enable-bdb2
1788 # OpenLDAP --with-bdb2_module
1789         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1790 if test "${with_bdb2_module+set}" = set; then
1791   withval="$with_bdb2_module"
1792   
1793         ol_arg=invalid
1794         for ol_val in static dynamic ; do
1795                 if test "$withval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1801         fi
1802         ol_with_bdb2_module="$ol_arg"
1803
1804 else
1805         ol_with_bdb2_module="static"
1806 fi
1807 # end --with-bdb2_module
1808
1809 # OpenLDAP --enable-ldap
1810         # Check whether --enable-ldap or --disable-ldap was given.
1811 if test "${enable_ldap+set}" = set; then
1812   enableval="$enable_ldap"
1813   
1814         ol_arg=invalid
1815         for ol_val in auto yes no ; do
1816                 if test "$enableval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1822         fi
1823         ol_enable_ldap="$ol_arg"
1824
1825 else
1826         ol_enable_ldap="no"
1827 fi
1828 # end --enable-ldap
1829 # OpenLDAP --with-ldap_module
1830         # Check whether --with-ldap_module or --without-ldap_module was given.
1831 if test "${with_ldap_module+set}" = set; then
1832   withval="$with_ldap_module"
1833   
1834         ol_arg=invalid
1835         for ol_val in static dynamic ; do
1836                 if test "$withval" = "$ol_val" ; then
1837                         ol_arg="$ol_val"
1838                 fi
1839         done
1840         if test "$ol_arg" = "invalid" ; then
1841                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1842         fi
1843         ol_with_ldap_module="$ol_arg"
1844
1845 else
1846         ol_with_ldap_module="static"
1847 fi
1848 # end --with-ldap_module
1849
1850 # OpenLDAP --enable-ldbm
1851         # Check whether --enable-ldbm or --disable-ldbm was given.
1852 if test "${enable_ldbm+set}" = set; then
1853   enableval="$enable_ldbm"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1863         fi
1864         ol_enable_ldbm="$ol_arg"
1865
1866 else
1867         ol_enable_ldbm="yes"
1868 fi
1869 # end --enable-ldbm
1870 # OpenLDAP --with-ldbm_api
1871         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1872 if test "${with_ldbm_api+set}" = set; then
1873   withval="$with_ldbm_api"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1877                 if test "$withval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1883         fi
1884         ol_with_ldbm_api="$ol_arg"
1885
1886 else
1887         ol_with_ldbm_api="auto"
1888 fi
1889 # end --with-ldbm_api
1890
1891 # OpenLDAP --with-ldbm_module
1892         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1893 if test "${with_ldbm_module+set}" = set; then
1894   withval="$with_ldbm_module"
1895   
1896         ol_arg=invalid
1897         for ol_val in static dynamic ; do
1898                 if test "$withval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1904         fi
1905         ol_with_ldbm_module="$ol_arg"
1906
1907 else
1908         ol_with_ldbm_module="static"
1909 fi
1910 # end --with-ldbm_module
1911
1912 # OpenLDAP --with-ldbm_type
1913         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1914 if test "${with_ldbm_type+set}" = set; then
1915   withval="$with_ldbm_type"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto btree hash ; do
1919                 if test "$withval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1925         fi
1926         ol_with_ldbm_type="$ol_arg"
1927
1928 else
1929         ol_with_ldbm_type="auto"
1930 fi
1931 # end --with-ldbm_type
1932
1933
1934 # OpenLDAP --enable-passwd
1935         # Check whether --enable-passwd or --disable-passwd was given.
1936 if test "${enable_passwd+set}" = set; then
1937   enableval="$enable_passwd"
1938   
1939         ol_arg=invalid
1940         for ol_val in auto yes no ; do
1941                 if test "$enableval" = "$ol_val" ; then
1942                         ol_arg="$ol_val"
1943                 fi
1944         done
1945         if test "$ol_arg" = "invalid" ; then
1946                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1947         fi
1948         ol_enable_passwd="$ol_arg"
1949
1950 else
1951         ol_enable_passwd="no"
1952 fi
1953 # end --enable-passwd
1954 # OpenLDAP --with-passwd_module
1955         # Check whether --with-passwd_module or --without-passwd_module was given.
1956 if test "${with_passwd_module+set}" = set; then
1957   withval="$with_passwd_module"
1958   
1959         ol_arg=invalid
1960         for ol_val in static dynamic ; do
1961                 if test "$withval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1967         fi
1968         ol_with_passwd_module="$ol_arg"
1969
1970 else
1971         ol_with_passwd_module="static"
1972 fi
1973 # end --with-passwd_module
1974
1975 # OpenLDAP --enable-perl
1976         # Check whether --enable-perl or --disable-perl was given.
1977 if test "${enable_perl+set}" = set; then
1978   enableval="$enable_perl"
1979   
1980         ol_arg=invalid
1981         for ol_val in auto yes no ; do
1982                 if test "$enableval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1988         fi
1989         ol_enable_perl="$ol_arg"
1990
1991 else
1992         ol_enable_perl="no"
1993 fi
1994 # end --enable-perl
1995 # OpenLDAP --with-perl_module
1996         # Check whether --with-perl_module or --without-perl_module was given.
1997 if test "${with_perl_module+set}" = set; then
1998   withval="$with_perl_module"
1999   
2000         ol_arg=invalid
2001         for ol_val in static dynamic ; do
2002                 if test "$withval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2008         fi
2009         ol_with_perl_module="$ol_arg"
2010
2011 else
2012         ol_with_perl_module="static"
2013 fi
2014 # end --with-perl_module
2015
2016 # OpenLDAP --enable-shell
2017         # Check whether --enable-shell or --disable-shell was given.
2018 if test "${enable_shell+set}" = set; then
2019   enableval="$enable_shell"
2020   
2021         ol_arg=invalid
2022         for ol_val in auto yes no ; do
2023                 if test "$enableval" = "$ol_val" ; then
2024                         ol_arg="$ol_val"
2025                 fi
2026         done
2027         if test "$ol_arg" = "invalid" ; then
2028                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2029         fi
2030         ol_enable_shell="$ol_arg"
2031
2032 else
2033         ol_enable_shell="no"
2034 fi
2035 # end --enable-shell
2036 # OpenLDAP --with-shell_module
2037         # Check whether --with-shell_module or --without-shell_module was given.
2038 if test "${with_shell_module+set}" = set; then
2039   withval="$with_shell_module"
2040   
2041         ol_arg=invalid
2042         for ol_val in static dynamic ; do
2043                 if test "$withval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2049         fi
2050         ol_with_shell_module="$ol_arg"
2051
2052 else
2053         ol_with_shell_module="static"
2054 fi
2055 # end --with-shell_module
2056
2057 # OpenLDAP --enable-tcl
2058         # Check whether --enable-tcl or --disable-tcl was given.
2059 if test "${enable_tcl+set}" = set; then
2060   enableval="$enable_tcl"
2061   
2062         ol_arg=invalid
2063         for ol_val in auto yes no ; do
2064                 if test "$enableval" = "$ol_val" ; then
2065                         ol_arg="$ol_val"
2066                 fi
2067         done
2068         if test "$ol_arg" = "invalid" ; then
2069                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2070         fi
2071         ol_enable_tcl="$ol_arg"
2072
2073 else
2074         ol_enable_tcl="no"
2075 fi
2076 # end --enable-tcl
2077 # OpenLDAP --with-tcl_module
2078         # Check whether --with-tcl_module or --without-tcl_module was given.
2079 if test "${with_tcl_module+set}" = set; then
2080   withval="$with_tcl_module"
2081   
2082         ol_arg=invalid
2083         for ol_val in static dynamic ; do
2084                 if test "$withval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2090         fi
2091         ol_with_tcl_module="$ol_arg"
2092
2093 else
2094         ol_with_tcl_module="static"
2095 fi
2096 # end --with-tcl_module
2097
2098
2099 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2100 if test "${with_xxslurpdoptions+set}" = set; then
2101   withval="$with_xxslurpdoptions"
2102   :
2103 fi
2104
2105 # OpenLDAP --enable-slurpd
2106         # Check whether --enable-slurpd or --disable-slurpd was given.
2107 if test "${enable_slurpd+set}" = set; then
2108   enableval="$enable_slurpd"
2109   
2110         ol_arg=invalid
2111         for ol_val in auto yes no ; do
2112                 if test "$enableval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2118         fi
2119         ol_enable_slurpd="$ol_arg"
2120
2121 else
2122         ol_enable_slurpd="auto"
2123 fi
2124 # end --enable-slurpd
2125
2126 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2127 if test "${with_xxliboptions+set}" = set; then
2128   withval="$with_xxliboptions"
2129   :
2130 fi
2131
2132 # Check whether --enable-static or --disable-static was given.
2133 if test "${enable_static+set}" = set; then
2134   enableval="$enable_static"
2135   p=${PACKAGE-default}
2136 case "$enableval" in
2137 yes) enable_static=yes ;;
2138 no) enable_static=no ;;
2139 *)
2140   enable_static=no
2141   # Look at the argument we got.  We use all the common list separators.
2142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2143   for pkg in $enableval; do
2144     if test "X$pkg" = "X$p"; then
2145       enable_static=yes
2146     fi
2147   done
2148   IFS="$ac_save_ifs"
2149   ;;
2150 esac
2151 else
2152   enable_static=yes
2153 fi
2154
2155 # Check whether --enable-shared or --disable-shared was given.
2156 if test "${enable_shared+set}" = set; then
2157   enableval="$enable_shared"
2158   p=${PACKAGE-default}
2159 case "$enableval" in
2160 yes) enable_shared=yes ;;
2161 no) enable_shared=no ;;
2162 *)
2163   enable_shared=no
2164   # Look at the argument we got.  We use all the common list separators.
2165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2166   for pkg in $enableval; do
2167     if test "X$pkg" = "X$p"; then
2168       enable_shared=yes
2169     fi
2170   done
2171   IFS="$ac_save_ifs"
2172   ;;
2173 esac
2174 else
2175   enable_shared=yes
2176 fi
2177
2178
2179
2180 # validate options
2181 if test $ol_enable_dns = yes ; then
2182         if test $ol_enable_referrals = no ; then
2183                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2184         fi
2185         if test $ol_enable_referrals = auto ; then
2186                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2187                 ol_enable_referrals=yes
2188         fi
2189 fi
2190
2191 if test $ol_enable_slapd = no ; then
2192                 if test $ol_enable_bdb2 = yes ; then
2193                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2194         fi
2195         if test $ol_enable_ldap = yes ; then
2196                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2197         fi
2198         if test $ol_enable_ldbm = yes ; then
2199                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2200         fi
2201         if test $ol_enable_passwd = yes ; then
2202                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2203         fi
2204         if test $ol_enable_perl = yes ; then
2205                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2206         fi
2207         if test $ol_enable_shell = yes ; then
2208                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2209         fi
2210         if test $ol_enable_tcl = yes ; then
2211                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2212         fi
2213         if test $ol_enable_modules = yes ; then
2214                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2215         fi
2216         if test $ol_enable_multimaster = yes ; then
2217                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2218         fi
2219         if test $ol_enable_wrappers = yes ; then
2220                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2221         fi
2222         if test $ol_enable_phonetic = yes ; then
2223                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2224         fi
2225         if test $ol_enable_quipu = yes ; then
2226                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2227         fi
2228         if test $ol_enable_rlookups = yes ; then
2229                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2230         fi
2231         if test $ol_enable_aci = yes ; then
2232                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2233         fi
2234         if test $ol_enable_discreteaci = yes ; then
2235                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2236         fi
2237         if test $ol_with_ldbm_api != auto ; then
2238                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2239         fi
2240         if test $ol_with_ldbm_type != auto ; then
2241                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2242         fi
2243         if test $ol_with_bdb2_module != static ; then
2244                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2245         fi
2246         if test $ol_with_ldap_module != static ; then
2247                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2248         fi
2249         if test $ol_with_ldbm_module != static ; then
2250                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2251         fi
2252         if test $ol_with_passwd_module != static ; then
2253                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2254         fi
2255         if test $ol_with_perl_module != static ; then
2256                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2257         fi
2258         if test $ol_with_shell_module != static ; then
2259                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2260         fi
2261         if test $ol_with_tcl_module != static ; then
2262                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2263         fi
2264         if test $ol_enable_slurpd = yes ; then
2265                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2266         fi
2267
2268         # force settings to no
2269         ol_enable_bdb2=no
2270         ol_enable_ldap=no
2271         ol_enable_ldbm=no
2272         ol_enable_passwd=no
2273         ol_enable_perl=no
2274         ol_enable_shell=no
2275         ol_enable_tcl=no
2276
2277         ol_enable_modules=no
2278         ol_enable_multimaster=no
2279         ol_enable_phonetic=no
2280         ol_enable_quipu=no
2281         ol_enable_rlookups=no
2282         ol_enable_aci=no
2283         ol_enable_discreteaci=no
2284         ol_enable_wrappers=no
2285         ol_enable_dynamic=no
2286
2287         ol_with_ldbm_api=no
2288         ol_with_ldbm_type=no
2289
2290         ol_with_bdb2_module=static
2291         ol_with_ldap_module=static
2292         ol_with_ldbm_module=static
2293         ol_with_passwd_module=static
2294         ol_with_perl_module=static
2295         ol_with_shell_module=static
2296         ol_with_tcl_module=static
2297
2298         ol_enable_slurpd=no
2299
2300 elif test $ol_enable_ldbm = no ; then
2301         
2302         if test $ol_with_ldbm_api != auto ; then
2303                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2304         fi
2305
2306         if test $ol_with_ldbm_type != auto ; then
2307                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2308         fi
2309
2310         if test $ol_with_ldbm_module != static ; then
2311                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2312         fi
2313
2314         if test $ol_enable_bdb2 = yes ; then
2315                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2316         fi
2317
2318         if test $ol_enable_modules != yes -a \
2319                 $ol_enable_ldap = no -a \
2320                 $ol_enable_passwd = no -a \
2321                 $ol_enable_perl = no -a \
2322                 $ol_enable_shell = no -a \
2323                 $ol_enable_tcl = no ; then
2324                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2325         fi
2326
2327         ol_with_ldbm_api=no
2328         ol_with_ldbm_type=no
2329         ol_with_ldbm_module=static
2330
2331 elif test $ol_enable_bdb2 = yes ; then
2332         
2333         if test $ol_with_ldbm_api != auto -a \
2334                 $ol_with_ldbm_api != db2 ; then
2335                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2336         fi
2337
2338         ol_with_ldbm_api=db2
2339
2340 else
2341         
2342         if test $ol_enable_bdb2 != no ; then
2343                 if test $ol_with_ldbm_api != auto -a \
2344                         $ol_with_ldbm_api != db2 ; then
2345                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2346                         ol_enable_bdb2=no
2347                 fi
2348         fi
2349
2350         if test $ol_with_ldbm_api = gdbm -a \
2351                 $ol_with_ldbm_type = btree ; then
2352                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2353         fi
2354         if test $ol_with_ldbm_api = mdbm -a \
2355                 $ol_with_ldbm_type = btree ; then
2356                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2357         fi
2358         if test $ol_with_ldbm_api = ndbm -a \
2359                 $ol_with_ldbm_type = btree ; then
2360                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2361         fi
2362 fi
2363
2364 if test $ol_enable_slurpd = yes ; then
2365                 if test $ol_with_threads = no ; then
2366                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2367         fi
2368 fi
2369
2370 echo "$ac_t""done" 1>&6
2371
2372 LDAP_LIBS=
2373 LDIF_LIBS=
2374 LDBM_LIBS=
2375 LTHREAD_LIBS=
2376 LUTIL_LIBS=
2377
2378 LDAPD_LIBS=
2379 SLAPD_LIBS=
2380 SLURPD_LIBS=
2381
2382 BUILD_LDAPD=no
2383 BUILD_SLAPD=no
2384 BUILD_SLURPD=no
2385
2386 BUILD_BDB2=no
2387 BUILD_LDAP=no
2388 BUILD_LDBM=no
2389 BUILD_PASSWD=no
2390 BUILD_PERL=no
2391 BUILD_QUIPU=no
2392 BUILD_SHELL=no
2393 BUILD_TCL=no
2394 BUILD_THREAD=no
2395
2396 BUILD_BDB2_DYNAMIC=static
2397 BUILD_LDAP_DYNAMIC=static
2398 BUILD_LDBM_DYNAMIC=static
2399 BUILD_PASSWD_DYNAMIC=static
2400 BUILD_PERL_DYNAMIC=static
2401 BUILD_SHELL_DYNAMIC=static
2402 BUILD_TCL_DYNAMIC=static
2403
2404 SLAPD_MODULES_LDFLAGS=
2405 SLAPD_MODULES_CPPFLAGS=
2406 SLAPD_MODULES_LIST=
2407
2408 SLAPD_PERL_LDFLAGS=
2409 MOD_PERL_LDFLAGS=
2410 PERL_CPPFLAGS=
2411
2412 MOD_TCL_LIB=
2413 KRB_LIBS=
2414 READLINE_LIBS=
2415 SASL_LIBS=
2416 TERMCAP_LIBS=
2417 TLS_LIBS=
2418 MODULES_LIBS=
2419
2420
2421
2422 cat >> confdefs.h <<\EOF
2423 #define HAVE_MKVERSION 1
2424 EOF
2425
2426
2427
2428
2429 ol_aix_threads=no
2430 case "$target" in
2431 *-*-aix*)       if test -z "$CC" ; then
2432                 case "$ol_with_threads" in
2433                 auto | yes |  posix) ol_aix_threads=yes ;;
2434                 esac
2435         fi
2436 ;;
2437 esac
2438
2439 if test $ol_aix_threads = yes ; then
2440         if test -z "${CC}" ; then
2441                 for ac_prog in cc_r xlc_r cc
2442 do
2443 # Extract the first word of "$ac_prog", so it can be a program name with args.
2444 set dummy $ac_prog; ac_word=$2
2445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2446 echo "configure:2447: checking for $ac_word" >&5
2447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2448   echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450   if test -n "$CC"; then
2451   ac_cv_prog_CC="$CC" # Let the user override the test.
2452 else
2453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2454   ac_dummy="$PATH"
2455   for ac_dir in $ac_dummy; do
2456     test -z "$ac_dir" && ac_dir=.
2457     if test -f $ac_dir/$ac_word; then
2458       ac_cv_prog_CC="$ac_prog"
2459       break
2460     fi
2461   done
2462   IFS="$ac_save_ifs"
2463 fi
2464 fi
2465 CC="$ac_cv_prog_CC"
2466 if test -n "$CC"; then
2467   echo "$ac_t""$CC" 1>&6
2468 else
2469   echo "$ac_t""no" 1>&6
2470 fi
2471
2472 test -n "$CC" && break
2473 done
2474
2475
2476                 if test "$CC" = cc ; then
2477                                                 if test $ol_with_threads != auto ; then
2478                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2479                         else
2480                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2481                         fi
2482                         ol_with_threads=no
2483                 fi
2484         fi
2485
2486         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2487                 ol_with_threads=posix
2488                 ol_cv_pthread_create=yes
2489         fi
2490 fi
2491
2492 if test -z "${CC}"; then
2493         for ac_prog in cc
2494 do
2495 # Extract the first word of "$ac_prog", so it can be a program name with args.
2496 set dummy $ac_prog; ac_word=$2
2497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2498 echo "configure:2499: checking for $ac_word" >&5
2499 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2500   echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502   if test -n "$CC"; then
2503   ac_cv_prog_CC="$CC" # Let the user override the test.
2504 else
2505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2506   ac_dummy="$PATH"
2507   for ac_dir in $ac_dummy; do
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f $ac_dir/$ac_word; then
2510       ac_cv_prog_CC="$ac_prog"
2511       break
2512     fi
2513   done
2514   IFS="$ac_save_ifs"
2515 fi
2516 fi
2517 CC="$ac_cv_prog_CC"
2518 if test -n "$CC"; then
2519   echo "$ac_t""$CC" 1>&6
2520 else
2521   echo "$ac_t""no" 1>&6
2522 fi
2523
2524 test -n "$CC" && break
2525 done
2526
2527 fi
2528
2529
2530
2531
2532 # Check whether --enable-fast-install or --disable-fast-install was given.
2533 if test "${enable_fast_install+set}" = set; then
2534   enableval="$enable_fast_install"
2535   p=${PACKAGE-default}
2536 case "$enableval" in
2537 yes) enable_fast_install=yes ;;
2538 no) enable_fast_install=no ;;
2539 *)
2540   enable_fast_install=no
2541   # Look at the argument we got.  We use all the common list separators.
2542   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2543   for pkg in $enableval; do
2544     if test "X$pkg" = "X$p"; then
2545       enable_fast_install=yes
2546     fi
2547   done
2548   IFS="$ac_save_ifs"
2549   ;;
2550 esac
2551 else
2552   enable_fast_install=yes
2553 fi
2554
2555 # Extract the first word of "ranlib", so it can be a program name with args.
2556 set dummy ranlib; ac_word=$2
2557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2558 echo "configure:2559: checking for $ac_word" >&5
2559 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2560   echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562   if test -n "$RANLIB"; then
2563   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2564 else
2565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2566   ac_dummy="$PATH"
2567   for ac_dir in $ac_dummy; do
2568     test -z "$ac_dir" && ac_dir=.
2569     if test -f $ac_dir/$ac_word; then
2570       ac_cv_prog_RANLIB="ranlib"
2571       break
2572     fi
2573   done
2574   IFS="$ac_save_ifs"
2575   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2576 fi
2577 fi
2578 RANLIB="$ac_cv_prog_RANLIB"
2579 if test -n "$RANLIB"; then
2580   echo "$ac_t""$RANLIB" 1>&6
2581 else
2582   echo "$ac_t""no" 1>&6
2583 fi
2584
2585 # Extract the first word of "gcc", so it can be a program name with args.
2586 set dummy gcc; ac_word=$2
2587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2588 echo "configure:2589: checking for $ac_word" >&5
2589 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   if test -n "$CC"; then
2593   ac_cv_prog_CC="$CC" # Let the user override the test.
2594 else
2595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2596   ac_dummy="$PATH"
2597   for ac_dir in $ac_dummy; do
2598     test -z "$ac_dir" && ac_dir=.
2599     if test -f $ac_dir/$ac_word; then
2600       ac_cv_prog_CC="gcc"
2601       break
2602     fi
2603   done
2604   IFS="$ac_save_ifs"
2605 fi
2606 fi
2607 CC="$ac_cv_prog_CC"
2608 if test -n "$CC"; then
2609   echo "$ac_t""$CC" 1>&6
2610 else
2611   echo "$ac_t""no" 1>&6
2612 fi
2613
2614 if test -z "$CC"; then
2615   # Extract the first word of "cc", so it can be a program name with args.
2616 set dummy cc; ac_word=$2
2617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2618 echo "configure:2619: checking for $ac_word" >&5
2619 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2620   echo $ac_n "(cached) $ac_c" 1>&6
2621 else
2622   if test -n "$CC"; then
2623   ac_cv_prog_CC="$CC" # Let the user override the test.
2624 else
2625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2626   ac_prog_rejected=no
2627   ac_dummy="$PATH"
2628   for ac_dir in $ac_dummy; do
2629     test -z "$ac_dir" && ac_dir=.
2630     if test -f $ac_dir/$ac_word; then
2631       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2632         ac_prog_rejected=yes
2633         continue
2634       fi
2635       ac_cv_prog_CC="cc"
2636       break
2637     fi
2638   done
2639   IFS="$ac_save_ifs"
2640 if test $ac_prog_rejected = yes; then
2641   # We found a bogon in the path, so make sure we never use it.
2642   set dummy $ac_cv_prog_CC
2643   shift
2644   if test $# -gt 0; then
2645     # We chose a different compiler from the bogus one.
2646     # However, it has the same basename, so the bogon will be chosen
2647     # first if we set CC to just the basename; use the full file name.
2648     shift
2649     set dummy "$ac_dir/$ac_word" "$@"
2650     shift
2651     ac_cv_prog_CC="$@"
2652   fi
2653 fi
2654 fi
2655 fi
2656 CC="$ac_cv_prog_CC"
2657 if test -n "$CC"; then
2658   echo "$ac_t""$CC" 1>&6
2659 else
2660   echo "$ac_t""no" 1>&6
2661 fi
2662
2663   if test -z "$CC"; then
2664     case "`uname -s`" in
2665     *win32* | *WIN32* | *CYGWIN*)
2666       # Extract the first word of "cl", so it can be a program name with args.
2667 set dummy cl; ac_word=$2
2668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2669 echo "configure:2670: checking for $ac_word" >&5
2670 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2671   echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673   if test -n "$CC"; then
2674   ac_cv_prog_CC="$CC" # Let the user override the test.
2675 else
2676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2677   ac_dummy="$PATH"
2678   for ac_dir in $ac_dummy; do
2679     test -z "$ac_dir" && ac_dir=.
2680     if test -f $ac_dir/$ac_word; then
2681       ac_cv_prog_CC="cl"
2682       break
2683     fi
2684   done
2685   IFS="$ac_save_ifs"
2686 fi
2687 fi
2688 CC="$ac_cv_prog_CC"
2689 if test -n "$CC"; then
2690   echo "$ac_t""$CC" 1>&6
2691 else
2692   echo "$ac_t""no" 1>&6
2693 fi
2694  ;;
2695     esac
2696   fi
2697   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2698 fi
2699
2700 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2701 echo "configure:2702: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2702
2703 ac_ext=c
2704 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2705 ac_cpp='$CPP $CPPFLAGS'
2706 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2707 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2708 cross_compiling=$ac_cv_prog_cc_cross
2709
2710 cat > conftest.$ac_ext << EOF
2711
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714
2715 main(){return(0);}
2716 EOF
2717 if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2718   ac_cv_prog_cc_works=yes
2719   # If we can't run a trivial program, we are probably using a cross compiler.
2720   if (./conftest; exit) 2>/dev/null; then
2721     ac_cv_prog_cc_cross=no
2722   else
2723     ac_cv_prog_cc_cross=yes
2724   fi
2725 else
2726   echo "configure: failed program was:" >&5
2727   cat conftest.$ac_ext >&5
2728   ac_cv_prog_cc_works=no
2729 fi
2730 rm -fr conftest*
2731 ac_ext=c
2732 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2733 ac_cpp='$CPP $CPPFLAGS'
2734 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2735 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2736 cross_compiling=$ac_cv_prog_cc_cross
2737
2738 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2739 if test $ac_cv_prog_cc_works = no; then
2740   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2741 fi
2742 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2743 echo "configure:2744: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2744 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2745 cross_compiling=$ac_cv_prog_cc_cross
2746
2747 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2748 echo "configure:2749: checking whether we are using GNU C" >&5
2749 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2750   echo $ac_n "(cached) $ac_c" 1>&6
2751 else
2752   cat > conftest.c <<EOF
2753 #ifdef __GNUC__
2754   yes;
2755 #endif
2756 EOF
2757 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2758   ac_cv_prog_gcc=yes
2759 else
2760   ac_cv_prog_gcc=no
2761 fi
2762 fi
2763
2764 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2765
2766 if test $ac_cv_prog_gcc = yes; then
2767   GCC=yes
2768 else
2769   GCC=
2770 fi
2771
2772 ac_test_CFLAGS="${CFLAGS+set}"
2773 ac_save_CFLAGS="$CFLAGS"
2774 CFLAGS=
2775 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2776 echo "configure:2777: checking whether ${CC-cc} accepts -g" >&5
2777 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2778   echo $ac_n "(cached) $ac_c" 1>&6
2779 else
2780   echo 'void f(){}' > conftest.c
2781 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2782   ac_cv_prog_cc_g=yes
2783 else
2784   ac_cv_prog_cc_g=no
2785 fi
2786 rm -f conftest*
2787
2788 fi
2789
2790 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2791 if test "$ac_test_CFLAGS" = set; then
2792   CFLAGS="$ac_save_CFLAGS"
2793 elif test $ac_cv_prog_cc_g = yes; then
2794   if test "$GCC" = yes; then
2795     CFLAGS="-g -O2"
2796   else
2797     CFLAGS="-g"
2798   fi
2799 else
2800   if test "$GCC" = yes; then
2801     CFLAGS="-O2"
2802   else
2803     CFLAGS=
2804   fi
2805 fi
2806
2807 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2808 if test "${with_gnu_ld+set}" = set; then
2809   withval="$with_gnu_ld"
2810   test "$withval" = no || with_gnu_ld=yes
2811 else
2812   with_gnu_ld=no
2813 fi
2814
2815 ac_prog=ld
2816 if test "$ac_cv_prog_gcc" = yes; then
2817   # Check if gcc -print-prog-name=ld gives a path.
2818   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2819 echo "configure:2820: checking for ld used by GCC" >&5
2820   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2821   case "$ac_prog" in
2822     # Accept absolute paths.
2823     [\\/]* | [A-Za-z]:[\\/]*)
2824       re_direlt='/[^/][^/]*/\.\./'
2825       # Canonicalize the path of ld
2826       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2827       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2828         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2829       done
2830       test -z "$LD" && LD="$ac_prog"
2831       ;;
2832   "")
2833     # If it fails, then pretend we aren't using GCC.
2834     ac_prog=ld
2835     ;;
2836   *)
2837     # If it is relative, then search for the first ld in PATH.
2838     with_gnu_ld=unknown
2839     ;;
2840   esac
2841 elif test "$with_gnu_ld" = yes; then
2842   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2843 echo "configure:2844: checking for GNU ld" >&5
2844 else
2845   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2846 echo "configure:2847: checking for non-GNU ld" >&5
2847 fi
2848 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2849   echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851   if test -z "$LD"; then
2852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2853   for ac_dir in $PATH; do
2854     test -z "$ac_dir" && ac_dir=.
2855     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2856       ac_cv_path_LD="$ac_dir/$ac_prog"
2857       # Check to see if the program is GNU ld.  I'd rather use --version,
2858       # but apparently some GNU ld's only accept -v.
2859       # Break only if it was the GNU/non-GNU ld that we prefer.
2860       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2861         test "$with_gnu_ld" != no && break
2862       else
2863         test "$with_gnu_ld" != yes && break
2864       fi
2865     fi
2866   done
2867   IFS="$ac_save_ifs"
2868 else
2869   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2870 fi
2871 fi
2872
2873 LD="$ac_cv_path_LD"
2874 if test -n "$LD"; then
2875   echo "$ac_t""$LD" 1>&6
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2880
2881 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2882 echo "configure:2883: checking if the linker ($LD) is GNU ld" >&5
2883 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2884   echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2887 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2888   ac_cv_prog_gnu_ld=yes
2889 else
2890   ac_cv_prog_gnu_ld=no
2891 fi
2892 fi
2893
2894 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2895
2896
2897 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2898 echo "configure:2899: checking for BSD-compatible nm" >&5
2899 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   if test -n "$NM"; then
2903   # Let the user override the test.
2904   ac_cv_path_NM="$NM"
2905 else
2906   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2907   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2908     test -z "$ac_dir" && ac_dir=.
2909     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2910       # Check to see if the nm accepts a BSD-compat flag.
2911       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2912       #   nm: unknown option "B" ignored
2913       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2914         ac_cv_path_NM="$ac_dir/nm -B"
2915         break
2916       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2917         ac_cv_path_NM="$ac_dir/nm -p"
2918         break
2919       else
2920         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2921         continue # so that we can try to find one that supports BSD flags
2922       fi
2923     fi
2924   done
2925   IFS="$ac_save_ifs"
2926   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2927 fi
2928 fi
2929
2930 NM="$ac_cv_path_NM"
2931 echo "$ac_t""$NM" 1>&6
2932
2933
2934 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2935 echo "configure:2936: checking whether ln -s works" >&5
2936 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2937   echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939   rm -f conftestdata
2940 if ln -s X conftestdata 2>/dev/null
2941 then
2942   rm -f conftestdata
2943   ac_cv_prog_LN_S="ln -s"
2944 else
2945   ac_cv_prog_LN_S=ln
2946 fi
2947 fi
2948 LN_S="$ac_cv_prog_LN_S"
2949 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2950   echo "$ac_t""yes" 1>&6
2951 else
2952   echo "$ac_t""no" 1>&6
2953 fi
2954
2955 if test $host != $build; then
2956   ac_tool_prefix=${host_alias}-
2957 else
2958   ac_tool_prefix=
2959 fi
2960
2961
2962 # Check for any special flags to pass to ltconfig.
2963 libtool_flags="--cache-file=$cache_file"
2964 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2965 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2966 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2967 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2968 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2969 libtool_flags="$libtool_flags --enable-dlopen"
2970 libtool_flags="$libtool_flags --enable-win32-dll"
2971 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2972 if test "${enable_libtool_lock+set}" = set; then
2973   enableval="$enable_libtool_lock"
2974   :
2975 fi
2976
2977 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2978 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2979
2980 # Some flags need to be propagated to the compiler or linker for good
2981 # libtool support.
2982 case "$host" in
2983 *-*-irix6*)
2984   # Find out which ABI we are using.
2985   echo '#line 2986 "configure"' > conftest.$ac_ext
2986   if { (eval echo configure:2987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2987     case "`/usr/bin/file conftest.o`" in
2988     *32-bit*)
2989       LD="${LD-ld} -32"
2990       ;;
2991     *N32*)
2992       LD="${LD-ld} -n32"
2993       ;;
2994     *64-bit*)
2995       LD="${LD-ld} -64"
2996       ;;
2997     esac
2998   fi
2999   rm -rf conftest*
3000   ;;
3001
3002 *-*-sco3.2v5*)
3003   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3004   SAVE_CFLAGS="$CFLAGS"
3005   CFLAGS="$CFLAGS -belf"
3006   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3007 echo "configure:3008: checking whether the C compiler needs -belf" >&5
3008 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3009   echo $ac_n "(cached) $ac_c" 1>&6
3010 else
3011   cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014
3015 int main() {
3016
3017 ; return 0; }
3018 EOF
3019 if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3020   rm -rf conftest*
3021   lt_cv_cc_needs_belf=yes
3022 else
3023   echo "configure: failed program was:" >&5
3024   cat conftest.$ac_ext >&5
3025   rm -rf conftest*
3026   lt_cv_cc_needs_belf=no
3027 fi
3028 rm -f conftest*
3029 fi
3030
3031 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3032   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3033     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3034     CFLAGS="$SAVE_CFLAGS"
3035   fi
3036   ;;
3037
3038 *-*-cygwin* | *-*-mingw*)
3039   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3040 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3042 echo "configure:3043: checking for $ac_word" >&5
3043 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   if test -n "$DLLTOOL"; then
3047   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3048 else
3049   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3050   ac_dummy="$PATH"
3051   for ac_dir in $ac_dummy; do
3052     test -z "$ac_dir" && ac_dir=.
3053     if test -f $ac_dir/$ac_word; then
3054       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3055       break
3056     fi
3057   done
3058   IFS="$ac_save_ifs"
3059 fi
3060 fi
3061 DLLTOOL="$ac_cv_prog_DLLTOOL"
3062 if test -n "$DLLTOOL"; then
3063   echo "$ac_t""$DLLTOOL" 1>&6
3064 else
3065   echo "$ac_t""no" 1>&6
3066 fi
3067
3068
3069 if test -z "$ac_cv_prog_DLLTOOL"; then
3070 if test -n "$ac_tool_prefix"; then
3071   # Extract the first word of "dlltool", so it can be a program name with args.
3072 set dummy dlltool; ac_word=$2
3073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3074 echo "configure:3075: checking for $ac_word" >&5
3075 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078   if test -n "$DLLTOOL"; then
3079   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3080 else
3081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3082   ac_dummy="$PATH"
3083   for ac_dir in $ac_dummy; do
3084     test -z "$ac_dir" && ac_dir=.
3085     if test -f $ac_dir/$ac_word; then
3086       ac_cv_prog_DLLTOOL="dlltool"
3087       break
3088     fi
3089   done
3090   IFS="$ac_save_ifs"
3091   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3092 fi
3093 fi
3094 DLLTOOL="$ac_cv_prog_DLLTOOL"
3095 if test -n "$DLLTOOL"; then
3096   echo "$ac_t""$DLLTOOL" 1>&6
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100
3101 else
3102   DLLTOOL="false"
3103 fi
3104 fi
3105
3106   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3107 set dummy ${ac_tool_prefix}as; ac_word=$2
3108 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3109 echo "configure:3110: checking for $ac_word" >&5
3110 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   if test -n "$AS"; then
3114   ac_cv_prog_AS="$AS" # Let the user override the test.
3115 else
3116   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3117   ac_dummy="$PATH"
3118   for ac_dir in $ac_dummy; do
3119     test -z "$ac_dir" && ac_dir=.
3120     if test -f $ac_dir/$ac_word; then
3121       ac_cv_prog_AS="${ac_tool_prefix}as"
3122       break
3123     fi
3124   done
3125   IFS="$ac_save_ifs"
3126 fi
3127 fi
3128 AS="$ac_cv_prog_AS"
3129 if test -n "$AS"; then
3130   echo "$ac_t""$AS" 1>&6
3131 else
3132   echo "$ac_t""no" 1>&6
3133 fi
3134
3135
3136 if test -z "$ac_cv_prog_AS"; then
3137 if test -n "$ac_tool_prefix"; then
3138   # Extract the first word of "as", so it can be a program name with args.
3139 set dummy as; ac_word=$2
3140 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3141 echo "configure:3142: checking for $ac_word" >&5
3142 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3143   echo $ac_n "(cached) $ac_c" 1>&6
3144 else
3145   if test -n "$AS"; then
3146   ac_cv_prog_AS="$AS" # Let the user override the test.
3147 else
3148   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3149   ac_dummy="$PATH"
3150   for ac_dir in $ac_dummy; do
3151     test -z "$ac_dir" && ac_dir=.
3152     if test -f $ac_dir/$ac_word; then
3153       ac_cv_prog_AS="as"
3154       break
3155     fi
3156   done
3157   IFS="$ac_save_ifs"
3158   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3159 fi
3160 fi
3161 AS="$ac_cv_prog_AS"
3162 if test -n "$AS"; then
3163   echo "$ac_t""$AS" 1>&6
3164 else
3165   echo "$ac_t""no" 1>&6
3166 fi
3167
3168 else
3169   AS="false"
3170 fi
3171 fi
3172
3173   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3174 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3176 echo "configure:3177: checking for $ac_word" >&5
3177 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   if test -n "$OBJDUMP"; then
3181   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3182 else
3183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3184   ac_dummy="$PATH"
3185   for ac_dir in $ac_dummy; do
3186     test -z "$ac_dir" && ac_dir=.
3187     if test -f $ac_dir/$ac_word; then
3188       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3189       break
3190     fi
3191   done
3192   IFS="$ac_save_ifs"
3193 fi
3194 fi
3195 OBJDUMP="$ac_cv_prog_OBJDUMP"
3196 if test -n "$OBJDUMP"; then
3197   echo "$ac_t""$OBJDUMP" 1>&6
3198 else
3199   echo "$ac_t""no" 1>&6
3200 fi
3201
3202
3203 if test -z "$ac_cv_prog_OBJDUMP"; then
3204 if test -n "$ac_tool_prefix"; then
3205   # Extract the first word of "objdump", so it can be a program name with args.
3206 set dummy objdump; ac_word=$2
3207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3208 echo "configure:3209: checking for $ac_word" >&5
3209 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   if test -n "$OBJDUMP"; then
3213   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3214 else
3215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3216   ac_dummy="$PATH"
3217   for ac_dir in $ac_dummy; do
3218     test -z "$ac_dir" && ac_dir=.
3219     if test -f $ac_dir/$ac_word; then
3220       ac_cv_prog_OBJDUMP="objdump"
3221       break
3222     fi
3223   done
3224   IFS="$ac_save_ifs"
3225   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3226 fi
3227 fi
3228 OBJDUMP="$ac_cv_prog_OBJDUMP"
3229 if test -n "$OBJDUMP"; then
3230   echo "$ac_t""$OBJDUMP" 1>&6
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235 else
3236   OBJDUMP="false"
3237 fi
3238 fi
3239
3240   ;;
3241
3242 esac
3243
3244
3245 # Save cache, so that ltconfig can load it
3246
3247
3248 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3249 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3250 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3251 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3252 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3253 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3254 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3255 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3256
3257 # Reload cache, that may have been modified by ltconfig
3258
3259
3260 # This can be used to rebuild libtool when needed
3261 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3262
3263 # Always use our own libtool.
3264 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3265
3266 # Redirect the config.log output again, so that the ltconfig log is not
3267 # clobbered by the next message.
3268 exec 5>>./config.log
3269
3270
3271 for ac_prog in mawk gawk nawk awk
3272 do
3273 # Extract the first word of "$ac_prog", so it can be a program name with args.
3274 set dummy $ac_prog; ac_word=$2
3275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3276 echo "configure:3277: checking for $ac_word" >&5
3277 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3278   echo $ac_n "(cached) $ac_c" 1>&6
3279 else
3280   if test -n "$AWK"; then
3281   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3282 else
3283   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3284   ac_dummy="$PATH"
3285   for ac_dir in $ac_dummy; do
3286     test -z "$ac_dir" && ac_dir=.
3287     if test -f $ac_dir/$ac_word; then
3288       ac_cv_prog_AWK="$ac_prog"
3289       break
3290     fi
3291   done
3292   IFS="$ac_save_ifs"
3293 fi
3294 fi
3295 AWK="$ac_cv_prog_AWK"
3296 if test -n "$AWK"; then
3297   echo "$ac_t""$AWK" 1>&6
3298 else
3299   echo "$ac_t""no" 1>&6
3300 fi
3301
3302 test -n "$AWK" && break
3303 done
3304
3305 # test for ln hardlink support
3306 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3307 echo "configure:3308: checking whether ln works" >&5
3308 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   rm -f conftest.src conftest.dst
3312 echo "conftest" > conftest.src
3313 if ln conftest.src conftest.dst 2>/dev/null
3314 then
3315   ol_cv_prog_LN_H="ln"
3316 else
3317   ol_cv_prog_LN_H="cp"
3318 fi
3319 rm -f conftest.src conftest.dst
3320
3321 fi
3322 LN_H="$ol_cv_prog_LN_H"
3323 if test "$ol_cv_prog_LN_H" = "ln"; then
3324         echo "$ac_t""yes" 1>&6
3325 else
3326         echo "$ac_t""no" 1>&6
3327 fi
3328
3329 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3330 echo "configure:3331: checking whether ln -s works" >&5
3331 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3332   echo $ac_n "(cached) $ac_c" 1>&6
3333 else
3334   rm -f conftestdata
3335 if ln -s X conftestdata 2>/dev/null
3336 then
3337   rm -f conftestdata
3338   ac_cv_prog_LN_S="ln -s"
3339 else
3340   ac_cv_prog_LN_S=ln
3341 fi
3342 fi
3343 LN_S="$ac_cv_prog_LN_S"
3344 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3345   echo "$ac_t""yes" 1>&6
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349
3350
3351 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3352         LN_S="$LN_H"
3353 fi
3354
3355 # Extract the first word of "sendmail", so it can be a program name with args.
3356 set dummy sendmail; ac_word=$2
3357 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3358 echo "configure:3359: checking for $ac_word" >&5
3359 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   case "$SENDMAIL" in
3363   /*)
3364   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3365   ;;
3366   ?:/*)                  
3367   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3368   ;;
3369   *)
3370   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3371   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3372   for ac_dir in $ac_dummy; do 
3373     test -z "$ac_dir" && ac_dir=.
3374     if test -f $ac_dir/$ac_word; then
3375       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3376       break
3377     fi
3378   done
3379   IFS="$ac_save_ifs"
3380   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3381   ;;
3382 esac
3383 fi
3384 SENDMAIL="$ac_cv_path_SENDMAIL"
3385 if test -n "$SENDMAIL"; then
3386   echo "$ac_t""$SENDMAIL" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 # Extract the first word of "vi", so it can be a program name with args.
3392 set dummy vi; ac_word=$2
3393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3394 echo "configure:3395: checking for $ac_word" >&5
3395 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3396   echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398   case "$EDITOR" in
3399   /*)
3400   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3401   ;;
3402   ?:/*)                  
3403   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3404   ;;
3405   *)
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH:/usr/ucb"
3408   for ac_dir in $ac_dummy; do 
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3417   ;;
3418 esac
3419 fi
3420 EDITOR="$ac_cv_path_EDITOR"
3421 if test -n "$EDITOR"; then
3422   echo "$ac_t""$EDITOR" 1>&6
3423 else
3424   echo "$ac_t""no" 1>&6
3425 fi
3426
3427 # Extract the first word of "finger", so it can be a program name with args.
3428 set dummy finger; ac_word=$2
3429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3430 echo "configure:3431: checking for $ac_word" >&5
3431 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3432   echo $ac_n "(cached) $ac_c" 1>&6
3433 else
3434   case "$FINGER" in
3435   /*)
3436   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3437   ;;
3438   ?:/*)                  
3439   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3440   ;;
3441   *)
3442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3443   ac_dummy="$PATH:/usr/ucb"
3444   for ac_dir in $ac_dummy; do 
3445     test -z "$ac_dir" && ac_dir=.
3446     if test -f $ac_dir/$ac_word; then
3447       ac_cv_path_FINGER="$ac_dir/$ac_word"
3448       break
3449     fi
3450   done
3451   IFS="$ac_save_ifs"
3452   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3453   ;;
3454 esac
3455 fi
3456 FINGER="$ac_cv_path_FINGER"
3457 if test -n "$FINGER"; then
3458   echo "$ac_t""$FINGER" 1>&6
3459 else
3460   echo "$ac_t""no" 1>&6
3461 fi
3462
3463
3464 ol_link_perl=no
3465 if test $ol_enable_perl != no ; then
3466         # Extract the first word of "perl", so it can be a program name with args.
3467 set dummy perl; ac_word=$2
3468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3469 echo "configure:3470: checking for $ac_word" >&5
3470 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3471   echo $ac_n "(cached) $ac_c" 1>&6
3472 else
3473   case "$PERLBIN" in
3474   /*)
3475   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3476   ;;
3477   ?:/*)                  
3478   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3479   ;;
3480   *)
3481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3482   ac_dummy="$PATH"
3483   for ac_dir in $ac_dummy; do 
3484     test -z "$ac_dir" && ac_dir=.
3485     if test -f $ac_dir/$ac_word; then
3486       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3487       break
3488     fi
3489   done
3490   IFS="$ac_save_ifs"
3491   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3492   ;;
3493 esac
3494 fi
3495 PERLBIN="$ac_cv_path_PERLBIN"
3496 if test -n "$PERLBIN"; then
3497   echo "$ac_t""$PERLBIN" 1>&6
3498 else
3499   echo "$ac_t""no" 1>&6
3500 fi
3501
3502
3503         if test "no$PERLBIN" = "no" ; then
3504                 if test $ol_enable_perl = yes ; then
3505                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3506                 fi
3507
3508         else
3509                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3510                 if test x"$ol_with_perl_module" == "xstatic" ; then
3511                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3512                 else
3513                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3514                 fi
3515                                 ol_link_perl=yes
3516         fi
3517 fi
3518
3519 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3520 echo "configure:3521: checking how to run the C preprocessor" >&5
3521 # On Suns, sometimes $CPP names a directory.
3522 if test -n "$CPP" && test -d "$CPP"; then
3523   CPP=
3524 fi
3525 if test -z "$CPP"; then
3526 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529     # This must be in double quotes, not single quotes, because CPP may get
3530   # substituted into the Makefile and "${CC-cc}" will confuse make.
3531   CPP="${CC-cc} -E"
3532   # On the NeXT, cc -E runs the code through the compiler's parser,
3533   # not just through cpp.
3534   cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 #include <assert.h>
3538 Syntax Error
3539 EOF
3540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3541 { (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3543 if test -z "$ac_err"; then
3544   :
3545 else
3546   echo "$ac_err" >&5
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   CPP="${CC-cc} -E -traditional-cpp"
3551   cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 #include <assert.h>
3555 Syntax Error
3556 EOF
3557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3558 { (eval echo configure:3559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3560 if test -z "$ac_err"; then
3561   :
3562 else
3563   echo "$ac_err" >&5
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566   rm -rf conftest*
3567   CPP="${CC-cc} -nologo -E"
3568   cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <assert.h>
3572 Syntax Error
3573 EOF
3574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3575 { (eval echo configure:3576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3577 if test -z "$ac_err"; then
3578   :
3579 else
3580   echo "$ac_err" >&5
3581   echo "configure: failed program was:" >&5
3582   cat conftest.$ac_ext >&5
3583   rm -rf conftest*
3584   CPP=/lib/cpp
3585 fi
3586 rm -f conftest*
3587 fi
3588 rm -f conftest*
3589 fi
3590 rm -f conftest*
3591   ac_cv_prog_CPP="$CPP"
3592 fi
3593   CPP="$ac_cv_prog_CPP"
3594 else
3595   ac_cv_prog_CPP="$CPP"
3596 fi
3597 echo "$ac_t""$CPP" 1>&6
3598
3599
3600 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3601         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3602
3603 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3604         echo "configure: warning: programs compiled here do run here..." 1>&2
3605         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3606
3607 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3608         echo "configure: warning: programs compiled here do not run here..." 1>&2
3609         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3610 fi
3611
3612 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3613 echo "configure:3614: checking for AIX" >&5
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #ifdef _AIX
3618   yes
3619 #endif
3620
3621 EOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "yes" >/dev/null 2>&1; then
3624   rm -rf conftest*
3625   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3626 #define _ALL_SOURCE 1
3627 EOF
3628
3629 else
3630   rm -rf conftest*
3631   echo "$ac_t""no" 1>&6
3632 fi
3633 rm -f conftest*
3634
3635
3636 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3637 echo "configure:3638: checking for POSIXized ISC" >&5
3638 if test -d /etc/conf/kconfig.d &&
3639   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3640 then
3641   echo "$ac_t""yes" 1>&6
3642   ISC=yes # If later tests want to check for ISC.
3643   cat >> confdefs.h <<\EOF
3644 #define _POSIX_SOURCE 1
3645 EOF
3646
3647   if test "$GCC" = yes; then
3648     CC="$CC -posix"
3649   else
3650     CC="$CC -Xp"
3651   fi
3652 else
3653   echo "$ac_t""no" 1>&6
3654   ISC=
3655 fi
3656
3657 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3658 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3659 echo "configure:3660: checking for minix/config.h" >&5
3660 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3661   echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663   cat > conftest.$ac_ext <<EOF
3664 #line 3665 "configure"
3665 #include "confdefs.h"
3666 #include <minix/config.h>
3667 EOF
3668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3669 { (eval echo configure:3670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3671 if test -z "$ac_err"; then
3672   rm -rf conftest*
3673   eval "ac_cv_header_$ac_safe=yes"
3674 else
3675   echo "$ac_err" >&5
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -rf conftest*
3679   eval "ac_cv_header_$ac_safe=no"
3680 fi
3681 rm -f conftest*
3682 fi
3683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3684   echo "$ac_t""yes" 1>&6
3685   MINIX=yes
3686 else
3687   echo "$ac_t""no" 1>&6
3688 MINIX=
3689 fi
3690
3691 if test "$MINIX" = yes; then
3692   cat >> confdefs.h <<\EOF
3693 #define _POSIX_SOURCE 1
3694 EOF
3695
3696   cat >> confdefs.h <<\EOF
3697 #define _POSIX_1_SOURCE 2
3698 EOF
3699
3700   cat >> confdefs.h <<\EOF
3701 #define _MINIX 1
3702 EOF
3703
3704 fi
3705
3706
3707 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3708 echo "configure:3709: checking for Cygwin environment" >&5
3709 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3710   echo $ac_n "(cached) $ac_c" 1>&6
3711 else
3712   cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715
3716 int main() {
3717
3718 #ifndef __CYGWIN__
3719 #define __CYGWIN__ __CYGWIN32__
3720 #endif
3721 return __CYGWIN__;
3722 ; return 0; }
3723 EOF
3724 if { (eval echo configure:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3725   rm -rf conftest*
3726   ac_cv_cygwin=yes
3727 else
3728   echo "configure: failed program was:" >&5
3729   cat conftest.$ac_ext >&5
3730   rm -rf conftest*
3731   ac_cv_cygwin=no
3732 fi
3733 rm -f conftest*
3734 fi
3735
3736 echo "$ac_t""$ac_cv_cygwin" 1>&6
3737 CYGWIN=
3738 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3739 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3740 echo "configure:3741: checking for mingw32 environment" >&5
3741 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3742   echo $ac_n "(cached) $ac_c" 1>&6
3743 else
3744   cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747
3748 int main() {
3749 return __MINGW32__;
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3753   rm -rf conftest*
3754   ac_cv_mingw32=yes
3755 else
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   ac_cv_mingw32=no
3760 fi
3761 rm -f conftest*
3762 fi
3763
3764 echo "$ac_t""$ac_cv_mingw32" 1>&6
3765 MINGW32=
3766 test "$ac_cv_mingw32" = yes && MINGW32=yes
3767 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3768 echo "configure:3769: checking for EMX OS/2 environment" >&5
3769 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   cat > conftest.$ac_ext <<EOF
3773 #line 3774 "configure"
3774 #include "confdefs.h"
3775
3776 int main() {
3777 return __EMX__;
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3781   rm -rf conftest*
3782   ac_cv_emxos2=yes
3783 else
3784   echo "configure: failed program was:" >&5
3785   cat conftest.$ac_ext >&5
3786   rm -rf conftest*
3787   ac_cv_emxos2=no
3788 fi
3789 rm -f conftest*
3790 fi
3791
3792 echo "$ac_t""$ac_cv_emxos2" 1>&6
3793 EMXOS2=
3794 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3795
3796
3797
3798 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3799 echo "configure:3800: checking for executable suffix" >&5
3800 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3801   echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3804   ac_cv_exeext=.exe
3805 else
3806   rm -f conftest*
3807   echo 'int main () { return 0; }' > conftest.$ac_ext
3808   ac_cv_exeext=
3809   if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3810     for file in conftest.*; do
3811       case $file in
3812       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3813       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3814       esac
3815     done
3816   else
3817     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3818   fi
3819   rm -f conftest*
3820   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3821 fi
3822 fi
3823
3824 EXEEXT=""
3825 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3826 echo "$ac_t""${ac_cv_exeext}" 1>&6
3827 ac_exeext=$EXEEXT
3828
3829 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3830 echo "configure:3831: checking for object suffix" >&5
3831 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   rm -f conftest*
3835 echo 'int i = 1;' > conftest.$ac_ext
3836 if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3837   for ac_file in conftest.*; do
3838     case $ac_file in
3839     *.c) ;;
3840     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3841     esac
3842   done
3843 else
3844   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ac_cv_objext" 1>&6
3850 OBJEXT=$ac_cv_objext
3851 ac_objext=$ac_cv_objext
3852
3853
3854 cat >> confdefs.h <<EOF
3855 #define EXEEXT "${EXEEXT}"
3856 EOF
3857
3858
3859 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3860 echo "configure:3861: checking for be_app in -lbe" >&5
3861 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   ac_save_LIBS="$LIBS"
3866 LIBS="-lbe -lroot -lnet $LIBS"
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870 /* Override any gcc2 internal prototype to avoid an error.  */
3871 /* We use char because int might match the return type of a gcc2
3872     builtin and then its argument prototype would still apply.  */
3873 char be_app();
3874
3875 int main() {
3876 be_app()
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=yes"
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=no"
3887 fi
3888 rm -f conftest*
3889 LIBS="$ac_save_LIBS"
3890
3891 fi
3892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3893   echo "$ac_t""yes" 1>&6
3894   LIBS="$LIBS -lbe -lroot -lnet"
3895 else
3896   echo "$ac_t""no" 1>&6
3897 :
3898 fi
3899
3900
3901
3902
3903
3904 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3905 echo "configure:3906: checking for ${CC-cc} option to accept ANSI C" >&5
3906 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   am_cv_prog_cc_stdc=no
3910 ac_save_CC="$CC"
3911 # Don't try gcc -ansi; that turns off useful extensions and
3912 # breaks some systems' header files.
3913 # AIX                   -qlanglvl=ansi
3914 # Ultrix and OSF/1      -std1
3915 # HP-UX 10.20 and later -Ae
3916 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3917 # SVR4                  -Xc -D__EXTENSIONS__
3918 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3919 do
3920   CC="$ac_save_CC $ac_arg"
3921   cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 #include <stdarg.h>
3925 #include <stdio.h>
3926 #include <sys/types.h>
3927 #include <sys/stat.h>
3928 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3929 struct buf { int x; };
3930 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3931 static char *e (p, i)
3932      char **p;
3933      int i;
3934 {
3935   return p[i];
3936 }
3937 static char *f (char * (*g) (char **, int), char **p, ...)
3938 {
3939   char *s;
3940   va_list v;
3941   va_start (v,p);
3942   s = g (p, va_arg (v,int));
3943   va_end (v);
3944   return s;
3945 }
3946 int test (int i, double x);
3947 struct s1 {int (*f) (int a);};
3948 struct s2 {int (*f) (double a);};
3949 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3950 int argc;
3951 char **argv;
3952
3953 int main() {
3954
3955 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3956
3957 ; return 0; }
3958 EOF
3959 if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3960   rm -rf conftest*
3961   am_cv_prog_cc_stdc="$ac_arg"; break
3962 else
3963   echo "configure: failed program was:" >&5
3964   cat conftest.$ac_ext >&5
3965 fi
3966 rm -f conftest*
3967 done
3968 CC="$ac_save_CC"
3969
3970 fi
3971
3972 if test -z "$am_cv_prog_cc_stdc"; then
3973   echo "$ac_t""none needed" 1>&6
3974 else
3975   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3976 fi
3977 case "x$am_cv_prog_cc_stdc" in
3978   x|xno) ;;
3979   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3980 esac
3981
3982 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3983         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3984 fi
3985
3986 # test for make depend flag
3987 OL_MKDEP=
3988 OL_MKDEP_FLAGS=
3989 if test -z "${MKDEP}"; then
3990         OL_MKDEP="${CC-cc}"
3991         if test -z "${MKDEP_FLAGS}"; then
3992                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3993 echo "configure:3994: checking for ${OL_MKDEP} depend flag" >&5
3994 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   
3998                         ol_cv_mkdep=no
3999                         for flag in "-M" "-xM"; do
4000                                 cat > conftest.c <<EOF
4001  noCode;
4002 EOF
4003                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4004                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4005                                 then
4006                                         if test ! -f conftest."${ac_object}" ; then
4007                                                 ol_cv_mkdep=$flag
4008                                                 OL_MKDEP_FLAGS="$flag"
4009                                                 break
4010                                         fi
4011                                 fi
4012                         done
4013                         rm -f conftest*
4014                 
4015 fi
4016
4017 echo "$ac_t""$ol_cv_mkdep" 1>&6
4018         else
4019                 cc_cv_mkdep=yes
4020                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4021         fi
4022 else
4023         cc_cv_mkdep=yes
4024         OL_MKDEP="${MKDEP}"
4025         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4026 fi
4027
4028
4029
4030 if test "${ol_cv_mkdep}" = no ; then
4031         # this will soon become an error
4032         echo "configure: warning: do not know how to generate dependencies" 1>&2
4033 fi
4034
4035 ol_link_modules=no
4036 if test $ol_enable_modules != no ; then
4037         for ac_hdr in ltdl.h
4038 do
4039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4041 echo "configure:4042: checking for $ac_hdr" >&5
4042 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4043   echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045   cat > conftest.$ac_ext <<EOF
4046 #line 4047 "configure"
4047 #include "confdefs.h"
4048 #include <$ac_hdr>
4049 EOF
4050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4051 { (eval echo configure:4052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4053 if test -z "$ac_err"; then
4054   rm -rf conftest*
4055   eval "ac_cv_header_$ac_safe=yes"
4056 else
4057   echo "$ac_err" >&5
4058   echo "configure: failed program was:" >&5
4059   cat conftest.$ac_ext >&5
4060   rm -rf conftest*
4061   eval "ac_cv_header_$ac_safe=no"
4062 fi
4063 rm -f conftest*
4064 fi
4065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4066   echo "$ac_t""yes" 1>&6
4067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4068   cat >> confdefs.h <<EOF
4069 #define $ac_tr_hdr 1
4070 EOF
4071  
4072 else
4073   echo "$ac_t""no" 1>&6
4074 fi
4075 done
4076
4077
4078         if test $ac_cv_header_ltdl_h = no ; then
4079                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4080         fi
4081
4082         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4083 echo "configure:4084: checking for lt_dlinit in -lltdl" >&5
4084 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   ac_save_LIBS="$LIBS"
4089 LIBS="-lltdl  $LIBS"
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char lt_dlinit();
4097
4098 int main() {
4099 lt_dlinit()
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103   rm -rf conftest*
4104   eval "ac_cv_lib_$ac_lib_var=yes"
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=no"
4110 fi
4111 rm -f conftest*
4112 LIBS="$ac_save_LIBS"
4113
4114 fi
4115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117   
4118             MODULES_LIBS=-lltdl
4119             cat >> confdefs.h <<\EOF
4120 #define HAVE_LIBLTDL 1
4121 EOF
4122
4123         
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127
4128
4129         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4130                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4131         fi
4132         ol_link_modules=yes
4133 else
4134         ol_with_bdb2_module=static
4135         ol_with_ldap_module=static
4136         ol_with_ldbm_module=static
4137         ol_with_passwd_module=static
4138         ol_with_perl_module=static
4139         ol_with_shell_module=static
4140         ol_with_tcl_module=static
4141 fi
4142
4143 # test for EBCDIC
4144 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4145 echo "configure:4146: checking for EBCDIC" >&5
4146 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4147   echo $ac_n "(cached) $ac_c" 1>&6
4148 else
4149   
4150         cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153
4154 #if !('M' == 0xd4)
4155 #include <__ASCII__/generate_error.h>
4156 #endif
4157
4158 EOF
4159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4160 { (eval echo configure:4161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4162 if test -z "$ac_err"; then
4163   rm -rf conftest*
4164   ol_cv_cpp_ebcdic=yes
4165 else
4166   echo "$ac_err" >&5
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   ol_cv_cpp_ebcdic=no
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4176 if test $ol_cv_cpp_ebcdic = yes ; then
4177         cat >> confdefs.h <<\EOF
4178 #define HAVE_EBCDIC 1
4179 EOF
4180
4181 fi
4182
4183 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4184 echo "configure:4185: checking for ANSI C header files" >&5
4185 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4186   echo $ac_n "(cached) $ac_c" 1>&6
4187 else
4188   cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <stdlib.h>
4192 #include <stdarg.h>
4193 #include <string.h>
4194 #include <float.h>
4195 EOF
4196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4197 { (eval echo configure:4198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4199 if test -z "$ac_err"; then
4200   rm -rf conftest*
4201   ol_cv_header_stdc=yes
4202 else
4203   echo "$ac_err" >&5
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -rf conftest*
4207   ol_cv_header_stdc=no
4208 fi
4209 rm -f conftest*
4210
4211 if test $ol_cv_header_stdc = yes; then
4212   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4213 cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <string.h>
4217 EOF
4218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4219   egrep "memchr" >/dev/null 2>&1; then
4220   :
4221 else
4222   rm -rf conftest*
4223   ol_cv_header_stdc=no
4224 fi
4225 rm -f conftest*
4226
4227 fi
4228
4229 if test $ol_cv_header_stdc = yes; then
4230   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4231 cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234 #include <stdlib.h>
4235 EOF
4236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4237   egrep "free" >/dev/null 2>&1; then
4238   :
4239 else
4240   rm -rf conftest*
4241   ol_cv_header_stdc=no
4242 fi
4243 rm -f conftest*
4244
4245 fi
4246
4247 if test $ol_cv_header_stdc = yes; then
4248   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4249 if test "$cross_compiling" = yes; then
4250   :
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 #include <ctype.h>
4256 #ifndef HAVE_EBCDIC
4257 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4258 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4259 #else
4260 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4261                 || ('j' <= (c) && (c) <= 'r') \
4262                 || ('s' <= (c) && (c) <= 'z'))
4263 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4264 #endif
4265 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4266 int main () { int i; for (i = 0; i < 256; i++)
4267 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4268 exit (0); }
4269
4270 EOF
4271 if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4272 then
4273   :
4274 else
4275   echo "configure: failed program was:" >&5
4276   cat conftest.$ac_ext >&5
4277   rm -fr conftest*
4278   ol_cv_header_stdc=no
4279 fi
4280 rm -fr conftest*
4281 fi
4282
4283 fi
4284 fi
4285
4286 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4287 if test $ol_cv_header_stdc = yes; then
4288   cat >> confdefs.h <<\EOF
4289 #define STDC_HEADERS 1
4290 EOF
4291
4292 fi
4293 ac_cv_header_stdc=disable
4294
4295
4296 if test $ol_cv_header_stdc != yes; then
4297         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4298 fi
4299
4300 ac_header_dirent=no
4301 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4302 do
4303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4304 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4305 echo "configure:4306: checking for $ac_hdr that defines DIR" >&5
4306 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4307   echo $ac_n "(cached) $ac_c" 1>&6
4308 else
4309   cat > conftest.$ac_ext <<EOF
4310 #line 4311 "configure"
4311 #include "confdefs.h"
4312 #include <sys/types.h>
4313 #include <$ac_hdr>
4314 int main() {
4315 DIR *dirp = 0;
4316 ; return 0; }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4319   rm -rf conftest*
4320   eval "ac_cv_header_dirent_$ac_safe=yes"
4321 else
4322   echo "configure: failed program was:" >&5
4323   cat conftest.$ac_ext >&5
4324   rm -rf conftest*
4325   eval "ac_cv_header_dirent_$ac_safe=no"
4326 fi
4327 rm -f conftest*
4328 fi
4329 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4330   echo "$ac_t""yes" 1>&6
4331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4332   cat >> confdefs.h <<EOF
4333 #define $ac_tr_hdr 1
4334 EOF
4335  ac_header_dirent=$ac_hdr; break
4336 else
4337   echo "$ac_t""no" 1>&6
4338 fi
4339 done
4340 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4341 if test $ac_header_dirent = dirent.h; then
4342 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4343 echo "configure:4344: checking for opendir in -ldir" >&5
4344 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4346   echo $ac_n "(cached) $ac_c" 1>&6
4347 else
4348   ac_save_LIBS="$LIBS"
4349 LIBS="-ldir  $LIBS"
4350 cat > conftest.$ac_ext <<EOF
4351 #line 4352 "configure"
4352 #include "confdefs.h"
4353 /* Override any gcc2 internal prototype to avoid an error.  */
4354 /* We use char because int might match the return type of a gcc2
4355     builtin and then its argument prototype would still apply.  */
4356 char opendir();
4357
4358 int main() {
4359 opendir()
4360 ; return 0; }
4361 EOF
4362 if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4363   rm -rf conftest*
4364   eval "ac_cv_lib_$ac_lib_var=yes"
4365 else
4366   echo "configure: failed program was:" >&5
4367   cat conftest.$ac_ext >&5
4368   rm -rf conftest*
4369   eval "ac_cv_lib_$ac_lib_var=no"
4370 fi
4371 rm -f conftest*
4372 LIBS="$ac_save_LIBS"
4373
4374 fi
4375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4376   echo "$ac_t""yes" 1>&6
4377   LIBS="$LIBS -ldir"
4378 else
4379   echo "$ac_t""no" 1>&6
4380 fi
4381
4382 else
4383 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4384 echo "configure:4385: checking for opendir in -lx" >&5
4385 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   ac_save_LIBS="$LIBS"
4390 LIBS="-lx  $LIBS"
4391 cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 /* Override any gcc2 internal prototype to avoid an error.  */
4395 /* We use char because int might match the return type of a gcc2
4396     builtin and then its argument prototype would still apply.  */
4397 char opendir();
4398
4399 int main() {
4400 opendir()
4401 ; return 0; }
4402 EOF
4403 if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=yes"
4406 else
4407   echo "configure: failed program was:" >&5
4408   cat conftest.$ac_ext >&5
4409   rm -rf conftest*
4410   eval "ac_cv_lib_$ac_lib_var=no"
4411 fi
4412 rm -f conftest*
4413 LIBS="$ac_save_LIBS"
4414
4415 fi
4416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4417   echo "$ac_t""yes" 1>&6
4418   LIBS="$LIBS -lx"
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422
4423 fi
4424
4425 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4426 echo "configure:4427: checking for sys/wait.h that is POSIX.1 compatible" >&5
4427 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4428   echo $ac_n "(cached) $ac_c" 1>&6
4429 else
4430   cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 #include <sys/wait.h>
4435 #ifndef WEXITSTATUS
4436 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4437 #endif
4438 #ifndef WIFEXITED
4439 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4440 #endif
4441 int main() {
4442 int s;
4443 wait (&s);
4444 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4445 ; return 0; }
4446 EOF
4447 if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4448   rm -rf conftest*
4449   ac_cv_header_sys_wait_h=yes
4450 else
4451   echo "configure: failed program was:" >&5
4452   cat conftest.$ac_ext >&5
4453   rm -rf conftest*
4454   ac_cv_header_sys_wait_h=no
4455 fi
4456 rm -f conftest*
4457 fi
4458
4459 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4460 if test $ac_cv_header_sys_wait_h = yes; then
4461   cat >> confdefs.h <<\EOF
4462 #define HAVE_SYS_WAIT_H 1
4463 EOF
4464
4465 fi
4466
4467 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4468 echo "configure:4469: checking POSIX termios" >&5
4469 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #include <sys/types.h>
4476 #include <unistd.h>
4477 #include <termios.h>
4478 int main() {
4479 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4480    tcgetattr(0, 0);
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   am_cv_sys_posix_termios=yes
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   am_cv_sys_posix_termios=no
4491 fi
4492 rm -f conftest*
4493 fi
4494
4495 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4496
4497
4498  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4499 echo "configure:4500: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4500 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4501   echo $ac_n "(cached) $ac_c" 1>&6
4502 else
4503   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4504
4505   gwinsz_in_termios_h=no
4506   if test $am_cv_sys_posix_termios = yes; then
4507     cat > conftest.$ac_ext <<EOF
4508 #line 4509 "configure"
4509 #include "confdefs.h"
4510 #include <sys/types.h>
4511 #     include <termios.h>
4512 #     ifdef TIOCGWINSZ
4513         yes
4514 #     endif
4515     
4516 EOF
4517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4518   egrep "yes" >/dev/null 2>&1; then
4519   rm -rf conftest*
4520   gwinsz_in_termios_h=yes
4521 fi
4522 rm -f conftest*
4523
4524   fi
4525
4526   if test $gwinsz_in_termios_h = no; then
4527     cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <sys/types.h>
4531 #     include <sys/ioctl.h>
4532 #     ifdef TIOCGWINSZ
4533         yes
4534 #     endif
4535     
4536 EOF
4537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4538   egrep "yes" >/dev/null 2>&1; then
4539   rm -rf conftest*
4540   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4541 fi
4542 rm -f conftest*
4543
4544   fi
4545   
4546 fi
4547
4548 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4549   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4550     cat >> confdefs.h <<\EOF
4551 #define GWINSZ_IN_SYS_IOCTL 1
4552 EOF
4553
4554   fi
4555
4556 if test $am_cv_sys_posix_termios = yes ; then
4557         cat >> confdefs.h <<\EOF
4558 #define HAVE_POSIX_TERMIOS 1
4559 EOF
4560
4561 fi
4562
4563 for ac_hdr in \
4564         arpa/inet.h             \
4565         arpa/nameser.h  \
4566         assert.h                \
4567         conio.h                 \
4568         crypt.h                 \
4569         direct.h                \
4570         errno.h                 \
4571         fcntl.h                 \
4572         filio.h                 \
4573         getopt.h                \
4574         grp.h                   \
4575         io.h                    \
4576         libutil.h               \
4577         limits.h                \
4578         locale.h                \
4579         netinet/tcp.h   \
4580         malloc.h                \
4581         memory.h                \
4582         psap.h                  \
4583         pwd.h                   \
4584         process.h               \
4585         resolv.h                \
4586         sgtty.h                 \
4587         shadow.h                \
4588         stddef.h                \
4589         string.h                \
4590         strings.h               \
4591         sysexits.h              \
4592         sys/file.h              \
4593         sys/filio.h             \
4594         sys/errno.h             \
4595         sys/ioctl.h             \
4596         sys/param.h             \
4597         sys/resource.h  \
4598         sys/select.h    \
4599         sys/socket.h    \
4600         sys/syslog.h    \
4601         sys/time.h              \
4602         sys/types.h             \
4603         syslog.h                \
4604         termios.h               \
4605         unistd.h                \
4606         winsock.h               \
4607
4608 do
4609 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4610 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4611 echo "configure:4612: checking for $ac_hdr" >&5
4612 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 #include <$ac_hdr>
4619 EOF
4620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4621 { (eval echo configure:4622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4623 if test -z "$ac_err"; then
4624   rm -rf conftest*
4625   eval "ac_cv_header_$ac_safe=yes"
4626 else
4627   echo "$ac_err" >&5
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   rm -rf conftest*
4631   eval "ac_cv_header_$ac_safe=no"
4632 fi
4633 rm -f conftest*
4634 fi
4635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4636   echo "$ac_t""yes" 1>&6
4637     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4638   cat >> confdefs.h <<EOF
4639 #define $ac_tr_hdr 1
4640 EOF
4641  
4642 else
4643   echo "$ac_t""no" 1>&6
4644 fi
4645 done
4646
4647
4648
4649
4650 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4651 echo "configure:4652: checking for sigset in -lV3" >&5
4652 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   ac_save_LIBS="$LIBS"
4657 LIBS="-lV3  $LIBS"
4658 cat > conftest.$ac_ext <<EOF
4659 #line 4660 "configure"
4660 #include "confdefs.h"
4661 /* Override any gcc2 internal prototype to avoid an error.  */
4662 /* We use char because int might match the return type of a gcc2
4663     builtin and then its argument prototype would still apply.  */
4664 char sigset();
4665
4666 int main() {
4667 sigset()
4668 ; return 0; }
4669 EOF
4670 if { (eval echo configure:4671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4671   rm -rf conftest*
4672   eval "ac_cv_lib_$ac_lib_var=yes"
4673 else
4674   echo "configure: failed program was:" >&5
4675   cat conftest.$ac_ext >&5
4676   rm -rf conftest*
4677   eval "ac_cv_lib_$ac_lib_var=no"
4678 fi
4679 rm -f conftest*
4680 LIBS="$ac_save_LIBS"
4681
4682 fi
4683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4684   echo "$ac_t""yes" 1>&6
4685     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4686     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4687   cat >> confdefs.h <<EOF
4688 #define $ac_tr_lib 1
4689 EOF
4690
4691   LIBS="-lV3 $LIBS"
4692
4693 else
4694   echo "$ac_t""no" 1>&6
4695 fi
4696
4697
4698 if test "${ac_cv_header_winsock_h}" = yes; then
4699     echo $ac_n "checking for winsock support""... $ac_c" 1>&6
4700 echo "configure:4701: checking for winsock support" >&5
4701     cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704
4705 #include <winsock.h>
4706     
4707 int main() {
4708
4709 socket(0,0,0);
4710 select(0,NULL,NULL,NULL,NULL);
4711 closesocket(0);
4712 gethostname(NULL,0);
4713     
4714 ; return 0; }
4715 EOF
4716 if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4717   rm -rf conftest*
4718   
4719         echo "$ac_t""yes" 1>&6
4720         cat >> confdefs.h <<\EOF
4721 #define HAVE_WINSOCK 1
4722 EOF
4723
4724         ac_cv_func_socket=yes
4725         ac_cv_func_select=yes
4726         ac_cv_func_closesocket=yes
4727         ac_cv_func_gethostname=yes
4728     
4729 else
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   
4734         echo "$ac_t""no" 1>&6
4735     
4736 fi
4737 rm -f conftest*
4738 fi
4739
4740
4741 echo $ac_n "checking for socket""... $ac_c" 1>&6
4742 echo "configure:4743: checking for socket" >&5
4743 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749 /* System header to define __stub macros and hopefully few prototypes,
4750     which can conflict with char socket(); below.  */
4751 #include <assert.h>
4752 /* Override any gcc2 internal prototype to avoid an error.  */
4753 /* We use char because int might match the return type of a gcc2
4754     builtin and then its argument prototype would still apply.  */
4755 char socket();
4756 char (*f)();
4757
4758 int main() {
4759
4760 /* The GNU C library defines this for functions which it implements
4761     to always fail with ENOSYS.  Some functions are actually named
4762     something starting with __ and the normal name is an alias.  */
4763 #if defined (__stub_socket) || defined (__stub___socket)
4764 choke me
4765 #else
4766 f = socket;
4767 #endif
4768
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   eval "ac_cv_func_socket=yes"
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_func_socket=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782
4783 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785   :
4786 else
4787   echo "$ac_t""no" 1>&6
4788         
4789         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4790 echo "configure:4791: checking for main in -lsocket" >&5
4791 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4793   echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795   ac_save_LIBS="$LIBS"
4796 LIBS="-lsocket  $LIBS"
4797 cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800
4801 int main() {
4802 main()
4803 ; return 0; }
4804 EOF
4805 if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4806   rm -rf conftest*
4807   eval "ac_cv_lib_$ac_lib_var=yes"
4808 else
4809   echo "configure: failed program was:" >&5
4810   cat conftest.$ac_ext >&5
4811   rm -rf conftest*
4812   eval "ac_cv_lib_$ac_lib_var=no"
4813 fi
4814 rm -f conftest*
4815 LIBS="$ac_save_LIBS"
4816
4817 fi
4818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4819   echo "$ac_t""yes" 1>&6
4820     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4821     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4822   cat >> confdefs.h <<EOF
4823 #define $ac_tr_lib 1
4824 EOF
4825
4826   LIBS="-lsocket $LIBS"
4827
4828 else
4829   echo "$ac_t""no" 1>&6
4830 fi
4831
4832         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4833 echo "configure:4834: checking for main in -lnet" >&5
4834 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4836   echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838   ac_save_LIBS="$LIBS"
4839 LIBS="-lnet  $LIBS"
4840 cat > conftest.$ac_ext <<EOF
4841 #line 4842 "configure"
4842 #include "confdefs.h"
4843
4844 int main() {
4845 main()
4846 ; return 0; }
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4849   rm -rf conftest*
4850   eval "ac_cv_lib_$ac_lib_var=yes"
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   eval "ac_cv_lib_$ac_lib_var=no"
4856 fi
4857 rm -f conftest*
4858 LIBS="$ac_save_LIBS"
4859
4860 fi
4861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4862   echo "$ac_t""yes" 1>&6
4863     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4864     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4865   cat >> confdefs.h <<EOF
4866 #define $ac_tr_lib 1
4867 EOF
4868
4869   LIBS="-lnet $LIBS"
4870
4871 else
4872   echo "$ac_t""no" 1>&6
4873 fi
4874
4875         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4876 echo "configure:4877: checking for socket in -lnet" >&5
4877 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   ac_save_LIBS="$LIBS"
4882 LIBS="-lnet  $LIBS"
4883 cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886 /* Override any gcc2 internal prototype to avoid an error.  */
4887 /* We use char because int might match the return type of a gcc2
4888     builtin and then its argument prototype would still apply.  */
4889 char socket();
4890
4891 int main() {
4892 socket()
4893 ; return 0; }
4894 EOF
4895 if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4896   rm -rf conftest*
4897   eval "ac_cv_lib_$ac_lib_var=yes"
4898 else
4899   echo "configure: failed program was:" >&5
4900   cat conftest.$ac_ext >&5
4901   rm -rf conftest*
4902   eval "ac_cv_lib_$ac_lib_var=no"
4903 fi
4904 rm -f conftest*
4905 LIBS="$ac_save_LIBS"
4906
4907 fi
4908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4909   echo "$ac_t""yes" 1>&6
4910     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4911     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4912   cat >> confdefs.h <<EOF
4913 #define $ac_tr_lib 1
4914 EOF
4915
4916   LIBS="-lnet $LIBS"
4917
4918 else
4919   echo "$ac_t""no" 1>&6
4920 fi
4921
4922         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4923 echo "configure:4924: checking for main in -lnsl_s" >&5
4924 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4925 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   ac_save_LIBS="$LIBS"
4929 LIBS="-lnsl_s  $LIBS"
4930 cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933
4934 int main() {
4935 main()
4936 ; return 0; }
4937 EOF
4938 if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4939   rm -rf conftest*
4940   eval "ac_cv_lib_$ac_lib_var=yes"
4941 else
4942   echo "configure: failed program was:" >&5
4943   cat conftest.$ac_ext >&5
4944   rm -rf conftest*
4945   eval "ac_cv_lib_$ac_lib_var=no"
4946 fi
4947 rm -f conftest*
4948 LIBS="$ac_save_LIBS"
4949
4950 fi
4951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4952   echo "$ac_t""yes" 1>&6
4953     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4954     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4955   cat >> confdefs.h <<EOF
4956 #define $ac_tr_lib 1
4957 EOF
4958
4959   LIBS="-lnsl_s $LIBS"
4960
4961 else
4962   echo "$ac_t""no" 1>&6
4963 fi
4964
4965         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4966 echo "configure:4967: checking for main in -lnsl" >&5
4967 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4969   echo $ac_n "(cached) $ac_c" 1>&6
4970 else
4971   ac_save_LIBS="$LIBS"
4972 LIBS="-lnsl  $LIBS"
4973 cat > conftest.$ac_ext <<EOF
4974 #line 4975 "configure"
4975 #include "confdefs.h"
4976
4977 int main() {
4978 main()
4979 ; return 0; }
4980 EOF
4981 if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4982   rm -rf conftest*
4983   eval "ac_cv_lib_$ac_lib_var=yes"
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -rf conftest*
4988   eval "ac_cv_lib_$ac_lib_var=no"
4989 fi
4990 rm -f conftest*
4991 LIBS="$ac_save_LIBS"
4992
4993 fi
4994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4995   echo "$ac_t""yes" 1>&6
4996     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4997     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4998   cat >> confdefs.h <<EOF
4999 #define $ac_tr_lib 1
5000 EOF
5001
5002   LIBS="-lnsl $LIBS"
5003
5004 else
5005   echo "$ac_t""no" 1>&6
5006 fi
5007
5008         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5009 echo "configure:5010: checking for socket in -linet" >&5
5010 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5012   echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014   ac_save_LIBS="$LIBS"
5015 LIBS="-linet  $LIBS"
5016 cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019 /* Override any gcc2 internal prototype to avoid an error.  */
5020 /* We use char because int might match the return type of a gcc2
5021     builtin and then its argument prototype would still apply.  */
5022 char socket();
5023
5024 int main() {
5025 socket()
5026 ; return 0; }
5027 EOF
5028 if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5029   rm -rf conftest*
5030   eval "ac_cv_lib_$ac_lib_var=yes"
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   eval "ac_cv_lib_$ac_lib_var=no"
5036 fi
5037 rm -f conftest*
5038 LIBS="$ac_save_LIBS"
5039
5040 fi
5041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5045   cat >> confdefs.h <<EOF
5046 #define $ac_tr_lib 1
5047 EOF
5048
5049   LIBS="-linet $LIBS"
5050
5051 else
5052   echo "$ac_t""no" 1>&6
5053 fi
5054
5055         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5056 echo "configure:5057: checking for main in -lgen" >&5
5057 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5059   echo $ac_n "(cached) $ac_c" 1>&6
5060 else
5061   ac_save_LIBS="$LIBS"
5062 LIBS="-lgen  $LIBS"
5063 cat > conftest.$ac_ext <<EOF
5064 #line 5065 "configure"
5065 #include "confdefs.h"
5066
5067 int main() {
5068 main()
5069 ; return 0; }
5070 EOF
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5072   rm -rf conftest*
5073   eval "ac_cv_lib_$ac_lib_var=yes"
5074 else
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   eval "ac_cv_lib_$ac_lib_var=no"
5079 fi
5080 rm -f conftest*
5081 LIBS="$ac_save_LIBS"
5082
5083 fi
5084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5085   echo "$ac_t""yes" 1>&6
5086     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5087     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5088   cat >> confdefs.h <<EOF
5089 #define $ac_tr_lib 1
5090 EOF
5091
5092   LIBS="-lgen $LIBS"
5093
5094 else
5095   echo "$ac_t""no" 1>&6
5096 fi
5097
5098
5099 fi
5100
5101
5102 echo $ac_n "checking for select""... $ac_c" 1>&6
5103 echo "configure:5104: checking for select" >&5
5104 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5105   echo $ac_n "(cached) $ac_c" 1>&6
5106 else
5107   cat > conftest.$ac_ext <<EOF
5108 #line 5109 "configure"
5109 #include "confdefs.h"
5110 /* System header to define __stub macros and hopefully few prototypes,
5111     which can conflict with char select(); below.  */
5112 #include <assert.h>
5113 /* Override any gcc2 internal prototype to avoid an error.  */
5114 /* We use char because int might match the return type of a gcc2
5115     builtin and then its argument prototype would still apply.  */
5116 char select();
5117 char (*f)();
5118
5119 int main() {
5120
5121 /* The GNU C library defines this for functions which it implements
5122     to always fail with ENOSYS.  Some functions are actually named
5123     something starting with __ and the normal name is an alias.  */
5124 #if defined (__stub_select) || defined (__stub___select)
5125 choke me
5126 #else
5127 f = select;
5128 #endif
5129
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_func_select=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_func_select=no"
5140 fi
5141 rm -f conftest*
5142 fi
5143
5144 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5145   echo "$ac_t""yes" 1>&6
5146   :
5147 else
5148   echo "$ac_t""no" 1>&6
5149 { echo "configure: error: select() required." 1>&2; exit 1; }
5150 fi
5151
5152
5153 if test "${ac_cv_header_winsock_h}" != yes; then
5154                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5155 echo "configure:5156: checking types of arguments for select()" >&5
5156  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5160   echo $ac_n "(cached) $ac_c" 1>&6
5161 else
5162     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5166      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5167       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5168        cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 #ifdef HAVE_SYS_TYPES_H
5172 #include <sys/types.h>
5173 #endif
5174 #ifdef HAVE_SYS_TIME_H
5175 #include <sys/time.h>
5176 #endif
5177 #ifdef HAVE_SYS_SELECT_H
5178 #include <sys/select.h>
5179 #endif
5180 #ifdef HAVE_SYS_SOCKET_H
5181 #include <sys/socket.h>
5182 #endif
5183 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);
5184 int main() {
5185
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5189   rm -rf conftest*
5190           ac_not_found=no ; break 3
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   ac_not_found=yes
5196 fi
5197 rm -f conftest*
5198       done
5199      done
5200     done
5201    
5202 fi
5203   
5204 fi
5205  
5206 fi
5207  if test "$ac_not_found" = yes; then
5208   ac_cv_func_select_arg1=int 
5209   ac_cv_func_select_arg234='int *' 
5210   ac_cv_func_select_arg5='struct timeval *'
5211  fi
5212  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5213  cat >> confdefs.h <<EOF
5214 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5215 EOF
5216
5217  cat >> confdefs.h <<EOF
5218 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5219 EOF
5220
5221  cat >> confdefs.h <<EOF
5222 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5223 EOF
5224
5225
5226 fi
5227
5228
5229 for ac_hdr in regex.h 
5230 do
5231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5233 echo "configure:5234: checking for $ac_hdr" >&5
5234 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5235   echo $ac_n "(cached) $ac_c" 1>&6
5236 else
5237   cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240 #include <$ac_hdr>
5241 EOF
5242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5243 { (eval echo configure:5244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5245 if test -z "$ac_err"; then
5246   rm -rf conftest*
5247   eval "ac_cv_header_$ac_safe=yes"
5248 else
5249   echo "$ac_err" >&5
5250   echo "configure: failed program was:" >&5
5251   cat conftest.$ac_ext >&5
5252   rm -rf conftest*
5253   eval "ac_cv_header_$ac_safe=no"
5254 fi
5255 rm -f conftest*
5256 fi
5257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5258   echo "$ac_t""yes" 1>&6
5259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5260   cat >> confdefs.h <<EOF
5261 #define $ac_tr_hdr 1
5262 EOF
5263  
5264 else
5265   echo "$ac_t""no" 1>&6
5266 fi
5267 done
5268
5269 if test "$ac_cv_header_regex_h" != yes ; then
5270         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5271 fi
5272 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5273 echo "configure:5274: checking for regfree" >&5
5274 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5275   echo $ac_n "(cached) $ac_c" 1>&6
5276 else
5277   cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280 /* System header to define __stub macros and hopefully few prototypes,
5281     which can conflict with char regfree(); below.  */
5282 #include <assert.h>
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 /* We use char because int might match the return type of a gcc2
5285     builtin and then its argument prototype would still apply.  */
5286 char regfree();
5287 char (*f)();
5288
5289 int main() {
5290
5291 /* The GNU C library defines this for functions which it implements
5292     to always fail with ENOSYS.  Some functions are actually named
5293     something starting with __ and the normal name is an alias.  */
5294 #if defined (__stub_regfree) || defined (__stub___regfree)
5295 choke me
5296 #else
5297 f = regfree;
5298 #endif
5299
5300 ; return 0; }
5301 EOF
5302 if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5303   rm -rf conftest*
5304   eval "ac_cv_func_regfree=yes"
5305 else
5306   echo "configure: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308   rm -rf conftest*
5309   eval "ac_cv_func_regfree=no"
5310 fi
5311 rm -f conftest*
5312 fi
5313
5314 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5315   echo "$ac_t""yes" 1>&6
5316   :
5317 else
5318   echo "$ac_t""no" 1>&6
5319 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5320 fi
5321
5322
5323
5324 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5325 echo "configure:5326: checking for compatible POSIX regex" >&5
5326 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5327   echo $ac_n "(cached) $ac_c" 1>&6
5328 else
5329   
5330         if test "$cross_compiling" = yes; then
5331   ol_cv_c_posix_regex=cross
5332 else
5333   cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336
5337 #include <sys/types.h>
5338 #include <regex.h>
5339 static char *pattern, *string;
5340 main()
5341 {
5342         int rc;
5343         regex_t re;
5344
5345         pattern = "^A";
5346
5347         if(regcomp(&re, pattern, 0)) {
5348                 return -1;
5349         }
5350         
5351         string = "ALL MATCH";
5352         
5353         rc = regexec(&re, string, 0, (void*)0, 0);
5354
5355         regfree(&re);
5356
5357         return rc;
5358 }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5361 then
5362   ol_cv_c_posix_regex=yes
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -fr conftest*
5367   ol_cv_c_posix_regex=no
5368 fi
5369 rm -fr conftest*
5370 fi
5371
5372 fi
5373
5374 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5375
5376 if test "$ol_cv_c_posix_regex" = no ; then
5377         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5378 fi
5379
5380 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5381 echo "configure:5382: checking for res_search" >&5
5382 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5383   echo $ac_n "(cached) $ac_c" 1>&6
5384 else
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* System header to define __stub macros and hopefully few prototypes,
5389     which can conflict with char res_search(); below.  */
5390 #include <assert.h>
5391 /* Override any gcc2 internal prototype to avoid an error.  */
5392 /* We use char because int might match the return type of a gcc2
5393     builtin and then its argument prototype would still apply.  */
5394 char res_search();
5395 char (*f)();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_res_search) || defined (__stub___res_search)
5403 choke me
5404 #else
5405 f = res_search;
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_res_search=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_res_search=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421
5422 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424   :
5425 else
5426   echo "$ac_t""no" 1>&6
5427 fi
5428
5429 if test $ac_cv_func_res_search = no ; then 
5430         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5431 echo "configure:5432: checking for res_search in -lbind" >&5
5432 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5434   echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436   ac_save_LIBS="$LIBS"
5437 LIBS="-lbind  $LIBS"
5438 cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441 /* Override any gcc2 internal prototype to avoid an error.  */
5442 /* We use char because int might match the return type of a gcc2
5443     builtin and then its argument prototype would still apply.  */
5444 char res_search();
5445
5446 int main() {
5447 res_search()
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5451   rm -rf conftest*
5452   eval "ac_cv_lib_$ac_lib_var=yes"
5453 else
5454   echo "configure: failed program was:" >&5
5455   cat conftest.$ac_ext >&5
5456   rm -rf conftest*
5457   eval "ac_cv_lib_$ac_lib_var=no"
5458 fi
5459 rm -f conftest*
5460 LIBS="$ac_save_LIBS"
5461
5462 fi
5463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5467   cat >> confdefs.h <<EOF
5468 #define $ac_tr_lib 1
5469 EOF
5470
5471   LIBS="-lbind $LIBS"
5472
5473 else
5474   echo "$ac_t""no" 1>&6
5475 fi
5476
5477         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5478 fi
5479
5480 if test $ac_cv_func_res_search = no ; then 
5481         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5482 echo "configure:5483: checking for __res_search in -lbind" >&5
5483 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5484 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5485   echo $ac_n "(cached) $ac_c" 1>&6
5486 else
5487   ac_save_LIBS="$LIBS"
5488 LIBS="-lbind  $LIBS"
5489 cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 /* Override any gcc2 internal prototype to avoid an error.  */
5493 /* We use char because int might match the return type of a gcc2
5494     builtin and then its argument prototype would still apply.  */
5495 char __res_search();
5496
5497 int main() {
5498 __res_search()
5499 ; return 0; }
5500 EOF
5501 if { (eval echo configure:5502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5502   rm -rf conftest*
5503   eval "ac_cv_lib_$ac_lib_var=yes"
5504 else
5505   echo "configure: failed program was:" >&5
5506   cat conftest.$ac_ext >&5
5507   rm -rf conftest*
5508   eval "ac_cv_lib_$ac_lib_var=no"
5509 fi
5510 rm -f conftest*
5511 LIBS="$ac_save_LIBS"
5512
5513 fi
5514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5515   echo "$ac_t""yes" 1>&6
5516     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5517     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5518   cat >> confdefs.h <<EOF
5519 #define $ac_tr_lib 1
5520 EOF
5521
5522   LIBS="-lbind $LIBS"
5523
5524 else
5525   echo "$ac_t""no" 1>&6
5526 fi
5527
5528         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5529 fi
5530
5531 if test $ac_cv_func_res_search = no ; then 
5532         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5533 echo "configure:5534: checking for res_search in -lresolv" >&5
5534 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5535 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5536   echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538   ac_save_LIBS="$LIBS"
5539 LIBS="-lresolv  $LIBS"
5540 cat > conftest.$ac_ext <<EOF
5541 #line 5542 "configure"
5542 #include "confdefs.h"
5543 /* Override any gcc2 internal prototype to avoid an error.  */
5544 /* We use char because int might match the return type of a gcc2
5545     builtin and then its argument prototype would still apply.  */
5546 char res_search();
5547
5548 int main() {
5549 res_search()
5550 ; return 0; }
5551 EOF
5552 if { (eval echo configure:5553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5553   rm -rf conftest*
5554   eval "ac_cv_lib_$ac_lib_var=yes"
5555 else
5556   echo "configure: failed program was:" >&5
5557   cat conftest.$ac_ext >&5
5558   rm -rf conftest*
5559   eval "ac_cv_lib_$ac_lib_var=no"
5560 fi
5561 rm -f conftest*
5562 LIBS="$ac_save_LIBS"
5563
5564 fi
5565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5566   echo "$ac_t""yes" 1>&6
5567     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5568     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5569   cat >> confdefs.h <<EOF
5570 #define $ac_tr_lib 1
5571 EOF
5572
5573   LIBS="-lresolv $LIBS"
5574
5575 else
5576   echo "$ac_t""no" 1>&6
5577 fi
5578
5579         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5580 fi
5581
5582 if test "$ac_cv_func_res_search" = yes ; then
5583         cat >> confdefs.h <<\EOF
5584 #define HAVE_RES_SEARCH 1
5585 EOF
5586
5587 elif test $ol_enable_dns = yes ; then
5588         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5589 elif test $ol_enable_dns != no ; then
5590         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5591 fi
5592
5593
5594 ol_link_isode=no
5595 if test $ol_enable_ldapd != no ; then
5596         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5597
5598                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5599 echo "configure:5600: checking for main in -lxtpp" >&5
5600 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5602   echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604   ac_save_LIBS="$LIBS"
5605 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609
5610 int main() {
5611 main()
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615   rm -rf conftest*
5616   eval "ac_cv_lib_$ac_lib_var=yes"
5617 else
5618   echo "configure: failed program was:" >&5
5619   cat conftest.$ac_ext >&5
5620   rm -rf conftest*
5621   eval "ac_cv_lib_$ac_lib_var=no"
5622 fi
5623 rm -f conftest*
5624 LIBS="$ac_save_LIBS"
5625
5626 fi
5627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5628   echo "$ac_t""yes" 1>&6
5629   
5630                 ol_link_isode=yes
5631                 cat >> confdefs.h <<\EOF
5632 #define HAVE_XTPP 1
5633 EOF
5634
5635                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5636                 
5637 else
5638   echo "$ac_t""no" 1>&6
5639 :
5640 fi
5641
5642         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5643 echo "configure:5644: checking for main in -ldsap" >&5
5644 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5646   echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648   ac_save_LIBS="$LIBS"
5649 LIBS="-ldsap -lisode $LIBS"
5650 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653
5654 int main() {
5655 main()
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=no"
5666 fi
5667 rm -f conftest*
5668 LIBS="$ac_save_LIBS"
5669
5670 fi
5671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5672   echo "$ac_t""yes" 1>&6
5673   
5674                 ol_link_isode=yes
5675                 cat >> confdefs.h <<\EOF
5676 #define HAVE_DSAP 1
5677 EOF
5678
5679                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5680                 
5681 else
5682   echo "$ac_t""no" 1>&6
5683 :
5684 fi
5685
5686         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5687 echo "configure:5688: checking for main in -lisode" >&5
5688 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5690   echo $ac_n "(cached) $ac_c" 1>&6
5691 else
5692   ac_save_LIBS="$LIBS"
5693 LIBS="-lisode  $LIBS"
5694 cat > conftest.$ac_ext <<EOF
5695 #line 5696 "configure"
5696 #include "confdefs.h"
5697
5698 int main() {
5699 main()
5700 ; return 0; }
5701 EOF
5702 if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5703   rm -rf conftest*
5704   eval "ac_cv_lib_$ac_lib_var=yes"
5705 else
5706   echo "configure: failed program was:" >&5
5707   cat conftest.$ac_ext >&5
5708   rm -rf conftest*
5709   eval "ac_cv_lib_$ac_lib_var=no"
5710 fi
5711 rm -f conftest*
5712 LIBS="$ac_save_LIBS"
5713
5714 fi
5715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5716   echo "$ac_t""yes" 1>&6
5717   
5718                 ol_link_isode=yes
5719                 cat >> confdefs.h <<\EOF
5720 #define HAVE_ISODE 1
5721 EOF
5722
5723                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5724                 
5725 else
5726   echo "$ac_t""no" 1>&6
5727 :
5728 fi
5729
5730 fi
5731
5732 if test $ol_link_isode != no; then
5733         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5734 echo "configure:5735: checking for main in -lpp" >&5
5735 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5737   echo $ac_n "(cached) $ac_c" 1>&6
5738 else
5739   ac_save_LIBS="$LIBS"
5740 LIBS="-lpp  $LIBS"
5741 cat > conftest.$ac_ext <<EOF
5742 #line 5743 "configure"
5743 #include "confdefs.h"
5744
5745 int main() {
5746 main()
5747 ; return 0; }
5748 EOF
5749 if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5750   rm -rf conftest*
5751   eval "ac_cv_lib_$ac_lib_var=yes"
5752 else
5753   echo "configure: failed program was:" >&5
5754   cat conftest.$ac_ext >&5
5755   rm -rf conftest*
5756   eval "ac_cv_lib_$ac_lib_var=no"
5757 fi
5758 rm -f conftest*
5759 LIBS="$ac_save_LIBS"
5760
5761 fi
5762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5763   echo "$ac_t""yes" 1>&6
5764   
5765                 cat >> confdefs.h <<\EOF
5766 #define HAVE_PP 1
5767 EOF
5768
5769                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5770                 
5771 else
5772   echo "$ac_t""no" 1>&6
5773 :
5774 fi
5775
5776
5777         # Extract the first word of "pepsy", so it can be a program name with args.
5778 set dummy pepsy; ac_word=$2
5779 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5780 echo "configure:5781: checking for $ac_word" >&5
5781 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5782   echo $ac_n "(cached) $ac_c" 1>&6
5783 else
5784   case "$PEPSY" in
5785   /*)
5786   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5787   ;;
5788   ?:/*)                  
5789   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5790   ;;
5791   *)
5792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5793   ac_dummy="$PATH"
5794   for ac_dir in $ac_dummy; do 
5795     test -z "$ac_dir" && ac_dir=.
5796     if test -f $ac_dir/$ac_word; then
5797       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5798       break
5799     fi
5800   done
5801   IFS="$ac_save_ifs"
5802   ;;
5803 esac
5804 fi
5805 PEPSY="$ac_cv_path_PEPSY"
5806 if test -n "$PEPSY"; then
5807   echo "$ac_t""$PEPSY" 1>&6
5808 else
5809   echo "$ac_t""no" 1>&6
5810 fi
5811
5812 fi
5813
5814 if test $ol_enable_quipu != no ; then
5815         for ac_hdr in quipu/commonarg.h
5816 do
5817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5819 echo "configure:5820: checking for $ac_hdr" >&5
5820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 #include <$ac_hdr>
5827 EOF
5828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5829 { (eval echo configure:5830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5831 if test -z "$ac_err"; then
5832   rm -rf conftest*
5833   eval "ac_cv_header_$ac_safe=yes"
5834 else
5835   echo "$ac_err" >&5
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_header_$ac_safe=no"
5840 fi
5841 rm -f conftest*
5842 fi
5843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5844   echo "$ac_t""yes" 1>&6
5845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5846   cat >> confdefs.h <<EOF
5847 #define $ac_tr_hdr 1
5848 EOF
5849  
5850 else
5851   echo "$ac_t""no" 1>&6
5852 fi
5853 done
5854
5855
5856         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5857                 BUILD_QUIPU=yes
5858         elif test $ol_enable_quipu = auto ; then
5859                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5860         else
5861                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5862         fi
5863 fi
5864
5865 ol_link_kerberos=no
5866
5867 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5868         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5869 do
5870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5872 echo "configure:5873: checking for $ac_hdr" >&5
5873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 #include <$ac_hdr>
5880 EOF
5881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5882 { (eval echo configure:5883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5884 if test -z "$ac_err"; then
5885   rm -rf conftest*
5886   eval "ac_cv_header_$ac_safe=yes"
5887 else
5888   echo "$ac_err" >&5
5889   echo "configure: failed program was:" >&5
5890   cat conftest.$ac_ext >&5
5891   rm -rf conftest*
5892   eval "ac_cv_header_$ac_safe=no"
5893 fi
5894 rm -f conftest*
5895 fi
5896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5897   echo "$ac_t""yes" 1>&6
5898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5899   cat >> confdefs.h <<EOF
5900 #define $ac_tr_hdr 1
5901 EOF
5902  
5903 else
5904   echo "$ac_t""no" 1>&6
5905 fi
5906 done
5907
5908
5909         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5910                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5911 echo "configure:5912: checking for main in -lkrb4" >&5
5912 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   ac_save_LIBS="$LIBS"
5917 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5918 cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921
5922 int main() {
5923 main()
5924 ; return 0; }
5925 EOF
5926 if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5927   rm -rf conftest*
5928   eval "ac_cv_lib_$ac_lib_var=yes"
5929 else
5930   echo "configure: failed program was:" >&5
5931   cat conftest.$ac_ext >&5
5932   rm -rf conftest*
5933   eval "ac_cv_lib_$ac_lib_var=no"
5934 fi
5935 rm -f conftest*
5936 LIBS="$ac_save_LIBS"
5937
5938 fi
5939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5940   echo "$ac_t""yes" 1>&6
5941   have_k5=yes
5942 else
5943   echo "$ac_t""no" 1>&6
5944 have_k5=no
5945 fi
5946
5947
5948                 if test $have_k5 = yes ; then
5949                         ol_with_kerberos=found
5950                         ol_link_kerberos=yes
5951
5952                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5953
5954                         LIBS="$KRB_LIBS $LIBS"
5955
5956                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5957 echo "configure:5958: checking for des_debug in Kerberos libraries" >&5
5958 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5959   echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961   
5962                                                                 save_LIBS="$LIBS"
5963                                 LIBS="$KRB_LIBS $LIBS"
5964                                 cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5967
5968 #include <kerberosIV/krb.h>
5969 #include <kerberosIV/des.h>
5970 extern int des_debug;
5971
5972 int main() {
5973
5974 des_debug = 1;
5975
5976 ; return 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979   rm -rf conftest*
5980   ol_cv_var_des_debug=yes
5981 else
5982   echo "configure: failed program was:" >&5
5983   cat conftest.$ac_ext >&5
5984   rm -rf conftest*
5985   ol_cv_var_des_debug=no
5986 fi
5987 rm -f conftest*
5988                                                                 LIBS="$save_LIBS"
5989                         
5990 fi
5991
5992 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5993
5994                         if test $ol_cv_var_des_debug = yes ; then
5995                                 cat >> confdefs.h <<\EOF
5996 #define HAVE_DES_DEBUG 1
5997 EOF
5998
5999                         fi
6000
6001                         LIBS="$save_LIBS"
6002                 fi
6003         fi
6004 fi
6005
6006 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6007         -o $ol_with_kerberos = kth ; then
6008
6009         for ac_hdr in krb.h des.h krb-archaeology.h 
6010 do
6011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6013 echo "configure:6014: checking for $ac_hdr" >&5
6014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6015   echo $ac_n "(cached) $ac_c" 1>&6
6016 else
6017   cat > conftest.$ac_ext <<EOF
6018 #line 6019 "configure"
6019 #include "confdefs.h"
6020 #include <$ac_hdr>
6021 EOF
6022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6023 { (eval echo configure:6024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6025 if test -z "$ac_err"; then
6026   rm -rf conftest*
6027   eval "ac_cv_header_$ac_safe=yes"
6028 else
6029   echo "$ac_err" >&5
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   eval "ac_cv_header_$ac_safe=no"
6034 fi
6035 rm -f conftest*
6036 fi
6037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6038   echo "$ac_t""yes" 1>&6
6039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6040   cat >> confdefs.h <<EOF
6041 #define $ac_tr_hdr 1
6042 EOF
6043  
6044 else
6045   echo "$ac_t""no" 1>&6
6046 fi
6047 done
6048
6049
6050         if test $ac_cv_header_krb_h = yes ; then
6051                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6052 echo "configure:6053: checking for main in -lkrb" >&5
6053 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   ac_save_LIBS="$LIBS"
6058 LIBS="-lkrb -ldes $LIBS"
6059 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062
6063 int main() {
6064 main()
6065 ; return 0; }
6066 EOF
6067 if { (eval echo configure:6068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6068   rm -rf conftest*
6069   eval "ac_cv_lib_$ac_lib_var=yes"
6070 else
6071   echo "configure: failed program was:" >&5
6072   cat conftest.$ac_ext >&5
6073   rm -rf conftest*
6074   eval "ac_cv_lib_$ac_lib_var=no"
6075 fi
6076 rm -f conftest*
6077 LIBS="$ac_save_LIBS"
6078
6079 fi
6080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082   have_k4=yes
6083 else
6084   echo "$ac_t""no" 1>&6
6085 have_k4=no
6086 fi
6087
6088
6089                 if test $have_k4 = yes ; then
6090                         ol_with_kerberos=found
6091                         ol_link_kerberos=yes
6092
6093                         KRB_LIBS="-lkrb -ldes"
6094
6095                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6096                                 cat >> confdefs.h <<\EOF
6097 #define HAVE_KTH_KERBEROS 1
6098 EOF
6099
6100                         fi
6101                 fi
6102         fi
6103 fi
6104
6105 if test $ol_link_kerberos = yes ; then
6106         cat >> confdefs.h <<\EOF
6107 #define HAVE_KERBEROS 1
6108 EOF
6109
6110
6111 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6112         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6113 fi
6114
6115 ol_link_tls=no
6116 if test $ol_with_tls != no ; then
6117         
6118         for ac_hdr in openssl/ssl.h ssl.h
6119 do
6120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6122 echo "configure:6123: checking for $ac_hdr" >&5
6123 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6124   echo $ac_n "(cached) $ac_c" 1>&6
6125 else
6126   cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 #include <$ac_hdr>
6130 EOF
6131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6132 { (eval echo configure:6133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6134 if test -z "$ac_err"; then
6135   rm -rf conftest*
6136   eval "ac_cv_header_$ac_safe=yes"
6137 else
6138   echo "$ac_err" >&5
6139   echo "configure: failed program was:" >&5
6140   cat conftest.$ac_ext >&5
6141   rm -rf conftest*
6142   eval "ac_cv_header_$ac_safe=no"
6143 fi
6144 rm -f conftest*
6145 fi
6146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6147   echo "$ac_t""yes" 1>&6
6148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6149   cat >> confdefs.h <<EOF
6150 #define $ac_tr_hdr 1
6151 EOF
6152  
6153 else
6154   echo "$ac_t""no" 1>&6
6155 fi
6156 done
6157
6158         
6159         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6160                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6161 echo "configure:6162: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6162 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6164   echo $ac_n "(cached) $ac_c" 1>&6
6165 else
6166   ac_save_LIBS="$LIBS"
6167 LIBS="-lssl -lcrypto $LIBS"
6168 cat > conftest.$ac_ext <<EOF
6169 #line 6170 "configure"
6170 #include "confdefs.h"
6171 /* Override any gcc2 internal prototype to avoid an error.  */
6172 /* We use char because int might match the return type of a gcc2
6173     builtin and then its argument prototype would still apply.  */
6174 char SSLeay_add_ssl_algorithms();
6175
6176 int main() {
6177 SSLeay_add_ssl_algorithms()
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   eval "ac_cv_lib_$ac_lib_var=yes"
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   eval "ac_cv_lib_$ac_lib_var=no"
6188 fi
6189 rm -f conftest*
6190 LIBS="$ac_save_LIBS"
6191
6192 fi
6193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6194   echo "$ac_t""yes" 1>&6
6195   have_ssleay=yes
6196                         need_rsaref=no
6197 else
6198   echo "$ac_t""no" 1>&6
6199 have_ssleay=no
6200 fi
6201
6202                         
6203                 if test $have_ssleay = no ; then
6204                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6205 echo "configure:6206: checking for SSL_library_init in -lssl" >&5
6206 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6208   echo $ac_n "(cached) $ac_c" 1>&6
6209 else
6210   ac_save_LIBS="$LIBS"
6211 LIBS="-lssl -lcrypto $LIBS"
6212 cat > conftest.$ac_ext <<EOF
6213 #line 6214 "configure"
6214 #include "confdefs.h"
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 /* We use char because int might match the return type of a gcc2
6217     builtin and then its argument prototype would still apply.  */
6218 char SSL_library_init();
6219
6220 int main() {
6221 SSL_library_init()
6222 ; return 0; }
6223 EOF
6224 if { (eval echo configure:6225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6225   rm -rf conftest*
6226   eval "ac_cv_lib_$ac_lib_var=yes"
6227 else
6228   echo "configure: failed program was:" >&5
6229   cat conftest.$ac_ext >&5
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=no"
6232 fi
6233 rm -f conftest*
6234 LIBS="$ac_save_LIBS"
6235
6236 fi
6237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6238   echo "$ac_t""yes" 1>&6
6239   have_ssleay=yes
6240                                 need_rsaref=no
6241 else
6242   echo "$ac_t""no" 1>&6
6243 have_ssleay=no
6244 fi
6245
6246                 fi
6247
6248                 if test $have_ssleay = no ; then
6249                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6250 echo "configure:6251: checking for ssl3_accept in -lssl" >&5
6251 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6253   echo $ac_n "(cached) $ac_c" 1>&6
6254 else
6255   ac_save_LIBS="$LIBS"
6256 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6257 cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 /* Override any gcc2 internal prototype to avoid an error.  */
6261 /* We use char because int might match the return type of a gcc2
6262     builtin and then its argument prototype would still apply.  */
6263 char ssl3_accept();
6264
6265 int main() {
6266 ssl3_accept()
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_lib_$ac_lib_var=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=no"
6277 fi
6278 rm -f conftest*
6279 LIBS="$ac_save_LIBS"
6280
6281 fi
6282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6283   echo "$ac_t""yes" 1>&6
6284   have_ssleay=yes
6285                                 need_rsaref=yes
6286 else
6287   echo "$ac_t""no" 1>&6
6288 have_ssleay=no
6289 fi
6290
6291                 fi
6292
6293                 if test $have_ssleay = yes ; then
6294                         ol_with_tls=found
6295                         ol_link_tls=yes
6296
6297                         cat >> confdefs.h <<\EOF
6298 #define HAVE_SSLEAY 1
6299 EOF
6300
6301
6302                         if test $need_rsaref = yes; then
6303                                 cat >> confdefs.h <<\EOF
6304 #define HAVE_RSAREF 1
6305 EOF
6306
6307
6308                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6309                         else
6310                                 TLS_LIBS="-lssl -lcrypto"
6311                         fi
6312                 fi
6313         fi
6314 fi
6315
6316 if test $ol_link_tls = yes ; then
6317         cat >> confdefs.h <<\EOF
6318 #define HAVE_TLS 1
6319 EOF
6320
6321 fi      
6322
6323 for ac_func in \
6324         ctime_r                 \
6325         gethostbyname_r gethostbyaddr_r \
6326
6327 do
6328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6329 echo "configure:6330: checking for $ac_func" >&5
6330 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6331   echo $ac_n "(cached) $ac_c" 1>&6
6332 else
6333   cat > conftest.$ac_ext <<EOF
6334 #line 6335 "configure"
6335 #include "confdefs.h"
6336 /* System header to define __stub macros and hopefully few prototypes,
6337     which can conflict with char $ac_func(); below.  */
6338 #include <assert.h>
6339 /* Override any gcc2 internal prototype to avoid an error.  */
6340 /* We use char because int might match the return type of a gcc2
6341     builtin and then its argument prototype would still apply.  */
6342 char $ac_func();
6343 char (*f)();
6344
6345 int main() {
6346
6347 /* The GNU C library defines this for functions which it implements
6348     to always fail with ENOSYS.  Some functions are actually named
6349     something starting with __ and the normal name is an alias.  */
6350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6351 choke me
6352 #else
6353 f = $ac_func;
6354 #endif
6355
6356 ; return 0; }
6357 EOF
6358 if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6359   rm -rf conftest*
6360   eval "ac_cv_func_$ac_func=yes"
6361 else
6362   echo "configure: failed program was:" >&5
6363   cat conftest.$ac_ext >&5
6364   rm -rf conftest*
6365   eval "ac_cv_func_$ac_func=no"
6366 fi
6367 rm -f conftest*
6368 fi
6369
6370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6371   echo "$ac_t""yes" 1>&6
6372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6373   cat >> confdefs.h <<EOF
6374 #define $ac_tr_func 1
6375 EOF
6376  
6377 else
6378   echo "$ac_t""no" 1>&6
6379 fi
6380 done
6381
6382
6383 if test "$ac_cv_func_ctime_r" = no ; then
6384         ol_cv_func_ctime_r_nargs=0
6385 else
6386         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6387 echo "configure:6388: checking number of arguments of ctime_r" >&5
6388 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6389   echo $ac_n "(cached) $ac_c" 1>&6
6390 else
6391   cat > conftest.$ac_ext <<EOF
6392 #line 6393 "configure"
6393 #include "confdefs.h"
6394 #include <time.h>
6395 int main() {
6396 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6397 ; return 0; }
6398 EOF
6399 if { (eval echo configure:6400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6400   rm -rf conftest*
6401   ol_cv_func_ctime_r_nargs3=yes
6402 else
6403   echo "configure: failed program was:" >&5
6404   cat conftest.$ac_ext >&5
6405   rm -rf conftest*
6406   ol_cv_func_ctime_r_nargs3=no
6407 fi
6408 rm -f conftest*
6409
6410         cat > conftest.$ac_ext <<EOF
6411 #line 6412 "configure"
6412 #include "confdefs.h"
6413 #include <time.h>
6414 int main() {
6415 time_t ti; char *buffer; ctime_r(&ti,buffer);
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6419   rm -rf conftest*
6420   ol_cv_func_ctime_r_nargs2=yes
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   ol_cv_func_ctime_r_nargs2=no
6426 fi
6427 rm -f conftest*
6428
6429         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6430                 $ol_cv_func_ctime_r_nargs2 = no ; then
6431
6432                 ol_cv_func_ctime_r_nargs=3
6433
6434         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6435                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6436
6437                 ol_cv_func_ctime_r_nargs=2
6438
6439         else
6440                 ol_cv_func_ctime_r_nargs=0
6441         fi
6442   
6443 fi
6444
6445 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6446
6447   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6448         cat >> confdefs.h <<EOF
6449 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6450 EOF
6451
6452   fi
6453
6454 fi
6455
6456 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6457         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6458 echo "configure:6459: checking number of arguments of gethostbyname_r" >&5
6459 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6460   echo $ac_n "(cached) $ac_c" 1>&6
6461 else
6462   cat > conftest.$ac_ext <<EOF
6463 #line 6464 "configure"
6464 #include "confdefs.h"
6465 #include <sys/types.h>
6466 #include <sys/socket.h>
6467 #include <netinet/in.h>
6468 #include <netdb.h>
6469 #define BUFSIZE (sizeof(struct hostent)+10)
6470 int main() {
6471 struct hostent hent; char buffer[BUFSIZE];
6472                 int bufsize=BUFSIZE;int h_errno;
6473                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6474                         buffer, bufsize, &h_errno);
6475 ; return 0; }
6476 EOF
6477 if { (eval echo configure:6478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6478   rm -rf conftest*
6479   ol_cv_func_gethostbyname_r_nargs5=yes
6480 else
6481   echo "configure: failed program was:" >&5
6482   cat conftest.$ac_ext >&5
6483   rm -rf conftest*
6484   ol_cv_func_gethostbyname_r_nargs5=no
6485 fi
6486 rm -f conftest*
6487
6488         cat > conftest.$ac_ext <<EOF
6489 #line 6490 "configure"
6490 #include "confdefs.h"
6491 #include <sys/types.h>
6492 #include <sys/socket.h>
6493 #include <netinet/in.h>
6494 #include <netdb.h>
6495 #define BUFSIZE (sizeof(struct hostent)+10)
6496 int main() {
6497 struct hostent hent;struct hostent *rhent;
6498                 char buffer[BUFSIZE];
6499                 int bufsize=BUFSIZE;int h_errno;
6500                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6501                         &rhent, &h_errno);
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6505   rm -rf conftest*
6506   ol_cv_func_gethostbyname_r_nargs6=yes
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   ol_cv_func_gethostbyname_r_nargs6=no
6512 fi
6513 rm -f conftest*
6514
6515         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6516                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6517
6518                 ol_cv_func_gethostbyname_r_nargs=5
6519
6520         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6521                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6522
6523                 ol_cv_func_gethostbyname_r_nargs=6
6524
6525         else
6526                 ol_cv_func_gethostbyname_r_nargs=0
6527         fi
6528   
6529 fi
6530
6531 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6532   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6533         cat >> confdefs.h <<EOF
6534 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6535 EOF
6536
6537   fi
6538
6539 else
6540         ol_cv_func_gethostbyname_r_nargs=0
6541 fi
6542  
6543 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6544         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6545 echo "configure:6546: checking number of arguments of gethostbyaddr_r" >&5
6546 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6547   echo $ac_n "(cached) $ac_c" 1>&6
6548 else
6549   cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 #include <sys/types.h>
6553 #include <sys/socket.h>
6554 #include <netinet/in.h>
6555 #include <netdb.h>
6556 #define BUFSIZE (sizeof(struct hostent)+10)
6557 int main() {
6558 struct hostent hent; char buffer[BUFSIZE]; 
6559             struct in_addr add;
6560             size_t alen=sizeof(struct in_addr);
6561             int bufsize=BUFSIZE;int h_errno;
6562                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6563                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6564 ; return 0; }
6565 EOF
6566 if { (eval echo configure:6567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6567   rm -rf conftest*
6568   ol_cv_func_gethostbyaddr_r_nargs7=yes
6569 else
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   ol_cv_func_gethostbyaddr_r_nargs7=no
6574 fi
6575 rm -f conftest*
6576
6577         cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 #include <sys/types.h>
6581 #include <sys/socket.h>
6582 #include <netinet/in.h>
6583 #include <netdb.h>
6584 #define BUFSIZE (sizeof(struct hostent)+10)
6585 int main() {
6586 struct hostent hent;
6587                 struct hostent *rhent; char buffer[BUFSIZE]; 
6588                 struct in_addr add;
6589                 size_t alen=sizeof(struct in_addr);
6590                 int bufsize=BUFSIZE;int h_errno;
6591                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6592                         alen, AF_INET, &hent, buffer, bufsize, 
6593                         &rhent, &h_errno);
6594 ; return 0; }
6595 EOF
6596 if { (eval echo configure:6597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6597   rm -rf conftest*
6598   ol_cv_func_gethostbyaddr_r_nargs8=yes
6599 else
6600   echo "configure: failed program was:" >&5
6601   cat conftest.$ac_ext >&5
6602   rm -rf conftest*
6603   ol_cv_func_gethostbyaddr_r_nargs8=no
6604 fi
6605 rm -f conftest*
6606
6607         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6608                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6609
6610                 ol_cv_func_gethostbyaddr_r_nargs=7
6611
6612         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6613                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6614
6615                 ol_cv_func_gethostbyaddr_r_nargs=8
6616
6617         else
6618                 ol_cv_func_gethostbyaddr_r_nargs=0
6619         fi
6620   
6621 fi
6622
6623 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6624   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6625     cat >> confdefs.h <<EOF
6626 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6627 EOF
6628
6629   fi
6630
6631 else
6632         ol_cv_func_gethostbyaddr_r_nargs=0
6633 fi
6634
6635 if test "$ac_cv_func_ctime_r" = yes \
6636         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6637         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6638         -a "$ac_cv_func_gethostbyname_r" = yes \
6639         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6640         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6641         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6642         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6643         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6644         ; then
6645  
6646         cat >> confdefs.h <<\EOF
6647 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6648 EOF
6649
6650 fi
6651
6652 ol_link_threads=no
6653
6654 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6655         -o $ol_with_threads = nt ; then
6656
6657                 if test "$ac_cv_mingw32" = yes ; then
6658         ol_link_threads=nt
6659         ol_with_threads=found
6660         ol_with_yielding_select=yes
6661         echo $ac_n "checking for NT threads""... $ac_c" 1>&6
6662 echo "configure:6663: checking for NT threads" >&5
6663         echo "$ac_t""yes" 1>&6
6664         cat >> confdefs.h <<\EOF
6665 #define HAVE_NT_THREADS 1
6666 EOF
6667
6668         fi
6669 fi
6670
6671 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6672         -o $ol_with_threads = posix ; then
6673
6674         for ac_hdr in pthread.h
6675 do
6676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6678 echo "configure:6679: checking for $ac_hdr" >&5
6679 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6680   echo $ac_n "(cached) $ac_c" 1>&6
6681 else
6682   cat > conftest.$ac_ext <<EOF
6683 #line 6684 "configure"
6684 #include "confdefs.h"
6685 #include <$ac_hdr>
6686 EOF
6687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6688 { (eval echo configure:6689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6690 if test -z "$ac_err"; then
6691   rm -rf conftest*
6692   eval "ac_cv_header_$ac_safe=yes"
6693 else
6694   echo "$ac_err" >&5
6695   echo "configure: failed program was:" >&5
6696   cat conftest.$ac_ext >&5
6697   rm -rf conftest*
6698   eval "ac_cv_header_$ac_safe=no"
6699 fi
6700 rm -f conftest*
6701 fi
6702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6703   echo "$ac_t""yes" 1>&6
6704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6705   cat >> confdefs.h <<EOF
6706 #define $ac_tr_hdr 1
6707 EOF
6708  
6709 else
6710   echo "$ac_t""no" 1>&6
6711 fi
6712 done
6713
6714
6715         if test $ac_cv_header_pthread_h = yes ; then
6716                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6717 echo "configure:6718: checking POSIX thread version" >&5
6718 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   
6722         cat > conftest.$ac_ext <<EOF
6723 #line 6724 "configure"
6724 #include "confdefs.h"
6725
6726 #               include <pthread.h>
6727                 /* this check could be improved */
6728 #               ifdef PTHREAD_ONCE_INIT
6729                         pthread_version_final;
6730 #               endif
6731         
6732 EOF
6733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6734   egrep "pthread_version_final" >/dev/null 2>&1; then
6735   rm -rf conftest*
6736   ol_pthread_final=yes
6737 else
6738   rm -rf conftest*
6739   ol_pthread_final=no
6740 fi
6741 rm -f conftest*
6742
6743
6744         cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747
6748 #               include <pthread.h>
6749                 /* this check could be improved */
6750 #               ifdef pthread_once_init
6751                         pthread_version_draft4;
6752 #               endif
6753         
6754 EOF
6755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6756   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6757   rm -rf conftest*
6758   ol_pthread_draft4=yes
6759 else
6760   rm -rf conftest*
6761   ol_pthread_draft4=no
6762 fi
6763 rm -f conftest*
6764
6765
6766         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6767                 ol_cv_pthread_version=final
6768         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6769                 ol_cv_pthread_version=draft4
6770         else
6771                 ol_cv_pthread_version=unknown
6772         fi
6773
6774 fi
6775
6776 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6777
6778
6779                 if test $ol_cv_pthread_version = final ; then
6780                         cat >> confdefs.h <<\EOF
6781 #define HAVE_PTHREADS_FINAL 1
6782 EOF
6783
6784                 elif test $ol_cv_pthread_version = draft4 ; then
6785                         cat >> confdefs.h <<\EOF
6786 #define HAVE_PTHREADS_D4 1
6787 EOF
6788
6789                 else
6790                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6791                 fi
6792
6793                 # consider threads found
6794                 ol_with_threads=found
6795
6796                 
6797         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6798 echo "configure:6799: checking for LinuxThreads pthread.h" >&5
6799 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6800   echo $ac_n "(cached) $ac_c" 1>&6
6801 else
6802   cat > conftest.$ac_ext <<EOF
6803 #line 6804 "configure"
6804 #include "confdefs.h"
6805 #include <pthread.h>
6806 EOF
6807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6808   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6809   rm -rf conftest*
6810   ol_cv_header_linux_threads=yes
6811 else
6812   rm -rf conftest*
6813   ol_cv_header_linux_threads=no
6814 fi
6815 rm -f conftest*
6816
6817                 
6818 fi
6819
6820 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6821         if test $ol_cv_header_linux_threads = yes; then
6822                 cat >> confdefs.h <<\EOF
6823 #define HAVE_LINUX_THREADS 1
6824 EOF
6825
6826         fi
6827
6828                 
6829         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6830 echo "configure:6831: checking for GNU Pth pthread.h" >&5
6831 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6832   echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834   cat > conftest.$ac_ext <<EOF
6835 #line 6836 "configure"
6836 #include "confdefs.h"
6837 #include <pthread.h>
6838 #ifdef _POSIX_THREAD_IS_GNU_PTH
6839         __gnu_pth__;
6840 #endif
6841
6842 EOF
6843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6844   egrep "__gnu_pth__" >/dev/null 2>&1; then
6845   rm -rf conftest*
6846   ol_cv_header_gnu_pth_pthread_h=yes
6847 else
6848   rm -rf conftest*
6849   ol_cv_header_gnu_pth_pthread_h=no
6850 fi
6851 rm -f conftest*
6852
6853                 
6854 fi
6855
6856 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6857
6858
6859                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6860                         for ac_hdr in sched.h
6861 do
6862 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6863 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6864 echo "configure:6865: checking for $ac_hdr" >&5
6865 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6866   echo $ac_n "(cached) $ac_c" 1>&6
6867 else
6868   cat > conftest.$ac_ext <<EOF
6869 #line 6870 "configure"
6870 #include "confdefs.h"
6871 #include <$ac_hdr>
6872 EOF
6873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6874 { (eval echo configure:6875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6876 if test -z "$ac_err"; then
6877   rm -rf conftest*
6878   eval "ac_cv_header_$ac_safe=yes"
6879 else
6880   echo "$ac_err" >&5
6881   echo "configure: failed program was:" >&5
6882   cat conftest.$ac_ext >&5
6883   rm -rf conftest*
6884   eval "ac_cv_header_$ac_safe=no"
6885 fi
6886 rm -f conftest*
6887 fi
6888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6889   echo "$ac_t""yes" 1>&6
6890     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6891   cat >> confdefs.h <<EOF
6892 #define $ac_tr_hdr 1
6893 EOF
6894  
6895 else
6896   echo "$ac_t""no" 1>&6
6897 fi
6898 done
6899
6900                 fi
6901
6902                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6903                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6904 echo "configure:6905: checking for pthread_create in default libraries" >&5
6905 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6906   echo $ac_n "(cached) $ac_c" 1>&6
6907 else
6908   
6909                 if test "$cross_compiling" = yes; then
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913 /* pthread test headers */
6914 #include <pthread.h>
6915 #ifndef NULL
6916 #define NULL (void*)0
6917 #endif
6918
6919 static void *task(p)
6920         void *p;
6921 {
6922         return (void *) (p == NULL);
6923 }
6924
6925 int main() {
6926
6927         /* pthread test function */
6928         pthread_t t;
6929         int status;
6930
6931         /* make sure pthread_create() isn't just a stub */
6932 #if HAVE_PTHREADS_D4
6933         status = pthread_create(&t, pthread_attr_default, task, NULL);
6934 #else
6935         status = pthread_create(&t, NULL, task, NULL);
6936 #endif
6937
6938         if( status ) exit( status );
6939
6940         /* make sure pthread_detach() isn't just a stub */
6941 #if HAVE_PTHREADS_D4
6942         status = pthread_detach( &t );
6943 #else
6944         status = pthread_detach( t );
6945 #endif
6946
6947 #ifdef HAVE_LINUX_THREADS
6948         pthread_kill_other_threads_np();
6949 #endif
6950
6951         exit( status );
6952
6953 ; return 0; }
6954 EOF
6955 if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6956   rm -rf conftest*
6957   ol_cv_pthread_create=yes
6958 else
6959   echo "configure: failed program was:" >&5
6960   cat conftest.$ac_ext >&5
6961   rm -rf conftest*
6962   ol_cv_pthread_create=no
6963 fi
6964 rm -f conftest*
6965 else
6966   cat > conftest.$ac_ext <<EOF
6967 #line 6968 "configure"
6968 #include "confdefs.h"
6969 /* pthread test headers */
6970 #include <pthread.h>
6971 #ifndef NULL
6972 #define NULL (void*)0
6973 #endif
6974
6975 static void *task(p)
6976         void *p;
6977 {
6978         return (void *) (p == NULL);
6979 }
6980
6981
6982 int main(argc, argv)
6983         int argc;
6984         char **argv;
6985 {
6986
6987         /* pthread test function */
6988         pthread_t t;
6989         int status;
6990
6991         /* make sure pthread_create() isn't just a stub */
6992 #if HAVE_PTHREADS_D4
6993         status = pthread_create(&t, pthread_attr_default, task, NULL);
6994 #else
6995         status = pthread_create(&t, NULL, task, NULL);
6996 #endif
6997
6998         if( status ) exit( status );
6999
7000         /* make sure pthread_detach() isn't just a stub */
7001 #if HAVE_PTHREADS_D4
7002         status = pthread_detach( &t );
7003 #else
7004         status = pthread_detach( t );
7005 #endif
7006
7007 #ifdef HAVE_LINUX_THREADS
7008         pthread_kill_other_threads_np();
7009 #endif
7010
7011         exit( status );
7012
7013 }
7014
7015 EOF
7016 if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7017 then
7018   ol_cv_pthread_create=yes
7019 else
7020   echo "configure: failed program was:" >&5
7021   cat conftest.$ac_ext >&5
7022   rm -fr conftest*
7023   ol_cv_pthread_create=no
7024 fi
7025 rm -fr conftest*
7026 fi
7027
7028 fi
7029
7030 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7031
7032                 if test $ol_cv_pthread_create != no ; then
7033                         ol_link_threads=posix
7034                         ol_link_pthreads=""
7035                 fi
7036                 
7037                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7038 if test "$ol_link_threads" = no ; then
7039         # try -kthread
7040         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7041 echo "configure:7042: checking for pthread link with -kthread" >&5
7042 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   
7046                 # save the flags
7047                 ol_LIBS="$LIBS"
7048                 LIBS="-kthread $LIBS"
7049
7050                 if test "$cross_compiling" = yes; then
7051   cat > conftest.$ac_ext <<EOF
7052 #line 7053 "configure"
7053 #include "confdefs.h"
7054 /* pthread test headers */
7055 #include <pthread.h>
7056 #ifndef NULL
7057 #define NULL (void*)0
7058 #endif
7059
7060 static void *task(p)
7061         void *p;
7062 {
7063         return (void *) (p == NULL);
7064 }
7065
7066 int main() {
7067
7068         /* pthread test function */
7069         pthread_t t;
7070         int status;
7071
7072         /* make sure pthread_create() isn't just a stub */
7073 #if HAVE_PTHREADS_D4
7074         status = pthread_create(&t, pthread_attr_default, task, NULL);
7075 #else
7076         status = pthread_create(&t, NULL, task, NULL);
7077 #endif
7078
7079         if( status ) exit( status );
7080
7081         /* make sure pthread_detach() isn't just a stub */
7082 #if HAVE_PTHREADS_D4
7083         status = pthread_detach( &t );
7084 #else
7085         status = pthread_detach( t );
7086 #endif
7087
7088 #ifdef HAVE_LINUX_THREADS
7089         pthread_kill_other_threads_np();
7090 #endif
7091
7092         exit( status );
7093
7094 ; return 0; }
7095 EOF
7096 if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7097   rm -rf conftest*
7098   ol_cv_pthread_kthread=yes
7099 else
7100   echo "configure: failed program was:" >&5
7101   cat conftest.$ac_ext >&5
7102   rm -rf conftest*
7103   ol_cv_pthread_kthread=no
7104 fi
7105 rm -f conftest*
7106 else
7107   cat > conftest.$ac_ext <<EOF
7108 #line 7109 "configure"
7109 #include "confdefs.h"
7110 /* pthread test headers */
7111 #include <pthread.h>
7112 #ifndef NULL
7113 #define NULL (void*)0
7114 #endif
7115
7116 static void *task(p)
7117         void *p;
7118 {
7119         return (void *) (p == NULL);
7120 }
7121
7122
7123 int main(argc, argv)
7124         int argc;
7125         char **argv;
7126 {
7127
7128         /* pthread test function */
7129         pthread_t t;
7130         int status;
7131
7132         /* make sure pthread_create() isn't just a stub */
7133 #if HAVE_PTHREADS_D4
7134         status = pthread_create(&t, pthread_attr_default, task, NULL);
7135 #else
7136         status = pthread_create(&t, NULL, task, NULL);
7137 #endif
7138
7139         if( status ) exit( status );
7140
7141         /* make sure pthread_detach() isn't just a stub */
7142 #if HAVE_PTHREADS_D4
7143         status = pthread_detach( &t );
7144 #else
7145         status = pthread_detach( t );
7146 #endif
7147
7148 #ifdef HAVE_LINUX_THREADS
7149         pthread_kill_other_threads_np();
7150 #endif
7151
7152         exit( status );
7153
7154 }
7155
7156 EOF
7157 if { (eval echo configure:7158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7158 then
7159   ol_cv_pthread_kthread=yes
7160 else
7161   echo "configure: failed program was:" >&5
7162   cat conftest.$ac_ext >&5
7163   rm -fr conftest*
7164   ol_cv_pthread_kthread=no
7165 fi
7166 rm -fr conftest*
7167 fi
7168
7169
7170                 # restore the LIBS
7171                 LIBS="$ol_LIBS"
7172         
7173 fi
7174
7175 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7176
7177         if test $ol_cv_pthread_kthread = yes ; then
7178                 ol_link_pthreads="-kthread"
7179                 ol_link_threads=posix
7180         fi
7181 fi
7182
7183                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7184 if test "$ol_link_threads" = no ; then
7185         # try -pthread
7186         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7187 echo "configure:7188: checking for pthread link with -pthread" >&5
7188 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7189   echo $ac_n "(cached) $ac_c" 1>&6
7190 else
7191   
7192                 # save the flags
7193                 ol_LIBS="$LIBS"
7194                 LIBS="-pthread $LIBS"
7195
7196                 if test "$cross_compiling" = yes; then
7197   cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 /* pthread test headers */
7201 #include <pthread.h>
7202 #ifndef NULL
7203 #define NULL (void*)0
7204 #endif
7205
7206 static void *task(p)
7207         void *p;
7208 {
7209         return (void *) (p == NULL);
7210 }
7211
7212 int main() {
7213
7214         /* pthread test function */
7215         pthread_t t;
7216         int status;
7217
7218         /* make sure pthread_create() isn't just a stub */
7219 #if HAVE_PTHREADS_D4
7220         status = pthread_create(&t, pthread_attr_default, task, NULL);
7221 #else
7222         status = pthread_create(&t, NULL, task, NULL);
7223 #endif
7224
7225         if( status ) exit( status );
7226
7227         /* make sure pthread_detach() isn't just a stub */
7228 #if HAVE_PTHREADS_D4
7229         status = pthread_detach( &t );
7230 #else
7231         status = pthread_detach( t );
7232 #endif
7233
7234 #ifdef HAVE_LINUX_THREADS
7235         pthread_kill_other_threads_np();
7236 #endif
7237
7238         exit( status );
7239
7240 ; return 0; }
7241 EOF
7242 if { (eval echo configure:7243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7243   rm -rf conftest*
7244   ol_cv_pthread_pthread=yes
7245 else
7246   echo "configure: failed program was:" >&5
7247   cat conftest.$ac_ext >&5
7248   rm -rf conftest*
7249   ol_cv_pthread_pthread=no
7250 fi
7251 rm -f conftest*
7252 else
7253   cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* pthread test headers */
7257 #include <pthread.h>
7258 #ifndef NULL
7259 #define NULL (void*)0
7260 #endif
7261
7262 static void *task(p)
7263         void *p;
7264 {
7265         return (void *) (p == NULL);
7266 }
7267
7268
7269 int main(argc, argv)
7270         int argc;
7271         char **argv;
7272 {
7273
7274         /* pthread test function */
7275         pthread_t t;
7276         int status;
7277
7278         /* make sure pthread_create() isn't just a stub */
7279 #if HAVE_PTHREADS_D4
7280         status = pthread_create(&t, pthread_attr_default, task, NULL);
7281 #else
7282         status = pthread_create(&t, NULL, task, NULL);
7283 #endif
7284
7285         if( status ) exit( status );
7286
7287         /* make sure pthread_detach() isn't just a stub */
7288 #if HAVE_PTHREADS_D4
7289         status = pthread_detach( &t );
7290 #else
7291         status = pthread_detach( t );
7292 #endif
7293
7294 #ifdef HAVE_LINUX_THREADS
7295         pthread_kill_other_threads_np();
7296 #endif
7297
7298         exit( status );
7299
7300 }
7301
7302 EOF
7303 if { (eval echo configure:7304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7304 then
7305   ol_cv_pthread_pthread=yes
7306 else
7307   echo "configure: failed program was:" >&5
7308   cat conftest.$ac_ext >&5
7309   rm -fr conftest*
7310   ol_cv_pthread_pthread=no
7311 fi
7312 rm -fr conftest*
7313 fi
7314
7315
7316                 # restore the LIBS
7317                 LIBS="$ol_LIBS"
7318         
7319 fi
7320
7321 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7322
7323         if test $ol_cv_pthread_pthread = yes ; then
7324                 ol_link_pthreads="-pthread"
7325                 ol_link_threads=posix
7326         fi
7327 fi
7328
7329                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7330 if test "$ol_link_threads" = no ; then
7331         # try -pthreads
7332         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7333 echo "configure:7334: checking for pthread link with -pthreads" >&5
7334 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7335   echo $ac_n "(cached) $ac_c" 1>&6
7336 else
7337   
7338                 # save the flags
7339                 ol_LIBS="$LIBS"
7340                 LIBS="-pthreads $LIBS"
7341
7342                 if test "$cross_compiling" = yes; then
7343   cat > conftest.$ac_ext <<EOF
7344 #line 7345 "configure"
7345 #include "confdefs.h"
7346 /* pthread test headers */
7347 #include <pthread.h>
7348 #ifndef NULL
7349 #define NULL (void*)0
7350 #endif
7351
7352 static void *task(p)
7353         void *p;
7354 {
7355         return (void *) (p == NULL);
7356 }
7357
7358 int main() {
7359
7360         /* pthread test function */
7361         pthread_t t;
7362         int status;
7363
7364         /* make sure pthread_create() isn't just a stub */
7365 #if HAVE_PTHREADS_D4
7366         status = pthread_create(&t, pthread_attr_default, task, NULL);
7367 #else
7368         status = pthread_create(&t, NULL, task, NULL);
7369 #endif
7370
7371         if( status ) exit( status );
7372
7373         /* make sure pthread_detach() isn't just a stub */
7374 #if HAVE_PTHREADS_D4
7375         status = pthread_detach( &t );
7376 #else
7377         status = pthread_detach( t );
7378 #endif
7379
7380 #ifdef HAVE_LINUX_THREADS
7381         pthread_kill_other_threads_np();
7382 #endif
7383
7384         exit( status );
7385
7386 ; return 0; }
7387 EOF
7388 if { (eval echo configure:7389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7389   rm -rf conftest*
7390   ol_cv_pthread_pthreads=yes
7391 else
7392   echo "configure: failed program was:" >&5
7393   cat conftest.$ac_ext >&5
7394   rm -rf conftest*
7395   ol_cv_pthread_pthreads=no
7396 fi
7397 rm -f conftest*
7398 else
7399   cat > conftest.$ac_ext <<EOF
7400 #line 7401 "configure"
7401 #include "confdefs.h"
7402 /* pthread test headers */
7403 #include <pthread.h>
7404 #ifndef NULL
7405 #define NULL (void*)0
7406 #endif
7407
7408 static void *task(p)
7409         void *p;
7410 {
7411         return (void *) (p == NULL);
7412 }
7413
7414
7415 int main(argc, argv)
7416         int argc;
7417         char **argv;
7418 {
7419
7420         /* pthread test function */
7421         pthread_t t;
7422         int status;
7423
7424         /* make sure pthread_create() isn't just a stub */
7425 #if HAVE_PTHREADS_D4
7426         status = pthread_create(&t, pthread_attr_default, task, NULL);
7427 #else
7428         status = pthread_create(&t, NULL, task, NULL);
7429 #endif
7430
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_pthreads=yes
7452 else
7453   echo "configure: failed program was:" >&5
7454   cat conftest.$ac_ext >&5
7455   rm -fr conftest*
7456   ol_cv_pthread_pthreads=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_pthreads" 1>&6
7468
7469         if test $ol_cv_pthread_pthreads = yes ; then
7470                 ol_link_pthreads="-pthreads"
7471                 ol_link_threads=posix
7472         fi
7473 fi
7474
7475                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7476 if test "$ol_link_threads" = no ; then
7477         # try -mthreads
7478         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7479 echo "configure:7480: checking for pthread link with -mthreads" >&5
7480 if eval "test \"\${ol_cv_pthread_mthreads+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="-mthreads $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
7510         /* make sure pthread_create() isn't just a stub */
7511 #if HAVE_PTHREADS_D4
7512         status = pthread_create(&t, pthread_attr_default, task, NULL);
7513 #else
7514         status = pthread_create(&t, NULL, task, NULL);
7515 #endif
7516
7517         if( status ) exit( status );
7518
7519         /* make sure pthread_detach() isn't just a stub */
7520 #if HAVE_PTHREADS_D4
7521         status = pthread_detach( &t );
7522 #else
7523         status = pthread_detach( t );
7524 #endif
7525
7526 #ifdef HAVE_LINUX_THREADS
7527         pthread_kill_other_threads_np();
7528 #endif
7529
7530         exit( status );
7531
7532 ; return 0; }
7533 EOF
7534 if { (eval echo configure:7535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7535   rm -rf conftest*
7536   ol_cv_pthread_mthreads=yes
7537 else
7538   echo "configure: failed program was:" >&5
7539   cat conftest.$ac_ext >&5
7540   rm -rf conftest*
7541   ol_cv_pthread_mthreads=no
7542 fi
7543 rm -f conftest*
7544 else
7545   cat > conftest.$ac_ext <<EOF
7546 #line 7547 "configure"
7547 #include "confdefs.h"
7548 /* pthread test headers */
7549 #include <pthread.h>
7550 #ifndef NULL
7551 #define NULL (void*)0
7552 #endif
7553
7554 static void *task(p)
7555         void *p;
7556 {
7557         return (void *) (p == NULL);
7558 }
7559
7560
7561 int main(argc, argv)
7562         int argc;
7563         char **argv;
7564 {
7565
7566         /* pthread test function */
7567         pthread_t t;
7568         int status;
7569
7570         /* make sure pthread_create() isn't just a stub */
7571 #if HAVE_PTHREADS_D4
7572         status = pthread_create(&t, pthread_attr_default, task, NULL);
7573 #else
7574         status = pthread_create(&t, NULL, task, NULL);
7575 #endif
7576
7577         if( status ) exit( status );
7578
7579         /* make sure pthread_detach() isn't just a stub */
7580 #if HAVE_PTHREADS_D4
7581         status = pthread_detach( &t );
7582 #else
7583         status = pthread_detach( t );
7584 #endif
7585
7586 #ifdef HAVE_LINUX_THREADS
7587         pthread_kill_other_threads_np();
7588 #endif
7589
7590         exit( status );
7591
7592 }
7593
7594 EOF
7595 if { (eval echo configure:7596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7596 then
7597   ol_cv_pthread_mthreads=yes
7598 else
7599   echo "configure: failed program was:" >&5
7600   cat conftest.$ac_ext >&5
7601   rm -fr conftest*
7602   ol_cv_pthread_mthreads=no
7603 fi
7604 rm -fr conftest*
7605 fi
7606
7607
7608                 # restore the LIBS
7609                 LIBS="$ol_LIBS"
7610         
7611 fi
7612
7613 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7614
7615         if test $ol_cv_pthread_mthreads = yes ; then
7616                 ol_link_pthreads="-mthreads"
7617                 ol_link_threads=posix
7618         fi
7619 fi
7620
7621                 # Pthread try link: -thread (ol_cv_pthread_thread)
7622 if test "$ol_link_threads" = no ; then
7623         # try -thread
7624         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7625 echo "configure:7626: checking for pthread link with -thread" >&5
7626 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7627   echo $ac_n "(cached) $ac_c" 1>&6
7628 else
7629   
7630                 # save the flags
7631                 ol_LIBS="$LIBS"
7632                 LIBS="-thread $LIBS"
7633
7634                 if test "$cross_compiling" = yes; then
7635   cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 /* pthread test headers */
7639 #include <pthread.h>
7640 #ifndef NULL
7641 #define NULL (void*)0
7642 #endif
7643
7644 static void *task(p)
7645         void *p;
7646 {
7647         return (void *) (p == NULL);
7648 }
7649
7650 int main() {
7651
7652         /* pthread test function */
7653         pthread_t t;
7654         int status;
7655
7656         /* make sure pthread_create() isn't just a stub */
7657 #if HAVE_PTHREADS_D4
7658         status = pthread_create(&t, pthread_attr_default, task, NULL);
7659 #else
7660         status = pthread_create(&t, NULL, task, NULL);
7661 #endif
7662
7663         if( status ) exit( status );
7664
7665         /* make sure pthread_detach() isn't just a stub */
7666 #if HAVE_PTHREADS_D4
7667         status = pthread_detach( &t );
7668 #else
7669         status = pthread_detach( t );
7670 #endif
7671
7672 #ifdef HAVE_LINUX_THREADS
7673         pthread_kill_other_threads_np();
7674 #endif
7675
7676         exit( status );
7677
7678 ; return 0; }
7679 EOF
7680 if { (eval echo configure:7681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7681   rm -rf conftest*
7682   ol_cv_pthread_thread=yes
7683 else
7684   echo "configure: failed program was:" >&5
7685   cat conftest.$ac_ext >&5
7686   rm -rf conftest*
7687   ol_cv_pthread_thread=no
7688 fi
7689 rm -f conftest*
7690 else
7691   cat > conftest.$ac_ext <<EOF
7692 #line 7693 "configure"
7693 #include "confdefs.h"
7694 /* pthread test headers */
7695 #include <pthread.h>
7696 #ifndef NULL
7697 #define NULL (void*)0
7698 #endif
7699
7700 static void *task(p)
7701         void *p;
7702 {
7703         return (void *) (p == NULL);
7704 }
7705
7706
7707 int main(argc, argv)
7708         int argc;
7709         char **argv;
7710 {
7711
7712         /* pthread test function */
7713         pthread_t t;
7714         int status;
7715
7716         /* make sure pthread_create() isn't just a stub */
7717 #if HAVE_PTHREADS_D4
7718         status = pthread_create(&t, pthread_attr_default, task, NULL);
7719 #else
7720         status = pthread_create(&t, NULL, task, NULL);
7721 #endif
7722
7723         if( status ) exit( status );
7724
7725         /* make sure pthread_detach() isn't just a stub */
7726 #if HAVE_PTHREADS_D4
7727         status = pthread_detach( &t );
7728 #else
7729         status = pthread_detach( t );
7730 #endif
7731
7732 #ifdef HAVE_LINUX_THREADS
7733         pthread_kill_other_threads_np();
7734 #endif
7735
7736         exit( status );
7737
7738 }
7739
7740 EOF
7741 if { (eval echo configure:7742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7742 then
7743   ol_cv_pthread_thread=yes
7744 else
7745   echo "configure: failed program was:" >&5
7746   cat conftest.$ac_ext >&5
7747   rm -fr conftest*
7748   ol_cv_pthread_thread=no
7749 fi
7750 rm -fr conftest*
7751 fi
7752
7753
7754                 # restore the LIBS
7755                 LIBS="$ol_LIBS"
7756         
7757 fi
7758
7759 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7760
7761         if test $ol_cv_pthread_thread = yes ; then
7762                 ol_link_pthreads="-thread"
7763                 ol_link_threads=posix
7764         fi
7765 fi
7766
7767
7768                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7769 if test "$ol_link_threads" = no ; then
7770         # try -lpthread -lmach -lexc -lc_r
7771         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7772 echo "configure:7773: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7773 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7774   echo $ac_n "(cached) $ac_c" 1>&6
7775 else
7776   
7777                 # save the flags
7778                 ol_LIBS="$LIBS"
7779                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7780
7781                 if test "$cross_compiling" = yes; then
7782   cat > conftest.$ac_ext <<EOF
7783 #line 7784 "configure"
7784 #include "confdefs.h"
7785 /* pthread test headers */
7786 #include <pthread.h>
7787 #ifndef NULL
7788 #define NULL (void*)0
7789 #endif
7790
7791 static void *task(p)
7792         void *p;
7793 {
7794         return (void *) (p == NULL);
7795 }
7796
7797 int main() {
7798
7799         /* pthread test function */
7800         pthread_t t;
7801         int status;
7802
7803         /* make sure pthread_create() isn't just a stub */
7804 #if HAVE_PTHREADS_D4
7805         status = pthread_create(&t, pthread_attr_default, task, NULL);
7806 #else
7807         status = pthread_create(&t, NULL, task, NULL);
7808 #endif
7809
7810         if( status ) exit( status );
7811
7812         /* make sure pthread_detach() isn't just a stub */
7813 #if HAVE_PTHREADS_D4
7814         status = pthread_detach( &t );
7815 #else
7816         status = pthread_detach( t );
7817 #endif
7818
7819 #ifdef HAVE_LINUX_THREADS
7820         pthread_kill_other_threads_np();
7821 #endif
7822
7823         exit( status );
7824
7825 ; return 0; }
7826 EOF
7827 if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7828   rm -rf conftest*
7829   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7830 else
7831   echo "configure: failed program was:" >&5
7832   cat conftest.$ac_ext >&5
7833   rm -rf conftest*
7834   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7835 fi
7836 rm -f conftest*
7837 else
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* pthread test headers */
7842 #include <pthread.h>
7843 #ifndef NULL
7844 #define NULL (void*)0
7845 #endif
7846
7847 static void *task(p)
7848         void *p;
7849 {
7850         return (void *) (p == NULL);
7851 }
7852
7853
7854 int main(argc, argv)
7855         int argc;
7856         char **argv;
7857 {
7858
7859         /* pthread test function */
7860         pthread_t t;
7861         int status;
7862
7863         /* make sure pthread_create() isn't just a stub */
7864 #if HAVE_PTHREADS_D4
7865         status = pthread_create(&t, pthread_attr_default, task, NULL);
7866 #else
7867         status = pthread_create(&t, NULL, task, NULL);
7868 #endif
7869
7870         if( status ) exit( status );
7871
7872         /* make sure pthread_detach() isn't just a stub */
7873 #if HAVE_PTHREADS_D4
7874         status = pthread_detach( &t );
7875 #else
7876         status = pthread_detach( t );
7877 #endif
7878
7879 #ifdef HAVE_LINUX_THREADS
7880         pthread_kill_other_threads_np();
7881 #endif
7882
7883         exit( status );
7884
7885 }
7886
7887 EOF
7888 if { (eval echo configure:7889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7889 then
7890   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7891 else
7892   echo "configure: failed program was:" >&5
7893   cat conftest.$ac_ext >&5
7894   rm -fr conftest*
7895   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7896 fi
7897 rm -fr conftest*
7898 fi
7899
7900
7901                 # restore the LIBS
7902                 LIBS="$ol_LIBS"
7903         
7904 fi
7905
7906 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7907
7908         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7909                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7910                 ol_link_threads=posix
7911         fi
7912 fi
7913
7914                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7915 if test "$ol_link_threads" = no ; then
7916         # try -lpthread -lmach -lexc
7917         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7918 echo "configure:7919: checking for pthread link with -lpthread -lmach -lexc" >&5
7919 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7920   echo $ac_n "(cached) $ac_c" 1>&6
7921 else
7922   
7923                 # save the flags
7924                 ol_LIBS="$LIBS"
7925                 LIBS="-lpthread -lmach -lexc $LIBS"
7926
7927                 if test "$cross_compiling" = yes; then
7928   cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931 /* pthread test headers */
7932 #include <pthread.h>
7933 #ifndef NULL
7934 #define NULL (void*)0
7935 #endif
7936
7937 static void *task(p)
7938         void *p;
7939 {
7940         return (void *) (p == NULL);
7941 }
7942
7943 int main() {
7944
7945         /* pthread test function */
7946         pthread_t t;
7947         int status;
7948
7949         /* make sure pthread_create() isn't just a stub */
7950 #if HAVE_PTHREADS_D4
7951         status = pthread_create(&t, pthread_attr_default, task, NULL);
7952 #else
7953         status = pthread_create(&t, NULL, task, NULL);
7954 #endif
7955
7956         if( status ) exit( status );
7957
7958         /* make sure pthread_detach() isn't just a stub */
7959 #if HAVE_PTHREADS_D4
7960         status = pthread_detach( &t );
7961 #else
7962         status = pthread_detach( t );
7963 #endif
7964
7965 #ifdef HAVE_LINUX_THREADS
7966         pthread_kill_other_threads_np();
7967 #endif
7968
7969         exit( status );
7970
7971 ; return 0; }
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7974   rm -rf conftest*
7975   ol_cv_pthread_lpthread_lmach_lexc=yes
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   ol_cv_pthread_lpthread_lmach_lexc=no
7981 fi
7982 rm -f conftest*
7983 else
7984   cat > conftest.$ac_ext <<EOF
7985 #line 7986 "configure"
7986 #include "confdefs.h"
7987 /* pthread test headers */
7988 #include <pthread.h>
7989 #ifndef NULL
7990 #define NULL (void*)0
7991 #endif
7992
7993 static void *task(p)
7994         void *p;
7995 {
7996         return (void *) (p == NULL);
7997 }
7998
7999
8000 int main(argc, argv)
8001         int argc;
8002         char **argv;
8003 {
8004
8005         /* pthread test function */
8006         pthread_t t;
8007         int status;
8008
8009         /* make sure pthread_create() isn't just a stub */
8010 #if HAVE_PTHREADS_D4
8011         status = pthread_create(&t, pthread_attr_default, task, NULL);
8012 #else
8013         status = pthread_create(&t, NULL, task, NULL);
8014 #endif
8015
8016         if( status ) exit( status );
8017
8018         /* make sure pthread_detach() isn't just a stub */
8019 #if HAVE_PTHREADS_D4
8020         status = pthread_detach( &t );
8021 #else
8022         status = pthread_detach( t );
8023 #endif
8024
8025 #ifdef HAVE_LINUX_THREADS
8026         pthread_kill_other_threads_np();
8027 #endif
8028
8029         exit( status );
8030
8031 }
8032
8033 EOF
8034 if { (eval echo configure:8035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8035 then
8036   ol_cv_pthread_lpthread_lmach_lexc=yes
8037 else
8038   echo "configure: failed program was:" >&5
8039   cat conftest.$ac_ext >&5
8040   rm -fr conftest*
8041   ol_cv_pthread_lpthread_lmach_lexc=no
8042 fi
8043 rm -fr conftest*
8044 fi
8045
8046
8047                 # restore the LIBS
8048                 LIBS="$ol_LIBS"
8049         
8050 fi
8051
8052 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8053
8054         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8055                 ol_link_pthreads="-lpthread -lmach -lexc"
8056                 ol_link_threads=posix
8057         fi
8058 fi
8059
8060
8061                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8062 if test "$ol_link_threads" = no ; then
8063         # try -lpthread -Wl,-woff,85
8064         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8065 echo "configure:8066: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8066 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8067   echo $ac_n "(cached) $ac_c" 1>&6
8068 else
8069   
8070                 # save the flags
8071                 ol_LIBS="$LIBS"
8072                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8073
8074                 if test "$cross_compiling" = yes; then
8075   cat > conftest.$ac_ext <<EOF
8076 #line 8077 "configure"
8077 #include "confdefs.h"
8078 /* pthread test headers */
8079 #include <pthread.h>
8080 #ifndef NULL
8081 #define NULL (void*)0
8082 #endif
8083
8084 static void *task(p)
8085         void *p;
8086 {
8087         return (void *) (p == NULL);
8088 }
8089
8090 int main() {
8091
8092         /* pthread test function */
8093         pthread_t t;
8094         int status;
8095
8096         /* make sure pthread_create() isn't just a stub */
8097 #if HAVE_PTHREADS_D4
8098         status = pthread_create(&t, pthread_attr_default, task, NULL);
8099 #else
8100         status = pthread_create(&t, NULL, task, NULL);
8101 #endif
8102
8103         if( status ) exit( status );
8104
8105         /* make sure pthread_detach() isn't just a stub */
8106 #if HAVE_PTHREADS_D4
8107         status = pthread_detach( &t );
8108 #else
8109         status = pthread_detach( t );
8110 #endif
8111
8112 #ifdef HAVE_LINUX_THREADS
8113         pthread_kill_other_threads_np();
8114 #endif
8115
8116         exit( status );
8117
8118 ; return 0; }
8119 EOF
8120 if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8121   rm -rf conftest*
8122   ol_cv_pthread_lib_lpthread_woff=yes
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -rf conftest*
8127   ol_cv_pthread_lib_lpthread_woff=no
8128 fi
8129 rm -f conftest*
8130 else
8131   cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 /* pthread test headers */
8135 #include <pthread.h>
8136 #ifndef NULL
8137 #define NULL (void*)0
8138 #endif
8139
8140 static void *task(p)
8141         void *p;
8142 {
8143         return (void *) (p == NULL);
8144 }
8145
8146
8147 int main(argc, argv)
8148         int argc;
8149         char **argv;
8150 {
8151
8152         /* pthread test function */
8153         pthread_t t;
8154         int status;
8155
8156         /* make sure pthread_create() isn't just a stub */
8157 #if HAVE_PTHREADS_D4
8158         status = pthread_create(&t, pthread_attr_default, task, NULL);
8159 #else
8160         status = pthread_create(&t, NULL, task, NULL);
8161 #endif
8162
8163         if( status ) exit( status );
8164
8165         /* make sure pthread_detach() isn't just a stub */
8166 #if HAVE_PTHREADS_D4
8167         status = pthread_detach( &t );
8168 #else
8169         status = pthread_detach( t );
8170 #endif
8171
8172 #ifdef HAVE_LINUX_THREADS
8173         pthread_kill_other_threads_np();
8174 #endif
8175
8176         exit( status );
8177
8178 }
8179
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8182 then
8183   ol_cv_pthread_lib_lpthread_woff=yes
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187   rm -fr conftest*
8188   ol_cv_pthread_lib_lpthread_woff=no
8189 fi
8190 rm -fr conftest*
8191 fi
8192
8193
8194                 # restore the LIBS
8195                 LIBS="$ol_LIBS"
8196         
8197 fi
8198
8199 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8200
8201         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8202                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8203                 ol_link_threads=posix
8204         fi
8205 fi
8206
8207
8208                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8209 if test "$ol_link_threads" = no ; then
8210         # try -lpthread
8211         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8212 echo "configure:8213: checking for pthread link with -lpthread" >&5
8213 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8214   echo $ac_n "(cached) $ac_c" 1>&6
8215 else
8216   
8217                 # save the flags
8218                 ol_LIBS="$LIBS"
8219                 LIBS="-lpthread $LIBS"
8220
8221                 if test "$cross_compiling" = yes; then
8222   cat > conftest.$ac_ext <<EOF
8223 #line 8224 "configure"
8224 #include "confdefs.h"
8225 /* pthread test headers */
8226 #include <pthread.h>
8227 #ifndef NULL
8228 #define NULL (void*)0
8229 #endif
8230
8231 static void *task(p)
8232         void *p;
8233 {
8234         return (void *) (p == NULL);
8235 }
8236
8237 int main() {
8238
8239         /* pthread test function */
8240         pthread_t t;
8241         int status;
8242
8243         /* make sure pthread_create() isn't just a stub */
8244 #if HAVE_PTHREADS_D4
8245         status = pthread_create(&t, pthread_attr_default, task, NULL);
8246 #else
8247         status = pthread_create(&t, NULL, task, NULL);
8248 #endif
8249
8250         if( status ) exit( status );
8251
8252         /* make sure pthread_detach() isn't just a stub */
8253 #if HAVE_PTHREADS_D4
8254         status = pthread_detach( &t );
8255 #else
8256         status = pthread_detach( t );
8257 #endif
8258
8259 #ifdef HAVE_LINUX_THREADS
8260         pthread_kill_other_threads_np();
8261 #endif
8262
8263         exit( status );
8264
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8268   rm -rf conftest*
8269   ol_cv_pthread_lpthread=yes
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273   rm -rf conftest*
8274   ol_cv_pthread_lpthread=no
8275 fi
8276 rm -f conftest*
8277 else
8278   cat > conftest.$ac_ext <<EOF
8279 #line 8280 "configure"
8280 #include "confdefs.h"
8281 /* pthread test headers */
8282 #include <pthread.h>
8283 #ifndef NULL
8284 #define NULL (void*)0
8285 #endif
8286
8287 static void *task(p)
8288         void *p;
8289 {
8290         return (void *) (p == NULL);
8291 }
8292
8293
8294 int main(argc, argv)
8295         int argc;
8296         char **argv;
8297 {
8298
8299         /* pthread test function */
8300         pthread_t t;
8301         int status;
8302
8303         /* make sure pthread_create() isn't just a stub */
8304 #if HAVE_PTHREADS_D4
8305         status = pthread_create(&t, pthread_attr_default, task, NULL);
8306 #else
8307         status = pthread_create(&t, NULL, task, NULL);
8308 #endif
8309
8310         if( status ) exit( status );
8311
8312         /* make sure pthread_detach() isn't just a stub */
8313 #if HAVE_PTHREADS_D4
8314         status = pthread_detach( &t );
8315 #else
8316         status = pthread_detach( t );
8317 #endif
8318
8319 #ifdef HAVE_LINUX_THREADS
8320         pthread_kill_other_threads_np();
8321 #endif
8322
8323         exit( status );
8324
8325 }
8326
8327 EOF
8328 if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8329 then
8330   ol_cv_pthread_lpthread=yes
8331 else
8332   echo "configure: failed program was:" >&5
8333   cat conftest.$ac_ext >&5
8334   rm -fr conftest*
8335   ol_cv_pthread_lpthread=no
8336 fi
8337 rm -fr conftest*
8338 fi
8339
8340
8341                 # restore the LIBS
8342                 LIBS="$ol_LIBS"
8343         
8344 fi
8345
8346 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8347
8348         if test $ol_cv_pthread_lpthread = yes ; then
8349                 ol_link_pthreads="-lpthread"
8350                 ol_link_threads=posix
8351         fi
8352 fi
8353
8354                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8355 if test "$ol_link_threads" = no ; then
8356         # try -lc_r
8357         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8358 echo "configure:8359: checking for pthread link with -lc_r" >&5
8359 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8360   echo $ac_n "(cached) $ac_c" 1>&6
8361 else
8362   
8363                 # save the flags
8364                 ol_LIBS="$LIBS"
8365                 LIBS="-lc_r $LIBS"
8366
8367                 if test "$cross_compiling" = yes; then
8368   cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 /* pthread test headers */
8372 #include <pthread.h>
8373 #ifndef NULL
8374 #define NULL (void*)0
8375 #endif
8376
8377 static void *task(p)
8378         void *p;
8379 {
8380         return (void *) (p == NULL);
8381 }
8382
8383 int main() {
8384
8385         /* pthread test function */
8386         pthread_t t;
8387         int status;
8388
8389         /* make sure pthread_create() isn't just a stub */
8390 #if HAVE_PTHREADS_D4
8391         status = pthread_create(&t, pthread_attr_default, task, NULL);
8392 #else
8393         status = pthread_create(&t, NULL, task, NULL);
8394 #endif
8395
8396         if( status ) exit( status );
8397
8398         /* make sure pthread_detach() isn't just a stub */
8399 #if HAVE_PTHREADS_D4
8400         status = pthread_detach( &t );
8401 #else
8402         status = pthread_detach( t );
8403 #endif
8404
8405 #ifdef HAVE_LINUX_THREADS
8406         pthread_kill_other_threads_np();
8407 #endif
8408
8409         exit( status );
8410
8411 ; return 0; }
8412 EOF
8413 if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8414   rm -rf conftest*
8415   ol_cv_pthread_lc_r=yes
8416 else
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   ol_cv_pthread_lc_r=no
8421 fi
8422 rm -f conftest*
8423 else
8424   cat > conftest.$ac_ext <<EOF
8425 #line 8426 "configure"
8426 #include "confdefs.h"
8427 /* pthread test headers */
8428 #include <pthread.h>
8429 #ifndef NULL
8430 #define NULL (void*)0
8431 #endif
8432
8433 static void *task(p)
8434         void *p;
8435 {
8436         return (void *) (p == NULL);
8437 }
8438
8439
8440 int main(argc, argv)
8441         int argc;
8442         char **argv;
8443 {
8444
8445         /* pthread test function */
8446         pthread_t t;
8447         int status;
8448
8449         /* make sure pthread_create() isn't just a stub */
8450 #if HAVE_PTHREADS_D4
8451         status = pthread_create(&t, pthread_attr_default, task, NULL);
8452 #else
8453         status = pthread_create(&t, NULL, task, NULL);
8454 #endif
8455
8456         if( status ) exit( status );
8457
8458         /* make sure pthread_detach() isn't just a stub */
8459 #if HAVE_PTHREADS_D4
8460         status = pthread_detach( &t );
8461 #else
8462         status = pthread_detach( t );
8463 #endif
8464
8465 #ifdef HAVE_LINUX_THREADS
8466         pthread_kill_other_threads_np();
8467 #endif
8468
8469         exit( status );
8470
8471 }
8472
8473 EOF
8474 if { (eval echo configure:8475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8475 then
8476   ol_cv_pthread_lc_r=yes
8477 else
8478   echo "configure: failed program was:" >&5
8479   cat conftest.$ac_ext >&5
8480   rm -fr conftest*
8481   ol_cv_pthread_lc_r=no
8482 fi
8483 rm -fr conftest*
8484 fi
8485
8486
8487                 # restore the LIBS
8488                 LIBS="$ol_LIBS"
8489         
8490 fi
8491
8492 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8493
8494         if test $ol_cv_pthread_lc_r = yes ; then
8495                 ol_link_pthreads="-lc_r"
8496                 ol_link_threads=posix
8497         fi
8498 fi
8499
8500
8501                 # Pthread try link: -threads (ol_cv_pthread_threads)
8502 if test "$ol_link_threads" = no ; then
8503         # try -threads
8504         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8505 echo "configure:8506: checking for pthread link with -threads" >&5
8506 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   
8510                 # save the flags
8511                 ol_LIBS="$LIBS"
8512                 LIBS="-threads $LIBS"
8513
8514                 if test "$cross_compiling" = yes; then
8515   cat > conftest.$ac_ext <<EOF
8516 #line 8517 "configure"
8517 #include "confdefs.h"
8518 /* pthread test headers */
8519 #include <pthread.h>
8520 #ifndef NULL
8521 #define NULL (void*)0
8522 #endif
8523
8524 static void *task(p)
8525         void *p;
8526 {
8527         return (void *) (p == NULL);
8528 }
8529
8530 int main() {
8531
8532         /* pthread test function */
8533         pthread_t t;
8534         int status;
8535
8536         /* make sure pthread_create() isn't just a stub */
8537 #if HAVE_PTHREADS_D4
8538         status = pthread_create(&t, pthread_attr_default, task, NULL);
8539 #else
8540         status = pthread_create(&t, NULL, task, NULL);
8541 #endif
8542
8543         if( status ) exit( status );
8544
8545         /* make sure pthread_detach() isn't just a stub */
8546 #if HAVE_PTHREADS_D4
8547         status = pthread_detach( &t );
8548 #else
8549         status = pthread_detach( t );
8550 #endif
8551
8552 #ifdef HAVE_LINUX_THREADS
8553         pthread_kill_other_threads_np();
8554 #endif
8555
8556         exit( status );
8557
8558 ; return 0; }
8559 EOF
8560 if { (eval echo configure:8561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8561   rm -rf conftest*
8562   ol_cv_pthread_threads=yes
8563 else
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -rf conftest*
8567   ol_cv_pthread_threads=no
8568 fi
8569 rm -f conftest*
8570 else
8571   cat > conftest.$ac_ext <<EOF
8572 #line 8573 "configure"
8573 #include "confdefs.h"
8574 /* pthread test headers */
8575 #include <pthread.h>
8576 #ifndef NULL
8577 #define NULL (void*)0
8578 #endif
8579
8580 static void *task(p)
8581         void *p;
8582 {
8583         return (void *) (p == NULL);
8584 }
8585
8586
8587 int main(argc, argv)
8588         int argc;
8589         char **argv;
8590 {
8591
8592         /* pthread test function */
8593         pthread_t t;
8594         int status;
8595
8596         /* make sure pthread_create() isn't just a stub */
8597 #if HAVE_PTHREADS_D4
8598         status = pthread_create(&t, pthread_attr_default, task, NULL);
8599 #else
8600         status = pthread_create(&t, NULL, task, NULL);
8601 #endif
8602
8603         if( status ) exit( status );
8604
8605         /* make sure pthread_detach() isn't just a stub */
8606 #if HAVE_PTHREADS_D4
8607         status = pthread_detach( &t );
8608 #else
8609         status = pthread_detach( t );
8610 #endif
8611
8612 #ifdef HAVE_LINUX_THREADS
8613         pthread_kill_other_threads_np();
8614 #endif
8615
8616         exit( status );
8617
8618 }
8619
8620 EOF
8621 if { (eval echo configure:8622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8622 then
8623   ol_cv_pthread_threads=yes
8624 else
8625   echo "configure: failed program was:" >&5
8626   cat conftest.$ac_ext >&5
8627   rm -fr conftest*
8628   ol_cv_pthread_threads=no
8629 fi
8630 rm -fr conftest*
8631 fi
8632
8633
8634                 # restore the LIBS
8635                 LIBS="$ol_LIBS"
8636         
8637 fi
8638
8639 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8640
8641         if test $ol_cv_pthread_threads = yes ; then
8642                 ol_link_pthreads="-threads"
8643                 ol_link_threads=posix
8644         fi
8645 fi
8646
8647
8648                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8649 if test "$ol_link_threads" = no ; then
8650         # try -lpthreads -lmach -lexc -lc_r
8651         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8652 echo "configure:8653: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8653 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8654   echo $ac_n "(cached) $ac_c" 1>&6
8655 else
8656   
8657                 # save the flags
8658                 ol_LIBS="$LIBS"
8659                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8660
8661                 if test "$cross_compiling" = yes; then
8662   cat > conftest.$ac_ext <<EOF
8663 #line 8664 "configure"
8664 #include "confdefs.h"
8665 /* pthread test headers */
8666 #include <pthread.h>
8667 #ifndef NULL
8668 #define NULL (void*)0
8669 #endif
8670
8671 static void *task(p)
8672         void *p;
8673 {
8674         return (void *) (p == NULL);
8675 }
8676
8677 int main() {
8678
8679         /* pthread test function */
8680         pthread_t t;
8681         int status;
8682
8683         /* make sure pthread_create() isn't just a stub */
8684 #if HAVE_PTHREADS_D4
8685         status = pthread_create(&t, pthread_attr_default, task, NULL);
8686 #else
8687         status = pthread_create(&t, NULL, task, NULL);
8688 #endif
8689
8690         if( status ) exit( status );
8691
8692         /* make sure pthread_detach() isn't just a stub */
8693 #if HAVE_PTHREADS_D4
8694         status = pthread_detach( &t );
8695 #else
8696         status = pthread_detach( t );
8697 #endif
8698
8699 #ifdef HAVE_LINUX_THREADS
8700         pthread_kill_other_threads_np();
8701 #endif
8702
8703         exit( status );
8704
8705 ; return 0; }
8706 EOF
8707 if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8708   rm -rf conftest*
8709   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8710 else
8711   echo "configure: failed program was:" >&5
8712   cat conftest.$ac_ext >&5
8713   rm -rf conftest*
8714   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8715 fi
8716 rm -f conftest*
8717 else
8718   cat > conftest.$ac_ext <<EOF
8719 #line 8720 "configure"
8720 #include "confdefs.h"
8721 /* pthread test headers */
8722 #include <pthread.h>
8723 #ifndef NULL
8724 #define NULL (void*)0
8725 #endif
8726
8727 static void *task(p)
8728         void *p;
8729 {
8730         return (void *) (p == NULL);
8731 }
8732
8733
8734 int main(argc, argv)
8735         int argc;
8736         char **argv;
8737 {
8738
8739         /* pthread test function */
8740         pthread_t t;
8741         int status;
8742
8743         /* make sure pthread_create() isn't just a stub */
8744 #if HAVE_PTHREADS_D4
8745         status = pthread_create(&t, pthread_attr_default, task, NULL);
8746 #else
8747         status = pthread_create(&t, NULL, task, NULL);
8748 #endif
8749
8750         if( status ) exit( status );
8751
8752         /* make sure pthread_detach() isn't just a stub */
8753 #if HAVE_PTHREADS_D4
8754         status = pthread_detach( &t );
8755 #else
8756         status = pthread_detach( t );
8757 #endif
8758
8759 #ifdef HAVE_LINUX_THREADS
8760         pthread_kill_other_threads_np();
8761 #endif
8762
8763         exit( status );
8764
8765 }
8766
8767 EOF
8768 if { (eval echo configure:8769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8769 then
8770   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8771 else
8772   echo "configure: failed program was:" >&5
8773   cat conftest.$ac_ext >&5
8774   rm -fr conftest*
8775   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8776 fi
8777 rm -fr conftest*
8778 fi
8779
8780
8781                 # restore the LIBS
8782                 LIBS="$ol_LIBS"
8783         
8784 fi
8785
8786 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8787
8788         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8789                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8790                 ol_link_threads=posix
8791         fi
8792 fi
8793
8794                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8795 if test "$ol_link_threads" = no ; then
8796         # try -lpthreads -lmach -lexc
8797         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8798 echo "configure:8799: checking for pthread link with -lpthreads -lmach -lexc" >&5
8799 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8800   echo $ac_n "(cached) $ac_c" 1>&6
8801 else
8802   
8803                 # save the flags
8804                 ol_LIBS="$LIBS"
8805                 LIBS="-lpthreads -lmach -lexc $LIBS"
8806
8807                 if test "$cross_compiling" = yes; then
8808   cat > conftest.$ac_ext <<EOF
8809 #line 8810 "configure"
8810 #include "confdefs.h"
8811 /* pthread test headers */
8812 #include <pthread.h>
8813 #ifndef NULL
8814 #define NULL (void*)0
8815 #endif
8816
8817 static void *task(p)
8818         void *p;
8819 {
8820         return (void *) (p == NULL);
8821 }
8822
8823 int main() {
8824
8825         /* pthread test function */
8826         pthread_t t;
8827         int status;
8828
8829         /* make sure pthread_create() isn't just a stub */
8830 #if HAVE_PTHREADS_D4
8831         status = pthread_create(&t, pthread_attr_default, task, NULL);
8832 #else
8833         status = pthread_create(&t, NULL, task, NULL);
8834 #endif
8835
8836         if( status ) exit( status );
8837
8838         /* make sure pthread_detach() isn't just a stub */
8839 #if HAVE_PTHREADS_D4
8840         status = pthread_detach( &t );
8841 #else
8842         status = pthread_detach( t );
8843 #endif
8844
8845 #ifdef HAVE_LINUX_THREADS
8846         pthread_kill_other_threads_np();
8847 #endif
8848
8849         exit( status );
8850
8851 ; return 0; }
8852 EOF
8853 if { (eval echo configure:8854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8854   rm -rf conftest*
8855   ol_cv_pthread_lpthreads_lmach_lexc=yes
8856 else
8857   echo "configure: failed program was:" >&5
8858   cat conftest.$ac_ext >&5
8859   rm -rf conftest*
8860   ol_cv_pthread_lpthreads_lmach_lexc=no
8861 fi
8862 rm -f conftest*
8863 else
8864   cat > conftest.$ac_ext <<EOF
8865 #line 8866 "configure"
8866 #include "confdefs.h"
8867 /* pthread test headers */
8868 #include <pthread.h>
8869 #ifndef NULL
8870 #define NULL (void*)0
8871 #endif
8872
8873 static void *task(p)
8874         void *p;
8875 {
8876         return (void *) (p == NULL);
8877 }
8878
8879
8880 int main(argc, argv)
8881         int argc;
8882         char **argv;
8883 {
8884
8885         /* pthread test function */
8886         pthread_t t;
8887         int status;
8888
8889         /* make sure pthread_create() isn't just a stub */
8890 #if HAVE_PTHREADS_D4
8891         status = pthread_create(&t, pthread_attr_default, task, NULL);
8892 #else
8893         status = pthread_create(&t, NULL, task, NULL);
8894 #endif
8895
8896         if( status ) exit( status );
8897
8898         /* make sure pthread_detach() isn't just a stub */
8899 #if HAVE_PTHREADS_D4
8900         status = pthread_detach( &t );
8901 #else
8902         status = pthread_detach( t );
8903 #endif
8904
8905 #ifdef HAVE_LINUX_THREADS
8906         pthread_kill_other_threads_np();
8907 #endif
8908
8909         exit( status );
8910
8911 }
8912
8913 EOF
8914 if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8915 then
8916   ol_cv_pthread_lpthreads_lmach_lexc=yes
8917 else
8918   echo "configure: failed program was:" >&5
8919   cat conftest.$ac_ext >&5
8920   rm -fr conftest*
8921   ol_cv_pthread_lpthreads_lmach_lexc=no
8922 fi
8923 rm -fr conftest*
8924 fi
8925
8926
8927                 # restore the LIBS
8928                 LIBS="$ol_LIBS"
8929         
8930 fi
8931
8932 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8933
8934         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8935                 ol_link_pthreads="-lpthreads -lmach -lexc"
8936                 ol_link_threads=posix
8937         fi
8938 fi
8939
8940                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8941 if test "$ol_link_threads" = no ; then
8942         # try -lpthreads -lexc
8943         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8944 echo "configure:8945: checking for pthread link with -lpthreads -lexc" >&5
8945 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8946   echo $ac_n "(cached) $ac_c" 1>&6
8947 else
8948   
8949                 # save the flags
8950                 ol_LIBS="$LIBS"
8951                 LIBS="-lpthreads -lexc $LIBS"
8952
8953                 if test "$cross_compiling" = yes; then
8954   cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 /* pthread test headers */
8958 #include <pthread.h>
8959 #ifndef NULL
8960 #define NULL (void*)0
8961 #endif
8962
8963 static void *task(p)
8964         void *p;
8965 {
8966         return (void *) (p == NULL);
8967 }
8968
8969 int main() {
8970
8971         /* pthread test function */
8972         pthread_t t;
8973         int status;
8974
8975         /* make sure pthread_create() isn't just a stub */
8976 #if HAVE_PTHREADS_D4
8977         status = pthread_create(&t, pthread_attr_default, task, NULL);
8978 #else
8979         status = pthread_create(&t, NULL, task, NULL);
8980 #endif
8981
8982         if( status ) exit( status );
8983
8984         /* make sure pthread_detach() isn't just a stub */
8985 #if HAVE_PTHREADS_D4
8986         status = pthread_detach( &t );
8987 #else
8988         status = pthread_detach( t );
8989 #endif
8990
8991 #ifdef HAVE_LINUX_THREADS
8992         pthread_kill_other_threads_np();
8993 #endif
8994
8995         exit( status );
8996
8997 ; return 0; }
8998 EOF
8999 if { (eval echo configure:9000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9000   rm -rf conftest*
9001   ol_cv_pthread_lpthreads_lexc=yes
9002 else
9003   echo "configure: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   rm -rf conftest*
9006   ol_cv_pthread_lpthreads_lexc=no
9007 fi
9008 rm -f conftest*
9009 else
9010   cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013 /* pthread test headers */
9014 #include <pthread.h>
9015 #ifndef NULL
9016 #define NULL (void*)0
9017 #endif
9018
9019 static void *task(p)
9020         void *p;
9021 {
9022         return (void *) (p == NULL);
9023 }
9024
9025
9026 int main(argc, argv)
9027         int argc;
9028         char **argv;
9029 {
9030
9031         /* pthread test function */
9032         pthread_t t;
9033         int status;
9034
9035         /* make sure pthread_create() isn't just a stub */
9036 #if HAVE_PTHREADS_D4
9037         status = pthread_create(&t, pthread_attr_default, task, NULL);
9038 #else
9039         status = pthread_create(&t, NULL, task, NULL);
9040 #endif
9041
9042         if( status ) exit( status );
9043
9044         /* make sure pthread_detach() isn't just a stub */
9045 #if HAVE_PTHREADS_D4
9046         status = pthread_detach( &t );
9047 #else
9048         status = pthread_detach( t );
9049 #endif
9050
9051 #ifdef HAVE_LINUX_THREADS
9052         pthread_kill_other_threads_np();
9053 #endif
9054
9055         exit( status );
9056
9057 }
9058
9059 EOF
9060 if { (eval echo configure:9061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9061 then
9062   ol_cv_pthread_lpthreads_lexc=yes
9063 else
9064   echo "configure: failed program was:" >&5
9065   cat conftest.$ac_ext >&5
9066   rm -fr conftest*
9067   ol_cv_pthread_lpthreads_lexc=no
9068 fi
9069 rm -fr conftest*
9070 fi
9071
9072
9073                 # restore the LIBS
9074                 LIBS="$ol_LIBS"
9075         
9076 fi
9077
9078 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9079
9080         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9081                 ol_link_pthreads="-lpthreads -lexc"
9082                 ol_link_threads=posix
9083         fi
9084 fi
9085
9086
9087                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9088 if test "$ol_link_threads" = no ; then
9089         # try -lpthreads
9090         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9091 echo "configure:9092: checking for pthread link with -lpthreads" >&5
9092 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9093   echo $ac_n "(cached) $ac_c" 1>&6
9094 else
9095   
9096                 # save the flags
9097                 ol_LIBS="$LIBS"
9098                 LIBS="-lpthreads $LIBS"
9099
9100                 if test "$cross_compiling" = yes; then
9101   cat > conftest.$ac_ext <<EOF
9102 #line 9103 "configure"
9103 #include "confdefs.h"
9104 /* pthread test headers */
9105 #include <pthread.h>
9106 #ifndef NULL
9107 #define NULL (void*)0
9108 #endif
9109
9110 static void *task(p)
9111         void *p;
9112 {
9113         return (void *) (p == NULL);
9114 }
9115
9116 int main() {
9117
9118         /* pthread test function */
9119         pthread_t t;
9120         int status;
9121
9122         /* make sure pthread_create() isn't just a stub */
9123 #if HAVE_PTHREADS_D4
9124         status = pthread_create(&t, pthread_attr_default, task, NULL);
9125 #else
9126         status = pthread_create(&t, NULL, task, NULL);
9127 #endif
9128
9129         if( status ) exit( status );
9130
9131         /* make sure pthread_detach() isn't just a stub */
9132 #if HAVE_PTHREADS_D4
9133         status = pthread_detach( &t );
9134 #else
9135         status = pthread_detach( t );
9136 #endif
9137
9138 #ifdef HAVE_LINUX_THREADS
9139         pthread_kill_other_threads_np();
9140 #endif
9141
9142         exit( status );
9143
9144 ; return 0; }
9145 EOF
9146 if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9147   rm -rf conftest*
9148   ol_cv_pthread_lib_lpthreads=yes
9149 else
9150   echo "configure: failed program was:" >&5
9151   cat conftest.$ac_ext >&5
9152   rm -rf conftest*
9153   ol_cv_pthread_lib_lpthreads=no
9154 fi
9155 rm -f conftest*
9156 else
9157   cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 /* pthread test headers */
9161 #include <pthread.h>
9162 #ifndef NULL
9163 #define NULL (void*)0
9164 #endif
9165
9166 static void *task(p)
9167         void *p;
9168 {
9169         return (void *) (p == NULL);
9170 }
9171
9172
9173 int main(argc, argv)
9174         int argc;
9175         char **argv;
9176 {
9177
9178         /* pthread test function */
9179         pthread_t t;
9180         int status;
9181
9182         /* make sure pthread_create() isn't just a stub */
9183 #if HAVE_PTHREADS_D4
9184         status = pthread_create(&t, pthread_attr_default, task, NULL);
9185 #else
9186         status = pthread_create(&t, NULL, task, NULL);
9187 #endif
9188
9189         if( status ) exit( status );
9190
9191         /* make sure pthread_detach() isn't just a stub */
9192 #if HAVE_PTHREADS_D4
9193         status = pthread_detach( &t );
9194 #else
9195         status = pthread_detach( t );
9196 #endif
9197
9198 #ifdef HAVE_LINUX_THREADS
9199         pthread_kill_other_threads_np();
9200 #endif
9201
9202         exit( status );
9203
9204 }
9205
9206 EOF
9207 if { (eval echo configure:9208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9208 then
9209   ol_cv_pthread_lib_lpthreads=yes
9210 else
9211   echo "configure: failed program was:" >&5
9212   cat conftest.$ac_ext >&5
9213   rm -fr conftest*
9214   ol_cv_pthread_lib_lpthreads=no
9215 fi
9216 rm -fr conftest*
9217 fi
9218
9219
9220                 # restore the LIBS
9221                 LIBS="$ol_LIBS"
9222         
9223 fi
9224
9225 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9226
9227         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9228                 ol_link_pthreads="-lpthreads"
9229                 ol_link_threads=posix
9230         fi
9231 fi
9232
9233
9234                 if test $ol_link_threads != no ; then
9235                         cat >> confdefs.h <<\EOF
9236 #define HAVE_PTHREADS 1
9237 EOF
9238
9239
9240                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9241
9242                                                 save_CPPFLAGS="$CPPFLAGS"
9243                         save_LIBS="$LIBS"
9244                         LIBS="$LTHREAD_LIBS $LIBS"
9245
9246                                                                                                 for ac_func in sched_yield pthread_yield
9247 do
9248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9249 echo "configure:9250: checking for $ac_func" >&5
9250 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   cat > conftest.$ac_ext <<EOF
9254 #line 9255 "configure"
9255 #include "confdefs.h"
9256 /* System header to define __stub macros and hopefully few prototypes,
9257     which can conflict with char $ac_func(); below.  */
9258 #include <assert.h>
9259 /* Override any gcc2 internal prototype to avoid an error.  */
9260 /* We use char because int might match the return type of a gcc2
9261     builtin and then its argument prototype would still apply.  */
9262 char $ac_func();
9263 char (*f)();
9264
9265 int main() {
9266
9267 /* The GNU C library defines this for functions which it implements
9268     to always fail with ENOSYS.  Some functions are actually named
9269     something starting with __ and the normal name is an alias.  */
9270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9271 choke me
9272 #else
9273 f = $ac_func;
9274 #endif
9275
9276 ; return 0; }
9277 EOF
9278 if { (eval echo configure:9279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9279   rm -rf conftest*
9280   eval "ac_cv_func_$ac_func=yes"
9281 else
9282   echo "configure: failed program was:" >&5
9283   cat conftest.$ac_ext >&5
9284   rm -rf conftest*
9285   eval "ac_cv_func_$ac_func=no"
9286 fi
9287 rm -f conftest*
9288 fi
9289
9290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9291   echo "$ac_t""yes" 1>&6
9292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9293   cat >> confdefs.h <<EOF
9294 #define $ac_tr_func 1
9295 EOF
9296  
9297 else
9298   echo "$ac_t""no" 1>&6
9299 fi
9300 done
9301
9302
9303                         if test $ac_cv_func_sched_yield = no -a \
9304                                 $ac_cv_func_pthread_yield = no ; then
9305                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9306 echo "configure:9307: checking for sched_yield in -lrt" >&5
9307 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9309   echo $ac_n "(cached) $ac_c" 1>&6
9310 else
9311   ac_save_LIBS="$LIBS"
9312 LIBS="-lrt  $LIBS"
9313 cat > conftest.$ac_ext <<EOF
9314 #line 9315 "configure"
9315 #include "confdefs.h"
9316 /* Override any gcc2 internal prototype to avoid an error.  */
9317 /* We use char because int might match the return type of a gcc2
9318     builtin and then its argument prototype would still apply.  */
9319 char sched_yield();
9320
9321 int main() {
9322 sched_yield()
9323 ; return 0; }
9324 EOF
9325 if { (eval echo configure:9326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9326   rm -rf conftest*
9327   eval "ac_cv_lib_$ac_lib_var=yes"
9328 else
9329   echo "configure: failed program was:" >&5
9330   cat conftest.$ac_ext >&5
9331   rm -rf conftest*
9332   eval "ac_cv_lib_$ac_lib_var=no"
9333 fi
9334 rm -f conftest*
9335 LIBS="$ac_save_LIBS"
9336
9337 fi
9338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9339   echo "$ac_t""yes" 1>&6
9340   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9341                                         cat >> confdefs.h <<\EOF
9342 #define HAVE_SCHED_YIELD 1
9343 EOF
9344
9345                                         ac_cv_func_sched_yield=yes
9346 else
9347   echo "$ac_t""no" 1>&6
9348 ac_cv_func_sched_yield=no
9349 fi
9350
9351                         fi
9352                         if test $ac_cv_func_sched_yield = no -a \
9353                                 $ac_cv_func_pthread_yield = no ; then
9354                                                                                                 for ac_func in thr_yield
9355 do
9356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9357 echo "configure:9358: checking for $ac_func" >&5
9358 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364 /* System header to define __stub macros and hopefully few prototypes,
9365     which can conflict with char $ac_func(); below.  */
9366 #include <assert.h>
9367 /* Override any gcc2 internal prototype to avoid an error.  */
9368 /* We use char because int might match the return type of a gcc2
9369     builtin and then its argument prototype would still apply.  */
9370 char $ac_func();
9371 char (*f)();
9372
9373 int main() {
9374
9375 /* The GNU C library defines this for functions which it implements
9376     to always fail with ENOSYS.  Some functions are actually named
9377     something starting with __ and the normal name is an alias.  */
9378 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9379 choke me
9380 #else
9381 f = $ac_func;
9382 #endif
9383
9384 ; return 0; }
9385 EOF
9386 if { (eval echo configure:9387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9387   rm -rf conftest*
9388   eval "ac_cv_func_$ac_func=yes"
9389 else
9390   echo "configure: failed program was:" >&5
9391   cat conftest.$ac_ext >&5
9392   rm -rf conftest*
9393   eval "ac_cv_func_$ac_func=no"
9394 fi
9395 rm -f conftest*
9396 fi
9397
9398 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9399   echo "$ac_t""yes" 1>&6
9400     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9401   cat >> confdefs.h <<EOF
9402 #define $ac_tr_func 1
9403 EOF
9404  
9405 else
9406   echo "$ac_t""no" 1>&6
9407 fi
9408 done
9409
9410                         fi
9411                         if test $ac_cv_func_sched_yield = no -a \
9412                                 $ac_cv_func_pthread_yield = no -a \
9413                                 "$ac_cv_func_thr_yield" = no ; then
9414                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9415                         fi
9416
9417                                                 for ac_func in pthread_kill
9418 do
9419 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9420 echo "configure:9421: checking for $ac_func" >&5
9421 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9422   echo $ac_n "(cached) $ac_c" 1>&6
9423 else
9424   cat > conftest.$ac_ext <<EOF
9425 #line 9426 "configure"
9426 #include "confdefs.h"
9427 /* System header to define __stub macros and hopefully few prototypes,
9428     which can conflict with char $ac_func(); below.  */
9429 #include <assert.h>
9430 /* Override any gcc2 internal prototype to avoid an error.  */
9431 /* We use char because int might match the return type of a gcc2
9432     builtin and then its argument prototype would still apply.  */
9433 char $ac_func();
9434 char (*f)();
9435
9436 int main() {
9437
9438 /* The GNU C library defines this for functions which it implements
9439     to always fail with ENOSYS.  Some functions are actually named
9440     something starting with __ and the normal name is an alias.  */
9441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9442 choke me
9443 #else
9444 f = $ac_func;
9445 #endif
9446
9447 ; return 0; }
9448 EOF
9449 if { (eval echo configure:9450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9450   rm -rf conftest*
9451   eval "ac_cv_func_$ac_func=yes"
9452 else
9453   echo "configure: failed program was:" >&5
9454   cat conftest.$ac_ext >&5
9455   rm -rf conftest*
9456   eval "ac_cv_func_$ac_func=no"
9457 fi
9458 rm -f conftest*
9459 fi
9460
9461 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9462   echo "$ac_t""yes" 1>&6
9463     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9464   cat >> confdefs.h <<EOF
9465 #define $ac_tr_func 1
9466 EOF
9467  
9468 else
9469   echo "$ac_t""no" 1>&6
9470 fi
9471 done
9472
9473
9474                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9475 echo "configure:9476: checking for pthread_detach with <pthread.h>" >&5
9476 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9477   echo $ac_n "(cached) $ac_c" 1>&6
9478 else
9479   
9480                                                                 cat > conftest.$ac_ext <<EOF
9481 #line 9482 "configure"
9482 #include "confdefs.h"
9483
9484 #include <pthread.h>
9485 #ifndef NULL
9486 #define NULL (void*)0
9487 #endif
9488
9489 int main() {
9490 pthread_detach(NULL);
9491 ; return 0; }
9492 EOF
9493 if { (eval echo configure:9494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9494   rm -rf conftest*
9495   ol_cv_func_pthread_detach=yes
9496 else
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -rf conftest*
9500   ol_cv_func_pthread_detach=no
9501 fi
9502 rm -f conftest*
9503                         
9504 fi
9505
9506 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9507
9508                         if test $ol_cv_func_pthread_detach = no ; then
9509                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9510                         fi
9511
9512                         cat >> confdefs.h <<\EOF
9513 #define HAVE_PTHREAD_DETACH 1
9514 EOF
9515
9516
9517                                                 for ac_func in \
9518                                 pthread_setconcurrency \
9519                                 pthread_getconcurrency \
9520                                 thr_setconcurrency \
9521                                 thr_getconcurrency \
9522                         
9523 do
9524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9525 echo "configure:9526: checking for $ac_func" >&5
9526 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529   cat > conftest.$ac_ext <<EOF
9530 #line 9531 "configure"
9531 #include "confdefs.h"
9532 /* System header to define __stub macros and hopefully few prototypes,
9533     which can conflict with char $ac_func(); below.  */
9534 #include <assert.h>
9535 /* Override any gcc2 internal prototype to avoid an error.  */
9536 /* We use char because int might match the return type of a gcc2
9537     builtin and then its argument prototype would still apply.  */
9538 char $ac_func();
9539 char (*f)();
9540
9541 int main() {
9542
9543 /* The GNU C library defines this for functions which it implements
9544     to always fail with ENOSYS.  Some functions are actually named
9545     something starting with __ and the normal name is an alias.  */
9546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9547 choke me
9548 #else
9549 f = $ac_func;
9550 #endif
9551
9552 ; return 0; }
9553 EOF
9554 if { (eval echo configure:9555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9555   rm -rf conftest*
9556   eval "ac_cv_func_$ac_func=yes"
9557 else
9558   echo "configure: failed program was:" >&5
9559   cat conftest.$ac_ext >&5
9560   rm -rf conftest*
9561   eval "ac_cv_func_$ac_func=no"
9562 fi
9563 rm -f conftest*
9564 fi
9565
9566 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9567   echo "$ac_t""yes" 1>&6
9568     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9569   cat >> confdefs.h <<EOF
9570 #define $ac_tr_func 1
9571 EOF
9572  
9573 else
9574   echo "$ac_t""no" 1>&6
9575 fi
9576 done
9577
9578
9579                         
9580         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9581 echo "configure:9582: checking for pthread_kill_other_threads_np" >&5
9582 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9583   echo $ac_n "(cached) $ac_c" 1>&6
9584 else
9585   cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 /* System header to define __stub macros and hopefully few prototypes,
9589     which can conflict with char pthread_kill_other_threads_np(); below.  */
9590 #include <assert.h>
9591 /* Override any gcc2 internal prototype to avoid an error.  */
9592 /* We use char because int might match the return type of a gcc2
9593     builtin and then its argument prototype would still apply.  */
9594 char pthread_kill_other_threads_np();
9595 char (*f)();
9596
9597 int main() {
9598
9599 /* The GNU C library defines this for functions which it implements
9600     to always fail with ENOSYS.  Some functions are actually named
9601     something starting with __ and the normal name is an alias.  */
9602 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9603 choke me
9604 #else
9605 f = pthread_kill_other_threads_np;
9606 #endif
9607
9608 ; return 0; }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9611   rm -rf conftest*
9612   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9618 fi
9619 rm -f conftest*
9620 fi
9621
9622 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9623   echo "$ac_t""yes" 1>&6
9624   :
9625 else
9626   echo "$ac_t""no" 1>&6
9627 fi
9628
9629         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9630 echo "configure:9631: checking for LinuxThreads implementation" >&5
9631 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9632   echo $ac_n "(cached) $ac_c" 1>&6
9633 else
9634   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9635 fi
9636
9637 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9638
9639                         
9640         
9641         
9642         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9643 echo "configure:9644: checking for LinuxThreads consistency" >&5
9644 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9645   echo $ac_n "(cached) $ac_c" 1>&6
9646 else
9647   
9648                 if test $ol_cv_header_linux_threads = yes -a \
9649                         $ol_cv_sys_linux_threads = yes; then
9650                         ol_cv_linux_threads=yes
9651                 elif test $ol_cv_header_linux_threads = no -a \
9652                         $ol_cv_sys_linux_threads = no; then
9653                         ol_cv_linux_threads=no
9654                 else
9655                         ol_cv_linux_threads=error
9656                 fi
9657         
9658 fi
9659
9660 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9661
9662
9663                         if test $ol_cv_linux_threads = error; then
9664                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9665                         fi
9666
9667                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9668 echo "configure:9669: checking if pthread_create() works" >&5
9669 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9670   echo $ac_n "(cached) $ac_c" 1>&6
9671 else
9672   
9673                         if test "$cross_compiling" = yes; then
9674                                 ol_cv_pthread_create_works=yes
9675 else
9676   cat > conftest.$ac_ext <<EOF
9677 #line 9678 "configure"
9678 #include "confdefs.h"
9679 /* pthread test headers */
9680 #include <pthread.h>
9681 #ifndef NULL
9682 #define NULL (void*)0
9683 #endif
9684
9685 static void *task(p)
9686         void *p;
9687 {
9688         return (void *) (p == NULL);
9689 }
9690
9691
9692 int main(argc, argv)
9693         int argc;
9694         char **argv;
9695 {
9696
9697         /* pthread test function */
9698         pthread_t t;
9699         int status;
9700
9701         /* make sure pthread_create() isn't just a stub */
9702 #if HAVE_PTHREADS_D4
9703         status = pthread_create(&t, pthread_attr_default, task, NULL);
9704 #else
9705         status = pthread_create(&t, NULL, task, NULL);
9706 #endif
9707
9708         if( status ) exit( status );
9709
9710         /* make sure pthread_detach() isn't just a stub */
9711 #if HAVE_PTHREADS_D4
9712         status = pthread_detach( &t );
9713 #else
9714         status = pthread_detach( t );
9715 #endif
9716
9717 #ifdef HAVE_LINUX_THREADS
9718         pthread_kill_other_threads_np();
9719 #endif
9720
9721         exit( status );
9722
9723 }
9724
9725 EOF
9726 if { (eval echo configure:9727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9727 then
9728   ol_cv_pthread_create_works=yes
9729 else
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732   rm -fr conftest*
9733   ol_cv_pthread_create_works=no
9734 fi
9735 rm -fr conftest*
9736 fi
9737
9738 fi
9739
9740 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9741
9742                         if test $ol_cv_pthread_create_works = no ; then
9743                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9744                         fi
9745
9746                                                 if test $ol_with_yielding_select = auto ; then
9747                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9748 echo "configure:9749: checking if select yields when using pthreads" >&5
9749 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9750   echo $ac_n "(cached) $ac_c" 1>&6
9751 else
9752   
9753                                 if test "$cross_compiling" = yes; then
9754   ol_cv_pthread_select_yields=cross
9755 else
9756   cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759
9760 #include <sys/types.h>
9761 #include <sys/time.h>
9762 #include <unistd.h>
9763 #include <pthread.h>
9764 #ifndef NULL
9765 #define NULL (void*) 0
9766 #endif
9767
9768 static int fildes[2];
9769
9770 static void *task(p)
9771         void *p;
9772 {
9773         int i;
9774         struct timeval tv;
9775
9776         fd_set rfds;
9777
9778         tv.tv_sec=10;
9779         tv.tv_usec=0;
9780
9781         FD_ZERO(&rfds);
9782         FD_SET(fildes[0], &rfds);
9783
9784         /* we're not interested in any fds */
9785         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9786
9787         if(i < 0) {
9788                 perror("select");
9789                 exit(10);
9790         }
9791
9792         exit(0); /* if we exit here, the select blocked the whole process */
9793 }
9794
9795 int main(argc, argv)
9796         int argc;
9797         char **argv;
9798 {
9799         pthread_t t;
9800
9801         /* create a pipe to select */
9802         if(pipe(&fildes[0])) {
9803                 perror("select");
9804                 exit(1);
9805         }
9806
9807 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9808         (void) pthread_setconcurrency(2);
9809 #else
9810 #ifdef HAVE_THR_SETCONCURRENCY
9811         /* Set Solaris LWP concurrency to 2 */
9812         thr_setconcurrency(2);
9813 #endif
9814 #endif
9815
9816 #if HAVE_PTHREADS_D4
9817         pthread_create(&t, pthread_attr_default, task, NULL);
9818 #else
9819         pthread_create(&t, NULL, task, NULL);
9820 #endif
9821
9822 #if HAVE_SCHED_YIELD
9823         sched_yield();  /* make sure task runs first */
9824 #else
9825 #ifdef HAVE_PTHREAD_YIELD
9826         pthread_yield();        /* make sure task runs first */
9827 #endif
9828 #endif
9829
9830         exit(2);
9831 }
9832 EOF
9833 if { (eval echo configure:9834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9834 then
9835   ol_cv_pthread_select_yields=no
9836 else
9837   echo "configure: failed program was:" >&5
9838   cat conftest.$ac_ext >&5
9839   rm -fr conftest*
9840   ol_cv_pthread_select_yields=yes
9841 fi
9842 rm -fr conftest*
9843 fi
9844
9845 fi
9846
9847 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9848
9849                                 if test $ol_cv_pthread_select_yields = cross ; then
9850                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9851                                 fi
9852
9853                                 if test $ol_cv_pthread_select_yields = yes ; then
9854                                         ol_with_yielding_select=yes
9855                                 fi
9856                         fi
9857
9858                                                 CPPFLAGS="$save_CPPFLAGS"
9859                         LIBS="$save_LIBS"
9860                 else
9861                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9862                 fi
9863         fi
9864
9865         if test $ol_with_threads = posix ; then
9866                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9867         fi
9868 fi
9869
9870 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9871         -o $ol_with_threads = mach ; then
9872
9873                 for ac_hdr in mach/cthreads.h
9874 do
9875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9877 echo "configure:9878: checking for $ac_hdr" >&5
9878 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9879   echo $ac_n "(cached) $ac_c" 1>&6
9880 else
9881   cat > conftest.$ac_ext <<EOF
9882 #line 9883 "configure"
9883 #include "confdefs.h"
9884 #include <$ac_hdr>
9885 EOF
9886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9887 { (eval echo configure:9888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9889 if test -z "$ac_err"; then
9890   rm -rf conftest*
9891   eval "ac_cv_header_$ac_safe=yes"
9892 else
9893   echo "$ac_err" >&5
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   eval "ac_cv_header_$ac_safe=no"
9898 fi
9899 rm -f conftest*
9900 fi
9901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9902   echo "$ac_t""yes" 1>&6
9903     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9904   cat >> confdefs.h <<EOF
9905 #define $ac_tr_hdr 1
9906 EOF
9907  
9908 else
9909   echo "$ac_t""no" 1>&6
9910 fi
9911 done
9912
9913         if test $ac_cv_header_mach_cthreads_h = yes ; then
9914                 ol_with_threads=found
9915
9916                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9917 echo "configure:9918: checking for cthread_fork" >&5
9918 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9919   echo $ac_n "(cached) $ac_c" 1>&6
9920 else
9921   cat > conftest.$ac_ext <<EOF
9922 #line 9923 "configure"
9923 #include "confdefs.h"
9924 /* System header to define __stub macros and hopefully few prototypes,
9925     which can conflict with char cthread_fork(); below.  */
9926 #include <assert.h>
9927 /* Override any gcc2 internal prototype to avoid an error.  */
9928 /* We use char because int might match the return type of a gcc2
9929     builtin and then its argument prototype would still apply.  */
9930 char cthread_fork();
9931 char (*f)();
9932
9933 int main() {
9934
9935 /* The GNU C library defines this for functions which it implements
9936     to always fail with ENOSYS.  Some functions are actually named
9937     something starting with __ and the normal name is an alias.  */
9938 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9939 choke me
9940 #else
9941 f = cthread_fork;
9942 #endif
9943
9944 ; return 0; }
9945 EOF
9946 if { (eval echo configure:9947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9947   rm -rf conftest*
9948   eval "ac_cv_func_cthread_fork=yes"
9949 else
9950   echo "configure: failed program was:" >&5
9951   cat conftest.$ac_ext >&5
9952   rm -rf conftest*
9953   eval "ac_cv_func_cthread_fork=no"
9954 fi
9955 rm -f conftest*
9956 fi
9957
9958 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9959   echo "$ac_t""yes" 1>&6
9960   ol_link_threads=yes
9961 else
9962   echo "$ac_t""no" 1>&6
9963 fi
9964
9965
9966                 if test $ol_link_threads = no ; then
9967                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9968 echo "configure:9969: checking for cthread_fork with -all_load" >&5
9969 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9970   echo $ac_n "(cached) $ac_c" 1>&6
9971 else
9972   
9973                                                                 save_LIBS="$LIBS"
9974                                 LIBS="-all_load $LIBS"
9975                                 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 #include <mach/cthreads.h>
9979 int main() {
9980
9981                                         cthread_fork((void *)0, (void *)0);
9982                                         
9983 ; return 0; }
9984 EOF
9985 if { (eval echo configure:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9986   rm -rf conftest*
9987   ol_cv_cthread_all_load=yes
9988 else
9989   echo "configure: failed program was:" >&5
9990   cat conftest.$ac_ext >&5
9991   rm -rf conftest*
9992   ol_cv_cthread_all_load=no
9993 fi
9994 rm -f conftest*
9995                                                                 LIBS="$save_LIBS"
9996                         
9997 fi
9998
9999 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10000
10001                         if test $ol_cv_cthread_all_load = yes ; then
10002                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10003                                 ol_link_threads=mach
10004                         fi
10005                 fi
10006
10007                 if test $ol_link_threads != no ; then
10008                         : check for cthread specific functionality here
10009                         cat >> confdefs.h <<\EOF
10010 #define HAVE_MACH_CTHREADS 1
10011 EOF
10012
10013                 else
10014                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10015                 fi
10016         fi
10017
10018         if test $ol_with_threads = mach ; then
10019                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10020         fi
10021 fi
10022
10023 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10024         -o $ol_with_threads = pth ; then
10025
10026         for ac_hdr in pth.h
10027 do
10028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10030 echo "configure:10031: checking for $ac_hdr" >&5
10031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10032   echo $ac_n "(cached) $ac_c" 1>&6
10033 else
10034   cat > conftest.$ac_ext <<EOF
10035 #line 10036 "configure"
10036 #include "confdefs.h"
10037 #include <$ac_hdr>
10038 EOF
10039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10040 { (eval echo configure:10041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10042 if test -z "$ac_err"; then
10043   rm -rf conftest*
10044   eval "ac_cv_header_$ac_safe=yes"
10045 else
10046   echo "$ac_err" >&5
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   eval "ac_cv_header_$ac_safe=no"
10051 fi
10052 rm -f conftest*
10053 fi
10054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10055   echo "$ac_t""yes" 1>&6
10056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10057   cat >> confdefs.h <<EOF
10058 #define $ac_tr_hdr 1
10059 EOF
10060  
10061 else
10062   echo "$ac_t""no" 1>&6
10063 fi
10064 done
10065
10066
10067         if test $ac_cv_header_pth_h = yes ; then
10068                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10069 echo "configure:10070: checking for pth_version in -lpth" >&5
10070 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10072   echo $ac_n "(cached) $ac_c" 1>&6
10073 else
10074   ac_save_LIBS="$LIBS"
10075 LIBS="-lpth  $LIBS"
10076 cat > conftest.$ac_ext <<EOF
10077 #line 10078 "configure"
10078 #include "confdefs.h"
10079 /* Override any gcc2 internal prototype to avoid an error.  */
10080 /* We use char because int might match the return type of a gcc2
10081     builtin and then its argument prototype would still apply.  */
10082 char pth_version();
10083
10084 int main() {
10085 pth_version()
10086 ; return 0; }
10087 EOF
10088 if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10089   rm -rf conftest*
10090   eval "ac_cv_lib_$ac_lib_var=yes"
10091 else
10092   echo "configure: failed program was:" >&5
10093   cat conftest.$ac_ext >&5
10094   rm -rf conftest*
10095   eval "ac_cv_lib_$ac_lib_var=no"
10096 fi
10097 rm -f conftest*
10098 LIBS="$ac_save_LIBS"
10099
10100 fi
10101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10102   echo "$ac_t""yes" 1>&6
10103   have_pth=yes
10104 else
10105   echo "$ac_t""no" 1>&6
10106 have_pth=no
10107 fi
10108
10109
10110                 if test $have_pth = yes ; then
10111                         cat >> confdefs.h <<\EOF
10112 #define HAVE_GNU_PTH 1
10113 EOF
10114
10115                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10116                         ol_link_threads=pth
10117
10118                         if test $ol_with_yielding_select = auto ; then
10119                                 ol_with_yielding_select=yes
10120                         fi
10121                 fi
10122         fi
10123 fi
10124
10125 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10126         -o $ol_with_threads = lwp ; then
10127
10128                 for ac_hdr in thread.h synch.h
10129 do
10130 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10131 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10132 echo "configure:10133: checking for $ac_hdr" >&5
10133 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10134   echo $ac_n "(cached) $ac_c" 1>&6
10135 else
10136   cat > conftest.$ac_ext <<EOF
10137 #line 10138 "configure"
10138 #include "confdefs.h"
10139 #include <$ac_hdr>
10140 EOF
10141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10142 { (eval echo configure:10143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10144 if test -z "$ac_err"; then
10145   rm -rf conftest*
10146   eval "ac_cv_header_$ac_safe=yes"
10147 else
10148   echo "$ac_err" >&5
10149   echo "configure: failed program was:" >&5
10150   cat conftest.$ac_ext >&5
10151   rm -rf conftest*
10152   eval "ac_cv_header_$ac_safe=no"
10153 fi
10154 rm -f conftest*
10155 fi
10156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10157   echo "$ac_t""yes" 1>&6
10158     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10159   cat >> confdefs.h <<EOF
10160 #define $ac_tr_hdr 1
10161 EOF
10162  
10163 else
10164   echo "$ac_t""no" 1>&6
10165 fi
10166 done
10167
10168         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10169                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10170 echo "configure:10171: checking for thr_create in -lthread" >&5
10171 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10172 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10173   echo $ac_n "(cached) $ac_c" 1>&6
10174 else
10175   ac_save_LIBS="$LIBS"
10176 LIBS="-lthread  $LIBS"
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 /* Override any gcc2 internal prototype to avoid an error.  */
10181 /* We use char because int might match the return type of a gcc2
10182     builtin and then its argument prototype would still apply.  */
10183 char thr_create();
10184
10185 int main() {
10186 thr_create()
10187 ; return 0; }
10188 EOF
10189 if { (eval echo configure:10190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=yes"
10192 else
10193   echo "configure: failed program was:" >&5
10194   cat conftest.$ac_ext >&5
10195   rm -rf conftest*
10196   eval "ac_cv_lib_$ac_lib_var=no"
10197 fi
10198 rm -f conftest*
10199 LIBS="$ac_save_LIBS"
10200
10201 fi
10202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10203   echo "$ac_t""yes" 1>&6
10204   have_thr=yes
10205 else
10206   echo "$ac_t""no" 1>&6
10207 have_thr=no
10208 fi
10209
10210
10211                 if test $have_thr = yes ; then
10212                         cat >> confdefs.h <<\EOF
10213 #define HAVE_THR 1
10214 EOF
10215
10216                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10217                         ol_link_threads=thr
10218
10219                         if test $ol_with_yielding_select = auto ; then
10220                                 ol_with_yielding_select=yes
10221                         fi
10222
10223                                                 for ac_func in \
10224                                 thr_setconcurrency \
10225                                 thr_getconcurrency \
10226                         
10227 do
10228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10229 echo "configure:10230: checking for $ac_func" >&5
10230 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10231   echo $ac_n "(cached) $ac_c" 1>&6
10232 else
10233   cat > conftest.$ac_ext <<EOF
10234 #line 10235 "configure"
10235 #include "confdefs.h"
10236 /* System header to define __stub macros and hopefully few prototypes,
10237     which can conflict with char $ac_func(); below.  */
10238 #include <assert.h>
10239 /* Override any gcc2 internal prototype to avoid an error.  */
10240 /* We use char because int might match the return type of a gcc2
10241     builtin and then its argument prototype would still apply.  */
10242 char $ac_func();
10243 char (*f)();
10244
10245 int main() {
10246
10247 /* The GNU C library defines this for functions which it implements
10248     to always fail with ENOSYS.  Some functions are actually named
10249     something starting with __ and the normal name is an alias.  */
10250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10251 choke me
10252 #else
10253 f = $ac_func;
10254 #endif
10255
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10259   rm -rf conftest*
10260   eval "ac_cv_func_$ac_func=yes"
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   eval "ac_cv_func_$ac_func=no"
10266 fi
10267 rm -f conftest*
10268 fi
10269
10270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10271   echo "$ac_t""yes" 1>&6
10272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10273   cat >> confdefs.h <<EOF
10274 #define $ac_tr_func 1
10275 EOF
10276  
10277 else
10278   echo "$ac_t""no" 1>&6
10279 fi
10280 done
10281
10282                 fi
10283         fi
10284
10285                 for ac_hdr in lwp/lwp.h
10286 do
10287 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10288 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10289 echo "configure:10290: checking for $ac_hdr" >&5
10290 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10291   echo $ac_n "(cached) $ac_c" 1>&6
10292 else
10293   cat > conftest.$ac_ext <<EOF
10294 #line 10295 "configure"
10295 #include "confdefs.h"
10296 #include <$ac_hdr>
10297 EOF
10298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10299 { (eval echo configure:10300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10301 if test -z "$ac_err"; then
10302   rm -rf conftest*
10303   eval "ac_cv_header_$ac_safe=yes"
10304 else
10305   echo "$ac_err" >&5
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   eval "ac_cv_header_$ac_safe=no"
10310 fi
10311 rm -f conftest*
10312 fi
10313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10314   echo "$ac_t""yes" 1>&6
10315     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10316   cat >> confdefs.h <<EOF
10317 #define $ac_tr_hdr 1
10318 EOF
10319  
10320 else
10321   echo "$ac_t""no" 1>&6
10322 fi
10323 done
10324
10325         if test $ac_cv_header_lwp_lwp_h = yes ; then
10326                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10327 echo "configure:10328: checking for lwp_create in -llwp" >&5
10328 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10329 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10330   echo $ac_n "(cached) $ac_c" 1>&6
10331 else
10332   ac_save_LIBS="$LIBS"
10333 LIBS="-llwp  $LIBS"
10334 cat > conftest.$ac_ext <<EOF
10335 #line 10336 "configure"
10336 #include "confdefs.h"
10337 /* Override any gcc2 internal prototype to avoid an error.  */
10338 /* We use char because int might match the return type of a gcc2
10339     builtin and then its argument prototype would still apply.  */
10340 char lwp_create();
10341
10342 int main() {
10343 lwp_create()
10344 ; return 0; }
10345 EOF
10346 if { (eval echo configure:10347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10347   rm -rf conftest*
10348   eval "ac_cv_lib_$ac_lib_var=yes"
10349 else
10350   echo "configure: failed program was:" >&5
10351   cat conftest.$ac_ext >&5
10352   rm -rf conftest*
10353   eval "ac_cv_lib_$ac_lib_var=no"
10354 fi
10355 rm -f conftest*
10356 LIBS="$ac_save_LIBS"
10357
10358 fi
10359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10360   echo "$ac_t""yes" 1>&6
10361   have_lwp=yes
10362 else
10363   echo "$ac_t""no" 1>&6
10364 have_lwp=no
10365 fi
10366
10367
10368                 if test $have_lwp = yes ; then
10369                         cat >> confdefs.h <<\EOF
10370 #define HAVE_LWP 1
10371 EOF
10372
10373                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10374                         ol_link_threads=lwp
10375
10376                         if test $ol_with_yielding_select = auto ; then
10377                                 ol_with_yielding_select=no
10378                         fi
10379                 fi
10380         fi
10381 fi
10382
10383 if test $ol_with_yielding_select = yes ; then
10384         cat >> confdefs.h <<\EOF
10385 #define HAVE_YIELDING_SELECT 1
10386 EOF
10387
10388 fi
10389
10390 if test $ol_with_threads = manual ; then
10391                 ol_link_threads=yes
10392
10393         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10394
10395         for ac_hdr in pthread.h sched.h
10396 do
10397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10399 echo "configure:10400: checking for $ac_hdr" >&5
10400 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406 #include <$ac_hdr>
10407 EOF
10408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10409 { (eval echo configure:10410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10411 if test -z "$ac_err"; then
10412   rm -rf conftest*
10413   eval "ac_cv_header_$ac_safe=yes"
10414 else
10415   echo "$ac_err" >&5
10416   echo "configure: failed program was:" >&5
10417   cat conftest.$ac_ext >&5
10418   rm -rf conftest*
10419   eval "ac_cv_header_$ac_safe=no"
10420 fi
10421 rm -f conftest*
10422 fi
10423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10424   echo "$ac_t""yes" 1>&6
10425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10426   cat >> confdefs.h <<EOF
10427 #define $ac_tr_hdr 1
10428 EOF
10429  
10430 else
10431   echo "$ac_t""no" 1>&6
10432 fi
10433 done
10434
10435         for ac_func in sched_yield pthread_yield
10436 do
10437 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10438 echo "configure:10439: checking for $ac_func" >&5
10439 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10440   echo $ac_n "(cached) $ac_c" 1>&6
10441 else
10442   cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445 /* System header to define __stub macros and hopefully few prototypes,
10446     which can conflict with char $ac_func(); below.  */
10447 #include <assert.h>
10448 /* Override any gcc2 internal prototype to avoid an error.  */
10449 /* We use char because int might match the return type of a gcc2
10450     builtin and then its argument prototype would still apply.  */
10451 char $ac_func();
10452 char (*f)();
10453
10454 int main() {
10455
10456 /* The GNU C library defines this for functions which it implements
10457     to always fail with ENOSYS.  Some functions are actually named
10458     something starting with __ and the normal name is an alias.  */
10459 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10460 choke me
10461 #else
10462 f = $ac_func;
10463 #endif
10464
10465 ; return 0; }
10466 EOF
10467 if { (eval echo configure:10468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10468   rm -rf conftest*
10469   eval "ac_cv_func_$ac_func=yes"
10470 else
10471   echo "configure: failed program was:" >&5
10472   cat conftest.$ac_ext >&5
10473   rm -rf conftest*
10474   eval "ac_cv_func_$ac_func=no"
10475 fi
10476 rm -f conftest*
10477 fi
10478
10479 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10480   echo "$ac_t""yes" 1>&6
10481     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10482   cat >> confdefs.h <<EOF
10483 #define $ac_tr_func 1
10484 EOF
10485  
10486 else
10487   echo "$ac_t""no" 1>&6
10488 fi
10489 done
10490
10491         
10492         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10493 echo "configure:10494: checking for LinuxThreads pthread.h" >&5
10494 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10495   echo $ac_n "(cached) $ac_c" 1>&6
10496 else
10497   cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500 #include <pthread.h>
10501 EOF
10502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10503   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10504   rm -rf conftest*
10505   ol_cv_header_linux_threads=yes
10506 else
10507   rm -rf conftest*
10508   ol_cv_header_linux_threads=no
10509 fi
10510 rm -f conftest*
10511
10512                 
10513 fi
10514
10515 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10516         if test $ol_cv_header_linux_threads = yes; then
10517                 cat >> confdefs.h <<\EOF
10518 #define HAVE_LINUX_THREADS 1
10519 EOF
10520
10521         fi
10522
10523
10524         for ac_hdr in mach/cthreads.h
10525 do
10526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10528 echo "configure:10529: checking for $ac_hdr" >&5
10529 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10530   echo $ac_n "(cached) $ac_c" 1>&6
10531 else
10532   cat > conftest.$ac_ext <<EOF
10533 #line 10534 "configure"
10534 #include "confdefs.h"
10535 #include <$ac_hdr>
10536 EOF
10537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10538 { (eval echo configure:10539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10540 if test -z "$ac_err"; then
10541   rm -rf conftest*
10542   eval "ac_cv_header_$ac_safe=yes"
10543 else
10544   echo "$ac_err" >&5
10545   echo "configure: failed program was:" >&5
10546   cat conftest.$ac_ext >&5
10547   rm -rf conftest*
10548   eval "ac_cv_header_$ac_safe=no"
10549 fi
10550 rm -f conftest*
10551 fi
10552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10553   echo "$ac_t""yes" 1>&6
10554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10555   cat >> confdefs.h <<EOF
10556 #define $ac_tr_hdr 1
10557 EOF
10558  
10559 else
10560   echo "$ac_t""no" 1>&6
10561 fi
10562 done
10563
10564         for ac_hdr in lwp/lwp.h
10565 do
10566 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10567 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10568 echo "configure:10569: checking for $ac_hdr" >&5
10569 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10570   echo $ac_n "(cached) $ac_c" 1>&6
10571 else
10572   cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575 #include <$ac_hdr>
10576 EOF
10577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10578 { (eval echo configure:10579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10580 if test -z "$ac_err"; then
10581   rm -rf conftest*
10582   eval "ac_cv_header_$ac_safe=yes"
10583 else
10584   echo "$ac_err" >&5
10585   echo "configure: failed program was:" >&5
10586   cat conftest.$ac_ext >&5
10587   rm -rf conftest*
10588   eval "ac_cv_header_$ac_safe=no"
10589 fi
10590 rm -f conftest*
10591 fi
10592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10593   echo "$ac_t""yes" 1>&6
10594     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10595   cat >> confdefs.h <<EOF
10596 #define $ac_tr_hdr 1
10597 EOF
10598  
10599 else
10600   echo "$ac_t""no" 1>&6
10601 fi
10602 done
10603
10604         for ac_hdr in thread.h synch.h
10605 do
10606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10608 echo "configure:10609: checking for $ac_hdr" >&5
10609 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10610   echo $ac_n "(cached) $ac_c" 1>&6
10611 else
10612   cat > conftest.$ac_ext <<EOF
10613 #line 10614 "configure"
10614 #include "confdefs.h"
10615 #include <$ac_hdr>
10616 EOF
10617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10618 { (eval echo configure:10619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10620 if test -z "$ac_err"; then
10621   rm -rf conftest*
10622   eval "ac_cv_header_$ac_safe=yes"
10623 else
10624   echo "$ac_err" >&5
10625   echo "configure: failed program was:" >&5
10626   cat conftest.$ac_ext >&5
10627   rm -rf conftest*
10628   eval "ac_cv_header_$ac_safe=no"
10629 fi
10630 rm -f conftest*
10631 fi
10632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10633   echo "$ac_t""yes" 1>&6
10634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10635   cat >> confdefs.h <<EOF
10636 #define $ac_tr_hdr 1
10637 EOF
10638  
10639 else
10640   echo "$ac_t""no" 1>&6
10641 fi
10642 done
10643
10644 fi
10645
10646 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10647                         cat >> confdefs.h <<\EOF
10648 #define REENTRANT 1
10649 EOF
10650
10651         cat >> confdefs.h <<\EOF
10652 #define _REENTRANT 1
10653 EOF
10654
10655         cat >> confdefs.h <<\EOF
10656 #define THREAD_SAFE 1
10657 EOF
10658
10659         cat >> confdefs.h <<\EOF
10660 #define _THREAD_SAFE 1
10661 EOF
10662
10663         cat >> confdefs.h <<\EOF
10664 #define THREADSAFE 1
10665 EOF
10666
10667         cat >> confdefs.h <<\EOF
10668 #define _THREADSAFE 1
10669 EOF
10670
10671         cat >> confdefs.h <<\EOF
10672 #define _SGI_MP_SOURCE 1
10673 EOF
10674
10675
10676                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10677 echo "configure:10678: checking for thread specific errno" >&5
10678 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10679   echo $ac_n "(cached) $ac_c" 1>&6
10680 else
10681   
10682                 cat > conftest.$ac_ext <<EOF
10683 #line 10684 "configure"
10684 #include "confdefs.h"
10685 #include <errno.h>
10686 int main() {
10687 errno = 0;
10688 ; return 0; }
10689 EOF
10690 if { (eval echo configure:10691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10691   rm -rf conftest*
10692   ol_cv_errno_thread_specific=yes
10693 else
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   ol_cv_errno_thread_specific=no
10698 fi
10699 rm -f conftest*
10700         
10701 fi
10702
10703 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10704
10705                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10706 echo "configure:10707: checking for thread specific h_errno" >&5
10707 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10708   echo $ac_n "(cached) $ac_c" 1>&6
10709 else
10710   
10711                 cat > conftest.$ac_ext <<EOF
10712 #line 10713 "configure"
10713 #include "confdefs.h"
10714 #include <netdb.h>
10715 int main() {
10716 h_errno = 0;
10717 ; return 0; }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10720   rm -rf conftest*
10721   ol_cv_h_errno_thread_specific=yes
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -rf conftest*
10726   ol_cv_h_errno_thread_specific=no
10727 fi
10728 rm -f conftest*
10729         
10730 fi
10731
10732 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10733
10734         if test $ol_cv_errno_thread_specific != yes \
10735                 -o $ol_cv_h_errno_thread_specific != yes ; then
10736                 LIBS="$LTHREAD_LIBS $LIBS"
10737                 LTHREAD_LIBS=""
10738         fi
10739
10740 fi  
10741
10742 if test $ol_link_threads = no ; then
10743         if test $ol_with_threads = yes ; then
10744                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10745         fi
10746
10747         if test $ol_with_threads = auto ; then
10748                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10749                 ol_with_threads=no
10750         fi
10751
10752         cat >> confdefs.h <<\EOF
10753 #define NO_THREADS 1
10754 EOF
10755
10756         LTHREAD_LIBS=""
10757 fi
10758
10759 if test $ol_link_threads != no ; then
10760         cat >> confdefs.h <<\EOF
10761 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10762 EOF
10763
10764 fi
10765
10766
10767 ol_link_ldbm=no 
10768 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10769         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10770 echo "configure:10771: checking for DB2 library" >&5
10771 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10772   echo $ac_n "(cached) $ac_c" 1>&6
10773 else
10774         ol_LIBS="$LIBS"
10775         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10776 echo "configure:10777: checking for db_appexit in -ldb" >&5
10777 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10779   echo $ac_n "(cached) $ac_c" 1>&6
10780 else
10781   ac_save_LIBS="$LIBS"
10782 LIBS="-ldb  $LIBS"
10783 cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 /* Override any gcc2 internal prototype to avoid an error.  */
10787 /* We use char because int might match the return type of a gcc2
10788     builtin and then its argument prototype would still apply.  */
10789 char db_appexit();
10790
10791 int main() {
10792 db_appexit()
10793 ; return 0; }
10794 EOF
10795 if { (eval echo configure:10796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=yes"
10798 else
10799   echo "configure: failed program was:" >&5
10800   cat conftest.$ac_ext >&5
10801   rm -rf conftest*
10802   eval "ac_cv_lib_$ac_lib_var=no"
10803 fi
10804 rm -f conftest*
10805 LIBS="$ac_save_LIBS"
10806
10807 fi
10808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10809   echo "$ac_t""yes" 1>&6
10810   ol_cv_lib_db2=-ldb
10811 else
10812   echo "$ac_t""no" 1>&6
10813 ol_cv_lib_db2=no
10814 fi
10815
10816         LIBS="$ol_LIBS"
10817
10818 fi
10819
10820 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10821
10822 for ac_hdr in db.h
10823 do
10824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10826 echo "configure:10827: checking for $ac_hdr" >&5
10827 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10828   echo $ac_n "(cached) $ac_c" 1>&6
10829 else
10830   cat > conftest.$ac_ext <<EOF
10831 #line 10832 "configure"
10832 #include "confdefs.h"
10833 #include <$ac_hdr>
10834 EOF
10835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10836 { (eval echo configure:10837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10838 if test -z "$ac_err"; then
10839   rm -rf conftest*
10840   eval "ac_cv_header_$ac_safe=yes"
10841 else
10842   echo "$ac_err" >&5
10843   echo "configure: failed program was:" >&5
10844   cat conftest.$ac_ext >&5
10845   rm -rf conftest*
10846   eval "ac_cv_header_$ac_safe=no"
10847 fi
10848 rm -f conftest*
10849 fi
10850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10851   echo "$ac_t""yes" 1>&6
10852     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10853   cat >> confdefs.h <<EOF
10854 #define $ac_tr_hdr 1
10855 EOF
10856  
10857 else
10858   echo "$ac_t""no" 1>&6
10859 fi
10860 done
10861
10862 if test $ac_cv_header_db_h = yes ; then
10863         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10864 echo "configure:10865: checking if db.h is DB2" >&5
10865 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10866   echo $ac_n "(cached) $ac_c" 1>&6
10867 else
10868   
10869                 cat > conftest.$ac_ext <<EOF
10870 #line 10871 "configure"
10871 #include "confdefs.h"
10872
10873 #                       include <db.h>
10874                         /* this check could be improved */
10875 #                       ifdef DB_VERSION_MAJOR
10876 #                               if DB_VERSION_MAJOR == 2
10877                                         __db_version_2;
10878 #                               endif
10879 #                       endif
10880                 
10881 EOF
10882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10883   egrep "__db_version_2" >/dev/null 2>&1; then
10884   rm -rf conftest*
10885   ol_cv_header_db2=yes
10886 else
10887   rm -rf conftest*
10888   ol_cv_header_db2=no
10889 fi
10890 rm -f conftest*
10891
10892 fi
10893
10894 echo "$ac_t""$ol_cv_header_db2" 1>&6
10895 else
10896         ol_cv_header_db2=no
10897 fi
10898
10899
10900  
10901  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10902 echo "configure:10903: checking for Berkeley DB2" >&5
10903 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10904   echo $ac_n "(cached) $ac_c" 1>&6
10905 else
10906   
10907         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10908                 ol_cv_berkeley_db2=no
10909         else
10910                 ol_cv_berkeley_db2=yes
10911         fi
10912
10913 fi
10914
10915 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10916  if test $ol_cv_berkeley_db2 = yes ; then
10917         cat >> confdefs.h <<\EOF
10918 #define HAVE_BERKELEY_DB2 1
10919 EOF
10920
10921  fi
10922
10923
10924         if test $ol_cv_berkeley_db2 = yes ; then
10925                 ol_link_ldbm=db2
10926                 ol_with_ldbm_api=db2
10927
10928                 if test $ol_with_ldbm_type = hash ; then
10929                         cat >> confdefs.h <<\EOF
10930 #define LDBM_USE_DBHASH 1
10931 EOF
10932
10933                 else
10934                         cat >> confdefs.h <<\EOF
10935 #define LDBM_USE_DBBTREE 1
10936 EOF
10937
10938                 fi
10939
10940                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10941 echo "configure:10942: checking for DB_THREAD support" >&5
10942 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
10943   echo $ac_n "(cached) $ac_c" 1>&6
10944 else
10945   
10946         ol_LIBS="$LIBS"
10947         if test $ol_cv_lib_db2 != yes ; then
10948                 LIBS="$ol_cv_lib_db2"
10949         fi
10950
10951         if test "$cross_compiling" = yes; then
10952   ol_cv_berkeley_db2_db_thread=cross
10953 else
10954   cat > conftest.$ac_ext <<EOF
10955 #line 10956 "configure"
10956 #include "confdefs.h"
10957
10958 #include <db.h>
10959 #ifndef NULL
10960 #define NULL ((void *)0)
10961 #endif
10962 main()
10963 {
10964         int rc;
10965         DB_ENV env;
10966         u_int32_t flags = DB_CREATE | DB_THREAD;
10967
10968         memset( &env, '\0', sizeof(env) );
10969
10970         rc = db_appinit( NULL, NULL, &env, flags );
10971
10972         if( rc == 0 ) {
10973                 db_appexit( &env );
10974         }
10975
10976         return rc;
10977 }
10978 EOF
10979 if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10980 then
10981   ol_cv_berkeley_db2_db_thread=yes
10982 else
10983   echo "configure: failed program was:" >&5
10984   cat conftest.$ac_ext >&5
10985   rm -fr conftest*
10986   ol_cv_berkeley_db2_db_thread=no
10987 fi
10988 rm -fr conftest*
10989 fi
10990
10991
10992         LIBS="$ol_LIBS"
10993
10994         if test $ol_cv_berkeley_db2_db_thread != no ; then
10995                 cat >> confdefs.h <<\EOF
10996 #define HAVE_BERKELEY_DB2_DB_THREAD 1
10997 EOF
10998
10999         fi
11000
11001 fi
11002
11003 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11004
11005                                                 if test $ol_cv_lib_db2 != yes ; then
11006                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11007                 fi
11008         fi
11009 fi
11010
11011 ol_link_bdb2=no
11012 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11013         if test $ol_cv_berkeley_db2_db_thread != no ; then
11014                 ol_link_bdb2=yes
11015         else
11016                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11017         fi
11018 fi
11019
11020 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11021         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11022 echo "configure:11023: checking for Berkeley DB library" >&5
11023 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   
11027         for ac_hdr in db1/db.h
11028 do
11029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11031 echo "configure:11032: checking for $ac_hdr" >&5
11032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11033   echo $ac_n "(cached) $ac_c" 1>&6
11034 else
11035   cat > conftest.$ac_ext <<EOF
11036 #line 11037 "configure"
11037 #include "confdefs.h"
11038 #include <$ac_hdr>
11039 EOF
11040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11041 { (eval echo configure:11042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11043 if test -z "$ac_err"; then
11044   rm -rf conftest*
11045   eval "ac_cv_header_$ac_safe=yes"
11046 else
11047   echo "$ac_err" >&5
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=no"
11052 fi
11053 rm -f conftest*
11054 fi
11055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11056   echo "$ac_t""yes" 1>&6
11057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11058   cat >> confdefs.h <<EOF
11059 #define $ac_tr_hdr 1
11060 EOF
11061  
11062 else
11063   echo "$ac_t""no" 1>&6
11064 fi
11065 done
11066
11067         ol_LIBS="$LIBS"
11068         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11069 echo "configure:11070: checking for dbopen" >&5
11070 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11071   echo $ac_n "(cached) $ac_c" 1>&6
11072 else
11073   cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076 /* System header to define __stub macros and hopefully few prototypes,
11077     which can conflict with char dbopen(); below.  */
11078 #include <assert.h>
11079 /* Override any gcc2 internal prototype to avoid an error.  */
11080 /* We use char because int might match the return type of a gcc2
11081     builtin and then its argument prototype would still apply.  */
11082 char dbopen();
11083 char (*f)();
11084
11085 int main() {
11086
11087 /* The GNU C library defines this for functions which it implements
11088     to always fail with ENOSYS.  Some functions are actually named
11089     something starting with __ and the normal name is an alias.  */
11090 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11091 choke me
11092 #else
11093 f = dbopen;
11094 #endif
11095
11096 ; return 0; }
11097 EOF
11098 if { (eval echo configure:11099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11099   rm -rf conftest*
11100   eval "ac_cv_func_dbopen=yes"
11101 else
11102   echo "configure: failed program was:" >&5
11103   cat conftest.$ac_ext >&5
11104   rm -rf conftest*
11105   eval "ac_cv_func_dbopen=no"
11106 fi
11107 rm -f conftest*
11108 fi
11109
11110 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11111   echo "$ac_t""yes" 1>&6
11112   ol_cv_lib_db=yes
11113 else
11114   echo "$ac_t""no" 1>&6
11115
11116                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11117 echo "configure:11118: checking for dbopen in -ldb1" >&5
11118 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11120   echo $ac_n "(cached) $ac_c" 1>&6
11121 else
11122   ac_save_LIBS="$LIBS"
11123 LIBS="-ldb1  $LIBS"
11124 cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 /* Override any gcc2 internal prototype to avoid an error.  */
11128 /* We use char because int might match the return type of a gcc2
11129     builtin and then its argument prototype would still apply.  */
11130 char dbopen();
11131
11132 int main() {
11133 dbopen()
11134 ; return 0; }
11135 EOF
11136 if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11137   rm -rf conftest*
11138   eval "ac_cv_lib_$ac_lib_var=yes"
11139 else
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_lib_$ac_lib_var=no"
11144 fi
11145 rm -f conftest*
11146 LIBS="$ac_save_LIBS"
11147
11148 fi
11149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151   ol_cv_lib_db=-ldb1
11152 else
11153   echo "$ac_t""no" 1>&6
11154
11155                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11156 echo "configure:11157: checking for dbopen in -ldb" >&5
11157 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11159   echo $ac_n "(cached) $ac_c" 1>&6
11160 else
11161   ac_save_LIBS="$LIBS"
11162 LIBS="-ldb  $LIBS"
11163 cat > conftest.$ac_ext <<EOF
11164 #line 11165 "configure"
11165 #include "confdefs.h"
11166 /* Override any gcc2 internal prototype to avoid an error.  */
11167 /* We use char because int might match the return type of a gcc2
11168     builtin and then its argument prototype would still apply.  */
11169 char dbopen();
11170
11171 int main() {
11172 dbopen()
11173 ; return 0; }
11174 EOF
11175 if { (eval echo configure:11176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11176   rm -rf conftest*
11177   eval "ac_cv_lib_$ac_lib_var=yes"
11178 else
11179   echo "configure: failed program was:" >&5
11180   cat conftest.$ac_ext >&5
11181   rm -rf conftest*
11182   eval "ac_cv_lib_$ac_lib_var=no"
11183 fi
11184 rm -f conftest*
11185 LIBS="$ac_save_LIBS"
11186
11187 fi
11188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11189   echo "$ac_t""yes" 1>&6
11190   ol_cv_lib_db=-ldb
11191 else
11192   echo "$ac_t""no" 1>&6
11193 ol_cv_lib_db=no
11194 fi
11195
11196                 
11197 fi
11198
11199         
11200 fi
11201
11202         LIBS="$ol_LIBS"
11203
11204 fi
11205
11206 echo "$ac_t""$ol_cv_lib_db" 1>&6
11207
11208
11209 for ac_hdr in db_185.h
11210 do
11211 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11212 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11213 echo "configure:11214: checking for $ac_hdr" >&5
11214 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11215   echo $ac_n "(cached) $ac_c" 1>&6
11216 else
11217   cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 #include <$ac_hdr>
11221 EOF
11222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11223 { (eval echo configure:11224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11225 if test -z "$ac_err"; then
11226   rm -rf conftest*
11227   eval "ac_cv_header_$ac_safe=yes"
11228 else
11229   echo "$ac_err" >&5
11230   echo "configure: failed program was:" >&5
11231   cat conftest.$ac_ext >&5
11232   rm -rf conftest*
11233   eval "ac_cv_header_$ac_safe=no"
11234 fi
11235 rm -f conftest*
11236 fi
11237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11238   echo "$ac_t""yes" 1>&6
11239     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11240   cat >> confdefs.h <<EOF
11241 #define $ac_tr_hdr 1
11242 EOF
11243  
11244 else
11245   echo "$ac_t""no" 1>&6
11246 fi
11247 done
11248
11249 if test "$ol_cv_header_db2" = yes ; then
11250         
11251         ol_cv_header_db=$ac_cv_header_db_185_h
11252 else
11253         ol_cv_header_db=$ac_cv_header_db_h
11254 fi
11255
11256
11257  
11258  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11259 echo "configure:11260: checking for Berkeley DB" >&5
11260 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11261   echo $ac_n "(cached) $ac_c" 1>&6
11262 else
11263   
11264         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11265                 ol_cv_berkeley_db=no
11266         else
11267                 ol_cv_berkeley_db=yes
11268         fi
11269
11270 fi
11271
11272 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11273  if test $ol_cv_berkeley_db = yes ; then
11274         cat >> confdefs.h <<\EOF
11275 #define HAVE_BERKELEY_DB 1
11276 EOF
11277
11278  fi
11279
11280
11281         if test $ol_cv_berkeley_db = yes ; then
11282                 ol_link_ldbm=db
11283                 ol_with_ldbm_api=db
11284
11285                 if test $ol_with_ldbm_type = hash ; then
11286                         cat >> confdefs.h <<\EOF
11287 #define LDBM_USE_DBHASH 1
11288 EOF
11289
11290                 else
11291                         cat >> confdefs.h <<\EOF
11292 #define LDBM_USE_DBBTREE 1
11293 EOF
11294
11295                 fi
11296
11297                                                 if test $ol_cv_lib_db != yes ; then
11298                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11299                 fi
11300         fi
11301 fi
11302
11303 if test $ol_with_ldbm_api = manual ; then
11304                 ol_link_ldbm=yes
11305
11306         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11307
11308         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11309 do
11310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11312 echo "configure:11313: checking for $ac_hdr" >&5
11313 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11314   echo $ac_n "(cached) $ac_c" 1>&6
11315 else
11316   cat > conftest.$ac_ext <<EOF
11317 #line 11318 "configure"
11318 #include "confdefs.h"
11319 #include <$ac_hdr>
11320 EOF
11321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11322 { (eval echo configure:11323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11324 if test -z "$ac_err"; then
11325   rm -rf conftest*
11326   eval "ac_cv_header_$ac_safe=yes"
11327 else
11328   echo "$ac_err" >&5
11329   echo "configure: failed program was:" >&5
11330   cat conftest.$ac_ext >&5
11331   rm -rf conftest*
11332   eval "ac_cv_header_$ac_safe=no"
11333 fi
11334 rm -f conftest*
11335 fi
11336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11337   echo "$ac_t""yes" 1>&6
11338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11339   cat >> confdefs.h <<EOF
11340 #define $ac_tr_hdr 1
11341 EOF
11342  
11343 else
11344   echo "$ac_t""no" 1>&6
11345 fi
11346 done
11347
11348 fi
11349
11350 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11351         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11352         ol_with_ldbm_api=none
11353 fi
11354
11355 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11356         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11357 echo "configure:11358: checking for MDBM library" >&5
11358 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11359   echo $ac_n "(cached) $ac_c" 1>&6
11360 else
11361         ol_LIBS="$LIBS"
11362         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11363 echo "configure:11364: checking for mdbm_set_chain" >&5
11364 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11365   echo $ac_n "(cached) $ac_c" 1>&6
11366 else
11367   cat > conftest.$ac_ext <<EOF
11368 #line 11369 "configure"
11369 #include "confdefs.h"
11370 /* System header to define __stub macros and hopefully few prototypes,
11371     which can conflict with char mdbm_set_chain(); below.  */
11372 #include <assert.h>
11373 /* Override any gcc2 internal prototype to avoid an error.  */
11374 /* We use char because int might match the return type of a gcc2
11375     builtin and then its argument prototype would still apply.  */
11376 char mdbm_set_chain();
11377 char (*f)();
11378
11379 int main() {
11380
11381 /* The GNU C library defines this for functions which it implements
11382     to always fail with ENOSYS.  Some functions are actually named
11383     something starting with __ and the normal name is an alias.  */
11384 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11385 choke me
11386 #else
11387 f = mdbm_set_chain;
11388 #endif
11389
11390 ; return 0; }
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11393   rm -rf conftest*
11394   eval "ac_cv_func_mdbm_set_chain=yes"
11395 else
11396   echo "configure: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   rm -rf conftest*
11399   eval "ac_cv_func_mdbm_set_chain=no"
11400 fi
11401 rm -f conftest*
11402 fi
11403
11404 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11405   echo "$ac_t""yes" 1>&6
11406   ol_cv_lib_mdbm=yes
11407 else
11408   echo "$ac_t""no" 1>&6
11409
11410                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11411 echo "configure:11412: checking for mdbm_set_chain in -lmdbm" >&5
11412 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11413 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11414   echo $ac_n "(cached) $ac_c" 1>&6
11415 else
11416   ac_save_LIBS="$LIBS"
11417 LIBS="-lmdbm  $LIBS"
11418 cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 /* Override any gcc2 internal prototype to avoid an error.  */
11422 /* We use char because int might match the return type of a gcc2
11423     builtin and then its argument prototype would still apply.  */
11424 char mdbm_set_chain();
11425
11426 int main() {
11427 mdbm_set_chain()
11428 ; return 0; }
11429 EOF
11430 if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11431   rm -rf conftest*
11432   eval "ac_cv_lib_$ac_lib_var=yes"
11433 else
11434   echo "configure: failed program was:" >&5
11435   cat conftest.$ac_ext >&5
11436   rm -rf conftest*
11437   eval "ac_cv_lib_$ac_lib_var=no"
11438 fi
11439 rm -f conftest*
11440 LIBS="$ac_save_LIBS"
11441
11442 fi
11443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11444   echo "$ac_t""yes" 1>&6
11445   ol_cv_lib_mdbm=-lmdbm
11446 else
11447   echo "$ac_t""no" 1>&6
11448 ol_cv_lib_mdbm=no
11449 fi
11450
11451         
11452 fi
11453
11454         LIBS="$ol_LIBS"
11455
11456 fi
11457
11458 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11459
11460
11461  for ac_hdr in mdbm.h
11462 do
11463 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11464 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11465 echo "configure:11466: checking for $ac_hdr" >&5
11466 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11467   echo $ac_n "(cached) $ac_c" 1>&6
11468 else
11469   cat > conftest.$ac_ext <<EOF
11470 #line 11471 "configure"
11471 #include "confdefs.h"
11472 #include <$ac_hdr>
11473 EOF
11474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11475 { (eval echo configure:11476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11477 if test -z "$ac_err"; then
11478   rm -rf conftest*
11479   eval "ac_cv_header_$ac_safe=yes"
11480 else
11481   echo "$ac_err" >&5
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   eval "ac_cv_header_$ac_safe=no"
11486 fi
11487 rm -f conftest*
11488 fi
11489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11490   echo "$ac_t""yes" 1>&6
11491     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11492   cat >> confdefs.h <<EOF
11493 #define $ac_tr_hdr 1
11494 EOF
11495  
11496 else
11497   echo "$ac_t""no" 1>&6
11498 fi
11499 done
11500
11501  echo $ac_n "checking for db""... $ac_c" 1>&6
11502 echo "configure:11503: checking for db" >&5
11503 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11504   echo $ac_n "(cached) $ac_c" 1>&6
11505 else
11506   
11507         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11508                 ol_cv_mdbm=no
11509         else
11510                 ol_cv_mdbm=yes
11511         fi
11512
11513 fi
11514
11515 echo "$ac_t""$ol_cv_mdbm" 1>&6
11516  if test $ol_cv_mdbm = yes ; then
11517         cat >> confdefs.h <<\EOF
11518 #define HAVE_MDBM 1
11519 EOF
11520
11521  fi
11522
11523
11524         if test $ol_cv_mdbm = yes ; then
11525                 ol_link_ldbm=mdbm
11526                 ol_with_ldbm_api=mdbm
11527                 if test $ol_cv_lib_mdbm != yes ; then
11528                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11529                 fi
11530         fi
11531 fi
11532
11533 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11534         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11535 echo "configure:11536: checking for GDBM library" >&5
11536 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11537   echo $ac_n "(cached) $ac_c" 1>&6
11538 else
11539         ol_LIBS="$LIBS"
11540         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11541 echo "configure:11542: checking for gdbm_open" >&5
11542 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11543   echo $ac_n "(cached) $ac_c" 1>&6
11544 else
11545   cat > conftest.$ac_ext <<EOF
11546 #line 11547 "configure"
11547 #include "confdefs.h"
11548 /* System header to define __stub macros and hopefully few prototypes,
11549     which can conflict with char gdbm_open(); below.  */
11550 #include <assert.h>
11551 /* Override any gcc2 internal prototype to avoid an error.  */
11552 /* We use char because int might match the return type of a gcc2
11553     builtin and then its argument prototype would still apply.  */
11554 char gdbm_open();
11555 char (*f)();
11556
11557 int main() {
11558
11559 /* The GNU C library defines this for functions which it implements
11560     to always fail with ENOSYS.  Some functions are actually named
11561     something starting with __ and the normal name is an alias.  */
11562 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11563 choke me
11564 #else
11565 f = gdbm_open;
11566 #endif
11567
11568 ; return 0; }
11569 EOF
11570 if { (eval echo configure:11571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11571   rm -rf conftest*
11572   eval "ac_cv_func_gdbm_open=yes"
11573 else
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -rf conftest*
11577   eval "ac_cv_func_gdbm_open=no"
11578 fi
11579 rm -f conftest*
11580 fi
11581
11582 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11583   echo "$ac_t""yes" 1>&6
11584   ol_cv_lib_gdbm=yes
11585 else
11586   echo "$ac_t""no" 1>&6
11587
11588                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11589 echo "configure:11590: checking for gdbm_open in -lgdbm" >&5
11590 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11592   echo $ac_n "(cached) $ac_c" 1>&6
11593 else
11594   ac_save_LIBS="$LIBS"
11595 LIBS="-lgdbm  $LIBS"
11596 cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599 /* Override any gcc2 internal prototype to avoid an error.  */
11600 /* We use char because int might match the return type of a gcc2
11601     builtin and then its argument prototype would still apply.  */
11602 char gdbm_open();
11603
11604 int main() {
11605 gdbm_open()
11606 ; return 0; }
11607 EOF
11608 if { (eval echo configure:11609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11609   rm -rf conftest*
11610   eval "ac_cv_lib_$ac_lib_var=yes"
11611 else
11612   echo "configure: failed program was:" >&5
11613   cat conftest.$ac_ext >&5
11614   rm -rf conftest*
11615   eval "ac_cv_lib_$ac_lib_var=no"
11616 fi
11617 rm -f conftest*
11618 LIBS="$ac_save_LIBS"
11619
11620 fi
11621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11622   echo "$ac_t""yes" 1>&6
11623   ol_cv_lib_gdbm=-lgdbm
11624 else
11625   echo "$ac_t""no" 1>&6
11626 ol_cv_lib_gdbm=no
11627 fi
11628
11629         
11630 fi
11631
11632         LIBS="$ol_LIBS"
11633
11634 fi
11635
11636 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11637
11638
11639  for ac_hdr in gdbm.h
11640 do
11641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11643 echo "configure:11644: checking for $ac_hdr" >&5
11644 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11645   echo $ac_n "(cached) $ac_c" 1>&6
11646 else
11647   cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650 #include <$ac_hdr>
11651 EOF
11652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11653 { (eval echo configure:11654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11655 if test -z "$ac_err"; then
11656   rm -rf conftest*
11657   eval "ac_cv_header_$ac_safe=yes"
11658 else
11659   echo "$ac_err" >&5
11660   echo "configure: failed program was:" >&5
11661   cat conftest.$ac_ext >&5
11662   rm -rf conftest*
11663   eval "ac_cv_header_$ac_safe=no"
11664 fi
11665 rm -f conftest*
11666 fi
11667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11668   echo "$ac_t""yes" 1>&6
11669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11670   cat >> confdefs.h <<EOF
11671 #define $ac_tr_hdr 1
11672 EOF
11673  
11674 else
11675   echo "$ac_t""no" 1>&6
11676 fi
11677 done
11678
11679  echo $ac_n "checking for db""... $ac_c" 1>&6
11680 echo "configure:11681: checking for db" >&5
11681 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11682   echo $ac_n "(cached) $ac_c" 1>&6
11683 else
11684   
11685         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11686                 ol_cv_gdbm=no
11687         else
11688                 ol_cv_gdbm=yes
11689         fi
11690
11691 fi
11692
11693 echo "$ac_t""$ol_cv_gdbm" 1>&6
11694  if test $ol_cv_gdbm = yes ; then
11695         cat >> confdefs.h <<\EOF
11696 #define HAVE_GDBM 1
11697 EOF
11698
11699  fi
11700
11701
11702         if test $ol_cv_gdbm = yes ; then
11703                 ol_link_ldbm=gdbm
11704                 ol_with_ldbm_api=gdbm
11705
11706                 if test $ol_cv_lib_gdbm != yes ; then
11707                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11708                 fi
11709         fi
11710 fi
11711
11712 if test $ol_with_ldbm_api = auto ; then
11713         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11714 elif test $ol_with_ldbm_api = ndbm ; then
11715         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11716 echo "configure:11717: checking for NDBM library" >&5
11717 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11718   echo $ac_n "(cached) $ac_c" 1>&6
11719 else
11720         ol_LIBS="$LIBS"
11721         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11722 echo "configure:11723: checking for dbm_open" >&5
11723 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11724   echo $ac_n "(cached) $ac_c" 1>&6
11725 else
11726   cat > conftest.$ac_ext <<EOF
11727 #line 11728 "configure"
11728 #include "confdefs.h"
11729 /* System header to define __stub macros and hopefully few prototypes,
11730     which can conflict with char dbm_open(); below.  */
11731 #include <assert.h>
11732 /* Override any gcc2 internal prototype to avoid an error.  */
11733 /* We use char because int might match the return type of a gcc2
11734     builtin and then its argument prototype would still apply.  */
11735 char dbm_open();
11736 char (*f)();
11737
11738 int main() {
11739
11740 /* The GNU C library defines this for functions which it implements
11741     to always fail with ENOSYS.  Some functions are actually named
11742     something starting with __ and the normal name is an alias.  */
11743 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11744 choke me
11745 #else
11746 f = dbm_open;
11747 #endif
11748
11749 ; return 0; }
11750 EOF
11751 if { (eval echo configure:11752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11752   rm -rf conftest*
11753   eval "ac_cv_func_dbm_open=yes"
11754 else
11755   echo "configure: failed program was:" >&5
11756   cat conftest.$ac_ext >&5
11757   rm -rf conftest*
11758   eval "ac_cv_func_dbm_open=no"
11759 fi
11760 rm -f conftest*
11761 fi
11762
11763 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11764   echo "$ac_t""yes" 1>&6
11765   ol_cv_lib_ndbm=yes
11766 else
11767   echo "$ac_t""no" 1>&6
11768
11769                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11770 echo "configure:11771: checking for dbm_open in -lndbm" >&5
11771 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11772 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   ac_save_LIBS="$LIBS"
11776 LIBS="-lndbm  $LIBS"
11777 cat > conftest.$ac_ext <<EOF
11778 #line 11779 "configure"
11779 #include "confdefs.h"
11780 /* Override any gcc2 internal prototype to avoid an error.  */
11781 /* We use char because int might match the return type of a gcc2
11782     builtin and then its argument prototype would still apply.  */
11783 char dbm_open();
11784
11785 int main() {
11786 dbm_open()
11787 ; return 0; }
11788 EOF
11789 if { (eval echo configure:11790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11790   rm -rf conftest*
11791   eval "ac_cv_lib_$ac_lib_var=yes"
11792 else
11793   echo "configure: failed program was:" >&5
11794   cat conftest.$ac_ext >&5
11795   rm -rf conftest*
11796   eval "ac_cv_lib_$ac_lib_var=no"
11797 fi
11798 rm -f conftest*
11799 LIBS="$ac_save_LIBS"
11800
11801 fi
11802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11803   echo "$ac_t""yes" 1>&6
11804   ol_cv_lib_ndbm=-lndbm
11805 else
11806   echo "$ac_t""no" 1>&6
11807
11808                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11809 echo "configure:11810: checking for dbm_open in -ldbm" >&5
11810 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11812   echo $ac_n "(cached) $ac_c" 1>&6
11813 else
11814   ac_save_LIBS="$LIBS"
11815 LIBS="-ldbm  $LIBS"
11816 cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819 /* Override any gcc2 internal prototype to avoid an error.  */
11820 /* We use char because int might match the return type of a gcc2
11821     builtin and then its argument prototype would still apply.  */
11822 char dbm_open();
11823
11824 int main() {
11825 dbm_open()
11826 ; return 0; }
11827 EOF
11828 if { (eval echo configure:11829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11829   rm -rf conftest*
11830   eval "ac_cv_lib_$ac_lib_var=yes"
11831 else
11832   echo "configure: failed program was:" >&5
11833   cat conftest.$ac_ext >&5
11834   rm -rf conftest*
11835   eval "ac_cv_lib_$ac_lib_var=no"
11836 fi
11837 rm -f conftest*
11838 LIBS="$ac_save_LIBS"
11839
11840 fi
11841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11842   echo "$ac_t""yes" 1>&6
11843   ol_cv_lib_ndbm=-ldbm
11844 else
11845   echo "$ac_t""no" 1>&6
11846 ol_cv_lib_ndbm=no
11847 fi
11848                 
11849 fi
11850
11851         
11852 fi
11853
11854         LIBS="$ol_LIBS"
11855
11856 fi
11857
11858 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11859
11860
11861  for ac_hdr in ndbm.h
11862 do
11863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11865 echo "configure:11866: checking for $ac_hdr" >&5
11866 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11867   echo $ac_n "(cached) $ac_c" 1>&6
11868 else
11869   cat > conftest.$ac_ext <<EOF
11870 #line 11871 "configure"
11871 #include "confdefs.h"
11872 #include <$ac_hdr>
11873 EOF
11874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11875 { (eval echo configure:11876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11877 if test -z "$ac_err"; then
11878   rm -rf conftest*
11879   eval "ac_cv_header_$ac_safe=yes"
11880 else
11881   echo "$ac_err" >&5
11882   echo "configure: failed program was:" >&5
11883   cat conftest.$ac_ext >&5
11884   rm -rf conftest*
11885   eval "ac_cv_header_$ac_safe=no"
11886 fi
11887 rm -f conftest*
11888 fi
11889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11890   echo "$ac_t""yes" 1>&6
11891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11892   cat >> confdefs.h <<EOF
11893 #define $ac_tr_hdr 1
11894 EOF
11895  
11896 else
11897   echo "$ac_t""no" 1>&6
11898 fi
11899 done
11900
11901  echo $ac_n "checking for db""... $ac_c" 1>&6
11902 echo "configure:11903: checking for db" >&5
11903 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11904   echo $ac_n "(cached) $ac_c" 1>&6
11905 else
11906   
11907         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11908                 ol_cv_ndbm=no
11909         else
11910                 ol_cv_ndbm=yes
11911         fi
11912
11913 fi
11914
11915 echo "$ac_t""$ol_cv_ndbm" 1>&6
11916  if test $ol_cv_ndbm = yes ; then
11917         cat >> confdefs.h <<\EOF
11918 #define HAVE_NDBM 1
11919 EOF
11920
11921  fi
11922
11923
11924         if test $ol_cv_ndbm = yes ; then
11925                 ol_link_ldbm=ndbm
11926                 ol_with_ldbm_api=ndbm
11927
11928                 if test $ol_cv_lib_ndbm != yes ; then
11929                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11930                 fi
11931         fi
11932 fi
11933
11934 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11935         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11936         if test $ol_enable_ldbm = yes ; then
11937                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11938         fi
11939
11940         echo "configure: warning: disabling LDBM" 1>&2
11941         ol_enable_ldbm=no
11942 fi
11943
11944 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
11945         LINK_BINS_DYNAMIC="yes"
11946 else
11947         LINK_BINS_DYNAMIC="no"
11948 fi
11949
11950 if test $ol_enable_wrappers != no ; then
11951         for ac_hdr in tcpd.h
11952 do
11953 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11954 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11955 echo "configure:11956: checking for $ac_hdr" >&5
11956 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11957   echo $ac_n "(cached) $ac_c" 1>&6
11958 else
11959   cat > conftest.$ac_ext <<EOF
11960 #line 11961 "configure"
11961 #include "confdefs.h"
11962 #include <$ac_hdr>
11963 EOF
11964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11965 { (eval echo configure:11966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11967 if test -z "$ac_err"; then
11968   rm -rf conftest*
11969   eval "ac_cv_header_$ac_safe=yes"
11970 else
11971   echo "$ac_err" >&5
11972   echo "configure: failed program was:" >&5
11973   cat conftest.$ac_ext >&5
11974   rm -rf conftest*
11975   eval "ac_cv_header_$ac_safe=no"
11976 fi
11977 rm -f conftest*
11978 fi
11979 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11980   echo "$ac_t""yes" 1>&6
11981     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11982   cat >> confdefs.h <<EOF
11983 #define $ac_tr_hdr 1
11984 EOF
11985  
11986 else
11987   echo "$ac_t""no" 1>&6
11988 fi
11989 done
11990
11991
11992         if test $ac_cv_header_tcpd_h != yes ; then
11993                 have_wrappers=no
11994         else
11995                 cat > conftest.$ac_ext <<EOF
11996 #line 11997 "configure"
11997 #include "confdefs.h"
11998
11999 int allow_severity = 0;
12000 int deny_severity  = 0;
12001                 
12002 int main() {
12003 hosts_access()
12004 ; return 0; }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12007   rm -rf conftest*
12008   have_wrappers=yes
12009 else
12010   echo "configure: failed program was:" >&5
12011   cat conftest.$ac_ext >&5
12012   rm -rf conftest*
12013   have_wrappers=no
12014 fi
12015 rm -f conftest*
12016         fi
12017
12018         if test $have_wrappers = yes ; then
12019                 cat >> confdefs.h <<\EOF
12020 #define HAVE_TCPD 1
12021 EOF
12022
12023                 WRAP_LIBS="-lwrap"
12024
12025                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12026 echo "configure:12027: checking for main in -lnsl" >&5
12027 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12029   echo $ac_n "(cached) $ac_c" 1>&6
12030 else
12031   ac_save_LIBS="$LIBS"
12032 LIBS="-lnsl  $LIBS"
12033 cat > conftest.$ac_ext <<EOF
12034 #line 12035 "configure"
12035 #include "confdefs.h"
12036
12037 int main() {
12038 main()
12039 ; return 0; }
12040 EOF
12041 if { (eval echo configure:12042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12042   rm -rf conftest*
12043   eval "ac_cv_lib_$ac_lib_var=yes"
12044 else
12045   echo "configure: failed program was:" >&5
12046   cat conftest.$ac_ext >&5
12047   rm -rf conftest*
12048   eval "ac_cv_lib_$ac_lib_var=no"
12049 fi
12050 rm -f conftest*
12051 LIBS="$ac_save_LIBS"
12052
12053 fi
12054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12055   echo "$ac_t""yes" 1>&6
12056     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12058   cat >> confdefs.h <<EOF
12059 #define $ac_tr_lib 1
12060 EOF
12061
12062   LIBS="-lnsl $LIBS"
12063
12064 else
12065   echo "$ac_t""no" 1>&6
12066 fi
12067
12068         else
12069                 echo "configure: warning: could not find -lwrap" 1>&2
12070                 if test $ol_enable_wrappers = yes ; then
12071                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12072                 fi
12073
12074                 echo "configure: warning: disabling wrappers support" 1>&2
12075                 ol_enable_wrappers=no
12076                 WRAP_LIBS=""
12077         fi
12078 fi
12079
12080 if test $ol_enable_syslog != no ; then
12081         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12082 echo "configure:12083: checking for openlog" >&5
12083 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12084   echo $ac_n "(cached) $ac_c" 1>&6
12085 else
12086   cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 /* System header to define __stub macros and hopefully few prototypes,
12090     which can conflict with char openlog(); below.  */
12091 #include <assert.h>
12092 /* Override any gcc2 internal prototype to avoid an error.  */
12093 /* We use char because int might match the return type of a gcc2
12094     builtin and then its argument prototype would still apply.  */
12095 char openlog();
12096 char (*f)();
12097
12098 int main() {
12099
12100 /* The GNU C library defines this for functions which it implements
12101     to always fail with ENOSYS.  Some functions are actually named
12102     something starting with __ and the normal name is an alias.  */
12103 #if defined (__stub_openlog) || defined (__stub___openlog)
12104 choke me
12105 #else
12106 f = openlog;
12107 #endif
12108
12109 ; return 0; }
12110 EOF
12111 if { (eval echo configure:12112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12112   rm -rf conftest*
12113   eval "ac_cv_func_openlog=yes"
12114 else
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117   rm -rf conftest*
12118   eval "ac_cv_func_openlog=no"
12119 fi
12120 rm -f conftest*
12121 fi
12122
12123 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12124   echo "$ac_t""yes" 1>&6
12125   :
12126 else
12127   echo "$ac_t""no" 1>&6
12128 fi
12129
12130         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12131                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12132         fi
12133         ol_enable_syslog=$ac_cv_func_openlog
12134 fi
12135
12136 if test $ol_enable_dmalloc != no ; then
12137         for ac_hdr in dmalloc.h
12138 do
12139 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12140 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12141 echo "configure:12142: checking for $ac_hdr" >&5
12142 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12143   echo $ac_n "(cached) $ac_c" 1>&6
12144 else
12145   cat > conftest.$ac_ext <<EOF
12146 #line 12147 "configure"
12147 #include "confdefs.h"
12148 #include <$ac_hdr>
12149 EOF
12150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12151 { (eval echo configure:12152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12153 if test -z "$ac_err"; then
12154   rm -rf conftest*
12155   eval "ac_cv_header_$ac_safe=yes"
12156 else
12157   echo "$ac_err" >&5
12158   echo "configure: failed program was:" >&5
12159   cat conftest.$ac_ext >&5
12160   rm -rf conftest*
12161   eval "ac_cv_header_$ac_safe=no"
12162 fi
12163 rm -f conftest*
12164 fi
12165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12166   echo "$ac_t""yes" 1>&6
12167     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12168   cat >> confdefs.h <<EOF
12169 #define $ac_tr_hdr 1
12170 EOF
12171  
12172 else
12173   echo "$ac_t""no" 1>&6
12174 fi
12175 done
12176
12177         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12178 echo "configure:12179: checking for dmalloc_shutdown in -ldmalloc" >&5
12179 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12180 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12181   echo $ac_n "(cached) $ac_c" 1>&6
12182 else
12183   ac_save_LIBS="$LIBS"
12184 LIBS="-ldmalloc  $LIBS"
12185 cat > conftest.$ac_ext <<EOF
12186 #line 12187 "configure"
12187 #include "confdefs.h"
12188 /* Override any gcc2 internal prototype to avoid an error.  */
12189 /* We use char because int might match the return type of a gcc2
12190     builtin and then its argument prototype would still apply.  */
12191 char dmalloc_shutdown();
12192
12193 int main() {
12194 dmalloc_shutdown()
12195 ; return 0; }
12196 EOF
12197 if { (eval echo configure:12198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12198   rm -rf conftest*
12199   eval "ac_cv_lib_$ac_lib_var=yes"
12200 else
12201   echo "configure: failed program was:" >&5
12202   cat conftest.$ac_ext >&5
12203   rm -rf conftest*
12204   eval "ac_cv_lib_$ac_lib_var=no"
12205 fi
12206 rm -f conftest*
12207 LIBS="$ac_save_LIBS"
12208
12209 fi
12210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12211   echo "$ac_t""yes" 1>&6
12212     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12213     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12214   cat >> confdefs.h <<EOF
12215 #define $ac_tr_lib 1
12216 EOF
12217
12218   LIBS="-ldmalloc $LIBS"
12219
12220 else
12221   echo "$ac_t""no" 1>&6
12222 fi
12223
12224 fi
12225
12226 if test $ol_enable_tcl != no ; then
12227         for ac_hdr in tcl.h
12228 do
12229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12231 echo "configure:12232: checking for $ac_hdr" >&5
12232 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12233   echo $ac_n "(cached) $ac_c" 1>&6
12234 else
12235   cat > conftest.$ac_ext <<EOF
12236 #line 12237 "configure"
12237 #include "confdefs.h"
12238 #include <$ac_hdr>
12239 EOF
12240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12241 { (eval echo configure:12242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12243 if test -z "$ac_err"; then
12244   rm -rf conftest*
12245   eval "ac_cv_header_$ac_safe=yes"
12246 else
12247   echo "$ac_err" >&5
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -rf conftest*
12251   eval "ac_cv_header_$ac_safe=no"
12252 fi
12253 rm -f conftest*
12254 fi
12255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12256   echo "$ac_t""yes" 1>&6
12257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12258   cat >> confdefs.h <<EOF
12259 #define $ac_tr_hdr 1
12260 EOF
12261  
12262 else
12263   echo "$ac_t""no" 1>&6
12264 fi
12265 done
12266
12267
12268         if test $ac_cv_header_tcl_h != yes ; then
12269                 have_tcl=no
12270         else
12271                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12272                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12273 echo "configure:12274: checking for main in -l$lib" >&5
12274 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12275 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12276   echo $ac_n "(cached) $ac_c" 1>&6
12277 else
12278   ac_save_LIBS="$LIBS"
12279 LIBS="-l$lib  $LIBS"
12280 cat > conftest.$ac_ext <<EOF
12281 #line 12282 "configure"
12282 #include "confdefs.h"
12283
12284 int main() {
12285 main()
12286 ; return 0; }
12287 EOF
12288 if { (eval echo configure:12289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12289   rm -rf conftest*
12290   eval "ac_cv_lib_$ac_lib_var=yes"
12291 else
12292   echo "configure: failed program was:" >&5
12293   cat conftest.$ac_ext >&5
12294   rm -rf conftest*
12295   eval "ac_cv_lib_$ac_lib_var=no"
12296 fi
12297 rm -f conftest*
12298 LIBS="$ac_save_LIBS"
12299
12300 fi
12301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12302   echo "$ac_t""yes" 1>&6
12303   have_tcl=yes
12304                            if test x"$ol_with_tcl_module" == "xstatic" ; then
12305                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12306                            else
12307                                MOD_TCL_LIB="-l${lib}"
12308                            fi;break
12309 else
12310   echo "$ac_t""no" 1>&6
12311 have_tcl=no
12312 fi
12313
12314                 done
12315         fi
12316
12317         if test $have_tcl != yes ; then
12318                 echo "configure: warning: could not find -ltcl" 1>&2
12319                 if test $ol_enable_tcl = yes ; then
12320                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12321                 fi
12322
12323                 ol_enable_tcl=no
12324         fi
12325 fi
12326
12327 ol_link_termcap=no
12328 for ac_hdr in termcap.h ncurses.h
12329 do
12330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12332 echo "configure:12333: checking for $ac_hdr" >&5
12333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12334   echo $ac_n "(cached) $ac_c" 1>&6
12335 else
12336   cat > conftest.$ac_ext <<EOF
12337 #line 12338 "configure"
12338 #include "confdefs.h"
12339 #include <$ac_hdr>
12340 EOF
12341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12342 { (eval echo configure:12343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12344 if test -z "$ac_err"; then
12345   rm -rf conftest*
12346   eval "ac_cv_header_$ac_safe=yes"
12347 else
12348   echo "$ac_err" >&5
12349   echo "configure: failed program was:" >&5
12350   cat conftest.$ac_ext >&5
12351   rm -rf conftest*
12352   eval "ac_cv_header_$ac_safe=no"
12353 fi
12354 rm -f conftest*
12355 fi
12356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12357   echo "$ac_t""yes" 1>&6
12358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12359   cat >> confdefs.h <<EOF
12360 #define $ac_tr_hdr 1
12361 EOF
12362  
12363 else
12364   echo "$ac_t""no" 1>&6
12365 fi
12366 done
12367
12368
12369 if test $ol_link_termcap = no ; then
12370         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12371 echo "configure:12372: checking for tputs in -ltermcap" >&5
12372 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12374   echo $ac_n "(cached) $ac_c" 1>&6
12375 else
12376   ac_save_LIBS="$LIBS"
12377 LIBS="-ltermcap  $LIBS"
12378 cat > conftest.$ac_ext <<EOF
12379 #line 12380 "configure"
12380 #include "confdefs.h"
12381 /* Override any gcc2 internal prototype to avoid an error.  */
12382 /* We use char because int might match the return type of a gcc2
12383     builtin and then its argument prototype would still apply.  */
12384 char tputs();
12385
12386 int main() {
12387 tputs()
12388 ; return 0; }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12391   rm -rf conftest*
12392   eval "ac_cv_lib_$ac_lib_var=yes"
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   eval "ac_cv_lib_$ac_lib_var=no"
12398 fi
12399 rm -f conftest*
12400 LIBS="$ac_save_LIBS"
12401
12402 fi
12403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12404   echo "$ac_t""yes" 1>&6
12405   have_termcap=yes
12406 else
12407   echo "$ac_t""no" 1>&6
12408 have_termcap=no
12409 fi
12410
12411         if test $have_termcap = yes ; then
12412                 cat >> confdefs.h <<\EOF
12413 #define HAVE_TERMCAP 1
12414 EOF
12415
12416                 ol_link_termcap=yes
12417                 TERMCAP_LIBS=-ltermcap
12418         fi
12419 fi
12420
12421 if test $ol_link_termcap = no ; then
12422         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12423 echo "configure:12424: checking for initscr in -lncurses" >&5
12424 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12426   echo $ac_n "(cached) $ac_c" 1>&6
12427 else
12428   ac_save_LIBS="$LIBS"
12429 LIBS="-lncurses  $LIBS"
12430 cat > conftest.$ac_ext <<EOF
12431 #line 12432 "configure"
12432 #include "confdefs.h"
12433 /* Override any gcc2 internal prototype to avoid an error.  */
12434 /* We use char because int might match the return type of a gcc2
12435     builtin and then its argument prototype would still apply.  */
12436 char initscr();
12437
12438 int main() {
12439 initscr()
12440 ; return 0; }
12441 EOF
12442 if { (eval echo configure:12443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12443   rm -rf conftest*
12444   eval "ac_cv_lib_$ac_lib_var=yes"
12445 else
12446   echo "configure: failed program was:" >&5
12447   cat conftest.$ac_ext >&5
12448   rm -rf conftest*
12449   eval "ac_cv_lib_$ac_lib_var=no"
12450 fi
12451 rm -f conftest*
12452 LIBS="$ac_save_LIBS"
12453
12454 fi
12455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12456   echo "$ac_t""yes" 1>&6
12457   have_ncurses=yes
12458 else
12459   echo "$ac_t""no" 1>&6
12460 have_ncurses=no
12461 fi
12462
12463         if test $have_ncurses = yes ; then
12464                 cat >> confdefs.h <<\EOF
12465 #define HAVE_NCURSES 1
12466 EOF
12467
12468                 ol_link_termcap=yes
12469                 TERMCAP_LIBS=-lncurses
12470         fi
12471 fi
12472
12473 if test $ol_link_termcap = no ; then
12474         cat >> confdefs.h <<\EOF
12475 #define NO_TERMCAP 1
12476 EOF
12477
12478         TERMCAP_LIBS=
12479 fi
12480
12481 ol_link_sasl=no
12482 if test $ol_with_cyrus_sasl != no ; then
12483         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12484 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12485 echo "configure:12486: checking for sasl.h" >&5
12486 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12487   echo $ac_n "(cached) $ac_c" 1>&6
12488 else
12489   cat > conftest.$ac_ext <<EOF
12490 #line 12491 "configure"
12491 #include "confdefs.h"
12492 #include <sasl.h>
12493 EOF
12494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12495 { (eval echo configure:12496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12497 if test -z "$ac_err"; then
12498   rm -rf conftest*
12499   eval "ac_cv_header_$ac_safe=yes"
12500 else
12501   echo "$ac_err" >&5
12502   echo "configure: failed program was:" >&5
12503   cat conftest.$ac_ext >&5
12504   rm -rf conftest*
12505   eval "ac_cv_header_$ac_safe=no"
12506 fi
12507 rm -f conftest*
12508 fi
12509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12510   echo "$ac_t""yes" 1>&6
12511   :
12512 else
12513   echo "$ac_t""no" 1>&6
12514 fi
12515
12516
12517         if test $ac_cv_header_sasl_h = yes ; then
12518                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12519 echo "configure:12520: checking for sasl_client_init in -lsasl" >&5
12520 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12522   echo $ac_n "(cached) $ac_c" 1>&6
12523 else
12524   ac_save_LIBS="$LIBS"
12525 LIBS="-lsasl  $LIBS"
12526 cat > conftest.$ac_ext <<EOF
12527 #line 12528 "configure"
12528 #include "confdefs.h"
12529 /* Override any gcc2 internal prototype to avoid an error.  */
12530 /* We use char because int might match the return type of a gcc2
12531     builtin and then its argument prototype would still apply.  */
12532 char sasl_client_init();
12533
12534 int main() {
12535 sasl_client_init()
12536 ; return 0; }
12537 EOF
12538 if { (eval echo configure:12539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12539   rm -rf conftest*
12540   eval "ac_cv_lib_$ac_lib_var=yes"
12541 else
12542   echo "configure: failed program was:" >&5
12543   cat conftest.$ac_ext >&5
12544   rm -rf conftest*
12545   eval "ac_cv_lib_$ac_lib_var=no"
12546 fi
12547 rm -f conftest*
12548 LIBS="$ac_save_LIBS"
12549
12550 fi
12551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12552   echo "$ac_t""yes" 1>&6
12553   have_cyrus_sasl=yes
12554 else
12555   echo "$ac_t""no" 1>&6
12556 have_cyrus_sasl=no
12557 fi
12558
12559
12560                 if test $have_cyrus_sasl != no ; then
12561                         SASL_LIBS="-lsasl"
12562                         cat >> confdefs.h <<\EOF
12563 #define HAVE_CYRUS_SASL 1
12564 EOF
12565
12566                         ol_link_sasl=yes
12567                 fi
12568         fi
12569
12570         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12571                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12572         fi
12573 fi
12574
12575 if test $cross_compiling != yes ; then
12576         dev=no
12577         if test -r /dev/urandom ; then
12578                 dev="/dev/urandom";
12579         elif test -r /idev/urandom ; then
12580                 dev="/idev/urandom";
12581         elif test -r /dev/srandom ; then
12582                 dev="/dev/srandom";
12583         elif test -r /dev/random ; then
12584                 dev="/dev/random";
12585         elif test -r /idev/random ; then
12586                 dev="/idev/random";
12587         fi
12588
12589         if test $dev != no ; then
12590                 cat >> confdefs.h <<EOF
12591 #define URANDOM_DEVICE "$dev"
12592 EOF
12593
12594         fi
12595 fi
12596
12597 ol_link_fetch=no
12598 if test $ol_with_fetch != no ; then
12599         ol=$LIBS
12600 LIBS="-lfetch -lcom_err $LIBS"
12601 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12602 echo "configure:12603: checking fetch(3) library" >&5
12603 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12604   echo $ac_n "(cached) $ac_c" 1>&6
12605 else
12606   
12607         cat > conftest.$ac_ext <<EOF
12608 #line 12609 "configure"
12609 #include "confdefs.h"
12610
12611 #include <sys/param.h>
12612 #include <stdio.h>
12613 #include <fetch.h>
12614 int main() {
12615 struct url *u = fetchParseURL("file:///"); 
12616 ; return 0; }
12617 EOF
12618 if { (eval echo configure:12619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12619   rm -rf conftest*
12620   ol_cv_lib_fetch=yes
12621 else
12622   echo "configure: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   rm -rf conftest*
12625   ol_cv_lib_fetch=no
12626 fi
12627 rm -f conftest*
12628 fi
12629
12630 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12631 LIBS=$ol_LIBS
12632 if test $ol_cv_lib_fetch != no ; then
12633         ol_link_fetch="-lfetch -lcom_err"
12634         cat >> confdefs.h <<\EOF
12635 #define HAVE_FETCH 1
12636 EOF
12637
12638 fi
12639
12640
12641         if test $ol_cv_lib_fetch != no ; then
12642                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12643                 ol_link_fetch=freebsd
12644
12645         elif test $ol_with_fetch != auto ; then
12646                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12647         fi 
12648 fi
12649
12650 ol_link_readline=no
12651 if test $ol_with_readline != no ; then
12652         for ac_hdr in readline/readline.h readline/history.h
12653 do
12654 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12655 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12656 echo "configure:12657: checking for $ac_hdr" >&5
12657 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12658   echo $ac_n "(cached) $ac_c" 1>&6
12659 else
12660   cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663 #include <$ac_hdr>
12664 EOF
12665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12666 { (eval echo configure:12667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12668 if test -z "$ac_err"; then
12669   rm -rf conftest*
12670   eval "ac_cv_header_$ac_safe=yes"
12671 else
12672   echo "$ac_err" >&5
12673   echo "configure: failed program was:" >&5
12674   cat conftest.$ac_ext >&5
12675   rm -rf conftest*
12676   eval "ac_cv_header_$ac_safe=no"
12677 fi
12678 rm -f conftest*
12679 fi
12680 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12681   echo "$ac_t""yes" 1>&6
12682     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12683   cat >> confdefs.h <<EOF
12684 #define $ac_tr_hdr 1
12685 EOF
12686  
12687 else
12688   echo "$ac_t""no" 1>&6
12689 fi
12690 done
12691
12692
12693         if test $ac_cv_header_readline_readline_h = yes ; then
12694                 save_LIBS="$LIBS"
12695                 LIBS="$TERMCAP_LIBS $LIBS"
12696                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12697 echo "configure:12698: checking for readline in -lreadline" >&5
12698 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12700   echo $ac_n "(cached) $ac_c" 1>&6
12701 else
12702   ac_save_LIBS="$LIBS"
12703 LIBS="-lreadline  $LIBS"
12704 cat > conftest.$ac_ext <<EOF
12705 #line 12706 "configure"
12706 #include "confdefs.h"
12707 /* Override any gcc2 internal prototype to avoid an error.  */
12708 /* We use char because int might match the return type of a gcc2
12709     builtin and then its argument prototype would still apply.  */
12710 char readline();
12711
12712 int main() {
12713 readline()
12714 ; return 0; }
12715 EOF
12716 if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12717   rm -rf conftest*
12718   eval "ac_cv_lib_$ac_lib_var=yes"
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -rf conftest*
12723   eval "ac_cv_lib_$ac_lib_var=no"
12724 fi
12725 rm -f conftest*
12726 LIBS="$ac_save_LIBS"
12727
12728 fi
12729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12730   echo "$ac_t""yes" 1>&6
12731   have_readline=yes
12732 else
12733   echo "$ac_t""no" 1>&6
12734 have_readline=no
12735 fi
12736
12737                 LIBS="$save_LIBS"
12738                         
12739                 if test $have_readline = yes ; then
12740                         ol_with_readline=found
12741                         ol_link_readline=yes
12742
12743                         READLINE_LIBS="-lreadline"
12744                 fi
12745         fi
12746 fi
12747
12748 if test $ol_link_readline = yes ; then
12749         cat >> confdefs.h <<\EOF
12750 #define HAVE_READLINE 1
12751 EOF
12752
12753 fi
12754
12755
12756 if test $ol_enable_crypt != no ; then
12757         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12758 echo "configure:12759: checking for crypt" >&5
12759 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12760   echo $ac_n "(cached) $ac_c" 1>&6
12761 else
12762   cat > conftest.$ac_ext <<EOF
12763 #line 12764 "configure"
12764 #include "confdefs.h"
12765 /* System header to define __stub macros and hopefully few prototypes,
12766     which can conflict with char crypt(); below.  */
12767 #include <assert.h>
12768 /* Override any gcc2 internal prototype to avoid an error.  */
12769 /* We use char because int might match the return type of a gcc2
12770     builtin and then its argument prototype would still apply.  */
12771 char crypt();
12772 char (*f)();
12773
12774 int main() {
12775
12776 /* The GNU C library defines this for functions which it implements
12777     to always fail with ENOSYS.  Some functions are actually named
12778     something starting with __ and the normal name is an alias.  */
12779 #if defined (__stub_crypt) || defined (__stub___crypt)
12780 choke me
12781 #else
12782 f = crypt;
12783 #endif
12784
12785 ; return 0; }
12786 EOF
12787 if { (eval echo configure:12788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12788   rm -rf conftest*
12789   eval "ac_cv_func_crypt=yes"
12790 else
12791   echo "configure: failed program was:" >&5
12792   cat conftest.$ac_ext >&5
12793   rm -rf conftest*
12794   eval "ac_cv_func_crypt=no"
12795 fi
12796 rm -f conftest*
12797 fi
12798
12799 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12800   echo "$ac_t""yes" 1>&6
12801   have_crypt=yes
12802 else
12803   echo "$ac_t""no" 1>&6
12804
12805                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12806 echo "configure:12807: checking for crypt in -lcrypt" >&5
12807 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12809   echo $ac_n "(cached) $ac_c" 1>&6
12810 else
12811   ac_save_LIBS="$LIBS"
12812 LIBS="-lcrypt  $LIBS"
12813 cat > conftest.$ac_ext <<EOF
12814 #line 12815 "configure"
12815 #include "confdefs.h"
12816 /* Override any gcc2 internal prototype to avoid an error.  */
12817 /* We use char because int might match the return type of a gcc2
12818     builtin and then its argument prototype would still apply.  */
12819 char crypt();
12820
12821 int main() {
12822 crypt()
12823 ; return 0; }
12824 EOF
12825 if { (eval echo configure:12826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12826   rm -rf conftest*
12827   eval "ac_cv_lib_$ac_lib_var=yes"
12828 else
12829   echo "configure: failed program was:" >&5
12830   cat conftest.$ac_ext >&5
12831   rm -rf conftest*
12832   eval "ac_cv_lib_$ac_lib_var=no"
12833 fi
12834 rm -f conftest*
12835 LIBS="$ac_save_LIBS"
12836
12837 fi
12838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12839   echo "$ac_t""yes" 1>&6
12840   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12841                         have_crypt=yes
12842 else
12843   echo "$ac_t""no" 1>&6
12844 have_crypt=no
12845 fi
12846
12847 fi
12848
12849
12850         if test $have_crypt = yes ; then
12851                 cat >> confdefs.h <<\EOF
12852 #define HAVE_CRYPT 1
12853 EOF
12854
12855         else
12856                 echo "configure: warning: could not find crypt" 1>&2
12857                 if test $ol_enable_crypt = yes ; then
12858                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12859                 fi
12860
12861                 echo "configure: warning: disabling crypt support" 1>&2
12862                 ol_enable_crypt=no
12863         fi
12864 fi
12865
12866 if test $ol_enable_proctitle != no ; then
12867         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12868 echo "configure:12869: checking for setproctitle" >&5
12869 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12870   echo $ac_n "(cached) $ac_c" 1>&6
12871 else
12872   cat > conftest.$ac_ext <<EOF
12873 #line 12874 "configure"
12874 #include "confdefs.h"
12875 /* System header to define __stub macros and hopefully few prototypes,
12876     which can conflict with char setproctitle(); below.  */
12877 #include <assert.h>
12878 /* Override any gcc2 internal prototype to avoid an error.  */
12879 /* We use char because int might match the return type of a gcc2
12880     builtin and then its argument prototype would still apply.  */
12881 char setproctitle();
12882 char (*f)();
12883
12884 int main() {
12885
12886 /* The GNU C library defines this for functions which it implements
12887     to always fail with ENOSYS.  Some functions are actually named
12888     something starting with __ and the normal name is an alias.  */
12889 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12890 choke me
12891 #else
12892 f = setproctitle;
12893 #endif
12894
12895 ; return 0; }
12896 EOF
12897 if { (eval echo configure:12898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12898   rm -rf conftest*
12899   eval "ac_cv_func_setproctitle=yes"
12900 else
12901   echo "configure: failed program was:" >&5
12902   cat conftest.$ac_ext >&5
12903   rm -rf conftest*
12904   eval "ac_cv_func_setproctitle=no"
12905 fi
12906 rm -f conftest*
12907 fi
12908
12909 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12910   echo "$ac_t""yes" 1>&6
12911   have_setproctitle=yes
12912 else
12913   echo "$ac_t""no" 1>&6
12914
12915                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12916 echo "configure:12917: checking for setproctitle in -lutil" >&5
12917 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12919   echo $ac_n "(cached) $ac_c" 1>&6
12920 else
12921   ac_save_LIBS="$LIBS"
12922 LIBS="-lutil  $LIBS"
12923 cat > conftest.$ac_ext <<EOF
12924 #line 12925 "configure"
12925 #include "confdefs.h"
12926 /* Override any gcc2 internal prototype to avoid an error.  */
12927 /* We use char because int might match the return type of a gcc2
12928     builtin and then its argument prototype would still apply.  */
12929 char setproctitle();
12930
12931 int main() {
12932 setproctitle()
12933 ; return 0; }
12934 EOF
12935 if { (eval echo configure:12936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12936   rm -rf conftest*
12937   eval "ac_cv_lib_$ac_lib_var=yes"
12938 else
12939   echo "configure: failed program was:" >&5
12940   cat conftest.$ac_ext >&5
12941   rm -rf conftest*
12942   eval "ac_cv_lib_$ac_lib_var=no"
12943 fi
12944 rm -f conftest*
12945 LIBS="$ac_save_LIBS"
12946
12947 fi
12948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12949   echo "$ac_t""yes" 1>&6
12950   have_setproctitle=yes
12951                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12952 else
12953   echo "$ac_t""no" 1>&6
12954 have_setproctitle=no
12955                         LIBOBJS="$LIBOBJS setproctitle.o"
12956                         LIBSRCS="$LIBSRCS setproctitle.c"
12957 fi
12958
12959 fi
12960
12961
12962         if test $have_setproctitle = yes ; then
12963                 cat >> confdefs.h <<\EOF
12964 #define HAVE_SETPROCTITLE 1
12965 EOF
12966
12967         fi
12968 fi
12969
12970 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12971 echo "configure:12972: checking for ANSI C header files" >&5
12972 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12973   echo $ac_n "(cached) $ac_c" 1>&6
12974 else
12975   cat > conftest.$ac_ext <<EOF
12976 #line 12977 "configure"
12977 #include "confdefs.h"
12978 #include <stdlib.h>
12979 #include <stdarg.h>
12980 #include <string.h>
12981 #include <float.h>
12982 EOF
12983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12984 { (eval echo configure:12985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12986 if test -z "$ac_err"; then
12987   rm -rf conftest*
12988   ac_cv_header_stdc=yes
12989 else
12990   echo "$ac_err" >&5
12991   echo "configure: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   rm -rf conftest*
12994   ac_cv_header_stdc=no
12995 fi
12996 rm -f conftest*
12997
12998 if test $ac_cv_header_stdc = yes; then
12999   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13000 cat > conftest.$ac_ext <<EOF
13001 #line 13002 "configure"
13002 #include "confdefs.h"
13003 #include <string.h>
13004 EOF
13005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13006   egrep "memchr" >/dev/null 2>&1; then
13007   :
13008 else
13009   rm -rf conftest*
13010   ac_cv_header_stdc=no
13011 fi
13012 rm -f conftest*
13013
13014 fi
13015
13016 if test $ac_cv_header_stdc = yes; then
13017   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13018 cat > conftest.$ac_ext <<EOF
13019 #line 13020 "configure"
13020 #include "confdefs.h"
13021 #include <stdlib.h>
13022 EOF
13023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13024   egrep "free" >/dev/null 2>&1; then
13025   :
13026 else
13027   rm -rf conftest*
13028   ac_cv_header_stdc=no
13029 fi
13030 rm -f conftest*
13031
13032 fi
13033
13034 if test $ac_cv_header_stdc = yes; then
13035   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13036 if test "$cross_compiling" = yes; then
13037   :
13038 else
13039   cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042 #include <ctype.h>
13043 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13044 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13045 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13046 int main () { int i; for (i = 0; i < 256; i++)
13047 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13048 exit (0); }
13049
13050 EOF
13051 if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13052 then
13053   :
13054 else
13055   echo "configure: failed program was:" >&5
13056   cat conftest.$ac_ext >&5
13057   rm -fr conftest*
13058   ac_cv_header_stdc=no
13059 fi
13060 rm -fr conftest*
13061 fi
13062
13063 fi
13064 fi
13065
13066 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13067 if test $ac_cv_header_stdc = yes; then
13068   cat >> confdefs.h <<\EOF
13069 #define STDC_HEADERS 1
13070 EOF
13071
13072 fi
13073
13074 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13075 echo "configure:13076: checking for mode_t" >&5
13076 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13077   echo $ac_n "(cached) $ac_c" 1>&6
13078 else
13079   cat > conftest.$ac_ext <<EOF
13080 #line 13081 "configure"
13081 #include "confdefs.h"
13082 #include <sys/types.h>
13083 #if STDC_HEADERS
13084 #include <stdlib.h>
13085 #include <stddef.h>
13086 #endif
13087 EOF
13088 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13089   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13090   rm -rf conftest*
13091   eval "ac_cv_type_mode_t=yes"
13092 else
13093   rm -rf conftest*
13094   eval "ac_cv_type_mode_t=no"
13095 fi
13096 rm -f conftest*
13097
13098 fi
13099 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13100   echo "$ac_t""yes" 1>&6
13101 else
13102   echo "$ac_t""no" 1>&6
13103   cat >> confdefs.h <<EOF
13104 #define mode_t int
13105 EOF
13106
13107 fi
13108
13109 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13110 echo "configure:13111: checking for off_t" >&5
13111 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13112   echo $ac_n "(cached) $ac_c" 1>&6
13113 else
13114   cat > conftest.$ac_ext <<EOF
13115 #line 13116 "configure"
13116 #include "confdefs.h"
13117 #include <sys/types.h>
13118 #if STDC_HEADERS
13119 #include <stdlib.h>
13120 #include <stddef.h>
13121 #endif
13122 EOF
13123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13124   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13125   rm -rf conftest*
13126   eval "ac_cv_type_off_t=yes"
13127 else
13128   rm -rf conftest*
13129   eval "ac_cv_type_off_t=no"
13130 fi
13131 rm -f conftest*
13132
13133 fi
13134 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13135   echo "$ac_t""yes" 1>&6
13136 else
13137   echo "$ac_t""no" 1>&6
13138   cat >> confdefs.h <<EOF
13139 #define off_t long
13140 EOF
13141
13142 fi
13143
13144 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13145 echo "configure:13146: checking for pid_t" >&5
13146 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13147   echo $ac_n "(cached) $ac_c" 1>&6
13148 else
13149   cat > conftest.$ac_ext <<EOF
13150 #line 13151 "configure"
13151 #include "confdefs.h"
13152 #include <sys/types.h>
13153 #if STDC_HEADERS
13154 #include <stdlib.h>
13155 #include <stddef.h>
13156 #endif
13157 EOF
13158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13159   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13160   rm -rf conftest*
13161   eval "ac_cv_type_pid_t=yes"
13162 else
13163   rm -rf conftest*
13164   eval "ac_cv_type_pid_t=no"
13165 fi
13166 rm -f conftest*
13167
13168 fi
13169 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13170   echo "$ac_t""yes" 1>&6
13171 else
13172   echo "$ac_t""no" 1>&6
13173   cat >> confdefs.h <<EOF
13174 #define pid_t int
13175 EOF
13176
13177 fi
13178
13179 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13180 echo "configure:13181: checking for ptrdiff_t" >&5
13181 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13182   echo $ac_n "(cached) $ac_c" 1>&6
13183 else
13184   cat > conftest.$ac_ext <<EOF
13185 #line 13186 "configure"
13186 #include "confdefs.h"
13187 #include <stddef.h>
13188 int main() {
13189 ptrdiff_t p
13190 ; return 0; }
13191 EOF
13192 if { (eval echo configure:13193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13193   rm -rf conftest*
13194   am_cv_type_ptrdiff_t=yes
13195 else
13196   echo "configure: failed program was:" >&5
13197   cat conftest.$ac_ext >&5
13198   rm -rf conftest*
13199   am_cv_type_ptrdiff_t=no
13200 fi
13201 rm -f conftest*
13202 fi
13203
13204 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13205    if test $am_cv_type_ptrdiff_t = yes; then
13206      cat >> confdefs.h <<\EOF
13207 #define HAVE_PTRDIFF_T 1
13208 EOF
13209
13210    fi
13211
13212 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13213 echo "configure:13214: checking return type of signal handlers" >&5
13214 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13215   echo $ac_n "(cached) $ac_c" 1>&6
13216 else
13217   cat > conftest.$ac_ext <<EOF
13218 #line 13219 "configure"
13219 #include "confdefs.h"
13220 #include <sys/types.h>
13221 #include <signal.h>
13222 #ifdef signal
13223 #undef signal
13224 #endif
13225 #ifdef __cplusplus
13226 extern "C" void (*signal (int, void (*)(int)))(int);
13227 #else
13228 void (*signal ()) ();
13229 #endif
13230
13231 int main() {
13232 int i;
13233 ; return 0; }
13234 EOF
13235 if { (eval echo configure:13236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13236   rm -rf conftest*
13237   ac_cv_type_signal=void
13238 else
13239   echo "configure: failed program was:" >&5
13240   cat conftest.$ac_ext >&5
13241   rm -rf conftest*
13242   ac_cv_type_signal=int
13243 fi
13244 rm -f conftest*
13245 fi
13246
13247 echo "$ac_t""$ac_cv_type_signal" 1>&6
13248 cat >> confdefs.h <<EOF
13249 #define RETSIGTYPE $ac_cv_type_signal
13250 EOF
13251
13252
13253 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13254 echo "configure:13255: checking for size_t" >&5
13255 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13256   echo $ac_n "(cached) $ac_c" 1>&6
13257 else
13258   cat > conftest.$ac_ext <<EOF
13259 #line 13260 "configure"
13260 #include "confdefs.h"
13261 #include <sys/types.h>
13262 #if STDC_HEADERS
13263 #include <stdlib.h>
13264 #include <stddef.h>
13265 #endif
13266 EOF
13267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13268   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13269   rm -rf conftest*
13270   eval "ac_cv_type_size_t=yes"
13271 else
13272   rm -rf conftest*
13273   eval "ac_cv_type_size_t=no"
13274 fi
13275 rm -f conftest*
13276
13277 fi
13278 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13279   echo "$ac_t""yes" 1>&6
13280 else
13281   echo "$ac_t""no" 1>&6
13282   cat >> confdefs.h <<EOF
13283 #define size_t unsigned
13284 EOF
13285
13286 fi
13287
13288
13289 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13290 echo "configure:13291: checking for ssize_t" >&5
13291 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13292   echo $ac_n "(cached) $ac_c" 1>&6
13293 else
13294   cat > conftest.$ac_ext <<EOF
13295 #line 13296 "configure"
13296 #include "confdefs.h"
13297 #include <sys/types.h>
13298 #if STDC_HEADERS
13299 #include <stdlib.h>
13300 #include <stddef.h>
13301 #endif
13302 EOF
13303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13304   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13305   rm -rf conftest*
13306   eval "ac_cv_type_ssize_t=yes"
13307 else
13308   rm -rf conftest*
13309   eval "ac_cv_type_ssize_t=no"
13310 fi
13311 rm -f conftest*
13312
13313 fi
13314 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13315   echo "$ac_t""yes" 1>&6
13316 else
13317   echo "$ac_t""no" 1>&6
13318   cat >> confdefs.h <<EOF
13319 #define ssize_t signed int
13320 EOF
13321
13322 fi
13323
13324 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13325 echo "configure:13326: checking for caddr_t" >&5
13326 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13327   echo $ac_n "(cached) $ac_c" 1>&6
13328 else
13329   cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 #include <sys/types.h>
13333 #if STDC_HEADERS
13334 #include <stdlib.h>
13335 #include <stddef.h>
13336 #endif
13337 EOF
13338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13339   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13340   rm -rf conftest*
13341   eval "ac_cv_type_caddr_t=yes"
13342 else
13343   rm -rf conftest*
13344   eval "ac_cv_type_caddr_t=no"
13345 fi
13346 rm -f conftest*
13347
13348 fi
13349 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13350   echo "$ac_t""yes" 1>&6
13351 else
13352   echo "$ac_t""no" 1>&6
13353   cat >> confdefs.h <<EOF
13354 #define caddr_t char *
13355 EOF
13356
13357 fi
13358
13359
13360 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13361 echo "configure:13362: checking for socklen_t" >&5
13362 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13363   echo $ac_n "(cached) $ac_c" 1>&6
13364 else
13365   cat > conftest.$ac_ext <<EOF
13366 #line 13367 "configure"
13367 #include "confdefs.h"
13368
13369 #ifdef HAVE_SYS_TYPES_H
13370 #include <sys/types.h>
13371 #endif
13372 #ifdef HAVE_SYS_SOCKET_H
13373 #include <sys/socket.h>
13374 #endif
13375
13376 int main() {
13377 socklen_t len;
13378 ; return 0; }
13379 EOF
13380 if { (eval echo configure:13381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13381   rm -rf conftest*
13382   ol_cv_type_socklen_t=yes
13383 else
13384   echo "configure: failed program was:" >&5
13385   cat conftest.$ac_ext >&5
13386   rm -rf conftest*
13387   ol_cv_type_socklen_t=no
13388 fi
13389 rm -f conftest*
13390 fi
13391
13392 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13393   if test $ol_cv_type_socklen_t = no; then
13394     cat >> confdefs.h <<\EOF
13395 #define socklen_t int
13396 EOF
13397
13398   fi
13399  
13400 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13401 echo "configure:13402: checking for member st_blksize in aggregate type struct stat" >&5
13402 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13403   echo $ac_n "(cached) $ac_c" 1>&6
13404 else
13405   cat > conftest.$ac_ext <<EOF
13406 #line 13407 "configure"
13407 #include "confdefs.h"
13408 #include <sys/types.h>
13409 #include <sys/stat.h>
13410 int main() {
13411 struct stat foo; foo.st_blksize;
13412 ; return 0; }
13413 EOF
13414 if { (eval echo configure:13415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13415   rm -rf conftest*
13416   ac_cv_c_struct_member_st_blksize=yes
13417 else
13418   echo "configure: failed program was:" >&5
13419   cat conftest.$ac_ext >&5
13420   rm -rf conftest*
13421   ac_cv_c_struct_member_st_blksize=no
13422 fi
13423 rm -f conftest*
13424 fi
13425
13426 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13427 st_blksize="$ac_cv_c_struct_member_st_blksize"
13428 if test $ac_cv_c_struct_member_st_blksize = yes; then
13429   cat >> confdefs.h <<\EOF
13430 #define HAVE_ST_BLKSIZE 1
13431 EOF
13432
13433 fi
13434
13435 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13436 echo "configure:13437: checking whether time.h and sys/time.h may both be included" >&5
13437 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13438   echo $ac_n "(cached) $ac_c" 1>&6
13439 else
13440   cat > conftest.$ac_ext <<EOF
13441 #line 13442 "configure"
13442 #include "confdefs.h"
13443 #include <sys/types.h>
13444 #include <sys/time.h>
13445 #include <time.h>
13446 int main() {
13447 struct tm *tp;
13448 ; return 0; }
13449 EOF
13450 if { (eval echo configure:13451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13451   rm -rf conftest*
13452   ac_cv_header_time=yes
13453 else
13454   echo "configure: failed program was:" >&5
13455   cat conftest.$ac_ext >&5
13456   rm -rf conftest*
13457   ac_cv_header_time=no
13458 fi
13459 rm -f conftest*
13460 fi
13461
13462 echo "$ac_t""$ac_cv_header_time" 1>&6
13463 if test $ac_cv_header_time = yes; then
13464   cat >> confdefs.h <<\EOF
13465 #define TIME_WITH_SYS_TIME 1
13466 EOF
13467
13468 fi
13469
13470 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13471 echo "configure:13472: checking whether struct tm is in sys/time.h or time.h" >&5
13472 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13473   echo $ac_n "(cached) $ac_c" 1>&6
13474 else
13475   cat > conftest.$ac_ext <<EOF
13476 #line 13477 "configure"
13477 #include "confdefs.h"
13478 #include <sys/types.h>
13479 #include <time.h>
13480 int main() {
13481 struct tm *tp; tp->tm_sec;
13482 ; return 0; }
13483 EOF
13484 if { (eval echo configure:13485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13485   rm -rf conftest*
13486   ac_cv_struct_tm=time.h
13487 else
13488   echo "configure: failed program was:" >&5
13489   cat conftest.$ac_ext >&5
13490   rm -rf conftest*
13491   ac_cv_struct_tm=sys/time.h
13492 fi
13493 rm -f conftest*
13494 fi
13495
13496 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13497 if test $ac_cv_struct_tm = sys/time.h; then
13498   cat >> confdefs.h <<\EOF
13499 #define TM_IN_SYS_TIME 1
13500 EOF
13501
13502 fi
13503
13504 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13505 echo "configure:13506: checking for uid_t in sys/types.h" >&5
13506 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13507   echo $ac_n "(cached) $ac_c" 1>&6
13508 else
13509   cat > conftest.$ac_ext <<EOF
13510 #line 13511 "configure"
13511 #include "confdefs.h"
13512 #include <sys/types.h>
13513 EOF
13514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13515   egrep "uid_t" >/dev/null 2>&1; then
13516   rm -rf conftest*
13517   ac_cv_type_uid_t=yes
13518 else
13519   rm -rf conftest*
13520   ac_cv_type_uid_t=no
13521 fi
13522 rm -f conftest*
13523
13524 fi
13525
13526 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13527 if test $ac_cv_type_uid_t = no; then
13528   cat >> confdefs.h <<\EOF
13529 #define uid_t int
13530 EOF
13531
13532   cat >> confdefs.h <<\EOF
13533 #define gid_t int
13534 EOF
13535
13536 fi
13537
13538 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13539 echo "configure:13540: checking for sig_atomic_t" >&5
13540 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13541   echo $ac_n "(cached) $ac_c" 1>&6
13542 else
13543   cat > conftest.$ac_ext <<EOF
13544 #line 13545 "configure"
13545 #include "confdefs.h"
13546 #include <signal.h>
13547 int main() {
13548 sig_atomic_t atomic;
13549 ; return 0; }
13550 EOF
13551 if { (eval echo configure:13552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13552   rm -rf conftest*
13553   ol_cv_type_sig_atomic_t=yes
13554 else
13555   echo "configure: failed program was:" >&5
13556   cat conftest.$ac_ext >&5
13557   rm -rf conftest*
13558   ol_cv_type_sig_atomic_t=no
13559 fi
13560 rm -f conftest*
13561 fi
13562
13563 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13564   if test $ol_cv_type_sig_atomic_t = no; then
13565     cat >> confdefs.h <<\EOF
13566 #define sig_atomic_t int
13567 EOF
13568
13569   fi
13570  
13571
13572 if test "$ac_cv_mingw32" != yes ; then
13573     echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
13574 echo "configure:13575: checking type of array argument to getgroups" >&5
13575 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
13576   echo $ac_n "(cached) $ac_c" 1>&6
13577 else
13578   if test "$cross_compiling" = yes; then
13579   ac_cv_type_getgroups=cross
13580 else
13581   cat > conftest.$ac_ext <<EOF
13582 #line 13583 "configure"
13583 #include "confdefs.h"
13584
13585 /* Thanks to Mike Rendell for this test.  */
13586 #include <sys/types.h>
13587 #define NGID 256
13588 #undef MAX
13589 #define MAX(x, y) ((x) > (y) ? (x) : (y))
13590 main()
13591 {
13592   gid_t gidset[NGID];
13593   int i, n;
13594   union { gid_t gval; long lval; }  val;
13595
13596   val.lval = -1;
13597   for (i = 0; i < NGID; i++)
13598     gidset[i] = val.gval;
13599   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
13600                  gidset);
13601   /* Exit non-zero if getgroups seems to require an array of ints.  This
13602      happens when gid_t is short but getgroups modifies an array of ints.  */
13603   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
13604 }
13605
13606 EOF
13607 if { (eval echo configure:13608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13608 then
13609     ac_cv_type_getgroups=gid_t
13610 else
13611   echo "configure: failed program was:" >&5
13612   cat conftest.$ac_ext >&5
13613   rm -fr conftest*
13614   ac_cv_type_getgroups=int
13615 fi
13616 rm -fr conftest*
13617 fi
13618
13619 if test $ac_cv_type_getgroups = cross; then
13620         cat > conftest.$ac_ext <<EOF
13621 #line 13622 "configure"
13622 #include "confdefs.h"
13623 #include <unistd.h>
13624 EOF
13625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13626   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
13627   rm -rf conftest*
13628   ac_cv_type_getgroups=gid_t
13629 else
13630   rm -rf conftest*
13631   ac_cv_type_getgroups=int
13632 fi
13633 rm -f conftest*
13634
13635 fi
13636 fi
13637
13638 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
13639 cat >> confdefs.h <<EOF
13640 #define GETGROUPS_T $ac_cv_type_getgroups
13641 EOF
13642
13643
13644     # test for pw_gecos in struct passwd
13645 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13646 echo "configure:13647: checking struct passwd for pw_gecos" >&5
13647 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13648   echo $ac_n "(cached) $ac_c" 1>&6
13649 else
13650   
13651         cat > conftest.$ac_ext <<EOF
13652 #line 13653 "configure"
13653 #include "confdefs.h"
13654 #include <pwd.h>
13655 int main() {
13656
13657         struct passwd pwd;
13658         pwd.pw_gecos = pwd.pw_name;
13659
13660 ; return 0; }
13661 EOF
13662 if { (eval echo configure:13663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13663   rm -rf conftest*
13664   ol_cv_struct_passwd_pw_gecos=yes
13665 else
13666   echo "configure: failed program was:" >&5
13667   cat conftest.$ac_ext >&5
13668   rm -rf conftest*
13669   ol_cv_struct_passwd_pw_gecos=no
13670 fi
13671 rm -f conftest*
13672 fi
13673
13674 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13675 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13676         cat >> confdefs.h <<\EOF
13677 #define HAVE_PW_GECOS 1
13678 EOF
13679
13680 fi
13681
13682     # test for pw_passwd in struct passwd
13683 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13684 echo "configure:13685: checking struct passwd for pw_passwd" >&5
13685 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13686   echo $ac_n "(cached) $ac_c" 1>&6
13687 else
13688   
13689         cat > conftest.$ac_ext <<EOF
13690 #line 13691 "configure"
13691 #include "confdefs.h"
13692 #include <pwd.h>
13693 int main() {
13694
13695         struct passwd pwd;
13696         pwd.pw_passwd = pwd.pw_name;
13697
13698 ; return 0; }
13699 EOF
13700 if { (eval echo configure:13701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13701   rm -rf conftest*
13702   ol_cv_struct_passwd_pw_passwd=yes
13703 else
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -rf conftest*
13707   ol_cv_struct_passwd_pw_passwd=no
13708 fi
13709 rm -f conftest*
13710 fi
13711
13712 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13713 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13714         cat >> confdefs.h <<\EOF
13715 #define HAVE_PW_PASSWD 1
13716 EOF
13717
13718 fi
13719
13720 fi
13721
13722 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13723 echo "configure:13724: checking if toupper() requires islower()" >&5
13724 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13725   echo $ac_n "(cached) $ac_c" 1>&6
13726 else
13727   
13728         if test "$cross_compiling" = yes; then
13729   ol_cv_c_upper_lower=safe
13730 else
13731   cat > conftest.$ac_ext <<EOF
13732 #line 13733 "configure"
13733 #include "confdefs.h"
13734
13735 #include <ctype.h>
13736 main()
13737 {
13738         if ('C' == toupper('C'))
13739                 exit(0);
13740         else
13741                 exit(1);
13742 }
13743 EOF
13744 if { (eval echo configure:13745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13745 then
13746   ol_cv_c_upper_lower=no
13747 else
13748   echo "configure: failed program was:" >&5
13749   cat conftest.$ac_ext >&5
13750   rm -fr conftest*
13751   ol_cv_c_upper_lower=yes
13752 fi
13753 rm -fr conftest*
13754 fi
13755
13756 fi
13757
13758 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13759 if test $ol_cv_c_upper_lower != no ; then
13760         cat >> confdefs.h <<\EOF
13761 #define C_UPPER_LOWER 1
13762 EOF
13763
13764 fi
13765
13766 echo $ac_n "checking for working const""... $ac_c" 1>&6
13767 echo "configure:13768: checking for working const" >&5
13768 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13769   echo $ac_n "(cached) $ac_c" 1>&6
13770 else
13771   cat > conftest.$ac_ext <<EOF
13772 #line 13773 "configure"
13773 #include "confdefs.h"
13774
13775 int main() {
13776
13777 /* Ultrix mips cc rejects this.  */
13778 typedef int charset[2]; const charset x;
13779 /* SunOS 4.1.1 cc rejects this.  */
13780 char const *const *ccp;
13781 char **p;
13782 /* NEC SVR4.0.2 mips cc rejects this.  */
13783 struct point {int x, y;};
13784 static struct point const zero = {0,0};
13785 /* AIX XL C 1.02.0.0 rejects this.
13786    It does not let you subtract one const X* pointer from another in an arm
13787    of an if-expression whose if-part is not a constant expression */
13788 const char *g = "string";
13789 ccp = &g + (g ? g-g : 0);
13790 /* HPUX 7.0 cc rejects these. */
13791 ++ccp;
13792 p = (char**) ccp;
13793 ccp = (char const *const *) p;
13794 { /* SCO 3.2v4 cc rejects this.  */
13795   char *t;
13796   char const *s = 0 ? (char *) 0 : (char const *) 0;
13797
13798   *t++ = 0;
13799 }
13800 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13801   int x[] = {25, 17};
13802   const int *foo = &x[0];
13803   ++foo;
13804 }
13805 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13806   typedef const int *iptr;
13807   iptr p = 0;
13808   ++p;
13809 }
13810 { /* AIX XL C 1.02.0.0 rejects this saying
13811      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13812   struct s { int j; const int *ap[3]; };
13813   struct s *b; b->j = 5;
13814 }
13815 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13816   const int foo = 10;
13817 }
13818
13819 ; return 0; }
13820 EOF
13821 if { (eval echo configure:13822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13822   rm -rf conftest*
13823   ac_cv_c_const=yes
13824 else
13825   echo "configure: failed program was:" >&5
13826   cat conftest.$ac_ext >&5
13827   rm -rf conftest*
13828   ac_cv_c_const=no
13829 fi
13830 rm -f conftest*
13831 fi
13832
13833 echo "$ac_t""$ac_cv_c_const" 1>&6
13834 if test $ac_cv_c_const = no; then
13835   cat >> confdefs.h <<\EOF
13836 #define const 
13837 EOF
13838
13839 fi
13840
13841 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13842 echo "configure:13843: checking if compiler understands volatile" >&5
13843 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13844   echo $ac_n "(cached) $ac_c" 1>&6
13845 else
13846   cat > conftest.$ac_ext <<EOF
13847 #line 13848 "configure"
13848 #include "confdefs.h"
13849 int x, y, z;
13850 int main() {
13851 volatile int a; int * volatile b = x ? &y : &z;
13852       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13853       *b = 0;
13854 ; return 0; }
13855 EOF
13856 if { (eval echo configure:13857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13857   rm -rf conftest*
13858   ol_cv_c_volatile=yes
13859 else
13860   echo "configure: failed program was:" >&5
13861   cat conftest.$ac_ext >&5
13862   rm -rf conftest*
13863   ol_cv_c_volatile=no
13864 fi
13865 rm -f conftest*
13866 fi
13867
13868 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13869   if test $ol_cv_c_volatile = yes; then
13870     : 
13871   else
13872     cat >> confdefs.h <<\EOF
13873 #define volatile 
13874 EOF
13875
13876   fi
13877  
13878
13879 if test $cross_compiling = yes ; then
13880         cat >> confdefs.h <<\EOF
13881 #define CROSS_COMPILING 1
13882 EOF
13883
13884 else
13885         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13886 echo "configure:13887: checking whether byte ordering is bigendian" >&5
13887 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13888   echo $ac_n "(cached) $ac_c" 1>&6
13889 else
13890   ac_cv_c_bigendian=unknown
13891 # See if sys/param.h defines the BYTE_ORDER macro.
13892 cat > conftest.$ac_ext <<EOF
13893 #line 13894 "configure"
13894 #include "confdefs.h"
13895 #include <sys/types.h>
13896 #include <sys/param.h>
13897 int main() {
13898
13899 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13900  bogus endian macros
13901 #endif
13902 ; return 0; }
13903 EOF
13904 if { (eval echo configure:13905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13905   rm -rf conftest*
13906   # It does; now see whether it defined to BIG_ENDIAN or not.
13907 cat > conftest.$ac_ext <<EOF
13908 #line 13909 "configure"
13909 #include "confdefs.h"
13910 #include <sys/types.h>
13911 #include <sys/param.h>
13912 int main() {
13913
13914 #if BYTE_ORDER != BIG_ENDIAN
13915  not big endian
13916 #endif
13917 ; return 0; }
13918 EOF
13919 if { (eval echo configure:13920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13920   rm -rf conftest*
13921   ac_cv_c_bigendian=yes
13922 else
13923   echo "configure: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   rm -rf conftest*
13926   ac_cv_c_bigendian=no
13927 fi
13928 rm -f conftest*
13929 else
13930   echo "configure: failed program was:" >&5
13931   cat conftest.$ac_ext >&5
13932 fi
13933 rm -f conftest*
13934 if test $ac_cv_c_bigendian = unknown; then
13935 if test "$cross_compiling" = yes; then
13936     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13937 else
13938   cat > conftest.$ac_ext <<EOF
13939 #line 13940 "configure"
13940 #include "confdefs.h"
13941 main () {
13942   /* Are we little or big endian?  From Harbison&Steele.  */
13943   union
13944   {
13945     long l;
13946     char c[sizeof (long)];
13947   } u;
13948   u.l = 1;
13949   exit (u.c[sizeof (long) - 1] == 1);
13950 }
13951 EOF
13952 if { (eval echo configure:13953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13953 then
13954   ac_cv_c_bigendian=no
13955 else
13956   echo "configure: failed program was:" >&5
13957   cat conftest.$ac_ext >&5
13958   rm -fr conftest*
13959   ac_cv_c_bigendian=yes
13960 fi
13961 rm -fr conftest*
13962 fi
13963
13964 fi
13965 fi
13966
13967 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13968 if test $ac_cv_c_bigendian = yes; then
13969   cat >> confdefs.h <<\EOF
13970 #define WORDS_BIGENDIAN 1
13971 EOF
13972
13973 fi
13974
13975 fi
13976
13977 echo $ac_n "checking size of short""... $ac_c" 1>&6
13978 echo "configure:13979: checking size of short" >&5 
13979 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13980   echo $ac_n "(cached) $ac_c" 1>&6
13981 else
13982   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13985 "configure"
13985 #include "confdefs.h"
13986 #include "confdefs.h" 
13987 #include <sys/types.h> 
13988  
13989
13990 int main() {
13991 switch (0) case 0: case (sizeof (short) == $ac_size):;
13992 ; return 0; }
13993 EOF
13994 if { (eval echo configure:13995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13995   rm -rf conftest*
13996   ac_cv_sizeof_short=$ac_size
13997 else
13998   echo "configure: failed program was:" >&5
13999   cat conftest.$ac_ext >&5
14000 fi
14001 rm -f conftest* 
14002   if test x$ac_cv_sizeof_short != x ; then break; fi 
14003 done 
14004
14005 fi
14006  
14007 if test x$ac_cv_sizeof_short = x ; then 
14008   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14009 fi 
14010 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14011 cat >> confdefs.h <<EOF
14012 #define SIZEOF_SHORT $ac_cv_sizeof_short
14013 EOF
14014  
14015  
14016 echo $ac_n "checking size of int""... $ac_c" 1>&6
14017 echo "configure:14018: checking size of int" >&5 
14018 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14019   echo $ac_n "(cached) $ac_c" 1>&6
14020 else
14021   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14022   cat > conftest.$ac_ext <<EOF
14023 #line 14024 "configure"
14024 #include "confdefs.h"
14025 #include "confdefs.h" 
14026 #include <sys/types.h> 
14027  
14028
14029 int main() {
14030 switch (0) case 0: case (sizeof (int) == $ac_size):;
14031 ; return 0; }
14032 EOF
14033 if { (eval echo configure:14034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14034   rm -rf conftest*
14035   ac_cv_sizeof_int=$ac_size
14036 else
14037   echo "configure: failed program was:" >&5
14038   cat conftest.$ac_ext >&5
14039 fi
14040 rm -f conftest* 
14041   if test x$ac_cv_sizeof_int != x ; then break; fi 
14042 done 
14043
14044 fi
14045  
14046 if test x$ac_cv_sizeof_int = x ; then 
14047   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14048 fi 
14049 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14050 cat >> confdefs.h <<EOF
14051 #define SIZEOF_INT $ac_cv_sizeof_int
14052 EOF
14053  
14054  
14055 echo $ac_n "checking size of long""... $ac_c" 1>&6
14056 echo "configure:14057: checking size of long" >&5 
14057 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14058   echo $ac_n "(cached) $ac_c" 1>&6
14059 else
14060   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14061   cat > conftest.$ac_ext <<EOF
14062 #line 14063 "configure"
14063 #include "confdefs.h"
14064 #include "confdefs.h" 
14065 #include <sys/types.h> 
14066  
14067
14068 int main() {
14069 switch (0) case 0: case (sizeof (long) == $ac_size):;
14070 ; return 0; }
14071 EOF
14072 if { (eval echo configure:14073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14073   rm -rf conftest*
14074   ac_cv_sizeof_long=$ac_size
14075 else
14076   echo "configure: failed program was:" >&5
14077   cat conftest.$ac_ext >&5
14078 fi
14079 rm -f conftest* 
14080   if test x$ac_cv_sizeof_long != x ; then break; fi 
14081 done 
14082
14083 fi
14084  
14085 if test x$ac_cv_sizeof_long = x ; then 
14086   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14087 fi 
14088 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14089 cat >> confdefs.h <<EOF
14090 #define SIZEOF_LONG $ac_cv_sizeof_long
14091 EOF
14092  
14093
14094
14095 if test "$ac_cv_sizeof_int" -lt 4 ; then
14096         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14097
14098         cat >> confdefs.h <<\EOF
14099 #define LBER_INT_T long
14100 EOF
14101
14102         cat >> confdefs.h <<\EOF
14103 #define LBER_TAG_T long
14104 EOF
14105
14106         cat >> confdefs.h <<\EOF
14107 #define LBER_SOCKET_T int
14108 EOF
14109
14110 else
14111         cat >> confdefs.h <<\EOF
14112 #define LBER_INT_T int
14113 EOF
14114
14115         cat >> confdefs.h <<\EOF
14116 #define LBER_TAG_T long
14117 EOF
14118
14119         cat >> confdefs.h <<\EOF
14120 #define LBER_SOCKET_T int
14121 EOF
14122
14123 fi
14124
14125 cat >> confdefs.h <<\EOF
14126 #define LBER_LEN_T long
14127 EOF
14128
14129
14130 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14131 echo "configure:14132: checking for 8-bit clean memcmp" >&5
14132 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14133   echo $ac_n "(cached) $ac_c" 1>&6
14134 else
14135   if test "$cross_compiling" = yes; then
14136   ac_cv_func_memcmp_clean=no
14137 else
14138   cat > conftest.$ac_ext <<EOF
14139 #line 14140 "configure"
14140 #include "confdefs.h"
14141
14142 main()
14143 {
14144   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14145   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14146 }
14147
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14150 then
14151   ac_cv_func_memcmp_clean=yes
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -fr conftest*
14156   ac_cv_func_memcmp_clean=no
14157 fi
14158 rm -fr conftest*
14159 fi
14160
14161 fi
14162
14163 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14164 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14165
14166 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14167 echo "configure:14168: checking for strftime" >&5
14168 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14169   echo $ac_n "(cached) $ac_c" 1>&6
14170 else
14171   cat > conftest.$ac_ext <<EOF
14172 #line 14173 "configure"
14173 #include "confdefs.h"
14174 /* System header to define __stub macros and hopefully few prototypes,
14175     which can conflict with char strftime(); below.  */
14176 #include <assert.h>
14177 /* Override any gcc2 internal prototype to avoid an error.  */
14178 /* We use char because int might match the return type of a gcc2
14179     builtin and then its argument prototype would still apply.  */
14180 char strftime();
14181 char (*f)();
14182
14183 int main() {
14184
14185 /* The GNU C library defines this for functions which it implements
14186     to always fail with ENOSYS.  Some functions are actually named
14187     something starting with __ and the normal name is an alias.  */
14188 #if defined (__stub_strftime) || defined (__stub___strftime)
14189 choke me
14190 #else
14191 f = strftime;
14192 #endif
14193
14194 ; return 0; }
14195 EOF
14196 if { (eval echo configure:14197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14197   rm -rf conftest*
14198   eval "ac_cv_func_strftime=yes"
14199 else
14200   echo "configure: failed program was:" >&5
14201   cat conftest.$ac_ext >&5
14202   rm -rf conftest*
14203   eval "ac_cv_func_strftime=no"
14204 fi
14205 rm -f conftest*
14206 fi
14207
14208 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14209   echo "$ac_t""yes" 1>&6
14210   cat >> confdefs.h <<\EOF
14211 #define HAVE_STRFTIME 1
14212 EOF
14213
14214 else
14215   echo "$ac_t""no" 1>&6
14216 # strftime is in -lintl on SCO UNIX.
14217 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14218 echo "configure:14219: checking for strftime in -lintl" >&5
14219 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14220 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14221   echo $ac_n "(cached) $ac_c" 1>&6
14222 else
14223   ac_save_LIBS="$LIBS"
14224 LIBS="-lintl  $LIBS"
14225 cat > conftest.$ac_ext <<EOF
14226 #line 14227 "configure"
14227 #include "confdefs.h"
14228 /* Override any gcc2 internal prototype to avoid an error.  */
14229 /* We use char because int might match the return type of a gcc2
14230     builtin and then its argument prototype would still apply.  */
14231 char strftime();
14232
14233 int main() {
14234 strftime()
14235 ; return 0; }
14236 EOF
14237 if { (eval echo configure:14238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14238   rm -rf conftest*
14239   eval "ac_cv_lib_$ac_lib_var=yes"
14240 else
14241   echo "configure: failed program was:" >&5
14242   cat conftest.$ac_ext >&5
14243   rm -rf conftest*
14244   eval "ac_cv_lib_$ac_lib_var=no"
14245 fi
14246 rm -f conftest*
14247 LIBS="$ac_save_LIBS"
14248
14249 fi
14250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14251   echo "$ac_t""yes" 1>&6
14252   cat >> confdefs.h <<\EOF
14253 #define HAVE_STRFTIME 1
14254 EOF
14255
14256 LIBS="-lintl $LIBS"
14257 else
14258   echo "$ac_t""no" 1>&6
14259 fi
14260
14261 fi
14262
14263
14264 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14265 echo "configure:14266: checking for inet_aton()" >&5
14266 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14267   echo $ac_n "(cached) $ac_c" 1>&6
14268 else
14269   cat > conftest.$ac_ext <<EOF
14270 #line 14271 "configure"
14271 #include "confdefs.h"
14272
14273 #ifdef HAVE_SYS_TYPES_H
14274 #       include <sys/types.h>
14275 #endif
14276 #ifdef HAVE_SYS_SOCKET_H
14277 #       include <sys/socket.h>
14278 #       ifdef HAVE_SYS_SELECT_H
14279 #               include <sys/select.h>
14280 #       endif
14281 #       include <netinet/in.h>
14282 #       ifdef HAVE_ARPA_INET_H
14283 #               include <arpa/inet.h>
14284 #       endif
14285 #endif
14286
14287 int main() {
14288 struct in_addr in;
14289 int rc = inet_aton( "255.255.255.255", &in );
14290 ; return 0; }
14291 EOF
14292 if { (eval echo configure:14293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14293   rm -rf conftest*
14294   ol_cv_func_inet_aton=yes
14295 else
14296   echo "configure: failed program was:" >&5
14297   cat conftest.$ac_ext >&5
14298   rm -rf conftest*
14299   ol_cv_func_inet_aton=no
14300 fi
14301 rm -f conftest*
14302 fi
14303
14304 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14305   if test $ol_cv_func_inet_aton != no; then
14306     cat >> confdefs.h <<\EOF
14307 #define HAVE_INET_ATON 1
14308 EOF
14309
14310   fi
14311  
14312
14313 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14314 echo "configure:14315: checking for _spawnlp" >&5
14315 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14316   echo $ac_n "(cached) $ac_c" 1>&6
14317 else
14318   cat > conftest.$ac_ext <<EOF
14319 #line 14320 "configure"
14320 #include "confdefs.h"
14321 /* System header to define __stub macros and hopefully few prototypes,
14322     which can conflict with char _spawnlp(); below.  */
14323 #include <assert.h>
14324 /* Override any gcc2 internal prototype to avoid an error.  */
14325 /* We use char because int might match the return type of a gcc2
14326     builtin and then its argument prototype would still apply.  */
14327 char _spawnlp();
14328 char (*f)();
14329
14330 int main() {
14331
14332 /* The GNU C library defines this for functions which it implements
14333     to always fail with ENOSYS.  Some functions are actually named
14334     something starting with __ and the normal name is an alias.  */
14335 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14336 choke me
14337 #else
14338 f = _spawnlp;
14339 #endif
14340
14341 ; return 0; }
14342 EOF
14343 if { (eval echo configure:14344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14344   rm -rf conftest*
14345   eval "ac_cv_func__spawnlp=yes"
14346 else
14347   echo "configure: failed program was:" >&5
14348   cat conftest.$ac_ext >&5
14349   rm -rf conftest*
14350   eval "ac_cv_func__spawnlp=no"
14351 fi
14352 rm -f conftest*
14353 fi
14354
14355 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14356   echo "$ac_t""yes" 1>&6
14357   cat >> confdefs.h <<\EOF
14358 #define HAVE_SPAWNLP 1
14359 EOF
14360
14361 else
14362   echo "$ac_t""no" 1>&6
14363 fi
14364
14365
14366 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14367 echo "configure:14368: checking for _snprintf" >&5
14368 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14369   echo $ac_n "(cached) $ac_c" 1>&6
14370 else
14371   cat > conftest.$ac_ext <<EOF
14372 #line 14373 "configure"
14373 #include "confdefs.h"
14374 /* System header to define __stub macros and hopefully few prototypes,
14375     which can conflict with char _snprintf(); below.  */
14376 #include <assert.h>
14377 /* Override any gcc2 internal prototype to avoid an error.  */
14378 /* We use char because int might match the return type of a gcc2
14379     builtin and then its argument prototype would still apply.  */
14380 char _snprintf();
14381 char (*f)();
14382
14383 int main() {
14384
14385 /* The GNU C library defines this for functions which it implements
14386     to always fail with ENOSYS.  Some functions are actually named
14387     something starting with __ and the normal name is an alias.  */
14388 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14389 choke me
14390 #else
14391 f = _snprintf;
14392 #endif
14393
14394 ; return 0; }
14395 EOF
14396 if { (eval echo configure:14397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14397   rm -rf conftest*
14398   eval "ac_cv_func__snprintf=yes"
14399 else
14400   echo "configure: failed program was:" >&5
14401   cat conftest.$ac_ext >&5
14402   rm -rf conftest*
14403   eval "ac_cv_func__snprintf=no"
14404 fi
14405 rm -f conftest*
14406 fi
14407
14408 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14409   echo "$ac_t""yes" 1>&6
14410   ac_cv_func_snprintf=yes
14411         cat >> confdefs.h <<\EOF
14412 #define snprintf _snprintf
14413 EOF
14414
14415
14416 else
14417   echo "$ac_t""no" 1>&6
14418 fi
14419
14420
14421 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14422 echo "configure:14423: checking for _vsnprintf" >&5
14423 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14424   echo $ac_n "(cached) $ac_c" 1>&6
14425 else
14426   cat > conftest.$ac_ext <<EOF
14427 #line 14428 "configure"
14428 #include "confdefs.h"
14429 /* System header to define __stub macros and hopefully few prototypes,
14430     which can conflict with char _vsnprintf(); below.  */
14431 #include <assert.h>
14432 /* Override any gcc2 internal prototype to avoid an error.  */
14433 /* We use char because int might match the return type of a gcc2
14434     builtin and then its argument prototype would still apply.  */
14435 char _vsnprintf();
14436 char (*f)();
14437
14438 int main() {
14439
14440 /* The GNU C library defines this for functions which it implements
14441     to always fail with ENOSYS.  Some functions are actually named
14442     something starting with __ and the normal name is an alias.  */
14443 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14444 choke me
14445 #else
14446 f = _vsnprintf;
14447 #endif
14448
14449 ; return 0; }
14450 EOF
14451 if { (eval echo configure:14452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14452   rm -rf conftest*
14453   eval "ac_cv_func__vsnprintf=yes"
14454 else
14455   echo "configure: failed program was:" >&5
14456   cat conftest.$ac_ext >&5
14457   rm -rf conftest*
14458   eval "ac_cv_func__vsnprintf=no"
14459 fi
14460 rm -f conftest*
14461 fi
14462
14463 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14464   echo "$ac_t""yes" 1>&6
14465   ac_cv_func_vsnprintf=yes
14466         cat >> confdefs.h <<\EOF
14467 #define vsnprintf _vsnprintf
14468 EOF
14469
14470
14471 else
14472   echo "$ac_t""no" 1>&6
14473 fi
14474
14475
14476 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14477 echo "configure:14478: checking for vprintf" >&5
14478 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14479   echo $ac_n "(cached) $ac_c" 1>&6
14480 else
14481   cat > conftest.$ac_ext <<EOF
14482 #line 14483 "configure"
14483 #include "confdefs.h"
14484 /* System header to define __stub macros and hopefully few prototypes,
14485     which can conflict with char vprintf(); below.  */
14486 #include <assert.h>
14487 /* Override any gcc2 internal prototype to avoid an error.  */
14488 /* We use char because int might match the return type of a gcc2
14489     builtin and then its argument prototype would still apply.  */
14490 char vprintf();
14491 char (*f)();
14492
14493 int main() {
14494
14495 /* The GNU C library defines this for functions which it implements
14496     to always fail with ENOSYS.  Some functions are actually named
14497     something starting with __ and the normal name is an alias.  */
14498 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14499 choke me
14500 #else
14501 f = vprintf;
14502 #endif
14503
14504 ; return 0; }
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14507   rm -rf conftest*
14508   eval "ac_cv_func_vprintf=yes"
14509 else
14510   echo "configure: failed program was:" >&5
14511   cat conftest.$ac_ext >&5
14512   rm -rf conftest*
14513   eval "ac_cv_func_vprintf=no"
14514 fi
14515 rm -f conftest*
14516 fi
14517
14518 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14519   echo "$ac_t""yes" 1>&6
14520   cat >> confdefs.h <<\EOF
14521 #define HAVE_VPRINTF 1
14522 EOF
14523
14524 else
14525   echo "$ac_t""no" 1>&6
14526 fi
14527
14528 if test "$ac_cv_func_vprintf" != yes; then
14529 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14530 echo "configure:14531: checking for _doprnt" >&5
14531 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   cat > conftest.$ac_ext <<EOF
14535 #line 14536 "configure"
14536 #include "confdefs.h"
14537 /* System header to define __stub macros and hopefully few prototypes,
14538     which can conflict with char _doprnt(); below.  */
14539 #include <assert.h>
14540 /* Override any gcc2 internal prototype to avoid an error.  */
14541 /* We use char because int might match the return type of a gcc2
14542     builtin and then its argument prototype would still apply.  */
14543 char _doprnt();
14544 char (*f)();
14545
14546 int main() {
14547
14548 /* The GNU C library defines this for functions which it implements
14549     to always fail with ENOSYS.  Some functions are actually named
14550     something starting with __ and the normal name is an alias.  */
14551 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14552 choke me
14553 #else
14554 f = _doprnt;
14555 #endif
14556
14557 ; return 0; }
14558 EOF
14559 if { (eval echo configure:14560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14560   rm -rf conftest*
14561   eval "ac_cv_func__doprnt=yes"
14562 else
14563   echo "configure: failed program was:" >&5
14564   cat conftest.$ac_ext >&5
14565   rm -rf conftest*
14566   eval "ac_cv_func__doprnt=no"
14567 fi
14568 rm -f conftest*
14569 fi
14570
14571 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14572   echo "$ac_t""yes" 1>&6
14573   cat >> confdefs.h <<\EOF
14574 #define HAVE_DOPRNT 1
14575 EOF
14576
14577 else
14578   echo "$ac_t""no" 1>&6
14579 fi
14580
14581 fi
14582
14583
14584 if test $ac_cv_func_vprintf = yes ; then
14585                 for ac_func in vsnprintf vsprintf
14586 do
14587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14588 echo "configure:14589: checking for $ac_func" >&5
14589 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14590   echo $ac_n "(cached) $ac_c" 1>&6
14591 else
14592   cat > conftest.$ac_ext <<EOF
14593 #line 14594 "configure"
14594 #include "confdefs.h"
14595 /* System header to define __stub macros and hopefully few prototypes,
14596     which can conflict with char $ac_func(); below.  */
14597 #include <assert.h>
14598 /* Override any gcc2 internal prototype to avoid an error.  */
14599 /* We use char because int might match the return type of a gcc2
14600     builtin and then its argument prototype would still apply.  */
14601 char $ac_func();
14602 char (*f)();
14603
14604 int main() {
14605
14606 /* The GNU C library defines this for functions which it implements
14607     to always fail with ENOSYS.  Some functions are actually named
14608     something starting with __ and the normal name is an alias.  */
14609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14610 choke me
14611 #else
14612 f = $ac_func;
14613 #endif
14614
14615 ; return 0; }
14616 EOF
14617 if { (eval echo configure:14618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14618   rm -rf conftest*
14619   eval "ac_cv_func_$ac_func=yes"
14620 else
14621   echo "configure: failed program was:" >&5
14622   cat conftest.$ac_ext >&5
14623   rm -rf conftest*
14624   eval "ac_cv_func_$ac_func=no"
14625 fi
14626 rm -f conftest*
14627 fi
14628
14629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14630   echo "$ac_t""yes" 1>&6
14631     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14632   cat >> confdefs.h <<EOF
14633 #define $ac_tr_func 1
14634 EOF
14635  
14636 else
14637   echo "$ac_t""no" 1>&6
14638 fi
14639 done
14640
14641 fi
14642
14643 for ac_func in \
14644         bcopy                   \
14645         closesocket             \
14646         endgrent                \
14647         endpwent                \
14648         flock                   \
14649         getdtablesize   \
14650         getgrgid                \
14651         gethostname             \
14652         getpass                 \
14653         getpwuid                \
14654         getpwnam                \
14655         getspnam                \
14656         gettimeofday    \
14657         initgroups              \
14658         lockf                   \
14659         memcpy                  \
14660         memmove                 \
14661         mkstemp                 \
14662         pipe                    \
14663         read                    \
14664         recv                    \
14665         recvfrom                \
14666         setpwfile               \
14667         setgid                  \
14668         setegid                 \
14669         setsid                  \
14670         setuid                  \
14671         seteuid                 \
14672         sigaction               \
14673         signal                  \
14674         sigset                  \
14675         snprintf                \
14676         strdup                  \
14677         strerror                \
14678         strpbrk                 \
14679         strrchr                 \
14680         strsep                  \
14681         strstr                  \
14682         strtol                  \
14683         strtoul                 \
14684         strspn                  \
14685         sysconf                 \
14686         waitpid                 \
14687         wait4                   \
14688         write                   \
14689         send                    \
14690         sendto                  \
14691
14692 do
14693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14694 echo "configure:14695: checking for $ac_func" >&5
14695 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14696   echo $ac_n "(cached) $ac_c" 1>&6
14697 else
14698   cat > conftest.$ac_ext <<EOF
14699 #line 14700 "configure"
14700 #include "confdefs.h"
14701 /* System header to define __stub macros and hopefully few prototypes,
14702     which can conflict with char $ac_func(); below.  */
14703 #include <assert.h>
14704 /* Override any gcc2 internal prototype to avoid an error.  */
14705 /* We use char because int might match the return type of a gcc2
14706     builtin and then its argument prototype would still apply.  */
14707 char $ac_func();
14708 char (*f)();
14709
14710 int main() {
14711
14712 /* The GNU C library defines this for functions which it implements
14713     to always fail with ENOSYS.  Some functions are actually named
14714     something starting with __ and the normal name is an alias.  */
14715 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14716 choke me
14717 #else
14718 f = $ac_func;
14719 #endif
14720
14721 ; return 0; }
14722 EOF
14723 if { (eval echo configure:14724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14724   rm -rf conftest*
14725   eval "ac_cv_func_$ac_func=yes"
14726 else
14727   echo "configure: failed program was:" >&5
14728   cat conftest.$ac_ext >&5
14729   rm -rf conftest*
14730   eval "ac_cv_func_$ac_func=no"
14731 fi
14732 rm -f conftest*
14733 fi
14734
14735 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14736   echo "$ac_t""yes" 1>&6
14737     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14738   cat >> confdefs.h <<EOF
14739 #define $ac_tr_func 1
14740 EOF
14741  
14742 else
14743   echo "$ac_t""no" 1>&6
14744 fi
14745 done
14746
14747
14748 for ac_func in getopt tempnam
14749 do
14750 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14751 echo "configure:14752: checking for $ac_func" >&5
14752 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14753   echo $ac_n "(cached) $ac_c" 1>&6
14754 else
14755   cat > conftest.$ac_ext <<EOF
14756 #line 14757 "configure"
14757 #include "confdefs.h"
14758 /* System header to define __stub macros and hopefully few prototypes,
14759     which can conflict with char $ac_func(); below.  */
14760 #include <assert.h>
14761 /* Override any gcc2 internal prototype to avoid an error.  */
14762 /* We use char because int might match the return type of a gcc2
14763     builtin and then its argument prototype would still apply.  */
14764 char $ac_func();
14765 char (*f)();
14766
14767 int main() {
14768
14769 /* The GNU C library defines this for functions which it implements
14770     to always fail with ENOSYS.  Some functions are actually named
14771     something starting with __ and the normal name is an alias.  */
14772 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14773 choke me
14774 #else
14775 f = $ac_func;
14776 #endif
14777
14778 ; return 0; }
14779 EOF
14780 if { (eval echo configure:14781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14781   rm -rf conftest*
14782   eval "ac_cv_func_$ac_func=yes"
14783 else
14784   echo "configure: failed program was:" >&5
14785   cat conftest.$ac_ext >&5
14786   rm -rf conftest*
14787   eval "ac_cv_func_$ac_func=no"
14788 fi
14789 rm -f conftest*
14790 fi
14791
14792 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14793   echo "$ac_t""yes" 1>&6
14794     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14795   cat >> confdefs.h <<EOF
14796 #define $ac_tr_func 1
14797 EOF
14798  
14799 else
14800   echo "$ac_t""no" 1>&6
14801 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14802 fi
14803 done
14804
14805
14806
14807 if test "$ac_cv_func_getopt" != yes; then
14808     LIBSRCS="$LIBSRCS getopt.c"
14809 fi
14810
14811 if test "$ac_cv_func_tempnam" != yes; then
14812     LIBSRCS="$LIBSRCS tempnam.c"
14813 fi
14814
14815 # Check Configuration
14816 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14817 echo "configure:14818: checking declaration of sys_errlist" >&5
14818 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14819   echo $ac_n "(cached) $ac_c" 1>&6
14820 else
14821   
14822         cat > conftest.$ac_ext <<EOF
14823 #line 14824 "configure"
14824 #include "confdefs.h"
14825
14826 #include <stdio.h>
14827 #include <sys/types.h>
14828 #include <errno.h>
14829 #ifdef WINNT
14830 #include <stdlib.h>
14831 #endif 
14832 int main() {
14833 char *c = (char *) *sys_errlist
14834 ; return 0; }
14835 EOF
14836 if { (eval echo configure:14837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14837   rm -rf conftest*
14838   ol_cv_dcl_sys_errlist=yes
14839         ol_cv_have_sys_errlist=yes
14840 else
14841   echo "configure: failed program was:" >&5
14842   cat conftest.$ac_ext >&5
14843   rm -rf conftest*
14844   ol_cv_dcl_sys_errlist=no
14845 fi
14846 rm -f conftest*
14847 fi
14848
14849 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14850 #
14851 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14852 if test $ol_cv_dcl_sys_errlist = no ; then
14853         cat >> confdefs.h <<\EOF
14854 #define DECL_SYS_ERRLIST 1
14855 EOF
14856
14857
14858         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14859 echo "configure:14860: checking existence of sys_errlist" >&5
14860 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14861   echo $ac_n "(cached) $ac_c" 1>&6
14862 else
14863   
14864                 cat > conftest.$ac_ext <<EOF
14865 #line 14866 "configure"
14866 #include "confdefs.h"
14867 #include <errno.h>
14868 int main() {
14869 char *c = (char *) *sys_errlist
14870 ; return 0; }
14871 EOF
14872 if { (eval echo configure:14873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14873   rm -rf conftest*
14874   ol_cv_have_sys_errlist=yes
14875 else
14876   echo "configure: failed program was:" >&5
14877   cat conftest.$ac_ext >&5
14878   rm -rf conftest*
14879   ol_cv_have_sys_errlist=no
14880 fi
14881 rm -f conftest*
14882 fi
14883
14884 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14885 fi
14886 if test $ol_cv_have_sys_errlist = yes ; then
14887         cat >> confdefs.h <<\EOF
14888 #define HAVE_SYS_ERRLIST 1
14889 EOF
14890
14891 fi
14892
14893
14894
14895 if test "$ol_enable_debug" != no ; then
14896         cat >> confdefs.h <<\EOF
14897 #define LDAP_DEBUG 1
14898 EOF
14899
14900 fi
14901 if test "$ol_enable_syslog" = yes ; then
14902         cat >> confdefs.h <<\EOF
14903 #define LDAP_SYSLOG 1
14904 EOF
14905
14906 fi
14907 if test "$ol_enable_libui" = yes ; then
14908         cat >> confdefs.h <<\EOF
14909 #define LDAP_LIBUI 1
14910 EOF
14911
14912 fi
14913 if test "$ol_enable_cache" = no ; then
14914         cat >> confdefs.h <<\EOF
14915 #define LDAP_NOCACHE 1
14916 EOF
14917
14918 fi
14919 if test "$ol_enable_dns" != no ; then
14920         cat >> confdefs.h <<\EOF
14921 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14922 EOF
14923
14924 fi
14925 if test "$ol_enable_proctitle" != no ; then
14926         cat >> confdefs.h <<\EOF
14927 #define LDAP_PROCTITLE 1
14928 EOF
14929
14930 fi
14931 if test "$ol_enable_referrals" != no ; then
14932         cat >> confdefs.h <<\EOF
14933 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14934 EOF
14935
14936 fi
14937 if test "$ol_enable_cldap" != no ; then
14938         cat >> confdefs.h <<\EOF
14939 #define LDAP_CONNECTIONLESS 1
14940 EOF
14941
14942 fi
14943
14944 if test "$ol_enable_crypt" != no ; then
14945         cat >> confdefs.h <<\EOF
14946 #define SLAPD_CRYPT 1
14947 EOF
14948
14949 fi
14950 if test "$ol_enable_cleartext" != no ; then
14951         cat >> confdefs.h <<\EOF
14952 #define SLAPD_CLEARTEXT 1
14953 EOF
14954
14955 fi
14956 if test "$ol_enable_multimaster" != no ; then
14957         cat >> confdefs.h <<\EOF
14958 #define SLAPD_MULTIMASTER 1
14959 EOF
14960
14961 fi
14962 if test "$ol_enable_phonetic" != no ; then
14963         cat >> confdefs.h <<\EOF
14964 #define SLAPD_PHONETIC 1
14965 EOF
14966
14967 fi
14968 if test "$ol_enable_rlookups" != no ; then
14969         cat >> confdefs.h <<\EOF
14970 #define SLAPD_RLOOKUPS 1
14971 EOF
14972
14973 fi
14974 if test "$ol_enable_aci" != no ; then
14975         cat >> confdefs.h <<\EOF
14976 #define SLAPD_ACI_ENABLED 1
14977 EOF
14978
14979 fi
14980 if test "$ol_enable_discreteaci" != no ; then
14981         cat >> confdefs.h <<\EOF
14982 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14983 EOF
14984
14985 fi
14986
14987 if test "$ol_link_modules" != no ; then
14988         cat >> confdefs.h <<\EOF
14989 #define SLAPD_MODULES 1
14990 EOF
14991
14992         BUILD_SLAPD=yes
14993         SLAPD_MODULES_LDFLAGS="-dlopen self"
14994 fi
14995
14996 if test "$ol_link_bdb2" != no ; then
14997         cat >> confdefs.h <<\EOF
14998 #define SLAPD_BDB2 1
14999 EOF
15000
15001         BUILD_SLAPD=yes
15002         BUILD_BDB2=yes
15003         if test "$ol_with_bdb2_module" != static ; then
15004                 cat >> confdefs.h <<\EOF
15005 #define SLAPD_BDB2_DYNAMIC 1
15006 EOF
15007
15008                 BUILD_BDB2=mod
15009                 BUILD_BDB2_DYNAMIC=shared
15010                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15011         fi
15012 fi
15013
15014 if test "$ol_enable_ldap" != no ; then
15015         cat >> confdefs.h <<\EOF
15016 #define SLAPD_LDAP 1
15017 EOF
15018
15019         BUILD_SLAPD=yes
15020         BUILD_LDAP=yes
15021         if test "$ol_with_ldap_module" != static ; then
15022                 cat >> confdefs.h <<\EOF
15023 #define SLAPD_LDAP_DYNAMIC 1
15024 EOF
15025
15026                 BUILD_LDAP=mod
15027                 BUILD_LDAP_DYNAMIC=shared
15028                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15029         fi
15030 fi
15031
15032 if test "$ol_link_ldbm" != no ; then
15033         cat >> confdefs.h <<\EOF
15034 #define SLAPD_LDBM 1
15035 EOF
15036
15037         BUILD_SLAPD=yes
15038         BUILD_LDBM=yes
15039         if test "$ol_with_ldbm_module" != static ; then
15040                 cat >> confdefs.h <<\EOF
15041 #define SLAPD_LDBM_DYNAMIC 1
15042 EOF
15043
15044                 BUILD_LDBM=mod
15045                 BUILD_LDBM_DYNAMIC=shared
15046                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15047         fi
15048 fi
15049
15050 if test "$ol_enable_passwd" != no ; then
15051         cat >> confdefs.h <<\EOF
15052 #define SLAPD_PASSWD 1
15053 EOF
15054
15055         BUILD_SLAPD=yes
15056         BUILD_PASSWD=yes
15057         if test "$ol_with_passwd_module" != static ; then
15058                 cat >> confdefs.h <<\EOF
15059 #define SLAPD_PASSWD_DYNAMIC 1
15060 EOF
15061
15062                 BUILD_PASSWD=mod
15063                 BUILD_PASSWD_DYNAMIC=shared
15064                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15065         fi
15066 fi
15067
15068 if test "$ol_link_perl" != no ; then
15069         cat >> confdefs.h <<\EOF
15070 #define SLAPD_PERL 1
15071 EOF
15072
15073         BUILD_SLAPD=yes
15074         BUILD_PERL=yes
15075         if test "$ol_with_perl_module" != static ; then
15076                 cat >> confdefs.h <<\EOF
15077 #define SLAPD_PERL_DYNAMIC 1
15078 EOF
15079
15080                 BUILD_PERL=mod
15081                 BUILD_PERL_DYNAMIC=shared
15082                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15083         fi
15084 fi
15085
15086 if test "$ol_enable_shell" != no ; then
15087         cat >> confdefs.h <<\EOF
15088 #define SLAPD_SHELL 1
15089 EOF
15090
15091         BUILD_SLAPD=yes
15092         BUILD_SHELL=yes
15093         if test "$ol_with_shell_module" != static ; then
15094                 cat >> confdefs.h <<\EOF
15095 #define SLAPD_SHELL_DYNAMIC 1
15096 EOF
15097
15098                 BUILD_SHELL=mod
15099                 BUILD_SHELL_DYNAMIC=shared
15100                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15101         fi
15102 fi
15103
15104 if test "$ol_enable_tcl" != no ; then
15105         cat >> confdefs.h <<\EOF
15106 #define SLAPD_TCL 1
15107 EOF
15108
15109         BUILD_SLAPD=yes
15110         BUILD_TCL=yes
15111         if test "$ol_with_tcl_module" != static; then
15112                 cat >> confdefs.h <<\EOF
15113 #define SLAPD_TCL_DYNAMIC 1
15114 EOF
15115
15116                 BUILD_TCL=mod
15117                 BUILD_TCL_DYNAMIC=shared
15118                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15119         fi
15120 fi
15121
15122 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15123         $BUILD_SLAPD = yes ; then
15124         BUILD_SLURPD=yes
15125 fi
15126
15127 if test "$ol_link_isode" != no ; then
15128         BUILD_LDAPD=yes
15129 fi
15130
15131
15132 if test "$LINK_BINS_DYNAMIC" = yes; then
15133     LIB_LINKAGE=DYN
15134     LT_LIB_LINKAGE=shared
15135 else
15136     LIB_LINKAGE=STAT
15137     LT_LIB_LINKAGE=static
15138 fi
15139
15140 if test "$ac_cv_mingw32" = yes ; then
15141     PLAT=NT
15142     DYN_EXT=dll
15143 else
15144     PLAT=UNIX
15145     DYN_EXT=so
15146 fi
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157   
15158   
15159   
15160   
15161   
15162   
15163   
15164   
15165   
15166   
15167   
15168   
15169   
15170   
15171   
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202 trap '' 1 2 15
15203
15204 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15205
15206 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15207 # Let make expand exec_prefix.
15208 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15209
15210 # Any assignment to VPATH causes Sun make to only execute
15211 # the first set of double-colon rules, so remove it if not needed.
15212 # If there is a colon in the path, we need to keep it.
15213 if test "x$srcdir" = x.; then
15214   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15215 fi
15216
15217 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15218
15219 DEFS=-DHAVE_CONFIG_H
15220
15221 # Without the "./", some shells look in PATH for config.status.
15222 : ${CONFIG_STATUS=./config.status}
15223
15224 echo creating $CONFIG_STATUS
15225 rm -f $CONFIG_STATUS
15226 cat > $CONFIG_STATUS <<EOF
15227 #! /bin/sh
15228 # Generated automatically by configure.
15229 # Run this file to recreate the current configuration.
15230 # This directory was configured as follows,
15231 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15232 #
15233 # $0 $ac_configure_args
15234 #
15235 # Compiler output produced by configure, useful for debugging
15236 # configure, is in ./config.log if it exists.
15237
15238 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15239 for ac_option
15240 do
15241   case "\$ac_option" in
15242   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15243     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15244     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15245   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15246     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15247     exit 0 ;;
15248   -help | --help | --hel | --he | --h)
15249     echo "\$ac_cs_usage"; exit 0 ;;
15250   *) echo "\$ac_cs_usage"; exit 1 ;;
15251   esac
15252 done
15253
15254 ac_given_srcdir=$srcdir
15255 ac_given_INSTALL="$INSTALL"
15256
15257 trap 'rm -fr `echo "\
15258 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15259 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15260 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15261 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15262 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15263 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15264 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15265 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15266 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15267 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15268 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15269 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15270 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15271 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15272 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15273 include/Makefile:build/top.mk:include/Makefile.in \
15274 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15275 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15276 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15277 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15278 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15279 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15280 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15281 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15282 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15283 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15284 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15285 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15286 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15287 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15288 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15289 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15290 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15291 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15292 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15293 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15294 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15295 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15296 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15297 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15298 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15299 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15300  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15301 EOF
15302 cat >> $CONFIG_STATUS <<EOF
15303
15304 # Protect against being on the right side of a sed subst in config.status.
15305 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15306  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15307 $ac_vpsub
15308 $extrasub
15309 s%@SHELL@%$SHELL%g
15310 s%@CFLAGS@%$CFLAGS%g
15311 s%@CPPFLAGS@%$CPPFLAGS%g
15312 s%@CXXFLAGS@%$CXXFLAGS%g
15313 s%@FFLAGS@%$FFLAGS%g
15314 s%@DEFS@%$DEFS%g
15315 s%@LDFLAGS@%$LDFLAGS%g
15316 s%@LIBS@%$LIBS%g
15317 s%@exec_prefix@%$exec_prefix%g
15318 s%@prefix@%$prefix%g
15319 s%@program_transform_name@%$program_transform_name%g
15320 s%@bindir@%$bindir%g
15321 s%@sbindir@%$sbindir%g
15322 s%@libexecdir@%$libexecdir%g
15323 s%@datadir@%$datadir%g
15324 s%@sysconfdir@%$sysconfdir%g
15325 s%@sharedstatedir@%$sharedstatedir%g
15326 s%@localstatedir@%$localstatedir%g
15327 s%@libdir@%$libdir%g
15328 s%@includedir@%$includedir%g
15329 s%@oldincludedir@%$oldincludedir%g
15330 s%@infodir@%$infodir%g
15331 s%@mandir@%$mandir%g
15332 s%@host@%$host%g
15333 s%@host_alias@%$host_alias%g
15334 s%@host_cpu@%$host_cpu%g
15335 s%@host_vendor@%$host_vendor%g
15336 s%@host_os@%$host_os%g
15337 s%@target@%$target%g
15338 s%@target_alias@%$target_alias%g
15339 s%@target_cpu@%$target_cpu%g
15340 s%@target_vendor@%$target_vendor%g
15341 s%@target_os@%$target_os%g
15342 s%@build@%$build%g
15343 s%@build_alias@%$build_alias%g
15344 s%@build_cpu@%$build_cpu%g
15345 s%@build_vendor@%$build_vendor%g
15346 s%@build_os@%$build_os%g
15347 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15348 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15349 s%@INSTALL_DATA@%$INSTALL_DATA%g
15350 s%@PACKAGE@%$PACKAGE%g
15351 s%@VERSION@%$VERSION%g
15352 s%@ACLOCAL@%$ACLOCAL%g
15353 s%@AUTOCONF@%$AUTOCONF%g
15354 s%@AUTOMAKE@%$AUTOMAKE%g
15355 s%@AUTOHEADER@%$AUTOHEADER%g
15356 s%@MAKEINFO@%$MAKEINFO%g
15357 s%@install_sh@%$install_sh%g
15358 s%@AMTAR@%$AMTAR%g
15359 s%@AWK@%$AWK%g
15360 s%@AMTARFLAGS@%$AMTARFLAGS%g
15361 s%@SET_MAKE@%$SET_MAKE%g
15362 s%@top_builddir@%$top_builddir%g
15363 s%@ldap_subdir@%$ldap_subdir%g
15364 s%@CC@%$CC%g
15365 s%@RANLIB@%$RANLIB%g
15366 s%@LD@%$LD%g
15367 s%@NM@%$NM%g
15368 s%@LN_S@%$LN_S%g
15369 s%@DLLTOOL@%$DLLTOOL%g
15370 s%@AS@%$AS%g
15371 s%@OBJDUMP@%$OBJDUMP%g
15372 s%@LIBTOOL@%$LIBTOOL%g
15373 s%@LN_H@%$LN_H%g
15374 s%@SENDMAIL@%$SENDMAIL%g
15375 s%@EDITOR@%$EDITOR%g
15376 s%@FINGER@%$FINGER%g
15377 s%@PERLBIN@%$PERLBIN%g
15378 s%@CPP@%$CPP%g
15379 s%@EXEEXT@%$EXEEXT%g
15380 s%@OBJEXT@%$OBJEXT%g
15381 s%@OL_MKDEP@%$OL_MKDEP%g
15382 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15383 s%@PEPSY@%$PEPSY%g
15384 s%@LIBOBJS@%$LIBOBJS%g
15385 s%@LIBSRCS@%$LIBSRCS%g
15386 s%@PLAT@%$PLAT%g
15387 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15388 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15389 s%@DYN_EXT@%$DYN_EXT%g
15390 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15391 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15392 s%@BUILD_BDB2@%$BUILD_BDB2%g
15393 s%@BUILD_LDAP@%$BUILD_LDAP%g
15394 s%@BUILD_LDBM@%$BUILD_LDBM%g
15395 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15396 s%@BUILD_PERL@%$BUILD_PERL%g
15397 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15398 s%@BUILD_SHELL@%$BUILD_SHELL%g
15399 s%@BUILD_TCL@%$BUILD_TCL%g
15400 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15401 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15402 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15403 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15404 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15405 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15406 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15407 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15408 s%@LDAP_LIBS@%$LDAP_LIBS%g
15409 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15410 s%@LDIF_LIBS@%$LDIF_LIBS%g
15411 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15412 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15413 s%@LDBM_LIBS@%$LDBM_LIBS%g
15414 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15415 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15416 s%@WRAP_LIBS@%$WRAP_LIBS%g
15417 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15418 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15419 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15420 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15421 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15422 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15423 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15424 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15425 s%@KRB_LIBS@%$KRB_LIBS%g
15426 s%@READLINE_LIBS@%$READLINE_LIBS%g
15427 s%@SASL_LIBS@%$SASL_LIBS%g
15428 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15429 s%@TLS_LIBS@%$TLS_LIBS%g
15430 s%@MODULES_LIBS@%$MODULES_LIBS%g
15431
15432 CEOF
15433 EOF
15434
15435 cat >> $CONFIG_STATUS <<\EOF
15436
15437 # Split the substitutions into bite-sized pieces for seds with
15438 # small command number limits, like on Digital OSF/1 and HP-UX.
15439 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15440 ac_file=1 # Number of current file.
15441 ac_beg=1 # First line for current file.
15442 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15443 ac_more_lines=:
15444 ac_sed_cmds=""
15445 while $ac_more_lines; do
15446   if test $ac_beg -gt 1; then
15447     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15448   else
15449     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15450   fi
15451   if test ! -s conftest.s$ac_file; then
15452     ac_more_lines=false
15453     rm -f conftest.s$ac_file
15454   else
15455     if test -z "$ac_sed_cmds"; then
15456       ac_sed_cmds="sed -f conftest.s$ac_file"
15457     else
15458       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15459     fi
15460     ac_file=`expr $ac_file + 1`
15461     ac_beg=$ac_end
15462     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15463   fi
15464 done
15465 if test -z "$ac_sed_cmds"; then
15466   ac_sed_cmds=cat
15467 fi
15468 EOF
15469
15470 cat >> $CONFIG_STATUS <<EOF
15471
15472 CONFIG_FILES=\${CONFIG_FILES-"\
15473 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15474 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15475 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15476 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15477 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15478 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15479 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15480 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15481 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15482 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15483 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15484 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15485 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15486 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15487 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15488 include/Makefile:build/top.mk:include/Makefile.in \
15489 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15490 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15491 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15492 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15493 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15494 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15495 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15496 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15497 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15498 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15499 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15500 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15501 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15502 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15503 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15504 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15505 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15506 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15507 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15508 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15509 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15510 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15511 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15512 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15513 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15514 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15515 "}
15516 EOF
15517 cat >> $CONFIG_STATUS <<\EOF
15518 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15519   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15520   case "$ac_file" in
15521   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15522        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15523   *) ac_file_in="${ac_file}.in" ;;
15524   esac
15525
15526   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15527
15528   # Remove last slash and all that follows it.  Not all systems have dirname.
15529   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15530   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15531     # The file is in a subdirectory.
15532     test ! -d "$ac_dir" && mkdir "$ac_dir"
15533     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15534     # A "../" for each directory in $ac_dir_suffix.
15535     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15536   else
15537     ac_dir_suffix= ac_dots=
15538   fi
15539
15540   case "$ac_given_srcdir" in
15541   .)  srcdir=.
15542       if test -z "$ac_dots"; then top_srcdir=.
15543       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15544   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15545   *) # Relative path.
15546     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15547     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15548   esac
15549
15550   case "$ac_given_INSTALL" in
15551   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15552   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15553   esac
15554
15555   echo creating "$ac_file"
15556   rm -f "$ac_file"
15557   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15558   case "$ac_file" in
15559   *Makefile*) ac_comsub="1i\\
15560 # $configure_input" ;;
15561   *) ac_comsub= ;;
15562   esac
15563
15564   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15565   sed -e "$ac_comsub
15566 s%@configure_input@%$configure_input%g
15567 s%@srcdir@%$srcdir%g
15568 s%@top_srcdir@%$top_srcdir%g
15569 s%@INSTALL@%$INSTALL%g
15570 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15571 fi; done
15572 rm -f conftest.s*
15573
15574 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15575 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15576 #
15577 # ac_d sets the value in "#define NAME VALUE" lines.
15578 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15579 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15580 ac_dC='\3'
15581 ac_dD='%g'
15582 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15583 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15584 ac_uB='\([      ]\)%\1#\2define\3'
15585 ac_uC=' '
15586 ac_uD='\4%g'
15587 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15588 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15589 ac_eB='$%\1#\2define\3'
15590 ac_eC=' '
15591 ac_eD='%g'
15592
15593 if test "${CONFIG_HEADERS+set}" != set; then
15594 EOF
15595 cat >> $CONFIG_STATUS <<EOF
15596   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15597 EOF
15598 cat >> $CONFIG_STATUS <<\EOF
15599 fi
15600 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15601   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15602   case "$ac_file" in
15603   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15604        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15605   *) ac_file_in="${ac_file}.in" ;;
15606   esac
15607
15608   echo creating $ac_file
15609
15610   rm -f conftest.frag conftest.in conftest.out
15611   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15612   cat $ac_file_inputs > conftest.in
15613
15614 EOF
15615
15616 # Transform confdefs.h into a sed script conftest.vals that substitutes
15617 # the proper values into config.h.in to produce config.h.  And first:
15618 # Protect against being on the right side of a sed subst in config.status.
15619 # Protect against being in an unquoted here document in config.status.
15620 rm -f conftest.vals
15621 cat > conftest.hdr <<\EOF
15622 s/[\\&%]/\\&/g
15623 s%[\\$`]%\\&%g
15624 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15625 s%ac_d%ac_u%gp
15626 s%ac_u%ac_e%gp
15627 EOF
15628 sed -n -f conftest.hdr confdefs.h > conftest.vals
15629 rm -f conftest.hdr
15630
15631 # This sed command replaces #undef with comments.  This is necessary, for
15632 # example, in the case of _POSIX_SOURCE, which is predefined and required
15633 # on some systems where configure will not decide to define it.
15634 cat >> conftest.vals <<\EOF
15635 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15636 EOF
15637
15638 # Break up conftest.vals because some shells have a limit on
15639 # the size of here documents, and old seds have small limits too.
15640
15641 rm -f conftest.tail
15642 while :
15643 do
15644   ac_lines=`grep -c . conftest.vals`
15645   # grep -c gives empty output for an empty file on some AIX systems.
15646   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15647   # Write a limited-size here document to conftest.frag.
15648   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15649   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15650   echo 'CEOF
15651   sed -f conftest.frag conftest.in > conftest.out
15652   rm -f conftest.in
15653   mv conftest.out conftest.in
15654 ' >> $CONFIG_STATUS
15655   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15656   rm -f conftest.vals
15657   mv conftest.tail conftest.vals
15658 done
15659 rm -f conftest.vals
15660
15661 cat >> $CONFIG_STATUS <<\EOF
15662   rm -f conftest.frag conftest.h
15663   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15664   cat conftest.in >> conftest.h
15665   rm -f conftest.in
15666   if cmp -s $ac_file conftest.h 2>/dev/null; then
15667     echo "$ac_file is unchanged"
15668     rm -f conftest.h
15669   else
15670     # Remove last slash and all that follows it.  Not all systems have dirname.
15671       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15672       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15673       # The file is in a subdirectory.
15674       test ! -d "$ac_dir" && mkdir "$ac_dir"
15675     fi
15676     rm -f $ac_file
15677     mv conftest.h $ac_file
15678   fi
15679 fi; done
15680
15681 EOF
15682 cat >> $CONFIG_STATUS <<EOF
15683
15684 EOF
15685 cat >> $CONFIG_STATUS <<\EOF
15686
15687 date > stamp-h
15688 echo Please \"make depend\" to build dependencies
15689
15690 exit 0
15691 EOF
15692 chmod +x $CONFIG_STATUS
15693 rm -fr confdefs* $ac_clean_files
15694 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15695