]> git.sur5r.net Git - openldap/blob - configure
cfb5ab6923db48da06a04e28a0d7f099626b00c9
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.255 1999/09/09 18:35:44 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 # Guess values for system-dependent variables and create Makefiles.
13 # Generated automatically using autoconf version 2.13.1 
14 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
15 #
16 # This configure script is free software; the Free Software Foundation
17 # gives unlimited permission to copy, distribute and modify it.
18
19 # Defaults:
20 ac_help=
21 ac_default_prefix=/usr/local
22 # Any additions from configure.in:
23 ac_default_prefix=/usr/local
24 ac_help="$ac_help
25   --with-subdir=DIR change default subdirectory used for installs"
26 ac_help="$ac_help
27   --enable-debug        enable debugging (yes)"
28 ac_help="$ac_help
29   --enable-syslog       enable syslog support (auto)"
30 ac_help="$ac_help
31   --enable-proctitle    enable proctitle support (yes)"
32 ac_help="$ac_help
33   --enable-cache        enable caching (yes)"
34 ac_help="$ac_help
35   --enable-dns          enable V2 DX Referrals extension (no)"
36 ac_help="$ac_help
37   --enable-referrals    enable V2 Referrals extension (yes)"
38 ac_help="$ac_help
39   --enable-cldap        enable connectionless ldap (no)"
40 ac_help="$ac_help
41   --enable-x-compile    enable cross compiling (no)"
42 ac_help="$ac_help
43   --enable-dmalloc      enable debug malloc support (no)"
44 ac_help="$ac_help
45   --with-cyrus-sasl     with Cyrus SASL support (auto)"
46 ac_help="$ac_help
47   --with-fetch          with fetch URL support (auto)"
48 ac_help="$ac_help
49   --with-kerberos       with Kerberos support (auto)"
50 ac_help="$ac_help
51   --with-readline       with readline support (auto)"
52 ac_help="$ac_help
53   --with-threads        use threads (auto)"
54 ac_help="$ac_help
55   --with-tls            with TLS/SSL support (auto)"
56 ac_help="$ac_help
57   --with-yielding-select        with implicitly yielding select (auto)"
58 ac_help="$ac_help
59 LDAPD (X.500-to-LDAP Gateway) Options:"
60 ac_help="$ac_help
61   --enable-ldapd        enable building ldapd (no)"
62 ac_help="$ac_help
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd        enable building slapd (yes)"
66 ac_help="$ac_help
67     --enable-cleartext  enable cleartext passwords (yes)"
68 ac_help="$ac_help
69     --enable-crypt      enable crypt(3) passwords (auto)"
70 ac_help="$ac_help
71     --enable-modules    enable dynamic module support (no)"
72 ac_help="$ac_help
73     --enable-multimaster        enable multimaster replication (no)"
74 ac_help="$ac_help
75     --enable-phonetic   enable phonetic/soundex (no)"
76 ac_help="$ac_help
77     --enable-quipu      build quipu migration tools (no)"
78 ac_help="$ac_help
79     --enable-rlookups   enable reverse lookups (auto)"
80 ac_help="$ac_help
81     --enable-aci        enable per-object ACIs (no)"
82 ac_help="$ac_help
83     --enable-discreteaci        enable discrete rights in ACIs (no)"
84 ac_help="$ac_help
85     --enable-wrappers   enable tcp wrapper support (no)"
86 ac_help="$ac_help
87     --enable-bdb2       enable bdb2 backend (no)"
88 ac_help="$ac_help
89       --with-bdb2-module        module type (static)"
90 ac_help="$ac_help
91     --enable-ldap       enable ldap backend (no)"
92 ac_help="$ac_help
93       --with-ldap-module        module type (static)"
94 ac_help="$ac_help
95     --enable-ldbm       enable ldbm backend (yes)"
96 ac_help="$ac_help
97       --with-ldbm-api   use LDBM API (auto)"
98 ac_help="$ac_help
99       --with-ldbm-module        module type (static)"
100 ac_help="$ac_help
101       --with-ldbm-type  use LDBM type (auto)"
102 ac_help="$ac_help
103     --enable-passwd     enable passwd backend (no)"
104 ac_help="$ac_help
105       --with-passwd-module      module type (static)"
106 ac_help="$ac_help
107     --enable-perl       enable perl backend (no)"
108 ac_help="$ac_help
109       --with-perl-module        module type (static)"
110 ac_help="$ac_help
111     --enable-shell      enable shell backend (no)"
112 ac_help="$ac_help
113       --with-shell-module       module type (static)"
114 ac_help="$ac_help
115     --enable-tcl        enable tcl backend (no)"
116 ac_help="$ac_help
117       --with-tcl-module module type (static)"
118 ac_help="$ac_help
119 SLURPD (Replication Daemon) Options:"
120 ac_help="$ac_help
121   --enable-slurpd       enable building slurpd (auto)"
122 ac_help="$ac_help
123 Library Generation & Linking Options"
124 ac_help="$ac_help
125   --enable-static[=PKGS]  build static libraries [default=yes]"
126 ac_help="$ac_help
127   --enable-shared[=PKGS]  build shared libraries [default=yes]"
128 ac_help="$ac_help
129   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
130 ac_help="$ac_help
131   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
132 ac_help="$ac_help
133   --disable-libtool-lock  avoid locking (might break parallel builds)"
134
135 # Initialize some variables set by options.
136 # The variables have the same names as the options, with
137 # dashes changed to underlines.
138 build=NONE
139 cache_file=./config.cache
140 exec_prefix=NONE
141 host=NONE
142 no_create=
143 nonopt=NONE
144 no_recursion=
145 prefix=NONE
146 program_prefix=NONE
147 program_suffix=NONE
148 program_transform_name=s,x,x,
149 silent=
150 site=
151 srcdir=
152 target=NONE
153 verbose=
154 x_includes=NONE
155 x_libraries=NONE
156 bindir='${exec_prefix}/bin'
157 sbindir='${exec_prefix}/sbin'
158 libexecdir='${exec_prefix}/libexec'
159 datadir='${prefix}/share'
160 sysconfdir='${prefix}/etc'
161 sharedstatedir='${prefix}/com'
162 localstatedir='${prefix}/var'
163 libdir='${exec_prefix}/lib'
164 includedir='${prefix}/include'
165 oldincludedir='/usr/include'
166 infodir='${prefix}/info'
167 mandir='${prefix}/man'
168
169 # Initialize some other variables.
170 subdirs=
171 MFLAGS= MAKEFLAGS=
172 SHELL=${CONFIG_SHELL-/bin/sh}
173 # Maximum number of lines to put in a shell here document.
174 ac_max_here_lines=12
175
176 ac_prev=
177 for ac_option
178 do
179
180   # If the previous option needs an argument, assign it.
181   if test -n "$ac_prev"; then
182     eval "$ac_prev=\$ac_option"
183     ac_prev=
184     continue
185   fi
186
187   case "$ac_option" in
188   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
189   *) ac_optarg= ;;
190   esac
191
192   # Accept the important Cygnus configure options, so we can diagnose typos.
193
194   case "$ac_option" in
195
196   -bindir | --bindir | --bindi | --bind | --bin | --bi)
197     ac_prev=bindir ;;
198   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
199     bindir="$ac_optarg" ;;
200
201   -build | --build | --buil | --bui | --bu)
202     ac_prev=build ;;
203   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
204     build="$ac_optarg" ;;
205
206   -cache-file | --cache-file | --cache-fil | --cache-fi \
207   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
208     ac_prev=cache_file ;;
209   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
210   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
211     cache_file="$ac_optarg" ;;
212
213   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
214     ac_prev=datadir ;;
215   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
216   | --da=*)
217     datadir="$ac_optarg" ;;
218
219   -disable-* | --disable-*)
220     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
221     # Reject names that are not valid shell variable names.
222     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
223       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
224     fi
225     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
226     eval "enable_${ac_feature}=no" ;;
227
228   -enable-* | --enable-*)
229     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
230     # Reject names that are not valid shell variable names.
231     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
232       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233     fi
234     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235     case "$ac_option" in
236       *=*) ;;
237       *) ac_optarg=yes ;;
238     esac
239     eval "enable_${ac_feature}='$ac_optarg'" ;;
240
241   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
242   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
243   | --exec | --exe | --ex)
244     ac_prev=exec_prefix ;;
245   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
246   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
247   | --exec=* | --exe=* | --ex=*)
248     exec_prefix="$ac_optarg" ;;
249
250   -gas | --gas | --ga | --g)
251     # Obsolete; use --with-gas.
252     with_gas=yes ;;
253
254   -help | --help | --hel | --he)
255     # Omit some internal or obsolete options to make the list less imposing.
256     # This message is too long to be a string in the A/UX 3.1 sh.
257     cat << EOF
258 Usage: configure [options] [host]
259 Options: [defaults in brackets after descriptions]
260 Configuration:
261   --cache-file=FILE       cache test results in FILE
262   --help                  print this message
263   --no-create             do not create output files
264   --quiet, --silent       do not print \`checking...' messages
265   --version               print the version of autoconf that created configure
266 Directory and file names:
267   --prefix=PREFIX         install architecture-independent files in PREFIX
268                           [$ac_default_prefix]
269   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
270                           [same as prefix]
271   --bindir=DIR            user executables in DIR [EPREFIX/bin]
272   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
273   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
274   --datadir=DIR           read-only architecture-independent data in DIR
275                           [PREFIX/share]
276   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
277   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
278                           [PREFIX/com]
279   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
280   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
281   --includedir=DIR        C header files in DIR [PREFIX/include]
282   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
283   --infodir=DIR           info documentation in DIR [PREFIX/info]
284   --mandir=DIR            man documentation in DIR [PREFIX/man]
285   --srcdir=DIR            find the sources in DIR [configure dir or ..]
286   --program-prefix=PREFIX prepend PREFIX to installed program names
287   --program-suffix=SUFFIX append SUFFIX to installed program names
288   --program-transform-name=PROGRAM
289                           run sed PROGRAM on installed program names
290 EOF
291     cat << EOF
292 Host type:
293   --build=BUILD           configure for building on BUILD [BUILD=HOST]
294   --host=HOST             configure for HOST [guessed]
295   --target=TARGET         configure for TARGET [TARGET=HOST]
296 Features and packages:
297   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
298   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
299   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
300   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
301   --x-includes=DIR        X include files are in DIR
302   --x-libraries=DIR       X library files are in DIR
303 EOF
304     if test -n "$ac_help"; then
305       echo "--enable and --with options recognized:$ac_help"
306     fi
307     exit 0 ;;
308
309   -host | --host | --hos | --ho)
310     ac_prev=host ;;
311   -host=* | --host=* | --hos=* | --ho=*)
312     host="$ac_optarg" ;;
313
314   -includedir | --includedir | --includedi | --included | --include \
315   | --includ | --inclu | --incl | --inc)
316     ac_prev=includedir ;;
317   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
318   | --includ=* | --inclu=* | --incl=* | --inc=*)
319     includedir="$ac_optarg" ;;
320
321   -infodir | --infodir | --infodi | --infod | --info | --inf)
322     ac_prev=infodir ;;
323   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
324     infodir="$ac_optarg" ;;
325
326   -libdir | --libdir | --libdi | --libd)
327     ac_prev=libdir ;;
328   -libdir=* | --libdir=* | --libdi=* | --libd=*)
329     libdir="$ac_optarg" ;;
330
331   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
332   | --libexe | --libex | --libe)
333     ac_prev=libexecdir ;;
334   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
335   | --libexe=* | --libex=* | --libe=*)
336     libexecdir="$ac_optarg" ;;
337
338   -localstatedir | --localstatedir | --localstatedi | --localstated \
339   | --localstate | --localstat | --localsta | --localst \
340   | --locals | --local | --loca | --loc | --lo)
341     ac_prev=localstatedir ;;
342   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
343   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
344   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
345     localstatedir="$ac_optarg" ;;
346
347   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
348     ac_prev=mandir ;;
349   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
350     mandir="$ac_optarg" ;;
351
352   -nfp | --nfp | --nf)
353     # Obsolete; use --without-fp.
354     with_fp=no ;;
355
356   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
357   | --no-cr | --no-c)
358     no_create=yes ;;
359
360   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
361   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
362     no_recursion=yes ;;
363
364   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
365   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
366   | --oldin | --oldi | --old | --ol | --o)
367     ac_prev=oldincludedir ;;
368   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
369   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
370   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
371     oldincludedir="$ac_optarg" ;;
372
373   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
374     ac_prev=prefix ;;
375   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
376     prefix="$ac_optarg" ;;
377
378   -program-prefix | --program-prefix | --program-prefi | --program-pref \
379   | --program-pre | --program-pr | --program-p)
380     ac_prev=program_prefix ;;
381   -program-prefix=* | --program-prefix=* | --program-prefi=* \
382   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
383     program_prefix="$ac_optarg" ;;
384
385   -program-suffix | --program-suffix | --program-suffi | --program-suff \
386   | --program-suf | --program-su | --program-s)
387     ac_prev=program_suffix ;;
388   -program-suffix=* | --program-suffix=* | --program-suffi=* \
389   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
390     program_suffix="$ac_optarg" ;;
391
392   -program-transform-name | --program-transform-name \
393   | --program-transform-nam | --program-transform-na \
394   | --program-transform-n | --program-transform- \
395   | --program-transform | --program-transfor \
396   | --program-transfo | --program-transf \
397   | --program-trans | --program-tran \
398   | --progr-tra | --program-tr | --program-t)
399     ac_prev=program_transform_name ;;
400   -program-transform-name=* | --program-transform-name=* \
401   | --program-transform-nam=* | --program-transform-na=* \
402   | --program-transform-n=* | --program-transform-=* \
403   | --program-transform=* | --program-transfor=* \
404   | --program-transfo=* | --program-transf=* \
405   | --program-trans=* | --program-tran=* \
406   | --progr-tra=* | --program-tr=* | --program-t=*)
407     program_transform_name="$ac_optarg" ;;
408
409   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
410   | -silent | --silent | --silen | --sile | --sil)
411     silent=yes ;;
412
413   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
414     ac_prev=sbindir ;;
415   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
416   | --sbi=* | --sb=*)
417     sbindir="$ac_optarg" ;;
418
419   -sharedstatedir | --sharedstatedir | --sharedstatedi \
420   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
421   | --sharedst | --shareds | --shared | --share | --shar \
422   | --sha | --sh)
423     ac_prev=sharedstatedir ;;
424   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
425   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
426   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
427   | --sha=* | --sh=*)
428     sharedstatedir="$ac_optarg" ;;
429
430   -site | --site | --sit)
431     ac_prev=site ;;
432   -site=* | --site=* | --sit=*)
433     site="$ac_optarg" ;;
434
435   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
436     ac_prev=srcdir ;;
437   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
438     srcdir="$ac_optarg" ;;
439
440   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
441   | --syscon | --sysco | --sysc | --sys | --sy)
442     ac_prev=sysconfdir ;;
443   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
444   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
445     sysconfdir="$ac_optarg" ;;
446
447   -target | --target | --targe | --targ | --tar | --ta | --t)
448     ac_prev=target ;;
449   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
450     target="$ac_optarg" ;;
451
452   -v | -verbose | --verbose | --verbos | --verbo | --verb)
453     verbose=yes ;;
454
455   -version | --version | --versio | --versi | --vers)
456     echo "configure generated by autoconf version 2.13.1"
457     exit 0 ;;
458
459   -with-* | --with-*)
460     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
461     # Reject names that are not valid shell variable names.
462     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
463       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464     fi
465     ac_package=`echo $ac_package| sed 's/-/_/g'`
466     case "$ac_option" in
467       *=*) ;;
468       *) ac_optarg=yes ;;
469     esac
470     eval "with_${ac_package}='$ac_optarg'" ;;
471
472   -without-* | --without-*)
473     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
474     # Reject names that are not valid shell variable names.
475     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
476       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
477     fi
478     ac_package=`echo $ac_package| sed 's/-/_/g'`
479     eval "with_${ac_package}=no" ;;
480
481   --x)
482     # Obsolete; use --with-x.
483     with_x=yes ;;
484
485   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
486   | --x-incl | --x-inc | --x-in | --x-i)
487     ac_prev=x_includes ;;
488   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
489   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
490     x_includes="$ac_optarg" ;;
491
492   -x-libraries | --x-libraries | --x-librarie | --x-librari \
493   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
494     ac_prev=x_libraries ;;
495   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
496   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
497     x_libraries="$ac_optarg" ;;
498
499   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
500     ;;
501
502   *)
503     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
504       echo "configure: warning: $ac_option: invalid host type" 1>&2
505     fi
506     if test "x$nonopt" != xNONE; then
507       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
508     fi
509     nonopt="$ac_option"
510     ;;
511
512   esac
513 done
514
515 if test -n "$ac_prev"; then
516   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
517 fi
518
519 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
520
521 # File descriptor usage:
522 # 0 standard input
523 # 1 file creation
524 # 2 errors and warnings
525 # 3 some systems may open it to /dev/tty
526 # 4 used on the Kubota Titan
527 # 6 checking for... messages and results
528 # 5 compiler messages saved in config.log
529 if test "$silent" = yes; then
530   exec 6>/dev/null
531 else
532   exec 6>&1
533 fi
534 exec 5>./config.log
535
536 echo "\
537 This file contains any messages produced by compilers while
538 running configure, to aid debugging if configure makes a mistake.
539 " 1>&5
540
541 # Strip out --no-create and --no-recursion so they do not pile up.
542 # Also quote any args containing shell metacharacters.
543 ac_configure_args=
544 for ac_arg
545 do
546   case "$ac_arg" in
547   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
548   | --no-cr | --no-c) ;;
549   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
550   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
551   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
552   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
553   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
554   esac
555 done
556
557 # NLS nuisances.
558 # Only set these to C if already set.  These must not be set unconditionally
559 # because not all systems understand e.g. LANG=C (notably SCO).
560 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
561 # Non-C LC_CTYPE values break the ctype check.
562 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
563 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
564 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
565 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
566
567 # confdefs.h avoids OS command line length limits that DEFS can exceed.
568 rm -rf conftest* confdefs.h
569 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
570 echo > confdefs.h
571
572 # A filename unique to this package, relative to the directory that
573 # configure is in, which we can look for to find out if srcdir is correct.
574 ac_unique_file=build/version
575
576 # Find the source files, if location was not specified.
577 if test -z "$srcdir"; then
578   ac_srcdir_defaulted=yes
579   # Try the directory containing this script, then its parent.
580   ac_prog=$0
581   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
582   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
583   srcdir=$ac_confdir
584   if test ! -r $srcdir/$ac_unique_file; then
585     srcdir=..
586   fi
587 else
588   ac_srcdir_defaulted=no
589 fi
590 if test ! -r $srcdir/$ac_unique_file; then
591   if test "$ac_srcdir_defaulted" = yes; then
592     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
593   else
594     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
595   fi
596 fi
597 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
598
599 # Prefer explicitly selected file to automatically selected ones.
600 if test -z "$CONFIG_SITE"; then
601   if test "x$prefix" != xNONE; then
602     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
603   else
604     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
605   fi
606 fi
607 for ac_site_file in $CONFIG_SITE; do
608   if test -r "$ac_site_file"; then
609     echo "loading site script $ac_site_file"
610     . "$ac_site_file"
611   fi
612 done
613
614
615 ac_ext=c
616 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
617 ac_cpp='$CPP $CPPFLAGS'
618 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
619 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
620 cross_compiling=$ac_cv_prog_cc_cross
621
622 ac_exeext=
623 ac_objext=o
624 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
625   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
626   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
627     ac_n= ac_c='
628 ' ac_t='        '
629   else
630     ac_n=-n ac_c= ac_t=
631   fi
632 else
633   ac_n= ac_c='\c' ac_t=
634 fi
635
636 ac_aux_dir=
637 for ac_dir in build $srcdir/build; do
638   if test -f $ac_dir/install-sh; then
639     ac_aux_dir=$ac_dir
640     ac_install_sh="$ac_aux_dir/install-sh -c"
641     break
642   elif test -f $ac_dir/install.sh; then
643     ac_aux_dir=$ac_dir
644     ac_install_sh="$ac_aux_dir/install.sh -c"
645     break
646   fi
647 done
648 if test -z "$ac_aux_dir"; then
649   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
650 fi
651 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
652 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
653 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
654
655 OL_VERSION=`cat $ac_aux_dir/version`
656 if test -z "$OL_VERSION"; then
657         { echo "configure: error: could not determine version" 1>&2; exit 1; }
658 fi
659
660
661 echo $ac_n "checking host system type""... $ac_c" 1>&6
662 echo "configure:663: checking host system type" >&5
663 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
664
665 # Make sure we can run config.sub.
666   if $ac_config_sub sun4 >/dev/null 2>&1; then :
667     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
668   fi
669
670   ac_cv_host_alias=$host
671   case "$ac_cv_host_alias" in
672   NONE)
673     case $nonopt in
674     NONE)
675       if ac_cv_host_alias=`$ac_config_guess`; then :
676       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
677       fi ;;
678     *) ac_cv_host_alias=$nonopt ;;
679     esac ;;
680   esac
681
682   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
683   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
684   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
685   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
686 else
687   echo $ac_n "(cached) $ac_c" 1>&6
688 fi
689
690 echo "$ac_t""$ac_cv_host" 1>&6
691
692 host=$ac_cv_host
693 host_alias=$ac_cv_host_alias
694 host_cpu=$ac_cv_host_cpu
695 host_vendor=$ac_cv_host_vendor
696 host_os=$ac_cv_host_os
697
698
699
700
701
702 echo $ac_n "checking target system type""... $ac_c" 1>&6
703 echo "configure:704: checking target system type" >&5
704 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
705
706 # Make sure we can run config.sub.
707   if $ac_config_sub sun4 >/dev/null 2>&1; then :
708     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
709   fi
710
711   ac_cv_target_alias=$target
712   case "$ac_cv_target_alias" in
713   NONE)
714     case $nonopt in
715     NONE)
716       ac_cv_target_alias=$host_alias ;;
717
718     *) ac_cv_target_alias=$nonopt ;;
719     esac ;;
720   esac
721
722   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
723   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
724   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
725   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
726 else
727   echo $ac_n "(cached) $ac_c" 1>&6
728 fi
729
730 echo "$ac_t""$ac_cv_target" 1>&6
731
732 target=$ac_cv_target
733 target_alias=$ac_cv_target_alias
734 target_cpu=$ac_cv_target_cpu
735 target_vendor=$ac_cv_target_vendor
736 target_os=$ac_cv_target_os
737
738
739
740
741
742 echo $ac_n "checking build system type""... $ac_c" 1>&6
743 echo "configure:744: checking build system type" >&5
744 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
745
746 # Make sure we can run config.sub.
747   if $ac_config_sub sun4 >/dev/null 2>&1; then :
748     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
749   fi
750
751   ac_cv_build_alias=$build
752   case "$ac_cv_build_alias" in
753   NONE)
754     case $nonopt in
755     NONE)
756       ac_cv_build_alias=$host_alias ;;
757
758     *) ac_cv_build_alias=$nonopt ;;
759     esac ;;
760   esac
761
762   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
763   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
764   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
765   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
766 else
767   echo $ac_n "(cached) $ac_c" 1>&6
768 fi
769
770 echo "$ac_t""$ac_cv_build" 1>&6
771
772 build=$ac_cv_build
773 build_alias=$ac_cv_build_alias
774 build_cpu=$ac_cv_build_cpu
775 build_vendor=$ac_cv_build_vendor
776 build_os=$ac_cv_build_os
777
778
779
780
781
782 # Do some error checking and defaulting for the host and target type.
783 # The inputs are:
784 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
785 #
786 # The rules are:
787 # 1. You are not allowed to specify --host, --target, and nonopt at the
788 #    same time.
789 # 2. Host defaults to nonopt.
790 # 3. If nonopt is not specified, then host defaults to the current host,
791 #    as determined by config.guess.
792 # 4. Target and build default to nonopt.
793 # 5. If nonopt is not specified, then target and build default to host.
794
795 # The aliases save the names the user supplied, while $host etc.
796 # will get canonicalized.
797 case $host---$target---$nonopt in
798 NONE---*---* | *---NONE---* | *---*---NONE) ;;
799 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
800 esac
801
802 test "$host_alias" != "$target_alias" &&
803   test "$program_prefix$program_suffix$program_transform_name" = \
804     NONENONEs,x,x, &&
805   program_prefix=${target_alias}-
806
807
808 # Find a good install program.  We prefer a C program (faster),
809 # so one script is as good as another.  But avoid the broken or
810 # incompatible versions:
811 # SysV /etc/install, /usr/sbin/install
812 # SunOS /usr/etc/install
813 # IRIX /sbin/install
814 # AIX /bin/install
815 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
816 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
817 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
818 # ./install, which can be erroneously created by make from ./install.sh.
819 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
820 echo "configure:821: checking for a BSD compatible install" >&5
821 if test -z "$INSTALL"; then
822 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
823   echo $ac_n "(cached) $ac_c" 1>&6
824 else
825     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
826   for ac_dir in $PATH; do
827     # Account for people who put trailing slashes in PATH elements.
828     case "$ac_dir/" in
829     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
830     *)
831       # OSF1 and SCO ODT 3.0 have their own names for install.
832       # Don't use installbsd from OSF since it installs stuff as root
833       # by default.
834       for ac_prog in ginstall scoinst install; do
835         if test -f $ac_dir/$ac_prog; then
836           if test $ac_prog = install &&
837             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
838             # AIX install.  It has an incompatible calling convention.
839             :
840           elif test $ac_prog = install &&
841             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
842             # program-specific install script used by HP pwplus--don't use.
843             :
844           else
845             ac_cv_path_install="$ac_dir/$ac_prog -c"
846             break 2
847           fi
848         fi
849       done
850       ;;
851     esac
852   done
853   IFS="$ac_save_IFS"
854
855 fi
856   if test "${ac_cv_path_install+set}" = set; then
857     INSTALL="$ac_cv_path_install"
858   else
859     # As a last resort, use the slow shell script.  We don't cache a
860     # path for INSTALL within a source directory, because that will
861     # break other packages using the cache if that directory is
862     # removed, or if the path is relative.
863     INSTALL="$ac_install_sh"
864   fi
865 fi
866 echo "$ac_t""$INSTALL" 1>&6
867
868 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
869 # It thinks the first close brace ends the variable substitution.
870 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
871
872 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
873
874 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
875
876 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
877 echo "configure:878: checking whether build environment is sane" >&5
878 # Just in case
879 sleep 1
880 echo timestamp > conftestfile
881 # Do `set' in a subshell so we don't clobber the current shell's
882 # arguments.  Must try -L first in case configure is actually a
883 # symlink; some systems play weird games with the mod time of symlinks
884 # (eg FreeBSD returns the mod time of the symlink's containing
885 # directory).
886 if (
887    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
888    if test "$*" = "X"; then
889       # -L didn't work.
890       set X `ls -t $srcdir/configure conftestfile`
891    fi
892    if test "$*" != "X $srcdir/configure conftestfile" \
893       && test "$*" != "X conftestfile $srcdir/configure"; then
894
895       # If neither matched, then we have a broken ls.  This can happen
896       # if, for instance, CONFIG_SHELL is bash and it inherits a
897       # broken ls alias from the environment.  This has actually
898       # happened.  Such a system could not be considered "sane".
899       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
900 alias in your environment" 1>&2; exit 1; }
901    fi
902
903    test "$2" = conftestfile
904    )
905 then
906    # Ok.
907    :
908 else
909    { echo "configure: error: newly created file is older than distributed files!
910 Check your system clock" 1>&2; exit 1; }
911 fi
912 rm -f conftest*
913 echo "$ac_t""yes" 1>&6
914 if test "$program_transform_name" = s,x,x,; then
915   program_transform_name=
916 else
917   # Double any \ or $.  echo might interpret backslashes.
918   cat <<\EOF_SED > conftestsed
919 s,\\,\\\\,g; s,\$,$$,g
920 EOF_SED
921   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
922   rm -f conftestsed
923 fi
924 test "$program_prefix" != NONE &&
925   program_transform_name="s,^,${program_prefix},;$program_transform_name"
926 # Use a double $ so make ignores it.
927 test "$program_suffix" != NONE &&
928   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
929
930 # sed with no file args requires a program.
931 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
932
933 for ac_prog in mawk gawk nawk awk
934 do
935 # Extract the first word of "$ac_prog", so it can be a program name with args.
936 set dummy $ac_prog; ac_word=$2
937 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
938 echo "configure:939: checking for $ac_word" >&5
939 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
940   echo $ac_n "(cached) $ac_c" 1>&6
941 else
942   if test -n "$AWK"; then
943   ac_cv_prog_AWK="$AWK" # Let the user override the test.
944 else
945   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
946   ac_dummy="$PATH"
947   for ac_dir in $ac_dummy; do
948     test -z "$ac_dir" && ac_dir=.
949     if test -f $ac_dir/$ac_word; then
950       ac_cv_prog_AWK="$ac_prog"
951       break
952     fi
953   done
954   IFS="$ac_save_ifs"
955 fi
956 fi
957 AWK="$ac_cv_prog_AWK"
958 if test -n "$AWK"; then
959   echo "$ac_t""$AWK" 1>&6
960 else
961   echo "$ac_t""no" 1>&6
962 fi
963
964 test -n "$AWK" && break
965 done
966
967 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
968 echo "configure:969: checking whether ${MAKE-make} sets \${MAKE}" >&5
969 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
970 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
971   echo $ac_n "(cached) $ac_c" 1>&6
972 else
973   cat > conftestmake <<\EOF
974 all:
975         @echo 'ac_maketemp="${MAKE}"'
976 EOF
977 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
978 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
979 if test -n "$ac_maketemp"; then
980   eval ac_cv_prog_make_${ac_make}_set=yes
981 else
982   eval ac_cv_prog_make_${ac_make}_set=no
983 fi
984 rm -f conftestmake
985 fi
986 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
987   echo "$ac_t""yes" 1>&6
988   SET_MAKE=
989 else
990   echo "$ac_t""no" 1>&6
991   SET_MAKE="MAKE=${MAKE-make}"
992 fi
993
994
995
996 PACKAGE=OpenLDAP
997
998 VERSION=$OL_VERSION
999
1000 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1001   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1002 fi
1003
1004
1005
1006 missing_dir=`cd $ac_aux_dir && pwd`
1007 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1008 echo "configure:1009: checking for working aclocal" >&5
1009 # Run test in a subshell; some versions of sh will print an error if
1010 # an executable is not found, even if stderr is redirected.
1011 # Redirect stdin to placate older versions of autoconf.  Sigh.
1012 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1013    ACLOCAL=aclocal
1014    echo "$ac_t""found" 1>&6
1015 else
1016    ACLOCAL="$missing_dir/missing aclocal"
1017    echo "$ac_t""missing" 1>&6
1018 fi
1019
1020 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working autoconf" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1026    AUTOCONF=autoconf
1027    echo "$ac_t""found" 1>&6
1028 else
1029    AUTOCONF="$missing_dir/missing autoconf"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working automake" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (automake --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOMAKE=automake
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOMAKE="$missing_dir/missing automake"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working autoheader" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1052    AUTOHEADER=autoheader
1053    echo "$ac_t""found" 1>&6
1054 else
1055    AUTOHEADER="$missing_dir/missing autoheader"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1060 echo "configure:1061: checking for working makeinfo" >&5
1061 # Run test in a subshell; some versions of sh will print an error if
1062 # an executable is not found, even if stderr is redirected.
1063 # Redirect stdin to placate older versions of autoconf.  Sigh.
1064 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1065    MAKEINFO=makeinfo
1066    echo "$ac_t""found" 1>&6
1067 else
1068    MAKEINFO="$missing_dir/missing makeinfo"
1069    echo "$ac_t""missing" 1>&6
1070 fi
1071
1072 install_sh="$missing_dir/install-sh"
1073 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1074
1075 for ac_prog in gnutar gtar tar
1076 do
1077 # Extract the first word of "$ac_prog", so it can be a program name with args.
1078 set dummy $ac_prog; ac_word=$2
1079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1080 echo "configure:1081: checking for $ac_word" >&5
1081 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1082   echo $ac_n "(cached) $ac_c" 1>&6
1083 else
1084   if test -n "$AMTAR"; then
1085   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1086 else
1087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1088   ac_dummy="$PATH"
1089   for ac_dir in $ac_dummy; do
1090     test -z "$ac_dir" && ac_dir=.
1091     if test -f $ac_dir/$ac_word; then
1092       ac_cv_prog_AMTAR="$ac_prog"
1093       break
1094     fi
1095   done
1096   IFS="$ac_save_ifs"
1097 fi
1098 fi
1099 AMTAR="$ac_cv_prog_AMTAR"
1100 if test -n "$AMTAR"; then
1101   echo "$ac_t""$AMTAR" 1>&6
1102 else
1103   echo "$ac_t""no" 1>&6
1104 fi
1105
1106 test -n "$AMTAR" && break
1107 done
1108
1109
1110 AMTARFLAGS=
1111 if test -n "$AMTAR"; then
1112   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1113         AMTARFLAGS=o
1114   fi
1115 fi
1116
1117
1118
1119 cat >> confdefs.h <<EOF
1120 #define OPENLDAP_PACKAGE "$PACKAGE"
1121 EOF
1122
1123 cat >> confdefs.h <<EOF
1124 #define OPENLDAP_VERSION "$VERSION"
1125 EOF
1126
1127
1128
1129
1130 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1131 echo "configure:1132: checking configure arguments" >&5
1132
1133
1134 top_builddir=`pwd`
1135
1136 ldap_subdir="/openldap"
1137
1138 # Check whether --with-subdir or --without-subdir was given.
1139 if test "${with_subdir+set}" = set; then
1140   withval="$with_subdir"
1141   case "$withval" in
1142         no) ldap_subdir=""
1143                 ;;
1144         yes)
1145                 ;;
1146         /*|\\*)
1147                 ldap_subdir="$withval"
1148                 ;;
1149         *)
1150                 ldap_subdir="/$withval"
1151                 ;;
1152 esac
1153
1154 fi
1155
1156
1157 # OpenLDAP --enable-debug
1158         # Check whether --enable-debug or --disable-debug was given.
1159 if test "${enable_debug+set}" = set; then
1160   enableval="$enable_debug"
1161   
1162         ol_arg=invalid
1163         for ol_val in auto yes no ; do
1164                 if test "$enableval" = "$ol_val" ; then
1165                         ol_arg="$ol_val"
1166                 fi
1167         done
1168         if test "$ol_arg" = "invalid" ; then
1169                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1170         fi
1171         ol_enable_debug="$ol_arg"
1172
1173 else
1174         ol_enable_debug="yes"
1175 fi
1176 # end --enable-debug
1177 # OpenLDAP --enable-syslog
1178         # Check whether --enable-syslog or --disable-syslog was given.
1179 if test "${enable_syslog+set}" = set; then
1180   enableval="$enable_syslog"
1181   
1182         ol_arg=invalid
1183         for ol_val in auto yes no ; do
1184                 if test "$enableval" = "$ol_val" ; then
1185                         ol_arg="$ol_val"
1186                 fi
1187         done
1188         if test "$ol_arg" = "invalid" ; then
1189                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1190         fi
1191         ol_enable_syslog="$ol_arg"
1192
1193 else
1194         ol_enable_syslog="auto"
1195 fi
1196 # end --enable-syslog
1197 # OpenLDAP --enable-proctitle
1198         # Check whether --enable-proctitle or --disable-proctitle was given.
1199 if test "${enable_proctitle+set}" = set; then
1200   enableval="$enable_proctitle"
1201   
1202         ol_arg=invalid
1203         for ol_val in auto yes no ; do
1204                 if test "$enableval" = "$ol_val" ; then
1205                         ol_arg="$ol_val"
1206                 fi
1207         done
1208         if test "$ol_arg" = "invalid" ; then
1209                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1210         fi
1211         ol_enable_proctitle="$ol_arg"
1212
1213 else
1214         ol_enable_proctitle="yes"
1215 fi
1216 # end --enable-proctitle
1217 # OpenLDAP --enable-cache
1218         # Check whether --enable-cache or --disable-cache was given.
1219 if test "${enable_cache+set}" = set; then
1220   enableval="$enable_cache"
1221   
1222         ol_arg=invalid
1223         for ol_val in auto yes no ; do
1224                 if test "$enableval" = "$ol_val" ; then
1225                         ol_arg="$ol_val"
1226                 fi
1227         done
1228         if test "$ol_arg" = "invalid" ; then
1229                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1230         fi
1231         ol_enable_cache="$ol_arg"
1232
1233 else
1234         ol_enable_cache="yes"
1235 fi
1236 # end --enable-cache
1237 # OpenLDAP --enable-dns
1238         # Check whether --enable-dns or --disable-dns was given.
1239 if test "${enable_dns+set}" = set; then
1240   enableval="$enable_dns"
1241   
1242         ol_arg=invalid
1243         for ol_val in auto yes no ; do
1244                 if test "$enableval" = "$ol_val" ; then
1245                         ol_arg="$ol_val"
1246                 fi
1247         done
1248         if test "$ol_arg" = "invalid" ; then
1249                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1250         fi
1251         ol_enable_dns="$ol_arg"
1252
1253 else
1254         ol_enable_dns="no"
1255 fi
1256 # end --enable-dns
1257 # OpenLDAP --enable-referrals
1258         # Check whether --enable-referrals or --disable-referrals was given.
1259 if test "${enable_referrals+set}" = set; then
1260   enableval="$enable_referrals"
1261   
1262         ol_arg=invalid
1263         for ol_val in auto yes no ; do
1264                 if test "$enableval" = "$ol_val" ; then
1265                         ol_arg="$ol_val"
1266                 fi
1267         done
1268         if test "$ol_arg" = "invalid" ; then
1269                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1270         fi
1271         ol_enable_referrals="$ol_arg"
1272
1273 else
1274         ol_enable_referrals="yes"
1275 fi
1276 # end --enable-referrals
1277 # OpenLDAP --enable-cldap
1278         # Check whether --enable-cldap or --disable-cldap was given.
1279 if test "${enable_cldap+set}" = set; then
1280   enableval="$enable_cldap"
1281   
1282         ol_arg=invalid
1283         for ol_val in auto yes no ; do
1284                 if test "$enableval" = "$ol_val" ; then
1285                         ol_arg="$ol_val"
1286                 fi
1287         done
1288         if test "$ol_arg" = "invalid" ; then
1289                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1290         fi
1291         ol_enable_cldap="$ol_arg"
1292
1293 else
1294         ol_enable_cldap="no"
1295 fi
1296 # end --enable-cldap
1297 # OpenLDAP --enable-x_compile
1298         # Check whether --enable-x_compile or --disable-x_compile was given.
1299 if test "${enable_x_compile+set}" = set; then
1300   enableval="$enable_x_compile"
1301   
1302         ol_arg=invalid
1303         for ol_val in yes no ; do
1304                 if test "$enableval" = "$ol_val" ; then
1305                         ol_arg="$ol_val"
1306                 fi
1307         done
1308         if test "$ol_arg" = "invalid" ; then
1309                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1310         fi
1311         ol_enable_x_compile="$ol_arg"
1312
1313 else
1314         ol_enable_x_compile="no"
1315 fi
1316 # end --enable-x_compile
1317
1318 # OpenLDAP --enable-dmalloc
1319         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1320 if test "${enable_dmalloc+set}" = set; then
1321   enableval="$enable_dmalloc"
1322   
1323         ol_arg=invalid
1324         for ol_val in auto yes no ; do
1325                 if test "$enableval" = "$ol_val" ; then
1326                         ol_arg="$ol_val"
1327                 fi
1328         done
1329         if test "$ol_arg" = "invalid" ; then
1330                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1331         fi
1332         ol_enable_dmalloc="$ol_arg"
1333
1334 else
1335         ol_enable_dmalloc="no"
1336 fi
1337 # end --enable-dmalloc
1338
1339 # OpenLDAP --with-cyrus_sasl
1340         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1341 if test "${with_cyrus_sasl+set}" = set; then
1342   withval="$with_cyrus_sasl"
1343   
1344         ol_arg=invalid
1345         for ol_val in auto yes no  ; do
1346                 if test "$withval" = "$ol_val" ; then
1347                         ol_arg="$ol_val"
1348                 fi
1349         done
1350         if test "$ol_arg" = "invalid" ; then
1351                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1352         fi
1353         ol_with_cyrus_sasl="$ol_arg"
1354
1355 else
1356         ol_with_cyrus_sasl="auto"
1357 fi
1358 # end --with-cyrus_sasl
1359
1360 # OpenLDAP --with-fetch
1361         # Check whether --with-fetch or --without-fetch was given.
1362 if test "${with_fetch+set}" = set; then
1363   withval="$with_fetch"
1364   
1365         ol_arg=invalid
1366         for ol_val in auto yes no  ; do
1367                 if test "$withval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1373         fi
1374         ol_with_fetch="$ol_arg"
1375
1376 else
1377         ol_with_fetch="auto"
1378 fi
1379 # end --with-fetch
1380
1381 # OpenLDAP --with-kerberos
1382         # Check whether --with-kerberos or --without-kerberos was given.
1383 if test "${with_kerberos+set}" = set; then
1384   withval="$with_kerberos"
1385   
1386         ol_arg=invalid
1387         for ol_val in auto k5 k4 afs yes no ; do
1388                 if test "$withval" = "$ol_val" ; then
1389                         ol_arg="$ol_val"
1390                 fi
1391         done
1392         if test "$ol_arg" = "invalid" ; then
1393                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1394         fi
1395         ol_with_kerberos="$ol_arg"
1396
1397 else
1398         ol_with_kerberos="auto"
1399 fi
1400 # end --with-kerberos
1401
1402 # OpenLDAP --with-readline
1403         # Check whether --with-readline or --without-readline was given.
1404 if test "${with_readline+set}" = set; then
1405   withval="$with_readline"
1406   
1407         ol_arg=invalid
1408         for ol_val in auto yes no  ; do
1409                 if test "$withval" = "$ol_val" ; then
1410                         ol_arg="$ol_val"
1411                 fi
1412         done
1413         if test "$ol_arg" = "invalid" ; then
1414                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1415         fi
1416         ol_with_readline="$ol_arg"
1417
1418 else
1419         ol_with_readline="auto"
1420 fi
1421 # end --with-readline
1422
1423 # OpenLDAP --with-threads
1424         # Check whether --with-threads or --without-threads was given.
1425 if test "${with_threads+set}" = set; then
1426   withval="$with_threads"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto posix mach pth lwp yes no manual  ; do
1430                 if test "$withval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1436         fi
1437         ol_with_threads="$ol_arg"
1438
1439 else
1440         ol_with_threads="auto"
1441 fi
1442 # end --with-threads
1443
1444 # OpenLDAP --with-tls
1445         # Check whether --with-tls or --without-tls was given.
1446 if test "${with_tls+set}" = set; then
1447   withval="$with_tls"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto ssleay openssl yes no  ; do
1451                 if test "$withval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1457         fi
1458         ol_with_tls="$ol_arg"
1459
1460 else
1461         ol_with_tls="auto"
1462 fi
1463 # end --with-tls
1464
1465 # OpenLDAP --with-yielding_select
1466         # Check whether --with-yielding_select or --without-yielding_select was given.
1467 if test "${with_yielding_select+set}" = set; then
1468   withval="$with_yielding_select"
1469   
1470         ol_arg=invalid
1471         for ol_val in auto yes no manual  ; do
1472                 if test "$withval" = "$ol_val" ; then
1473                         ol_arg="$ol_val"
1474                 fi
1475         done
1476         if test "$ol_arg" = "invalid" ; then
1477                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1478         fi
1479         ol_with_yielding_select="$ol_arg"
1480
1481 else
1482         ol_with_yielding_select="auto"
1483 fi
1484 # end --with-yielding_select
1485
1486
1487
1488 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1489 if test "${with_xxldapdoptions+set}" = set; then
1490   withval="$with_xxldapdoptions"
1491   :
1492 fi
1493
1494 # OpenLDAP --enable-ldapd
1495         # Check whether --enable-ldapd or --disable-ldapd was given.
1496 if test "${enable_ldapd+set}" = set; then
1497   enableval="$enable_ldapd"
1498   
1499         ol_arg=invalid
1500         for ol_val in auto yes no ; do
1501                 if test "$enableval" = "$ol_val" ; then
1502                         ol_arg="$ol_val"
1503                 fi
1504         done
1505         if test "$ol_arg" = "invalid" ; then
1506                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1507         fi
1508         ol_enable_ldapd="$ol_arg"
1509
1510 else
1511         ol_enable_ldapd="no"
1512 fi
1513 # end --enable-ldapd
1514
1515 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1516 if test "${with_xxslapdoptions+set}" = set; then
1517   withval="$with_xxslapdoptions"
1518   :
1519 fi
1520
1521 # OpenLDAP --enable-slapd
1522         # Check whether --enable-slapd or --disable-slapd was given.
1523 if test "${enable_slapd+set}" = set; then
1524   enableval="$enable_slapd"
1525   
1526         ol_arg=invalid
1527         for ol_val in auto yes no ; do
1528                 if test "$enableval" = "$ol_val" ; then
1529                         ol_arg="$ol_val"
1530                 fi
1531         done
1532         if test "$ol_arg" = "invalid" ; then
1533                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1534         fi
1535         ol_enable_slapd="$ol_arg"
1536
1537 else
1538         ol_enable_slapd="yes"
1539 fi
1540 # end --enable-slapd
1541 # OpenLDAP --enable-cleartext
1542         # Check whether --enable-cleartext or --disable-cleartext was given.
1543 if test "${enable_cleartext+set}" = set; then
1544   enableval="$enable_cleartext"
1545   
1546         ol_arg=invalid
1547         for ol_val in auto yes no ; do
1548                 if test "$enableval" = "$ol_val" ; then
1549                         ol_arg="$ol_val"
1550                 fi
1551         done
1552         if test "$ol_arg" = "invalid" ; then
1553                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1554         fi
1555         ol_enable_cleartext="$ol_arg"
1556
1557 else
1558         ol_enable_cleartext="yes"
1559 fi
1560 # end --enable-cleartext
1561 # OpenLDAP --enable-crypt
1562         # Check whether --enable-crypt or --disable-crypt was given.
1563 if test "${enable_crypt+set}" = set; then
1564   enableval="$enable_crypt"
1565   
1566         ol_arg=invalid
1567         for ol_val in auto yes no ; do
1568                 if test "$enableval" = "$ol_val" ; then
1569                         ol_arg="$ol_val"
1570                 fi
1571         done
1572         if test "$ol_arg" = "invalid" ; then
1573                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1574         fi
1575         ol_enable_crypt="$ol_arg"
1576
1577 else
1578         ol_enable_crypt="auto"
1579 fi
1580 # end --enable-crypt
1581 # OpenLDAP --enable-modules
1582         # Check whether --enable-modules or --disable-modules was given.
1583 if test "${enable_modules+set}" = set; then
1584   enableval="$enable_modules"
1585   
1586         ol_arg=invalid
1587         for ol_val in auto yes no ; do
1588                 if test "$enableval" = "$ol_val" ; then
1589                         ol_arg="$ol_val"
1590                 fi
1591         done
1592         if test "$ol_arg" = "invalid" ; then
1593                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1594         fi
1595         ol_enable_modules="$ol_arg"
1596
1597 else
1598         ol_enable_modules="no"
1599 fi
1600 # end --enable-modules
1601 # OpenLDAP --enable-multimaster
1602         # Check whether --enable-multimaster or --disable-multimaster was given.
1603 if test "${enable_multimaster+set}" = set; then
1604   enableval="$enable_multimaster"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto yes no ; do
1608                 if test "$enableval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1614         fi
1615         ol_enable_multimaster="$ol_arg"
1616
1617 else
1618         ol_enable_multimaster="no"
1619 fi
1620 # end --enable-multimaster
1621 # OpenLDAP --enable-phonetic
1622         # Check whether --enable-phonetic or --disable-phonetic was given.
1623 if test "${enable_phonetic+set}" = set; then
1624   enableval="$enable_phonetic"
1625   
1626         ol_arg=invalid
1627         for ol_val in auto yes no ; do
1628                 if test "$enableval" = "$ol_val" ; then
1629                         ol_arg="$ol_val"
1630                 fi
1631         done
1632         if test "$ol_arg" = "invalid" ; then
1633                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1634         fi
1635         ol_enable_phonetic="$ol_arg"
1636
1637 else
1638         ol_enable_phonetic="no"
1639 fi
1640 # end --enable-phonetic
1641 # OpenLDAP --enable-quipu
1642         # Check whether --enable-quipu or --disable-quipu was given.
1643 if test "${enable_quipu+set}" = set; then
1644   enableval="$enable_quipu"
1645   
1646         ol_arg=invalid
1647         for ol_val in auto yes no ; do
1648                 if test "$enableval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1654         fi
1655         ol_enable_quipu="$ol_arg"
1656
1657 else
1658         ol_enable_quipu="no"
1659 fi
1660 # end --enable-quipu
1661 # OpenLDAP --enable-rlookups
1662         # Check whether --enable-rlookups or --disable-rlookups was given.
1663 if test "${enable_rlookups+set}" = set; then
1664   enableval="$enable_rlookups"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no ; do
1668                 if test "$enableval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1674         fi
1675         ol_enable_rlookups="$ol_arg"
1676
1677 else
1678         ol_enable_rlookups="auto"
1679 fi
1680 # end --enable-rlookups
1681 # OpenLDAP --enable-aci
1682         # Check whether --enable-aci or --disable-aci was given.
1683 if test "${enable_aci+set}" = set; then
1684   enableval="$enable_aci"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto yes no ; do
1688                 if test "$enableval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1694         fi
1695         ol_enable_aci="$ol_arg"
1696
1697 else
1698         ol_enable_aci="no"
1699 fi
1700 # end --enable-aci
1701 # OpenLDAP --enable-discreteaci
1702         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1703 if test "${enable_discreteaci+set}" = set; then
1704   enableval="$enable_discreteaci"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto yes no ; do
1708                 if test "$enableval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1714         fi
1715         ol_enable_discreteaci="$ol_arg"
1716
1717 else
1718         ol_enable_discreteaci="no"
1719 fi
1720 # end --enable-discreteaci
1721 # OpenLDAP --enable-wrappers
1722         # Check whether --enable-wrappers or --disable-wrappers was given.
1723 if test "${enable_wrappers+set}" = set; then
1724   enableval="$enable_wrappers"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto yes no ; do
1728                 if test "$enableval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1734         fi
1735         ol_enable_wrappers="$ol_arg"
1736
1737 else
1738         ol_enable_wrappers="no"
1739 fi
1740 # end --enable-wrappers
1741
1742 # OpenLDAP --enable-bdb2
1743         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1744 if test "${enable_bdb2+set}" = set; then
1745   enableval="$enable_bdb2"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto yes no ; do
1749                 if test "$enableval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1755         fi
1756         ol_enable_bdb2="$ol_arg"
1757
1758 else
1759         ol_enable_bdb2="no"
1760 fi
1761 # end --enable-bdb2
1762 # OpenLDAP --with-bdb2_module
1763         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1764 if test "${with_bdb2_module+set}" = set; then
1765   withval="$with_bdb2_module"
1766   
1767         ol_arg=invalid
1768         for ol_val in static dynamic ; do
1769                 if test "$withval" = "$ol_val" ; then
1770                         ol_arg="$ol_val"
1771                 fi
1772         done
1773         if test "$ol_arg" = "invalid" ; then
1774                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1775         fi
1776         ol_with_bdb2_module="$ol_arg"
1777
1778 else
1779         ol_with_bdb2_module="static"
1780 fi
1781 # end --with-bdb2_module
1782
1783 # OpenLDAP --enable-ldap
1784         # Check whether --enable-ldap or --disable-ldap was given.
1785 if test "${enable_ldap+set}" = set; then
1786   enableval="$enable_ldap"
1787   
1788         ol_arg=invalid
1789         for ol_val in auto yes no ; do
1790                 if test "$enableval" = "$ol_val" ; then
1791                         ol_arg="$ol_val"
1792                 fi
1793         done
1794         if test "$ol_arg" = "invalid" ; then
1795                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1796         fi
1797         ol_enable_ldap="$ol_arg"
1798
1799 else
1800         ol_enable_ldap="no"
1801 fi
1802 # end --enable-ldap
1803 # OpenLDAP --with-ldap_module
1804         # Check whether --with-ldap_module or --without-ldap_module was given.
1805 if test "${with_ldap_module+set}" = set; then
1806   withval="$with_ldap_module"
1807   
1808         ol_arg=invalid
1809         for ol_val in static dynamic ; do
1810                 if test "$withval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1816         fi
1817         ol_with_ldap_module="$ol_arg"
1818
1819 else
1820         ol_with_ldap_module="static"
1821 fi
1822 # end --with-ldap_module
1823
1824 # OpenLDAP --enable-ldbm
1825         # Check whether --enable-ldbm or --disable-ldbm was given.
1826 if test "${enable_ldbm+set}" = set; then
1827   enableval="$enable_ldbm"
1828   
1829         ol_arg=invalid
1830         for ol_val in auto yes no ; do
1831                 if test "$enableval" = "$ol_val" ; then
1832                         ol_arg="$ol_val"
1833                 fi
1834         done
1835         if test "$ol_arg" = "invalid" ; then
1836                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1837         fi
1838         ol_enable_ldbm="$ol_arg"
1839
1840 else
1841         ol_enable_ldbm="yes"
1842 fi
1843 # end --enable-ldbm
1844 # OpenLDAP --with-ldbm_api
1845         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1846 if test "${with_ldbm_api+set}" = set; then
1847   withval="$with_ldbm_api"
1848   
1849         ol_arg=invalid
1850         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1851                 if test "$withval" = "$ol_val" ; then
1852                         ol_arg="$ol_val"
1853                 fi
1854         done
1855         if test "$ol_arg" = "invalid" ; then
1856                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1857         fi
1858         ol_with_ldbm_api="$ol_arg"
1859
1860 else
1861         ol_with_ldbm_api="auto"
1862 fi
1863 # end --with-ldbm_api
1864
1865 # OpenLDAP --with-ldbm_module
1866         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1867 if test "${with_ldbm_module+set}" = set; then
1868   withval="$with_ldbm_module"
1869   
1870         ol_arg=invalid
1871         for ol_val in static dynamic ; do
1872                 if test "$withval" = "$ol_val" ; then
1873                         ol_arg="$ol_val"
1874                 fi
1875         done
1876         if test "$ol_arg" = "invalid" ; then
1877                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1878         fi
1879         ol_with_ldbm_module="$ol_arg"
1880
1881 else
1882         ol_with_ldbm_module="static"
1883 fi
1884 # end --with-ldbm_module
1885
1886 # OpenLDAP --with-ldbm_type
1887         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1888 if test "${with_ldbm_type+set}" = set; then
1889   withval="$with_ldbm_type"
1890   
1891         ol_arg=invalid
1892         for ol_val in auto btree hash ; do
1893                 if test "$withval" = "$ol_val" ; then
1894                         ol_arg="$ol_val"
1895                 fi
1896         done
1897         if test "$ol_arg" = "invalid" ; then
1898                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1899         fi
1900         ol_with_ldbm_type="$ol_arg"
1901
1902 else
1903         ol_with_ldbm_type="auto"
1904 fi
1905 # end --with-ldbm_type
1906
1907
1908 # OpenLDAP --enable-passwd
1909         # Check whether --enable-passwd or --disable-passwd was given.
1910 if test "${enable_passwd+set}" = set; then
1911   enableval="$enable_passwd"
1912   
1913         ol_arg=invalid
1914         for ol_val in auto yes no ; do
1915                 if test "$enableval" = "$ol_val" ; then
1916                         ol_arg="$ol_val"
1917                 fi
1918         done
1919         if test "$ol_arg" = "invalid" ; then
1920                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1921         fi
1922         ol_enable_passwd="$ol_arg"
1923
1924 else
1925         ol_enable_passwd="no"
1926 fi
1927 # end --enable-passwd
1928 # OpenLDAP --with-passwd_module
1929         # Check whether --with-passwd_module or --without-passwd_module was given.
1930 if test "${with_passwd_module+set}" = set; then
1931   withval="$with_passwd_module"
1932   
1933         ol_arg=invalid
1934         for ol_val in static dynamic ; do
1935                 if test "$withval" = "$ol_val" ; then
1936                         ol_arg="$ol_val"
1937                 fi
1938         done
1939         if test "$ol_arg" = "invalid" ; then
1940                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1941         fi
1942         ol_with_passwd_module="$ol_arg"
1943
1944 else
1945         ol_with_passwd_module="static"
1946 fi
1947 # end --with-passwd_module
1948
1949 # OpenLDAP --enable-perl
1950         # Check whether --enable-perl or --disable-perl was given.
1951 if test "${enable_perl+set}" = set; then
1952   enableval="$enable_perl"
1953   
1954         ol_arg=invalid
1955         for ol_val in auto yes no ; do
1956                 if test "$enableval" = "$ol_val" ; then
1957                         ol_arg="$ol_val"
1958                 fi
1959         done
1960         if test "$ol_arg" = "invalid" ; then
1961                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1962         fi
1963         ol_enable_perl="$ol_arg"
1964
1965 else
1966         ol_enable_perl="no"
1967 fi
1968 # end --enable-perl
1969 # OpenLDAP --with-perl_module
1970         # Check whether --with-perl_module or --without-perl_module was given.
1971 if test "${with_perl_module+set}" = set; then
1972   withval="$with_perl_module"
1973   
1974         ol_arg=invalid
1975         for ol_val in static dynamic ; do
1976                 if test "$withval" = "$ol_val" ; then
1977                         ol_arg="$ol_val"
1978                 fi
1979         done
1980         if test "$ol_arg" = "invalid" ; then
1981                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1982         fi
1983         ol_with_perl_module="$ol_arg"
1984
1985 else
1986         ol_with_perl_module="static"
1987 fi
1988 # end --with-perl_module
1989
1990 # OpenLDAP --enable-shell
1991         # Check whether --enable-shell or --disable-shell was given.
1992 if test "${enable_shell+set}" = set; then
1993   enableval="$enable_shell"
1994   
1995         ol_arg=invalid
1996         for ol_val in auto yes no ; do
1997                 if test "$enableval" = "$ol_val" ; then
1998                         ol_arg="$ol_val"
1999                 fi
2000         done
2001         if test "$ol_arg" = "invalid" ; then
2002                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2003         fi
2004         ol_enable_shell="$ol_arg"
2005
2006 else
2007         ol_enable_shell="no"
2008 fi
2009 # end --enable-shell
2010 # OpenLDAP --with-shell_module
2011         # Check whether --with-shell_module or --without-shell_module was given.
2012 if test "${with_shell_module+set}" = set; then
2013   withval="$with_shell_module"
2014   
2015         ol_arg=invalid
2016         for ol_val in static dynamic ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2023         fi
2024         ol_with_shell_module="$ol_arg"
2025
2026 else
2027         ol_with_shell_module="static"
2028 fi
2029 # end --with-shell_module
2030
2031 # OpenLDAP --enable-tcl
2032         # Check whether --enable-tcl or --disable-tcl was given.
2033 if test "${enable_tcl+set}" = set; then
2034   enableval="$enable_tcl"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto yes no ; do
2038                 if test "$enableval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2044         fi
2045         ol_enable_tcl="$ol_arg"
2046
2047 else
2048         ol_enable_tcl="no"
2049 fi
2050 # end --enable-tcl
2051 # OpenLDAP --with-tcl_module
2052         # Check whether --with-tcl_module or --without-tcl_module was given.
2053 if test "${with_tcl_module+set}" = set; then
2054   withval="$with_tcl_module"
2055   
2056         ol_arg=invalid
2057         for ol_val in static dynamic ; do
2058                 if test "$withval" = "$ol_val" ; then
2059                         ol_arg="$ol_val"
2060                 fi
2061         done
2062         if test "$ol_arg" = "invalid" ; then
2063                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2064         fi
2065         ol_with_tcl_module="$ol_arg"
2066
2067 else
2068         ol_with_tcl_module="static"
2069 fi
2070 # end --with-tcl_module
2071
2072
2073 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2074 if test "${with_xxslurpdoptions+set}" = set; then
2075   withval="$with_xxslurpdoptions"
2076   :
2077 fi
2078
2079 # OpenLDAP --enable-slurpd
2080         # Check whether --enable-slurpd or --disable-slurpd was given.
2081 if test "${enable_slurpd+set}" = set; then
2082   enableval="$enable_slurpd"
2083   
2084         ol_arg=invalid
2085         for ol_val in auto yes no ; do
2086                 if test "$enableval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2092         fi
2093         ol_enable_slurpd="$ol_arg"
2094
2095 else
2096         ol_enable_slurpd="auto"
2097 fi
2098 # end --enable-slurpd
2099
2100 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2101 if test "${with_xxliboptions+set}" = set; then
2102   withval="$with_xxliboptions"
2103   :
2104 fi
2105
2106 # Check whether --enable-static or --disable-static was given.
2107 if test "${enable_static+set}" = set; then
2108   enableval="$enable_static"
2109   p=${PACKAGE-default}
2110 case "$enableval" in
2111 yes) enable_static=yes ;;
2112 no) enable_static=no ;;
2113 *)
2114   enable_static=no
2115   # Look at the argument we got.  We use all the common list separators.
2116   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2117   for pkg in $enableval; do
2118     if test "X$pkg" = "X$p"; then
2119       enable_static=yes
2120     fi
2121   done
2122   IFS="$ac_save_ifs"
2123   ;;
2124 esac
2125 else
2126   enable_static=yes
2127 fi
2128
2129 # Check whether --enable-shared or --disable-shared was given.
2130 if test "${enable_shared+set}" = set; then
2131   enableval="$enable_shared"
2132   p=${PACKAGE-default}
2133 case "$enableval" in
2134 yes) enable_shared=yes ;;
2135 no) enable_shared=no ;;
2136 *)
2137   enable_shared=no
2138   # Look at the argument we got.  We use all the common list separators.
2139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2140   for pkg in $enableval; do
2141     if test "X$pkg" = "X$p"; then
2142       enable_shared=yes
2143     fi
2144   done
2145   IFS="$ac_save_ifs"
2146   ;;
2147 esac
2148 else
2149   enable_shared=yes
2150 fi
2151
2152
2153 # validate options
2154 if test $ol_enable_dns = yes ; then
2155         if test $ol_enable_referrals = no ; then
2156                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2157         fi
2158         if test $ol_enable_referrals = auto ; then
2159                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2160                 ol_enable_referrals=yes
2161         fi
2162 fi
2163
2164 if test $ol_enable_slapd = no ; then
2165                 if test $ol_enable_bdb2 = yes ; then
2166                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2167         fi
2168         if test $ol_enable_ldap = yes ; then
2169                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2170         fi
2171         if test $ol_enable_ldbm = yes ; then
2172                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2173         fi
2174         if test $ol_enable_passwd = yes ; then
2175                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2176         fi
2177         if test $ol_enable_perl = yes ; then
2178                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2179         fi
2180         if test $ol_enable_shell = yes ; then
2181                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2182         fi
2183         if test $ol_enable_tcl = yes ; then
2184                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2185         fi
2186         if test $ol_enable_modules = yes ; then
2187                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2188         fi
2189         if test $ol_enable_multimaster = yes ; then
2190                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2191         fi
2192         if test $ol_enable_wrappers = yes ; then
2193                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2194         fi
2195         if test $ol_enable_phonetic = yes ; then
2196                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2197         fi
2198         if test $ol_enable_quipu = yes ; then
2199                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2200         fi
2201         if test $ol_enable_rlookups = yes ; then
2202                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2203         fi
2204         if test $ol_enable_aci = yes ; then
2205                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2206         fi
2207         if test $ol_enable_discreteaci = yes ; then
2208                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2209         fi
2210         if test $ol_with_ldbm_api != auto ; then
2211                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2212         fi
2213         if test $ol_with_ldbm_type != auto ; then
2214                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2215         fi
2216         if test $ol_with_bdb2_module != static ; then
2217                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2218         fi
2219         if test $ol_with_ldap_module != static ; then
2220                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2221         fi
2222         if test $ol_with_ldbm_module != static ; then
2223                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2224         fi
2225         if test $ol_with_passwd_module != static ; then
2226                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2227         fi
2228         if test $ol_with_perl_module != static ; then
2229                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2230         fi
2231         if test $ol_with_shell_module != static ; then
2232                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2233         fi
2234         if test $ol_with_tcl_module != static ; then
2235                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2236         fi
2237         if test $ol_enable_slurpd = yes ; then
2238                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2239         fi
2240
2241         # force settings to no
2242         ol_enable_bdb2=no
2243         ol_enable_ldap=no
2244         ol_enable_ldbm=no
2245         ol_enable_passwd=no
2246         ol_enable_perl=no
2247         ol_enable_shell=no
2248         ol_enable_tcl=no
2249
2250         ol_enable_modules=no
2251         ol_enable_multimaster=no
2252         ol_enable_phonetic=no
2253         ol_enable_quipu=no
2254         ol_enable_rlookups=no
2255         ol_enable_aci=no
2256         ol_enable_discreteaci=no
2257         ol_enable_wrappers=no
2258
2259         ol_with_ldbm_api=no
2260         ol_with_ldbm_type=no
2261
2262         ol_with_bdb2_module=static
2263         ol_with_ldap_module=static
2264         ol_with_ldbm_module=static
2265         ol_with_passwd_module=static
2266         ol_with_perl_module=static
2267         ol_with_shell_module=static
2268         ol_with_tcl_module=static
2269
2270         ol_enable_slurpd=no
2271
2272 elif test $ol_enable_ldbm = no ; then
2273         
2274         if test $ol_with_ldbm_api != auto ; then
2275                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2276         fi
2277
2278         if test $ol_with_ldbm_type != auto ; then
2279                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2280         fi
2281
2282         if test $ol_with_ldbm_module != static ; then
2283                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2284         fi
2285
2286         if test $ol_enable_bdb2 = yes ; then
2287                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2288         fi
2289
2290         if test $ol_enable_modules != yes -a \
2291                 $ol_enable_ldap = no -a \
2292                 $ol_enable_passwd = no -a \
2293                 $ol_enable_perl = no -a \
2294                 $ol_enable_shell = no -a \
2295                 $ol_enable_tcl = no ; then
2296                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2297         fi
2298
2299         ol_with_ldbm_api=no
2300         ol_with_ldbm_type=no
2301         ol_with_ldbm_module=static
2302
2303 elif test $ol_enable_bdb2 = yes ; then
2304         
2305         if test $ol_with_ldbm_api != auto -a \
2306                 $ol_with_ldbm_api != db2 ; then
2307                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2308         fi
2309
2310         ol_with_ldbm_api=db2
2311
2312 else
2313         
2314         if test $ol_enable_bdb2 != no ; then
2315                 if test $ol_with_ldbm_api != auto -a \
2316                         $ol_with_ldbm_api != db2 ; then
2317                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2318                         ol_enable_bdb2=no
2319                 fi
2320         fi
2321
2322         if test $ol_with_ldbm_api = gdbm -a \
2323                 $ol_with_ldbm_type = btree ; then
2324                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2325         fi
2326         if test $ol_with_ldbm_api = mdbm -a \
2327                 $ol_with_ldbm_type = btree ; then
2328                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2329         fi
2330         if test $ol_with_ldbm_api = ndbm -a \
2331                 $ol_with_ldbm_type = btree ; then
2332                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2333         fi
2334 fi
2335
2336 if test $ol_enable_slurpd = yes ; then
2337                 if test $ol_with_threads = no ; then
2338                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2339         fi
2340 fi
2341
2342 echo "$ac_t""done" 1>&6
2343
2344 ## Initialize vars
2345 LDAP_LIBS=
2346 LDIF_LIBS=
2347 LDBM_LIBS=
2348 LTHREAD_LIBS=
2349 LUTIL_LIBS=
2350
2351 LDAPD_LIBS=
2352 SLAPD_LIBS=
2353 SLURPD_LIBS=
2354
2355 BUILD_LDAPD=no
2356 BUILD_SLAPD=no
2357 BUILD_SLURPD=no
2358
2359 BUILD_BDB2=no
2360 BUILD_LDAP=no
2361 BUILD_LDBM=no
2362 BUILD_PASSWD=no
2363 BUILD_PERL=no
2364 BUILD_QUIPU=no
2365 BUILD_SHELL=no
2366 BUILD_TCL=no
2367 BUILD_THREAD=no
2368
2369 BUILD_BDB2_DYNAMIC=static
2370 BUILD_LDAP_DYNAMIC=static
2371 BUILD_LDBM_DYNAMIC=static
2372 BUILD_PASSWD_DYNAMIC=static
2373 BUILD_PERL_DYNAMIC=static
2374 BUILD_SHELL_DYNAMIC=static
2375 BUILD_TCL_DYNAMIC=static
2376
2377 SLAPD_MODULES_LDFLAGS=
2378 SLAPD_MODULES_CPPFLAGS=
2379 SLAPD_MODULES_LIST=
2380
2381 SLAPD_PERL_LDFLAGS=
2382 SLAPD_PERL_CPPFLAGS=
2383
2384 KRB_LIBS=
2385 READLINE_LIBS=
2386 SASL_LIBS=
2387 TERMCAP_LIBS=
2388 TLS_LIBS=
2389 MODULES_LIBS=
2390
2391
2392
2393 cat >> confdefs.h <<\EOF
2394 #define HAVE_MKVERSION 1
2395 EOF
2396
2397
2398
2399
2400 ol_aix_threads=no
2401 case "$target" in
2402 *-*-aix*)       if test -z "$CC" ; then
2403                 case "$ol_with_threads" in
2404                 auto | yes |  posix) ol_aix_threads=yes ;;
2405                 esac
2406         fi
2407 ;;
2408 esac
2409
2410 if test $ol_aix_threads = yes ; then
2411         if test -z "${CC}" ; then
2412                 for ac_prog in cc_r xlc_r cc
2413 do
2414 # Extract the first word of "$ac_prog", so it can be a program name with args.
2415 set dummy $ac_prog; ac_word=$2
2416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2417 echo "configure:2418: checking for $ac_word" >&5
2418 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2419   echo $ac_n "(cached) $ac_c" 1>&6
2420 else
2421   if test -n "$CC"; then
2422   ac_cv_prog_CC="$CC" # Let the user override the test.
2423 else
2424   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2425   ac_dummy="$PATH"
2426   for ac_dir in $ac_dummy; do
2427     test -z "$ac_dir" && ac_dir=.
2428     if test -f $ac_dir/$ac_word; then
2429       ac_cv_prog_CC="$ac_prog"
2430       break
2431     fi
2432   done
2433   IFS="$ac_save_ifs"
2434 fi
2435 fi
2436 CC="$ac_cv_prog_CC"
2437 if test -n "$CC"; then
2438   echo "$ac_t""$CC" 1>&6
2439 else
2440   echo "$ac_t""no" 1>&6
2441 fi
2442
2443 test -n "$CC" && break
2444 done
2445
2446
2447                 if test "$CC" = cc ; then
2448                                                 if test $ol_with_threads != auto ; then
2449                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2450                         else
2451                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2452                         fi
2453                         ol_with_threads=no
2454                 fi
2455         fi
2456
2457         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2458                 ol_with_threads=posix
2459                 ol_cv_pthread_create=yes
2460         fi
2461 fi
2462
2463 if test -z "${CC}"; then
2464         for ac_prog in cc
2465 do
2466 # Extract the first word of "$ac_prog", so it can be a program name with args.
2467 set dummy $ac_prog; ac_word=$2
2468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2469 echo "configure:2470: checking for $ac_word" >&5
2470 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2471   echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473   if test -n "$CC"; then
2474   ac_cv_prog_CC="$CC" # Let the user override the test.
2475 else
2476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2477   ac_dummy="$PATH"
2478   for ac_dir in $ac_dummy; do
2479     test -z "$ac_dir" && ac_dir=.
2480     if test -f $ac_dir/$ac_word; then
2481       ac_cv_prog_CC="$ac_prog"
2482       break
2483     fi
2484   done
2485   IFS="$ac_save_ifs"
2486 fi
2487 fi
2488 CC="$ac_cv_prog_CC"
2489 if test -n "$CC"; then
2490   echo "$ac_t""$CC" 1>&6
2491 else
2492   echo "$ac_t""no" 1>&6
2493 fi
2494
2495 test -n "$CC" && break
2496 done
2497
2498 fi
2499
2500
2501
2502 # Check whether --enable-fast-install or --disable-fast-install was given.
2503 if test "${enable_fast_install+set}" = set; then
2504   enableval="$enable_fast_install"
2505   p=${PACKAGE-default}
2506 case "$enableval" in
2507 yes) enable_fast_install=yes ;;
2508 no) enable_fast_install=no ;;
2509 *)
2510   enable_fast_install=no
2511   # Look at the argument we got.  We use all the common list separators.
2512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2513   for pkg in $enableval; do
2514     if test "X$pkg" = "X$p"; then
2515       enable_fast_install=yes
2516     fi
2517   done
2518   IFS="$ac_save_ifs"
2519   ;;
2520 esac
2521 else
2522   enable_fast_install=yes
2523 fi
2524
2525 # Extract the first word of "ranlib", so it can be a program name with args.
2526 set dummy ranlib; ac_word=$2
2527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2528 echo "configure:2529: checking for $ac_word" >&5
2529 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2530   echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532   if test -n "$RANLIB"; then
2533   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2534 else
2535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2536   ac_dummy="$PATH"
2537   for ac_dir in $ac_dummy; do
2538     test -z "$ac_dir" && ac_dir=.
2539     if test -f $ac_dir/$ac_word; then
2540       ac_cv_prog_RANLIB="ranlib"
2541       break
2542     fi
2543   done
2544   IFS="$ac_save_ifs"
2545   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2546 fi
2547 fi
2548 RANLIB="$ac_cv_prog_RANLIB"
2549 if test -n "$RANLIB"; then
2550   echo "$ac_t""$RANLIB" 1>&6
2551 else
2552   echo "$ac_t""no" 1>&6
2553 fi
2554
2555 # Extract the first word of "gcc", so it can be a program name with args.
2556 set dummy gcc; 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_CC+set}\" = set"; then
2560   echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562   if test -n "$CC"; then
2563   ac_cv_prog_CC="$CC" # 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_CC="gcc"
2571       break
2572     fi
2573   done
2574   IFS="$ac_save_ifs"
2575 fi
2576 fi
2577 CC="$ac_cv_prog_CC"
2578 if test -n "$CC"; then
2579   echo "$ac_t""$CC" 1>&6
2580 else
2581   echo "$ac_t""no" 1>&6
2582 fi
2583
2584 if test -z "$CC"; then
2585   # Extract the first word of "cc", so it can be a program name with args.
2586 set dummy cc; 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_prog_rejected=no
2597   ac_dummy="$PATH"
2598   for ac_dir in $ac_dummy; do
2599     test -z "$ac_dir" && ac_dir=.
2600     if test -f $ac_dir/$ac_word; then
2601       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2602         ac_prog_rejected=yes
2603         continue
2604       fi
2605       ac_cv_prog_CC="cc"
2606       break
2607     fi
2608   done
2609   IFS="$ac_save_ifs"
2610 if test $ac_prog_rejected = yes; then
2611   # We found a bogon in the path, so make sure we never use it.
2612   set dummy $ac_cv_prog_CC
2613   shift
2614   if test $# -gt 0; then
2615     # We chose a different compiler from the bogus one.
2616     # However, it has the same basename, so the bogon will be chosen
2617     # first if we set CC to just the basename; use the full file name.
2618     shift
2619     set dummy "$ac_dir/$ac_word" "$@"
2620     shift
2621     ac_cv_prog_CC="$@"
2622   fi
2623 fi
2624 fi
2625 fi
2626 CC="$ac_cv_prog_CC"
2627 if test -n "$CC"; then
2628   echo "$ac_t""$CC" 1>&6
2629 else
2630   echo "$ac_t""no" 1>&6
2631 fi
2632
2633   if test -z "$CC"; then
2634     case "`uname -s`" in
2635     *win32* | *WIN32* | *CYGWIN*)
2636       # Extract the first word of "cl", so it can be a program name with args.
2637 set dummy cl; ac_word=$2
2638 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2639 echo "configure:2640: checking for $ac_word" >&5
2640 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2641   echo $ac_n "(cached) $ac_c" 1>&6
2642 else
2643   if test -n "$CC"; then
2644   ac_cv_prog_CC="$CC" # Let the user override the test.
2645 else
2646   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2647   ac_dummy="$PATH"
2648   for ac_dir in $ac_dummy; do
2649     test -z "$ac_dir" && ac_dir=.
2650     if test -f $ac_dir/$ac_word; then
2651       ac_cv_prog_CC="cl"
2652       break
2653     fi
2654   done
2655   IFS="$ac_save_ifs"
2656 fi
2657 fi
2658 CC="$ac_cv_prog_CC"
2659 if test -n "$CC"; then
2660   echo "$ac_t""$CC" 1>&6
2661 else
2662   echo "$ac_t""no" 1>&6
2663 fi
2664  ;;
2665     esac
2666   fi
2667   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2668 fi
2669
2670 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2671 echo "configure:2672: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2672
2673 ac_ext=c
2674 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2675 ac_cpp='$CPP $CPPFLAGS'
2676 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2677 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2678 cross_compiling=$ac_cv_prog_cc_cross
2679
2680 cat > conftest.$ac_ext << EOF
2681
2682 #line 2683 "configure"
2683 #include "confdefs.h"
2684
2685 main(){return(0);}
2686 EOF
2687 if { (eval echo configure:2688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2688   ac_cv_prog_cc_works=yes
2689   # If we can't run a trivial program, we are probably using a cross compiler.
2690   if (./conftest; exit) 2>/dev/null; then
2691     ac_cv_prog_cc_cross=no
2692   else
2693     ac_cv_prog_cc_cross=yes
2694   fi
2695 else
2696   echo "configure: failed program was:" >&5
2697   cat conftest.$ac_ext >&5
2698   ac_cv_prog_cc_works=no
2699 fi
2700 rm -fr conftest*
2701 ac_ext=c
2702 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2703 ac_cpp='$CPP $CPPFLAGS'
2704 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2705 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2706 cross_compiling=$ac_cv_prog_cc_cross
2707
2708 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2709 if test $ac_cv_prog_cc_works = no; then
2710   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2711 fi
2712 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2713 echo "configure:2714: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2714 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2715 cross_compiling=$ac_cv_prog_cc_cross
2716
2717 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2718 echo "configure:2719: checking whether we are using GNU C" >&5
2719 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2720   echo $ac_n "(cached) $ac_c" 1>&6
2721 else
2722   cat > conftest.c <<EOF
2723 #ifdef __GNUC__
2724   yes;
2725 #endif
2726 EOF
2727 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2728   ac_cv_prog_gcc=yes
2729 else
2730   ac_cv_prog_gcc=no
2731 fi
2732 fi
2733
2734 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2735
2736 if test $ac_cv_prog_gcc = yes; then
2737   GCC=yes
2738 else
2739   GCC=
2740 fi
2741
2742 ac_test_CFLAGS="${CFLAGS+set}"
2743 ac_save_CFLAGS="$CFLAGS"
2744 CFLAGS=
2745 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2746 echo "configure:2747: checking whether ${CC-cc} accepts -g" >&5
2747 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2748   echo $ac_n "(cached) $ac_c" 1>&6
2749 else
2750   echo 'void f(){}' > conftest.c
2751 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2752   ac_cv_prog_cc_g=yes
2753 else
2754   ac_cv_prog_cc_g=no
2755 fi
2756 rm -f conftest*
2757
2758 fi
2759
2760 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2761 if test "$ac_test_CFLAGS" = set; then
2762   CFLAGS="$ac_save_CFLAGS"
2763 elif test $ac_cv_prog_cc_g = yes; then
2764   if test "$GCC" = yes; then
2765     CFLAGS="-g -O2"
2766   else
2767     CFLAGS="-g"
2768   fi
2769 else
2770   if test "$GCC" = yes; then
2771     CFLAGS="-O2"
2772   else
2773     CFLAGS=
2774   fi
2775 fi
2776
2777 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2778 if test "${with_gnu_ld+set}" = set; then
2779   withval="$with_gnu_ld"
2780   test "$withval" = no || with_gnu_ld=yes
2781 else
2782   with_gnu_ld=no
2783 fi
2784
2785 ac_prog=ld
2786 if test "$ac_cv_prog_gcc" = yes; then
2787   # Check if gcc -print-prog-name=ld gives a path.
2788   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2789 echo "configure:2790: checking for ld used by GCC" >&5
2790   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2791   case "$ac_prog" in
2792     # Accept absolute paths.
2793     [\\/]* | [A-Za-z]:[\\/]*)
2794       re_direlt='/[^/][^/]*/\.\./'
2795       # Canonicalize the path of ld
2796       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2797       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2798         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2799       done
2800       test -z "$LD" && LD="$ac_prog"
2801       ;;
2802   "")
2803     # If it fails, then pretend we aren't using GCC.
2804     ac_prog=ld
2805     ;;
2806   *)
2807     # If it is relative, then search for the first ld in PATH.
2808     with_gnu_ld=unknown
2809     ;;
2810   esac
2811 elif test "$with_gnu_ld" = yes; then
2812   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2813 echo "configure:2814: checking for GNU ld" >&5
2814 else
2815   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2816 echo "configure:2817: checking for non-GNU ld" >&5
2817 fi
2818 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   if test -z "$LD"; then
2822   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2823   for ac_dir in $PATH; do
2824     test -z "$ac_dir" && ac_dir=.
2825     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2826       ac_cv_path_LD="$ac_dir/$ac_prog"
2827       # Check to see if the program is GNU ld.  I'd rather use --version,
2828       # but apparently some GNU ld's only accept -v.
2829       # Break only if it was the GNU/non-GNU ld that we prefer.
2830       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2831         test "$with_gnu_ld" != no && break
2832       else
2833         test "$with_gnu_ld" != yes && break
2834       fi
2835     fi
2836   done
2837   IFS="$ac_save_ifs"
2838 else
2839   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2840 fi
2841 fi
2842
2843 LD="$ac_cv_path_LD"
2844 if test -n "$LD"; then
2845   echo "$ac_t""$LD" 1>&6
2846 else
2847   echo "$ac_t""no" 1>&6
2848 fi
2849 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2850
2851 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2852 echo "configure:2853: checking if the linker ($LD) is GNU ld" >&5
2853 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2854   echo $ac_n "(cached) $ac_c" 1>&6
2855 else
2856   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2857 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2858   ac_cv_prog_gnu_ld=yes
2859 else
2860   ac_cv_prog_gnu_ld=no
2861 fi
2862 fi
2863
2864 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2865
2866
2867 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2868 echo "configure:2869: checking for BSD-compatible nm" >&5
2869 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2870   echo $ac_n "(cached) $ac_c" 1>&6
2871 else
2872   if test -n "$NM"; then
2873   # Let the user override the test.
2874   ac_cv_path_NM="$NM"
2875 else
2876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2877   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2878     test -z "$ac_dir" && ac_dir=.
2879     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2880       # Check to see if the nm accepts a BSD-compat flag.
2881       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2882       #   nm: unknown option "B" ignored
2883       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2884         ac_cv_path_NM="$ac_dir/nm -B"
2885         break
2886       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2887         ac_cv_path_NM="$ac_dir/nm -p"
2888         break
2889       else
2890         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2891         continue # so that we can try to find one that supports BSD flags
2892       fi
2893     fi
2894   done
2895   IFS="$ac_save_ifs"
2896   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2897 fi
2898 fi
2899
2900 NM="$ac_cv_path_NM"
2901 echo "$ac_t""$NM" 1>&6
2902
2903
2904 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2905 echo "configure:2906: checking whether ln -s works" >&5
2906 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909   rm -f conftestdata
2910 if ln -s X conftestdata 2>/dev/null
2911 then
2912   rm -f conftestdata
2913   ac_cv_prog_LN_S="ln -s"
2914 else
2915   ac_cv_prog_LN_S=ln
2916 fi
2917 fi
2918 LN_S="$ac_cv_prog_LN_S"
2919 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2920   echo "$ac_t""yes" 1>&6
2921 else
2922   echo "$ac_t""no" 1>&6
2923 fi
2924
2925
2926 # Check for any special flags to pass to ltconfig.
2927 libtool_flags="--cache-file=$cache_file"
2928 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2929 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2930 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2931 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2932 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2933 libtool_flags="$libtool_flags --enable-dlopen"
2934
2935 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2936 if test "${enable_libtool_lock+set}" = set; then
2937   enableval="$enable_libtool_lock"
2938   :
2939 fi
2940
2941 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2942 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2943
2944 # Some flags need to be propagated to the compiler or linker for good
2945 # libtool support.
2946 case "$host" in
2947 *-*-irix6*)
2948   # Find out which ABI we are using.
2949   echo '#line 2950 "configure"' > conftest.$ac_ext
2950   if { (eval echo configure:2951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2951     case "`/usr/bin/file conftest.o`" in
2952     *32-bit*)
2953       LD="${LD-ld} -32"
2954       ;;
2955     *N32*)
2956       LD="${LD-ld} -n32"
2957       ;;
2958     *64-bit*)
2959       LD="${LD-ld} -64"
2960       ;;
2961     esac
2962   fi
2963   rm -rf conftest*
2964   ;;
2965
2966 *-*-sco3.2v5*)
2967   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2968   SAVE_CFLAGS="$CFLAGS"
2969   CFLAGS="$CFLAGS -belf"
2970   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2971 echo "configure:2972: checking whether the C compiler needs -belf" >&5
2972 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   cat > conftest.$ac_ext <<EOF
2976 #line 2977 "configure"
2977 #include "confdefs.h"
2978
2979 int main() {
2980
2981 ; return 0; }
2982 EOF
2983 if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2984   rm -rf conftest*
2985   lt_cv_cc_needs_belf=yes
2986 else
2987   echo "configure: failed program was:" >&5
2988   cat conftest.$ac_ext >&5
2989   rm -rf conftest*
2990   lt_cv_cc_needs_belf=no
2991 fi
2992 rm -f conftest*
2993 fi
2994
2995 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2996   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2997     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2998     CFLAGS="$SAVE_CFLAGS"
2999   fi
3000   ;;
3001
3002
3003 esac
3004
3005
3006 # Save cache, so that ltconfig can load it
3007
3008
3009 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3010 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3011 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3012 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3013 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3014 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3015 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3016 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3017
3018 # Reload cache, that may have been modified by ltconfig
3019
3020
3021 # This can be used to rebuild libtool when needed
3022 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3023
3024 # Always use our own libtool.
3025 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3026
3027 # Redirect the config.log output again, so that the ltconfig log is not
3028 # clobbered by the next message.
3029 exec 5>>./config.log
3030
3031
3032 for ac_prog in mawk gawk nawk awk
3033 do
3034 # Extract the first word of "$ac_prog", so it can be a program name with args.
3035 set dummy $ac_prog; ac_word=$2
3036 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3037 echo "configure:3038: checking for $ac_word" >&5
3038 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3039   echo $ac_n "(cached) $ac_c" 1>&6
3040 else
3041   if test -n "$AWK"; then
3042   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3043 else
3044   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3045   ac_dummy="$PATH"
3046   for ac_dir in $ac_dummy; do
3047     test -z "$ac_dir" && ac_dir=.
3048     if test -f $ac_dir/$ac_word; then
3049       ac_cv_prog_AWK="$ac_prog"
3050       break
3051     fi
3052   done
3053   IFS="$ac_save_ifs"
3054 fi
3055 fi
3056 AWK="$ac_cv_prog_AWK"
3057 if test -n "$AWK"; then
3058   echo "$ac_t""$AWK" 1>&6
3059 else
3060   echo "$ac_t""no" 1>&6
3061 fi
3062
3063 test -n "$AWK" && break
3064 done
3065
3066 # test for ln hardlink support
3067 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3068 echo "configure:3069: checking whether ln works" >&5
3069 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   rm -f conftest.src conftest.dst
3073 echo "conftest" > conftest.src
3074 if ln conftest.src conftest.dst 2>/dev/null
3075 then
3076   ol_cv_prog_LN_H="ln"
3077 else
3078   ol_cv_prog_LN_H="cp"
3079 fi
3080 rm -f conftest.src conftest.dst
3081
3082 fi
3083 LN_H="$ol_cv_prog_LN_H"
3084 if test "$ol_cv_prog_LN_H" = "ln"; then
3085         echo "$ac_t""yes" 1>&6
3086 else
3087         echo "$ac_t""no" 1>&6
3088 fi
3089
3090 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3091 echo "configure:3092: checking whether ln -s works" >&5
3092 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3093   echo $ac_n "(cached) $ac_c" 1>&6
3094 else
3095   rm -f conftestdata
3096 if ln -s X conftestdata 2>/dev/null
3097 then
3098   rm -f conftestdata
3099   ac_cv_prog_LN_S="ln -s"
3100 else
3101   ac_cv_prog_LN_S=ln
3102 fi
3103 fi
3104 LN_S="$ac_cv_prog_LN_S"
3105 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3106   echo "$ac_t""yes" 1>&6
3107 else
3108   echo "$ac_t""no" 1>&6
3109 fi
3110
3111
3112 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3113         LN_S="$LN_H"
3114 fi
3115
3116 # Extract the first word of "sendmail", so it can be a program name with args.
3117 set dummy sendmail; ac_word=$2
3118 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3119 echo "configure:3120: checking for $ac_word" >&5
3120 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3121   echo $ac_n "(cached) $ac_c" 1>&6
3122 else
3123   case "$SENDMAIL" in
3124   /*)
3125   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3126   ;;
3127   ?:/*)                  
3128   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3129   ;;
3130   *)
3131   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3132   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3133   for ac_dir in $ac_dummy; do 
3134     test -z "$ac_dir" && ac_dir=.
3135     if test -f $ac_dir/$ac_word; then
3136       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3137       break
3138     fi
3139   done
3140   IFS="$ac_save_ifs"
3141   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3142   ;;
3143 esac
3144 fi
3145 SENDMAIL="$ac_cv_path_SENDMAIL"
3146 if test -n "$SENDMAIL"; then
3147   echo "$ac_t""$SENDMAIL" 1>&6
3148 else
3149   echo "$ac_t""no" 1>&6
3150 fi
3151
3152 # Extract the first word of "vi", so it can be a program name with args.
3153 set dummy vi; ac_word=$2
3154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3155 echo "configure:3156: checking for $ac_word" >&5
3156 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159   case "$EDITOR" in
3160   /*)
3161   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3162   ;;
3163   ?:/*)                  
3164   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3165   ;;
3166   *)
3167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3168   ac_dummy="$PATH:/usr/ucb"
3169   for ac_dir in $ac_dummy; do 
3170     test -z "$ac_dir" && ac_dir=.
3171     if test -f $ac_dir/$ac_word; then
3172       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3173       break
3174     fi
3175   done
3176   IFS="$ac_save_ifs"
3177   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3178   ;;
3179 esac
3180 fi
3181 EDITOR="$ac_cv_path_EDITOR"
3182 if test -n "$EDITOR"; then
3183   echo "$ac_t""$EDITOR" 1>&6
3184 else
3185   echo "$ac_t""no" 1>&6
3186 fi
3187
3188 # Extract the first word of "finger", so it can be a program name with args.
3189 set dummy finger; ac_word=$2
3190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3191 echo "configure:3192: checking for $ac_word" >&5
3192 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3193   echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195   case "$FINGER" in
3196   /*)
3197   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3198   ;;
3199   ?:/*)                  
3200   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3201   ;;
3202   *)
3203   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3204   ac_dummy="$PATH:/usr/ucb"
3205   for ac_dir in $ac_dummy; do 
3206     test -z "$ac_dir" && ac_dir=.
3207     if test -f $ac_dir/$ac_word; then
3208       ac_cv_path_FINGER="$ac_dir/$ac_word"
3209       break
3210     fi
3211   done
3212   IFS="$ac_save_ifs"
3213   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3214   ;;
3215 esac
3216 fi
3217 FINGER="$ac_cv_path_FINGER"
3218 if test -n "$FINGER"; then
3219   echo "$ac_t""$FINGER" 1>&6
3220 else
3221   echo "$ac_t""no" 1>&6
3222 fi
3223
3224
3225 ol_link_perl=no
3226 if test $ol_enable_perl != no ; then
3227         # Extract the first word of "perl", so it can be a program name with args.
3228 set dummy perl; ac_word=$2
3229 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3230 echo "configure:3231: checking for $ac_word" >&5
3231 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3232   echo $ac_n "(cached) $ac_c" 1>&6
3233 else
3234   case "$PERLBIN" in
3235   /*)
3236   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3237   ;;
3238   ?:/*)                  
3239   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3240   ;;
3241   *)
3242   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3243   ac_dummy="$PATH"
3244   for ac_dir in $ac_dummy; do 
3245     test -z "$ac_dir" && ac_dir=.
3246     if test -f $ac_dir/$ac_word; then
3247       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3248       break
3249     fi
3250   done
3251   IFS="$ac_save_ifs"
3252   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3253   ;;
3254 esac
3255 fi
3256 PERLBIN="$ac_cv_path_PERLBIN"
3257 if test -n "$PERLBIN"; then
3258   echo "$ac_t""$PERLBIN" 1>&6
3259 else
3260   echo "$ac_t""no" 1>&6
3261 fi
3262
3263
3264         if test "no$PERLBIN" = "no" ; then
3265                 if test $ol_enable_perl = yes ; then
3266                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3267                 fi
3268
3269         else
3270                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3271                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3272
3273                                 ol_link_perl=yes
3274         fi
3275 fi
3276
3277 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3278 echo "configure:3279: checking how to run the C preprocessor" >&5
3279 # On Suns, sometimes $CPP names a directory.
3280 if test -n "$CPP" && test -d "$CPP"; then
3281   CPP=
3282 fi
3283 if test -z "$CPP"; then
3284 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3285   echo $ac_n "(cached) $ac_c" 1>&6
3286 else
3287     # This must be in double quotes, not single quotes, because CPP may get
3288   # substituted into the Makefile and "${CC-cc}" will confuse make.
3289   CPP="${CC-cc} -E"
3290   # On the NeXT, cc -E runs the code through the compiler's parser,
3291   # not just through cpp.
3292   cat > conftest.$ac_ext <<EOF
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295 #include <assert.h>
3296 Syntax Error
3297 EOF
3298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3299 { (eval echo configure:3300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3301 if test -z "$ac_err"; then
3302   :
3303 else
3304   echo "$ac_err" >&5
3305   echo "configure: failed program was:" >&5
3306   cat conftest.$ac_ext >&5
3307   rm -rf conftest*
3308   CPP="${CC-cc} -E -traditional-cpp"
3309   cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312 #include <assert.h>
3313 Syntax Error
3314 EOF
3315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3316 { (eval echo configure:3317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3318 if test -z "$ac_err"; then
3319   :
3320 else
3321   echo "$ac_err" >&5
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   CPP="${CC-cc} -nologo -E"
3326   cat > conftest.$ac_ext <<EOF
3327 #line 3328 "configure"
3328 #include "confdefs.h"
3329 #include <assert.h>
3330 Syntax Error
3331 EOF
3332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3333 { (eval echo configure:3334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3335 if test -z "$ac_err"; then
3336   :
3337 else
3338   echo "$ac_err" >&5
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   CPP=/lib/cpp
3343 fi
3344 rm -f conftest*
3345 fi
3346 rm -f conftest*
3347 fi
3348 rm -f conftest*
3349   ac_cv_prog_CPP="$CPP"
3350 fi
3351   CPP="$ac_cv_prog_CPP"
3352 else
3353   ac_cv_prog_CPP="$CPP"
3354 fi
3355 echo "$ac_t""$CPP" 1>&6
3356
3357
3358 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3359         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3360
3361 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3362         echo "configure: warning: programs compiled here do run here..." 1>&2
3363         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3364
3365 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3366         echo "configure: warning: programs compiled here do not run here..." 1>&2
3367         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3368 fi
3369
3370 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3371 echo "configure:3372: checking for AIX" >&5
3372 cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 #ifdef _AIX
3376   yes
3377 #endif
3378
3379 EOF
3380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3381   egrep "yes" >/dev/null 2>&1; then
3382   rm -rf conftest*
3383   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3384 #define _ALL_SOURCE 1
3385 EOF
3386
3387 else
3388   rm -rf conftest*
3389   echo "$ac_t""no" 1>&6
3390 fi
3391 rm -f conftest*
3392
3393
3394 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3395 echo "configure:3396: checking for POSIXized ISC" >&5
3396 if test -d /etc/conf/kconfig.d &&
3397   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3398 then
3399   echo "$ac_t""yes" 1>&6
3400   ISC=yes # If later tests want to check for ISC.
3401   cat >> confdefs.h <<\EOF
3402 #define _POSIX_SOURCE 1
3403 EOF
3404
3405   if test "$GCC" = yes; then
3406     CC="$CC -posix"
3407   else
3408     CC="$CC -Xp"
3409   fi
3410 else
3411   echo "$ac_t""no" 1>&6
3412   ISC=
3413 fi
3414
3415 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3416 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3417 echo "configure:3418: checking for minix/config.h" >&5
3418 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3419   echo $ac_n "(cached) $ac_c" 1>&6
3420 else
3421   cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424 #include <minix/config.h>
3425 EOF
3426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3427 { (eval echo configure:3428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3429 if test -z "$ac_err"; then
3430   rm -rf conftest*
3431   eval "ac_cv_header_$ac_safe=yes"
3432 else
3433   echo "$ac_err" >&5
3434   echo "configure: failed program was:" >&5
3435   cat conftest.$ac_ext >&5
3436   rm -rf conftest*
3437   eval "ac_cv_header_$ac_safe=no"
3438 fi
3439 rm -f conftest*
3440 fi
3441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3442   echo "$ac_t""yes" 1>&6
3443   MINIX=yes
3444 else
3445   echo "$ac_t""no" 1>&6
3446 MINIX=
3447 fi
3448
3449 if test "$MINIX" = yes; then
3450   cat >> confdefs.h <<\EOF
3451 #define _POSIX_SOURCE 1
3452 EOF
3453
3454   cat >> confdefs.h <<\EOF
3455 #define _POSIX_1_SOURCE 2
3456 EOF
3457
3458   cat >> confdefs.h <<\EOF
3459 #define _MINIX 1
3460 EOF
3461
3462 fi
3463
3464
3465 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3466 echo "configure:3467: checking for Cygwin environment" >&5
3467 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473
3474 int main() {
3475
3476 #ifndef __CYGWIN__
3477 #define __CYGWIN__ __CYGWIN32__
3478 #endif
3479 return __CYGWIN__;
3480 ; return 0; }
3481 EOF
3482 if { (eval echo configure:3483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3483   rm -rf conftest*
3484   ac_cv_cygwin=yes
3485 else
3486   echo "configure: failed program was:" >&5
3487   cat conftest.$ac_ext >&5
3488   rm -rf conftest*
3489   ac_cv_cygwin=no
3490 fi
3491 rm -f conftest*
3492 fi
3493
3494 echo "$ac_t""$ac_cv_cygwin" 1>&6
3495 CYGWIN=
3496 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3497 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3498 echo "configure:3499: checking for mingw32 environment" >&5
3499 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505
3506 int main() {
3507 return __MINGW32__;
3508 ; return 0; }
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3511   rm -rf conftest*
3512   ac_cv_mingw32=yes
3513 else
3514   echo "configure: failed program was:" >&5
3515   cat conftest.$ac_ext >&5
3516   rm -rf conftest*
3517   ac_cv_mingw32=no
3518 fi
3519 rm -f conftest*
3520 fi
3521
3522 echo "$ac_t""$ac_cv_mingw32" 1>&6
3523 MINGW32=
3524 test "$ac_cv_mingw32" = yes && MINGW32=yes
3525 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3526 echo "configure:3527: checking for EMX OS/2 environment" >&5
3527 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   cat > conftest.$ac_ext <<EOF
3531 #line 3532 "configure"
3532 #include "confdefs.h"
3533
3534 int main() {
3535 return __EMX__;
3536 ; return 0; }
3537 EOF
3538 if { (eval echo configure:3539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3539   rm -rf conftest*
3540   ac_cv_emxos2=yes
3541 else
3542   echo "configure: failed program was:" >&5
3543   cat conftest.$ac_ext >&5
3544   rm -rf conftest*
3545   ac_cv_emxos2=no
3546 fi
3547 rm -f conftest*
3548 fi
3549
3550 echo "$ac_t""$ac_cv_emxos2" 1>&6
3551 EMXOS2=
3552 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3553
3554
3555
3556 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3557 echo "configure:3558: checking for executable suffix" >&5
3558 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3559   echo $ac_n "(cached) $ac_c" 1>&6
3560 else
3561   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3562   ac_cv_exeext=.exe
3563 else
3564   rm -f conftest*
3565   echo 'int main () { return 0; }' > conftest.$ac_ext
3566   ac_cv_exeext=
3567   if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3568     for file in conftest.*; do
3569       case $file in
3570       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3571       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3572       esac
3573     done
3574   else
3575     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3576   fi
3577   rm -f conftest*
3578   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3579 fi
3580 fi
3581
3582 EXEEXT=""
3583 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3584 echo "$ac_t""${ac_cv_exeext}" 1>&6
3585 ac_exeext=$EXEEXT
3586
3587 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3588 echo "configure:3589: checking for object suffix" >&5
3589 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   rm -f conftest*
3593 echo 'int i = 1;' > conftest.$ac_ext
3594 if { (eval echo configure:3595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3595   for ac_file in conftest.*; do
3596     case $ac_file in
3597     *.c) ;;
3598     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3599     esac
3600   done
3601 else
3602   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3603 fi
3604 rm -f conftest*
3605 fi
3606
3607 echo "$ac_t""$ac_cv_objext" 1>&6
3608 OBJEXT=$ac_cv_objext
3609 ac_objext=$ac_cv_objext
3610
3611
3612 cat >> confdefs.h <<EOF
3613 #define EXEEXT "${EXEEXT}"
3614 EOF
3615
3616
3617 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3618 echo "configure:3619: checking for be_app in -lbe" >&5
3619 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3620 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3621   echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623   ac_save_LIBS="$LIBS"
3624 LIBS="-lbe -lroot -lnet $LIBS"
3625 cat > conftest.$ac_ext <<EOF
3626 #line 3627 "configure"
3627 #include "confdefs.h"
3628 /* Override any gcc2 internal prototype to avoid an error.  */
3629 /* We use char because int might match the return type of a gcc2
3630     builtin and then its argument prototype would still apply.  */
3631 char be_app();
3632
3633 int main() {
3634 be_app()
3635 ; return 0; }
3636 EOF
3637 if { (eval echo configure:3638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3638   rm -rf conftest*
3639   eval "ac_cv_lib_$ac_lib_var=yes"
3640 else
3641   echo "configure: failed program was:" >&5
3642   cat conftest.$ac_ext >&5
3643   rm -rf conftest*
3644   eval "ac_cv_lib_$ac_lib_var=no"
3645 fi
3646 rm -f conftest*
3647 LIBS="$ac_save_LIBS"
3648
3649 fi
3650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3651   echo "$ac_t""yes" 1>&6
3652   LIBS="$LIBS -lbe -lroot -lnet"
3653 else
3654   echo "$ac_t""no" 1>&6
3655 :
3656 fi
3657
3658
3659
3660
3661
3662 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3663 echo "configure:3664: checking for ${CC-cc} option to accept ANSI C" >&5
3664 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   am_cv_prog_cc_stdc=no
3668 ac_save_CC="$CC"
3669 # Don't try gcc -ansi; that turns off useful extensions and
3670 # breaks some systems' header files.
3671 # AIX                   -qlanglvl=ansi
3672 # Ultrix and OSF/1      -std1
3673 # HP-UX 10.20 and later -Ae
3674 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3675 # SVR4                  -Xc -D__EXTENSIONS__
3676 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3677 do
3678   CC="$ac_save_CC $ac_arg"
3679   cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682 #include <stdarg.h>
3683 #include <stdio.h>
3684 #include <sys/types.h>
3685 #include <sys/stat.h>
3686 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3687 struct buf { int x; };
3688 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3689 static char *e (p, i)
3690      char **p;
3691      int i;
3692 {
3693   return p[i];
3694 }
3695 static char *f (char * (*g) (char **, int), char **p, ...)
3696 {
3697   char *s;
3698   va_list v;
3699   va_start (v,p);
3700   s = g (p, va_arg (v,int));
3701   va_end (v);
3702   return s;
3703 }
3704 int test (int i, double x);
3705 struct s1 {int (*f) (int a);};
3706 struct s2 {int (*f) (double a);};
3707 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3708 int argc;
3709 char **argv;
3710
3711 int main() {
3712
3713 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3714
3715 ; return 0; }
3716 EOF
3717 if { (eval echo configure:3718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3718   rm -rf conftest*
3719   am_cv_prog_cc_stdc="$ac_arg"; break
3720 else
3721   echo "configure: failed program was:" >&5
3722   cat conftest.$ac_ext >&5
3723 fi
3724 rm -f conftest*
3725 done
3726 CC="$ac_save_CC"
3727
3728 fi
3729
3730 if test -z "$am_cv_prog_cc_stdc"; then
3731   echo "$ac_t""none needed" 1>&6
3732 else
3733   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3734 fi
3735 case "x$am_cv_prog_cc_stdc" in
3736   x|xno) ;;
3737   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3738 esac
3739
3740 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3741         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3742 fi
3743
3744 # test for make depend flag
3745 OL_MKDEP=
3746 OL_MKDEP_FLAGS=
3747 if test -z "${MKDEP}"; then
3748         OL_MKDEP="${CC-cc}"
3749         if test -z "${MKDEP_FLAGS}"; then
3750                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3751 echo "configure:3752: checking for ${OL_MKDEP} depend flag" >&5
3752 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3753   echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755   
3756                         ol_cv_mkdep=no
3757                         for flag in "-M" "-xM"; do
3758                                 cat > conftest.c <<EOF
3759  noCode;
3760 EOF
3761                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3762                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3763                                 then
3764                                         if test ! -f conftest."${ac_object}" ; then
3765                                                 ol_cv_mkdep=$flag
3766                                                 OL_MKDEP_FLAGS="$flag"
3767                                                 break
3768                                         fi
3769                                 fi
3770                         done
3771                         rm -f conftest*
3772                 
3773 fi
3774
3775 echo "$ac_t""$ol_cv_mkdep" 1>&6
3776         else
3777                 cc_cv_mkdep=yes
3778                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3779         fi
3780 else
3781         cc_cv_mkdep=yes
3782         OL_MKDEP="${MKDEP}"
3783         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3784 fi
3785
3786
3787
3788 if test "${ol_cv_mkdep}" = no ; then
3789         # this will soon become an error
3790         echo "configure: warning: do not know how to generate dependencies" 1>&2
3791 fi
3792
3793 ol_link_modules=no
3794 if test $ol_enable_modules != no ; then
3795         for ac_hdr in ltdl.h
3796 do
3797 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3798 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3799 echo "configure:3800: checking for $ac_hdr" >&5
3800 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3801   echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803   cat > conftest.$ac_ext <<EOF
3804 #line 3805 "configure"
3805 #include "confdefs.h"
3806 #include <$ac_hdr>
3807 EOF
3808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3809 { (eval echo configure:3810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3811 if test -z "$ac_err"; then
3812   rm -rf conftest*
3813   eval "ac_cv_header_$ac_safe=yes"
3814 else
3815   echo "$ac_err" >&5
3816   echo "configure: failed program was:" >&5
3817   cat conftest.$ac_ext >&5
3818   rm -rf conftest*
3819   eval "ac_cv_header_$ac_safe=no"
3820 fi
3821 rm -f conftest*
3822 fi
3823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3824   echo "$ac_t""yes" 1>&6
3825     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3826   cat >> confdefs.h <<EOF
3827 #define $ac_tr_hdr 1
3828 EOF
3829  
3830 else
3831   echo "$ac_t""no" 1>&6
3832 fi
3833 done
3834
3835
3836         if test $ac_cv_header_ltdl_h = no ; then
3837                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3838
3839         fi
3840
3841         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3842 echo "configure:3843: checking for lt_dlinit in -lltdl" >&5
3843 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3844 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3845   echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847   ac_save_LIBS="$LIBS"
3848 LIBS="-lltdl  $LIBS"
3849 cat > conftest.$ac_ext <<EOF
3850 #line 3851 "configure"
3851 #include "confdefs.h"
3852 /* Override any gcc2 internal prototype to avoid an error.  */
3853 /* We use char because int might match the return type of a gcc2
3854     builtin and then its argument prototype would still apply.  */
3855 char lt_dlinit();
3856
3857 int main() {
3858 lt_dlinit()
3859 ; return 0; }
3860 EOF
3861 if { (eval echo configure:3862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3862   rm -rf conftest*
3863   eval "ac_cv_lib_$ac_lib_var=yes"
3864 else
3865   echo "configure: failed program was:" >&5
3866   cat conftest.$ac_ext >&5
3867   rm -rf conftest*
3868   eval "ac_cv_lib_$ac_lib_var=no"
3869 fi
3870 rm -f conftest*
3871 LIBS="$ac_save_LIBS"
3872
3873 fi
3874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3875   echo "$ac_t""yes" 1>&6
3876     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3877     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3878   cat >> confdefs.h <<EOF
3879 #define $ac_tr_lib 1
3880 EOF
3881
3882   LIBS="-lltdl $LIBS"
3883
3884 else
3885   echo "$ac_t""no" 1>&6
3886 fi
3887
3888         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3889                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3890         fi
3891         ol_link_modules=yes
3892 else
3893         ol_with_bdb2_module=static
3894         ol_with_ldap_module=static
3895         ol_with_ldbm_module=static
3896         ol_with_passwd_module=static
3897         ol_with_perl_module=static
3898         ol_with_shell_module=static
3899         ol_with_tcl_module=static
3900 fi
3901
3902 # test for EBCDIC
3903 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3904 echo "configure:3905: checking for EBCDIC" >&5
3905 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   
3909         cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912
3913 #if !('M' == 0xd4)
3914 #include <__ASCII__/generate_error.h>
3915 #endif
3916
3917 EOF
3918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3919 { (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3921 if test -z "$ac_err"; then
3922   rm -rf conftest*
3923   ol_cv_cpp_ebcdic=yes
3924 else
3925   echo "$ac_err" >&5
3926   echo "configure: failed program was:" >&5
3927   cat conftest.$ac_ext >&5
3928   rm -rf conftest*
3929   ol_cv_cpp_ebcdic=no
3930 fi
3931 rm -f conftest*
3932 fi
3933
3934 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3935 if test $ol_cv_cpp_ebcdic = yes ; then
3936         cat >> confdefs.h <<\EOF
3937 #define HAVE_EBCDIC 1
3938 EOF
3939
3940 fi
3941
3942 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3943 echo "configure:3944: checking for ANSI C header files" >&5
3944 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3945   echo $ac_n "(cached) $ac_c" 1>&6
3946 else
3947   cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #include <stdlib.h>
3951 #include <stdarg.h>
3952 #include <string.h>
3953 #include <float.h>
3954 EOF
3955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3956 { (eval echo configure:3957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3958 if test -z "$ac_err"; then
3959   rm -rf conftest*
3960   ol_cv_header_stdc=yes
3961 else
3962   echo "$ac_err" >&5
3963   echo "configure: failed program was:" >&5
3964   cat conftest.$ac_ext >&5
3965   rm -rf conftest*
3966   ol_cv_header_stdc=no
3967 fi
3968 rm -f conftest*
3969
3970 if test $ol_cv_header_stdc = yes; then
3971   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3972 cat > conftest.$ac_ext <<EOF
3973 #line 3974 "configure"
3974 #include "confdefs.h"
3975 #include <string.h>
3976 EOF
3977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3978   egrep "memchr" >/dev/null 2>&1; then
3979   :
3980 else
3981   rm -rf conftest*
3982   ol_cv_header_stdc=no
3983 fi
3984 rm -f conftest*
3985
3986 fi
3987
3988 if test $ol_cv_header_stdc = yes; then
3989   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3990 cat > conftest.$ac_ext <<EOF
3991 #line 3992 "configure"
3992 #include "confdefs.h"
3993 #include <stdlib.h>
3994 EOF
3995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3996   egrep "free" >/dev/null 2>&1; then
3997   :
3998 else
3999   rm -rf conftest*
4000   ol_cv_header_stdc=no
4001 fi
4002 rm -f conftest*
4003
4004 fi
4005
4006 if test $ol_cv_header_stdc = yes; then
4007   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4008 if test "$cross_compiling" = yes; then
4009   :
4010 else
4011   cat > conftest.$ac_ext <<EOF
4012 #line 4013 "configure"
4013 #include "confdefs.h"
4014 #include <ctype.h>
4015 #ifndef HAVE_EBCDIC
4016 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4017 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4018 #else
4019 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4020                 || ('j' <= (c) && (c) <= 'r') \
4021                 || ('s' <= (c) && (c) <= 'z'))
4022 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4023 #endif
4024 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4025 int main () { int i; for (i = 0; i < 256; i++)
4026 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4027 exit (0); }
4028
4029 EOF
4030 if { (eval echo configure:4031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4031 then
4032   :
4033 else
4034   echo "configure: failed program was:" >&5
4035   cat conftest.$ac_ext >&5
4036   rm -fr conftest*
4037   ol_cv_header_stdc=no
4038 fi
4039 rm -fr conftest*
4040 fi
4041
4042 fi
4043 fi
4044
4045 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4046 if test $ol_cv_header_stdc = yes; then
4047   cat >> confdefs.h <<\EOF
4048 #define STDC_HEADERS 1
4049 EOF
4050
4051 fi
4052 ac_cv_header_stdc=disable
4053
4054
4055 if test $ol_cv_header_stdc != yes; then
4056         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4057 fi
4058
4059 ac_header_dirent=no
4060 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4061 do
4062 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4063 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4064 echo "configure:4065: checking for $ac_hdr that defines DIR" >&5
4065 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4066   echo $ac_n "(cached) $ac_c" 1>&6
4067 else
4068   cat > conftest.$ac_ext <<EOF
4069 #line 4070 "configure"
4070 #include "confdefs.h"
4071 #include <sys/types.h>
4072 #include <$ac_hdr>
4073 int main() {
4074 DIR *dirp = 0;
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078   rm -rf conftest*
4079   eval "ac_cv_header_dirent_$ac_safe=yes"
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -rf conftest*
4084   eval "ac_cv_header_dirent_$ac_safe=no"
4085 fi
4086 rm -f conftest*
4087 fi
4088 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4089   echo "$ac_t""yes" 1>&6
4090     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4091   cat >> confdefs.h <<EOF
4092 #define $ac_tr_hdr 1
4093 EOF
4094  ac_header_dirent=$ac_hdr; break
4095 else
4096   echo "$ac_t""no" 1>&6
4097 fi
4098 done
4099 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4100 if test $ac_header_dirent = dirent.h; then
4101 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4102 echo "configure:4103: checking for opendir in -ldir" >&5
4103 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4105   echo $ac_n "(cached) $ac_c" 1>&6
4106 else
4107   ac_save_LIBS="$LIBS"
4108 LIBS="-ldir  $LIBS"
4109 cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112 /* Override any gcc2 internal prototype to avoid an error.  */
4113 /* We use char because int might match the return type of a gcc2
4114     builtin and then its argument prototype would still apply.  */
4115 char opendir();
4116
4117 int main() {
4118 opendir()
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4122   rm -rf conftest*
4123   eval "ac_cv_lib_$ac_lib_var=yes"
4124 else
4125   echo "configure: failed program was:" >&5
4126   cat conftest.$ac_ext >&5
4127   rm -rf conftest*
4128   eval "ac_cv_lib_$ac_lib_var=no"
4129 fi
4130 rm -f conftest*
4131 LIBS="$ac_save_LIBS"
4132
4133 fi
4134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4135   echo "$ac_t""yes" 1>&6
4136   LIBS="$LIBS -ldir"
4137 else
4138   echo "$ac_t""no" 1>&6
4139 fi
4140
4141 else
4142 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4143 echo "configure:4144: checking for opendir in -lx" >&5
4144 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4145 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4146   echo $ac_n "(cached) $ac_c" 1>&6
4147 else
4148   ac_save_LIBS="$LIBS"
4149 LIBS="-lx  $LIBS"
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153 /* Override any gcc2 internal prototype to avoid an error.  */
4154 /* We use char because int might match the return type of a gcc2
4155     builtin and then its argument prototype would still apply.  */
4156 char opendir();
4157
4158 int main() {
4159 opendir()
4160 ; return 0; }
4161 EOF
4162 if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4163   rm -rf conftest*
4164   eval "ac_cv_lib_$ac_lib_var=yes"
4165 else
4166   echo "configure: failed program was:" >&5
4167   cat conftest.$ac_ext >&5
4168   rm -rf conftest*
4169   eval "ac_cv_lib_$ac_lib_var=no"
4170 fi
4171 rm -f conftest*
4172 LIBS="$ac_save_LIBS"
4173
4174 fi
4175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177   LIBS="$LIBS -lx"
4178 else
4179   echo "$ac_t""no" 1>&6
4180 fi
4181
4182 fi
4183
4184 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4185 echo "configure:4186: checking for sys/wait.h that is POSIX.1 compatible" >&5
4186 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4187   echo $ac_n "(cached) $ac_c" 1>&6
4188 else
4189   cat > conftest.$ac_ext <<EOF
4190 #line 4191 "configure"
4191 #include "confdefs.h"
4192 #include <sys/types.h>
4193 #include <sys/wait.h>
4194 #ifndef WEXITSTATUS
4195 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4196 #endif
4197 #ifndef WIFEXITED
4198 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4199 #endif
4200 int main() {
4201 int s;
4202 wait (&s);
4203 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4204 ; return 0; }
4205 EOF
4206 if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4207   rm -rf conftest*
4208   ac_cv_header_sys_wait_h=yes
4209 else
4210   echo "configure: failed program was:" >&5
4211   cat conftest.$ac_ext >&5
4212   rm -rf conftest*
4213   ac_cv_header_sys_wait_h=no
4214 fi
4215 rm -f conftest*
4216 fi
4217
4218 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4219 if test $ac_cv_header_sys_wait_h = yes; then
4220   cat >> confdefs.h <<\EOF
4221 #define HAVE_SYS_WAIT_H 1
4222 EOF
4223
4224 fi
4225
4226 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4227 echo "configure:4228: checking POSIX termios" >&5
4228 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4229   echo $ac_n "(cached) $ac_c" 1>&6
4230 else
4231   cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234 #include <sys/types.h>
4235 #include <unistd.h>
4236 #include <termios.h>
4237 int main() {
4238 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4239    tcgetattr(0, 0);
4240 ; return 0; }
4241 EOF
4242 if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4243   rm -rf conftest*
4244   am_cv_sys_posix_termios=yes
4245 else
4246   echo "configure: failed program was:" >&5
4247   cat conftest.$ac_ext >&5
4248   rm -rf conftest*
4249   am_cv_sys_posix_termios=no
4250 fi
4251 rm -f conftest*
4252 fi
4253
4254 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4255
4256
4257  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4258 echo "configure:4259: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4259 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4263
4264   gwinsz_in_termios_h=no
4265   if test $am_cv_sys_posix_termios = yes; then
4266     cat > conftest.$ac_ext <<EOF
4267 #line 4268 "configure"
4268 #include "confdefs.h"
4269 #include <sys/types.h>
4270 #     include <termios.h>
4271 #     ifdef TIOCGWINSZ
4272         yes
4273 #     endif
4274     
4275 EOF
4276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4277   egrep "yes" >/dev/null 2>&1; then
4278   rm -rf conftest*
4279   gwinsz_in_termios_h=yes
4280 fi
4281 rm -f conftest*
4282
4283   fi
4284
4285   if test $gwinsz_in_termios_h = no; then
4286     cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <sys/types.h>
4290 #     include <sys/ioctl.h>
4291 #     ifdef TIOCGWINSZ
4292         yes
4293 #     endif
4294     
4295 EOF
4296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4297   egrep "yes" >/dev/null 2>&1; then
4298   rm -rf conftest*
4299   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4300 fi
4301 rm -f conftest*
4302
4303   fi
4304   
4305 fi
4306
4307 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4308   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4309     cat >> confdefs.h <<\EOF
4310 #define GWINSZ_IN_SYS_IOCTL 1
4311 EOF
4312
4313   fi
4314
4315 if test $am_cv_sys_posix_termios = yes ; then
4316         cat >> confdefs.h <<\EOF
4317 #define HAVE_POSIX_TERMIOS 1
4318 EOF
4319
4320 fi
4321
4322 for ac_hdr in \
4323         arpa/inet.h             \
4324         arpa/nameser.h  \
4325         assert.h                \
4326         crypt.h                 \
4327         errno.h                 \
4328         fcntl.h                 \
4329         filio.h                 \
4330         getopt.h                \
4331         grp.h                   \
4332         libutil.h               \
4333         limits.h                \
4334         locale.h                \
4335         netinet/tcp.h   \
4336         malloc.h                \
4337         memory.h                \
4338         psap.h                  \
4339         pwd.h                   \
4340         resolv.h                \
4341         sgtty.h                 \
4342         shadow.h                \
4343         stddef.h                \
4344         string.h                \
4345         strings.h               \
4346         sysexits.h              \
4347         sys/file.h              \
4348         sys/filio.h             \
4349         sys/errno.h             \
4350         sys/ioctl.h             \
4351         sys/param.h             \
4352         sys/resource.h  \
4353         sys/select.h    \
4354         sys/socket.h    \
4355         sys/syslog.h    \
4356         sys/time.h              \
4357         sys/types.h             \
4358         syslog.h                \
4359         termios.h               \
4360         unistd.h                \
4361
4362 do
4363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4365 echo "configure:4366: checking for $ac_hdr" >&5
4366 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4367   echo $ac_n "(cached) $ac_c" 1>&6
4368 else
4369   cat > conftest.$ac_ext <<EOF
4370 #line 4371 "configure"
4371 #include "confdefs.h"
4372 #include <$ac_hdr>
4373 EOF
4374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4375 { (eval echo configure:4376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4377 if test -z "$ac_err"; then
4378   rm -rf conftest*
4379   eval "ac_cv_header_$ac_safe=yes"
4380 else
4381   echo "$ac_err" >&5
4382   echo "configure: failed program was:" >&5
4383   cat conftest.$ac_ext >&5
4384   rm -rf conftest*
4385   eval "ac_cv_header_$ac_safe=no"
4386 fi
4387 rm -f conftest*
4388 fi
4389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4390   echo "$ac_t""yes" 1>&6
4391     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4392   cat >> confdefs.h <<EOF
4393 #define $ac_tr_hdr 1
4394 EOF
4395  
4396 else
4397   echo "$ac_t""no" 1>&6
4398 fi
4399 done
4400
4401
4402
4403
4404 echo $ac_n "checking for socket""... $ac_c" 1>&6
4405 echo "configure:4406: checking for socket" >&5
4406 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 /* System header to define __stub macros and hopefully few prototypes,
4413     which can conflict with char socket(); below.  */
4414 #include <assert.h>
4415 /* Override any gcc2 internal prototype to avoid an error.  */
4416 /* We use char because int might match the return type of a gcc2
4417     builtin and then its argument prototype would still apply.  */
4418 char socket();
4419 char (*f)();
4420
4421 int main() {
4422
4423 /* The GNU C library defines this for functions which it implements
4424     to always fail with ENOSYS.  Some functions are actually named
4425     something starting with __ and the normal name is an alias.  */
4426 #if defined (__stub_socket) || defined (__stub___socket)
4427 choke me
4428 #else
4429 f = socket;
4430 #endif
4431
4432 ; return 0; }
4433 EOF
4434 if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4435   rm -rf conftest*
4436   eval "ac_cv_func_socket=yes"
4437 else
4438   echo "configure: failed program was:" >&5
4439   cat conftest.$ac_ext >&5
4440   rm -rf conftest*
4441   eval "ac_cv_func_socket=no"
4442 fi
4443 rm -f conftest*
4444 fi
4445
4446 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4447   echo "$ac_t""yes" 1>&6
4448   :
4449 else
4450   echo "$ac_t""no" 1>&6
4451         
4452         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4453 echo "configure:4454: checking for main in -lsocket" >&5
4454 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4455 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4456   echo $ac_n "(cached) $ac_c" 1>&6
4457 else
4458   ac_save_LIBS="$LIBS"
4459 LIBS="-lsocket  $LIBS"
4460 cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463
4464 int main() {
4465 main()
4466 ; return 0; }
4467 EOF
4468 if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4469   rm -rf conftest*
4470   eval "ac_cv_lib_$ac_lib_var=yes"
4471 else
4472   echo "configure: failed program was:" >&5
4473   cat conftest.$ac_ext >&5
4474   rm -rf conftest*
4475   eval "ac_cv_lib_$ac_lib_var=no"
4476 fi
4477 rm -f conftest*
4478 LIBS="$ac_save_LIBS"
4479
4480 fi
4481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4482   echo "$ac_t""yes" 1>&6
4483     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4484     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4485   cat >> confdefs.h <<EOF
4486 #define $ac_tr_lib 1
4487 EOF
4488
4489   LIBS="-lsocket $LIBS"
4490
4491 else
4492   echo "$ac_t""no" 1>&6
4493 fi
4494
4495         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4496 echo "configure:4497: checking for main in -lnet" >&5
4497 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4499   echo $ac_n "(cached) $ac_c" 1>&6
4500 else
4501   ac_save_LIBS="$LIBS"
4502 LIBS="-lnet  $LIBS"
4503 cat > conftest.$ac_ext <<EOF
4504 #line 4505 "configure"
4505 #include "confdefs.h"
4506
4507 int main() {
4508 main()
4509 ; return 0; }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512   rm -rf conftest*
4513   eval "ac_cv_lib_$ac_lib_var=yes"
4514 else
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -rf conftest*
4518   eval "ac_cv_lib_$ac_lib_var=no"
4519 fi
4520 rm -f conftest*
4521 LIBS="$ac_save_LIBS"
4522
4523 fi
4524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4525   echo "$ac_t""yes" 1>&6
4526     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4527     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4528   cat >> confdefs.h <<EOF
4529 #define $ac_tr_lib 1
4530 EOF
4531
4532   LIBS="-lnet $LIBS"
4533
4534 else
4535   echo "$ac_t""no" 1>&6
4536 fi
4537
4538         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4539 echo "configure:4540: checking for socket in -lnet" >&5
4540 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4542   echo $ac_n "(cached) $ac_c" 1>&6
4543 else
4544   ac_save_LIBS="$LIBS"
4545 LIBS="-lnet  $LIBS"
4546 cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4549 /* Override any gcc2 internal prototype to avoid an error.  */
4550 /* We use char because int might match the return type of a gcc2
4551     builtin and then its argument prototype would still apply.  */
4552 char socket();
4553
4554 int main() {
4555 socket()
4556 ; return 0; }
4557 EOF
4558 if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4559   rm -rf conftest*
4560   eval "ac_cv_lib_$ac_lib_var=yes"
4561 else
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -rf conftest*
4565   eval "ac_cv_lib_$ac_lib_var=no"
4566 fi
4567 rm -f conftest*
4568 LIBS="$ac_save_LIBS"
4569
4570 fi
4571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4572   echo "$ac_t""yes" 1>&6
4573     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4574     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4575   cat >> confdefs.h <<EOF
4576 #define $ac_tr_lib 1
4577 EOF
4578
4579   LIBS="-lnet $LIBS"
4580
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4586 echo "configure:4587: checking for main in -lnsl_s" >&5
4587 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4589   echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591   ac_save_LIBS="$LIBS"
4592 LIBS="-lnsl_s  $LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596
4597 int main() {
4598 main()
4599 ; return 0; }
4600 EOF
4601 if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4602   rm -rf conftest*
4603   eval "ac_cv_lib_$ac_lib_var=yes"
4604 else
4605   echo "configure: failed program was:" >&5
4606   cat conftest.$ac_ext >&5
4607   rm -rf conftest*
4608   eval "ac_cv_lib_$ac_lib_var=no"
4609 fi
4610 rm -f conftest*
4611 LIBS="$ac_save_LIBS"
4612
4613 fi
4614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4615   echo "$ac_t""yes" 1>&6
4616     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4617     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4618   cat >> confdefs.h <<EOF
4619 #define $ac_tr_lib 1
4620 EOF
4621
4622   LIBS="-lnsl_s $LIBS"
4623
4624 else
4625   echo "$ac_t""no" 1>&6
4626 fi
4627
4628         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4629 echo "configure:4630: checking for main in -lnsl" >&5
4630 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4631 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4632   echo $ac_n "(cached) $ac_c" 1>&6
4633 else
4634   ac_save_LIBS="$LIBS"
4635 LIBS="-lnsl  $LIBS"
4636 cat > conftest.$ac_ext <<EOF
4637 #line 4638 "configure"
4638 #include "confdefs.h"
4639
4640 int main() {
4641 main()
4642 ; return 0; }
4643 EOF
4644 if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4645   rm -rf conftest*
4646   eval "ac_cv_lib_$ac_lib_var=yes"
4647 else
4648   echo "configure: failed program was:" >&5
4649   cat conftest.$ac_ext >&5
4650   rm -rf conftest*
4651   eval "ac_cv_lib_$ac_lib_var=no"
4652 fi
4653 rm -f conftest*
4654 LIBS="$ac_save_LIBS"
4655
4656 fi
4657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4658   echo "$ac_t""yes" 1>&6
4659     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4660     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4661   cat >> confdefs.h <<EOF
4662 #define $ac_tr_lib 1
4663 EOF
4664
4665   LIBS="-lnsl $LIBS"
4666
4667 else
4668   echo "$ac_t""no" 1>&6
4669 fi
4670
4671         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4672 echo "configure:4673: checking for socket in -linet" >&5
4673 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4674 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4675   echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677   ac_save_LIBS="$LIBS"
4678 LIBS="-linet  $LIBS"
4679 cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 /* Override any gcc2 internal prototype to avoid an error.  */
4683 /* We use char because int might match the return type of a gcc2
4684     builtin and then its argument prototype would still apply.  */
4685 char socket();
4686
4687 int main() {
4688 socket()
4689 ; return 0; }
4690 EOF
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4692   rm -rf conftest*
4693   eval "ac_cv_lib_$ac_lib_var=yes"
4694 else
4695   echo "configure: failed program was:" >&5
4696   cat conftest.$ac_ext >&5
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=no"
4699 fi
4700 rm -f conftest*
4701 LIBS="$ac_save_LIBS"
4702
4703 fi
4704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4705   echo "$ac_t""yes" 1>&6
4706     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4707     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4708   cat >> confdefs.h <<EOF
4709 #define $ac_tr_lib 1
4710 EOF
4711
4712   LIBS="-linet $LIBS"
4713
4714 else
4715   echo "$ac_t""no" 1>&6
4716 fi
4717
4718         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4719 echo "configure:4720: checking for main in -lgen" >&5
4720 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4721 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4722   echo $ac_n "(cached) $ac_c" 1>&6
4723 else
4724   ac_save_LIBS="$LIBS"
4725 LIBS="-lgen  $LIBS"
4726 cat > conftest.$ac_ext <<EOF
4727 #line 4728 "configure"
4728 #include "confdefs.h"
4729
4730 int main() {
4731 main()
4732 ; return 0; }
4733 EOF
4734 if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4735   rm -rf conftest*
4736   eval "ac_cv_lib_$ac_lib_var=yes"
4737 else
4738   echo "configure: failed program was:" >&5
4739   cat conftest.$ac_ext >&5
4740   rm -rf conftest*
4741   eval "ac_cv_lib_$ac_lib_var=no"
4742 fi
4743 rm -f conftest*
4744 LIBS="$ac_save_LIBS"
4745
4746 fi
4747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4748   echo "$ac_t""yes" 1>&6
4749     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4750     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4751   cat >> confdefs.h <<EOF
4752 #define $ac_tr_lib 1
4753 EOF
4754
4755   LIBS="-lgen $LIBS"
4756
4757 else
4758   echo "$ac_t""no" 1>&6
4759 fi
4760
4761
4762 fi
4763
4764
4765 echo $ac_n "checking for select""... $ac_c" 1>&6
4766 echo "configure:4767: checking for select" >&5
4767 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4768   echo $ac_n "(cached) $ac_c" 1>&6
4769 else
4770   cat > conftest.$ac_ext <<EOF
4771 #line 4772 "configure"
4772 #include "confdefs.h"
4773 /* System header to define __stub macros and hopefully few prototypes,
4774     which can conflict with char select(); below.  */
4775 #include <assert.h>
4776 /* Override any gcc2 internal prototype to avoid an error.  */
4777 /* We use char because int might match the return type of a gcc2
4778     builtin and then its argument prototype would still apply.  */
4779 char select();
4780 char (*f)();
4781
4782 int main() {
4783
4784 /* The GNU C library defines this for functions which it implements
4785     to always fail with ENOSYS.  Some functions are actually named
4786     something starting with __ and the normal name is an alias.  */
4787 #if defined (__stub_select) || defined (__stub___select)
4788 choke me
4789 #else
4790 f = select;
4791 #endif
4792
4793 ; return 0; }
4794 EOF
4795 if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4796   rm -rf conftest*
4797   eval "ac_cv_func_select=yes"
4798 else
4799   echo "configure: failed program was:" >&5
4800   cat conftest.$ac_ext >&5
4801   rm -rf conftest*
4802   eval "ac_cv_func_select=no"
4803 fi
4804 rm -f conftest*
4805 fi
4806
4807 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4808   echo "$ac_t""yes" 1>&6
4809   :
4810 else
4811   echo "$ac_t""no" 1>&6
4812 { echo "configure: error: select() required." 1>&2; exit 1; }
4813 fi
4814
4815
4816 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4817 echo "configure:4818: checking types of arguments for select()" >&5
4818  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4819   echo $ac_n "(cached) $ac_c" 1>&6
4820 else
4821    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4822   echo $ac_n "(cached) $ac_c" 1>&6
4823 else
4824     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4825   echo $ac_n "(cached) $ac_c" 1>&6
4826 else
4827      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4828      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4829       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4830        cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 #ifdef HAVE_SYS_TYPES_H
4834 #include <sys/types.h>
4835 #endif
4836 #ifdef HAVE_SYS_TIME_H
4837 #include <sys/time.h>
4838 #endif
4839 #ifdef HAVE_SYS_SELECT_H
4840 #include <sys/select.h>
4841 #endif
4842 #ifdef HAVE_SYS_SOCKET_H
4843 #include <sys/socket.h>
4844 #endif
4845 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);
4846 int main() {
4847
4848 ; return 0; }
4849 EOF
4850 if { (eval echo configure:4851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4851   rm -rf conftest*
4852           ac_not_found=no ; break 3
4853 else
4854   echo "configure: failed program was:" >&5
4855   cat conftest.$ac_ext >&5
4856   rm -rf conftest*
4857   ac_not_found=yes
4858 fi
4859 rm -f conftest*
4860       done
4861      done
4862     done
4863    
4864 fi
4865   
4866 fi
4867  
4868 fi
4869  if test "$ac_not_found" = yes; then
4870   ac_cv_func_select_arg1=int 
4871   ac_cv_func_select_arg234='int *' 
4872   ac_cv_func_select_arg5='struct timeval *'
4873  fi
4874  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4875  cat >> confdefs.h <<EOF
4876 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4877 EOF
4878
4879  cat >> confdefs.h <<EOF
4880 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4881 EOF
4882
4883  cat >> confdefs.h <<EOF
4884 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4885 EOF
4886
4887
4888
4889
4890 for ac_hdr in regex.h 
4891 do
4892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4894 echo "configure:4895: checking for $ac_hdr" >&5
4895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   cat > conftest.$ac_ext <<EOF
4899 #line 4900 "configure"
4900 #include "confdefs.h"
4901 #include <$ac_hdr>
4902 EOF
4903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4904 { (eval echo configure:4905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4906 if test -z "$ac_err"; then
4907   rm -rf conftest*
4908   eval "ac_cv_header_$ac_safe=yes"
4909 else
4910   echo "$ac_err" >&5
4911   echo "configure: failed program was:" >&5
4912   cat conftest.$ac_ext >&5
4913   rm -rf conftest*
4914   eval "ac_cv_header_$ac_safe=no"
4915 fi
4916 rm -f conftest*
4917 fi
4918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4919   echo "$ac_t""yes" 1>&6
4920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4921   cat >> confdefs.h <<EOF
4922 #define $ac_tr_hdr 1
4923 EOF
4924  
4925 else
4926   echo "$ac_t""no" 1>&6
4927 fi
4928 done
4929
4930 if test "$ac_cv_header_regex_h" != yes ; then
4931         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4932 fi
4933 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4934 echo "configure:4935: checking for regfree" >&5
4935 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4936   echo $ac_n "(cached) $ac_c" 1>&6
4937 else
4938   cat > conftest.$ac_ext <<EOF
4939 #line 4940 "configure"
4940 #include "confdefs.h"
4941 /* System header to define __stub macros and hopefully few prototypes,
4942     which can conflict with char regfree(); below.  */
4943 #include <assert.h>
4944 /* Override any gcc2 internal prototype to avoid an error.  */
4945 /* We use char because int might match the return type of a gcc2
4946     builtin and then its argument prototype would still apply.  */
4947 char regfree();
4948 char (*f)();
4949
4950 int main() {
4951
4952 /* The GNU C library defines this for functions which it implements
4953     to always fail with ENOSYS.  Some functions are actually named
4954     something starting with __ and the normal name is an alias.  */
4955 #if defined (__stub_regfree) || defined (__stub___regfree)
4956 choke me
4957 #else
4958 f = regfree;
4959 #endif
4960
4961 ; return 0; }
4962 EOF
4963 if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4964   rm -rf conftest*
4965   eval "ac_cv_func_regfree=yes"
4966 else
4967   echo "configure: failed program was:" >&5
4968   cat conftest.$ac_ext >&5
4969   rm -rf conftest*
4970   eval "ac_cv_func_regfree=no"
4971 fi
4972 rm -f conftest*
4973 fi
4974
4975 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4976   echo "$ac_t""yes" 1>&6
4977   :
4978 else
4979   echo "$ac_t""no" 1>&6
4980 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4981 fi
4982
4983
4984
4985 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4986 echo "configure:4987: checking for compatible POSIX regex" >&5
4987 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   
4991         if test "$cross_compiling" = yes; then
4992   ol_cv_c_posix_regex=cross
4993 else
4994   cat > conftest.$ac_ext <<EOF
4995 #line 4996 "configure"
4996 #include "confdefs.h"
4997
4998 #include <sys/types.h>
4999 #include <regex.h>
5000 static char *pattern, *string;
5001 main()
5002 {
5003         int rc;
5004         regex_t re;
5005
5006         pattern = "^A";
5007
5008         if(regcomp(&re, pattern, 0)) {
5009                 return -1;
5010         }
5011         
5012         string = "ALL MATCH";
5013         
5014         rc = regexec(&re, string, 0, (void*)0, 0);
5015
5016         regfree(&re);
5017
5018         return rc;
5019 }
5020 EOF
5021 if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5022 then
5023   ol_cv_c_posix_regex=yes
5024 else
5025   echo "configure: failed program was:" >&5
5026   cat conftest.$ac_ext >&5
5027   rm -fr conftest*
5028   ol_cv_c_posix_regex=no
5029 fi
5030 rm -fr conftest*
5031 fi
5032
5033 fi
5034
5035 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5036
5037 if test "$ol_cv_c_posix_regex" = no ; then
5038         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5039 fi
5040
5041 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5042 echo "configure:5043: checking for sigset in -lV3" >&5
5043 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5045   echo $ac_n "(cached) $ac_c" 1>&6
5046 else
5047   ac_save_LIBS="$LIBS"
5048 LIBS="-lV3  $LIBS"
5049 cat > conftest.$ac_ext <<EOF
5050 #line 5051 "configure"
5051 #include "confdefs.h"
5052 /* Override any gcc2 internal prototype to avoid an error.  */
5053 /* We use char because int might match the return type of a gcc2
5054     builtin and then its argument prototype would still apply.  */
5055 char sigset();
5056
5057 int main() {
5058 sigset()
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5062   rm -rf conftest*
5063   eval "ac_cv_lib_$ac_lib_var=yes"
5064 else
5065   echo "configure: failed program was:" >&5
5066   cat conftest.$ac_ext >&5
5067   rm -rf conftest*
5068   eval "ac_cv_lib_$ac_lib_var=no"
5069 fi
5070 rm -f conftest*
5071 LIBS="$ac_save_LIBS"
5072
5073 fi
5074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5075   echo "$ac_t""yes" 1>&6
5076     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5077     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5078   cat >> confdefs.h <<EOF
5079 #define $ac_tr_lib 1
5080 EOF
5081
5082   LIBS="-lV3 $LIBS"
5083
5084 else
5085   echo "$ac_t""no" 1>&6
5086 fi
5087
5088
5089 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5090 echo "configure:5091: checking for res_search" >&5
5091 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094   cat > conftest.$ac_ext <<EOF
5095 #line 5096 "configure"
5096 #include "confdefs.h"
5097 /* System header to define __stub macros and hopefully few prototypes,
5098     which can conflict with char res_search(); below.  */
5099 #include <assert.h>
5100 /* Override any gcc2 internal prototype to avoid an error.  */
5101 /* We use char because int might match the return type of a gcc2
5102     builtin and then its argument prototype would still apply.  */
5103 char res_search();
5104 char (*f)();
5105
5106 int main() {
5107
5108 /* The GNU C library defines this for functions which it implements
5109     to always fail with ENOSYS.  Some functions are actually named
5110     something starting with __ and the normal name is an alias.  */
5111 #if defined (__stub_res_search) || defined (__stub___res_search)
5112 choke me
5113 #else
5114 f = res_search;
5115 #endif
5116
5117 ; return 0; }
5118 EOF
5119 if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5120   rm -rf conftest*
5121   eval "ac_cv_func_res_search=yes"
5122 else
5123   echo "configure: failed program was:" >&5
5124   cat conftest.$ac_ext >&5
5125   rm -rf conftest*
5126   eval "ac_cv_func_res_search=no"
5127 fi
5128 rm -f conftest*
5129 fi
5130
5131 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5132   echo "$ac_t""yes" 1>&6
5133   :
5134 else
5135   echo "$ac_t""no" 1>&6
5136 fi
5137
5138 if test $ac_cv_func_res_search = no ; then 
5139         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5140 echo "configure:5141: checking for res_search in -lbind" >&5
5141 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5143   echo $ac_n "(cached) $ac_c" 1>&6
5144 else
5145   ac_save_LIBS="$LIBS"
5146 LIBS="-lbind  $LIBS"
5147 cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 /* We use char because int might match the return type of a gcc2
5152     builtin and then its argument prototype would still apply.  */
5153 char res_search();
5154
5155 int main() {
5156 res_search()
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=yes"
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=no"
5167 fi
5168 rm -f conftest*
5169 LIBS="$ac_save_LIBS"
5170
5171 fi
5172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5173   echo "$ac_t""yes" 1>&6
5174     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5176   cat >> confdefs.h <<EOF
5177 #define $ac_tr_lib 1
5178 EOF
5179
5180   LIBS="-lbind $LIBS"
5181
5182 else
5183   echo "$ac_t""no" 1>&6
5184 fi
5185
5186         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5187 fi
5188
5189 if test $ac_cv_func_res_search = no ; then 
5190         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5191 echo "configure:5192: checking for __res_search in -lbind" >&5
5192 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196   ac_save_LIBS="$LIBS"
5197 LIBS="-lbind  $LIBS"
5198 cat > conftest.$ac_ext <<EOF
5199 #line 5200 "configure"
5200 #include "confdefs.h"
5201 /* Override any gcc2 internal prototype to avoid an error.  */
5202 /* We use char because int might match the return type of a gcc2
5203     builtin and then its argument prototype would still apply.  */
5204 char __res_search();
5205
5206 int main() {
5207 __res_search()
5208 ; return 0; }
5209 EOF
5210 if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5211   rm -rf conftest*
5212   eval "ac_cv_lib_$ac_lib_var=yes"
5213 else
5214   echo "configure: failed program was:" >&5
5215   cat conftest.$ac_ext >&5
5216   rm -rf conftest*
5217   eval "ac_cv_lib_$ac_lib_var=no"
5218 fi
5219 rm -f conftest*
5220 LIBS="$ac_save_LIBS"
5221
5222 fi
5223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5224   echo "$ac_t""yes" 1>&6
5225     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5226     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5227   cat >> confdefs.h <<EOF
5228 #define $ac_tr_lib 1
5229 EOF
5230
5231   LIBS="-lbind $LIBS"
5232
5233 else
5234   echo "$ac_t""no" 1>&6
5235 fi
5236
5237         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5238 fi
5239
5240 if test $ac_cv_func_res_search = no ; then 
5241         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5242 echo "configure:5243: checking for res_search in -lresolv" >&5
5243 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   ac_save_LIBS="$LIBS"
5248 LIBS="-lresolv  $LIBS"
5249 cat > conftest.$ac_ext <<EOF
5250 #line 5251 "configure"
5251 #include "confdefs.h"
5252 /* Override any gcc2 internal prototype to avoid an error.  */
5253 /* We use char because int might match the return type of a gcc2
5254     builtin and then its argument prototype would still apply.  */
5255 char res_search();
5256
5257 int main() {
5258 res_search()
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262   rm -rf conftest*
5263   eval "ac_cv_lib_$ac_lib_var=yes"
5264 else
5265   echo "configure: failed program was:" >&5
5266   cat conftest.$ac_ext >&5
5267   rm -rf conftest*
5268   eval "ac_cv_lib_$ac_lib_var=no"
5269 fi
5270 rm -f conftest*
5271 LIBS="$ac_save_LIBS"
5272
5273 fi
5274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5275   echo "$ac_t""yes" 1>&6
5276     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5277     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5278   cat >> confdefs.h <<EOF
5279 #define $ac_tr_lib 1
5280 EOF
5281
5282   LIBS="-lresolv $LIBS"
5283
5284 else
5285   echo "$ac_t""no" 1>&6
5286 fi
5287
5288         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5289 fi
5290
5291 if test "$ac_cv_func_res_search" = yes ; then
5292         cat >> confdefs.h <<\EOF
5293 #define HAVE_RES_SEARCH 1
5294 EOF
5295
5296 elif test $ol_enable_dns = yes ; then
5297         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5298 elif test $ol_enable_dns != no ; then
5299         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5300 fi
5301
5302
5303 # ISODE tests
5304 ol_link_isode=no
5305 if test $ol_enable_ldapd != no ; then
5306         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5307
5308                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5309 echo "configure:5310: checking for main in -lxtpp" >&5
5310 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5312   echo $ac_n "(cached) $ac_c" 1>&6
5313 else
5314   ac_save_LIBS="$LIBS"
5315 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5316 cat > conftest.$ac_ext <<EOF
5317 #line 5318 "configure"
5318 #include "confdefs.h"
5319
5320 int main() {
5321 main()
5322 ; return 0; }
5323 EOF
5324 if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5325   rm -rf conftest*
5326   eval "ac_cv_lib_$ac_lib_var=yes"
5327 else
5328   echo "configure: failed program was:" >&5
5329   cat conftest.$ac_ext >&5
5330   rm -rf conftest*
5331   eval "ac_cv_lib_$ac_lib_var=no"
5332 fi
5333 rm -f conftest*
5334 LIBS="$ac_save_LIBS"
5335
5336 fi
5337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5338   echo "$ac_t""yes" 1>&6
5339   
5340                 ol_link_isode=yes
5341                 cat >> confdefs.h <<\EOF
5342 #define HAVE_XTPP 1
5343 EOF
5344
5345                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5346                 
5347 else
5348   echo "$ac_t""no" 1>&6
5349 :
5350 fi
5351
5352         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5353 echo "configure:5354: checking for main in -ldsap" >&5
5354 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5355 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5356   echo $ac_n "(cached) $ac_c" 1>&6
5357 else
5358   ac_save_LIBS="$LIBS"
5359 LIBS="-ldsap -lisode $LIBS"
5360 cat > conftest.$ac_ext <<EOF
5361 #line 5362 "configure"
5362 #include "confdefs.h"
5363
5364 int main() {
5365 main()
5366 ; return 0; }
5367 EOF
5368 if { (eval echo configure:5369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5369   rm -rf conftest*
5370   eval "ac_cv_lib_$ac_lib_var=yes"
5371 else
5372   echo "configure: failed program was:" >&5
5373   cat conftest.$ac_ext >&5
5374   rm -rf conftest*
5375   eval "ac_cv_lib_$ac_lib_var=no"
5376 fi
5377 rm -f conftest*
5378 LIBS="$ac_save_LIBS"
5379
5380 fi
5381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5382   echo "$ac_t""yes" 1>&6
5383   
5384                 ol_link_isode=yes
5385                 cat >> confdefs.h <<\EOF
5386 #define HAVE_DSAP 1
5387 EOF
5388
5389                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5390                 
5391 else
5392   echo "$ac_t""no" 1>&6
5393 :
5394 fi
5395
5396         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5397 echo "configure:5398: checking for main in -lisode" >&5
5398 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5399 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5400   echo $ac_n "(cached) $ac_c" 1>&6
5401 else
5402   ac_save_LIBS="$LIBS"
5403 LIBS="-lisode  $LIBS"
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5407
5408 int main() {
5409 main()
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413   rm -rf conftest*
5414   eval "ac_cv_lib_$ac_lib_var=yes"
5415 else
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_lib_$ac_lib_var=no"
5420 fi
5421 rm -f conftest*
5422 LIBS="$ac_save_LIBS"
5423
5424 fi
5425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5426   echo "$ac_t""yes" 1>&6
5427   
5428                 ol_link_isode=yes
5429                 cat >> confdefs.h <<\EOF
5430 #define HAVE_ISODE 1
5431 EOF
5432
5433                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5434                 
5435 else
5436   echo "$ac_t""no" 1>&6
5437 :
5438 fi
5439
5440 fi
5441
5442 if test $ol_link_isode != no; then
5443         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5444 echo "configure:5445: checking for main in -lpp" >&5
5445 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5447   echo $ac_n "(cached) $ac_c" 1>&6
5448 else
5449   ac_save_LIBS="$LIBS"
5450 LIBS="-lpp  $LIBS"
5451 cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5454
5455 int main() {
5456 main()
5457 ; return 0; }
5458 EOF
5459 if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5460   rm -rf conftest*
5461   eval "ac_cv_lib_$ac_lib_var=yes"
5462 else
5463   echo "configure: failed program was:" >&5
5464   cat conftest.$ac_ext >&5
5465   rm -rf conftest*
5466   eval "ac_cv_lib_$ac_lib_var=no"
5467 fi
5468 rm -f conftest*
5469 LIBS="$ac_save_LIBS"
5470
5471 fi
5472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5473   echo "$ac_t""yes" 1>&6
5474   
5475                 cat >> confdefs.h <<\EOF
5476 #define HAVE_PP 1
5477 EOF
5478
5479                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5480                 
5481 else
5482   echo "$ac_t""no" 1>&6
5483 :
5484 fi
5485
5486
5487         # Extract the first word of "pepsy", so it can be a program name with args.
5488 set dummy pepsy; ac_word=$2
5489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5490 echo "configure:5491: checking for $ac_word" >&5
5491 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5492   echo $ac_n "(cached) $ac_c" 1>&6
5493 else
5494   case "$PEPSY" in
5495   /*)
5496   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5497   ;;
5498   ?:/*)                  
5499   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5500   ;;
5501   *)
5502   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5503   ac_dummy="$PATH"
5504   for ac_dir in $ac_dummy; do 
5505     test -z "$ac_dir" && ac_dir=.
5506     if test -f $ac_dir/$ac_word; then
5507       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5508       break
5509     fi
5510   done
5511   IFS="$ac_save_ifs"
5512   ;;
5513 esac
5514 fi
5515 PEPSY="$ac_cv_path_PEPSY"
5516 if test -n "$PEPSY"; then
5517   echo "$ac_t""$PEPSY" 1>&6
5518 else
5519   echo "$ac_t""no" 1>&6
5520 fi
5521
5522 fi
5523
5524 if test $ol_enable_quipu != no ; then
5525         for ac_hdr in quipu/commonarg.h
5526 do
5527 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5528 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5529 echo "configure:5530: checking for $ac_hdr" >&5
5530 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5531   echo $ac_n "(cached) $ac_c" 1>&6
5532 else
5533   cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536 #include <$ac_hdr>
5537 EOF
5538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5539 { (eval echo configure:5540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5541 if test -z "$ac_err"; then
5542   rm -rf conftest*
5543   eval "ac_cv_header_$ac_safe=yes"
5544 else
5545   echo "$ac_err" >&5
5546   echo "configure: failed program was:" >&5
5547   cat conftest.$ac_ext >&5
5548   rm -rf conftest*
5549   eval "ac_cv_header_$ac_safe=no"
5550 fi
5551 rm -f conftest*
5552 fi
5553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5554   echo "$ac_t""yes" 1>&6
5555     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5556   cat >> confdefs.h <<EOF
5557 #define $ac_tr_hdr 1
5558 EOF
5559  
5560 else
5561   echo "$ac_t""no" 1>&6
5562 fi
5563 done
5564
5565
5566         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5567                 BUILD_QUIPU=yes
5568         elif test $ol_enable_quipu = auto ; then
5569                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5570         else
5571                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5572         fi
5573 fi
5574
5575 ol_link_kerberos=no
5576
5577 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5578         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5579 do
5580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5582 echo "configure:5583: checking for $ac_hdr" >&5
5583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5584   echo $ac_n "(cached) $ac_c" 1>&6
5585 else
5586   cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 #include <$ac_hdr>
5590 EOF
5591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5592 { (eval echo configure:5593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5594 if test -z "$ac_err"; then
5595   rm -rf conftest*
5596   eval "ac_cv_header_$ac_safe=yes"
5597 else
5598   echo "$ac_err" >&5
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   eval "ac_cv_header_$ac_safe=no"
5603 fi
5604 rm -f conftest*
5605 fi
5606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5607   echo "$ac_t""yes" 1>&6
5608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5609   cat >> confdefs.h <<EOF
5610 #define $ac_tr_hdr 1
5611 EOF
5612  
5613 else
5614   echo "$ac_t""no" 1>&6
5615 fi
5616 done
5617
5618
5619         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5620                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5621 echo "configure:5622: checking for main in -lkrb4" >&5
5622 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5624   echo $ac_n "(cached) $ac_c" 1>&6
5625 else
5626   ac_save_LIBS="$LIBS"
5627 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5628 cat > conftest.$ac_ext <<EOF
5629 #line 5630 "configure"
5630 #include "confdefs.h"
5631
5632 int main() {
5633 main()
5634 ; return 0; }
5635 EOF
5636 if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5637   rm -rf conftest*
5638   eval "ac_cv_lib_$ac_lib_var=yes"
5639 else
5640   echo "configure: failed program was:" >&5
5641   cat conftest.$ac_ext >&5
5642   rm -rf conftest*
5643   eval "ac_cv_lib_$ac_lib_var=no"
5644 fi
5645 rm -f conftest*
5646 LIBS="$ac_save_LIBS"
5647
5648 fi
5649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5650   echo "$ac_t""yes" 1>&6
5651   have_k5=yes
5652 else
5653   echo "$ac_t""no" 1>&6
5654 have_k5=no
5655 fi
5656
5657
5658                 if test $have_k5 = yes ; then
5659                         ol_with_kerberos=found
5660                         ol_link_kerberos=yes
5661
5662                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5663
5664                         LIBS="$KRB_LIBS $LIBS"
5665
5666                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5667 echo "configure:5668: checking for des_debug in Kerberos libraries" >&5
5668 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5669   echo $ac_n "(cached) $ac_c" 1>&6
5670 else
5671   
5672                                                                 save_LIBS="$LIBS"
5673                                 LIBS="$KRB_LIBS $LIBS"
5674                                 cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677
5678 #include <kerberosIV/krb.h>
5679 #include <kerberosIV/des.h>
5680 extern int des_debug;
5681
5682 int main() {
5683
5684 des_debug = 1;
5685
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5689   rm -rf conftest*
5690   ol_cv_var_des_debug=yes
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   ol_cv_var_des_debug=no
5696 fi
5697 rm -f conftest*
5698                                                                 LIBS="$save_LIBS"
5699                         
5700 fi
5701
5702 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5703
5704                         if test $ol_cv_var_des_debug = yes ; then
5705                                 cat >> confdefs.h <<\EOF
5706 #define HAVE_DES_DEBUG 1
5707 EOF
5708
5709                         fi
5710
5711                         LIBS="$save_LIBS"
5712                 fi
5713         fi
5714 fi
5715
5716 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5717         for ac_hdr in krb.h des.h
5718 do
5719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5721 echo "configure:5722: checking for $ac_hdr" >&5
5722 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5723   echo $ac_n "(cached) $ac_c" 1>&6
5724 else
5725   cat > conftest.$ac_ext <<EOF
5726 #line 5727 "configure"
5727 #include "confdefs.h"
5728 #include <$ac_hdr>
5729 EOF
5730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5731 { (eval echo configure:5732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5733 if test -z "$ac_err"; then
5734   rm -rf conftest*
5735   eval "ac_cv_header_$ac_safe=yes"
5736 else
5737   echo "$ac_err" >&5
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   eval "ac_cv_header_$ac_safe=no"
5742 fi
5743 rm -f conftest*
5744 fi
5745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5746   echo "$ac_t""yes" 1>&6
5747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5748   cat >> confdefs.h <<EOF
5749 #define $ac_tr_hdr 1
5750 EOF
5751  
5752 else
5753   echo "$ac_t""no" 1>&6
5754 fi
5755 done
5756
5757
5758         if test $ac_cv_header_krb_h = yes ; then
5759                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5760 echo "configure:5761: checking for main in -lkrb" >&5
5761 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765   ac_save_LIBS="$LIBS"
5766 LIBS="-lkrb -ldes $LIBS"
5767 cat > conftest.$ac_ext <<EOF
5768 #line 5769 "configure"
5769 #include "confdefs.h"
5770
5771 int main() {
5772 main()
5773 ; return 0; }
5774 EOF
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5776   rm -rf conftest*
5777   eval "ac_cv_lib_$ac_lib_var=yes"
5778 else
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_lib_$ac_lib_var=no"
5783 fi
5784 rm -f conftest*
5785 LIBS="$ac_save_LIBS"
5786
5787 fi
5788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5789   echo "$ac_t""yes" 1>&6
5790   have_k4=yes
5791 else
5792   echo "$ac_t""no" 1>&6
5793 have_k4=no
5794 fi
5795
5796
5797                 if test $have_k4 = yes ; then
5798                         ol_with_kerberos=found
5799                         ol_link_kerberos=yes
5800
5801                         KRB_LIBS="-lkrb -ldes"
5802                 fi
5803         fi
5804 fi
5805
5806 if test $ol_link_kerberos = yes ; then
5807         cat >> confdefs.h <<\EOF
5808 #define HAVE_KERBEROS 1
5809 EOF
5810
5811 fi
5812
5813 ol_link_tls=no
5814 if test $ol_with_tls != no ; then
5815         
5816         for ac_hdr in openssl/ssl.h ssl.h
5817 do
5818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5820 echo "configure:5821: checking for $ac_hdr" >&5
5821 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5822   echo $ac_n "(cached) $ac_c" 1>&6
5823 else
5824   cat > conftest.$ac_ext <<EOF
5825 #line 5826 "configure"
5826 #include "confdefs.h"
5827 #include <$ac_hdr>
5828 EOF
5829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5830 { (eval echo configure:5831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5832 if test -z "$ac_err"; then
5833   rm -rf conftest*
5834   eval "ac_cv_header_$ac_safe=yes"
5835 else
5836   echo "$ac_err" >&5
5837   echo "configure: failed program was:" >&5
5838   cat conftest.$ac_ext >&5
5839   rm -rf conftest*
5840   eval "ac_cv_header_$ac_safe=no"
5841 fi
5842 rm -f conftest*
5843 fi
5844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5845   echo "$ac_t""yes" 1>&6
5846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5847   cat >> confdefs.h <<EOF
5848 #define $ac_tr_hdr 1
5849 EOF
5850  
5851 else
5852   echo "$ac_t""no" 1>&6
5853 fi
5854 done
5855
5856         
5857         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5858                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5859 echo "configure:5860: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5860 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5862   echo $ac_n "(cached) $ac_c" 1>&6
5863 else
5864   ac_save_LIBS="$LIBS"
5865 LIBS="-lssl -lcrypto $LIBS"
5866 cat > conftest.$ac_ext <<EOF
5867 #line 5868 "configure"
5868 #include "confdefs.h"
5869 /* Override any gcc2 internal prototype to avoid an error.  */
5870 /* We use char because int might match the return type of a gcc2
5871     builtin and then its argument prototype would still apply.  */
5872 char SSLeay_add_ssl_algorithms();
5873
5874 int main() {
5875 SSLeay_add_ssl_algorithms()
5876 ; return 0; }
5877 EOF
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5879   rm -rf conftest*
5880   eval "ac_cv_lib_$ac_lib_var=yes"
5881 else
5882   echo "configure: failed program was:" >&5
5883   cat conftest.$ac_ext >&5
5884   rm -rf conftest*
5885   eval "ac_cv_lib_$ac_lib_var=no"
5886 fi
5887 rm -f conftest*
5888 LIBS="$ac_save_LIBS"
5889
5890 fi
5891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5892   echo "$ac_t""yes" 1>&6
5893   have_ssleay=yes
5894                         need_rsaref=no
5895 else
5896   echo "$ac_t""no" 1>&6
5897 have_ssleay=no
5898 fi
5899
5900                         
5901                 if test $have_ssleay = no ; then
5902                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5903 echo "configure:5904: checking for SSL_library_init in -lssl" >&5
5904 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5905 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5906   echo $ac_n "(cached) $ac_c" 1>&6
5907 else
5908   ac_save_LIBS="$LIBS"
5909 LIBS="-lssl -lcrypto $LIBS"
5910 cat > conftest.$ac_ext <<EOF
5911 #line 5912 "configure"
5912 #include "confdefs.h"
5913 /* Override any gcc2 internal prototype to avoid an error.  */
5914 /* We use char because int might match the return type of a gcc2
5915     builtin and then its argument prototype would still apply.  */
5916 char SSL_library_init();
5917
5918 int main() {
5919 SSL_library_init()
5920 ; return 0; }
5921 EOF
5922 if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5923   rm -rf conftest*
5924   eval "ac_cv_lib_$ac_lib_var=yes"
5925 else
5926   echo "configure: failed program was:" >&5
5927   cat conftest.$ac_ext >&5
5928   rm -rf conftest*
5929   eval "ac_cv_lib_$ac_lib_var=no"
5930 fi
5931 rm -f conftest*
5932 LIBS="$ac_save_LIBS"
5933
5934 fi
5935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5936   echo "$ac_t""yes" 1>&6
5937   have_ssleay=yes
5938                                 need_rsaref=no
5939 else
5940   echo "$ac_t""no" 1>&6
5941 have_ssleay=no
5942 fi
5943
5944                 fi
5945
5946                 if test $have_ssleay = no ; then
5947                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5948 echo "configure:5949: checking for ssl3_accept in -lssl" >&5
5949 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5951   echo $ac_n "(cached) $ac_c" 1>&6
5952 else
5953   ac_save_LIBS="$LIBS"
5954 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5957 "configure"
5957 #include "confdefs.h"
5958 /* Override any gcc2 internal prototype to avoid an error.  */
5959 /* We use char because int might match the return type of a gcc2
5960     builtin and then its argument prototype would still apply.  */
5961 char ssl3_accept();
5962
5963 int main() {
5964 ssl3_accept()
5965 ; return 0; }
5966 EOF
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5968   rm -rf conftest*
5969   eval "ac_cv_lib_$ac_lib_var=yes"
5970 else
5971   echo "configure: failed program was:" >&5
5972   cat conftest.$ac_ext >&5
5973   rm -rf conftest*
5974   eval "ac_cv_lib_$ac_lib_var=no"
5975 fi
5976 rm -f conftest*
5977 LIBS="$ac_save_LIBS"
5978
5979 fi
5980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5981   echo "$ac_t""yes" 1>&6
5982   have_ssleay=yes
5983                                 need_rsaref=yes
5984 else
5985   echo "$ac_t""no" 1>&6
5986 have_ssleay=no
5987 fi
5988
5989                 fi
5990
5991                 if test $have_ssleay = yes ; then
5992                         ol_with_tls=found
5993                         ol_link_tls=yes
5994
5995                         cat >> confdefs.h <<\EOF
5996 #define HAVE_SSLEAY 1
5997 EOF
5998
5999
6000                         if test $need_rsaref = yes; then
6001                                 cat >> confdefs.h <<\EOF
6002 #define HAVE_RSAREF 1
6003 EOF
6004
6005
6006                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6007                         else
6008                                 TLS_LIBS="-lssl -lcrypto"
6009                         fi
6010                 fi
6011         fi
6012 fi
6013
6014 if test $ol_link_tls = yes ; then
6015         cat >> confdefs.h <<\EOF
6016 #define HAVE_TLS 1
6017 EOF
6018
6019 fi      
6020
6021 for ac_func in \
6022         ctime_r                 \
6023         gethostbyname_r gethostbyaddr_r \
6024
6025 do
6026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6027 echo "configure:6028: checking for $ac_func" >&5
6028 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6029   echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031   cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 /* System header to define __stub macros and hopefully few prototypes,
6035     which can conflict with char $ac_func(); below.  */
6036 #include <assert.h>
6037 /* Override any gcc2 internal prototype to avoid an error.  */
6038 /* We use char because int might match the return type of a gcc2
6039     builtin and then its argument prototype would still apply.  */
6040 char $ac_func();
6041 char (*f)();
6042
6043 int main() {
6044
6045 /* The GNU C library defines this for functions which it implements
6046     to always fail with ENOSYS.  Some functions are actually named
6047     something starting with __ and the normal name is an alias.  */
6048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6049 choke me
6050 #else
6051 f = $ac_func;
6052 #endif
6053
6054 ; return 0; }
6055 EOF
6056 if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6057   rm -rf conftest*
6058   eval "ac_cv_func_$ac_func=yes"
6059 else
6060   echo "configure: failed program was:" >&5
6061   cat conftest.$ac_ext >&5
6062   rm -rf conftest*
6063   eval "ac_cv_func_$ac_func=no"
6064 fi
6065 rm -f conftest*
6066 fi
6067
6068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6069   echo "$ac_t""yes" 1>&6
6070     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6071   cat >> confdefs.h <<EOF
6072 #define $ac_tr_func 1
6073 EOF
6074  
6075 else
6076   echo "$ac_t""no" 1>&6
6077 fi
6078 done
6079
6080
6081 if test "$ac_cv_func_ctime_r" = no ; then
6082         ol_cv_func_ctime_r_nargs=0
6083 else
6084         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6085 echo "configure:6086: checking number of arguments of ctime_r" >&5
6086 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6087   echo $ac_n "(cached) $ac_c" 1>&6
6088 else
6089   cat > conftest.$ac_ext <<EOF
6090 #line 6091 "configure"
6091 #include "confdefs.h"
6092 #include <time.h>
6093 int main() {
6094 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6095 ; return 0; }
6096 EOF
6097 if { (eval echo configure:6098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6098   rm -rf conftest*
6099   ol_cv_func_ctime_r_nargs=3
6100 else
6101   echo "configure: failed program was:" >&5
6102   cat conftest.$ac_ext >&5
6103   rm -rf conftest*
6104   cat > conftest.$ac_ext <<EOF
6105 #line 6106 "configure"
6106 #include "confdefs.h"
6107 #include <time.h>
6108 int main() {
6109 time_t ti; char *buffer; ctime_r(&ti,buffer);
6110 ; return 0; }
6111 EOF
6112 if { (eval echo configure:6113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6113   rm -rf conftest*
6114   ol_cv_func_ctime_r_nargs=2
6115 else
6116   echo "configure: failed program was:" >&5
6117   cat conftest.$ac_ext >&5
6118   rm -rf conftest*
6119   ol_cv_func_ctime_r_nargs=0
6120 fi
6121 rm -f conftest*
6122 fi
6123 rm -f conftest*
6124 fi
6125
6126 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6127   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6128     cat >> confdefs.h <<EOF
6129 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6130 EOF
6131
6132   fi
6133
6134 fi
6135
6136 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6137         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6138 echo "configure:6139: checking number of arguments of gethostbyname_r" >&5
6139 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6140   echo $ac_n "(cached) $ac_c" 1>&6
6141 else
6142   cat > conftest.$ac_ext <<EOF
6143 #line 6144 "configure"
6144 #include "confdefs.h"
6145 #include <sys/types.h>
6146 #include <sys/socket.h>
6147 #include <netinet/in.h>
6148 #include <netdb.h>
6149 #define BUFSIZE (sizeof(struct hostent)+10)
6150 int main() {
6151 struct hostent hent; char buffer[BUFSIZE];
6152                 int bufsize=BUFSIZE;int h_errno;
6153                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6154                         buffer, bufsize, &h_errno);
6155 ; return 0; }
6156 EOF
6157 if { (eval echo configure:6158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6158   rm -rf conftest*
6159   ol_cv_func_gethostbyname_r_nargs=5
6160 else
6161   echo "configure: failed program was:" >&5
6162   cat conftest.$ac_ext >&5
6163   rm -rf conftest*
6164   cat > conftest.$ac_ext <<EOF
6165 #line 6166 "configure"
6166 #include "confdefs.h"
6167 #include <sys/types.h>
6168 #include <sys/socket.h>
6169 #include <netinet/in.h>
6170 #include <netdb.h>
6171 #define BUFSIZE (sizeof(struct hostent)+10)
6172 int main() {
6173 struct hostent hent;struct hostent *rhent;
6174                         char buffer[BUFSIZE];
6175                         int bufsize=BUFSIZE;int h_errno;
6176                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6177                                 &rhent, &h_errno);
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6181   rm -rf conftest*
6182   ol_cv_func_gethostbyname_r_nargs=6
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   ol_cv_func_gethostbyname_r_nargs=0
6188 fi
6189 rm -f conftest*
6190 fi
6191 rm -f conftest*
6192 fi
6193
6194 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6195   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6196         cat >> confdefs.h <<EOF
6197 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6198 EOF
6199
6200   fi
6201
6202 else
6203         ol_cv_func_gethostbyname_r_nargs=0
6204 fi
6205  
6206 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6207         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6208 echo "configure:6209: checking number of arguments of gethostbyaddr_r" >&5
6209 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6210   echo $ac_n "(cached) $ac_c" 1>&6
6211 else
6212   cat > conftest.$ac_ext <<EOF
6213 #line 6214 "configure"
6214 #include "confdefs.h"
6215 #include <sys/types.h>
6216 #include <sys/socket.h>
6217 #include <netinet/in.h>
6218 #include <netdb.h>
6219 #define BUFSIZE (sizeof(struct hostent)+10)
6220 int main() {
6221 struct hostent hent; char buffer[BUFSIZE]; 
6222             struct in_addr add;
6223             size_t alen=sizeof(struct in_addr);
6224             int bufsize=BUFSIZE;int h_errno;
6225                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6226                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6230   rm -rf conftest*
6231   ol_cv_func_gethostbyaddr_r_nargs=7
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   cat > conftest.$ac_ext <<EOF
6237 #line 6238 "configure"
6238 #include "confdefs.h"
6239 #include <sys/types.h>
6240 #include <sys/socket.h>
6241 #include <netinet/in.h>
6242 #include <netdb.h>
6243 #define BUFSIZE (sizeof(struct hostent)+10)
6244 int main() {
6245 struct hostent hent;
6246                         struct hostent *rhent; char buffer[BUFSIZE]; 
6247                         struct in_addr add;
6248                         size_t alen=sizeof(struct in_addr);
6249                         int bufsize=BUFSIZE;int h_errno;
6250                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6251                                 alen, AF_INET, &hent, buffer, bufsize, 
6252                                 &rhent, &h_errno);
6253 ; return 0; }
6254 EOF
6255 if { (eval echo configure:6256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6256   rm -rf conftest*
6257   ol_cv_func_gethostbyaddr_r_nargs=8
6258 else
6259   echo "configure: failed program was:" >&5
6260   cat conftest.$ac_ext >&5
6261   rm -rf conftest*
6262   ol_cv_func_gethostbyaddr_r_nargs=0
6263 fi
6264 rm -f conftest*
6265 fi
6266 rm -f conftest*
6267 fi
6268
6269 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6270   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6271     cat >> confdefs.h <<EOF
6272 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6273 EOF
6274
6275   fi
6276
6277 else
6278         ol_cv_func_gethostbyaddr_r_nargs=0
6279 fi
6280
6281 if test "$ac_cv_func_ctime_r" = yes \
6282         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6283         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6284         -a "$ac_cv_func_gethostbyname_r" = yes \
6285         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6286         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6287         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6288         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6289         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6290         ; then
6291  
6292         cat >> confdefs.h <<\EOF
6293 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6294 EOF
6295
6296 fi
6297
6298 ol_link_threads=no
6299 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6300         -o $ol_with_threads = posix ; then
6301
6302         for ac_hdr in pthread.h
6303 do
6304 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6305 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6306 echo "configure:6307: checking for $ac_hdr" >&5
6307 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6308   echo $ac_n "(cached) $ac_c" 1>&6
6309 else
6310   cat > conftest.$ac_ext <<EOF
6311 #line 6312 "configure"
6312 #include "confdefs.h"
6313 #include <$ac_hdr>
6314 EOF
6315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6316 { (eval echo configure:6317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6318 if test -z "$ac_err"; then
6319   rm -rf conftest*
6320   eval "ac_cv_header_$ac_safe=yes"
6321 else
6322   echo "$ac_err" >&5
6323   echo "configure: failed program was:" >&5
6324   cat conftest.$ac_ext >&5
6325   rm -rf conftest*
6326   eval "ac_cv_header_$ac_safe=no"
6327 fi
6328 rm -f conftest*
6329 fi
6330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6331   echo "$ac_t""yes" 1>&6
6332     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6333   cat >> confdefs.h <<EOF
6334 #define $ac_tr_hdr 1
6335 EOF
6336  
6337 else
6338   echo "$ac_t""no" 1>&6
6339 fi
6340 done
6341
6342
6343         if test $ac_cv_header_pthread_h = yes ; then
6344                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6345 echo "configure:6346: checking POSIX thread version" >&5
6346 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6347   echo $ac_n "(cached) $ac_c" 1>&6
6348 else
6349   
6350         cat > conftest.$ac_ext <<EOF
6351 #line 6352 "configure"
6352 #include "confdefs.h"
6353
6354 #               include <pthread.h>
6355                 /* this check could be improved */
6356 #               ifdef PTHREAD_ONCE_INIT
6357                         pthread_version_final
6358 #               endif
6359         
6360 EOF
6361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6362   egrep "pthread_version_final" >/dev/null 2>&1; then
6363   rm -rf conftest*
6364   ol_pthread_final=yes
6365 else
6366   rm -rf conftest*
6367   ol_pthread_final=no
6368 fi
6369 rm -f conftest*
6370
6371
6372         cat > conftest.$ac_ext <<EOF
6373 #line 6374 "configure"
6374 #include "confdefs.h"
6375
6376 #               include <pthread.h>
6377                 /* this check could be improved */
6378 #               ifdef pthread_once_init
6379                         pthread_version_draft4
6380 #               endif
6381         
6382 EOF
6383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6384   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6385   rm -rf conftest*
6386   ol_pthread_draft4=yes
6387 else
6388   rm -rf conftest*
6389   ol_pthread_draft4=no
6390 fi
6391 rm -f conftest*
6392
6393
6394         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6395                 ol_cv_pthread_version=final
6396         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6397                 ol_cv_pthread_version=draft4
6398         else
6399                 ol_cv_pthread_version=unknown
6400         fi
6401
6402 fi
6403
6404 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6405
6406
6407                 if test $ol_cv_pthread_version = final ; then
6408                         cat >> confdefs.h <<\EOF
6409 #define HAVE_PTHREADS_FINAL 1
6410 EOF
6411
6412                 elif test $ol_cv_pthread_version = draft4 ; then
6413                         cat >> confdefs.h <<\EOF
6414 #define HAVE_PTHREADS_D4 1
6415 EOF
6416
6417                 else
6418                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6419                 fi
6420
6421                 # consider threads found
6422                 ol_with_threads=found
6423
6424                 
6425         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6426 echo "configure:6427: checking for LinuxThreads pthread.h" >&5
6427 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6428   echo $ac_n "(cached) $ac_c" 1>&6
6429 else
6430   cat > conftest.$ac_ext <<EOF
6431 #line 6432 "configure"
6432 #include "confdefs.h"
6433 #include <pthread.h>
6434 EOF
6435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6436   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6437   rm -rf conftest*
6438   ol_cv_header_linux_threads=yes
6439 else
6440   rm -rf conftest*
6441   ol_cv_header_linux_threads=no
6442 fi
6443 rm -f conftest*
6444
6445                 
6446 fi
6447
6448 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6449         if test $ol_cv_header_linux_threads = yes; then
6450                 cat >> confdefs.h <<\EOF
6451 #define HAVE_LINUX_THREADS 1
6452 EOF
6453
6454         fi
6455
6456                 
6457         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6458 echo "configure:6459: checking for GNU Pth pthread.h" >&5
6459 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+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 <pthread.h>
6466 #ifdef _POSIX_THREAD_IS_GNU_PTH
6467         __gnu_pth__
6468 #endif
6469
6470 EOF
6471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6472   egrep "__gnu_pth__" >/dev/null 2>&1; then
6473   rm -rf conftest*
6474   ol_cv_header_gnu_pth_pthread_h=yes
6475 else
6476   rm -rf conftest*
6477   ol_cv_header_gnu_pth_pthread_h=no
6478 fi
6479 rm -f conftest*
6480
6481                 
6482 fi
6483
6484 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6485
6486
6487                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6488                         for ac_hdr in sched.h
6489 do
6490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6492 echo "configure:6493: checking for $ac_hdr" >&5
6493 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6494   echo $ac_n "(cached) $ac_c" 1>&6
6495 else
6496   cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 #include <$ac_hdr>
6500 EOF
6501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6502 { (eval echo configure:6503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6504 if test -z "$ac_err"; then
6505   rm -rf conftest*
6506   eval "ac_cv_header_$ac_safe=yes"
6507 else
6508   echo "$ac_err" >&5
6509   echo "configure: failed program was:" >&5
6510   cat conftest.$ac_ext >&5
6511   rm -rf conftest*
6512   eval "ac_cv_header_$ac_safe=no"
6513 fi
6514 rm -f conftest*
6515 fi
6516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6517   echo "$ac_t""yes" 1>&6
6518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6519   cat >> confdefs.h <<EOF
6520 #define $ac_tr_hdr 1
6521 EOF
6522  
6523 else
6524   echo "$ac_t""no" 1>&6
6525 fi
6526 done
6527
6528                 fi
6529
6530                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6531                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6532 echo "configure:6533: checking for pthread_create in default libraries" >&5
6533 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6534   echo $ac_n "(cached) $ac_c" 1>&6
6535 else
6536   
6537                 if test "$cross_compiling" = yes; then
6538   cat > conftest.$ac_ext <<EOF
6539 #line 6540 "configure"
6540 #include "confdefs.h"
6541 /* pthread test headers */
6542 #include <pthread.h>
6543 #ifndef NULL
6544 #define NULL (void*)0
6545 #endif
6546
6547 static void *task(p)
6548         void *p;
6549 {
6550         return (void *) (p == NULL);
6551 }
6552
6553 int main() {
6554
6555         /* pthread test function */
6556         pthread_t t;
6557         int status;
6558
6559         /* make sure pthread_create() isn't just a stub */
6560 #if HAVE_PTHREADS_D4
6561         status = pthread_create(&t, pthread_attr_default, task, NULL);
6562 #else
6563         status = pthread_create(&t, NULL, task, NULL);
6564 #endif
6565
6566         if( status ) exit( status );
6567
6568         /* make sure pthread_detach() isn't just a stub */
6569 #if HAVE_PTHREADS_D4
6570         status = pthread_detach( &t );
6571 #else
6572         status = pthread_detach( t );
6573 #endif
6574
6575 #ifdef HAVE_LINUX_THREADS
6576         pthread_kill_other_threads_np();
6577 #endif
6578
6579         exit( status );
6580
6581 ; return 0; }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584   rm -rf conftest*
6585   ol_cv_pthread_create=yes
6586 else
6587   echo "configure: failed program was:" >&5
6588   cat conftest.$ac_ext >&5
6589   rm -rf conftest*
6590   ol_cv_pthread_create=no
6591 fi
6592 rm -f conftest*
6593 else
6594   cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 /* pthread test headers */
6598 #include <pthread.h>
6599 #ifndef NULL
6600 #define NULL (void*)0
6601 #endif
6602
6603 static void *task(p)
6604         void *p;
6605 {
6606         return (void *) (p == NULL);
6607 }
6608
6609
6610 int main(argc, argv)
6611         int argc;
6612         char **argv;
6613 {
6614
6615         /* pthread test function */
6616         pthread_t t;
6617         int status;
6618
6619         /* make sure pthread_create() isn't just a stub */
6620 #if HAVE_PTHREADS_D4
6621         status = pthread_create(&t, pthread_attr_default, task, NULL);
6622 #else
6623         status = pthread_create(&t, NULL, task, NULL);
6624 #endif
6625
6626         if( status ) exit( status );
6627
6628         /* make sure pthread_detach() isn't just a stub */
6629 #if HAVE_PTHREADS_D4
6630         status = pthread_detach( &t );
6631 #else
6632         status = pthread_detach( t );
6633 #endif
6634
6635 #ifdef HAVE_LINUX_THREADS
6636         pthread_kill_other_threads_np();
6637 #endif
6638
6639         exit( status );
6640
6641 }
6642
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6645 then
6646   ol_cv_pthread_create=yes
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -fr conftest*
6651   ol_cv_pthread_create=no
6652 fi
6653 rm -fr conftest*
6654 fi
6655
6656 fi
6657
6658 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6659
6660                 if test $ol_cv_pthread_create != no ; then
6661                         ol_link_threads=posix
6662                         ol_link_pthreads=""
6663                 fi
6664                 
6665                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6666 if test "$ol_link_threads" = no ; then
6667         # try -kthread
6668         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6669 echo "configure:6670: checking for pthread link with -kthread" >&5
6670 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6671   echo $ac_n "(cached) $ac_c" 1>&6
6672 else
6673   
6674                 # save the flags
6675                 ol_LIBS="$LIBS"
6676                 LIBS="-kthread $LIBS"
6677
6678                 if test "$cross_compiling" = yes; then
6679   cat > conftest.$ac_ext <<EOF
6680 #line 6681 "configure"
6681 #include "confdefs.h"
6682 /* pthread test headers */
6683 #include <pthread.h>
6684 #ifndef NULL
6685 #define NULL (void*)0
6686 #endif
6687
6688 static void *task(p)
6689         void *p;
6690 {
6691         return (void *) (p == NULL);
6692 }
6693
6694 int main() {
6695
6696         /* pthread test function */
6697         pthread_t t;
6698         int status;
6699
6700         /* make sure pthread_create() isn't just a stub */
6701 #if HAVE_PTHREADS_D4
6702         status = pthread_create(&t, pthread_attr_default, task, NULL);
6703 #else
6704         status = pthread_create(&t, NULL, task, NULL);
6705 #endif
6706
6707         if( status ) exit( status );
6708
6709         /* make sure pthread_detach() isn't just a stub */
6710 #if HAVE_PTHREADS_D4
6711         status = pthread_detach( &t );
6712 #else
6713         status = pthread_detach( t );
6714 #endif
6715
6716 #ifdef HAVE_LINUX_THREADS
6717         pthread_kill_other_threads_np();
6718 #endif
6719
6720         exit( status );
6721
6722 ; return 0; }
6723 EOF
6724 if { (eval echo configure:6725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6725   rm -rf conftest*
6726   ol_cv_pthread_kthread=yes
6727 else
6728   echo "configure: failed program was:" >&5
6729   cat conftest.$ac_ext >&5
6730   rm -rf conftest*
6731   ol_cv_pthread_kthread=no
6732 fi
6733 rm -f conftest*
6734 else
6735   cat > conftest.$ac_ext <<EOF
6736 #line 6737 "configure"
6737 #include "confdefs.h"
6738 /* pthread test headers */
6739 #include <pthread.h>
6740 #ifndef NULL
6741 #define NULL (void*)0
6742 #endif
6743
6744 static void *task(p)
6745         void *p;
6746 {
6747         return (void *) (p == NULL);
6748 }
6749
6750
6751 int main(argc, argv)
6752         int argc;
6753         char **argv;
6754 {
6755
6756         /* pthread test function */
6757         pthread_t t;
6758         int status;
6759
6760         /* make sure pthread_create() isn't just a stub */
6761 #if HAVE_PTHREADS_D4
6762         status = pthread_create(&t, pthread_attr_default, task, NULL);
6763 #else
6764         status = pthread_create(&t, NULL, task, NULL);
6765 #endif
6766
6767         if( status ) exit( status );
6768
6769         /* make sure pthread_detach() isn't just a stub */
6770 #if HAVE_PTHREADS_D4
6771         status = pthread_detach( &t );
6772 #else
6773         status = pthread_detach( t );
6774 #endif
6775
6776 #ifdef HAVE_LINUX_THREADS
6777         pthread_kill_other_threads_np();
6778 #endif
6779
6780         exit( status );
6781
6782 }
6783
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6786 then
6787   ol_cv_pthread_kthread=yes
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791   rm -fr conftest*
6792   ol_cv_pthread_kthread=no
6793 fi
6794 rm -fr conftest*
6795 fi
6796
6797
6798                 # restore the LIBS
6799                 LIBS="$ol_LIBS"
6800         
6801 fi
6802
6803 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6804
6805         if test $ol_cv_pthread_kthread = yes ; then
6806                 ol_link_pthreads="-kthread"
6807                 ol_link_threads=posix
6808         fi
6809 fi
6810
6811                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6812 if test "$ol_link_threads" = no ; then
6813         # try -pthread
6814         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6815 echo "configure:6816: checking for pthread link with -pthread" >&5
6816 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6817   echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819   
6820                 # save the flags
6821                 ol_LIBS="$LIBS"
6822                 LIBS="-pthread $LIBS"
6823
6824                 if test "$cross_compiling" = yes; then
6825   cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 /* pthread test headers */
6829 #include <pthread.h>
6830 #ifndef NULL
6831 #define NULL (void*)0
6832 #endif
6833
6834 static void *task(p)
6835         void *p;
6836 {
6837         return (void *) (p == NULL);
6838 }
6839
6840 int main() {
6841
6842         /* pthread test function */
6843         pthread_t t;
6844         int status;
6845
6846         /* make sure pthread_create() isn't just a stub */
6847 #if HAVE_PTHREADS_D4
6848         status = pthread_create(&t, pthread_attr_default, task, NULL);
6849 #else
6850         status = pthread_create(&t, NULL, task, NULL);
6851 #endif
6852
6853         if( status ) exit( status );
6854
6855         /* make sure pthread_detach() isn't just a stub */
6856 #if HAVE_PTHREADS_D4
6857         status = pthread_detach( &t );
6858 #else
6859         status = pthread_detach( t );
6860 #endif
6861
6862 #ifdef HAVE_LINUX_THREADS
6863         pthread_kill_other_threads_np();
6864 #endif
6865
6866         exit( status );
6867
6868 ; return 0; }
6869 EOF
6870 if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6871   rm -rf conftest*
6872   ol_cv_pthread_pthread=yes
6873 else
6874   echo "configure: failed program was:" >&5
6875   cat conftest.$ac_ext >&5
6876   rm -rf conftest*
6877   ol_cv_pthread_pthread=no
6878 fi
6879 rm -f conftest*
6880 else
6881   cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 /* pthread test headers */
6885 #include <pthread.h>
6886 #ifndef NULL
6887 #define NULL (void*)0
6888 #endif
6889
6890 static void *task(p)
6891         void *p;
6892 {
6893         return (void *) (p == NULL);
6894 }
6895
6896
6897 int main(argc, argv)
6898         int argc;
6899         char **argv;
6900 {
6901
6902         /* pthread test function */
6903         pthread_t t;
6904         int status;
6905
6906         /* make sure pthread_create() isn't just a stub */
6907 #if HAVE_PTHREADS_D4
6908         status = pthread_create(&t, pthread_attr_default, task, NULL);
6909 #else
6910         status = pthread_create(&t, NULL, task, NULL);
6911 #endif
6912
6913         if( status ) exit( status );
6914
6915         /* make sure pthread_detach() isn't just a stub */
6916 #if HAVE_PTHREADS_D4
6917         status = pthread_detach( &t );
6918 #else
6919         status = pthread_detach( t );
6920 #endif
6921
6922 #ifdef HAVE_LINUX_THREADS
6923         pthread_kill_other_threads_np();
6924 #endif
6925
6926         exit( status );
6927
6928 }
6929
6930 EOF
6931 if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6932 then
6933   ol_cv_pthread_pthread=yes
6934 else
6935   echo "configure: failed program was:" >&5
6936   cat conftest.$ac_ext >&5
6937   rm -fr conftest*
6938   ol_cv_pthread_pthread=no
6939 fi
6940 rm -fr conftest*
6941 fi
6942
6943
6944                 # restore the LIBS
6945                 LIBS="$ol_LIBS"
6946         
6947 fi
6948
6949 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6950
6951         if test $ol_cv_pthread_pthread = yes ; then
6952                 ol_link_pthreads="-pthread"
6953                 ol_link_threads=posix
6954         fi
6955 fi
6956
6957                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6958 if test "$ol_link_threads" = no ; then
6959         # try -pthreads
6960         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6961 echo "configure:6962: checking for pthread link with -pthreads" >&5
6962 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6963   echo $ac_n "(cached) $ac_c" 1>&6
6964 else
6965   
6966                 # save the flags
6967                 ol_LIBS="$LIBS"
6968                 LIBS="-pthreads $LIBS"
6969
6970                 if test "$cross_compiling" = yes; then
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 /* pthread test headers */
6975 #include <pthread.h>
6976 #ifndef NULL
6977 #define NULL (void*)0
6978 #endif
6979
6980 static void *task(p)
6981         void *p;
6982 {
6983         return (void *) (p == NULL);
6984 }
6985
6986 int main() {
6987
6988         /* pthread test function */
6989         pthread_t t;
6990         int status;
6991
6992         /* make sure pthread_create() isn't just a stub */
6993 #if HAVE_PTHREADS_D4
6994         status = pthread_create(&t, pthread_attr_default, task, NULL);
6995 #else
6996         status = pthread_create(&t, NULL, task, NULL);
6997 #endif
6998
6999         if( status ) exit( status );
7000
7001         /* make sure pthread_detach() isn't just a stub */
7002 #if HAVE_PTHREADS_D4
7003         status = pthread_detach( &t );
7004 #else
7005         status = pthread_detach( t );
7006 #endif
7007
7008 #ifdef HAVE_LINUX_THREADS
7009         pthread_kill_other_threads_np();
7010 #endif
7011
7012         exit( status );
7013
7014 ; return 0; }
7015 EOF
7016 if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7017   rm -rf conftest*
7018   ol_cv_pthread_pthreads=yes
7019 else
7020   echo "configure: failed program was:" >&5
7021   cat conftest.$ac_ext >&5
7022   rm -rf conftest*
7023   ol_cv_pthread_pthreads=no
7024 fi
7025 rm -f conftest*
7026 else
7027   cat > conftest.$ac_ext <<EOF
7028 #line 7029 "configure"
7029 #include "confdefs.h"
7030 /* pthread test headers */
7031 #include <pthread.h>
7032 #ifndef NULL
7033 #define NULL (void*)0
7034 #endif
7035
7036 static void *task(p)
7037         void *p;
7038 {
7039         return (void *) (p == NULL);
7040 }
7041
7042
7043 int main(argc, argv)
7044         int argc;
7045         char **argv;
7046 {
7047
7048         /* pthread test function */
7049         pthread_t t;
7050         int status;
7051
7052         /* make sure pthread_create() isn't just a stub */
7053 #if HAVE_PTHREADS_D4
7054         status = pthread_create(&t, pthread_attr_default, task, NULL);
7055 #else
7056         status = pthread_create(&t, NULL, task, NULL);
7057 #endif
7058
7059         if( status ) exit( status );
7060
7061         /* make sure pthread_detach() isn't just a stub */
7062 #if HAVE_PTHREADS_D4
7063         status = pthread_detach( &t );
7064 #else
7065         status = pthread_detach( t );
7066 #endif
7067
7068 #ifdef HAVE_LINUX_THREADS
7069         pthread_kill_other_threads_np();
7070 #endif
7071
7072         exit( status );
7073
7074 }
7075
7076 EOF
7077 if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7078 then
7079   ol_cv_pthread_pthreads=yes
7080 else
7081   echo "configure: failed program was:" >&5
7082   cat conftest.$ac_ext >&5
7083   rm -fr conftest*
7084   ol_cv_pthread_pthreads=no
7085 fi
7086 rm -fr conftest*
7087 fi
7088
7089
7090                 # restore the LIBS
7091                 LIBS="$ol_LIBS"
7092         
7093 fi
7094
7095 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7096
7097         if test $ol_cv_pthread_pthreads = yes ; then
7098                 ol_link_pthreads="-pthreads"
7099                 ol_link_threads=posix
7100         fi
7101 fi
7102
7103                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7104 if test "$ol_link_threads" = no ; then
7105         # try -mthreads
7106         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7107 echo "configure:7108: checking for pthread link with -mthreads" >&5
7108 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7109   echo $ac_n "(cached) $ac_c" 1>&6
7110 else
7111   
7112                 # save the flags
7113                 ol_LIBS="$LIBS"
7114                 LIBS="-mthreads $LIBS"
7115
7116                 if test "$cross_compiling" = yes; then
7117   cat > conftest.$ac_ext <<EOF
7118 #line 7119 "configure"
7119 #include "confdefs.h"
7120 /* pthread test headers */
7121 #include <pthread.h>
7122 #ifndef NULL
7123 #define NULL (void*)0
7124 #endif
7125
7126 static void *task(p)
7127         void *p;
7128 {
7129         return (void *) (p == NULL);
7130 }
7131
7132 int main() {
7133
7134         /* pthread test function */
7135         pthread_t t;
7136         int status;
7137
7138         /* make sure pthread_create() isn't just a stub */
7139 #if HAVE_PTHREADS_D4
7140         status = pthread_create(&t, pthread_attr_default, task, NULL);
7141 #else
7142         status = pthread_create(&t, NULL, task, NULL);
7143 #endif
7144
7145         if( status ) exit( status );
7146
7147         /* make sure pthread_detach() isn't just a stub */
7148 #if HAVE_PTHREADS_D4
7149         status = pthread_detach( &t );
7150 #else
7151         status = pthread_detach( t );
7152 #endif
7153
7154 #ifdef HAVE_LINUX_THREADS
7155         pthread_kill_other_threads_np();
7156 #endif
7157
7158         exit( status );
7159
7160 ; return 0; }
7161 EOF
7162 if { (eval echo configure:7163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7163   rm -rf conftest*
7164   ol_cv_pthread_mthreads=yes
7165 else
7166   echo "configure: failed program was:" >&5
7167   cat conftest.$ac_ext >&5
7168   rm -rf conftest*
7169   ol_cv_pthread_mthreads=no
7170 fi
7171 rm -f conftest*
7172 else
7173   cat > conftest.$ac_ext <<EOF
7174 #line 7175 "configure"
7175 #include "confdefs.h"
7176 /* pthread test headers */
7177 #include <pthread.h>
7178 #ifndef NULL
7179 #define NULL (void*)0
7180 #endif
7181
7182 static void *task(p)
7183         void *p;
7184 {
7185         return (void *) (p == NULL);
7186 }
7187
7188
7189 int main(argc, argv)
7190         int argc;
7191         char **argv;
7192 {
7193
7194         /* pthread test function */
7195         pthread_t t;
7196         int status;
7197
7198         /* make sure pthread_create() isn't just a stub */
7199 #if HAVE_PTHREADS_D4
7200         status = pthread_create(&t, pthread_attr_default, task, NULL);
7201 #else
7202         status = pthread_create(&t, NULL, task, NULL);
7203 #endif
7204
7205         if( status ) exit( status );
7206
7207         /* make sure pthread_detach() isn't just a stub */
7208 #if HAVE_PTHREADS_D4
7209         status = pthread_detach( &t );
7210 #else
7211         status = pthread_detach( t );
7212 #endif
7213
7214 #ifdef HAVE_LINUX_THREADS
7215         pthread_kill_other_threads_np();
7216 #endif
7217
7218         exit( status );
7219
7220 }
7221
7222 EOF
7223 if { (eval echo configure:7224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7224 then
7225   ol_cv_pthread_mthreads=yes
7226 else
7227   echo "configure: failed program was:" >&5
7228   cat conftest.$ac_ext >&5
7229   rm -fr conftest*
7230   ol_cv_pthread_mthreads=no
7231 fi
7232 rm -fr conftest*
7233 fi
7234
7235
7236                 # restore the LIBS
7237                 LIBS="$ol_LIBS"
7238         
7239 fi
7240
7241 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7242
7243         if test $ol_cv_pthread_mthreads = yes ; then
7244                 ol_link_pthreads="-mthreads"
7245                 ol_link_threads=posix
7246         fi
7247 fi
7248
7249                 # Pthread try link: -thread (ol_cv_pthread_thread)
7250 if test "$ol_link_threads" = no ; then
7251         # try -thread
7252         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7253 echo "configure:7254: checking for pthread link with -thread" >&5
7254 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   
7258                 # save the flags
7259                 ol_LIBS="$LIBS"
7260                 LIBS="-thread $LIBS"
7261
7262                 if test "$cross_compiling" = yes; then
7263   cat > conftest.$ac_ext <<EOF
7264 #line 7265 "configure"
7265 #include "confdefs.h"
7266 /* pthread test headers */
7267 #include <pthread.h>
7268 #ifndef NULL
7269 #define NULL (void*)0
7270 #endif
7271
7272 static void *task(p)
7273         void *p;
7274 {
7275         return (void *) (p == NULL);
7276 }
7277
7278 int main() {
7279
7280         /* pthread test function */
7281         pthread_t t;
7282         int status;
7283
7284         /* make sure pthread_create() isn't just a stub */
7285 #if HAVE_PTHREADS_D4
7286         status = pthread_create(&t, pthread_attr_default, task, NULL);
7287 #else
7288         status = pthread_create(&t, NULL, task, NULL);
7289 #endif
7290
7291         if( status ) exit( status );
7292
7293         /* make sure pthread_detach() isn't just a stub */
7294 #if HAVE_PTHREADS_D4
7295         status = pthread_detach( &t );
7296 #else
7297         status = pthread_detach( t );
7298 #endif
7299
7300 #ifdef HAVE_LINUX_THREADS
7301         pthread_kill_other_threads_np();
7302 #endif
7303
7304         exit( status );
7305
7306 ; return 0; }
7307 EOF
7308 if { (eval echo configure:7309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7309   rm -rf conftest*
7310   ol_cv_pthread_thread=yes
7311 else
7312   echo "configure: failed program was:" >&5
7313   cat conftest.$ac_ext >&5
7314   rm -rf conftest*
7315   ol_cv_pthread_thread=no
7316 fi
7317 rm -f conftest*
7318 else
7319   cat > conftest.$ac_ext <<EOF
7320 #line 7321 "configure"
7321 #include "confdefs.h"
7322 /* pthread test headers */
7323 #include <pthread.h>
7324 #ifndef NULL
7325 #define NULL (void*)0
7326 #endif
7327
7328 static void *task(p)
7329         void *p;
7330 {
7331         return (void *) (p == NULL);
7332 }
7333
7334
7335 int main(argc, argv)
7336         int argc;
7337         char **argv;
7338 {
7339
7340         /* pthread test function */
7341         pthread_t t;
7342         int status;
7343
7344         /* make sure pthread_create() isn't just a stub */
7345 #if HAVE_PTHREADS_D4
7346         status = pthread_create(&t, pthread_attr_default, task, NULL);
7347 #else
7348         status = pthread_create(&t, NULL, task, NULL);
7349 #endif
7350
7351         if( status ) exit( status );
7352
7353         /* make sure pthread_detach() isn't just a stub */
7354 #if HAVE_PTHREADS_D4
7355         status = pthread_detach( &t );
7356 #else
7357         status = pthread_detach( t );
7358 #endif
7359
7360 #ifdef HAVE_LINUX_THREADS
7361         pthread_kill_other_threads_np();
7362 #endif
7363
7364         exit( status );
7365
7366 }
7367
7368 EOF
7369 if { (eval echo configure:7370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7370 then
7371   ol_cv_pthread_thread=yes
7372 else
7373   echo "configure: failed program was:" >&5
7374   cat conftest.$ac_ext >&5
7375   rm -fr conftest*
7376   ol_cv_pthread_thread=no
7377 fi
7378 rm -fr conftest*
7379 fi
7380
7381
7382                 # restore the LIBS
7383                 LIBS="$ol_LIBS"
7384         
7385 fi
7386
7387 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7388
7389         if test $ol_cv_pthread_thread = yes ; then
7390                 ol_link_pthreads="-thread"
7391                 ol_link_threads=posix
7392         fi
7393 fi
7394
7395
7396                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7397 if test "$ol_link_threads" = no ; then
7398         # try -lpthread -lmach -lexc -lc_r
7399         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7400 echo "configure:7401: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7401 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7402   echo $ac_n "(cached) $ac_c" 1>&6
7403 else
7404   
7405                 # save the flags
7406                 ol_LIBS="$LIBS"
7407                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7408
7409                 if test "$cross_compiling" = yes; then
7410   cat > conftest.$ac_ext <<EOF
7411 #line 7412 "configure"
7412 #include "confdefs.h"
7413 /* pthread test headers */
7414 #include <pthread.h>
7415 #ifndef NULL
7416 #define NULL (void*)0
7417 #endif
7418
7419 static void *task(p)
7420         void *p;
7421 {
7422         return (void *) (p == NULL);
7423 }
7424
7425 int main() {
7426
7427         /* pthread test function */
7428         pthread_t t;
7429         int status;
7430
7431         /* make sure pthread_create() isn't just a stub */
7432 #if HAVE_PTHREADS_D4
7433         status = pthread_create(&t, pthread_attr_default, task, NULL);
7434 #else
7435         status = pthread_create(&t, NULL, task, NULL);
7436 #endif
7437
7438         if( status ) exit( status );
7439
7440         /* make sure pthread_detach() isn't just a stub */
7441 #if HAVE_PTHREADS_D4
7442         status = pthread_detach( &t );
7443 #else
7444         status = pthread_detach( t );
7445 #endif
7446
7447 #ifdef HAVE_LINUX_THREADS
7448         pthread_kill_other_threads_np();
7449 #endif
7450
7451         exit( status );
7452
7453 ; return 0; }
7454 EOF
7455 if { (eval echo configure:7456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7456   rm -rf conftest*
7457   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7458 else
7459   echo "configure: failed program was:" >&5
7460   cat conftest.$ac_ext >&5
7461   rm -rf conftest*
7462   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7463 fi
7464 rm -f conftest*
7465 else
7466   cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 /* pthread test headers */
7470 #include <pthread.h>
7471 #ifndef NULL
7472 #define NULL (void*)0
7473 #endif
7474
7475 static void *task(p)
7476         void *p;
7477 {
7478         return (void *) (p == NULL);
7479 }
7480
7481
7482 int main(argc, argv)
7483         int argc;
7484         char **argv;
7485 {
7486
7487         /* pthread test function */
7488         pthread_t t;
7489         int status;
7490
7491         /* make sure pthread_create() isn't just a stub */
7492 #if HAVE_PTHREADS_D4
7493         status = pthread_create(&t, pthread_attr_default, task, NULL);
7494 #else
7495         status = pthread_create(&t, NULL, task, NULL);
7496 #endif
7497
7498         if( status ) exit( status );
7499
7500         /* make sure pthread_detach() isn't just a stub */
7501 #if HAVE_PTHREADS_D4
7502         status = pthread_detach( &t );
7503 #else
7504         status = pthread_detach( t );
7505 #endif
7506
7507 #ifdef HAVE_LINUX_THREADS
7508         pthread_kill_other_threads_np();
7509 #endif
7510
7511         exit( status );
7512
7513 }
7514
7515 EOF
7516 if { (eval echo configure:7517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7517 then
7518   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7519 else
7520   echo "configure: failed program was:" >&5
7521   cat conftest.$ac_ext >&5
7522   rm -fr conftest*
7523   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7524 fi
7525 rm -fr conftest*
7526 fi
7527
7528
7529                 # restore the LIBS
7530                 LIBS="$ol_LIBS"
7531         
7532 fi
7533
7534 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7535
7536         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7537                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7538                 ol_link_threads=posix
7539         fi
7540 fi
7541
7542                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7543 if test "$ol_link_threads" = no ; then
7544         # try -lpthread -lmach -lexc
7545         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7546 echo "configure:7547: checking for pthread link with -lpthread -lmach -lexc" >&5
7547 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7548   echo $ac_n "(cached) $ac_c" 1>&6
7549 else
7550   
7551                 # save the flags
7552                 ol_LIBS="$LIBS"
7553                 LIBS="-lpthread -lmach -lexc $LIBS"
7554
7555                 if test "$cross_compiling" = yes; then
7556   cat > conftest.$ac_ext <<EOF
7557 #line 7558 "configure"
7558 #include "confdefs.h"
7559 /* pthread test headers */
7560 #include <pthread.h>
7561 #ifndef NULL
7562 #define NULL (void*)0
7563 #endif
7564
7565 static void *task(p)
7566         void *p;
7567 {
7568         return (void *) (p == NULL);
7569 }
7570
7571 int main() {
7572
7573         /* pthread test function */
7574         pthread_t t;
7575         int status;
7576
7577         /* make sure pthread_create() isn't just a stub */
7578 #if HAVE_PTHREADS_D4
7579         status = pthread_create(&t, pthread_attr_default, task, NULL);
7580 #else
7581         status = pthread_create(&t, NULL, task, NULL);
7582 #endif
7583
7584         if( status ) exit( status );
7585
7586         /* make sure pthread_detach() isn't just a stub */
7587 #if HAVE_PTHREADS_D4
7588         status = pthread_detach( &t );
7589 #else
7590         status = pthread_detach( t );
7591 #endif
7592
7593 #ifdef HAVE_LINUX_THREADS
7594         pthread_kill_other_threads_np();
7595 #endif
7596
7597         exit( status );
7598
7599 ; return 0; }
7600 EOF
7601 if { (eval echo configure:7602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7602   rm -rf conftest*
7603   ol_cv_pthread_lpthread_lmach_lexc=yes
7604 else
7605   echo "configure: failed program was:" >&5
7606   cat conftest.$ac_ext >&5
7607   rm -rf conftest*
7608   ol_cv_pthread_lpthread_lmach_lexc=no
7609 fi
7610 rm -f conftest*
7611 else
7612   cat > conftest.$ac_ext <<EOF
7613 #line 7614 "configure"
7614 #include "confdefs.h"
7615 /* pthread test headers */
7616 #include <pthread.h>
7617 #ifndef NULL
7618 #define NULL (void*)0
7619 #endif
7620
7621 static void *task(p)
7622         void *p;
7623 {
7624         return (void *) (p == NULL);
7625 }
7626
7627
7628 int main(argc, argv)
7629         int argc;
7630         char **argv;
7631 {
7632
7633         /* pthread test function */
7634         pthread_t t;
7635         int status;
7636
7637         /* make sure pthread_create() isn't just a stub */
7638 #if HAVE_PTHREADS_D4
7639         status = pthread_create(&t, pthread_attr_default, task, NULL);
7640 #else
7641         status = pthread_create(&t, NULL, task, NULL);
7642 #endif
7643
7644         if( status ) exit( status );
7645
7646         /* make sure pthread_detach() isn't just a stub */
7647 #if HAVE_PTHREADS_D4
7648         status = pthread_detach( &t );
7649 #else
7650         status = pthread_detach( t );
7651 #endif
7652
7653 #ifdef HAVE_LINUX_THREADS
7654         pthread_kill_other_threads_np();
7655 #endif
7656
7657         exit( status );
7658
7659 }
7660
7661 EOF
7662 if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7663 then
7664   ol_cv_pthread_lpthread_lmach_lexc=yes
7665 else
7666   echo "configure: failed program was:" >&5
7667   cat conftest.$ac_ext >&5
7668   rm -fr conftest*
7669   ol_cv_pthread_lpthread_lmach_lexc=no
7670 fi
7671 rm -fr conftest*
7672 fi
7673
7674
7675                 # restore the LIBS
7676                 LIBS="$ol_LIBS"
7677         
7678 fi
7679
7680 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7681
7682         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7683                 ol_link_pthreads="-lpthread -lmach -lexc"
7684                 ol_link_threads=posix
7685         fi
7686 fi
7687
7688
7689                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7690 if test "$ol_link_threads" = no ; then
7691         # try -lpthread -Wl,-woff,85
7692         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7693 echo "configure:7694: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7694 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7695   echo $ac_n "(cached) $ac_c" 1>&6
7696 else
7697   
7698                 # save the flags
7699                 ol_LIBS="$LIBS"
7700                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7701
7702                 if test "$cross_compiling" = yes; then
7703   cat > conftest.$ac_ext <<EOF
7704 #line 7705 "configure"
7705 #include "confdefs.h"
7706 /* pthread test headers */
7707 #include <pthread.h>
7708 #ifndef NULL
7709 #define NULL (void*)0
7710 #endif
7711
7712 static void *task(p)
7713         void *p;
7714 {
7715         return (void *) (p == NULL);
7716 }
7717
7718 int main() {
7719
7720         /* pthread test function */
7721         pthread_t t;
7722         int status;
7723
7724         /* make sure pthread_create() isn't just a stub */
7725 #if HAVE_PTHREADS_D4
7726         status = pthread_create(&t, pthread_attr_default, task, NULL);
7727 #else
7728         status = pthread_create(&t, NULL, task, NULL);
7729 #endif
7730
7731         if( status ) exit( status );
7732
7733         /* make sure pthread_detach() isn't just a stub */
7734 #if HAVE_PTHREADS_D4
7735         status = pthread_detach( &t );
7736 #else
7737         status = pthread_detach( t );
7738 #endif
7739
7740 #ifdef HAVE_LINUX_THREADS
7741         pthread_kill_other_threads_np();
7742 #endif
7743
7744         exit( status );
7745
7746 ; return 0; }
7747 EOF
7748 if { (eval echo configure:7749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7749   rm -rf conftest*
7750   ol_cv_pthread_lib_lpthread_woff=yes
7751 else
7752   echo "configure: failed program was:" >&5
7753   cat conftest.$ac_ext >&5
7754   rm -rf conftest*
7755   ol_cv_pthread_lib_lpthread_woff=no
7756 fi
7757 rm -f conftest*
7758 else
7759   cat > conftest.$ac_ext <<EOF
7760 #line 7761 "configure"
7761 #include "confdefs.h"
7762 /* pthread test headers */
7763 #include <pthread.h>
7764 #ifndef NULL
7765 #define NULL (void*)0
7766 #endif
7767
7768 static void *task(p)
7769         void *p;
7770 {
7771         return (void *) (p == NULL);
7772 }
7773
7774
7775 int main(argc, argv)
7776         int argc;
7777         char **argv;
7778 {
7779
7780         /* pthread test function */
7781         pthread_t t;
7782         int status;
7783
7784         /* make sure pthread_create() isn't just a stub */
7785 #if HAVE_PTHREADS_D4
7786         status = pthread_create(&t, pthread_attr_default, task, NULL);
7787 #else
7788         status = pthread_create(&t, NULL, task, NULL);
7789 #endif
7790
7791         if( status ) exit( status );
7792
7793         /* make sure pthread_detach() isn't just a stub */
7794 #if HAVE_PTHREADS_D4
7795         status = pthread_detach( &t );
7796 #else
7797         status = pthread_detach( t );
7798 #endif
7799
7800 #ifdef HAVE_LINUX_THREADS
7801         pthread_kill_other_threads_np();
7802 #endif
7803
7804         exit( status );
7805
7806 }
7807
7808 EOF
7809 if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7810 then
7811   ol_cv_pthread_lib_lpthread_woff=yes
7812 else
7813   echo "configure: failed program was:" >&5
7814   cat conftest.$ac_ext >&5
7815   rm -fr conftest*
7816   ol_cv_pthread_lib_lpthread_woff=no
7817 fi
7818 rm -fr conftest*
7819 fi
7820
7821
7822                 # restore the LIBS
7823                 LIBS="$ol_LIBS"
7824         
7825 fi
7826
7827 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7828
7829         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7830                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7831                 ol_link_threads=posix
7832         fi
7833 fi
7834
7835
7836                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7837 if test "$ol_link_threads" = no ; then
7838         # try -lpthread
7839         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7840 echo "configure:7841: checking for pthread link with -lpthread" >&5
7841 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7842   echo $ac_n "(cached) $ac_c" 1>&6
7843 else
7844   
7845                 # save the flags
7846                 ol_LIBS="$LIBS"
7847                 LIBS="-lpthread $LIBS"
7848
7849                 if test "$cross_compiling" = yes; then
7850   cat > conftest.$ac_ext <<EOF
7851 #line 7852 "configure"
7852 #include "confdefs.h"
7853 /* pthread test headers */
7854 #include <pthread.h>
7855 #ifndef NULL
7856 #define NULL (void*)0
7857 #endif
7858
7859 static void *task(p)
7860         void *p;
7861 {
7862         return (void *) (p == NULL);
7863 }
7864
7865 int main() {
7866
7867         /* pthread test function */
7868         pthread_t t;
7869         int status;
7870
7871         /* make sure pthread_create() isn't just a stub */
7872 #if HAVE_PTHREADS_D4
7873         status = pthread_create(&t, pthread_attr_default, task, NULL);
7874 #else
7875         status = pthread_create(&t, NULL, task, NULL);
7876 #endif
7877
7878         if( status ) exit( status );
7879
7880         /* make sure pthread_detach() isn't just a stub */
7881 #if HAVE_PTHREADS_D4
7882         status = pthread_detach( &t );
7883 #else
7884         status = pthread_detach( t );
7885 #endif
7886
7887 #ifdef HAVE_LINUX_THREADS
7888         pthread_kill_other_threads_np();
7889 #endif
7890
7891         exit( status );
7892
7893 ; return 0; }
7894 EOF
7895 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7896   rm -rf conftest*
7897   ol_cv_pthread_lpthread=yes
7898 else
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   ol_cv_pthread_lpthread=no
7903 fi
7904 rm -f conftest*
7905 else
7906   cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 /* pthread test headers */
7910 #include <pthread.h>
7911 #ifndef NULL
7912 #define NULL (void*)0
7913 #endif
7914
7915 static void *task(p)
7916         void *p;
7917 {
7918         return (void *) (p == NULL);
7919 }
7920
7921
7922 int main(argc, argv)
7923         int argc;
7924         char **argv;
7925 {
7926
7927         /* pthread test function */
7928         pthread_t t;
7929         int status;
7930
7931         /* make sure pthread_create() isn't just a stub */
7932 #if HAVE_PTHREADS_D4
7933         status = pthread_create(&t, pthread_attr_default, task, NULL);
7934 #else
7935         status = pthread_create(&t, NULL, task, NULL);
7936 #endif
7937
7938         if( status ) exit( status );
7939
7940         /* make sure pthread_detach() isn't just a stub */
7941 #if HAVE_PTHREADS_D4
7942         status = pthread_detach( &t );
7943 #else
7944         status = pthread_detach( t );
7945 #endif
7946
7947 #ifdef HAVE_LINUX_THREADS
7948         pthread_kill_other_threads_np();
7949 #endif
7950
7951         exit( status );
7952
7953 }
7954
7955 EOF
7956 if { (eval echo configure:7957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7957 then
7958   ol_cv_pthread_lpthread=yes
7959 else
7960   echo "configure: failed program was:" >&5
7961   cat conftest.$ac_ext >&5
7962   rm -fr conftest*
7963   ol_cv_pthread_lpthread=no
7964 fi
7965 rm -fr conftest*
7966 fi
7967
7968
7969                 # restore the LIBS
7970                 LIBS="$ol_LIBS"
7971         
7972 fi
7973
7974 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7975
7976         if test $ol_cv_pthread_lpthread = yes ; then
7977                 ol_link_pthreads="-lpthread"
7978                 ol_link_threads=posix
7979         fi
7980 fi
7981
7982                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7983 if test "$ol_link_threads" = no ; then
7984         # try -lc_r
7985         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7986 echo "configure:7987: checking for pthread link with -lc_r" >&5
7987 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   
7991                 # save the flags
7992                 ol_LIBS="$LIBS"
7993                 LIBS="-lc_r $LIBS"
7994
7995                 if test "$cross_compiling" = yes; then
7996   cat > conftest.$ac_ext <<EOF
7997 #line 7998 "configure"
7998 #include "confdefs.h"
7999 /* pthread test headers */
8000 #include <pthread.h>
8001 #ifndef NULL
8002 #define NULL (void*)0
8003 #endif
8004
8005 static void *task(p)
8006         void *p;
8007 {
8008         return (void *) (p == NULL);
8009 }
8010
8011 int main() {
8012
8013         /* pthread test function */
8014         pthread_t t;
8015         int status;
8016
8017         /* make sure pthread_create() isn't just a stub */
8018 #if HAVE_PTHREADS_D4
8019         status = pthread_create(&t, pthread_attr_default, task, NULL);
8020 #else
8021         status = pthread_create(&t, NULL, task, NULL);
8022 #endif
8023
8024         if( status ) exit( status );
8025
8026         /* make sure pthread_detach() isn't just a stub */
8027 #if HAVE_PTHREADS_D4
8028         status = pthread_detach( &t );
8029 #else
8030         status = pthread_detach( t );
8031 #endif
8032
8033 #ifdef HAVE_LINUX_THREADS
8034         pthread_kill_other_threads_np();
8035 #endif
8036
8037         exit( status );
8038
8039 ; return 0; }
8040 EOF
8041 if { (eval echo configure:8042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8042   rm -rf conftest*
8043   ol_cv_pthread_lc_r=yes
8044 else
8045   echo "configure: failed program was:" >&5
8046   cat conftest.$ac_ext >&5
8047   rm -rf conftest*
8048   ol_cv_pthread_lc_r=no
8049 fi
8050 rm -f conftest*
8051 else
8052   cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055 /* pthread test headers */
8056 #include <pthread.h>
8057 #ifndef NULL
8058 #define NULL (void*)0
8059 #endif
8060
8061 static void *task(p)
8062         void *p;
8063 {
8064         return (void *) (p == NULL);
8065 }
8066
8067
8068 int main(argc, argv)
8069         int argc;
8070         char **argv;
8071 {
8072
8073         /* pthread test function */
8074         pthread_t t;
8075         int status;
8076
8077         /* make sure pthread_create() isn't just a stub */
8078 #if HAVE_PTHREADS_D4
8079         status = pthread_create(&t, pthread_attr_default, task, NULL);
8080 #else
8081         status = pthread_create(&t, NULL, task, NULL);
8082 #endif
8083
8084         if( status ) exit( status );
8085
8086         /* make sure pthread_detach() isn't just a stub */
8087 #if HAVE_PTHREADS_D4
8088         status = pthread_detach( &t );
8089 #else
8090         status = pthread_detach( t );
8091 #endif
8092
8093 #ifdef HAVE_LINUX_THREADS
8094         pthread_kill_other_threads_np();
8095 #endif
8096
8097         exit( status );
8098
8099 }
8100
8101 EOF
8102 if { (eval echo configure:8103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8103 then
8104   ol_cv_pthread_lc_r=yes
8105 else
8106   echo "configure: failed program was:" >&5
8107   cat conftest.$ac_ext >&5
8108   rm -fr conftest*
8109   ol_cv_pthread_lc_r=no
8110 fi
8111 rm -fr conftest*
8112 fi
8113
8114
8115                 # restore the LIBS
8116                 LIBS="$ol_LIBS"
8117         
8118 fi
8119
8120 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8121
8122         if test $ol_cv_pthread_lc_r = yes ; then
8123                 ol_link_pthreads="-lc_r"
8124                 ol_link_threads=posix
8125         fi
8126 fi
8127
8128
8129                 # Pthread try link: -threads (ol_cv_pthread_threads)
8130 if test "$ol_link_threads" = no ; then
8131         # try -threads
8132         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8133 echo "configure:8134: checking for pthread link with -threads" >&5
8134 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8135   echo $ac_n "(cached) $ac_c" 1>&6
8136 else
8137   
8138                 # save the flags
8139                 ol_LIBS="$LIBS"
8140                 LIBS="-threads $LIBS"
8141
8142                 if test "$cross_compiling" = yes; then
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 /* pthread test headers */
8147 #include <pthread.h>
8148 #ifndef NULL
8149 #define NULL (void*)0
8150 #endif
8151
8152 static void *task(p)
8153         void *p;
8154 {
8155         return (void *) (p == NULL);
8156 }
8157
8158 int main() {
8159
8160         /* pthread test function */
8161         pthread_t t;
8162         int status;
8163
8164         /* make sure pthread_create() isn't just a stub */
8165 #if HAVE_PTHREADS_D4
8166         status = pthread_create(&t, pthread_attr_default, task, NULL);
8167 #else
8168         status = pthread_create(&t, NULL, task, NULL);
8169 #endif
8170
8171         if( status ) exit( status );
8172
8173         /* make sure pthread_detach() isn't just a stub */
8174 #if HAVE_PTHREADS_D4
8175         status = pthread_detach( &t );
8176 #else
8177         status = pthread_detach( t );
8178 #endif
8179
8180 #ifdef HAVE_LINUX_THREADS
8181         pthread_kill_other_threads_np();
8182 #endif
8183
8184         exit( status );
8185
8186 ; return 0; }
8187 EOF
8188 if { (eval echo configure:8189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8189   rm -rf conftest*
8190   ol_cv_pthread_threads=yes
8191 else
8192   echo "configure: failed program was:" >&5
8193   cat conftest.$ac_ext >&5
8194   rm -rf conftest*
8195   ol_cv_pthread_threads=no
8196 fi
8197 rm -f conftest*
8198 else
8199   cat > conftest.$ac_ext <<EOF
8200 #line 8201 "configure"
8201 #include "confdefs.h"
8202 /* pthread test headers */
8203 #include <pthread.h>
8204 #ifndef NULL
8205 #define NULL (void*)0
8206 #endif
8207
8208 static void *task(p)
8209         void *p;
8210 {
8211         return (void *) (p == NULL);
8212 }
8213
8214
8215 int main(argc, argv)
8216         int argc;
8217         char **argv;
8218 {
8219
8220         /* pthread test function */
8221         pthread_t t;
8222         int status;
8223
8224         /* make sure pthread_create() isn't just a stub */
8225 #if HAVE_PTHREADS_D4
8226         status = pthread_create(&t, pthread_attr_default, task, NULL);
8227 #else
8228         status = pthread_create(&t, NULL, task, NULL);
8229 #endif
8230
8231         if( status ) exit( status );
8232
8233         /* make sure pthread_detach() isn't just a stub */
8234 #if HAVE_PTHREADS_D4
8235         status = pthread_detach( &t );
8236 #else
8237         status = pthread_detach( t );
8238 #endif
8239
8240 #ifdef HAVE_LINUX_THREADS
8241         pthread_kill_other_threads_np();
8242 #endif
8243
8244         exit( status );
8245
8246 }
8247
8248 EOF
8249 if { (eval echo configure:8250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8250 then
8251   ol_cv_pthread_threads=yes
8252 else
8253   echo "configure: failed program was:" >&5
8254   cat conftest.$ac_ext >&5
8255   rm -fr conftest*
8256   ol_cv_pthread_threads=no
8257 fi
8258 rm -fr conftest*
8259 fi
8260
8261
8262                 # restore the LIBS
8263                 LIBS="$ol_LIBS"
8264         
8265 fi
8266
8267 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8268
8269         if test $ol_cv_pthread_threads = yes ; then
8270                 ol_link_pthreads="-threads"
8271                 ol_link_threads=posix
8272         fi
8273 fi
8274
8275
8276                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8277 if test "$ol_link_threads" = no ; then
8278         # try -lpthreads -lmach -lexc -lc_r
8279         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8280 echo "configure:8281: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8281 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   
8285                 # save the flags
8286                 ol_LIBS="$LIBS"
8287                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8288
8289                 if test "$cross_compiling" = yes; then
8290   cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 /* pthread test headers */
8294 #include <pthread.h>
8295 #ifndef NULL
8296 #define NULL (void*)0
8297 #endif
8298
8299 static void *task(p)
8300         void *p;
8301 {
8302         return (void *) (p == NULL);
8303 }
8304
8305 int main() {
8306
8307         /* pthread test function */
8308         pthread_t t;
8309         int status;
8310
8311         /* make sure pthread_create() isn't just a stub */
8312 #if HAVE_PTHREADS_D4
8313         status = pthread_create(&t, pthread_attr_default, task, NULL);
8314 #else
8315         status = pthread_create(&t, NULL, task, NULL);
8316 #endif
8317
8318         if( status ) exit( status );
8319
8320         /* make sure pthread_detach() isn't just a stub */
8321 #if HAVE_PTHREADS_D4
8322         status = pthread_detach( &t );
8323 #else
8324         status = pthread_detach( t );
8325 #endif
8326
8327 #ifdef HAVE_LINUX_THREADS
8328         pthread_kill_other_threads_np();
8329 #endif
8330
8331         exit( status );
8332
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8343 fi
8344 rm -f conftest*
8345 else
8346   cat > conftest.$ac_ext <<EOF
8347 #line 8348 "configure"
8348 #include "confdefs.h"
8349 /* pthread test headers */
8350 #include <pthread.h>
8351 #ifndef NULL
8352 #define NULL (void*)0
8353 #endif
8354
8355 static void *task(p)
8356         void *p;
8357 {
8358         return (void *) (p == NULL);
8359 }
8360
8361
8362 int main(argc, argv)
8363         int argc;
8364         char **argv;
8365 {
8366
8367         /* pthread test function */
8368         pthread_t t;
8369         int status;
8370
8371         /* make sure pthread_create() isn't just a stub */
8372 #if HAVE_PTHREADS_D4
8373         status = pthread_create(&t, pthread_attr_default, task, NULL);
8374 #else
8375         status = pthread_create(&t, NULL, task, NULL);
8376 #endif
8377
8378         if( status ) exit( status );
8379
8380         /* make sure pthread_detach() isn't just a stub */
8381 #if HAVE_PTHREADS_D4
8382         status = pthread_detach( &t );
8383 #else
8384         status = pthread_detach( t );
8385 #endif
8386
8387 #ifdef HAVE_LINUX_THREADS
8388         pthread_kill_other_threads_np();
8389 #endif
8390
8391         exit( status );
8392
8393 }
8394
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8397 then
8398   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8399 else
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -fr conftest*
8403   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8404 fi
8405 rm -fr conftest*
8406 fi
8407
8408
8409                 # restore the LIBS
8410                 LIBS="$ol_LIBS"
8411         
8412 fi
8413
8414 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8415
8416         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8417                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8418                 ol_link_threads=posix
8419         fi
8420 fi
8421
8422                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8423 if test "$ol_link_threads" = no ; then
8424         # try -lpthreads -lmach -lexc
8425         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8426 echo "configure:8427: checking for pthread link with -lpthreads -lmach -lexc" >&5
8427 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8428   echo $ac_n "(cached) $ac_c" 1>&6
8429 else
8430   
8431                 # save the flags
8432                 ol_LIBS="$LIBS"
8433                 LIBS="-lpthreads -lmach -lexc $LIBS"
8434
8435                 if test "$cross_compiling" = yes; then
8436   cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439 /* pthread test headers */
8440 #include <pthread.h>
8441 #ifndef NULL
8442 #define NULL (void*)0
8443 #endif
8444
8445 static void *task(p)
8446         void *p;
8447 {
8448         return (void *) (p == NULL);
8449 }
8450
8451 int main() {
8452
8453         /* pthread test function */
8454         pthread_t t;
8455         int status;
8456
8457         /* make sure pthread_create() isn't just a stub */
8458 #if HAVE_PTHREADS_D4
8459         status = pthread_create(&t, pthread_attr_default, task, NULL);
8460 #else
8461         status = pthread_create(&t, NULL, task, NULL);
8462 #endif
8463
8464         if( status ) exit( status );
8465
8466         /* make sure pthread_detach() isn't just a stub */
8467 #if HAVE_PTHREADS_D4
8468         status = pthread_detach( &t );
8469 #else
8470         status = pthread_detach( t );
8471 #endif
8472
8473 #ifdef HAVE_LINUX_THREADS
8474         pthread_kill_other_threads_np();
8475 #endif
8476
8477         exit( status );
8478
8479 ; return 0; }
8480 EOF
8481 if { (eval echo configure:8482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8482   rm -rf conftest*
8483   ol_cv_pthread_lpthreads_lmach_lexc=yes
8484 else
8485   echo "configure: failed program was:" >&5
8486   cat conftest.$ac_ext >&5
8487   rm -rf conftest*
8488   ol_cv_pthread_lpthreads_lmach_lexc=no
8489 fi
8490 rm -f conftest*
8491 else
8492   cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 /* pthread test headers */
8496 #include <pthread.h>
8497 #ifndef NULL
8498 #define NULL (void*)0
8499 #endif
8500
8501 static void *task(p)
8502         void *p;
8503 {
8504         return (void *) (p == NULL);
8505 }
8506
8507
8508 int main(argc, argv)
8509         int argc;
8510         char **argv;
8511 {
8512
8513         /* pthread test function */
8514         pthread_t t;
8515         int status;
8516
8517         /* make sure pthread_create() isn't just a stub */
8518 #if HAVE_PTHREADS_D4
8519         status = pthread_create(&t, pthread_attr_default, task, NULL);
8520 #else
8521         status = pthread_create(&t, NULL, task, NULL);
8522 #endif
8523
8524         if( status ) exit( status );
8525
8526         /* make sure pthread_detach() isn't just a stub */
8527 #if HAVE_PTHREADS_D4
8528         status = pthread_detach( &t );
8529 #else
8530         status = pthread_detach( t );
8531 #endif
8532
8533 #ifdef HAVE_LINUX_THREADS
8534         pthread_kill_other_threads_np();
8535 #endif
8536
8537         exit( status );
8538
8539 }
8540
8541 EOF
8542 if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8543 then
8544   ol_cv_pthread_lpthreads_lmach_lexc=yes
8545 else
8546   echo "configure: failed program was:" >&5
8547   cat conftest.$ac_ext >&5
8548   rm -fr conftest*
8549   ol_cv_pthread_lpthreads_lmach_lexc=no
8550 fi
8551 rm -fr conftest*
8552 fi
8553
8554
8555                 # restore the LIBS
8556                 LIBS="$ol_LIBS"
8557         
8558 fi
8559
8560 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8561
8562         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8563                 ol_link_pthreads="-lpthreads -lmach -lexc"
8564                 ol_link_threads=posix
8565         fi
8566 fi
8567
8568                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8569 if test "$ol_link_threads" = no ; then
8570         # try -lpthreads -lexc
8571         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8572 echo "configure:8573: checking for pthread link with -lpthreads -lexc" >&5
8573 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8574   echo $ac_n "(cached) $ac_c" 1>&6
8575 else
8576   
8577                 # save the flags
8578                 ol_LIBS="$LIBS"
8579                 LIBS="-lpthreads -lexc $LIBS"
8580
8581                 if test "$cross_compiling" = yes; then
8582   cat > conftest.$ac_ext <<EOF
8583 #line 8584 "configure"
8584 #include "confdefs.h"
8585 /* pthread test headers */
8586 #include <pthread.h>
8587 #ifndef NULL
8588 #define NULL (void*)0
8589 #endif
8590
8591 static void *task(p)
8592         void *p;
8593 {
8594         return (void *) (p == NULL);
8595 }
8596
8597 int main() {
8598
8599         /* pthread test function */
8600         pthread_t t;
8601         int status;
8602
8603         /* make sure pthread_create() isn't just a stub */
8604 #if HAVE_PTHREADS_D4
8605         status = pthread_create(&t, pthread_attr_default, task, NULL);
8606 #else
8607         status = pthread_create(&t, NULL, task, NULL);
8608 #endif
8609
8610         if( status ) exit( status );
8611
8612         /* make sure pthread_detach() isn't just a stub */
8613 #if HAVE_PTHREADS_D4
8614         status = pthread_detach( &t );
8615 #else
8616         status = pthread_detach( t );
8617 #endif
8618
8619 #ifdef HAVE_LINUX_THREADS
8620         pthread_kill_other_threads_np();
8621 #endif
8622
8623         exit( status );
8624
8625 ; return 0; }
8626 EOF
8627 if { (eval echo configure:8628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8628   rm -rf conftest*
8629   ol_cv_pthread_lpthreads_lexc=yes
8630 else
8631   echo "configure: failed program was:" >&5
8632   cat conftest.$ac_ext >&5
8633   rm -rf conftest*
8634   ol_cv_pthread_lpthreads_lexc=no
8635 fi
8636 rm -f conftest*
8637 else
8638   cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8641 /* pthread test headers */
8642 #include <pthread.h>
8643 #ifndef NULL
8644 #define NULL (void*)0
8645 #endif
8646
8647 static void *task(p)
8648         void *p;
8649 {
8650         return (void *) (p == NULL);
8651 }
8652
8653
8654 int main(argc, argv)
8655         int argc;
8656         char **argv;
8657 {
8658
8659         /* pthread test function */
8660         pthread_t t;
8661         int status;
8662
8663         /* make sure pthread_create() isn't just a stub */
8664 #if HAVE_PTHREADS_D4
8665         status = pthread_create(&t, pthread_attr_default, task, NULL);
8666 #else
8667         status = pthread_create(&t, NULL, task, NULL);
8668 #endif
8669
8670         if( status ) exit( status );
8671
8672         /* make sure pthread_detach() isn't just a stub */
8673 #if HAVE_PTHREADS_D4
8674         status = pthread_detach( &t );
8675 #else
8676         status = pthread_detach( t );
8677 #endif
8678
8679 #ifdef HAVE_LINUX_THREADS
8680         pthread_kill_other_threads_np();
8681 #endif
8682
8683         exit( status );
8684
8685 }
8686
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8689 then
8690   ol_cv_pthread_lpthreads_lexc=yes
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -fr conftest*
8695   ol_cv_pthread_lpthreads_lexc=no
8696 fi
8697 rm -fr conftest*
8698 fi
8699
8700
8701                 # restore the LIBS
8702                 LIBS="$ol_LIBS"
8703         
8704 fi
8705
8706 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8707
8708         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8709                 ol_link_pthreads="-lpthreads -lexc"
8710                 ol_link_threads=posix
8711         fi
8712 fi
8713
8714
8715                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8716 if test "$ol_link_threads" = no ; then
8717         # try -lpthreads
8718         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8719 echo "configure:8720: checking for pthread link with -lpthreads" >&5
8720 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8721   echo $ac_n "(cached) $ac_c" 1>&6
8722 else
8723   
8724                 # save the flags
8725                 ol_LIBS="$LIBS"
8726                 LIBS="-lpthreads $LIBS"
8727
8728                 if test "$cross_compiling" = yes; then
8729   cat > conftest.$ac_ext <<EOF
8730 #line 8731 "configure"
8731 #include "confdefs.h"
8732 /* pthread test headers */
8733 #include <pthread.h>
8734 #ifndef NULL
8735 #define NULL (void*)0
8736 #endif
8737
8738 static void *task(p)
8739         void *p;
8740 {
8741         return (void *) (p == NULL);
8742 }
8743
8744 int main() {
8745
8746         /* pthread test function */
8747         pthread_t t;
8748         int status;
8749
8750         /* make sure pthread_create() isn't just a stub */
8751 #if HAVE_PTHREADS_D4
8752         status = pthread_create(&t, pthread_attr_default, task, NULL);
8753 #else
8754         status = pthread_create(&t, NULL, task, NULL);
8755 #endif
8756
8757         if( status ) exit( status );
8758
8759         /* make sure pthread_detach() isn't just a stub */
8760 #if HAVE_PTHREADS_D4
8761         status = pthread_detach( &t );
8762 #else
8763         status = pthread_detach( t );
8764 #endif
8765
8766 #ifdef HAVE_LINUX_THREADS
8767         pthread_kill_other_threads_np();
8768 #endif
8769
8770         exit( status );
8771
8772 ; return 0; }
8773 EOF
8774 if { (eval echo configure:8775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8775   rm -rf conftest*
8776   ol_cv_pthread_lib_lpthreads=yes
8777 else
8778   echo "configure: failed program was:" >&5
8779   cat conftest.$ac_ext >&5
8780   rm -rf conftest*
8781   ol_cv_pthread_lib_lpthreads=no
8782 fi
8783 rm -f conftest*
8784 else
8785   cat > conftest.$ac_ext <<EOF
8786 #line 8787 "configure"
8787 #include "confdefs.h"
8788 /* pthread test headers */
8789 #include <pthread.h>
8790 #ifndef NULL
8791 #define NULL (void*)0
8792 #endif
8793
8794 static void *task(p)
8795         void *p;
8796 {
8797         return (void *) (p == NULL);
8798 }
8799
8800
8801 int main(argc, argv)
8802         int argc;
8803         char **argv;
8804 {
8805
8806         /* pthread test function */
8807         pthread_t t;
8808         int status;
8809
8810         /* make sure pthread_create() isn't just a stub */
8811 #if HAVE_PTHREADS_D4
8812         status = pthread_create(&t, pthread_attr_default, task, NULL);
8813 #else
8814         status = pthread_create(&t, NULL, task, NULL);
8815 #endif
8816
8817         if( status ) exit( status );
8818
8819         /* make sure pthread_detach() isn't just a stub */
8820 #if HAVE_PTHREADS_D4
8821         status = pthread_detach( &t );
8822 #else
8823         status = pthread_detach( t );
8824 #endif
8825
8826 #ifdef HAVE_LINUX_THREADS
8827         pthread_kill_other_threads_np();
8828 #endif
8829
8830         exit( status );
8831
8832 }
8833
8834 EOF
8835 if { (eval echo configure:8836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8836 then
8837   ol_cv_pthread_lib_lpthreads=yes
8838 else
8839   echo "configure: failed program was:" >&5
8840   cat conftest.$ac_ext >&5
8841   rm -fr conftest*
8842   ol_cv_pthread_lib_lpthreads=no
8843 fi
8844 rm -fr conftest*
8845 fi
8846
8847
8848                 # restore the LIBS
8849                 LIBS="$ol_LIBS"
8850         
8851 fi
8852
8853 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8854
8855         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8856                 ol_link_pthreads="-lpthreads"
8857                 ol_link_threads=posix
8858         fi
8859 fi
8860
8861
8862                 if test $ol_link_threads != no ; then
8863                         cat >> confdefs.h <<\EOF
8864 #define HAVE_PTHREADS 1
8865 EOF
8866
8867
8868                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8869
8870                                                 save_CPPFLAGS="$CPPFLAGS"
8871                         save_LIBS="$LIBS"
8872                         LIBS="$LTHREAD_LIBS $LIBS"
8873
8874                                                                                                 for ac_func in sched_yield pthread_yield
8875 do
8876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8877 echo "configure:8878: checking for $ac_func" >&5
8878 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8879   echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881   cat > conftest.$ac_ext <<EOF
8882 #line 8883 "configure"
8883 #include "confdefs.h"
8884 /* System header to define __stub macros and hopefully few prototypes,
8885     which can conflict with char $ac_func(); below.  */
8886 #include <assert.h>
8887 /* Override any gcc2 internal prototype to avoid an error.  */
8888 /* We use char because int might match the return type of a gcc2
8889     builtin and then its argument prototype would still apply.  */
8890 char $ac_func();
8891 char (*f)();
8892
8893 int main() {
8894
8895 /* The GNU C library defines this for functions which it implements
8896     to always fail with ENOSYS.  Some functions are actually named
8897     something starting with __ and the normal name is an alias.  */
8898 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8899 choke me
8900 #else
8901 f = $ac_func;
8902 #endif
8903
8904 ; return 0; }
8905 EOF
8906 if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8907   rm -rf conftest*
8908   eval "ac_cv_func_$ac_func=yes"
8909 else
8910   echo "configure: failed program was:" >&5
8911   cat conftest.$ac_ext >&5
8912   rm -rf conftest*
8913   eval "ac_cv_func_$ac_func=no"
8914 fi
8915 rm -f conftest*
8916 fi
8917
8918 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8919   echo "$ac_t""yes" 1>&6
8920     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8921   cat >> confdefs.h <<EOF
8922 #define $ac_tr_func 1
8923 EOF
8924  
8925 else
8926   echo "$ac_t""no" 1>&6
8927 fi
8928 done
8929
8930
8931                         if test $ac_cv_func_sched_yield = no -a \
8932                                 $ac_cv_func_pthread_yield = no ; then
8933                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8934 echo "configure:8935: checking for sched_yield in -lrt" >&5
8935 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8937   echo $ac_n "(cached) $ac_c" 1>&6
8938 else
8939   ac_save_LIBS="$LIBS"
8940 LIBS="-lrt  $LIBS"
8941 cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 /* Override any gcc2 internal prototype to avoid an error.  */
8945 /* We use char because int might match the return type of a gcc2
8946     builtin and then its argument prototype would still apply.  */
8947 char sched_yield();
8948
8949 int main() {
8950 sched_yield()
8951 ; return 0; }
8952 EOF
8953 if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8954   rm -rf conftest*
8955   eval "ac_cv_lib_$ac_lib_var=yes"
8956 else
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -rf conftest*
8960   eval "ac_cv_lib_$ac_lib_var=no"
8961 fi
8962 rm -f conftest*
8963 LIBS="$ac_save_LIBS"
8964
8965 fi
8966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8967   echo "$ac_t""yes" 1>&6
8968   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8969                                         cat >> confdefs.h <<\EOF
8970 #define HAVE_SCHED_YIELD 1
8971 EOF
8972
8973                                         ac_cv_func_sched_yield=yes
8974 else
8975   echo "$ac_t""no" 1>&6
8976 ac_cv_func_sched_yield=no
8977 fi
8978
8979                         fi
8980                         if test $ac_cv_func_sched_yield = no -a \
8981                                 $ac_cv_func_pthread_yield = no ; then
8982                                                                                                 for ac_func in thr_yield
8983 do
8984 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8985 echo "configure:8986: checking for $ac_func" >&5
8986 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8987   echo $ac_n "(cached) $ac_c" 1>&6
8988 else
8989   cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992 /* System header to define __stub macros and hopefully few prototypes,
8993     which can conflict with char $ac_func(); below.  */
8994 #include <assert.h>
8995 /* Override any gcc2 internal prototype to avoid an error.  */
8996 /* We use char because int might match the return type of a gcc2
8997     builtin and then its argument prototype would still apply.  */
8998 char $ac_func();
8999 char (*f)();
9000
9001 int main() {
9002
9003 /* The GNU C library defines this for functions which it implements
9004     to always fail with ENOSYS.  Some functions are actually named
9005     something starting with __ and the normal name is an alias.  */
9006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9007 choke me
9008 #else
9009 f = $ac_func;
9010 #endif
9011
9012 ; return 0; }
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9015   rm -rf conftest*
9016   eval "ac_cv_func_$ac_func=yes"
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -rf conftest*
9021   eval "ac_cv_func_$ac_func=no"
9022 fi
9023 rm -f conftest*
9024 fi
9025
9026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9027   echo "$ac_t""yes" 1>&6
9028     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9029   cat >> confdefs.h <<EOF
9030 #define $ac_tr_func 1
9031 EOF
9032  
9033 else
9034   echo "$ac_t""no" 1>&6
9035 fi
9036 done
9037
9038                         fi
9039                         if test $ac_cv_func_sched_yield = no -a \
9040                                 $ac_cv_func_pthread_yield = no -a \
9041                                 "$ac_cv_func_thr_yield" = no ; then
9042                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9043                         fi
9044
9045                                                 for ac_func in pthread_kill
9046 do
9047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9048 echo "configure:9049: checking for $ac_func" >&5
9049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9050   echo $ac_n "(cached) $ac_c" 1>&6
9051 else
9052   cat > conftest.$ac_ext <<EOF
9053 #line 9054 "configure"
9054 #include "confdefs.h"
9055 /* System header to define __stub macros and hopefully few prototypes,
9056     which can conflict with char $ac_func(); below.  */
9057 #include <assert.h>
9058 /* Override any gcc2 internal prototype to avoid an error.  */
9059 /* We use char because int might match the return type of a gcc2
9060     builtin and then its argument prototype would still apply.  */
9061 char $ac_func();
9062 char (*f)();
9063
9064 int main() {
9065
9066 /* The GNU C library defines this for functions which it implements
9067     to always fail with ENOSYS.  Some functions are actually named
9068     something starting with __ and the normal name is an alias.  */
9069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9070 choke me
9071 #else
9072 f = $ac_func;
9073 #endif
9074
9075 ; return 0; }
9076 EOF
9077 if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9078   rm -rf conftest*
9079   eval "ac_cv_func_$ac_func=yes"
9080 else
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -rf conftest*
9084   eval "ac_cv_func_$ac_func=no"
9085 fi
9086 rm -f conftest*
9087 fi
9088
9089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9090   echo "$ac_t""yes" 1>&6
9091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9092   cat >> confdefs.h <<EOF
9093 #define $ac_tr_func 1
9094 EOF
9095  
9096 else
9097   echo "$ac_t""no" 1>&6
9098 fi
9099 done
9100
9101
9102                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9103 echo "configure:9104: checking for pthread_detach with <pthread.h>" >&5
9104 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9105   echo $ac_n "(cached) $ac_c" 1>&6
9106 else
9107   
9108                                                                 cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111
9112 #include <pthread.h>
9113 #ifndef NULL
9114 #define NULL (void*)0
9115 #endif
9116
9117 int main() {
9118 pthread_detach(NULL);
9119 ; return 0; }
9120 EOF
9121 if { (eval echo configure:9122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9122   rm -rf conftest*
9123   ol_cv_func_pthread_detach=yes
9124 else
9125   echo "configure: failed program was:" >&5
9126   cat conftest.$ac_ext >&5
9127   rm -rf conftest*
9128   ol_cv_func_pthread_detach=no
9129 fi
9130 rm -f conftest*
9131                         
9132 fi
9133
9134 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9135
9136                         if test $ol_cv_func_pthread_detach = no ; then
9137                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9138                         fi
9139
9140                         cat >> confdefs.h <<\EOF
9141 #define HAVE_PTHREAD_DETACH 1
9142 EOF
9143
9144
9145                                                 for ac_func in \
9146                                 pthread_setconcurrency \
9147                                 pthread_getconcurrency \
9148                                 thr_setconcurrency \
9149                                 thr_getconcurrency \
9150                         
9151 do
9152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9153 echo "configure:9154: checking for $ac_func" >&5
9154 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9155   echo $ac_n "(cached) $ac_c" 1>&6
9156 else
9157   cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 /* System header to define __stub macros and hopefully few prototypes,
9161     which can conflict with char $ac_func(); below.  */
9162 #include <assert.h>
9163 /* Override any gcc2 internal prototype to avoid an error.  */
9164 /* We use char because int might match the return type of a gcc2
9165     builtin and then its argument prototype would still apply.  */
9166 char $ac_func();
9167 char (*f)();
9168
9169 int main() {
9170
9171 /* The GNU C library defines this for functions which it implements
9172     to always fail with ENOSYS.  Some functions are actually named
9173     something starting with __ and the normal name is an alias.  */
9174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9175 choke me
9176 #else
9177 f = $ac_func;
9178 #endif
9179
9180 ; return 0; }
9181 EOF
9182 if { (eval echo configure:9183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9183   rm -rf conftest*
9184   eval "ac_cv_func_$ac_func=yes"
9185 else
9186   echo "configure: failed program was:" >&5
9187   cat conftest.$ac_ext >&5
9188   rm -rf conftest*
9189   eval "ac_cv_func_$ac_func=no"
9190 fi
9191 rm -f conftest*
9192 fi
9193
9194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9195   echo "$ac_t""yes" 1>&6
9196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9197   cat >> confdefs.h <<EOF
9198 #define $ac_tr_func 1
9199 EOF
9200  
9201 else
9202   echo "$ac_t""no" 1>&6
9203 fi
9204 done
9205
9206
9207                         
9208         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9209 echo "configure:9210: checking for pthread_kill_other_threads_np" >&5
9210 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9211   echo $ac_n "(cached) $ac_c" 1>&6
9212 else
9213   cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 /* System header to define __stub macros and hopefully few prototypes,
9217     which can conflict with char pthread_kill_other_threads_np(); below.  */
9218 #include <assert.h>
9219 /* Override any gcc2 internal prototype to avoid an error.  */
9220 /* We use char because int might match the return type of a gcc2
9221     builtin and then its argument prototype would still apply.  */
9222 char pthread_kill_other_threads_np();
9223 char (*f)();
9224
9225 int main() {
9226
9227 /* The GNU C library defines this for functions which it implements
9228     to always fail with ENOSYS.  Some functions are actually named
9229     something starting with __ and the normal name is an alias.  */
9230 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9231 choke me
9232 #else
9233 f = pthread_kill_other_threads_np;
9234 #endif
9235
9236 ; return 0; }
9237 EOF
9238 if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9239   rm -rf conftest*
9240   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9241 else
9242   echo "configure: failed program was:" >&5
9243   cat conftest.$ac_ext >&5
9244   rm -rf conftest*
9245   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9246 fi
9247 rm -f conftest*
9248 fi
9249
9250 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9251   echo "$ac_t""yes" 1>&6
9252   :
9253 else
9254   echo "$ac_t""no" 1>&6
9255 fi
9256
9257         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9258 echo "configure:9259: checking for LinuxThreads implementation" >&5
9259 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9260   echo $ac_n "(cached) $ac_c" 1>&6
9261 else
9262   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9263 fi
9264
9265 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9266
9267                         
9268         
9269         
9270         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9271 echo "configure:9272: checking for LinuxThreads consistency" >&5
9272 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9273   echo $ac_n "(cached) $ac_c" 1>&6
9274 else
9275   
9276                 if test $ol_cv_header_linux_threads = yes -a \
9277                         $ol_cv_sys_linux_threads = yes; then
9278                         ol_cv_linux_threads=yes
9279                 elif test $ol_cv_header_linux_threads = no -a \
9280                         $ol_cv_sys_linux_threads = no; then
9281                         ol_cv_linux_threads=no
9282                 else
9283                         ol_cv_linux_threads=error
9284                 fi
9285         
9286 fi
9287
9288 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9289
9290
9291                         if test $ol_cv_linux_threads = error; then
9292                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9293                         fi
9294
9295                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9296 echo "configure:9297: checking if pthread_create() works" >&5
9297 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9298   echo $ac_n "(cached) $ac_c" 1>&6
9299 else
9300   
9301                         if test "$cross_compiling" = yes; then
9302                                 ol_cv_pthread_create_works=yes
9303 else
9304   cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307 /* pthread test headers */
9308 #include <pthread.h>
9309 #ifndef NULL
9310 #define NULL (void*)0
9311 #endif
9312
9313 static void *task(p)
9314         void *p;
9315 {
9316         return (void *) (p == NULL);
9317 }
9318
9319
9320 int main(argc, argv)
9321         int argc;
9322         char **argv;
9323 {
9324
9325         /* pthread test function */
9326         pthread_t t;
9327         int status;
9328
9329         /* make sure pthread_create() isn't just a stub */
9330 #if HAVE_PTHREADS_D4
9331         status = pthread_create(&t, pthread_attr_default, task, NULL);
9332 #else
9333         status = pthread_create(&t, NULL, task, NULL);
9334 #endif
9335
9336         if( status ) exit( status );
9337
9338         /* make sure pthread_detach() isn't just a stub */
9339 #if HAVE_PTHREADS_D4
9340         status = pthread_detach( &t );
9341 #else
9342         status = pthread_detach( t );
9343 #endif
9344
9345 #ifdef HAVE_LINUX_THREADS
9346         pthread_kill_other_threads_np();
9347 #endif
9348
9349         exit( status );
9350
9351 }
9352
9353 EOF
9354 if { (eval echo configure:9355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9355 then
9356   ol_cv_pthread_create_works=yes
9357 else
9358   echo "configure: failed program was:" >&5
9359   cat conftest.$ac_ext >&5
9360   rm -fr conftest*
9361   ol_cv_pthread_create_works=no
9362 fi
9363 rm -fr conftest*
9364 fi
9365
9366 fi
9367
9368 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9369
9370                         if test $ol_cv_pthread_create_works = no ; then
9371                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9372                         fi
9373
9374                                                 if test $ol_with_yielding_select = auto ; then
9375                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9376 echo "configure:9377: checking if select yields when using pthreads" >&5
9377 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9378   echo $ac_n "(cached) $ac_c" 1>&6
9379 else
9380   
9381                                 if test "$cross_compiling" = yes; then
9382   ol_cv_pthread_select_yields=cross
9383 else
9384   cat > conftest.$ac_ext <<EOF
9385 #line 9386 "configure"
9386 #include "confdefs.h"
9387
9388 #include <sys/types.h>
9389 #include <sys/time.h>
9390 #include <unistd.h>
9391 #include <pthread.h>
9392 #ifndef NULL
9393 #define NULL (void*) 0
9394 #endif
9395
9396 static int fildes[2];
9397
9398 static void *task(p)
9399         void *p;
9400 {
9401         int i;
9402         struct timeval tv;
9403
9404         fd_set rfds;
9405
9406         tv.tv_sec=10;
9407         tv.tv_usec=0;
9408
9409         FD_ZERO(&rfds);
9410         FD_SET(fildes[0], &rfds);
9411
9412         /* we're not interested in any fds */
9413         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9414
9415         if(i < 0) {
9416                 perror("select");
9417                 exit(10);
9418         }
9419
9420         exit(0); /* if we exit here, the select blocked the whole process */
9421 }
9422
9423 int main(argc, argv)
9424         int argc;
9425         char **argv;
9426 {
9427         pthread_t t;
9428
9429         /* create a pipe to select */
9430         if(pipe(&fildes[0])) {
9431                 perror("select");
9432                 exit(1);
9433         }
9434
9435 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9436         (void) pthread_setconcurrency(2);
9437 #else
9438 #ifdef HAVE_THR_SETCONCURRENCY
9439         /* Set Solaris LWP concurrency to 2 */
9440         thr_setconcurrency(2);
9441 #endif
9442 #endif
9443
9444 #if HAVE_PTHREADS_D4
9445         pthread_create(&t, pthread_attr_default, task, NULL);
9446 #else
9447         pthread_create(&t, NULL, task, NULL);
9448 #endif
9449
9450 #if HAVE_SCHED_YIELD
9451         sched_yield();  /* make sure task runs first */
9452 #else
9453 #ifdef HAVE_PTHREAD_YIELD
9454         pthread_yield();        /* make sure task runs first */
9455 #endif
9456 #endif
9457
9458         exit(2);
9459 }
9460 EOF
9461 if { (eval echo configure:9462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9462 then
9463   ol_cv_pthread_select_yields=no
9464 else
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -fr conftest*
9468   ol_cv_pthread_select_yields=yes
9469 fi
9470 rm -fr conftest*
9471 fi
9472
9473 fi
9474
9475 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9476
9477                                 if test $ol_cv_pthread_select_yields = cross ; then
9478                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9479                                 fi
9480
9481                                 if test $ol_cv_pthread_select_yields = yes ; then
9482                                         ol_with_yielding_select=yes
9483                                 fi
9484                         fi
9485
9486                                                 CPPFLAGS="$save_CPPFLAGS"
9487                         LIBS="$save_LIBS"
9488                 else
9489                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9490                 fi
9491         fi
9492
9493         if test $ol_with_threads = posix ; then
9494                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9495         fi
9496 fi
9497
9498 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9499         -o $ol_with_threads = mach ; then
9500
9501                 for ac_hdr in mach/cthreads.h
9502 do
9503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9504 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9505 echo "configure:9506: checking for $ac_hdr" >&5
9506 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509   cat > conftest.$ac_ext <<EOF
9510 #line 9511 "configure"
9511 #include "confdefs.h"
9512 #include <$ac_hdr>
9513 EOF
9514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9515 { (eval echo configure:9516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9517 if test -z "$ac_err"; then
9518   rm -rf conftest*
9519   eval "ac_cv_header_$ac_safe=yes"
9520 else
9521   echo "$ac_err" >&5
9522   echo "configure: failed program was:" >&5
9523   cat conftest.$ac_ext >&5
9524   rm -rf conftest*
9525   eval "ac_cv_header_$ac_safe=no"
9526 fi
9527 rm -f conftest*
9528 fi
9529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9530   echo "$ac_t""yes" 1>&6
9531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9532   cat >> confdefs.h <<EOF
9533 #define $ac_tr_hdr 1
9534 EOF
9535  
9536 else
9537   echo "$ac_t""no" 1>&6
9538 fi
9539 done
9540
9541         if test $ac_cv_header_mach_cthreads_h = yes ; then
9542                 ol_with_threads=found
9543
9544                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9545 echo "configure:9546: checking for cthread_fork" >&5
9546 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9547   echo $ac_n "(cached) $ac_c" 1>&6
9548 else
9549   cat > conftest.$ac_ext <<EOF
9550 #line 9551 "configure"
9551 #include "confdefs.h"
9552 /* System header to define __stub macros and hopefully few prototypes,
9553     which can conflict with char cthread_fork(); below.  */
9554 #include <assert.h>
9555 /* Override any gcc2 internal prototype to avoid an error.  */
9556 /* We use char because int might match the return type of a gcc2
9557     builtin and then its argument prototype would still apply.  */
9558 char cthread_fork();
9559 char (*f)();
9560
9561 int main() {
9562
9563 /* The GNU C library defines this for functions which it implements
9564     to always fail with ENOSYS.  Some functions are actually named
9565     something starting with __ and the normal name is an alias.  */
9566 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9567 choke me
9568 #else
9569 f = cthread_fork;
9570 #endif
9571
9572 ; return 0; }
9573 EOF
9574 if { (eval echo configure:9575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9575   rm -rf conftest*
9576   eval "ac_cv_func_cthread_fork=yes"
9577 else
9578   echo "configure: failed program was:" >&5
9579   cat conftest.$ac_ext >&5
9580   rm -rf conftest*
9581   eval "ac_cv_func_cthread_fork=no"
9582 fi
9583 rm -f conftest*
9584 fi
9585
9586 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9587   echo "$ac_t""yes" 1>&6
9588   ol_link_threads=yes
9589 else
9590   echo "$ac_t""no" 1>&6
9591 fi
9592
9593
9594                 if test $ol_link_threads = no ; then
9595                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9596 echo "configure:9597: checking for cthread_fork with -all_load" >&5
9597 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9598   echo $ac_n "(cached) $ac_c" 1>&6
9599 else
9600   
9601                                                                 save_LIBS="$LIBS"
9602                                 LIBS="-all_load $LIBS"
9603                                 cat > conftest.$ac_ext <<EOF
9604 #line 9605 "configure"
9605 #include "confdefs.h"
9606 #include <mach/cthreads.h>
9607 int main() {
9608
9609                                         cthread_fork((void *)0, (void *)0);
9610                                         
9611 ; return 0; }
9612 EOF
9613 if { (eval echo configure:9614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9614   rm -rf conftest*
9615   ol_cv_cthread_all_load=yes
9616 else
9617   echo "configure: failed program was:" >&5
9618   cat conftest.$ac_ext >&5
9619   rm -rf conftest*
9620   ol_cv_cthread_all_load=no
9621 fi
9622 rm -f conftest*
9623                                                                 LIBS="$save_LIBS"
9624                         
9625 fi
9626
9627 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9628
9629                         if test $ol_cv_cthread_all_load = yes ; then
9630                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9631                                 ol_link_threads=mach
9632                         fi
9633                 fi
9634
9635                 if test $ol_link_threads != no ; then
9636                         : check for cthread specific functionality here
9637                         cat >> confdefs.h <<\EOF
9638 #define HAVE_MACH_CTHREADS 1
9639 EOF
9640
9641                 else
9642                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9643                 fi
9644         fi
9645
9646         if test $ol_with_threads = mach ; then
9647                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9648         fi
9649 fi
9650
9651 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9652         -o $ol_with_threads = pth ; then
9653
9654         for ac_hdr in pth.h
9655 do
9656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9658 echo "configure:9659: checking for $ac_hdr" >&5
9659 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9660   echo $ac_n "(cached) $ac_c" 1>&6
9661 else
9662   cat > conftest.$ac_ext <<EOF
9663 #line 9664 "configure"
9664 #include "confdefs.h"
9665 #include <$ac_hdr>
9666 EOF
9667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9668 { (eval echo configure:9669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9670 if test -z "$ac_err"; then
9671   rm -rf conftest*
9672   eval "ac_cv_header_$ac_safe=yes"
9673 else
9674   echo "$ac_err" >&5
9675   echo "configure: failed program was:" >&5
9676   cat conftest.$ac_ext >&5
9677   rm -rf conftest*
9678   eval "ac_cv_header_$ac_safe=no"
9679 fi
9680 rm -f conftest*
9681 fi
9682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9683   echo "$ac_t""yes" 1>&6
9684     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9685   cat >> confdefs.h <<EOF
9686 #define $ac_tr_hdr 1
9687 EOF
9688  
9689 else
9690   echo "$ac_t""no" 1>&6
9691 fi
9692 done
9693
9694
9695         if test $ac_cv_header_pth_h = yes ; then
9696                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9697 echo "configure:9698: checking for pth_version in -lpth" >&5
9698 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9700   echo $ac_n "(cached) $ac_c" 1>&6
9701 else
9702   ac_save_LIBS="$LIBS"
9703 LIBS="-lpth  $LIBS"
9704 cat > conftest.$ac_ext <<EOF
9705 #line 9706 "configure"
9706 #include "confdefs.h"
9707 /* Override any gcc2 internal prototype to avoid an error.  */
9708 /* We use char because int might match the return type of a gcc2
9709     builtin and then its argument prototype would still apply.  */
9710 char pth_version();
9711
9712 int main() {
9713 pth_version()
9714 ; return 0; }
9715 EOF
9716 if { (eval echo configure:9717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9717   rm -rf conftest*
9718   eval "ac_cv_lib_$ac_lib_var=yes"
9719 else
9720   echo "configure: failed program was:" >&5
9721   cat conftest.$ac_ext >&5
9722   rm -rf conftest*
9723   eval "ac_cv_lib_$ac_lib_var=no"
9724 fi
9725 rm -f conftest*
9726 LIBS="$ac_save_LIBS"
9727
9728 fi
9729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9730   echo "$ac_t""yes" 1>&6
9731   have_pth=yes
9732 else
9733   echo "$ac_t""no" 1>&6
9734 have_pth=no
9735 fi
9736
9737
9738                 if test $have_pth = yes ; then
9739                         cat >> confdefs.h <<\EOF
9740 #define HAVE_GNU_PTH 1
9741 EOF
9742
9743                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9744                         ol_link_threads=pth
9745
9746                         if test $ol_with_yielding_select = auto ; then
9747                                 ol_with_yielding_select=yes
9748                         fi
9749                 fi
9750         fi
9751 fi
9752
9753 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9754         -o $ol_with_threads = lwp ; then
9755
9756                 for ac_hdr in thread.h synch.h
9757 do
9758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9760 echo "configure:9761: checking for $ac_hdr" >&5
9761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   cat > conftest.$ac_ext <<EOF
9765 #line 9766 "configure"
9766 #include "confdefs.h"
9767 #include <$ac_hdr>
9768 EOF
9769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9770 { (eval echo configure:9771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9772 if test -z "$ac_err"; then
9773   rm -rf conftest*
9774   eval "ac_cv_header_$ac_safe=yes"
9775 else
9776   echo "$ac_err" >&5
9777   echo "configure: failed program was:" >&5
9778   cat conftest.$ac_ext >&5
9779   rm -rf conftest*
9780   eval "ac_cv_header_$ac_safe=no"
9781 fi
9782 rm -f conftest*
9783 fi
9784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9785   echo "$ac_t""yes" 1>&6
9786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9787   cat >> confdefs.h <<EOF
9788 #define $ac_tr_hdr 1
9789 EOF
9790  
9791 else
9792   echo "$ac_t""no" 1>&6
9793 fi
9794 done
9795
9796         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9797                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9798 echo "configure:9799: checking for thr_create in -lthread" >&5
9799 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9801   echo $ac_n "(cached) $ac_c" 1>&6
9802 else
9803   ac_save_LIBS="$LIBS"
9804 LIBS="-lthread  $LIBS"
9805 cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 /* Override any gcc2 internal prototype to avoid an error.  */
9809 /* We use char because int might match the return type of a gcc2
9810     builtin and then its argument prototype would still apply.  */
9811 char thr_create();
9812
9813 int main() {
9814 thr_create()
9815 ; return 0; }
9816 EOF
9817 if { (eval echo configure:9818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9818   rm -rf conftest*
9819   eval "ac_cv_lib_$ac_lib_var=yes"
9820 else
9821   echo "configure: failed program was:" >&5
9822   cat conftest.$ac_ext >&5
9823   rm -rf conftest*
9824   eval "ac_cv_lib_$ac_lib_var=no"
9825 fi
9826 rm -f conftest*
9827 LIBS="$ac_save_LIBS"
9828
9829 fi
9830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9831   echo "$ac_t""yes" 1>&6
9832   have_thr=yes
9833 else
9834   echo "$ac_t""no" 1>&6
9835 have_thr=no
9836 fi
9837
9838
9839                 if test $have_thr = yes ; then
9840                         cat >> confdefs.h <<\EOF
9841 #define HAVE_THR 1
9842 EOF
9843
9844                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9845                         ol_link_threads=thr
9846
9847                         if test $ol_with_yielding_select = auto ; then
9848                                 ol_with_yielding_select=yes
9849                         fi
9850
9851                                                 for ac_func in \
9852                                 thr_setconcurrency \
9853                                 thr_getconcurrency \
9854                         
9855 do
9856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9857 echo "configure:9858: checking for $ac_func" >&5
9858 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9859   echo $ac_n "(cached) $ac_c" 1>&6
9860 else
9861   cat > conftest.$ac_ext <<EOF
9862 #line 9863 "configure"
9863 #include "confdefs.h"
9864 /* System header to define __stub macros and hopefully few prototypes,
9865     which can conflict with char $ac_func(); below.  */
9866 #include <assert.h>
9867 /* Override any gcc2 internal prototype to avoid an error.  */
9868 /* We use char because int might match the return type of a gcc2
9869     builtin and then its argument prototype would still apply.  */
9870 char $ac_func();
9871 char (*f)();
9872
9873 int main() {
9874
9875 /* The GNU C library defines this for functions which it implements
9876     to always fail with ENOSYS.  Some functions are actually named
9877     something starting with __ and the normal name is an alias.  */
9878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9879 choke me
9880 #else
9881 f = $ac_func;
9882 #endif
9883
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9887   rm -rf conftest*
9888   eval "ac_cv_func_$ac_func=yes"
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   eval "ac_cv_func_$ac_func=no"
9894 fi
9895 rm -f conftest*
9896 fi
9897
9898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9899   echo "$ac_t""yes" 1>&6
9900     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9901   cat >> confdefs.h <<EOF
9902 #define $ac_tr_func 1
9903 EOF
9904  
9905 else
9906   echo "$ac_t""no" 1>&6
9907 fi
9908 done
9909
9910                 fi
9911         fi
9912
9913                 for ac_hdr in lwp/lwp.h
9914 do
9915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9917 echo "configure:9918: checking for $ac_hdr" >&5
9918 if eval "test \"\${ac_cv_header_$ac_safe+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 #include <$ac_hdr>
9925 EOF
9926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9927 { (eval echo configure:9928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9929 if test -z "$ac_err"; then
9930   rm -rf conftest*
9931   eval "ac_cv_header_$ac_safe=yes"
9932 else
9933   echo "$ac_err" >&5
9934   echo "configure: failed program was:" >&5
9935   cat conftest.$ac_ext >&5
9936   rm -rf conftest*
9937   eval "ac_cv_header_$ac_safe=no"
9938 fi
9939 rm -f conftest*
9940 fi
9941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9942   echo "$ac_t""yes" 1>&6
9943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9944   cat >> confdefs.h <<EOF
9945 #define $ac_tr_hdr 1
9946 EOF
9947  
9948 else
9949   echo "$ac_t""no" 1>&6
9950 fi
9951 done
9952
9953         if test $ac_cv_header_lwp_lwp_h = yes ; then
9954                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9955 echo "configure:9956: checking for lwp_create in -llwp" >&5
9956 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9957 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9958   echo $ac_n "(cached) $ac_c" 1>&6
9959 else
9960   ac_save_LIBS="$LIBS"
9961 LIBS="-llwp  $LIBS"
9962 cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965 /* Override any gcc2 internal prototype to avoid an error.  */
9966 /* We use char because int might match the return type of a gcc2
9967     builtin and then its argument prototype would still apply.  */
9968 char lwp_create();
9969
9970 int main() {
9971 lwp_create()
9972 ; return 0; }
9973 EOF
9974 if { (eval echo configure:9975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9975   rm -rf conftest*
9976   eval "ac_cv_lib_$ac_lib_var=yes"
9977 else
9978   echo "configure: failed program was:" >&5
9979   cat conftest.$ac_ext >&5
9980   rm -rf conftest*
9981   eval "ac_cv_lib_$ac_lib_var=no"
9982 fi
9983 rm -f conftest*
9984 LIBS="$ac_save_LIBS"
9985
9986 fi
9987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9988   echo "$ac_t""yes" 1>&6
9989   have_lwp=yes
9990 else
9991   echo "$ac_t""no" 1>&6
9992 have_lwp=no
9993 fi
9994
9995
9996                 if test $have_lwp = yes ; then
9997                         cat >> confdefs.h <<\EOF
9998 #define HAVE_LWP 1
9999 EOF
10000
10001                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10002                         ol_link_threads=lwp
10003
10004                         if test $ol_with_yielding_select = auto ; then
10005                                 ol_with_yielding_select=no
10006                         fi
10007                 fi
10008         fi
10009 fi
10010
10011 if test $ol_with_yielding_select = yes ; then
10012         cat >> confdefs.h <<\EOF
10013 #define HAVE_YIELDING_SELECT 1
10014 EOF
10015
10016 fi
10017
10018 if test $ol_with_threads = manual ; then
10019                 ol_link_threads=yes
10020
10021         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10022
10023         for ac_hdr in pthread.h sched.h
10024 do
10025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10027 echo "configure:10028: checking for $ac_hdr" >&5
10028 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10029   echo $ac_n "(cached) $ac_c" 1>&6
10030 else
10031   cat > conftest.$ac_ext <<EOF
10032 #line 10033 "configure"
10033 #include "confdefs.h"
10034 #include <$ac_hdr>
10035 EOF
10036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10037 { (eval echo configure:10038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10039 if test -z "$ac_err"; then
10040   rm -rf conftest*
10041   eval "ac_cv_header_$ac_safe=yes"
10042 else
10043   echo "$ac_err" >&5
10044   echo "configure: failed program was:" >&5
10045   cat conftest.$ac_ext >&5
10046   rm -rf conftest*
10047   eval "ac_cv_header_$ac_safe=no"
10048 fi
10049 rm -f conftest*
10050 fi
10051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10052   echo "$ac_t""yes" 1>&6
10053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10054   cat >> confdefs.h <<EOF
10055 #define $ac_tr_hdr 1
10056 EOF
10057  
10058 else
10059   echo "$ac_t""no" 1>&6
10060 fi
10061 done
10062
10063         for ac_func in sched_yield pthread_yield
10064 do
10065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10066 echo "configure:10067: checking for $ac_func" >&5
10067 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10068   echo $ac_n "(cached) $ac_c" 1>&6
10069 else
10070   cat > conftest.$ac_ext <<EOF
10071 #line 10072 "configure"
10072 #include "confdefs.h"
10073 /* System header to define __stub macros and hopefully few prototypes,
10074     which can conflict with char $ac_func(); below.  */
10075 #include <assert.h>
10076 /* Override any gcc2 internal prototype to avoid an error.  */
10077 /* We use char because int might match the return type of a gcc2
10078     builtin and then its argument prototype would still apply.  */
10079 char $ac_func();
10080 char (*f)();
10081
10082 int main() {
10083
10084 /* The GNU C library defines this for functions which it implements
10085     to always fail with ENOSYS.  Some functions are actually named
10086     something starting with __ and the normal name is an alias.  */
10087 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10088 choke me
10089 #else
10090 f = $ac_func;
10091 #endif
10092
10093 ; return 0; }
10094 EOF
10095 if { (eval echo configure:10096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10096   rm -rf conftest*
10097   eval "ac_cv_func_$ac_func=yes"
10098 else
10099   echo "configure: failed program was:" >&5
10100   cat conftest.$ac_ext >&5
10101   rm -rf conftest*
10102   eval "ac_cv_func_$ac_func=no"
10103 fi
10104 rm -f conftest*
10105 fi
10106
10107 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10108   echo "$ac_t""yes" 1>&6
10109     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10110   cat >> confdefs.h <<EOF
10111 #define $ac_tr_func 1
10112 EOF
10113  
10114 else
10115   echo "$ac_t""no" 1>&6
10116 fi
10117 done
10118
10119         
10120         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10121 echo "configure:10122: checking for LinuxThreads pthread.h" >&5
10122 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10123   echo $ac_n "(cached) $ac_c" 1>&6
10124 else
10125   cat > conftest.$ac_ext <<EOF
10126 #line 10127 "configure"
10127 #include "confdefs.h"
10128 #include <pthread.h>
10129 EOF
10130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10131   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10132   rm -rf conftest*
10133   ol_cv_header_linux_threads=yes
10134 else
10135   rm -rf conftest*
10136   ol_cv_header_linux_threads=no
10137 fi
10138 rm -f conftest*
10139
10140                 
10141 fi
10142
10143 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10144         if test $ol_cv_header_linux_threads = yes; then
10145                 cat >> confdefs.h <<\EOF
10146 #define HAVE_LINUX_THREADS 1
10147 EOF
10148
10149         fi
10150
10151
10152         for ac_hdr in mach/cthreads.h
10153 do
10154 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10155 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10156 echo "configure:10157: checking for $ac_hdr" >&5
10157 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10158   echo $ac_n "(cached) $ac_c" 1>&6
10159 else
10160   cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163 #include <$ac_hdr>
10164 EOF
10165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10166 { (eval echo configure:10167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10168 if test -z "$ac_err"; then
10169   rm -rf conftest*
10170   eval "ac_cv_header_$ac_safe=yes"
10171 else
10172   echo "$ac_err" >&5
10173   echo "configure: failed program was:" >&5
10174   cat conftest.$ac_ext >&5
10175   rm -rf conftest*
10176   eval "ac_cv_header_$ac_safe=no"
10177 fi
10178 rm -f conftest*
10179 fi
10180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10181   echo "$ac_t""yes" 1>&6
10182     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10183   cat >> confdefs.h <<EOF
10184 #define $ac_tr_hdr 1
10185 EOF
10186  
10187 else
10188   echo "$ac_t""no" 1>&6
10189 fi
10190 done
10191
10192         for ac_hdr in lwp/lwp.h
10193 do
10194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10196 echo "configure:10197: checking for $ac_hdr" >&5
10197 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   cat > conftest.$ac_ext <<EOF
10201 #line 10202 "configure"
10202 #include "confdefs.h"
10203 #include <$ac_hdr>
10204 EOF
10205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10206 { (eval echo configure:10207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10208 if test -z "$ac_err"; then
10209   rm -rf conftest*
10210   eval "ac_cv_header_$ac_safe=yes"
10211 else
10212   echo "$ac_err" >&5
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=no"
10217 fi
10218 rm -f conftest*
10219 fi
10220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10221   echo "$ac_t""yes" 1>&6
10222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10223   cat >> confdefs.h <<EOF
10224 #define $ac_tr_hdr 1
10225 EOF
10226  
10227 else
10228   echo "$ac_t""no" 1>&6
10229 fi
10230 done
10231
10232         for ac_hdr in thread.h synch.h
10233 do
10234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10236 echo "configure:10237: checking for $ac_hdr" >&5
10237 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10238   echo $ac_n "(cached) $ac_c" 1>&6
10239 else
10240   cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243 #include <$ac_hdr>
10244 EOF
10245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10246 { (eval echo configure:10247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10248 if test -z "$ac_err"; then
10249   rm -rf conftest*
10250   eval "ac_cv_header_$ac_safe=yes"
10251 else
10252   echo "$ac_err" >&5
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -rf conftest*
10256   eval "ac_cv_header_$ac_safe=no"
10257 fi
10258 rm -f conftest*
10259 fi
10260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10261   echo "$ac_t""yes" 1>&6
10262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10263   cat >> confdefs.h <<EOF
10264 #define $ac_tr_hdr 1
10265 EOF
10266  
10267 else
10268   echo "$ac_t""no" 1>&6
10269 fi
10270 done
10271
10272 fi
10273
10274 if test $ol_link_threads != no ; then  
10275                         cat >> confdefs.h <<\EOF
10276 #define REENTRANT 1
10277 EOF
10278
10279         cat >> confdefs.h <<\EOF
10280 #define _REENTRANT 1
10281 EOF
10282
10283         cat >> confdefs.h <<\EOF
10284 #define THREAD_SAFE 1
10285 EOF
10286
10287         cat >> confdefs.h <<\EOF
10288 #define _THREAD_SAFE 1
10289 EOF
10290
10291         cat >> confdefs.h <<\EOF
10292 #define THREADSAFE 1
10293 EOF
10294
10295         cat >> confdefs.h <<\EOF
10296 #define _THREADSAFE 1
10297 EOF
10298
10299         cat >> confdefs.h <<\EOF
10300 #define _SGI_MP_SOURCE 1
10301 EOF
10302
10303
10304                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10305 echo "configure:10306: checking for thread specific errno" >&5
10306 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10307   echo $ac_n "(cached) $ac_c" 1>&6
10308 else
10309   
10310                 cat > conftest.$ac_ext <<EOF
10311 #line 10312 "configure"
10312 #include "confdefs.h"
10313 #include <errno.h>
10314 int main() {
10315 errno = 0;
10316 ; return 0; }
10317 EOF
10318 if { (eval echo configure:10319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10319   rm -rf conftest*
10320   ol_cv_errno_thread_specific=yes
10321 else
10322   echo "configure: failed program was:" >&5
10323   cat conftest.$ac_ext >&5
10324   rm -rf conftest*
10325   ol_cv_errno_thread_specific=no
10326 fi
10327 rm -f conftest*
10328         
10329 fi
10330
10331 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10332
10333                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10334 echo "configure:10335: checking for thread specific h_errno" >&5
10335 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10336   echo $ac_n "(cached) $ac_c" 1>&6
10337 else
10338   
10339                 cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342 #include <netdb.h>
10343 int main() {
10344 h_errno = 0;
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   ol_cv_h_errno_thread_specific=yes
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   ol_cv_h_errno_thread_specific=no
10355 fi
10356 rm -f conftest*
10357         
10358 fi
10359
10360 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10361
10362         if test $ol_cv_errno_thread_specific != yes \
10363                 -o $ol_cv_h_errno_thread_specific != yes ; then
10364                 LIBS="$LTHREAD_LIBS $LIBS"
10365                 LTHREAD_LIBS=""
10366         fi
10367
10368 fi  
10369
10370 if test $ol_link_threads = no ; then
10371         if test $ol_with_threads = yes ; then
10372                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10373         fi
10374
10375         if test $ol_with_threads = auto ; then
10376                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10377                 ol_with_threads=no
10378         fi
10379
10380         cat >> confdefs.h <<\EOF
10381 #define NO_THREADS 1
10382 EOF
10383
10384         LTHREAD_LIBS=""
10385 fi
10386
10387 if test $ol_link_threads != no ; then
10388         cat >> confdefs.h <<\EOF
10389 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10390 EOF
10391
10392 fi
10393
10394
10395 ol_link_ldbm=no 
10396 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10397         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10398 echo "configure:10399: checking for DB2 library" >&5
10399 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10400   echo $ac_n "(cached) $ac_c" 1>&6
10401 else
10402         ol_LIBS="$LIBS"
10403         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10404 echo "configure:10405: checking for db_open in -ldb" >&5
10405 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10406 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10407   echo $ac_n "(cached) $ac_c" 1>&6
10408 else
10409   ac_save_LIBS="$LIBS"
10410 LIBS="-ldb  $LIBS"
10411 cat > conftest.$ac_ext <<EOF
10412 #line 10413 "configure"
10413 #include "confdefs.h"
10414 /* Override any gcc2 internal prototype to avoid an error.  */
10415 /* We use char because int might match the return type of a gcc2
10416     builtin and then its argument prototype would still apply.  */
10417 char db_open();
10418
10419 int main() {
10420 db_open()
10421 ; return 0; }
10422 EOF
10423 if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10424   rm -rf conftest*
10425   eval "ac_cv_lib_$ac_lib_var=yes"
10426 else
10427   echo "configure: failed program was:" >&5
10428   cat conftest.$ac_ext >&5
10429   rm -rf conftest*
10430   eval "ac_cv_lib_$ac_lib_var=no"
10431 fi
10432 rm -f conftest*
10433 LIBS="$ac_save_LIBS"
10434
10435 fi
10436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10437   echo "$ac_t""yes" 1>&6
10438   ol_cv_lib_db2=-ldb
10439 else
10440   echo "$ac_t""no" 1>&6
10441 ol_cv_lib_db2=no
10442 fi
10443
10444         LIBS="$ol_LIBS"
10445
10446 fi
10447
10448 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10449
10450 for ac_hdr in db.h
10451 do
10452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10454 echo "configure:10455: checking for $ac_hdr" >&5
10455 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10456   echo $ac_n "(cached) $ac_c" 1>&6
10457 else
10458   cat > conftest.$ac_ext <<EOF
10459 #line 10460 "configure"
10460 #include "confdefs.h"
10461 #include <$ac_hdr>
10462 EOF
10463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10464 { (eval echo configure:10465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10466 if test -z "$ac_err"; then
10467   rm -rf conftest*
10468   eval "ac_cv_header_$ac_safe=yes"
10469 else
10470   echo "$ac_err" >&5
10471   echo "configure: failed program was:" >&5
10472   cat conftest.$ac_ext >&5
10473   rm -rf conftest*
10474   eval "ac_cv_header_$ac_safe=no"
10475 fi
10476 rm -f conftest*
10477 fi
10478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10479   echo "$ac_t""yes" 1>&6
10480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10481   cat >> confdefs.h <<EOF
10482 #define $ac_tr_hdr 1
10483 EOF
10484  
10485 else
10486   echo "$ac_t""no" 1>&6
10487 fi
10488 done
10489
10490 if test $ac_cv_header_db_h = yes ; then
10491         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10492 echo "configure:10493: checking if db.h is DB2" >&5
10493 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10494   echo $ac_n "(cached) $ac_c" 1>&6
10495 else
10496   
10497                 cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500
10501 #                       include <db.h>
10502                         /* this check could be improved */
10503 #                       ifdef DB_VERSION_MAJOR
10504 #                               if DB_VERSION_MAJOR == 2
10505                                         __db_version_2
10506 #                               endif
10507 #                       endif
10508                 
10509 EOF
10510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10511   egrep "__db_version_2" >/dev/null 2>&1; then
10512   rm -rf conftest*
10513   ol_cv_header_db2=yes
10514 else
10515   rm -rf conftest*
10516   ol_cv_header_db2=no
10517 fi
10518 rm -f conftest*
10519
10520 fi
10521
10522 echo "$ac_t""$ol_cv_header_db2" 1>&6
10523 else
10524         ol_cv_header_db2=no
10525 fi
10526
10527
10528  
10529  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10530 echo "configure:10531: checking for Berkeley DB2" >&5
10531 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10532   echo $ac_n "(cached) $ac_c" 1>&6
10533 else
10534   
10535         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10536                 ol_cv_berkeley_db2=no
10537         else
10538                 ol_cv_berkeley_db2=yes
10539         fi
10540
10541 fi
10542
10543 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10544  if test $ol_cv_berkeley_db2 = yes ; then
10545         cat >> confdefs.h <<\EOF
10546 #define HAVE_BERKELEY_DB2 1
10547 EOF
10548
10549  fi
10550
10551
10552         if test $ol_cv_berkeley_db2 = yes ; then
10553                 ol_link_ldbm=db2
10554                 ol_with_ldbm_api=db2
10555
10556                 if test $ol_with_ldbm_type = hash ; then
10557                         cat >> confdefs.h <<\EOF
10558 #define LDBM_USE_DBHASH 1
10559 EOF
10560
10561                 else
10562                         cat >> confdefs.h <<\EOF
10563 #define LDBM_USE_DBBTREE 1
10564 EOF
10565
10566                 fi
10567
10568                                                 if test $ol_cv_lib_db2 != yes ; then
10569                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10570                 fi
10571         fi
10572 fi
10573
10574 ol_link_bdb2=no
10575 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10576         ol_link_bdb2=yes
10577 fi
10578
10579 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10580         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10581 echo "configure:10582: checking for Berkeley DB library" >&5
10582 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   
10586         for ac_hdr in db1/db.h
10587 do
10588 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10589 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10590 echo "configure:10591: checking for $ac_hdr" >&5
10591 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10592   echo $ac_n "(cached) $ac_c" 1>&6
10593 else
10594   cat > conftest.$ac_ext <<EOF
10595 #line 10596 "configure"
10596 #include "confdefs.h"
10597 #include <$ac_hdr>
10598 EOF
10599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10600 { (eval echo configure:10601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10602 if test -z "$ac_err"; then
10603   rm -rf conftest*
10604   eval "ac_cv_header_$ac_safe=yes"
10605 else
10606   echo "$ac_err" >&5
10607   echo "configure: failed program was:" >&5
10608   cat conftest.$ac_ext >&5
10609   rm -rf conftest*
10610   eval "ac_cv_header_$ac_safe=no"
10611 fi
10612 rm -f conftest*
10613 fi
10614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10615   echo "$ac_t""yes" 1>&6
10616     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10617   cat >> confdefs.h <<EOF
10618 #define $ac_tr_hdr 1
10619 EOF
10620  
10621 else
10622   echo "$ac_t""no" 1>&6
10623 fi
10624 done
10625
10626         ol_LIBS="$LIBS"
10627         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10628 echo "configure:10629: checking for dbopen" >&5
10629 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10630   echo $ac_n "(cached) $ac_c" 1>&6
10631 else
10632   cat > conftest.$ac_ext <<EOF
10633 #line 10634 "configure"
10634 #include "confdefs.h"
10635 /* System header to define __stub macros and hopefully few prototypes,
10636     which can conflict with char dbopen(); below.  */
10637 #include <assert.h>
10638 /* Override any gcc2 internal prototype to avoid an error.  */
10639 /* We use char because int might match the return type of a gcc2
10640     builtin and then its argument prototype would still apply.  */
10641 char dbopen();
10642 char (*f)();
10643
10644 int main() {
10645
10646 /* The GNU C library defines this for functions which it implements
10647     to always fail with ENOSYS.  Some functions are actually named
10648     something starting with __ and the normal name is an alias.  */
10649 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10650 choke me
10651 #else
10652 f = dbopen;
10653 #endif
10654
10655 ; return 0; }
10656 EOF
10657 if { (eval echo configure:10658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10658   rm -rf conftest*
10659   eval "ac_cv_func_dbopen=yes"
10660 else
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   eval "ac_cv_func_dbopen=no"
10665 fi
10666 rm -f conftest*
10667 fi
10668
10669 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10670   echo "$ac_t""yes" 1>&6
10671   ol_cv_lib_db=yes
10672 else
10673   echo "$ac_t""no" 1>&6
10674
10675                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10676 echo "configure:10677: checking for dbopen in -ldb1" >&5
10677 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10678 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10679   echo $ac_n "(cached) $ac_c" 1>&6
10680 else
10681   ac_save_LIBS="$LIBS"
10682 LIBS="-ldb1  $LIBS"
10683 cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686 /* Override any gcc2 internal prototype to avoid an error.  */
10687 /* We use char because int might match the return type of a gcc2
10688     builtin and then its argument prototype would still apply.  */
10689 char dbopen();
10690
10691 int main() {
10692 dbopen()
10693 ; return 0; }
10694 EOF
10695 if { (eval echo configure:10696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10696   rm -rf conftest*
10697   eval "ac_cv_lib_$ac_lib_var=yes"
10698 else
10699   echo "configure: failed program was:" >&5
10700   cat conftest.$ac_ext >&5
10701   rm -rf conftest*
10702   eval "ac_cv_lib_$ac_lib_var=no"
10703 fi
10704 rm -f conftest*
10705 LIBS="$ac_save_LIBS"
10706
10707 fi
10708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10709   echo "$ac_t""yes" 1>&6
10710   ol_cv_lib_db=-ldb1
10711 else
10712   echo "$ac_t""no" 1>&6
10713
10714                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10715 echo "configure:10716: checking for dbopen in -ldb" >&5
10716 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   ac_save_LIBS="$LIBS"
10721 LIBS="-ldb  $LIBS"
10722 cat > conftest.$ac_ext <<EOF
10723 #line 10724 "configure"
10724 #include "confdefs.h"
10725 /* Override any gcc2 internal prototype to avoid an error.  */
10726 /* We use char because int might match the return type of a gcc2
10727     builtin and then its argument prototype would still apply.  */
10728 char dbopen();
10729
10730 int main() {
10731 dbopen()
10732 ; return 0; }
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10735   rm -rf conftest*
10736   eval "ac_cv_lib_$ac_lib_var=yes"
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -rf conftest*
10741   eval "ac_cv_lib_$ac_lib_var=no"
10742 fi
10743 rm -f conftest*
10744 LIBS="$ac_save_LIBS"
10745
10746 fi
10747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10748   echo "$ac_t""yes" 1>&6
10749   ol_cv_lib_db=-ldb
10750 else
10751   echo "$ac_t""no" 1>&6
10752 ol_cv_lib_db=no
10753 fi
10754
10755                 
10756 fi
10757
10758         
10759 fi
10760
10761         LIBS="$ol_LIBS"
10762
10763 fi
10764
10765 echo "$ac_t""$ol_cv_lib_db" 1>&6
10766
10767
10768 for ac_hdr in db_185.h
10769 do
10770 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10771 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10772 echo "configure:10773: checking for $ac_hdr" >&5
10773 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10774   echo $ac_n "(cached) $ac_c" 1>&6
10775 else
10776   cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779 #include <$ac_hdr>
10780 EOF
10781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10782 { (eval echo configure:10783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10784 if test -z "$ac_err"; then
10785   rm -rf conftest*
10786   eval "ac_cv_header_$ac_safe=yes"
10787 else
10788   echo "$ac_err" >&5
10789   echo "configure: failed program was:" >&5
10790   cat conftest.$ac_ext >&5
10791   rm -rf conftest*
10792   eval "ac_cv_header_$ac_safe=no"
10793 fi
10794 rm -f conftest*
10795 fi
10796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10797   echo "$ac_t""yes" 1>&6
10798     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10799   cat >> confdefs.h <<EOF
10800 #define $ac_tr_hdr 1
10801 EOF
10802  
10803 else
10804   echo "$ac_t""no" 1>&6
10805 fi
10806 done
10807
10808 if test "$ol_cv_header_db2" = yes ; then
10809         
10810         ol_cv_header_db=$ac_cv_header_db_185_h
10811 else
10812         ol_cv_header_db=$ac_cv_header_db_h
10813 fi
10814
10815
10816  
10817  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10818 echo "configure:10819: checking for Berkeley DB" >&5
10819 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   
10823         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10824                 ol_cv_berkeley_db=no
10825         else
10826                 ol_cv_berkeley_db=yes
10827         fi
10828
10829 fi
10830
10831 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10832  if test $ol_cv_berkeley_db = yes ; then
10833         cat >> confdefs.h <<\EOF
10834 #define HAVE_BERKELEY_DB 1
10835 EOF
10836
10837  fi
10838
10839
10840         if test $ol_cv_berkeley_db = yes ; then
10841                 ol_link_ldbm=db
10842                 ol_with_ldbm_api=db
10843
10844                 if test $ol_with_ldbm_type = hash ; then
10845                         cat >> confdefs.h <<\EOF
10846 #define LDBM_USE_DBHASH 1
10847 EOF
10848
10849                 else
10850                         cat >> confdefs.h <<\EOF
10851 #define LDBM_USE_DBBTREE 1
10852 EOF
10853
10854                 fi
10855
10856                                                 if test $ol_cv_lib_db != yes ; then
10857                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10858                 fi
10859         fi
10860 fi
10861
10862 if test $ol_with_ldbm_api = manual ; then
10863                 ol_link_ldbm=yes
10864
10865         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10866
10867         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10868 do
10869 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10870 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10871 echo "configure:10872: checking for $ac_hdr" >&5
10872 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   cat > conftest.$ac_ext <<EOF
10876 #line 10877 "configure"
10877 #include "confdefs.h"
10878 #include <$ac_hdr>
10879 EOF
10880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10881 { (eval echo configure:10882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10883 if test -z "$ac_err"; then
10884   rm -rf conftest*
10885   eval "ac_cv_header_$ac_safe=yes"
10886 else
10887   echo "$ac_err" >&5
10888   echo "configure: failed program was:" >&5
10889   cat conftest.$ac_ext >&5
10890   rm -rf conftest*
10891   eval "ac_cv_header_$ac_safe=no"
10892 fi
10893 rm -f conftest*
10894 fi
10895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10896   echo "$ac_t""yes" 1>&6
10897     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10898   cat >> confdefs.h <<EOF
10899 #define $ac_tr_hdr 1
10900 EOF
10901  
10902 else
10903   echo "$ac_t""no" 1>&6
10904 fi
10905 done
10906
10907 fi
10908
10909 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10910         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10911         ol_with_ldbm_api=none
10912 fi
10913
10914 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10915         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10916 echo "configure:10917: checking for MDBM library" >&5
10917 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920         ol_LIBS="$LIBS"
10921         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10922 echo "configure:10923: checking for mdbm_set_chain" >&5
10923 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10924   echo $ac_n "(cached) $ac_c" 1>&6
10925 else
10926   cat > conftest.$ac_ext <<EOF
10927 #line 10928 "configure"
10928 #include "confdefs.h"
10929 /* System header to define __stub macros and hopefully few prototypes,
10930     which can conflict with char mdbm_set_chain(); below.  */
10931 #include <assert.h>
10932 /* Override any gcc2 internal prototype to avoid an error.  */
10933 /* We use char because int might match the return type of a gcc2
10934     builtin and then its argument prototype would still apply.  */
10935 char mdbm_set_chain();
10936 char (*f)();
10937
10938 int main() {
10939
10940 /* The GNU C library defines this for functions which it implements
10941     to always fail with ENOSYS.  Some functions are actually named
10942     something starting with __ and the normal name is an alias.  */
10943 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10944 choke me
10945 #else
10946 f = mdbm_set_chain;
10947 #endif
10948
10949 ; return 0; }
10950 EOF
10951 if { (eval echo configure:10952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10952   rm -rf conftest*
10953   eval "ac_cv_func_mdbm_set_chain=yes"
10954 else
10955   echo "configure: failed program was:" >&5
10956   cat conftest.$ac_ext >&5
10957   rm -rf conftest*
10958   eval "ac_cv_func_mdbm_set_chain=no"
10959 fi
10960 rm -f conftest*
10961 fi
10962
10963 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10964   echo "$ac_t""yes" 1>&6
10965   ol_cv_lib_mdbm=yes
10966 else
10967   echo "$ac_t""no" 1>&6
10968
10969                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10970 echo "configure:10971: checking for mdbm_set_chain in -lmdbm" >&5
10971 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10972 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10973   echo $ac_n "(cached) $ac_c" 1>&6
10974 else
10975   ac_save_LIBS="$LIBS"
10976 LIBS="-lmdbm  $LIBS"
10977 cat > conftest.$ac_ext <<EOF
10978 #line 10979 "configure"
10979 #include "confdefs.h"
10980 /* Override any gcc2 internal prototype to avoid an error.  */
10981 /* We use char because int might match the return type of a gcc2
10982     builtin and then its argument prototype would still apply.  */
10983 char mdbm_set_chain();
10984
10985 int main() {
10986 mdbm_set_chain()
10987 ; return 0; }
10988 EOF
10989 if { (eval echo configure:10990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10990   rm -rf conftest*
10991   eval "ac_cv_lib_$ac_lib_var=yes"
10992 else
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -rf conftest*
10996   eval "ac_cv_lib_$ac_lib_var=no"
10997 fi
10998 rm -f conftest*
10999 LIBS="$ac_save_LIBS"
11000
11001 fi
11002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11003   echo "$ac_t""yes" 1>&6
11004   ol_cv_lib_mdbm=-lmdbm
11005 else
11006   echo "$ac_t""no" 1>&6
11007 ol_cv_lib_mdbm=no
11008 fi
11009
11010         
11011 fi
11012
11013         LIBS="$ol_LIBS"
11014
11015 fi
11016
11017 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11018
11019
11020  for ac_hdr in mdbm.h
11021 do
11022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11024 echo "configure:11025: checking for $ac_hdr" >&5
11025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11026   echo $ac_n "(cached) $ac_c" 1>&6
11027 else
11028   cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031 #include <$ac_hdr>
11032 EOF
11033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11034 { (eval echo configure:11035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11036 if test -z "$ac_err"; then
11037   rm -rf conftest*
11038   eval "ac_cv_header_$ac_safe=yes"
11039 else
11040   echo "$ac_err" >&5
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -rf conftest*
11044   eval "ac_cv_header_$ac_safe=no"
11045 fi
11046 rm -f conftest*
11047 fi
11048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11049   echo "$ac_t""yes" 1>&6
11050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11051   cat >> confdefs.h <<EOF
11052 #define $ac_tr_hdr 1
11053 EOF
11054  
11055 else
11056   echo "$ac_t""no" 1>&6
11057 fi
11058 done
11059
11060  echo $ac_n "checking for db""... $ac_c" 1>&6
11061 echo "configure:11062: checking for db" >&5
11062 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11063   echo $ac_n "(cached) $ac_c" 1>&6
11064 else
11065   
11066         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11067                 ol_cv_mdbm=no
11068         else
11069                 ol_cv_mdbm=yes
11070         fi
11071
11072 fi
11073
11074 echo "$ac_t""$ol_cv_mdbm" 1>&6
11075  if test $ol_cv_mdbm = yes ; then
11076         cat >> confdefs.h <<\EOF
11077 #define HAVE_MDBM 1
11078 EOF
11079
11080  fi
11081
11082
11083         if test $ol_cv_mdbm = yes ; then
11084                 ol_link_ldbm=mdbm
11085                 ol_with_ldbm_api=mdbm
11086                 if test $ol_cv_lib_mdbm != yes ; then
11087                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11088                 fi
11089         fi
11090 fi
11091
11092 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11093         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11094 echo "configure:11095: checking for GDBM library" >&5
11095 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11096   echo $ac_n "(cached) $ac_c" 1>&6
11097 else
11098         ol_LIBS="$LIBS"
11099         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11100 echo "configure:11101: checking for gdbm_open" >&5
11101 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11102   echo $ac_n "(cached) $ac_c" 1>&6
11103 else
11104   cat > conftest.$ac_ext <<EOF
11105 #line 11106 "configure"
11106 #include "confdefs.h"
11107 /* System header to define __stub macros and hopefully few prototypes,
11108     which can conflict with char gdbm_open(); below.  */
11109 #include <assert.h>
11110 /* Override any gcc2 internal prototype to avoid an error.  */
11111 /* We use char because int might match the return type of a gcc2
11112     builtin and then its argument prototype would still apply.  */
11113 char gdbm_open();
11114 char (*f)();
11115
11116 int main() {
11117
11118 /* The GNU C library defines this for functions which it implements
11119     to always fail with ENOSYS.  Some functions are actually named
11120     something starting with __ and the normal name is an alias.  */
11121 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11122 choke me
11123 #else
11124 f = gdbm_open;
11125 #endif
11126
11127 ; return 0; }
11128 EOF
11129 if { (eval echo configure:11130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11130   rm -rf conftest*
11131   eval "ac_cv_func_gdbm_open=yes"
11132 else
11133   echo "configure: failed program was:" >&5
11134   cat conftest.$ac_ext >&5
11135   rm -rf conftest*
11136   eval "ac_cv_func_gdbm_open=no"
11137 fi
11138 rm -f conftest*
11139 fi
11140
11141 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11142   echo "$ac_t""yes" 1>&6
11143   ol_cv_lib_gdbm=yes
11144 else
11145   echo "$ac_t""no" 1>&6
11146
11147                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11148 echo "configure:11149: checking for gdbm_open in -lgdbm" >&5
11149 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11151   echo $ac_n "(cached) $ac_c" 1>&6
11152 else
11153   ac_save_LIBS="$LIBS"
11154 LIBS="-lgdbm  $LIBS"
11155 cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158 /* Override any gcc2 internal prototype to avoid an error.  */
11159 /* We use char because int might match the return type of a gcc2
11160     builtin and then its argument prototype would still apply.  */
11161 char gdbm_open();
11162
11163 int main() {
11164 gdbm_open()
11165 ; return 0; }
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11168   rm -rf conftest*
11169   eval "ac_cv_lib_$ac_lib_var=yes"
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=no"
11175 fi
11176 rm -f conftest*
11177 LIBS="$ac_save_LIBS"
11178
11179 fi
11180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11181   echo "$ac_t""yes" 1>&6
11182   ol_cv_lib_gdbm=-lgdbm
11183 else
11184   echo "$ac_t""no" 1>&6
11185 ol_cv_lib_gdbm=no
11186 fi
11187
11188         
11189 fi
11190
11191         LIBS="$ol_LIBS"
11192
11193 fi
11194
11195 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11196
11197
11198  for ac_hdr in gdbm.h
11199 do
11200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11202 echo "configure:11203: checking for $ac_hdr" >&5
11203 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11204   echo $ac_n "(cached) $ac_c" 1>&6
11205 else
11206   cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209 #include <$ac_hdr>
11210 EOF
11211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11212 { (eval echo configure:11213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11214 if test -z "$ac_err"; then
11215   rm -rf conftest*
11216   eval "ac_cv_header_$ac_safe=yes"
11217 else
11218   echo "$ac_err" >&5
11219   echo "configure: failed program was:" >&5
11220   cat conftest.$ac_ext >&5
11221   rm -rf conftest*
11222   eval "ac_cv_header_$ac_safe=no"
11223 fi
11224 rm -f conftest*
11225 fi
11226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11227   echo "$ac_t""yes" 1>&6
11228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11229   cat >> confdefs.h <<EOF
11230 #define $ac_tr_hdr 1
11231 EOF
11232  
11233 else
11234   echo "$ac_t""no" 1>&6
11235 fi
11236 done
11237
11238  echo $ac_n "checking for db""... $ac_c" 1>&6
11239 echo "configure:11240: checking for db" >&5
11240 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11241   echo $ac_n "(cached) $ac_c" 1>&6
11242 else
11243   
11244         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11245                 ol_cv_gdbm=no
11246         else
11247                 ol_cv_gdbm=yes
11248         fi
11249
11250 fi
11251
11252 echo "$ac_t""$ol_cv_gdbm" 1>&6
11253  if test $ol_cv_gdbm = yes ; then
11254         cat >> confdefs.h <<\EOF
11255 #define HAVE_GDBM 1
11256 EOF
11257
11258  fi
11259
11260
11261         if test $ol_cv_gdbm = yes ; then
11262                 ol_link_ldbm=gdbm
11263                 ol_with_ldbm_api=gdbm
11264
11265                 if test $ol_cv_lib_gdbm != yes ; then
11266                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11267                 fi
11268         fi
11269 fi
11270
11271 if test $ol_with_ldbm_api = auto ; then
11272         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11273 elif test $ol_with_ldbm_api = ndbm ; then
11274         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11275 echo "configure:11276: checking for NDBM library" >&5
11276 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11277   echo $ac_n "(cached) $ac_c" 1>&6
11278 else
11279         ol_LIBS="$LIBS"
11280         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11281 echo "configure:11282: checking for dbm_open" >&5
11282 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285   cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288 /* System header to define __stub macros and hopefully few prototypes,
11289     which can conflict with char dbm_open(); below.  */
11290 #include <assert.h>
11291 /* Override any gcc2 internal prototype to avoid an error.  */
11292 /* We use char because int might match the return type of a gcc2
11293     builtin and then its argument prototype would still apply.  */
11294 char dbm_open();
11295 char (*f)();
11296
11297 int main() {
11298
11299 /* The GNU C library defines this for functions which it implements
11300     to always fail with ENOSYS.  Some functions are actually named
11301     something starting with __ and the normal name is an alias.  */
11302 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11303 choke me
11304 #else
11305 f = dbm_open;
11306 #endif
11307
11308 ; return 0; }
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11311   rm -rf conftest*
11312   eval "ac_cv_func_dbm_open=yes"
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   eval "ac_cv_func_dbm_open=no"
11318 fi
11319 rm -f conftest*
11320 fi
11321
11322 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11323   echo "$ac_t""yes" 1>&6
11324   ol_cv_lib_ndbm=yes
11325 else
11326   echo "$ac_t""no" 1>&6
11327
11328                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11329 echo "configure:11330: checking for dbm_open in -lndbm" >&5
11330 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11332   echo $ac_n "(cached) $ac_c" 1>&6
11333 else
11334   ac_save_LIBS="$LIBS"
11335 LIBS="-lndbm  $LIBS"
11336 cat > conftest.$ac_ext <<EOF
11337 #line 11338 "configure"
11338 #include "confdefs.h"
11339 /* Override any gcc2 internal prototype to avoid an error.  */
11340 /* We use char because int might match the return type of a gcc2
11341     builtin and then its argument prototype would still apply.  */
11342 char dbm_open();
11343
11344 int main() {
11345 dbm_open()
11346 ; return 0; }
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11349   rm -rf conftest*
11350   eval "ac_cv_lib_$ac_lib_var=yes"
11351 else
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -rf conftest*
11355   eval "ac_cv_lib_$ac_lib_var=no"
11356 fi
11357 rm -f conftest*
11358 LIBS="$ac_save_LIBS"
11359
11360 fi
11361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11362   echo "$ac_t""yes" 1>&6
11363   ol_cv_lib_ndbm=-lndbm
11364 else
11365   echo "$ac_t""no" 1>&6
11366
11367                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11368 echo "configure:11369: checking for dbm_open in -ldbm" >&5
11369 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11371   echo $ac_n "(cached) $ac_c" 1>&6
11372 else
11373   ac_save_LIBS="$LIBS"
11374 LIBS="-ldbm  $LIBS"
11375 cat > conftest.$ac_ext <<EOF
11376 #line 11377 "configure"
11377 #include "confdefs.h"
11378 /* Override any gcc2 internal prototype to avoid an error.  */
11379 /* We use char because int might match the return type of a gcc2
11380     builtin and then its argument prototype would still apply.  */
11381 char dbm_open();
11382
11383 int main() {
11384 dbm_open()
11385 ; return 0; }
11386 EOF
11387 if { (eval echo configure:11388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11388   rm -rf conftest*
11389   eval "ac_cv_lib_$ac_lib_var=yes"
11390 else
11391   echo "configure: failed program was:" >&5
11392   cat conftest.$ac_ext >&5
11393   rm -rf conftest*
11394   eval "ac_cv_lib_$ac_lib_var=no"
11395 fi
11396 rm -f conftest*
11397 LIBS="$ac_save_LIBS"
11398
11399 fi
11400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11401   echo "$ac_t""yes" 1>&6
11402   ol_cv_lib_ndbm=-ldbm
11403 else
11404   echo "$ac_t""no" 1>&6
11405 ol_cv_lib_ndbm=no
11406 fi
11407                 
11408 fi
11409
11410         
11411 fi
11412
11413         LIBS="$ol_LIBS"
11414
11415 fi
11416
11417 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11418
11419
11420  for ac_hdr in ndbm.h
11421 do
11422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11424 echo "configure:11425: checking for $ac_hdr" >&5
11425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11426   echo $ac_n "(cached) $ac_c" 1>&6
11427 else
11428   cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 #include <$ac_hdr>
11432 EOF
11433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11434 { (eval echo configure:11435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11436 if test -z "$ac_err"; then
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=yes"
11439 else
11440   echo "$ac_err" >&5
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   eval "ac_cv_header_$ac_safe=no"
11445 fi
11446 rm -f conftest*
11447 fi
11448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11449   echo "$ac_t""yes" 1>&6
11450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11451   cat >> confdefs.h <<EOF
11452 #define $ac_tr_hdr 1
11453 EOF
11454  
11455 else
11456   echo "$ac_t""no" 1>&6
11457 fi
11458 done
11459
11460  echo $ac_n "checking for db""... $ac_c" 1>&6
11461 echo "configure:11462: checking for db" >&5
11462 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11463   echo $ac_n "(cached) $ac_c" 1>&6
11464 else
11465   
11466         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11467                 ol_cv_ndbm=no
11468         else
11469                 ol_cv_ndbm=yes
11470         fi
11471
11472 fi
11473
11474 echo "$ac_t""$ol_cv_ndbm" 1>&6
11475  if test $ol_cv_ndbm = yes ; then
11476         cat >> confdefs.h <<\EOF
11477 #define HAVE_NDBM 1
11478 EOF
11479
11480  fi
11481
11482
11483         if test $ol_cv_ndbm = yes ; then
11484                 ol_link_ldbm=ndbm
11485                 ol_with_ldbm_api=ndbm
11486
11487                 if test $ol_cv_lib_ndbm != yes ; then
11488                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11489                 fi
11490         fi
11491 fi
11492
11493 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11494         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11495         if test $ol_enable_ldbm = yes ; then
11496                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11497         fi
11498
11499         echo "configure: warning: disabling LDBM" 1>&2
11500         ol_enable_ldbm=no
11501 fi
11502
11503 if test $ol_enable_wrappers != no ; then
11504         for ac_hdr in tcpd.h
11505 do
11506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11508 echo "configure:11509: checking for $ac_hdr" >&5
11509 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11510   echo $ac_n "(cached) $ac_c" 1>&6
11511 else
11512   cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515 #include <$ac_hdr>
11516 EOF
11517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11518 { (eval echo configure:11519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11520 if test -z "$ac_err"; then
11521   rm -rf conftest*
11522   eval "ac_cv_header_$ac_safe=yes"
11523 else
11524   echo "$ac_err" >&5
11525   echo "configure: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   rm -rf conftest*
11528   eval "ac_cv_header_$ac_safe=no"
11529 fi
11530 rm -f conftest*
11531 fi
11532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11533   echo "$ac_t""yes" 1>&6
11534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11535   cat >> confdefs.h <<EOF
11536 #define $ac_tr_hdr 1
11537 EOF
11538  
11539 else
11540   echo "$ac_t""no" 1>&6
11541 fi
11542 done
11543
11544
11545         if test $ac_cv_header_tcpd_h != yes ; then
11546                 have_wrappers=no
11547         else
11548                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11549 echo "configure:11550: checking for main in -lwrap" >&5
11550 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11551 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11552   echo $ac_n "(cached) $ac_c" 1>&6
11553 else
11554   ac_save_LIBS="$LIBS"
11555 LIBS="-lwrap  $LIBS"
11556 cat > conftest.$ac_ext <<EOF
11557 #line 11558 "configure"
11558 #include "confdefs.h"
11559
11560 int main() {
11561 main()
11562 ; return 0; }
11563 EOF
11564 if { (eval echo configure:11565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11565   rm -rf conftest*
11566   eval "ac_cv_lib_$ac_lib_var=yes"
11567 else
11568   echo "configure: failed program was:" >&5
11569   cat conftest.$ac_ext >&5
11570   rm -rf conftest*
11571   eval "ac_cv_lib_$ac_lib_var=no"
11572 fi
11573 rm -f conftest*
11574 LIBS="$ac_save_LIBS"
11575
11576 fi
11577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11578   echo "$ac_t""yes" 1>&6
11579   have_wrappers=yes
11580 else
11581   echo "$ac_t""no" 1>&6
11582 have_wrappers=no
11583 fi
11584
11585         fi
11586
11587         if test $have_wrappers = yes ; then
11588                 cat >> confdefs.h <<\EOF
11589 #define HAVE_TCPD 1
11590 EOF
11591
11592                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11593
11594                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11595 echo "configure:11596: checking for main in -lnsl" >&5
11596 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11598   echo $ac_n "(cached) $ac_c" 1>&6
11599 else
11600   ac_save_LIBS="$LIBS"
11601 LIBS="-lnsl  $LIBS"
11602 cat > conftest.$ac_ext <<EOF
11603 #line 11604 "configure"
11604 #include "confdefs.h"
11605
11606 int main() {
11607 main()
11608 ; return 0; }
11609 EOF
11610 if { (eval echo configure:11611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11611   rm -rf conftest*
11612   eval "ac_cv_lib_$ac_lib_var=yes"
11613 else
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -rf conftest*
11617   eval "ac_cv_lib_$ac_lib_var=no"
11618 fi
11619 rm -f conftest*
11620 LIBS="$ac_save_LIBS"
11621
11622 fi
11623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11624   echo "$ac_t""yes" 1>&6
11625     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11626     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11627   cat >> confdefs.h <<EOF
11628 #define $ac_tr_lib 1
11629 EOF
11630
11631   LIBS="-lnsl $LIBS"
11632
11633 else
11634   echo "$ac_t""no" 1>&6
11635 fi
11636
11637         else
11638                 echo "configure: warning: could not find -lwrap" 1>&2
11639                 if test $ol_enable_wrappers = yes ; then
11640                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11641                 fi
11642
11643                 echo "configure: warning: disabling wrappers support" 1>&2
11644                 ol_enable_wrappers=no
11645         fi
11646 fi
11647
11648 if test $ol_enable_syslog != no ; then
11649         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11650 echo "configure:11651: checking for openlog" >&5
11651 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11652   echo $ac_n "(cached) $ac_c" 1>&6
11653 else
11654   cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 /* System header to define __stub macros and hopefully few prototypes,
11658     which can conflict with char openlog(); below.  */
11659 #include <assert.h>
11660 /* Override any gcc2 internal prototype to avoid an error.  */
11661 /* We use char because int might match the return type of a gcc2
11662     builtin and then its argument prototype would still apply.  */
11663 char openlog();
11664 char (*f)();
11665
11666 int main() {
11667
11668 /* The GNU C library defines this for functions which it implements
11669     to always fail with ENOSYS.  Some functions are actually named
11670     something starting with __ and the normal name is an alias.  */
11671 #if defined (__stub_openlog) || defined (__stub___openlog)
11672 choke me
11673 #else
11674 f = openlog;
11675 #endif
11676
11677 ; return 0; }
11678 EOF
11679 if { (eval echo configure:11680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11680   rm -rf conftest*
11681   eval "ac_cv_func_openlog=yes"
11682 else
11683   echo "configure: failed program was:" >&5
11684   cat conftest.$ac_ext >&5
11685   rm -rf conftest*
11686   eval "ac_cv_func_openlog=no"
11687 fi
11688 rm -f conftest*
11689 fi
11690
11691 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11692   echo "$ac_t""yes" 1>&6
11693   :
11694 else
11695   echo "$ac_t""no" 1>&6
11696 fi
11697
11698         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11699                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11700         fi
11701         ol_enable_syslog=$ac_cv_func_openlog
11702 fi
11703
11704 if test $ol_enable_dmalloc != no ; then
11705         for ac_hdr in dmalloc.h
11706 do
11707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11709 echo "configure:11710: checking for $ac_hdr" >&5
11710 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11711   echo $ac_n "(cached) $ac_c" 1>&6
11712 else
11713   cat > conftest.$ac_ext <<EOF
11714 #line 11715 "configure"
11715 #include "confdefs.h"
11716 #include <$ac_hdr>
11717 EOF
11718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11719 { (eval echo configure:11720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11721 if test -z "$ac_err"; then
11722   rm -rf conftest*
11723   eval "ac_cv_header_$ac_safe=yes"
11724 else
11725   echo "$ac_err" >&5
11726   echo "configure: failed program was:" >&5
11727   cat conftest.$ac_ext >&5
11728   rm -rf conftest*
11729   eval "ac_cv_header_$ac_safe=no"
11730 fi
11731 rm -f conftest*
11732 fi
11733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11734   echo "$ac_t""yes" 1>&6
11735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11736   cat >> confdefs.h <<EOF
11737 #define $ac_tr_hdr 1
11738 EOF
11739  
11740 else
11741   echo "$ac_t""no" 1>&6
11742 fi
11743 done
11744
11745         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11746 echo "configure:11747: checking for dmalloc_shutdown in -ldmalloc" >&5
11747 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11748 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11749   echo $ac_n "(cached) $ac_c" 1>&6
11750 else
11751   ac_save_LIBS="$LIBS"
11752 LIBS="-ldmalloc  $LIBS"
11753 cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756 /* Override any gcc2 internal prototype to avoid an error.  */
11757 /* We use char because int might match the return type of a gcc2
11758     builtin and then its argument prototype would still apply.  */
11759 char dmalloc_shutdown();
11760
11761 int main() {
11762 dmalloc_shutdown()
11763 ; return 0; }
11764 EOF
11765 if { (eval echo configure:11766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11766   rm -rf conftest*
11767   eval "ac_cv_lib_$ac_lib_var=yes"
11768 else
11769   echo "configure: failed program was:" >&5
11770   cat conftest.$ac_ext >&5
11771   rm -rf conftest*
11772   eval "ac_cv_lib_$ac_lib_var=no"
11773 fi
11774 rm -f conftest*
11775 LIBS="$ac_save_LIBS"
11776
11777 fi
11778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11779   echo "$ac_t""yes" 1>&6
11780     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11781     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11782   cat >> confdefs.h <<EOF
11783 #define $ac_tr_lib 1
11784 EOF
11785
11786   LIBS="-ldmalloc $LIBS"
11787
11788 else
11789   echo "$ac_t""no" 1>&6
11790 fi
11791
11792 fi
11793
11794 if test $ol_enable_tcl != no ; then
11795         for ac_hdr in tcl.h
11796 do
11797 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11798 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11799 echo "configure:11800: checking for $ac_hdr" >&5
11800 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11801   echo $ac_n "(cached) $ac_c" 1>&6
11802 else
11803   cat > conftest.$ac_ext <<EOF
11804 #line 11805 "configure"
11805 #include "confdefs.h"
11806 #include <$ac_hdr>
11807 EOF
11808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11809 { (eval echo configure:11810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11811 if test -z "$ac_err"; then
11812   rm -rf conftest*
11813   eval "ac_cv_header_$ac_safe=yes"
11814 else
11815   echo "$ac_err" >&5
11816   echo "configure: failed program was:" >&5
11817   cat conftest.$ac_ext >&5
11818   rm -rf conftest*
11819   eval "ac_cv_header_$ac_safe=no"
11820 fi
11821 rm -f conftest*
11822 fi
11823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11824   echo "$ac_t""yes" 1>&6
11825     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11826   cat >> confdefs.h <<EOF
11827 #define $ac_tr_hdr 1
11828 EOF
11829  
11830 else
11831   echo "$ac_t""no" 1>&6
11832 fi
11833 done
11834
11835
11836         if test $ac_cv_header_tcl_h != yes ; then
11837                 have_tcl=no
11838         else
11839                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11840 echo "configure:11841: checking for main in -ltcl" >&5
11841 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11843   echo $ac_n "(cached) $ac_c" 1>&6
11844 else
11845   ac_save_LIBS="$LIBS"
11846 LIBS="-ltcl  $LIBS"
11847 cat > conftest.$ac_ext <<EOF
11848 #line 11849 "configure"
11849 #include "confdefs.h"
11850
11851 int main() {
11852 main()
11853 ; return 0; }
11854 EOF
11855 if { (eval echo configure:11856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11856   rm -rf conftest*
11857   eval "ac_cv_lib_$ac_lib_var=yes"
11858 else
11859   echo "configure: failed program was:" >&5
11860   cat conftest.$ac_ext >&5
11861   rm -rf conftest*
11862   eval "ac_cv_lib_$ac_lib_var=no"
11863 fi
11864 rm -f conftest*
11865 LIBS="$ac_save_LIBS"
11866
11867 fi
11868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11869   echo "$ac_t""yes" 1>&6
11870   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11871 else
11872   echo "$ac_t""no" 1>&6
11873 have_tcl=no
11874 fi
11875
11876
11877                 if test $have_tcl != yes; then
11878                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11879 echo "configure:11880: checking for main in -ltcl7.6" >&5
11880 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11882   echo $ac_n "(cached) $ac_c" 1>&6
11883 else
11884   ac_save_LIBS="$LIBS"
11885 LIBS="-ltcl7.6  $LIBS"
11886 cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889
11890 int main() {
11891 main()
11892 ; return 0; }
11893 EOF
11894 if { (eval echo configure:11895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11895   rm -rf conftest*
11896   eval "ac_cv_lib_$ac_lib_var=yes"
11897 else
11898   echo "configure: failed program was:" >&5
11899   cat conftest.$ac_ext >&5
11900   rm -rf conftest*
11901   eval "ac_cv_lib_$ac_lib_var=no"
11902 fi
11903 rm -f conftest*
11904 LIBS="$ac_save_LIBS"
11905
11906 fi
11907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11908   echo "$ac_t""yes" 1>&6
11909   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11910 else
11911   echo "$ac_t""no" 1>&6
11912 have_tcl=no
11913 fi
11914
11915                 fi
11916
11917                 if test $have_tcl != yes; then
11918                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11919 echo "configure:11920: checking for main in -ltcl8.0" >&5
11920 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11921 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11922   echo $ac_n "(cached) $ac_c" 1>&6
11923 else
11924   ac_save_LIBS="$LIBS"
11925 LIBS="-ltcl8.0  $LIBS"
11926 cat > conftest.$ac_ext <<EOF
11927 #line 11928 "configure"
11928 #include "confdefs.h"
11929
11930 int main() {
11931 main()
11932 ; return 0; }
11933 EOF
11934 if { (eval echo configure:11935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11935   rm -rf conftest*
11936   eval "ac_cv_lib_$ac_lib_var=yes"
11937 else
11938   echo "configure: failed program was:" >&5
11939   cat conftest.$ac_ext >&5
11940   rm -rf conftest*
11941   eval "ac_cv_lib_$ac_lib_var=no"
11942 fi
11943 rm -f conftest*
11944 LIBS="$ac_save_LIBS"
11945
11946 fi
11947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11948   echo "$ac_t""yes" 1>&6
11949   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11950 else
11951   echo "$ac_t""no" 1>&6
11952 have_tcl=no
11953 fi
11954
11955                 fi
11956         fi
11957
11958         if test $have_tcl != yes ; then
11959                 echo "configure: warning: could not find -ltcl" 1>&2
11960                 if test $ol_enable_tcl = yes ; then
11961                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11962                 fi
11963
11964                 ol_enable_tcl=no
11965         fi
11966 fi
11967
11968 # ud needs termcap (should insert check here)
11969 ol_link_termcap=no
11970 for ac_hdr in termcap.h ncurses.h
11971 do
11972 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11973 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11974 echo "configure:11975: checking for $ac_hdr" >&5
11975 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11976   echo $ac_n "(cached) $ac_c" 1>&6
11977 else
11978   cat > conftest.$ac_ext <<EOF
11979 #line 11980 "configure"
11980 #include "confdefs.h"
11981 #include <$ac_hdr>
11982 EOF
11983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11984 { (eval echo configure:11985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11986 if test -z "$ac_err"; then
11987   rm -rf conftest*
11988   eval "ac_cv_header_$ac_safe=yes"
11989 else
11990   echo "$ac_err" >&5
11991   echo "configure: failed program was:" >&5
11992   cat conftest.$ac_ext >&5
11993   rm -rf conftest*
11994   eval "ac_cv_header_$ac_safe=no"
11995 fi
11996 rm -f conftest*
11997 fi
11998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11999   echo "$ac_t""yes" 1>&6
12000     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12001   cat >> confdefs.h <<EOF
12002 #define $ac_tr_hdr 1
12003 EOF
12004  
12005 else
12006   echo "$ac_t""no" 1>&6
12007 fi
12008 done
12009
12010
12011 if test $ol_link_termcap = no ; then
12012         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12013 echo "configure:12014: checking for tputs in -ltermcap" >&5
12014 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12015 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12016   echo $ac_n "(cached) $ac_c" 1>&6
12017 else
12018   ac_save_LIBS="$LIBS"
12019 LIBS="-ltermcap  $LIBS"
12020 cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023 /* Override any gcc2 internal prototype to avoid an error.  */
12024 /* We use char because int might match the return type of a gcc2
12025     builtin and then its argument prototype would still apply.  */
12026 char tputs();
12027
12028 int main() {
12029 tputs()
12030 ; return 0; }
12031 EOF
12032 if { (eval echo configure:12033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12033   rm -rf conftest*
12034   eval "ac_cv_lib_$ac_lib_var=yes"
12035 else
12036   echo "configure: failed program was:" >&5
12037   cat conftest.$ac_ext >&5
12038   rm -rf conftest*
12039   eval "ac_cv_lib_$ac_lib_var=no"
12040 fi
12041 rm -f conftest*
12042 LIBS="$ac_save_LIBS"
12043
12044 fi
12045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12046   echo "$ac_t""yes" 1>&6
12047   have_termcap=yes
12048 else
12049   echo "$ac_t""no" 1>&6
12050 have_termcap=no
12051 fi
12052
12053         if test $have_termcap = yes ; then
12054                 cat >> confdefs.h <<\EOF
12055 #define HAVE_TERMCAP 1
12056 EOF
12057
12058                 ol_link_termcap=yes
12059                 TERMCAP_LIBS=-ltermcap
12060         fi
12061 fi
12062
12063 if test $ol_link_termcap = no ; then
12064         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12065 echo "configure:12066: checking for initscr in -lncurses" >&5
12066 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12068   echo $ac_n "(cached) $ac_c" 1>&6
12069 else
12070   ac_save_LIBS="$LIBS"
12071 LIBS="-lncurses  $LIBS"
12072 cat > conftest.$ac_ext <<EOF
12073 #line 12074 "configure"
12074 #include "confdefs.h"
12075 /* Override any gcc2 internal prototype to avoid an error.  */
12076 /* We use char because int might match the return type of a gcc2
12077     builtin and then its argument prototype would still apply.  */
12078 char initscr();
12079
12080 int main() {
12081 initscr()
12082 ; return 0; }
12083 EOF
12084 if { (eval echo configure:12085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12085   rm -rf conftest*
12086   eval "ac_cv_lib_$ac_lib_var=yes"
12087 else
12088   echo "configure: failed program was:" >&5
12089   cat conftest.$ac_ext >&5
12090   rm -rf conftest*
12091   eval "ac_cv_lib_$ac_lib_var=no"
12092 fi
12093 rm -f conftest*
12094 LIBS="$ac_save_LIBS"
12095
12096 fi
12097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12098   echo "$ac_t""yes" 1>&6
12099   have_ncurses=yes
12100 else
12101   echo "$ac_t""no" 1>&6
12102 have_ncurses=no
12103 fi
12104
12105         if test $have_ncurses = yes ; then
12106                 cat >> confdefs.h <<\EOF
12107 #define HAVE_NCURSES 1
12108 EOF
12109
12110                 ol_link_termcap=yes
12111                 TERMCAP_LIBS=-lncurses
12112         fi
12113 fi
12114
12115 if test $ol_link_termcap = no ; then
12116         cat >> confdefs.h <<\EOF
12117 #define NO_TERMCAP 1
12118 EOF
12119
12120         TERMCAP_LIBS=
12121 fi
12122
12123 ol_link_sasl=no
12124 if test $ol_with_cyrus_sasl != no ; then
12125         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12126 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12127 echo "configure:12128: checking for sasl.h" >&5
12128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12129   echo $ac_n "(cached) $ac_c" 1>&6
12130 else
12131   cat > conftest.$ac_ext <<EOF
12132 #line 12133 "configure"
12133 #include "confdefs.h"
12134 #include <sasl.h>
12135 EOF
12136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12137 { (eval echo configure:12138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12139 if test -z "$ac_err"; then
12140   rm -rf conftest*
12141   eval "ac_cv_header_$ac_safe=yes"
12142 else
12143   echo "$ac_err" >&5
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   eval "ac_cv_header_$ac_safe=no"
12148 fi
12149 rm -f conftest*
12150 fi
12151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12152   echo "$ac_t""yes" 1>&6
12153   :
12154 else
12155   echo "$ac_t""no" 1>&6
12156 fi
12157
12158
12159         if test $ac_cv_header_sasl_h = yes ; then
12160                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12161 echo "configure:12162: checking for sasl_client_init in -lsasl" >&5
12162 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12164   echo $ac_n "(cached) $ac_c" 1>&6
12165 else
12166   ac_save_LIBS="$LIBS"
12167 LIBS="-lsasl  $LIBS"
12168 cat > conftest.$ac_ext <<EOF
12169 #line 12170 "configure"
12170 #include "confdefs.h"
12171 /* Override any gcc2 internal prototype to avoid an error.  */
12172 /* We use char because int might match the return type of a gcc2
12173     builtin and then its argument prototype would still apply.  */
12174 char sasl_client_init();
12175
12176 int main() {
12177 sasl_client_init()
12178 ; return 0; }
12179 EOF
12180 if { (eval echo configure:12181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12181   rm -rf conftest*
12182   eval "ac_cv_lib_$ac_lib_var=yes"
12183 else
12184   echo "configure: failed program was:" >&5
12185   cat conftest.$ac_ext >&5
12186   rm -rf conftest*
12187   eval "ac_cv_lib_$ac_lib_var=no"
12188 fi
12189 rm -f conftest*
12190 LIBS="$ac_save_LIBS"
12191
12192 fi
12193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12194   echo "$ac_t""yes" 1>&6
12195   have_cyrus_sasl=yes
12196 else
12197   echo "$ac_t""no" 1>&6
12198 have_cyrus_sasl=no
12199 fi
12200
12201
12202                 if test $have_cyrus_sasl != no ; then
12203                         SASL_LIBS="-lsasl"
12204                         cat >> confdefs.h <<\EOF
12205 #define HAVE_CYRUS_SASL 1
12206 EOF
12207
12208                         ol_link_sasl=yes
12209                 fi
12210         fi
12211
12212         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12213                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12214         fi
12215 fi
12216
12217 ol_link_fetch=no
12218 if test $ol_with_fetch != no ; then
12219         ol=$LIBS
12220 LIBS="-lfetch -lcom_err $LIBS"
12221 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12222 echo "configure:12223: checking fetch(3) library" >&5
12223 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12224   echo $ac_n "(cached) $ac_c" 1>&6
12225 else
12226   
12227         cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230
12231 #include <sys/param.h>
12232 #include <stdio.h>
12233 #include <fetch.h>
12234 int main() {
12235 struct url *u = fetchParseURL("file:///"); 
12236 ; return 0; }
12237 EOF
12238 if { (eval echo configure:12239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12239   rm -rf conftest*
12240   ol_cv_lib_fetch=yes
12241 else
12242   echo "configure: failed program was:" >&5
12243   cat conftest.$ac_ext >&5
12244   rm -rf conftest*
12245   ol_cv_lib_fetch=no
12246 fi
12247 rm -f conftest*
12248 fi
12249
12250 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12251 LIBS=$ol_LIBS
12252 if test $ol_cv_lib_fetch != no ; then
12253         ol_link_fetch="-lfetch -lcom_err"
12254         cat >> confdefs.h <<\EOF
12255 #define HAVE_FETCH 1
12256 EOF
12257
12258 fi
12259
12260
12261         if test $ol_cv_lib_fetch != no ; then
12262                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12263                 ol_link_fetch=freebsd
12264
12265         elif test $ol_with_fetch != auto ; then
12266                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12267         fi 
12268 fi
12269
12270 ol_link_readline=no
12271 if test $ol_with_readline != no ; then
12272         for ac_hdr in readline/readline.h readline/history.h
12273 do
12274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12276 echo "configure:12277: checking for $ac_hdr" >&5
12277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12278   echo $ac_n "(cached) $ac_c" 1>&6
12279 else
12280   cat > conftest.$ac_ext <<EOF
12281 #line 12282 "configure"
12282 #include "confdefs.h"
12283 #include <$ac_hdr>
12284 EOF
12285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12286 { (eval echo configure:12287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12288 if test -z "$ac_err"; then
12289   rm -rf conftest*
12290   eval "ac_cv_header_$ac_safe=yes"
12291 else
12292   echo "$ac_err" >&5
12293   echo "configure: failed program was:" >&5
12294   cat conftest.$ac_ext >&5
12295   rm -rf conftest*
12296   eval "ac_cv_header_$ac_safe=no"
12297 fi
12298 rm -f conftest*
12299 fi
12300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12301   echo "$ac_t""yes" 1>&6
12302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12303   cat >> confdefs.h <<EOF
12304 #define $ac_tr_hdr 1
12305 EOF
12306  
12307 else
12308   echo "$ac_t""no" 1>&6
12309 fi
12310 done
12311
12312
12313         if test $ac_cv_header_readline_readline_h = yes ; then
12314                 save_LIBS="$LIBS"
12315                 LIBS="$TERMCAP_LIBS $LIBS"
12316                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12317 echo "configure:12318: checking for readline in -lreadline" >&5
12318 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12320   echo $ac_n "(cached) $ac_c" 1>&6
12321 else
12322   ac_save_LIBS="$LIBS"
12323 LIBS="-lreadline  $LIBS"
12324 cat > conftest.$ac_ext <<EOF
12325 #line 12326 "configure"
12326 #include "confdefs.h"
12327 /* Override any gcc2 internal prototype to avoid an error.  */
12328 /* We use char because int might match the return type of a gcc2
12329     builtin and then its argument prototype would still apply.  */
12330 char readline();
12331
12332 int main() {
12333 readline()
12334 ; return 0; }
12335 EOF
12336 if { (eval echo configure:12337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12337   rm -rf conftest*
12338   eval "ac_cv_lib_$ac_lib_var=yes"
12339 else
12340   echo "configure: failed program was:" >&5
12341   cat conftest.$ac_ext >&5
12342   rm -rf conftest*
12343   eval "ac_cv_lib_$ac_lib_var=no"
12344 fi
12345 rm -f conftest*
12346 LIBS="$ac_save_LIBS"
12347
12348 fi
12349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12350   echo "$ac_t""yes" 1>&6
12351   have_readline=yes
12352 else
12353   echo "$ac_t""no" 1>&6
12354 have_readline=no
12355 fi
12356
12357                 LIBS="$save_LIBS"
12358                         
12359                 if test $have_readline = yes ; then
12360                         ol_with_readline=found
12361                         ol_link_readline=yes
12362
12363                         READLINE_LIBS="-lreadline"
12364                 fi
12365         fi
12366 fi
12367
12368 if test $ol_link_readline = yes ; then
12369         cat >> confdefs.h <<\EOF
12370 #define HAVE_READLINE 1
12371 EOF
12372
12373 fi
12374
12375
12376 # FreeBSD (and others) have crypt(3) in -lcrypt
12377 if test $ol_enable_crypt != no ; then
12378         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12379 echo "configure:12380: checking for crypt" >&5
12380 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12381   echo $ac_n "(cached) $ac_c" 1>&6
12382 else
12383   cat > conftest.$ac_ext <<EOF
12384 #line 12385 "configure"
12385 #include "confdefs.h"
12386 /* System header to define __stub macros and hopefully few prototypes,
12387     which can conflict with char crypt(); below.  */
12388 #include <assert.h>
12389 /* Override any gcc2 internal prototype to avoid an error.  */
12390 /* We use char because int might match the return type of a gcc2
12391     builtin and then its argument prototype would still apply.  */
12392 char crypt();
12393 char (*f)();
12394
12395 int main() {
12396
12397 /* The GNU C library defines this for functions which it implements
12398     to always fail with ENOSYS.  Some functions are actually named
12399     something starting with __ and the normal name is an alias.  */
12400 #if defined (__stub_crypt) || defined (__stub___crypt)
12401 choke me
12402 #else
12403 f = crypt;
12404 #endif
12405
12406 ; return 0; }
12407 EOF
12408 if { (eval echo configure:12409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12409   rm -rf conftest*
12410   eval "ac_cv_func_crypt=yes"
12411 else
12412   echo "configure: failed program was:" >&5
12413   cat conftest.$ac_ext >&5
12414   rm -rf conftest*
12415   eval "ac_cv_func_crypt=no"
12416 fi
12417 rm -f conftest*
12418 fi
12419
12420 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12421   echo "$ac_t""yes" 1>&6
12422   have_crypt=yes
12423 else
12424   echo "$ac_t""no" 1>&6
12425
12426                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12427 echo "configure:12428: checking for crypt in -lcrypt" >&5
12428 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12430   echo $ac_n "(cached) $ac_c" 1>&6
12431 else
12432   ac_save_LIBS="$LIBS"
12433 LIBS="-lcrypt  $LIBS"
12434 cat > conftest.$ac_ext <<EOF
12435 #line 12436 "configure"
12436 #include "confdefs.h"
12437 /* Override any gcc2 internal prototype to avoid an error.  */
12438 /* We use char because int might match the return type of a gcc2
12439     builtin and then its argument prototype would still apply.  */
12440 char crypt();
12441
12442 int main() {
12443 crypt()
12444 ; return 0; }
12445 EOF
12446 if { (eval echo configure:12447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12447   rm -rf conftest*
12448   eval "ac_cv_lib_$ac_lib_var=yes"
12449 else
12450   echo "configure: failed program was:" >&5
12451   cat conftest.$ac_ext >&5
12452   rm -rf conftest*
12453   eval "ac_cv_lib_$ac_lib_var=no"
12454 fi
12455 rm -f conftest*
12456 LIBS="$ac_save_LIBS"
12457
12458 fi
12459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12460   echo "$ac_t""yes" 1>&6
12461   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12462                         have_crypt=yes
12463 else
12464   echo "$ac_t""no" 1>&6
12465 have_crypt=no
12466 fi
12467
12468 fi
12469
12470
12471         if test $have_crypt = yes ; then
12472                 cat >> confdefs.h <<\EOF
12473 #define HAVE_CRYPT 1
12474 EOF
12475
12476         else
12477                 echo "configure: warning: could not find crypt" 1>&2
12478                 if test $ol_enable_crypt = yes ; then
12479                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12480                 fi
12481
12482                 echo "configure: warning: disabling crypt support" 1>&2
12483                 ol_enable_crypt=no
12484         fi
12485 fi
12486
12487 # FreeBSD (and others) have setproctitle(3) in -lutil
12488 if test $ol_enable_proctitle != no ; then
12489         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12490 echo "configure:12491: checking for setproctitle" >&5
12491 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12492   echo $ac_n "(cached) $ac_c" 1>&6
12493 else
12494   cat > conftest.$ac_ext <<EOF
12495 #line 12496 "configure"
12496 #include "confdefs.h"
12497 /* System header to define __stub macros and hopefully few prototypes,
12498     which can conflict with char setproctitle(); below.  */
12499 #include <assert.h>
12500 /* Override any gcc2 internal prototype to avoid an error.  */
12501 /* We use char because int might match the return type of a gcc2
12502     builtin and then its argument prototype would still apply.  */
12503 char setproctitle();
12504 char (*f)();
12505
12506 int main() {
12507
12508 /* The GNU C library defines this for functions which it implements
12509     to always fail with ENOSYS.  Some functions are actually named
12510     something starting with __ and the normal name is an alias.  */
12511 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12512 choke me
12513 #else
12514 f = setproctitle;
12515 #endif
12516
12517 ; return 0; }
12518 EOF
12519 if { (eval echo configure:12520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12520   rm -rf conftest*
12521   eval "ac_cv_func_setproctitle=yes"
12522 else
12523   echo "configure: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   rm -rf conftest*
12526   eval "ac_cv_func_setproctitle=no"
12527 fi
12528 rm -f conftest*
12529 fi
12530
12531 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12532   echo "$ac_t""yes" 1>&6
12533   have_setproctitle=yes
12534 else
12535   echo "$ac_t""no" 1>&6
12536
12537                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12538 echo "configure:12539: checking for setproctitle in -lutil" >&5
12539 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12540 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12541   echo $ac_n "(cached) $ac_c" 1>&6
12542 else
12543   ac_save_LIBS="$LIBS"
12544 LIBS="-lutil  $LIBS"
12545 cat > conftest.$ac_ext <<EOF
12546 #line 12547 "configure"
12547 #include "confdefs.h"
12548 /* Override any gcc2 internal prototype to avoid an error.  */
12549 /* We use char because int might match the return type of a gcc2
12550     builtin and then its argument prototype would still apply.  */
12551 char setproctitle();
12552
12553 int main() {
12554 setproctitle()
12555 ; return 0; }
12556 EOF
12557 if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12558   rm -rf conftest*
12559   eval "ac_cv_lib_$ac_lib_var=yes"
12560 else
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   eval "ac_cv_lib_$ac_lib_var=no"
12565 fi
12566 rm -f conftest*
12567 LIBS="$ac_save_LIBS"
12568
12569 fi
12570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12571   echo "$ac_t""yes" 1>&6
12572   have_setproctitle=yes
12573                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12574 else
12575   echo "$ac_t""no" 1>&6
12576 have_setproctitle=no
12577                         LIBOBJS="$LIBOBJS setproctitle.o"
12578 fi
12579
12580 fi
12581
12582
12583         if test $have_setproctitle = yes ; then
12584                 cat >> confdefs.h <<\EOF
12585 #define HAVE_SETPROCTITLE 1
12586 EOF
12587
12588         fi
12589 fi
12590
12591 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12592 echo "configure:12593: checking for uid_t in sys/types.h" >&5
12593 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12594   echo $ac_n "(cached) $ac_c" 1>&6
12595 else
12596   cat > conftest.$ac_ext <<EOF
12597 #line 12598 "configure"
12598 #include "confdefs.h"
12599 #include <sys/types.h>
12600 EOF
12601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12602   egrep "uid_t" >/dev/null 2>&1; then
12603   rm -rf conftest*
12604   ac_cv_type_uid_t=yes
12605 else
12606   rm -rf conftest*
12607   ac_cv_type_uid_t=no
12608 fi
12609 rm -f conftest*
12610
12611 fi
12612
12613 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12614 if test $ac_cv_type_uid_t = no; then
12615   cat >> confdefs.h <<\EOF
12616 #define uid_t int
12617 EOF
12618
12619   cat >> confdefs.h <<\EOF
12620 #define gid_t int
12621 EOF
12622
12623 fi
12624
12625 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12626 echo "configure:12627: checking type of array argument to getgroups" >&5
12627 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12628   echo $ac_n "(cached) $ac_c" 1>&6
12629 else
12630   if test "$cross_compiling" = yes; then
12631   ac_cv_type_getgroups=cross
12632 else
12633   cat > conftest.$ac_ext <<EOF
12634 #line 12635 "configure"
12635 #include "confdefs.h"
12636
12637 /* Thanks to Mike Rendell for this test.  */
12638 #include <sys/types.h>
12639 #define NGID 256
12640 #undef MAX
12641 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12642 main()
12643 {
12644   gid_t gidset[NGID];
12645   int i, n;
12646   union { gid_t gval; long lval; }  val;
12647
12648   val.lval = -1;
12649   for (i = 0; i < NGID; i++)
12650     gidset[i] = val.gval;
12651   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12652                  gidset);
12653   /* Exit non-zero if getgroups seems to require an array of ints.  This
12654      happens when gid_t is short but getgroups modifies an array of ints.  */
12655   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12656 }
12657
12658 EOF
12659 if { (eval echo configure:12660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12660 then
12661     ac_cv_type_getgroups=gid_t
12662 else
12663   echo "configure: failed program was:" >&5
12664   cat conftest.$ac_ext >&5
12665   rm -fr conftest*
12666   ac_cv_type_getgroups=int
12667 fi
12668 rm -fr conftest*
12669 fi
12670
12671 if test $ac_cv_type_getgroups = cross; then
12672         cat > conftest.$ac_ext <<EOF
12673 #line 12674 "configure"
12674 #include "confdefs.h"
12675 #include <unistd.h>
12676 EOF
12677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12678   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12679   rm -rf conftest*
12680   ac_cv_type_getgroups=gid_t
12681 else
12682   rm -rf conftest*
12683   ac_cv_type_getgroups=int
12684 fi
12685 rm -f conftest*
12686
12687 fi
12688 fi
12689
12690 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12691 cat >> confdefs.h <<EOF
12692 #define GETGROUPS_T $ac_cv_type_getgroups
12693 EOF
12694
12695  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12696 echo "configure:12697: checking for ANSI C header files" >&5
12697 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12698   echo $ac_n "(cached) $ac_c" 1>&6
12699 else
12700   cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 #include <stdlib.h>
12704 #include <stdarg.h>
12705 #include <string.h>
12706 #include <float.h>
12707 EOF
12708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12709 { (eval echo configure:12710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12711 if test -z "$ac_err"; then
12712   rm -rf conftest*
12713   ac_cv_header_stdc=yes
12714 else
12715   echo "$ac_err" >&5
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -rf conftest*
12719   ac_cv_header_stdc=no
12720 fi
12721 rm -f conftest*
12722
12723 if test $ac_cv_header_stdc = yes; then
12724   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12725 cat > conftest.$ac_ext <<EOF
12726 #line 12727 "configure"
12727 #include "confdefs.h"
12728 #include <string.h>
12729 EOF
12730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12731   egrep "memchr" >/dev/null 2>&1; then
12732   :
12733 else
12734   rm -rf conftest*
12735   ac_cv_header_stdc=no
12736 fi
12737 rm -f conftest*
12738
12739 fi
12740
12741 if test $ac_cv_header_stdc = yes; then
12742   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12743 cat > conftest.$ac_ext <<EOF
12744 #line 12745 "configure"
12745 #include "confdefs.h"
12746 #include <stdlib.h>
12747 EOF
12748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12749   egrep "free" >/dev/null 2>&1; then
12750   :
12751 else
12752   rm -rf conftest*
12753   ac_cv_header_stdc=no
12754 fi
12755 rm -f conftest*
12756
12757 fi
12758
12759 if test $ac_cv_header_stdc = yes; then
12760   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12761 if test "$cross_compiling" = yes; then
12762   :
12763 else
12764   cat > conftest.$ac_ext <<EOF
12765 #line 12766 "configure"
12766 #include "confdefs.h"
12767 #include <ctype.h>
12768 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12769 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12770 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12771 int main () { int i; for (i = 0; i < 256; i++)
12772 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12773 exit (0); }
12774
12775 EOF
12776 if { (eval echo configure:12777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12777 then
12778   :
12779 else
12780   echo "configure: failed program was:" >&5
12781   cat conftest.$ac_ext >&5
12782   rm -fr conftest*
12783   ac_cv_header_stdc=no
12784 fi
12785 rm -fr conftest*
12786 fi
12787
12788 fi
12789 fi
12790
12791 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12792 if test $ac_cv_header_stdc = yes; then
12793   cat >> confdefs.h <<\EOF
12794 #define STDC_HEADERS 1
12795 EOF
12796
12797 fi
12798
12799 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12800 echo "configure:12801: checking for mode_t" >&5
12801 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12802   echo $ac_n "(cached) $ac_c" 1>&6
12803 else
12804   cat > conftest.$ac_ext <<EOF
12805 #line 12806 "configure"
12806 #include "confdefs.h"
12807 #include <sys/types.h>
12808 #if STDC_HEADERS
12809 #include <stdlib.h>
12810 #include <stddef.h>
12811 #endif
12812 EOF
12813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12814   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12815   rm -rf conftest*
12816   eval "ac_cv_type_mode_t=yes"
12817 else
12818   rm -rf conftest*
12819   eval "ac_cv_type_mode_t=no"
12820 fi
12821 rm -f conftest*
12822
12823 fi
12824 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12825   echo "$ac_t""yes" 1>&6
12826 else
12827   echo "$ac_t""no" 1>&6
12828   cat >> confdefs.h <<EOF
12829 #define mode_t int
12830 EOF
12831
12832 fi
12833
12834 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12835 echo "configure:12836: checking for off_t" >&5
12836 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12837   echo $ac_n "(cached) $ac_c" 1>&6
12838 else
12839   cat > conftest.$ac_ext <<EOF
12840 #line 12841 "configure"
12841 #include "confdefs.h"
12842 #include <sys/types.h>
12843 #if STDC_HEADERS
12844 #include <stdlib.h>
12845 #include <stddef.h>
12846 #endif
12847 EOF
12848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12849   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12850   rm -rf conftest*
12851   eval "ac_cv_type_off_t=yes"
12852 else
12853   rm -rf conftest*
12854   eval "ac_cv_type_off_t=no"
12855 fi
12856 rm -f conftest*
12857
12858 fi
12859 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12860   echo "$ac_t""yes" 1>&6
12861 else
12862   echo "$ac_t""no" 1>&6
12863   cat >> confdefs.h <<EOF
12864 #define off_t long
12865 EOF
12866
12867 fi
12868
12869 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12870 echo "configure:12871: checking for pid_t" >&5
12871 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12872   echo $ac_n "(cached) $ac_c" 1>&6
12873 else
12874   cat > conftest.$ac_ext <<EOF
12875 #line 12876 "configure"
12876 #include "confdefs.h"
12877 #include <sys/types.h>
12878 #if STDC_HEADERS
12879 #include <stdlib.h>
12880 #include <stddef.h>
12881 #endif
12882 EOF
12883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12884   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12885   rm -rf conftest*
12886   eval "ac_cv_type_pid_t=yes"
12887 else
12888   rm -rf conftest*
12889   eval "ac_cv_type_pid_t=no"
12890 fi
12891 rm -f conftest*
12892
12893 fi
12894 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12895   echo "$ac_t""yes" 1>&6
12896 else
12897   echo "$ac_t""no" 1>&6
12898   cat >> confdefs.h <<EOF
12899 #define pid_t int
12900 EOF
12901
12902 fi
12903
12904 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12905 echo "configure:12906: checking for ptrdiff_t" >&5
12906 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12907   echo $ac_n "(cached) $ac_c" 1>&6
12908 else
12909   cat > conftest.$ac_ext <<EOF
12910 #line 12911 "configure"
12911 #include "confdefs.h"
12912 #include <stddef.h>
12913 int main() {
12914 ptrdiff_t p
12915 ; return 0; }
12916 EOF
12917 if { (eval echo configure:12918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12918   rm -rf conftest*
12919   am_cv_type_ptrdiff_t=yes
12920 else
12921   echo "configure: failed program was:" >&5
12922   cat conftest.$ac_ext >&5
12923   rm -rf conftest*
12924   am_cv_type_ptrdiff_t=no
12925 fi
12926 rm -f conftest*
12927 fi
12928
12929 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12930    if test $am_cv_type_ptrdiff_t = yes; then
12931      cat >> confdefs.h <<\EOF
12932 #define HAVE_PTRDIFF_T 1
12933 EOF
12934
12935    fi
12936
12937 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12938 echo "configure:12939: checking return type of signal handlers" >&5
12939 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12940   echo $ac_n "(cached) $ac_c" 1>&6
12941 else
12942   cat > conftest.$ac_ext <<EOF
12943 #line 12944 "configure"
12944 #include "confdefs.h"
12945 #include <sys/types.h>
12946 #include <signal.h>
12947 #ifdef signal
12948 #undef signal
12949 #endif
12950 #ifdef __cplusplus
12951 extern "C" void (*signal (int, void (*)(int)))(int);
12952 #else
12953 void (*signal ()) ();
12954 #endif
12955
12956 int main() {
12957 int i;
12958 ; return 0; }
12959 EOF
12960 if { (eval echo configure:12961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12961   rm -rf conftest*
12962   ac_cv_type_signal=void
12963 else
12964   echo "configure: failed program was:" >&5
12965   cat conftest.$ac_ext >&5
12966   rm -rf conftest*
12967   ac_cv_type_signal=int
12968 fi
12969 rm -f conftest*
12970 fi
12971
12972 echo "$ac_t""$ac_cv_type_signal" 1>&6
12973 cat >> confdefs.h <<EOF
12974 #define RETSIGTYPE $ac_cv_type_signal
12975 EOF
12976
12977
12978 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12979 echo "configure:12980: checking for sig_atomic_t" >&5
12980 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12981   echo $ac_n "(cached) $ac_c" 1>&6
12982 else
12983   cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 #include <signal.h>
12987 int main() {
12988 sig_atomic_t atomic;
12989 ; return 0; }
12990 EOF
12991 if { (eval echo configure:12992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12992   rm -rf conftest*
12993   ol_cv_type_sig_atomic_t=yes
12994 else
12995   echo "configure: failed program was:" >&5
12996   cat conftest.$ac_ext >&5
12997   rm -rf conftest*
12998   ol_cv_type_sig_atomic_t=no
12999 fi
13000 rm -f conftest*
13001 fi
13002
13003 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13004   if test $ol_cv_type_sig_atomic_t = no; then
13005     cat >> confdefs.h <<\EOF
13006 #define sig_atomic_t int
13007 EOF
13008
13009   fi
13010  
13011 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13012 echo "configure:13013: checking for size_t" >&5
13013 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13014   echo $ac_n "(cached) $ac_c" 1>&6
13015 else
13016   cat > conftest.$ac_ext <<EOF
13017 #line 13018 "configure"
13018 #include "confdefs.h"
13019 #include <sys/types.h>
13020 #if STDC_HEADERS
13021 #include <stdlib.h>
13022 #include <stddef.h>
13023 #endif
13024 EOF
13025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13026   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13027   rm -rf conftest*
13028   eval "ac_cv_type_size_t=yes"
13029 else
13030   rm -rf conftest*
13031   eval "ac_cv_type_size_t=no"
13032 fi
13033 rm -f conftest*
13034
13035 fi
13036 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13037   echo "$ac_t""yes" 1>&6
13038 else
13039   echo "$ac_t""no" 1>&6
13040   cat >> confdefs.h <<EOF
13041 #define size_t unsigned
13042 EOF
13043
13044 fi
13045
13046 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13047 echo "configure:13048: checking for socklen_t" >&5
13048 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13049   echo $ac_n "(cached) $ac_c" 1>&6
13050 else
13051   cat > conftest.$ac_ext <<EOF
13052 #line 13053 "configure"
13053 #include "confdefs.h"
13054
13055 #ifdef HAVE_SYS_TYPES_H
13056 #include <sys/types.h>
13057 #endif
13058 #ifdef HAVE_SYS_SOCKET_H
13059 #include <sys/socket.h>
13060 #endif
13061
13062 int main() {
13063 socklen_t len;
13064 ; return 0; }
13065 EOF
13066 if { (eval echo configure:13067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13067   rm -rf conftest*
13068   ol_cv_type_socklen_t=yes
13069 else
13070   echo "configure: failed program was:" >&5
13071   cat conftest.$ac_ext >&5
13072   rm -rf conftest*
13073   ol_cv_type_socklen_t=no
13074 fi
13075 rm -f conftest*
13076 fi
13077
13078 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13079   if test $ol_cv_type_socklen_t = no; then
13080     cat >> confdefs.h <<\EOF
13081 #define socklen_t int
13082 EOF
13083
13084   fi
13085  
13086 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13087 echo "configure:13088: checking for member st_blksize in aggregate type struct stat" >&5
13088 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13089   echo $ac_n "(cached) $ac_c" 1>&6
13090 else
13091   cat > conftest.$ac_ext <<EOF
13092 #line 13093 "configure"
13093 #include "confdefs.h"
13094 #include <sys/types.h>
13095 #include <sys/stat.h>
13096 int main() {
13097 struct stat foo; foo.st_blksize;
13098 ; return 0; }
13099 EOF
13100 if { (eval echo configure:13101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13101   rm -rf conftest*
13102   ac_cv_c_struct_member_st_blksize=yes
13103 else
13104   echo "configure: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   rm -rf conftest*
13107   ac_cv_c_struct_member_st_blksize=no
13108 fi
13109 rm -f conftest*
13110 fi
13111
13112 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13113 st_blksize="$ac_cv_c_struct_member_st_blksize"
13114 if test $ac_cv_c_struct_member_st_blksize = yes; then
13115   cat >> confdefs.h <<\EOF
13116 #define HAVE_ST_BLKSIZE 1
13117 EOF
13118
13119 fi
13120
13121 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13122 echo "configure:13123: checking whether time.h and sys/time.h may both be included" >&5
13123 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13124   echo $ac_n "(cached) $ac_c" 1>&6
13125 else
13126   cat > conftest.$ac_ext <<EOF
13127 #line 13128 "configure"
13128 #include "confdefs.h"
13129 #include <sys/types.h>
13130 #include <sys/time.h>
13131 #include <time.h>
13132 int main() {
13133 struct tm *tp;
13134 ; return 0; }
13135 EOF
13136 if { (eval echo configure:13137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13137   rm -rf conftest*
13138   ac_cv_header_time=yes
13139 else
13140   echo "configure: failed program was:" >&5
13141   cat conftest.$ac_ext >&5
13142   rm -rf conftest*
13143   ac_cv_header_time=no
13144 fi
13145 rm -f conftest*
13146 fi
13147
13148 echo "$ac_t""$ac_cv_header_time" 1>&6
13149 if test $ac_cv_header_time = yes; then
13150   cat >> confdefs.h <<\EOF
13151 #define TIME_WITH_SYS_TIME 1
13152 EOF
13153
13154 fi
13155
13156 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13157 echo "configure:13158: checking whether struct tm is in sys/time.h or time.h" >&5
13158 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13159   echo $ac_n "(cached) $ac_c" 1>&6
13160 else
13161   cat > conftest.$ac_ext <<EOF
13162 #line 13163 "configure"
13163 #include "confdefs.h"
13164 #include <sys/types.h>
13165 #include <time.h>
13166 int main() {
13167 struct tm *tp; tp->tm_sec;
13168 ; return 0; }
13169 EOF
13170 if { (eval echo configure:13171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13171   rm -rf conftest*
13172   ac_cv_struct_tm=time.h
13173 else
13174   echo "configure: failed program was:" >&5
13175   cat conftest.$ac_ext >&5
13176   rm -rf conftest*
13177   ac_cv_struct_tm=sys/time.h
13178 fi
13179 rm -f conftest*
13180 fi
13181
13182 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13183 if test $ac_cv_struct_tm = sys/time.h; then
13184   cat >> confdefs.h <<\EOF
13185 #define TM_IN_SYS_TIME 1
13186 EOF
13187
13188 fi
13189
13190 # test for pw_gecos in struct passwd
13191 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13192 echo "configure:13193: checking struct passwd for pw_gecos" >&5
13193 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13194   echo $ac_n "(cached) $ac_c" 1>&6
13195 else
13196   
13197         cat > conftest.$ac_ext <<EOF
13198 #line 13199 "configure"
13199 #include "confdefs.h"
13200 #include <pwd.h>
13201 int main() {
13202
13203         struct passwd pwd;
13204         pwd.pw_gecos = pwd.pw_name;
13205
13206 ; return 0; }
13207 EOF
13208 if { (eval echo configure:13209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13209   rm -rf conftest*
13210   ol_cv_struct_passwd_pw_gecos=yes
13211 else
13212   echo "configure: failed program was:" >&5
13213   cat conftest.$ac_ext >&5
13214   rm -rf conftest*
13215   ol_cv_struct_passwd_pw_gecos=no
13216 fi
13217 rm -f conftest*
13218 fi
13219
13220 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13221 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13222         cat >> confdefs.h <<\EOF
13223 #define HAVE_PW_GECOS 1
13224 EOF
13225
13226 fi
13227
13228 # test for pw_passwd in struct passwd
13229 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13230 echo "configure:13231: checking struct passwd for pw_passwd" >&5
13231 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13232   echo $ac_n "(cached) $ac_c" 1>&6
13233 else
13234   
13235         cat > conftest.$ac_ext <<EOF
13236 #line 13237 "configure"
13237 #include "confdefs.h"
13238 #include <pwd.h>
13239 int main() {
13240
13241         struct passwd pwd;
13242         pwd.pw_passwd = pwd.pw_name;
13243
13244 ; return 0; }
13245 EOF
13246 if { (eval echo configure:13247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13247   rm -rf conftest*
13248   ol_cv_struct_passwd_pw_passwd=yes
13249 else
13250   echo "configure: failed program was:" >&5
13251   cat conftest.$ac_ext >&5
13252   rm -rf conftest*
13253   ol_cv_struct_passwd_pw_passwd=no
13254 fi
13255 rm -f conftest*
13256 fi
13257
13258 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13259 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13260         cat >> confdefs.h <<\EOF
13261 #define HAVE_PW_PASSWD 1
13262 EOF
13263
13264 fi
13265
13266
13267 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13268 echo "configure:13269: checking if toupper() requires islower()" >&5
13269 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13270   echo $ac_n "(cached) $ac_c" 1>&6
13271 else
13272   
13273         if test "$cross_compiling" = yes; then
13274   ol_cv_c_upper_lower=safe
13275 else
13276   cat > conftest.$ac_ext <<EOF
13277 #line 13278 "configure"
13278 #include "confdefs.h"
13279
13280 #include <ctype.h>
13281 main()
13282 {
13283         if ('C' == toupper('C'))
13284                 exit(0);
13285         else
13286                 exit(1);
13287 }
13288 EOF
13289 if { (eval echo configure:13290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13290 then
13291   ol_cv_c_upper_lower=no
13292 else
13293   echo "configure: failed program was:" >&5
13294   cat conftest.$ac_ext >&5
13295   rm -fr conftest*
13296   ol_cv_c_upper_lower=yes
13297 fi
13298 rm -fr conftest*
13299 fi
13300
13301 fi
13302
13303 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13304 if test $ol_cv_c_upper_lower != no ; then
13305         cat >> confdefs.h <<\EOF
13306 #define C_UPPER_LOWER 1
13307 EOF
13308
13309 fi
13310
13311 echo $ac_n "checking for working const""... $ac_c" 1>&6
13312 echo "configure:13313: checking for working const" >&5
13313 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13314   echo $ac_n "(cached) $ac_c" 1>&6
13315 else
13316   cat > conftest.$ac_ext <<EOF
13317 #line 13318 "configure"
13318 #include "confdefs.h"
13319
13320 int main() {
13321
13322 /* Ultrix mips cc rejects this.  */
13323 typedef int charset[2]; const charset x;
13324 /* SunOS 4.1.1 cc rejects this.  */
13325 char const *const *ccp;
13326 char **p;
13327 /* NEC SVR4.0.2 mips cc rejects this.  */
13328 struct point {int x, y;};
13329 static struct point const zero = {0,0};
13330 /* AIX XL C 1.02.0.0 rejects this.
13331    It does not let you subtract one const X* pointer from another in an arm
13332    of an if-expression whose if-part is not a constant expression */
13333 const char *g = "string";
13334 ccp = &g + (g ? g-g : 0);
13335 /* HPUX 7.0 cc rejects these. */
13336 ++ccp;
13337 p = (char**) ccp;
13338 ccp = (char const *const *) p;
13339 { /* SCO 3.2v4 cc rejects this.  */
13340   char *t;
13341   char const *s = 0 ? (char *) 0 : (char const *) 0;
13342
13343   *t++ = 0;
13344 }
13345 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13346   int x[] = {25, 17};
13347   const int *foo = &x[0];
13348   ++foo;
13349 }
13350 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13351   typedef const int *iptr;
13352   iptr p = 0;
13353   ++p;
13354 }
13355 { /* AIX XL C 1.02.0.0 rejects this saying
13356      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13357   struct s { int j; const int *ap[3]; };
13358   struct s *b; b->j = 5;
13359 }
13360 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13361   const int foo = 10;
13362 }
13363
13364 ; return 0; }
13365 EOF
13366 if { (eval echo configure:13367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13367   rm -rf conftest*
13368   ac_cv_c_const=yes
13369 else
13370   echo "configure: failed program was:" >&5
13371   cat conftest.$ac_ext >&5
13372   rm -rf conftest*
13373   ac_cv_c_const=no
13374 fi
13375 rm -f conftest*
13376 fi
13377
13378 echo "$ac_t""$ac_cv_c_const" 1>&6
13379 if test $ac_cv_c_const = no; then
13380   cat >> confdefs.h <<\EOF
13381 #define const 
13382 EOF
13383
13384 fi
13385
13386 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13387 echo "configure:13388: checking if compiler understands volatile" >&5
13388 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13389   echo $ac_n "(cached) $ac_c" 1>&6
13390 else
13391   cat > conftest.$ac_ext <<EOF
13392 #line 13393 "configure"
13393 #include "confdefs.h"
13394 int x, y, z;
13395 int main() {
13396 volatile int a; int * volatile b = x ? &y : &z;
13397       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13398       *b = 0;
13399 ; return 0; }
13400 EOF
13401 if { (eval echo configure:13402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13402   rm -rf conftest*
13403   ol_cv_c_volatile=yes
13404 else
13405   echo "configure: failed program was:" >&5
13406   cat conftest.$ac_ext >&5
13407   rm -rf conftest*
13408   ol_cv_c_volatile=no
13409 fi
13410 rm -f conftest*
13411 fi
13412
13413 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13414   if test $ol_cv_c_volatile = yes; then
13415     : 
13416   else
13417     cat >> confdefs.h <<\EOF
13418 #define volatile 
13419 EOF
13420
13421   fi
13422  
13423
13424 if test $cross_compiling = yes ; then
13425         cat >> confdefs.h <<\EOF
13426 #define CROSS_COMPILING 1
13427 EOF
13428
13429
13430         cat >> confdefs.h <<\EOF
13431 #define LBER_INT_T long
13432 EOF
13433
13434         cat >> confdefs.h <<\EOF
13435 #define LBER_TAG_T long
13436 EOF
13437
13438         cat >> confdefs.h <<\EOF
13439 #define LBER_SOCKET_T int
13440 EOF
13441
13442
13443 else
13444         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13445 echo "configure:13446: checking whether byte ordering is bigendian" >&5
13446 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13447   echo $ac_n "(cached) $ac_c" 1>&6
13448 else
13449   ac_cv_c_bigendian=unknown
13450 # See if sys/param.h defines the BYTE_ORDER macro.
13451 cat > conftest.$ac_ext <<EOF
13452 #line 13453 "configure"
13453 #include "confdefs.h"
13454 #include <sys/types.h>
13455 #include <sys/param.h>
13456 int main() {
13457
13458 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13459  bogus endian macros
13460 #endif
13461 ; return 0; }
13462 EOF
13463 if { (eval echo configure:13464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13464   rm -rf conftest*
13465   # It does; now see whether it defined to BIG_ENDIAN or not.
13466 cat > conftest.$ac_ext <<EOF
13467 #line 13468 "configure"
13468 #include "confdefs.h"
13469 #include <sys/types.h>
13470 #include <sys/param.h>
13471 int main() {
13472
13473 #if BYTE_ORDER != BIG_ENDIAN
13474  not big endian
13475 #endif
13476 ; return 0; }
13477 EOF
13478 if { (eval echo configure:13479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13479   rm -rf conftest*
13480   ac_cv_c_bigendian=yes
13481 else
13482   echo "configure: failed program was:" >&5
13483   cat conftest.$ac_ext >&5
13484   rm -rf conftest*
13485   ac_cv_c_bigendian=no
13486 fi
13487 rm -f conftest*
13488 else
13489   echo "configure: failed program was:" >&5
13490   cat conftest.$ac_ext >&5
13491 fi
13492 rm -f conftest*
13493 if test $ac_cv_c_bigendian = unknown; then
13494 if test "$cross_compiling" = yes; then
13495     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13496 else
13497   cat > conftest.$ac_ext <<EOF
13498 #line 13499 "configure"
13499 #include "confdefs.h"
13500 main () {
13501   /* Are we little or big endian?  From Harbison&Steele.  */
13502   union
13503   {
13504     long l;
13505     char c[sizeof (long)];
13506   } u;
13507   u.l = 1;
13508   exit (u.c[sizeof (long) - 1] == 1);
13509 }
13510 EOF
13511 if { (eval echo configure:13512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13512 then
13513   ac_cv_c_bigendian=no
13514 else
13515   echo "configure: failed program was:" >&5
13516   cat conftest.$ac_ext >&5
13517   rm -fr conftest*
13518   ac_cv_c_bigendian=yes
13519 fi
13520 rm -fr conftest*
13521 fi
13522
13523 fi
13524 fi
13525
13526 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13527 if test $ac_cv_c_bigendian = yes; then
13528   cat >> confdefs.h <<\EOF
13529 #define WORDS_BIGENDIAN 1
13530 EOF
13531
13532 fi
13533
13534         echo $ac_n "checking size of short""... $ac_c" 1>&6
13535 echo "configure:13536: checking size of short" >&5
13536 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13537   echo $ac_n "(cached) $ac_c" 1>&6
13538 else
13539   if test "$cross_compiling" = yes; then
13540     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13541 else
13542   cat > conftest.$ac_ext <<EOF
13543 #line 13544 "configure"
13544 #include "confdefs.h"
13545 #include <stdio.h>
13546 main()
13547 {
13548   FILE *f=fopen("conftestval", "w");
13549   if (!f) exit(1);
13550   fprintf(f, "%d\n", sizeof(short));
13551   exit(0);
13552 }
13553 EOF
13554 if { (eval echo configure:13555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13555 then
13556   ac_cv_sizeof_short=`cat conftestval`
13557 else
13558   echo "configure: failed program was:" >&5
13559   cat conftest.$ac_ext >&5
13560   rm -fr conftest*
13561   ac_cv_sizeof_short=0
13562 fi
13563 rm -fr conftest*
13564 fi
13565
13566 fi
13567 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13568 cat >> confdefs.h <<EOF
13569 #define SIZEOF_SHORT $ac_cv_sizeof_short
13570 EOF
13571
13572  
13573         echo $ac_n "checking size of int""... $ac_c" 1>&6
13574 echo "configure:13575: checking size of int" >&5
13575 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13576   echo $ac_n "(cached) $ac_c" 1>&6
13577 else
13578   if test "$cross_compiling" = yes; then
13579     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13580 else
13581   cat > conftest.$ac_ext <<EOF
13582 #line 13583 "configure"
13583 #include "confdefs.h"
13584 #include <stdio.h>
13585 main()
13586 {
13587   FILE *f=fopen("conftestval", "w");
13588   if (!f) exit(1);
13589   fprintf(f, "%d\n", sizeof(int));
13590   exit(0);
13591 }
13592 EOF
13593 if { (eval echo configure:13594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13594 then
13595   ac_cv_sizeof_int=`cat conftestval`
13596 else
13597   echo "configure: failed program was:" >&5
13598   cat conftest.$ac_ext >&5
13599   rm -fr conftest*
13600   ac_cv_sizeof_int=0
13601 fi
13602 rm -fr conftest*
13603 fi
13604
13605 fi
13606 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13607 cat >> confdefs.h <<EOF
13608 #define SIZEOF_INT $ac_cv_sizeof_int
13609 EOF
13610
13611  
13612         echo $ac_n "checking size of long""... $ac_c" 1>&6
13613 echo "configure:13614: checking size of long" >&5
13614 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13615   echo $ac_n "(cached) $ac_c" 1>&6
13616 else
13617   if test "$cross_compiling" = yes; then
13618     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13619 else
13620   cat > conftest.$ac_ext <<EOF
13621 #line 13622 "configure"
13622 #include "confdefs.h"
13623 #include <stdio.h>
13624 main()
13625 {
13626   FILE *f=fopen("conftestval", "w");
13627   if (!f) exit(1);
13628   fprintf(f, "%d\n", sizeof(long));
13629   exit(0);
13630 }
13631 EOF
13632 if { (eval echo configure:13633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13633 then
13634   ac_cv_sizeof_long=`cat conftestval`
13635 else
13636   echo "configure: failed program was:" >&5
13637   cat conftest.$ac_ext >&5
13638   rm -fr conftest*
13639   ac_cv_sizeof_long=0
13640 fi
13641 rm -fr conftest*
13642 fi
13643
13644 fi
13645 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13646 cat >> confdefs.h <<EOF
13647 #define SIZEOF_LONG $ac_cv_sizeof_long
13648 EOF
13649
13650
13651
13652         if test "$ac_cv_sizeof_int" -lt 4 ; then
13653                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13654
13655                 cat >> confdefs.h <<\EOF
13656 #define LBER_INT_T long
13657 EOF
13658
13659                 cat >> confdefs.h <<\EOF
13660 #define LBER_TAG_T long
13661 EOF
13662
13663                 cat >> confdefs.h <<\EOF
13664 #define LBER_SOCKET_T int
13665 EOF
13666
13667         else
13668                 cat >> confdefs.h <<\EOF
13669 #define LBER_INT_T int
13670 EOF
13671
13672                 cat >> confdefs.h <<\EOF
13673 #define LBER_TAG_T long
13674 EOF
13675
13676                 cat >> confdefs.h <<\EOF
13677 #define LBER_SOCKET_T int
13678 EOF
13679
13680         fi
13681 fi
13682
13683 cat >> confdefs.h <<\EOF
13684 #define LBER_LEN_T long
13685 EOF
13686
13687
13688 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13689 echo "configure:13690: checking for 8-bit clean memcmp" >&5
13690 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13691   echo $ac_n "(cached) $ac_c" 1>&6
13692 else
13693   if test "$cross_compiling" = yes; then
13694   ac_cv_func_memcmp_clean=no
13695 else
13696   cat > conftest.$ac_ext <<EOF
13697 #line 13698 "configure"
13698 #include "confdefs.h"
13699
13700 main()
13701 {
13702   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13703   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13704 }
13705
13706 EOF
13707 if { (eval echo configure:13708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13708 then
13709   ac_cv_func_memcmp_clean=yes
13710 else
13711   echo "configure: failed program was:" >&5
13712   cat conftest.$ac_ext >&5
13713   rm -fr conftest*
13714   ac_cv_func_memcmp_clean=no
13715 fi
13716 rm -fr conftest*
13717 fi
13718
13719 fi
13720
13721 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13722 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13723
13724 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13725 echo "configure:13726: checking for strftime" >&5
13726 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13727   echo $ac_n "(cached) $ac_c" 1>&6
13728 else
13729   cat > conftest.$ac_ext <<EOF
13730 #line 13731 "configure"
13731 #include "confdefs.h"
13732 /* System header to define __stub macros and hopefully few prototypes,
13733     which can conflict with char strftime(); below.  */
13734 #include <assert.h>
13735 /* Override any gcc2 internal prototype to avoid an error.  */
13736 /* We use char because int might match the return type of a gcc2
13737     builtin and then its argument prototype would still apply.  */
13738 char strftime();
13739 char (*f)();
13740
13741 int main() {
13742
13743 /* The GNU C library defines this for functions which it implements
13744     to always fail with ENOSYS.  Some functions are actually named
13745     something starting with __ and the normal name is an alias.  */
13746 #if defined (__stub_strftime) || defined (__stub___strftime)
13747 choke me
13748 #else
13749 f = strftime;
13750 #endif
13751
13752 ; return 0; }
13753 EOF
13754 if { (eval echo configure:13755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13755   rm -rf conftest*
13756   eval "ac_cv_func_strftime=yes"
13757 else
13758   echo "configure: failed program was:" >&5
13759   cat conftest.$ac_ext >&5
13760   rm -rf conftest*
13761   eval "ac_cv_func_strftime=no"
13762 fi
13763 rm -f conftest*
13764 fi
13765
13766 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13767   echo "$ac_t""yes" 1>&6
13768   cat >> confdefs.h <<\EOF
13769 #define HAVE_STRFTIME 1
13770 EOF
13771
13772 else
13773   echo "$ac_t""no" 1>&6
13774 # strftime is in -lintl on SCO UNIX.
13775 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13776 echo "configure:13777: checking for strftime in -lintl" >&5
13777 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13779   echo $ac_n "(cached) $ac_c" 1>&6
13780 else
13781   ac_save_LIBS="$LIBS"
13782 LIBS="-lintl  $LIBS"
13783 cat > conftest.$ac_ext <<EOF
13784 #line 13785 "configure"
13785 #include "confdefs.h"
13786 /* Override any gcc2 internal prototype to avoid an error.  */
13787 /* We use char because int might match the return type of a gcc2
13788     builtin and then its argument prototype would still apply.  */
13789 char strftime();
13790
13791 int main() {
13792 strftime()
13793 ; return 0; }
13794 EOF
13795 if { (eval echo configure:13796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13796   rm -rf conftest*
13797   eval "ac_cv_lib_$ac_lib_var=yes"
13798 else
13799   echo "configure: failed program was:" >&5
13800   cat conftest.$ac_ext >&5
13801   rm -rf conftest*
13802   eval "ac_cv_lib_$ac_lib_var=no"
13803 fi
13804 rm -f conftest*
13805 LIBS="$ac_save_LIBS"
13806
13807 fi
13808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13809   echo "$ac_t""yes" 1>&6
13810   cat >> confdefs.h <<\EOF
13811 #define HAVE_STRFTIME 1
13812 EOF
13813
13814 LIBS="-lintl $LIBS"
13815 else
13816   echo "$ac_t""no" 1>&6
13817 fi
13818
13819 fi
13820
13821
13822 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13823 echo "configure:13824: checking for inet_aton()" >&5
13824 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13825   echo $ac_n "(cached) $ac_c" 1>&6
13826 else
13827   cat > conftest.$ac_ext <<EOF
13828 #line 13829 "configure"
13829 #include "confdefs.h"
13830
13831 #ifdef HAVE_SYS_TYPES_H
13832 #       include <sys/types.h>
13833 #endif
13834 #ifdef HAVE_SYS_SOCKET_H
13835 #       include <sys/socket.h>
13836 #       ifdef HAVE_SYS_SELECT_H
13837 #               include <sys/select.h>
13838 #       endif
13839 #       include <netinet/in.h>
13840 #       ifdef HAVE_ARPA_INET_H
13841 #               include <arpa/inet.h>
13842 #       endif
13843 #endif
13844
13845 int main() {
13846 struct in_addr in;
13847 int rc = inet_aton( "255.255.255.255", &in );
13848 ; return 0; }
13849 EOF
13850 if { (eval echo configure:13851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13851   rm -rf conftest*
13852   ol_cv_func_inet_aton=yes
13853 else
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -rf conftest*
13857   ol_cv_func_inet_aton=no
13858 fi
13859 rm -f conftest*
13860 fi
13861
13862 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13863   if test $ol_cv_func_inet_aton != no; then
13864     cat >> confdefs.h <<\EOF
13865 #define HAVE_INET_ATON 1
13866 EOF
13867
13868   fi
13869  
13870
13871 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13872 echo "configure:13873: checking for vprintf" >&5
13873 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13874   echo $ac_n "(cached) $ac_c" 1>&6
13875 else
13876   cat > conftest.$ac_ext <<EOF
13877 #line 13878 "configure"
13878 #include "confdefs.h"
13879 /* System header to define __stub macros and hopefully few prototypes,
13880     which can conflict with char vprintf(); below.  */
13881 #include <assert.h>
13882 /* Override any gcc2 internal prototype to avoid an error.  */
13883 /* We use char because int might match the return type of a gcc2
13884     builtin and then its argument prototype would still apply.  */
13885 char vprintf();
13886 char (*f)();
13887
13888 int main() {
13889
13890 /* The GNU C library defines this for functions which it implements
13891     to always fail with ENOSYS.  Some functions are actually named
13892     something starting with __ and the normal name is an alias.  */
13893 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13894 choke me
13895 #else
13896 f = vprintf;
13897 #endif
13898
13899 ; return 0; }
13900 EOF
13901 if { (eval echo configure:13902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13902   rm -rf conftest*
13903   eval "ac_cv_func_vprintf=yes"
13904 else
13905   echo "configure: failed program was:" >&5
13906   cat conftest.$ac_ext >&5
13907   rm -rf conftest*
13908   eval "ac_cv_func_vprintf=no"
13909 fi
13910 rm -f conftest*
13911 fi
13912
13913 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13914   echo "$ac_t""yes" 1>&6
13915   cat >> confdefs.h <<\EOF
13916 #define HAVE_VPRINTF 1
13917 EOF
13918
13919 else
13920   echo "$ac_t""no" 1>&6
13921 fi
13922
13923 if test "$ac_cv_func_vprintf" != yes; then
13924 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13925 echo "configure:13926: checking for _doprnt" >&5
13926 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13927   echo $ac_n "(cached) $ac_c" 1>&6
13928 else
13929   cat > conftest.$ac_ext <<EOF
13930 #line 13931 "configure"
13931 #include "confdefs.h"
13932 /* System header to define __stub macros and hopefully few prototypes,
13933     which can conflict with char _doprnt(); below.  */
13934 #include <assert.h>
13935 /* Override any gcc2 internal prototype to avoid an error.  */
13936 /* We use char because int might match the return type of a gcc2
13937     builtin and then its argument prototype would still apply.  */
13938 char _doprnt();
13939 char (*f)();
13940
13941 int main() {
13942
13943 /* The GNU C library defines this for functions which it implements
13944     to always fail with ENOSYS.  Some functions are actually named
13945     something starting with __ and the normal name is an alias.  */
13946 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13947 choke me
13948 #else
13949 f = _doprnt;
13950 #endif
13951
13952 ; return 0; }
13953 EOF
13954 if { (eval echo configure:13955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13955   rm -rf conftest*
13956   eval "ac_cv_func__doprnt=yes"
13957 else
13958   echo "configure: failed program was:" >&5
13959   cat conftest.$ac_ext >&5
13960   rm -rf conftest*
13961   eval "ac_cv_func__doprnt=no"
13962 fi
13963 rm -f conftest*
13964 fi
13965
13966 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13967   echo "$ac_t""yes" 1>&6
13968   cat >> confdefs.h <<\EOF
13969 #define HAVE_DOPRNT 1
13970 EOF
13971
13972 else
13973   echo "$ac_t""no" 1>&6
13974 fi
13975
13976 fi
13977
13978
13979 if test $ac_cv_func_vprintf = yes ; then
13980                 for ac_func in vsnprintf vsprintf
13981 do
13982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13983 echo "configure:13984: checking for $ac_func" >&5
13984 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13985   echo $ac_n "(cached) $ac_c" 1>&6
13986 else
13987   cat > conftest.$ac_ext <<EOF
13988 #line 13989 "configure"
13989 #include "confdefs.h"
13990 /* System header to define __stub macros and hopefully few prototypes,
13991     which can conflict with char $ac_func(); below.  */
13992 #include <assert.h>
13993 /* Override any gcc2 internal prototype to avoid an error.  */
13994 /* We use char because int might match the return type of a gcc2
13995     builtin and then its argument prototype would still apply.  */
13996 char $ac_func();
13997 char (*f)();
13998
13999 int main() {
14000
14001 /* The GNU C library defines this for functions which it implements
14002     to always fail with ENOSYS.  Some functions are actually named
14003     something starting with __ and the normal name is an alias.  */
14004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14005 choke me
14006 #else
14007 f = $ac_func;
14008 #endif
14009
14010 ; return 0; }
14011 EOF
14012 if { (eval echo configure:14013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14013   rm -rf conftest*
14014   eval "ac_cv_func_$ac_func=yes"
14015 else
14016   echo "configure: failed program was:" >&5
14017   cat conftest.$ac_ext >&5
14018   rm -rf conftest*
14019   eval "ac_cv_func_$ac_func=no"
14020 fi
14021 rm -f conftest*
14022 fi
14023
14024 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14025   echo "$ac_t""yes" 1>&6
14026     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14027   cat >> confdefs.h <<EOF
14028 #define $ac_tr_func 1
14029 EOF
14030  
14031 else
14032   echo "$ac_t""no" 1>&6
14033 fi
14034 done
14035
14036 fi
14037
14038 for ac_func in \
14039         bcopy                   \
14040         closesocket             \
14041         endgrent                \
14042         endpwent                \
14043         flock                   \
14044         getdtablesize   \
14045         getgrgid                \
14046         gethostname             \
14047         getpass                 \
14048         getpwuid                \
14049         getpwnam                \
14050         getspnam                \
14051         gettimeofday    \
14052         initgroups              \
14053         lockf                   \
14054         memcpy                  \
14055         memmove                 \
14056         mkstemp                 \
14057         pipe                    \
14058         read                    \
14059         recv                    \
14060         recvfrom                \
14061         setpwfile               \
14062         setgid                  \
14063         setegid                 \
14064         setsid                  \
14065         setuid                  \
14066         seteuid                 \
14067         sigaction               \
14068         signal                  \
14069         sigset                  \
14070         snprintf                \
14071         strdup                  \
14072         strerror                \
14073         strpbrk                 \
14074         strrchr                 \
14075         strsep                  \
14076         strstr                  \
14077         strtol                  \
14078         strtoul                 \
14079         strspn                  \
14080         sysconf                 \
14081         waitpid                 \
14082         wait4                   \
14083         write                   \
14084         send                    \
14085         sendto                  \
14086
14087 do
14088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14089 echo "configure:14090: checking for $ac_func" >&5
14090 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14091   echo $ac_n "(cached) $ac_c" 1>&6
14092 else
14093   cat > conftest.$ac_ext <<EOF
14094 #line 14095 "configure"
14095 #include "confdefs.h"
14096 /* System header to define __stub macros and hopefully few prototypes,
14097     which can conflict with char $ac_func(); below.  */
14098 #include <assert.h>
14099 /* Override any gcc2 internal prototype to avoid an error.  */
14100 /* We use char because int might match the return type of a gcc2
14101     builtin and then its argument prototype would still apply.  */
14102 char $ac_func();
14103 char (*f)();
14104
14105 int main() {
14106
14107 /* The GNU C library defines this for functions which it implements
14108     to always fail with ENOSYS.  Some functions are actually named
14109     something starting with __ and the normal name is an alias.  */
14110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14111 choke me
14112 #else
14113 f = $ac_func;
14114 #endif
14115
14116 ; return 0; }
14117 EOF
14118 if { (eval echo configure:14119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14119   rm -rf conftest*
14120   eval "ac_cv_func_$ac_func=yes"
14121 else
14122   echo "configure: failed program was:" >&5
14123   cat conftest.$ac_ext >&5
14124   rm -rf conftest*
14125   eval "ac_cv_func_$ac_func=no"
14126 fi
14127 rm -f conftest*
14128 fi
14129
14130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14131   echo "$ac_t""yes" 1>&6
14132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14133   cat >> confdefs.h <<EOF
14134 #define $ac_tr_func 1
14135 EOF
14136  
14137 else
14138   echo "$ac_t""no" 1>&6
14139 fi
14140 done
14141
14142
14143 for ac_func in getopt tempnam
14144 do
14145 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14146 echo "configure:14147: checking for $ac_func" >&5
14147 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14148   echo $ac_n "(cached) $ac_c" 1>&6
14149 else
14150   cat > conftest.$ac_ext <<EOF
14151 #line 14152 "configure"
14152 #include "confdefs.h"
14153 /* System header to define __stub macros and hopefully few prototypes,
14154     which can conflict with char $ac_func(); below.  */
14155 #include <assert.h>
14156 /* Override any gcc2 internal prototype to avoid an error.  */
14157 /* We use char because int might match the return type of a gcc2
14158     builtin and then its argument prototype would still apply.  */
14159 char $ac_func();
14160 char (*f)();
14161
14162 int main() {
14163
14164 /* The GNU C library defines this for functions which it implements
14165     to always fail with ENOSYS.  Some functions are actually named
14166     something starting with __ and the normal name is an alias.  */
14167 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14168 choke me
14169 #else
14170 f = $ac_func;
14171 #endif
14172
14173 ; return 0; }
14174 EOF
14175 if { (eval echo configure:14176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14176   rm -rf conftest*
14177   eval "ac_cv_func_$ac_func=yes"
14178 else
14179   echo "configure: failed program was:" >&5
14180   cat conftest.$ac_ext >&5
14181   rm -rf conftest*
14182   eval "ac_cv_func_$ac_func=no"
14183 fi
14184 rm -f conftest*
14185 fi
14186
14187 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14188   echo "$ac_t""yes" 1>&6
14189     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14190   cat >> confdefs.h <<EOF
14191 #define $ac_tr_func 1
14192 EOF
14193  
14194 else
14195   echo "$ac_t""no" 1>&6
14196 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14197 fi
14198 done
14199
14200
14201
14202 # Check Configuration
14203 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14204 echo "configure:14205: checking declaration of sys_errlist" >&5
14205 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14206   echo $ac_n "(cached) $ac_c" 1>&6
14207 else
14208   
14209         cat > conftest.$ac_ext <<EOF
14210 #line 14211 "configure"
14211 #include "confdefs.h"
14212
14213 #include <stdio.h>
14214 #include <sys/types.h>
14215 #include <errno.h> 
14216 int main() {
14217 char *c = (char *) *sys_errlist
14218 ; return 0; }
14219 EOF
14220 if { (eval echo configure:14221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14221   rm -rf conftest*
14222   ol_cv_dcl_sys_errlist=yes
14223         ol_cv_have_sys_errlist=yes
14224 else
14225   echo "configure: failed program was:" >&5
14226   cat conftest.$ac_ext >&5
14227   rm -rf conftest*
14228   ol_cv_dcl_sys_errlist=no
14229 fi
14230 rm -f conftest*
14231 fi
14232
14233 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14234 #
14235 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14236 if test $ol_cv_dcl_sys_errlist = no ; then
14237         cat >> confdefs.h <<\EOF
14238 #define DECL_SYS_ERRLIST 1
14239 EOF
14240
14241
14242         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14243 echo "configure:14244: checking existence of sys_errlist" >&5
14244 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14245   echo $ac_n "(cached) $ac_c" 1>&6
14246 else
14247   
14248                 cat > conftest.$ac_ext <<EOF
14249 #line 14250 "configure"
14250 #include "confdefs.h"
14251 #include <errno.h>
14252 int main() {
14253 char *c = (char *) *sys_errlist
14254 ; return 0; }
14255 EOF
14256 if { (eval echo configure:14257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14257   rm -rf conftest*
14258   ol_cv_have_sys_errlist=yes
14259 else
14260   echo "configure: failed program was:" >&5
14261   cat conftest.$ac_ext >&5
14262   rm -rf conftest*
14263   ol_cv_have_sys_errlist=no
14264 fi
14265 rm -f conftest*
14266 fi
14267
14268 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14269 fi
14270 if test $ol_cv_have_sys_errlist = yes ; then
14271         cat >> confdefs.h <<\EOF
14272 #define HAVE_SYS_ERRLIST 1
14273 EOF
14274
14275 fi
14276
14277
14278
14279 if test "$ol_enable_debug" != no ; then
14280         cat >> confdefs.h <<\EOF
14281 #define LDAP_DEBUG 1
14282 EOF
14283
14284 fi
14285 if test "$ol_enable_syslog" = yes ; then
14286         cat >> confdefs.h <<\EOF
14287 #define LDAP_SYSLOG 1
14288 EOF
14289
14290 fi
14291 if test "$ol_enable_libui" = yes ; then
14292         cat >> confdefs.h <<\EOF
14293 #define LDAP_LIBUI 1
14294 EOF
14295
14296 fi
14297 if test "$ol_enable_cache" = no ; then
14298         cat >> confdefs.h <<\EOF
14299 #define LDAP_NOCACHE 1
14300 EOF
14301
14302 fi
14303 if test "$ol_enable_dns" != no ; then
14304         cat >> confdefs.h <<\EOF
14305 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14306 EOF
14307
14308 fi
14309 if test "$ol_enable_proctitle" != no ; then
14310         cat >> confdefs.h <<\EOF
14311 #define LDAP_PROCTITLE 1
14312 EOF
14313
14314 fi
14315 if test "$ol_enable_referrals" != no ; then
14316         cat >> confdefs.h <<\EOF
14317 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14318 EOF
14319
14320 fi
14321 if test "$ol_enable_cldap" != no ; then
14322         cat >> confdefs.h <<\EOF
14323 #define LDAP_CONNECTIONLESS 1
14324 EOF
14325
14326 fi
14327
14328 if test "$ol_enable_crypt" != no ; then
14329         cat >> confdefs.h <<\EOF
14330 #define SLAPD_CRYPT 1
14331 EOF
14332
14333 fi
14334 if test "$ol_enable_cleartext" != no ; then
14335         cat >> confdefs.h <<\EOF
14336 #define SLAPD_CLEARTEXT 1
14337 EOF
14338
14339 fi
14340 if test "$ol_enable_multimaster" != no ; then
14341         cat >> confdefs.h <<\EOF
14342 #define SLAPD_MULTIMASTER 1
14343 EOF
14344
14345 fi
14346 if test "$ol_enable_phonetic" != no ; then
14347         cat >> confdefs.h <<\EOF
14348 #define SLAPD_PHONETIC 1
14349 EOF
14350
14351 fi
14352 if test "$ol_enable_rlookups" != no ; then
14353         cat >> confdefs.h <<\EOF
14354 #define SLAPD_RLOOKUPS 1
14355 EOF
14356
14357 fi
14358 if test "$ol_enable_aci" != no ; then
14359         cat >> confdefs.h <<\EOF
14360 #define SLAPD_ACI_ENABLED 1
14361 EOF
14362
14363 fi
14364 if test "$ol_enable_discreteaci" != no ; then
14365         cat >> confdefs.h <<\EOF
14366 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14367 EOF
14368
14369 fi
14370
14371 if test "$ol_link_modules" != no ; then
14372         cat >> confdefs.h <<\EOF
14373 #define SLAPD_MODULES 1
14374 EOF
14375
14376         BUILD_SLAPD=yes
14377         MODULES_LIBS=-lltdl
14378         SLAPD_MODULES_LDFLAGS="-dlopen self"
14379 fi
14380
14381 if test "$ol_link_bdb2" != no ; then
14382         cat >> confdefs.h <<\EOF
14383 #define SLAPD_BDB2 1
14384 EOF
14385
14386         BUILD_SLAPD=yes
14387         BUILD_BDB2=yes
14388         if test "$ol_with_bdb2_module" != static ; then
14389                 cat >> confdefs.h <<\EOF
14390 #define SLAPD_BDB2_DYNAMIC 1
14391 EOF
14392
14393                 BUILD_BDB2=mod
14394                 BUILD_BDB2_DYNAMIC=shared
14395                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14396         fi
14397 fi
14398
14399 if test "$ol_enable_ldap" != no ; then
14400         cat >> confdefs.h <<\EOF
14401 #define SLAPD_LDAP 1
14402 EOF
14403
14404         BUILD_SLAPD=yes
14405         BUILD_LDAP=yes
14406         if test "$ol_with_ldap_module" != static ; then
14407                 cat >> confdefs.h <<\EOF
14408 #define SLAPD_LDAP_DYNAMIC 1
14409 EOF
14410
14411                 BUILD_LDAP=mod
14412                 BUILD_LDAP_DYNAMIC=shared
14413                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14414         fi
14415 fi
14416
14417 if test "$ol_link_ldbm" != no ; then
14418         cat >> confdefs.h <<\EOF
14419 #define SLAPD_LDBM 1
14420 EOF
14421
14422         BUILD_SLAPD=yes
14423         BUILD_LDBM=yes
14424         if test "$ol_with_ldbm_module" != static ; then
14425                 cat >> confdefs.h <<\EOF
14426 #define SLAPD_LDBM_DYNAMIC 1
14427 EOF
14428
14429                 BUILD_LDBM=mod
14430                 BUILD_LDBM_DYNAMIC=shared
14431                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14432         fi
14433 fi
14434
14435 if test "$ol_enable_passwd" != no ; then
14436         cat >> confdefs.h <<\EOF
14437 #define SLAPD_PASSWD 1
14438 EOF
14439
14440         BUILD_SLAPD=yes
14441         BUILD_PASSWD=yes
14442         if test "$ol_with_passwd_module" != static ; then
14443                 cat >> confdefs.h <<\EOF
14444 #define SLAPD_PASSWD_DYNAMIC 1
14445 EOF
14446
14447                 BUILD_PASSWD=mod
14448                 BUILD_PASSWD_DYNAMIC=shared
14449                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14450         fi
14451 fi
14452
14453 if test "$ol_link_perl" != no ; then
14454         cat >> confdefs.h <<\EOF
14455 #define SLAPD_PERL 1
14456 EOF
14457
14458         BUILD_SLAPD=yes
14459         BUILD_PERL=yes
14460         if test "$ol_with_perl_module" != static ; then
14461                 cat >> confdefs.h <<\EOF
14462 #define SLAPD_PERL_DYNAMIC 1
14463 EOF
14464
14465                 BUILD_PERL=mod
14466                 BUILD_PERL_DYNAMIC=shared
14467                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14468         fi
14469 fi
14470
14471 if test "$ol_enable_shell" != no ; then
14472         cat >> confdefs.h <<\EOF
14473 #define SLAPD_SHELL 1
14474 EOF
14475
14476         BUILD_SLAPD=yes
14477         BUILD_SHELL=yes
14478         if test "$ol_with_shell_module" != static ; then
14479                 cat >> confdefs.h <<\EOF
14480 #define SLAPD_SHELL_DYNAMIC 1
14481 EOF
14482
14483                 BUILD_SHELL=mod
14484                 BUILD_SHELL_DYNAMIC=shared
14485                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14486         fi
14487 fi
14488
14489 if test "$ol_enable_tcl" != no ; then
14490         cat >> confdefs.h <<\EOF
14491 #define SLAPD_TCL 1
14492 EOF
14493
14494         BUILD_SLAPD=yes
14495         BUILD_TCL=yes
14496         if test "$ol_with_tcl_module" != static; then
14497                 cat >> confdefs.h <<\EOF
14498 #define SLAPD_TCL_DYNAMIC 1
14499 EOF
14500
14501                 BUILD_TCL=mod
14502                 BUILD_TCL_DYNAMIC=shared
14503                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14504         fi
14505 fi
14506
14507 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14508         $BUILD_SLAPD = yes ; then
14509         BUILD_SLURPD=yes
14510 fi
14511
14512 if test "$ol_link_isode" != no ; then
14513         BUILD_LDAPD=yes
14514 fi
14515
14516
14517
14518
14519   
14520   
14521   
14522   
14523   
14524   
14525   
14526   
14527   
14528   
14529   
14530   
14531   
14532   
14533   
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560 trap '' 1 2 15
14561
14562 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14563
14564 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14565 # Let make expand exec_prefix.
14566 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14567
14568 # Any assignment to VPATH causes Sun make to only execute
14569 # the first set of double-colon rules, so remove it if not needed.
14570 # If there is a colon in the path, we need to keep it.
14571 if test "x$srcdir" = x.; then
14572   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14573 fi
14574
14575 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14576
14577 DEFS=-DHAVE_CONFIG_H
14578
14579 # Without the "./", some shells look in PATH for config.status.
14580 : ${CONFIG_STATUS=./config.status}
14581
14582 echo creating $CONFIG_STATUS
14583 rm -f $CONFIG_STATUS
14584 cat > $CONFIG_STATUS <<EOF
14585 #! /bin/sh
14586 # Generated automatically by configure.
14587 # Run this file to recreate the current configuration.
14588 # This directory was configured as follows,
14589 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14590 #
14591 # $0 $ac_configure_args
14592 #
14593 # Compiler output produced by configure, useful for debugging
14594 # configure, is in ./config.log if it exists.
14595
14596 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14597 for ac_option
14598 do
14599   case "\$ac_option" in
14600   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14601     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14602     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14603   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14604     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14605     exit 0 ;;
14606   -help | --help | --hel | --he | --h)
14607     echo "\$ac_cs_usage"; exit 0 ;;
14608   *) echo "\$ac_cs_usage"; exit 1 ;;
14609   esac
14610 done
14611
14612 ac_given_srcdir=$srcdir
14613 ac_given_INSTALL="$INSTALL"
14614
14615 trap 'rm -fr `echo "\
14616 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14617 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14618 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14619 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14620 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14621 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14622 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14623 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14624 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14625 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14626 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14627 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14628 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14629 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14630 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14631 include/Makefile:build/top.mk:include/Makefile.in \
14632 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14633 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14634 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14635 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14636 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14637 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14638 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14639 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14640 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14641 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14642 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14643 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14644 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14645 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14646 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14647 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14648 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14649 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14650 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14651 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14652 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14653 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14654 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14655 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14656 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14657 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14658  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14659 EOF
14660 cat >> $CONFIG_STATUS <<EOF
14661
14662 # Protect against being on the right side of a sed subst in config.status.
14663 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14664  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14665 $ac_vpsub
14666 $extrasub
14667 s%@SHELL@%$SHELL%g
14668 s%@CFLAGS@%$CFLAGS%g
14669 s%@CPPFLAGS@%$CPPFLAGS%g
14670 s%@CXXFLAGS@%$CXXFLAGS%g
14671 s%@FFLAGS@%$FFLAGS%g
14672 s%@DEFS@%$DEFS%g
14673 s%@LDFLAGS@%$LDFLAGS%g
14674 s%@LIBS@%$LIBS%g
14675 s%@exec_prefix@%$exec_prefix%g
14676 s%@prefix@%$prefix%g
14677 s%@program_transform_name@%$program_transform_name%g
14678 s%@bindir@%$bindir%g
14679 s%@sbindir@%$sbindir%g
14680 s%@libexecdir@%$libexecdir%g
14681 s%@datadir@%$datadir%g
14682 s%@sysconfdir@%$sysconfdir%g
14683 s%@sharedstatedir@%$sharedstatedir%g
14684 s%@localstatedir@%$localstatedir%g
14685 s%@libdir@%$libdir%g
14686 s%@includedir@%$includedir%g
14687 s%@oldincludedir@%$oldincludedir%g
14688 s%@infodir@%$infodir%g
14689 s%@mandir@%$mandir%g
14690 s%@host@%$host%g
14691 s%@host_alias@%$host_alias%g
14692 s%@host_cpu@%$host_cpu%g
14693 s%@host_vendor@%$host_vendor%g
14694 s%@host_os@%$host_os%g
14695 s%@target@%$target%g
14696 s%@target_alias@%$target_alias%g
14697 s%@target_cpu@%$target_cpu%g
14698 s%@target_vendor@%$target_vendor%g
14699 s%@target_os@%$target_os%g
14700 s%@build@%$build%g
14701 s%@build_alias@%$build_alias%g
14702 s%@build_cpu@%$build_cpu%g
14703 s%@build_vendor@%$build_vendor%g
14704 s%@build_os@%$build_os%g
14705 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14706 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14707 s%@INSTALL_DATA@%$INSTALL_DATA%g
14708 s%@PACKAGE@%$PACKAGE%g
14709 s%@VERSION@%$VERSION%g
14710 s%@ACLOCAL@%$ACLOCAL%g
14711 s%@AUTOCONF@%$AUTOCONF%g
14712 s%@AUTOMAKE@%$AUTOMAKE%g
14713 s%@AUTOHEADER@%$AUTOHEADER%g
14714 s%@MAKEINFO@%$MAKEINFO%g
14715 s%@install_sh@%$install_sh%g
14716 s%@AMTAR@%$AMTAR%g
14717 s%@AWK@%$AWK%g
14718 s%@AMTARFLAGS@%$AMTARFLAGS%g
14719 s%@SET_MAKE@%$SET_MAKE%g
14720 s%@top_builddir@%$top_builddir%g
14721 s%@ldap_subdir@%$ldap_subdir%g
14722 s%@CC@%$CC%g
14723 s%@RANLIB@%$RANLIB%g
14724 s%@LD@%$LD%g
14725 s%@NM@%$NM%g
14726 s%@LN_S@%$LN_S%g
14727 s%@LIBTOOL@%$LIBTOOL%g
14728 s%@LN_H@%$LN_H%g
14729 s%@SENDMAIL@%$SENDMAIL%g
14730 s%@EDITOR@%$EDITOR%g
14731 s%@FINGER@%$FINGER%g
14732 s%@PERLBIN@%$PERLBIN%g
14733 s%@CPP@%$CPP%g
14734 s%@EXEEXT@%$EXEEXT%g
14735 s%@OBJEXT@%$OBJEXT%g
14736 s%@OL_MKDEP@%$OL_MKDEP%g
14737 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14738 s%@PEPSY@%$PEPSY%g
14739 s%@LIBOBJS@%$LIBOBJS%g
14740 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14741 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14742 s%@BUILD_BDB2@%$BUILD_BDB2%g
14743 s%@BUILD_LDAP@%$BUILD_LDAP%g
14744 s%@BUILD_LDBM@%$BUILD_LDBM%g
14745 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14746 s%@BUILD_PERL@%$BUILD_PERL%g
14747 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14748 s%@BUILD_SHELL@%$BUILD_SHELL%g
14749 s%@BUILD_TCL@%$BUILD_TCL%g
14750 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14751 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14752 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14753 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14754 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14755 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14756 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14757 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14758 s%@LDAP_LIBS@%$LDAP_LIBS%g
14759 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14760 s%@LDIF_LIBS@%$LDIF_LIBS%g
14761 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14762 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14763 s%@LDBM_LIBS@%$LDBM_LIBS%g
14764 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14765 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14766 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14767 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14768 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14769 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14770 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14771 s%@KRB_LIBS@%$KRB_LIBS%g
14772 s%@READLINE_LIBS@%$READLINE_LIBS%g
14773 s%@SASL_LIBS@%$SASL_LIBS%g
14774 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14775 s%@TLS_LIBS@%$TLS_LIBS%g
14776 s%@MODULES_LIBS@%$MODULES_LIBS%g
14777
14778 CEOF
14779 EOF
14780
14781 cat >> $CONFIG_STATUS <<\EOF
14782
14783 # Split the substitutions into bite-sized pieces for seds with
14784 # small command number limits, like on Digital OSF/1 and HP-UX.
14785 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14786 ac_file=1 # Number of current file.
14787 ac_beg=1 # First line for current file.
14788 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14789 ac_more_lines=:
14790 ac_sed_cmds=""
14791 while $ac_more_lines; do
14792   if test $ac_beg -gt 1; then
14793     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14794   else
14795     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14796   fi
14797   if test ! -s conftest.s$ac_file; then
14798     ac_more_lines=false
14799     rm -f conftest.s$ac_file
14800   else
14801     if test -z "$ac_sed_cmds"; then
14802       ac_sed_cmds="sed -f conftest.s$ac_file"
14803     else
14804       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14805     fi
14806     ac_file=`expr $ac_file + 1`
14807     ac_beg=$ac_end
14808     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14809   fi
14810 done
14811 if test -z "$ac_sed_cmds"; then
14812   ac_sed_cmds=cat
14813 fi
14814 EOF
14815
14816 cat >> $CONFIG_STATUS <<EOF
14817
14818 CONFIG_FILES=\${CONFIG_FILES-"\
14819 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14820 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14821 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14822 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14823 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14824 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14825 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14826 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14827 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14828 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14829 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14830 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14831 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14832 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14833 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14834 include/Makefile:build/top.mk:include/Makefile.in \
14835 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14836 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14837 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14838 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14839 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14840 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14841 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14842 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14843 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14844 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14845 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14846 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14847 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14848 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14849 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14850 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14851 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14852 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14853 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14854 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14855 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14856 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14857 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14858 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14859 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14860 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14861 "}
14862 EOF
14863 cat >> $CONFIG_STATUS <<\EOF
14864 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14865   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14866   case "$ac_file" in
14867   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14868        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14869   *) ac_file_in="${ac_file}.in" ;;
14870   esac
14871
14872   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14873
14874   # Remove last slash and all that follows it.  Not all systems have dirname.
14875   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14876   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14877     # The file is in a subdirectory.
14878     test ! -d "$ac_dir" && mkdir "$ac_dir"
14879     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14880     # A "../" for each directory in $ac_dir_suffix.
14881     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14882   else
14883     ac_dir_suffix= ac_dots=
14884   fi
14885
14886   case "$ac_given_srcdir" in
14887   .)  srcdir=.
14888       if test -z "$ac_dots"; then top_srcdir=.
14889       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14890   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14891   *) # Relative path.
14892     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14893     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14894   esac
14895
14896   case "$ac_given_INSTALL" in
14897   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14898   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14899   esac
14900
14901   echo creating "$ac_file"
14902   rm -f "$ac_file"
14903   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14904   case "$ac_file" in
14905   *Makefile*) ac_comsub="1i\\
14906 # $configure_input" ;;
14907   *) ac_comsub= ;;
14908   esac
14909
14910   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14911   sed -e "$ac_comsub
14912 s%@configure_input@%$configure_input%g
14913 s%@srcdir@%$srcdir%g
14914 s%@top_srcdir@%$top_srcdir%g
14915 s%@INSTALL@%$INSTALL%g
14916 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14917 fi; done
14918 rm -f conftest.s*
14919
14920 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14921 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14922 #
14923 # ac_d sets the value in "#define NAME VALUE" lines.
14924 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14925 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14926 ac_dC='\3'
14927 ac_dD='%g'
14928 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14929 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14930 ac_uB='\([      ]\)%\1#\2define\3'
14931 ac_uC=' '
14932 ac_uD='\4%g'
14933 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14934 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14935 ac_eB='$%\1#\2define\3'
14936 ac_eC=' '
14937 ac_eD='%g'
14938
14939 if test "${CONFIG_HEADERS+set}" != set; then
14940 EOF
14941 cat >> $CONFIG_STATUS <<EOF
14942   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14943 EOF
14944 cat >> $CONFIG_STATUS <<\EOF
14945 fi
14946 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14947   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14948   case "$ac_file" in
14949   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14950        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14951   *) ac_file_in="${ac_file}.in" ;;
14952   esac
14953
14954   echo creating $ac_file
14955
14956   rm -f conftest.frag conftest.in conftest.out
14957   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14958   cat $ac_file_inputs > conftest.in
14959
14960 EOF
14961
14962 # Transform confdefs.h into a sed script conftest.vals that substitutes
14963 # the proper values into config.h.in to produce config.h.  And first:
14964 # Protect against being on the right side of a sed subst in config.status.
14965 # Protect against being in an unquoted here document in config.status.
14966 rm -f conftest.vals
14967 cat > conftest.hdr <<\EOF
14968 s/[\\&%]/\\&/g
14969 s%[\\$`]%\\&%g
14970 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14971 s%ac_d%ac_u%gp
14972 s%ac_u%ac_e%gp
14973 EOF
14974 sed -n -f conftest.hdr confdefs.h > conftest.vals
14975 rm -f conftest.hdr
14976
14977 # This sed command replaces #undef with comments.  This is necessary, for
14978 # example, in the case of _POSIX_SOURCE, which is predefined and required
14979 # on some systems where configure will not decide to define it.
14980 cat >> conftest.vals <<\EOF
14981 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14982 EOF
14983
14984 # Break up conftest.vals because some shells have a limit on
14985 # the size of here documents, and old seds have small limits too.
14986
14987 rm -f conftest.tail
14988 while :
14989 do
14990   ac_lines=`grep -c . conftest.vals`
14991   # grep -c gives empty output for an empty file on some AIX systems.
14992   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14993   # Write a limited-size here document to conftest.frag.
14994   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14995   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14996   echo 'CEOF
14997   sed -f conftest.frag conftest.in > conftest.out
14998   rm -f conftest.in
14999   mv conftest.out conftest.in
15000 ' >> $CONFIG_STATUS
15001   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15002   rm -f conftest.vals
15003   mv conftest.tail conftest.vals
15004 done
15005 rm -f conftest.vals
15006
15007 cat >> $CONFIG_STATUS <<\EOF
15008   rm -f conftest.frag conftest.h
15009   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15010   cat conftest.in >> conftest.h
15011   rm -f conftest.in
15012   if cmp -s $ac_file conftest.h 2>/dev/null; then
15013     echo "$ac_file is unchanged"
15014     rm -f conftest.h
15015   else
15016     # Remove last slash and all that follows it.  Not all systems have dirname.
15017       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15018       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15019       # The file is in a subdirectory.
15020       test ! -d "$ac_dir" && mkdir "$ac_dir"
15021     fi
15022     rm -f $ac_file
15023     mv conftest.h $ac_file
15024   fi
15025 fi; done
15026
15027 EOF
15028 cat >> $CONFIG_STATUS <<EOF
15029
15030 EOF
15031 cat >> $CONFIG_STATUS <<\EOF
15032
15033 date > stamp-h
15034 echo Please \"make depend\" to build dependencies
15035
15036 exit 0
15037 EOF
15038 chmod +x $CONFIG_STATUS
15039 rm -fr confdefs* $ac_clean_files
15040 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15041