]> git.sur5r.net Git - openldap/blob - configure
Apply y2k fix based upon Howard Young's (ITS#294) suggestion
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.258 1999/09/13 16:31:39 kdz Exp  
4
5 # Copyright 1998,1999 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-1999 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-x-compile    enable cross compiling (no)"
45 ac_help="$ac_help
46   --enable-dmalloc      enable debug malloc support (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with Kerberos support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 LDAPD (X.500-to-LDAP Gateway) Options:"
63 ac_help="$ac_help
64   --enable-ldapd        enable building ldapd (no)"
65 ac_help="$ac_help
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd        enable building slapd (yes)"
69 ac_help="$ac_help
70     --enable-cleartext  enable cleartext passwords (yes)"
71 ac_help="$ac_help
72     --enable-crypt      enable crypt(3) passwords (auto)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-discreteaci        enable discrete rights in ACIs (no)"
87 ac_help="$ac_help
88     --enable-wrappers   enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-bdb2       enable bdb2 backend (no)"
91 ac_help="$ac_help
92       --with-bdb2-module        module type (static)"
93 ac_help="$ac_help
94     --enable-ldap       enable ldap backend (no)"
95 ac_help="$ac_help
96       --with-ldap-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm       enable ldbm backend (yes)"
99 ac_help="$ac_help
100       --with-ldbm-api   use LDBM API (auto)"
101 ac_help="$ac_help
102       --with-ldbm-module        module type (static)"
103 ac_help="$ac_help
104       --with-ldbm-type  use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd     enable passwd backend (no)"
107 ac_help="$ac_help
108       --with-passwd-module      module type (static)"
109 ac_help="$ac_help
110     --enable-perl       enable perl backend (no)"
111 ac_help="$ac_help
112       --with-perl-module        module type (static)"
113 ac_help="$ac_help
114     --enable-shell      enable shell backend (no)"
115 ac_help="$ac_help
116       --with-shell-module       module type (static)"
117 ac_help="$ac_help
118     --enable-tcl        enable tcl backend (no)"
119 ac_help="$ac_help
120       --with-tcl-module module type (static)"
121 ac_help="$ac_help
122 SLURPD (Replication Daemon) Options:"
123 ac_help="$ac_help
124   --enable-slurpd       enable building slurpd (auto)"
125 ac_help="$ac_help
126 Library Generation & Linking Options"
127 ac_help="$ac_help
128   --enable-static[=PKGS]  build static libraries [default=yes]"
129 ac_help="$ac_help
130   --enable-shared[=PKGS]  build shared libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
133 ac_help="$ac_help
134   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
135 ac_help="$ac_help
136   --disable-libtool-lock  avoid locking (might break parallel builds)"
137
138 # Initialize some variables set by options.
139 # The variables have the same names as the options, with
140 # dashes changed to underlines.
141 build=NONE
142 cache_file=./config.cache
143 exec_prefix=NONE
144 host=NONE
145 no_create=
146 nonopt=NONE
147 no_recursion=
148 prefix=NONE
149 program_prefix=NONE
150 program_suffix=NONE
151 program_transform_name=s,x,x,
152 silent=
153 site=
154 srcdir=
155 target=NONE
156 verbose=
157 x_includes=NONE
158 x_libraries=NONE
159 bindir='${exec_prefix}/bin'
160 sbindir='${exec_prefix}/sbin'
161 libexecdir='${exec_prefix}/libexec'
162 datadir='${prefix}/share'
163 sysconfdir='${prefix}/etc'
164 sharedstatedir='${prefix}/com'
165 localstatedir='${prefix}/var'
166 libdir='${exec_prefix}/lib'
167 includedir='${prefix}/include'
168 oldincludedir='/usr/include'
169 infodir='${prefix}/info'
170 mandir='${prefix}/man'
171
172 # Initialize some other variables.
173 subdirs=
174 MFLAGS= MAKEFLAGS=
175 SHELL=${CONFIG_SHELL-/bin/sh}
176 # Maximum number of lines to put in a shell here document.
177 ac_max_here_lines=12
178
179 ac_prev=
180 for ac_option
181 do
182
183   # If the previous option needs an argument, assign it.
184   if test -n "$ac_prev"; then
185     eval "$ac_prev=\$ac_option"
186     ac_prev=
187     continue
188   fi
189
190   case "$ac_option" in
191   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
192   *) ac_optarg= ;;
193   esac
194
195   # Accept the important Cygnus configure options, so we can diagnose typos.
196
197   case "$ac_option" in
198
199   -bindir | --bindir | --bindi | --bind | --bin | --bi)
200     ac_prev=bindir ;;
201   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
202     bindir="$ac_optarg" ;;
203
204   -build | --build | --buil | --bui | --bu)
205     ac_prev=build ;;
206   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
207     build="$ac_optarg" ;;
208
209   -cache-file | --cache-file | --cache-fil | --cache-fi \
210   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
211     ac_prev=cache_file ;;
212   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
213   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
214     cache_file="$ac_optarg" ;;
215
216   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
217     ac_prev=datadir ;;
218   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
219   | --da=*)
220     datadir="$ac_optarg" ;;
221
222   -disable-* | --disable-*)
223     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
224     # Reject names that are not valid shell variable names.
225     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
226       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
227     fi
228     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
229     eval "enable_${ac_feature}=no" ;;
230
231   -enable-* | --enable-*)
232     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
233     # Reject names that are not valid shell variable names.
234     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
235       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
236     fi
237     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
238     case "$ac_option" in
239       *=*) ;;
240       *) ac_optarg=yes ;;
241     esac
242     eval "enable_${ac_feature}='$ac_optarg'" ;;
243
244   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
245   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
246   | --exec | --exe | --ex)
247     ac_prev=exec_prefix ;;
248   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
249   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
250   | --exec=* | --exe=* | --ex=*)
251     exec_prefix="$ac_optarg" ;;
252
253   -gas | --gas | --ga | --g)
254     # Obsolete; use --with-gas.
255     with_gas=yes ;;
256
257   -help | --help | --hel | --he)
258     # Omit some internal or obsolete options to make the list less imposing.
259     # This message is too long to be a string in the A/UX 3.1 sh.
260     cat << EOF
261 Usage: configure [options] [host]
262 Options: [defaults in brackets after descriptions]
263 Configuration:
264   --cache-file=FILE       cache test results in FILE
265   --help                  print this message
266   --no-create             do not create output files
267   --quiet, --silent       do not print \`checking...' messages
268   --version               print the version of autoconf that created configure
269 Directory and file names:
270   --prefix=PREFIX         install architecture-independent files in PREFIX
271                           [$ac_default_prefix]
272   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
273                           [same as prefix]
274   --bindir=DIR            user executables in DIR [EPREFIX/bin]
275   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
276   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
277   --datadir=DIR           read-only architecture-independent data in DIR
278                           [PREFIX/share]
279   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
280   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
281                           [PREFIX/com]
282   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
283   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
284   --includedir=DIR        C header files in DIR [PREFIX/include]
285   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
286   --infodir=DIR           info documentation in DIR [PREFIX/info]
287   --mandir=DIR            man documentation in DIR [PREFIX/man]
288   --srcdir=DIR            find the sources in DIR [configure dir or ..]
289   --program-prefix=PREFIX prepend PREFIX to installed program names
290   --program-suffix=SUFFIX append SUFFIX to installed program names
291   --program-transform-name=PROGRAM
292                           run sed PROGRAM on installed program names
293 EOF
294     cat << EOF
295 Host type:
296   --build=BUILD           configure for building on BUILD [BUILD=HOST]
297   --host=HOST             configure for HOST [guessed]
298   --target=TARGET         configure for TARGET [TARGET=HOST]
299 Features and packages:
300   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
301   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
302   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
303   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
304   --x-includes=DIR        X include files are in DIR
305   --x-libraries=DIR       X library files are in DIR
306 EOF
307     if test -n "$ac_help"; then
308       echo "--enable and --with options recognized:$ac_help"
309     fi
310     exit 0 ;;
311
312   -host | --host | --hos | --ho)
313     ac_prev=host ;;
314   -host=* | --host=* | --hos=* | --ho=*)
315     host="$ac_optarg" ;;
316
317   -includedir | --includedir | --includedi | --included | --include \
318   | --includ | --inclu | --incl | --inc)
319     ac_prev=includedir ;;
320   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
321   | --includ=* | --inclu=* | --incl=* | --inc=*)
322     includedir="$ac_optarg" ;;
323
324   -infodir | --infodir | --infodi | --infod | --info | --inf)
325     ac_prev=infodir ;;
326   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
327     infodir="$ac_optarg" ;;
328
329   -libdir | --libdir | --libdi | --libd)
330     ac_prev=libdir ;;
331   -libdir=* | --libdir=* | --libdi=* | --libd=*)
332     libdir="$ac_optarg" ;;
333
334   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
335   | --libexe | --libex | --libe)
336     ac_prev=libexecdir ;;
337   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
338   | --libexe=* | --libex=* | --libe=*)
339     libexecdir="$ac_optarg" ;;
340
341   -localstatedir | --localstatedir | --localstatedi | --localstated \
342   | --localstate | --localstat | --localsta | --localst \
343   | --locals | --local | --loca | --loc | --lo)
344     ac_prev=localstatedir ;;
345   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
346   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
347   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
348     localstatedir="$ac_optarg" ;;
349
350   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
351     ac_prev=mandir ;;
352   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
353     mandir="$ac_optarg" ;;
354
355   -nfp | --nfp | --nf)
356     # Obsolete; use --without-fp.
357     with_fp=no ;;
358
359   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
360   | --no-cr | --no-c)
361     no_create=yes ;;
362
363   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
364   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
365     no_recursion=yes ;;
366
367   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
368   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
369   | --oldin | --oldi | --old | --ol | --o)
370     ac_prev=oldincludedir ;;
371   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
372   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
373   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
374     oldincludedir="$ac_optarg" ;;
375
376   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
377     ac_prev=prefix ;;
378   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
379     prefix="$ac_optarg" ;;
380
381   -program-prefix | --program-prefix | --program-prefi | --program-pref \
382   | --program-pre | --program-pr | --program-p)
383     ac_prev=program_prefix ;;
384   -program-prefix=* | --program-prefix=* | --program-prefi=* \
385   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
386     program_prefix="$ac_optarg" ;;
387
388   -program-suffix | --program-suffix | --program-suffi | --program-suff \
389   | --program-suf | --program-su | --program-s)
390     ac_prev=program_suffix ;;
391   -program-suffix=* | --program-suffix=* | --program-suffi=* \
392   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
393     program_suffix="$ac_optarg" ;;
394
395   -program-transform-name | --program-transform-name \
396   | --program-transform-nam | --program-transform-na \
397   | --program-transform-n | --program-transform- \
398   | --program-transform | --program-transfor \
399   | --program-transfo | --program-transf \
400   | --program-trans | --program-tran \
401   | --progr-tra | --program-tr | --program-t)
402     ac_prev=program_transform_name ;;
403   -program-transform-name=* | --program-transform-name=* \
404   | --program-transform-nam=* | --program-transform-na=* \
405   | --program-transform-n=* | --program-transform-=* \
406   | --program-transform=* | --program-transfor=* \
407   | --program-transfo=* | --program-transf=* \
408   | --program-trans=* | --program-tran=* \
409   | --progr-tra=* | --program-tr=* | --program-t=*)
410     program_transform_name="$ac_optarg" ;;
411
412   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
413   | -silent | --silent | --silen | --sile | --sil)
414     silent=yes ;;
415
416   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
417     ac_prev=sbindir ;;
418   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
419   | --sbi=* | --sb=*)
420     sbindir="$ac_optarg" ;;
421
422   -sharedstatedir | --sharedstatedir | --sharedstatedi \
423   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
424   | --sharedst | --shareds | --shared | --share | --shar \
425   | --sha | --sh)
426     ac_prev=sharedstatedir ;;
427   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
428   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
429   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
430   | --sha=* | --sh=*)
431     sharedstatedir="$ac_optarg" ;;
432
433   -site | --site | --sit)
434     ac_prev=site ;;
435   -site=* | --site=* | --sit=*)
436     site="$ac_optarg" ;;
437
438   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
439     ac_prev=srcdir ;;
440   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
441     srcdir="$ac_optarg" ;;
442
443   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
444   | --syscon | --sysco | --sysc | --sys | --sy)
445     ac_prev=sysconfdir ;;
446   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
447   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
448     sysconfdir="$ac_optarg" ;;
449
450   -target | --target | --targe | --targ | --tar | --ta | --t)
451     ac_prev=target ;;
452   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
453     target="$ac_optarg" ;;
454
455   -v | -verbose | --verbose | --verbos | --verbo | --verb)
456     verbose=yes ;;
457
458   -version | --version | --versio | --versi | --vers)
459     echo "configure generated by autoconf version 2.13.1"
460     exit 0 ;;
461
462   -with-* | --with-*)
463     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
464     # Reject names that are not valid shell variable names.
465     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
466       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
467     fi
468     ac_package=`echo $ac_package| sed 's/-/_/g'`
469     case "$ac_option" in
470       *=*) ;;
471       *) ac_optarg=yes ;;
472     esac
473     eval "with_${ac_package}='$ac_optarg'" ;;
474
475   -without-* | --without-*)
476     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
477     # Reject names that are not valid shell variable names.
478     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
479       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
480     fi
481     ac_package=`echo $ac_package| sed 's/-/_/g'`
482     eval "with_${ac_package}=no" ;;
483
484   --x)
485     # Obsolete; use --with-x.
486     with_x=yes ;;
487
488   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
489   | --x-incl | --x-inc | --x-in | --x-i)
490     ac_prev=x_includes ;;
491   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
492   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
493     x_includes="$ac_optarg" ;;
494
495   -x-libraries | --x-libraries | --x-librarie | --x-librari \
496   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
497     ac_prev=x_libraries ;;
498   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
499   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
500     x_libraries="$ac_optarg" ;;
501
502   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
503     ;;
504
505   *)
506     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
507       echo "configure: warning: $ac_option: invalid host type" 1>&2
508     fi
509     if test "x$nonopt" != xNONE; then
510       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
511     fi
512     nonopt="$ac_option"
513     ;;
514
515   esac
516 done
517
518 if test -n "$ac_prev"; then
519   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
520 fi
521
522 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
523
524 # File descriptor usage:
525 # 0 standard input
526 # 1 file creation
527 # 2 errors and warnings
528 # 3 some systems may open it to /dev/tty
529 # 4 used on the Kubota Titan
530 # 6 checking for... messages and results
531 # 5 compiler messages saved in config.log
532 if test "$silent" = yes; then
533   exec 6>/dev/null
534 else
535   exec 6>&1
536 fi
537 exec 5>./config.log
538
539 echo "\
540 This file contains any messages produced by compilers while
541 running configure, to aid debugging if configure makes a mistake.
542 " 1>&5
543
544 # Strip out --no-create and --no-recursion so they do not pile up.
545 # Also quote any args containing shell metacharacters.
546 ac_configure_args=
547 for ac_arg
548 do
549   case "$ac_arg" in
550   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
551   | --no-cr | --no-c) ;;
552   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
553   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
554   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
555   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
556   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
557   esac
558 done
559
560 # NLS nuisances.
561 # Only set these to C if already set.  These must not be set unconditionally
562 # because not all systems understand e.g. LANG=C (notably SCO).
563 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
564 # Non-C LC_CTYPE values break the ctype check.
565 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
566 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
567 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
568 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
569
570 # confdefs.h avoids OS command line length limits that DEFS can exceed.
571 rm -rf conftest* confdefs.h
572 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
573 echo > confdefs.h
574
575 # A filename unique to this package, relative to the directory that
576 # configure is in, which we can look for to find out if srcdir is correct.
577 ac_unique_file=build/version
578
579 # Find the source files, if location was not specified.
580 if test -z "$srcdir"; then
581   ac_srcdir_defaulted=yes
582   # Try the directory containing this script, then its parent.
583   ac_prog=$0
584   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
585   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
586   srcdir=$ac_confdir
587   if test ! -r $srcdir/$ac_unique_file; then
588     srcdir=..
589   fi
590 else
591   ac_srcdir_defaulted=no
592 fi
593 if test ! -r $srcdir/$ac_unique_file; then
594   if test "$ac_srcdir_defaulted" = yes; then
595     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
596   else
597     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
598   fi
599 fi
600 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
601
602 # Prefer explicitly selected file to automatically selected ones.
603 if test -z "$CONFIG_SITE"; then
604   if test "x$prefix" != xNONE; then
605     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
606   else
607     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
608   fi
609 fi
610 for ac_site_file in $CONFIG_SITE; do
611   if test -r "$ac_site_file"; then
612     echo "loading site script $ac_site_file"
613     . "$ac_site_file"
614   fi
615 done
616
617
618 ac_ext=c
619 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
620 ac_cpp='$CPP $CPPFLAGS'
621 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
622 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
623 cross_compiling=$ac_cv_prog_cc_cross
624
625 ac_exeext=
626 ac_objext=o
627 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
628   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
629   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
630     ac_n= ac_c='
631 ' ac_t='        '
632   else
633     ac_n=-n ac_c= ac_t=
634   fi
635 else
636   ac_n= ac_c='\c' ac_t=
637 fi
638
639 ac_aux_dir=
640 for ac_dir in build $srcdir/build; do
641   if test -f $ac_dir/install-sh; then
642     ac_aux_dir=$ac_dir
643     ac_install_sh="$ac_aux_dir/install-sh -c"
644     break
645   elif test -f $ac_dir/install.sh; then
646     ac_aux_dir=$ac_dir
647     ac_install_sh="$ac_aux_dir/install.sh -c"
648     break
649   fi
650 done
651 if test -z "$ac_aux_dir"; then
652   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
653 fi
654 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
655 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
656 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
657
658 OL_VERSION=`cat $ac_aux_dir/version`
659 if test -z "$OL_VERSION"; then
660         { echo "configure: error: could not determine version" 1>&2; exit 1; }
661 fi
662
663 echo "Configuring OpenLDAP $OL_VERSION ..."
664
665
666 echo $ac_n "checking host system type""... $ac_c" 1>&6
667 echo "configure:668: checking host system type" >&5
668 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
669
670 # Make sure we can run config.sub.
671   if $ac_config_sub sun4 >/dev/null 2>&1; then :
672     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
673   fi
674
675   ac_cv_host_alias=$host
676   case "$ac_cv_host_alias" in
677   NONE)
678     case $nonopt in
679     NONE)
680       if ac_cv_host_alias=`$ac_config_guess`; then :
681       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
682       fi ;;
683     *) ac_cv_host_alias=$nonopt ;;
684     esac ;;
685   esac
686
687   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
688   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
689   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
690   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
691 else
692   echo $ac_n "(cached) $ac_c" 1>&6
693 fi
694
695 echo "$ac_t""$ac_cv_host" 1>&6
696
697 host=$ac_cv_host
698 host_alias=$ac_cv_host_alias
699 host_cpu=$ac_cv_host_cpu
700 host_vendor=$ac_cv_host_vendor
701 host_os=$ac_cv_host_os
702
703
704
705
706
707 echo $ac_n "checking target system type""... $ac_c" 1>&6
708 echo "configure:709: checking target system type" >&5
709 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
710
711 # Make sure we can run config.sub.
712   if $ac_config_sub sun4 >/dev/null 2>&1; then :
713     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
714   fi
715
716   ac_cv_target_alias=$target
717   case "$ac_cv_target_alias" in
718   NONE)
719     case $nonopt in
720     NONE)
721       ac_cv_target_alias=$host_alias ;;
722
723     *) ac_cv_target_alias=$nonopt ;;
724     esac ;;
725   esac
726
727   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
728   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
729   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
730   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
731 else
732   echo $ac_n "(cached) $ac_c" 1>&6
733 fi
734
735 echo "$ac_t""$ac_cv_target" 1>&6
736
737 target=$ac_cv_target
738 target_alias=$ac_cv_target_alias
739 target_cpu=$ac_cv_target_cpu
740 target_vendor=$ac_cv_target_vendor
741 target_os=$ac_cv_target_os
742
743
744
745
746
747 echo $ac_n "checking build system type""... $ac_c" 1>&6
748 echo "configure:749: checking build system type" >&5
749 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
750
751 # Make sure we can run config.sub.
752   if $ac_config_sub sun4 >/dev/null 2>&1; then :
753     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
754   fi
755
756   ac_cv_build_alias=$build
757   case "$ac_cv_build_alias" in
758   NONE)
759     case $nonopt in
760     NONE)
761       ac_cv_build_alias=$host_alias ;;
762
763     *) ac_cv_build_alias=$nonopt ;;
764     esac ;;
765   esac
766
767   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
768   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
769   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
770   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
771 else
772   echo $ac_n "(cached) $ac_c" 1>&6
773 fi
774
775 echo "$ac_t""$ac_cv_build" 1>&6
776
777 build=$ac_cv_build
778 build_alias=$ac_cv_build_alias
779 build_cpu=$ac_cv_build_cpu
780 build_vendor=$ac_cv_build_vendor
781 build_os=$ac_cv_build_os
782
783
784
785
786
787 # Do some error checking and defaulting for the host and target type.
788 # The inputs are:
789 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
790 #
791 # The rules are:
792 # 1. You are not allowed to specify --host, --target, and nonopt at the
793 #    same time.
794 # 2. Host defaults to nonopt.
795 # 3. If nonopt is not specified, then host defaults to the current host,
796 #    as determined by config.guess.
797 # 4. Target and build default to nonopt.
798 # 5. If nonopt is not specified, then target and build default to host.
799
800 # The aliases save the names the user supplied, while $host etc.
801 # will get canonicalized.
802 case $host---$target---$nonopt in
803 NONE---*---* | *---NONE---* | *---*---NONE) ;;
804 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
805 esac
806
807 test "$host_alias" != "$target_alias" &&
808   test "$program_prefix$program_suffix$program_transform_name" = \
809     NONENONEs,x,x, &&
810   program_prefix=${target_alias}-
811
812
813 # Find a good install program.  We prefer a C program (faster),
814 # so one script is as good as another.  But avoid the broken or
815 # incompatible versions:
816 # SysV /etc/install, /usr/sbin/install
817 # SunOS /usr/etc/install
818 # IRIX /sbin/install
819 # AIX /bin/install
820 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
821 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
822 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
823 # ./install, which can be erroneously created by make from ./install.sh.
824 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
825 echo "configure:826: checking for a BSD compatible install" >&5
826 if test -z "$INSTALL"; then
827 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
828   echo $ac_n "(cached) $ac_c" 1>&6
829 else
830     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
831   for ac_dir in $PATH; do
832     # Account for people who put trailing slashes in PATH elements.
833     case "$ac_dir/" in
834     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
835     *)
836       # OSF1 and SCO ODT 3.0 have their own names for install.
837       # Don't use installbsd from OSF since it installs stuff as root
838       # by default.
839       for ac_prog in ginstall scoinst install; do
840         if test -f $ac_dir/$ac_prog; then
841           if test $ac_prog = install &&
842             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
843             # AIX install.  It has an incompatible calling convention.
844             :
845           elif test $ac_prog = install &&
846             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
847             # program-specific install script used by HP pwplus--don't use.
848             :
849           else
850             ac_cv_path_install="$ac_dir/$ac_prog -c"
851             break 2
852           fi
853         fi
854       done
855       ;;
856     esac
857   done
858   IFS="$ac_save_IFS"
859
860 fi
861   if test "${ac_cv_path_install+set}" = set; then
862     INSTALL="$ac_cv_path_install"
863   else
864     # As a last resort, use the slow shell script.  We don't cache a
865     # path for INSTALL within a source directory, because that will
866     # break other packages using the cache if that directory is
867     # removed, or if the path is relative.
868     INSTALL="$ac_install_sh"
869   fi
870 fi
871 echo "$ac_t""$INSTALL" 1>&6
872
873 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
874 # It thinks the first close brace ends the variable substitution.
875 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
876
877 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
878
879 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
880
881 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
882 echo "configure:883: checking whether build environment is sane" >&5
883 # Just in case
884 sleep 1
885 echo timestamp > conftestfile
886 # Do `set' in a subshell so we don't clobber the current shell's
887 # arguments.  Must try -L first in case configure is actually a
888 # symlink; some systems play weird games with the mod time of symlinks
889 # (eg FreeBSD returns the mod time of the symlink's containing
890 # directory).
891 if (
892    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
893    if test "$*" = "X"; then
894       # -L didn't work.
895       set X `ls -t $srcdir/configure conftestfile`
896    fi
897    if test "$*" != "X $srcdir/configure conftestfile" \
898       && test "$*" != "X conftestfile $srcdir/configure"; then
899
900       # If neither matched, then we have a broken ls.  This can happen
901       # if, for instance, CONFIG_SHELL is bash and it inherits a
902       # broken ls alias from the environment.  This has actually
903       # happened.  Such a system could not be considered "sane".
904       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
905 alias in your environment" 1>&2; exit 1; }
906    fi
907
908    test "$2" = conftestfile
909    )
910 then
911    # Ok.
912    :
913 else
914    { echo "configure: error: newly created file is older than distributed files!
915 Check your system clock" 1>&2; exit 1; }
916 fi
917 rm -f conftest*
918 echo "$ac_t""yes" 1>&6
919 if test "$program_transform_name" = s,x,x,; then
920   program_transform_name=
921 else
922   # Double any \ or $.  echo might interpret backslashes.
923   cat <<\EOF_SED > conftestsed
924 s,\\,\\\\,g; s,\$,$$,g
925 EOF_SED
926   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
927   rm -f conftestsed
928 fi
929 test "$program_prefix" != NONE &&
930   program_transform_name="s,^,${program_prefix},;$program_transform_name"
931 # Use a double $ so make ignores it.
932 test "$program_suffix" != NONE &&
933   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
934
935 # sed with no file args requires a program.
936 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
937
938 for ac_prog in mawk gawk nawk awk
939 do
940 # Extract the first word of "$ac_prog", so it can be a program name with args.
941 set dummy $ac_prog; ac_word=$2
942 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
943 echo "configure:944: checking for $ac_word" >&5
944 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
945   echo $ac_n "(cached) $ac_c" 1>&6
946 else
947   if test -n "$AWK"; then
948   ac_cv_prog_AWK="$AWK" # Let the user override the test.
949 else
950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
951   ac_dummy="$PATH"
952   for ac_dir in $ac_dummy; do
953     test -z "$ac_dir" && ac_dir=.
954     if test -f $ac_dir/$ac_word; then
955       ac_cv_prog_AWK="$ac_prog"
956       break
957     fi
958   done
959   IFS="$ac_save_ifs"
960 fi
961 fi
962 AWK="$ac_cv_prog_AWK"
963 if test -n "$AWK"; then
964   echo "$ac_t""$AWK" 1>&6
965 else
966   echo "$ac_t""no" 1>&6
967 fi
968
969 test -n "$AWK" && break
970 done
971
972 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
973 echo "configure:974: checking whether ${MAKE-make} sets \${MAKE}" >&5
974 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
975 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
976   echo $ac_n "(cached) $ac_c" 1>&6
977 else
978   cat > conftestmake <<\EOF
979 all:
980         @echo 'ac_maketemp="${MAKE}"'
981 EOF
982 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
983 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
984 if test -n "$ac_maketemp"; then
985   eval ac_cv_prog_make_${ac_make}_set=yes
986 else
987   eval ac_cv_prog_make_${ac_make}_set=no
988 fi
989 rm -f conftestmake
990 fi
991 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
992   echo "$ac_t""yes" 1>&6
993   SET_MAKE=
994 else
995   echo "$ac_t""no" 1>&6
996   SET_MAKE="MAKE=${MAKE-make}"
997 fi
998
999
1000
1001 PACKAGE=OpenLDAP
1002
1003 VERSION=$OL_VERSION
1004
1005 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1006   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1007 fi
1008
1009
1010
1011 missing_dir=`cd $ac_aux_dir && pwd`
1012 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1013 echo "configure:1014: checking for working aclocal" >&5
1014 # Run test in a subshell; some versions of sh will print an error if
1015 # an executable is not found, even if stderr is redirected.
1016 # Redirect stdin to placate older versions of autoconf.  Sigh.
1017 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1018    ACLOCAL=aclocal
1019    echo "$ac_t""found" 1>&6
1020 else
1021    ACLOCAL="$missing_dir/missing aclocal"
1022    echo "$ac_t""missing" 1>&6
1023 fi
1024
1025 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1026 echo "configure:1027: checking for working autoconf" >&5
1027 # Run test in a subshell; some versions of sh will print an error if
1028 # an executable is not found, even if stderr is redirected.
1029 # Redirect stdin to placate older versions of autoconf.  Sigh.
1030 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1031    AUTOCONF=autoconf
1032    echo "$ac_t""found" 1>&6
1033 else
1034    AUTOCONF="$missing_dir/missing autoconf"
1035    echo "$ac_t""missing" 1>&6
1036 fi
1037
1038 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1039 echo "configure:1040: checking for working automake" >&5
1040 # Run test in a subshell; some versions of sh will print an error if
1041 # an executable is not found, even if stderr is redirected.
1042 # Redirect stdin to placate older versions of autoconf.  Sigh.
1043 if (automake --version) < /dev/null > /dev/null 2>&1; then
1044    AUTOMAKE=automake
1045    echo "$ac_t""found" 1>&6
1046 else
1047    AUTOMAKE="$missing_dir/missing automake"
1048    echo "$ac_t""missing" 1>&6
1049 fi
1050
1051 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1052 echo "configure:1053: checking for working autoheader" >&5
1053 # Run test in a subshell; some versions of sh will print an error if
1054 # an executable is not found, even if stderr is redirected.
1055 # Redirect stdin to placate older versions of autoconf.  Sigh.
1056 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1057    AUTOHEADER=autoheader
1058    echo "$ac_t""found" 1>&6
1059 else
1060    AUTOHEADER="$missing_dir/missing autoheader"
1061    echo "$ac_t""missing" 1>&6
1062 fi
1063
1064 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1065 echo "configure:1066: checking for working makeinfo" >&5
1066 # Run test in a subshell; some versions of sh will print an error if
1067 # an executable is not found, even if stderr is redirected.
1068 # Redirect stdin to placate older versions of autoconf.  Sigh.
1069 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1070    MAKEINFO=makeinfo
1071    echo "$ac_t""found" 1>&6
1072 else
1073    MAKEINFO="$missing_dir/missing makeinfo"
1074    echo "$ac_t""missing" 1>&6
1075 fi
1076
1077 install_sh="$missing_dir/install-sh"
1078 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1079
1080 for ac_prog in gnutar gtar tar
1081 do
1082 # Extract the first word of "$ac_prog", so it can be a program name with args.
1083 set dummy $ac_prog; ac_word=$2
1084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1085 echo "configure:1086: checking for $ac_word" >&5
1086 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1087   echo $ac_n "(cached) $ac_c" 1>&6
1088 else
1089   if test -n "$AMTAR"; then
1090   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1091 else
1092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1093   ac_dummy="$PATH"
1094   for ac_dir in $ac_dummy; do
1095     test -z "$ac_dir" && ac_dir=.
1096     if test -f $ac_dir/$ac_word; then
1097       ac_cv_prog_AMTAR="$ac_prog"
1098       break
1099     fi
1100   done
1101   IFS="$ac_save_ifs"
1102 fi
1103 fi
1104 AMTAR="$ac_cv_prog_AMTAR"
1105 if test -n "$AMTAR"; then
1106   echo "$ac_t""$AMTAR" 1>&6
1107 else
1108   echo "$ac_t""no" 1>&6
1109 fi
1110
1111 test -n "$AMTAR" && break
1112 done
1113
1114
1115 AMTARFLAGS=
1116 if test -n "$AMTAR"; then
1117   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1118         AMTARFLAGS=o
1119   fi
1120 fi
1121
1122
1123
1124 cat >> confdefs.h <<EOF
1125 #define OPENLDAP_PACKAGE "$PACKAGE"
1126 EOF
1127
1128 cat >> confdefs.h <<EOF
1129 #define OPENLDAP_VERSION "$VERSION"
1130 EOF
1131
1132
1133
1134
1135 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1136 echo "configure:1137: checking configure arguments" >&5
1137
1138
1139 top_builddir=`pwd`
1140
1141 ldap_subdir="/openldap"
1142
1143 # Check whether --with-subdir or --without-subdir was given.
1144 if test "${with_subdir+set}" = set; then
1145   withval="$with_subdir"
1146   case "$withval" in
1147         no) ldap_subdir=""
1148                 ;;
1149         yes)
1150                 ;;
1151         /*|\\*)
1152                 ldap_subdir="$withval"
1153                 ;;
1154         *)
1155                 ldap_subdir="/$withval"
1156                 ;;
1157 esac
1158
1159 fi
1160
1161
1162 # OpenLDAP --enable-debug
1163         # Check whether --enable-debug or --disable-debug was given.
1164 if test "${enable_debug+set}" = set; then
1165   enableval="$enable_debug"
1166   
1167         ol_arg=invalid
1168         for ol_val in auto yes no ; do
1169                 if test "$enableval" = "$ol_val" ; then
1170                         ol_arg="$ol_val"
1171                 fi
1172         done
1173         if test "$ol_arg" = "invalid" ; then
1174                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1175         fi
1176         ol_enable_debug="$ol_arg"
1177
1178 else
1179         ol_enable_debug="yes"
1180 fi
1181 # end --enable-debug
1182 # OpenLDAP --enable-syslog
1183         # Check whether --enable-syslog or --disable-syslog was given.
1184 if test "${enable_syslog+set}" = set; then
1185   enableval="$enable_syslog"
1186   
1187         ol_arg=invalid
1188         for ol_val in auto yes no ; do
1189                 if test "$enableval" = "$ol_val" ; then
1190                         ol_arg="$ol_val"
1191                 fi
1192         done
1193         if test "$ol_arg" = "invalid" ; then
1194                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1195         fi
1196         ol_enable_syslog="$ol_arg"
1197
1198 else
1199         ol_enable_syslog="auto"
1200 fi
1201 # end --enable-syslog
1202 # OpenLDAP --enable-proctitle
1203         # Check whether --enable-proctitle or --disable-proctitle was given.
1204 if test "${enable_proctitle+set}" = set; then
1205   enableval="$enable_proctitle"
1206   
1207         ol_arg=invalid
1208         for ol_val in auto yes no ; do
1209                 if test "$enableval" = "$ol_val" ; then
1210                         ol_arg="$ol_val"
1211                 fi
1212         done
1213         if test "$ol_arg" = "invalid" ; then
1214                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1215         fi
1216         ol_enable_proctitle="$ol_arg"
1217
1218 else
1219         ol_enable_proctitle="yes"
1220 fi
1221 # end --enable-proctitle
1222 # OpenLDAP --enable-cache
1223         # Check whether --enable-cache or --disable-cache was given.
1224 if test "${enable_cache+set}" = set; then
1225   enableval="$enable_cache"
1226   
1227         ol_arg=invalid
1228         for ol_val in auto yes no ; do
1229                 if test "$enableval" = "$ol_val" ; then
1230                         ol_arg="$ol_val"
1231                 fi
1232         done
1233         if test "$ol_arg" = "invalid" ; then
1234                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1235         fi
1236         ol_enable_cache="$ol_arg"
1237
1238 else
1239         ol_enable_cache="yes"
1240 fi
1241 # end --enable-cache
1242 # OpenLDAP --enable-dns
1243         # Check whether --enable-dns or --disable-dns was given.
1244 if test "${enable_dns+set}" = set; then
1245   enableval="$enable_dns"
1246   
1247         ol_arg=invalid
1248         for ol_val in auto yes no ; do
1249                 if test "$enableval" = "$ol_val" ; then
1250                         ol_arg="$ol_val"
1251                 fi
1252         done
1253         if test "$ol_arg" = "invalid" ; then
1254                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1255         fi
1256         ol_enable_dns="$ol_arg"
1257
1258 else
1259         ol_enable_dns="no"
1260 fi
1261 # end --enable-dns
1262 # OpenLDAP --enable-referrals
1263         # Check whether --enable-referrals or --disable-referrals was given.
1264 if test "${enable_referrals+set}" = set; then
1265   enableval="$enable_referrals"
1266   
1267         ol_arg=invalid
1268         for ol_val in auto yes no ; do
1269                 if test "$enableval" = "$ol_val" ; then
1270                         ol_arg="$ol_val"
1271                 fi
1272         done
1273         if test "$ol_arg" = "invalid" ; then
1274                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1275         fi
1276         ol_enable_referrals="$ol_arg"
1277
1278 else
1279         ol_enable_referrals="yes"
1280 fi
1281 # end --enable-referrals
1282 # OpenLDAP --enable-cldap
1283         # Check whether --enable-cldap or --disable-cldap was given.
1284 if test "${enable_cldap+set}" = set; then
1285   enableval="$enable_cldap"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no ; do
1289                 if test "$enableval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1295         fi
1296         ol_enable_cldap="$ol_arg"
1297
1298 else
1299         ol_enable_cldap="no"
1300 fi
1301 # end --enable-cldap
1302 # OpenLDAP --enable-x_compile
1303         # Check whether --enable-x_compile or --disable-x_compile was given.
1304 if test "${enable_x_compile+set}" = set; then
1305   enableval="$enable_x_compile"
1306   
1307         ol_arg=invalid
1308         for ol_val in yes no ; do
1309                 if test "$enableval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1315         fi
1316         ol_enable_x_compile="$ol_arg"
1317
1318 else
1319         ol_enable_x_compile="no"
1320 fi
1321 # end --enable-x_compile
1322
1323 # OpenLDAP --enable-dmalloc
1324         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1325 if test "${enable_dmalloc+set}" = set; then
1326   enableval="$enable_dmalloc"
1327   
1328         ol_arg=invalid
1329         for ol_val in auto yes no ; do
1330                 if test "$enableval" = "$ol_val" ; then
1331                         ol_arg="$ol_val"
1332                 fi
1333         done
1334         if test "$ol_arg" = "invalid" ; then
1335                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1336         fi
1337         ol_enable_dmalloc="$ol_arg"
1338
1339 else
1340         ol_enable_dmalloc="no"
1341 fi
1342 # end --enable-dmalloc
1343
1344 # OpenLDAP --with-cyrus_sasl
1345         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1346 if test "${with_cyrus_sasl+set}" = set; then
1347   withval="$with_cyrus_sasl"
1348   
1349         ol_arg=invalid
1350         for ol_val in auto yes no  ; do
1351                 if test "$withval" = "$ol_val" ; then
1352                         ol_arg="$ol_val"
1353                 fi
1354         done
1355         if test "$ol_arg" = "invalid" ; then
1356                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1357         fi
1358         ol_with_cyrus_sasl="$ol_arg"
1359
1360 else
1361         ol_with_cyrus_sasl="auto"
1362 fi
1363 # end --with-cyrus_sasl
1364
1365 # OpenLDAP --with-fetch
1366         # Check whether --with-fetch or --without-fetch was given.
1367 if test "${with_fetch+set}" = set; then
1368   withval="$with_fetch"
1369   
1370         ol_arg=invalid
1371         for ol_val in auto yes no  ; do
1372                 if test "$withval" = "$ol_val" ; then
1373                         ol_arg="$ol_val"
1374                 fi
1375         done
1376         if test "$ol_arg" = "invalid" ; then
1377                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1378         fi
1379         ol_with_fetch="$ol_arg"
1380
1381 else
1382         ol_with_fetch="auto"
1383 fi
1384 # end --with-fetch
1385
1386 # OpenLDAP --with-kerberos
1387         # Check whether --with-kerberos or --without-kerberos was given.
1388 if test "${with_kerberos+set}" = set; then
1389   withval="$with_kerberos"
1390   
1391         ol_arg=invalid
1392         for ol_val in auto k5 k4 afs yes no ; do
1393                 if test "$withval" = "$ol_val" ; then
1394                         ol_arg="$ol_val"
1395                 fi
1396         done
1397         if test "$ol_arg" = "invalid" ; then
1398                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1399         fi
1400         ol_with_kerberos="$ol_arg"
1401
1402 else
1403         ol_with_kerberos="auto"
1404 fi
1405 # end --with-kerberos
1406
1407 # OpenLDAP --with-readline
1408         # Check whether --with-readline or --without-readline was given.
1409 if test "${with_readline+set}" = set; then
1410   withval="$with_readline"
1411   
1412         ol_arg=invalid
1413         for ol_val in auto yes no  ; do
1414                 if test "$withval" = "$ol_val" ; then
1415                         ol_arg="$ol_val"
1416                 fi
1417         done
1418         if test "$ol_arg" = "invalid" ; then
1419                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1420         fi
1421         ol_with_readline="$ol_arg"
1422
1423 else
1424         ol_with_readline="auto"
1425 fi
1426 # end --with-readline
1427
1428 # OpenLDAP --with-threads
1429         # Check whether --with-threads or --without-threads was given.
1430 if test "${with_threads+set}" = set; then
1431   withval="$with_threads"
1432   
1433         ol_arg=invalid
1434         for ol_val in auto posix mach pth lwp yes no manual  ; do
1435                 if test "$withval" = "$ol_val" ; then
1436                         ol_arg="$ol_val"
1437                 fi
1438         done
1439         if test "$ol_arg" = "invalid" ; then
1440                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1441         fi
1442         ol_with_threads="$ol_arg"
1443
1444 else
1445         ol_with_threads="auto"
1446 fi
1447 # end --with-threads
1448
1449 # OpenLDAP --with-tls
1450         # Check whether --with-tls or --without-tls was given.
1451 if test "${with_tls+set}" = set; then
1452   withval="$with_tls"
1453   
1454         ol_arg=invalid
1455         for ol_val in auto ssleay openssl yes no  ; do
1456                 if test "$withval" = "$ol_val" ; then
1457                         ol_arg="$ol_val"
1458                 fi
1459         done
1460         if test "$ol_arg" = "invalid" ; then
1461                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1462         fi
1463         ol_with_tls="$ol_arg"
1464
1465 else
1466         ol_with_tls="auto"
1467 fi
1468 # end --with-tls
1469
1470 # OpenLDAP --with-yielding_select
1471         # Check whether --with-yielding_select or --without-yielding_select was given.
1472 if test "${with_yielding_select+set}" = set; then
1473   withval="$with_yielding_select"
1474   
1475         ol_arg=invalid
1476         for ol_val in auto yes no manual  ; do
1477                 if test "$withval" = "$ol_val" ; then
1478                         ol_arg="$ol_val"
1479                 fi
1480         done
1481         if test "$ol_arg" = "invalid" ; then
1482                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1483         fi
1484         ol_with_yielding_select="$ol_arg"
1485
1486 else
1487         ol_with_yielding_select="auto"
1488 fi
1489 # end --with-yielding_select
1490
1491
1492
1493 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1494 if test "${with_xxldapdoptions+set}" = set; then
1495   withval="$with_xxldapdoptions"
1496   :
1497 fi
1498
1499 # OpenLDAP --enable-ldapd
1500         # Check whether --enable-ldapd or --disable-ldapd was given.
1501 if test "${enable_ldapd+set}" = set; then
1502   enableval="$enable_ldapd"
1503   
1504         ol_arg=invalid
1505         for ol_val in auto yes no ; do
1506                 if test "$enableval" = "$ol_val" ; then
1507                         ol_arg="$ol_val"
1508                 fi
1509         done
1510         if test "$ol_arg" = "invalid" ; then
1511                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1512         fi
1513         ol_enable_ldapd="$ol_arg"
1514
1515 else
1516         ol_enable_ldapd="no"
1517 fi
1518 # end --enable-ldapd
1519
1520 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1521 if test "${with_xxslapdoptions+set}" = set; then
1522   withval="$with_xxslapdoptions"
1523   :
1524 fi
1525
1526 # OpenLDAP --enable-slapd
1527         # Check whether --enable-slapd or --disable-slapd was given.
1528 if test "${enable_slapd+set}" = set; then
1529   enableval="$enable_slapd"
1530   
1531         ol_arg=invalid
1532         for ol_val in auto yes no ; do
1533                 if test "$enableval" = "$ol_val" ; then
1534                         ol_arg="$ol_val"
1535                 fi
1536         done
1537         if test "$ol_arg" = "invalid" ; then
1538                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1539         fi
1540         ol_enable_slapd="$ol_arg"
1541
1542 else
1543         ol_enable_slapd="yes"
1544 fi
1545 # end --enable-slapd
1546 # OpenLDAP --enable-cleartext
1547         # Check whether --enable-cleartext or --disable-cleartext was given.
1548 if test "${enable_cleartext+set}" = set; then
1549   enableval="$enable_cleartext"
1550   
1551         ol_arg=invalid
1552         for ol_val in auto yes no ; do
1553                 if test "$enableval" = "$ol_val" ; then
1554                         ol_arg="$ol_val"
1555                 fi
1556         done
1557         if test "$ol_arg" = "invalid" ; then
1558                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1559         fi
1560         ol_enable_cleartext="$ol_arg"
1561
1562 else
1563         ol_enable_cleartext="yes"
1564 fi
1565 # end --enable-cleartext
1566 # OpenLDAP --enable-crypt
1567         # Check whether --enable-crypt or --disable-crypt was given.
1568 if test "${enable_crypt+set}" = set; then
1569   enableval="$enable_crypt"
1570   
1571         ol_arg=invalid
1572         for ol_val in auto yes no ; do
1573                 if test "$enableval" = "$ol_val" ; then
1574                         ol_arg="$ol_val"
1575                 fi
1576         done
1577         if test "$ol_arg" = "invalid" ; then
1578                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1579         fi
1580         ol_enable_crypt="$ol_arg"
1581
1582 else
1583         ol_enable_crypt="auto"
1584 fi
1585 # end --enable-crypt
1586 # OpenLDAP --enable-modules
1587         # Check whether --enable-modules or --disable-modules was given.
1588 if test "${enable_modules+set}" = set; then
1589   enableval="$enable_modules"
1590   
1591         ol_arg=invalid
1592         for ol_val in auto yes no ; do
1593                 if test "$enableval" = "$ol_val" ; then
1594                         ol_arg="$ol_val"
1595                 fi
1596         done
1597         if test "$ol_arg" = "invalid" ; then
1598                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1599         fi
1600         ol_enable_modules="$ol_arg"
1601
1602 else
1603         ol_enable_modules="no"
1604 fi
1605 # end --enable-modules
1606 # OpenLDAP --enable-multimaster
1607         # Check whether --enable-multimaster or --disable-multimaster was given.
1608 if test "${enable_multimaster+set}" = set; then
1609   enableval="$enable_multimaster"
1610   
1611         ol_arg=invalid
1612         for ol_val in auto yes no ; do
1613                 if test "$enableval" = "$ol_val" ; then
1614                         ol_arg="$ol_val"
1615                 fi
1616         done
1617         if test "$ol_arg" = "invalid" ; then
1618                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1619         fi
1620         ol_enable_multimaster="$ol_arg"
1621
1622 else
1623         ol_enable_multimaster="no"
1624 fi
1625 # end --enable-multimaster
1626 # OpenLDAP --enable-phonetic
1627         # Check whether --enable-phonetic or --disable-phonetic was given.
1628 if test "${enable_phonetic+set}" = set; then
1629   enableval="$enable_phonetic"
1630   
1631         ol_arg=invalid
1632         for ol_val in auto yes no ; do
1633                 if test "$enableval" = "$ol_val" ; then
1634                         ol_arg="$ol_val"
1635                 fi
1636         done
1637         if test "$ol_arg" = "invalid" ; then
1638                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1639         fi
1640         ol_enable_phonetic="$ol_arg"
1641
1642 else
1643         ol_enable_phonetic="no"
1644 fi
1645 # end --enable-phonetic
1646 # OpenLDAP --enable-quipu
1647         # Check whether --enable-quipu or --disable-quipu was given.
1648 if test "${enable_quipu+set}" = set; then
1649   enableval="$enable_quipu"
1650   
1651         ol_arg=invalid
1652         for ol_val in auto yes no ; do
1653                 if test "$enableval" = "$ol_val" ; then
1654                         ol_arg="$ol_val"
1655                 fi
1656         done
1657         if test "$ol_arg" = "invalid" ; then
1658                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1659         fi
1660         ol_enable_quipu="$ol_arg"
1661
1662 else
1663         ol_enable_quipu="no"
1664 fi
1665 # end --enable-quipu
1666 # OpenLDAP --enable-rlookups
1667         # Check whether --enable-rlookups or --disable-rlookups was given.
1668 if test "${enable_rlookups+set}" = set; then
1669   enableval="$enable_rlookups"
1670   
1671         ol_arg=invalid
1672         for ol_val in auto yes no ; do
1673                 if test "$enableval" = "$ol_val" ; then
1674                         ol_arg="$ol_val"
1675                 fi
1676         done
1677         if test "$ol_arg" = "invalid" ; then
1678                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1679         fi
1680         ol_enable_rlookups="$ol_arg"
1681
1682 else
1683         ol_enable_rlookups="auto"
1684 fi
1685 # end --enable-rlookups
1686 # OpenLDAP --enable-aci
1687         # Check whether --enable-aci or --disable-aci was given.
1688 if test "${enable_aci+set}" = set; then
1689   enableval="$enable_aci"
1690   
1691         ol_arg=invalid
1692         for ol_val in auto yes no ; do
1693                 if test "$enableval" = "$ol_val" ; then
1694                         ol_arg="$ol_val"
1695                 fi
1696         done
1697         if test "$ol_arg" = "invalid" ; then
1698                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1699         fi
1700         ol_enable_aci="$ol_arg"
1701
1702 else
1703         ol_enable_aci="no"
1704 fi
1705 # end --enable-aci
1706 # OpenLDAP --enable-discreteaci
1707         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1708 if test "${enable_discreteaci+set}" = set; then
1709   enableval="$enable_discreteaci"
1710   
1711         ol_arg=invalid
1712         for ol_val in auto yes no ; do
1713                 if test "$enableval" = "$ol_val" ; then
1714                         ol_arg="$ol_val"
1715                 fi
1716         done
1717         if test "$ol_arg" = "invalid" ; then
1718                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1719         fi
1720         ol_enable_discreteaci="$ol_arg"
1721
1722 else
1723         ol_enable_discreteaci="no"
1724 fi
1725 # end --enable-discreteaci
1726 # OpenLDAP --enable-wrappers
1727         # Check whether --enable-wrappers or --disable-wrappers was given.
1728 if test "${enable_wrappers+set}" = set; then
1729   enableval="$enable_wrappers"
1730   
1731         ol_arg=invalid
1732         for ol_val in auto yes no ; do
1733                 if test "$enableval" = "$ol_val" ; then
1734                         ol_arg="$ol_val"
1735                 fi
1736         done
1737         if test "$ol_arg" = "invalid" ; then
1738                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1739         fi
1740         ol_enable_wrappers="$ol_arg"
1741
1742 else
1743         ol_enable_wrappers="no"
1744 fi
1745 # end --enable-wrappers
1746
1747 # OpenLDAP --enable-bdb2
1748         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1749 if test "${enable_bdb2+set}" = set; then
1750   enableval="$enable_bdb2"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1760         fi
1761         ol_enable_bdb2="$ol_arg"
1762
1763 else
1764         ol_enable_bdb2="no"
1765 fi
1766 # end --enable-bdb2
1767 # OpenLDAP --with-bdb2_module
1768         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1769 if test "${with_bdb2_module+set}" = set; then
1770   withval="$with_bdb2_module"
1771   
1772         ol_arg=invalid
1773         for ol_val in static dynamic ; do
1774                 if test "$withval" = "$ol_val" ; then
1775                         ol_arg="$ol_val"
1776                 fi
1777         done
1778         if test "$ol_arg" = "invalid" ; then
1779                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1780         fi
1781         ol_with_bdb2_module="$ol_arg"
1782
1783 else
1784         ol_with_bdb2_module="static"
1785 fi
1786 # end --with-bdb2_module
1787
1788 # OpenLDAP --enable-ldap
1789         # Check whether --enable-ldap or --disable-ldap was given.
1790 if test "${enable_ldap+set}" = set; then
1791   enableval="$enable_ldap"
1792   
1793         ol_arg=invalid
1794         for ol_val in auto yes no ; do
1795                 if test "$enableval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1801         fi
1802         ol_enable_ldap="$ol_arg"
1803
1804 else
1805         ol_enable_ldap="no"
1806 fi
1807 # end --enable-ldap
1808 # OpenLDAP --with-ldap_module
1809         # Check whether --with-ldap_module or --without-ldap_module was given.
1810 if test "${with_ldap_module+set}" = set; then
1811   withval="$with_ldap_module"
1812   
1813         ol_arg=invalid
1814         for ol_val in static dynamic ; do
1815                 if test "$withval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1821         fi
1822         ol_with_ldap_module="$ol_arg"
1823
1824 else
1825         ol_with_ldap_module="static"
1826 fi
1827 # end --with-ldap_module
1828
1829 # OpenLDAP --enable-ldbm
1830         # Check whether --enable-ldbm or --disable-ldbm was given.
1831 if test "${enable_ldbm+set}" = set; then
1832   enableval="$enable_ldbm"
1833   
1834         ol_arg=invalid
1835         for ol_val in auto yes no ; do
1836                 if test "$enableval" = "$ol_val" ; then
1837                         ol_arg="$ol_val"
1838                 fi
1839         done
1840         if test "$ol_arg" = "invalid" ; then
1841                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1842         fi
1843         ol_enable_ldbm="$ol_arg"
1844
1845 else
1846         ol_enable_ldbm="yes"
1847 fi
1848 # end --enable-ldbm
1849 # OpenLDAP --with-ldbm_api
1850         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1851 if test "${with_ldbm_api+set}" = set; then
1852   withval="$with_ldbm_api"
1853   
1854         ol_arg=invalid
1855         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1856                 if test "$withval" = "$ol_val" ; then
1857                         ol_arg="$ol_val"
1858                 fi
1859         done
1860         if test "$ol_arg" = "invalid" ; then
1861                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1862         fi
1863         ol_with_ldbm_api="$ol_arg"
1864
1865 else
1866         ol_with_ldbm_api="auto"
1867 fi
1868 # end --with-ldbm_api
1869
1870 # OpenLDAP --with-ldbm_module
1871         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1872 if test "${with_ldbm_module+set}" = set; then
1873   withval="$with_ldbm_module"
1874   
1875         ol_arg=invalid
1876         for ol_val in static dynamic ; do
1877                 if test "$withval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1883         fi
1884         ol_with_ldbm_module="$ol_arg"
1885
1886 else
1887         ol_with_ldbm_module="static"
1888 fi
1889 # end --with-ldbm_module
1890
1891 # OpenLDAP --with-ldbm_type
1892         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1893 if test "${with_ldbm_type+set}" = set; then
1894   withval="$with_ldbm_type"
1895   
1896         ol_arg=invalid
1897         for ol_val in auto btree hash ; do
1898                 if test "$withval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1904         fi
1905         ol_with_ldbm_type="$ol_arg"
1906
1907 else
1908         ol_with_ldbm_type="auto"
1909 fi
1910 # end --with-ldbm_type
1911
1912
1913 # OpenLDAP --enable-passwd
1914         # Check whether --enable-passwd or --disable-passwd was given.
1915 if test "${enable_passwd+set}" = set; then
1916   enableval="$enable_passwd"
1917   
1918         ol_arg=invalid
1919         for ol_val in auto yes no ; do
1920                 if test "$enableval" = "$ol_val" ; then
1921                         ol_arg="$ol_val"
1922                 fi
1923         done
1924         if test "$ol_arg" = "invalid" ; then
1925                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1926         fi
1927         ol_enable_passwd="$ol_arg"
1928
1929 else
1930         ol_enable_passwd="no"
1931 fi
1932 # end --enable-passwd
1933 # OpenLDAP --with-passwd_module
1934         # Check whether --with-passwd_module or --without-passwd_module was given.
1935 if test "${with_passwd_module+set}" = set; then
1936   withval="$with_passwd_module"
1937   
1938         ol_arg=invalid
1939         for ol_val in static dynamic ; do
1940                 if test "$withval" = "$ol_val" ; then
1941                         ol_arg="$ol_val"
1942                 fi
1943         done
1944         if test "$ol_arg" = "invalid" ; then
1945                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1946         fi
1947         ol_with_passwd_module="$ol_arg"
1948
1949 else
1950         ol_with_passwd_module="static"
1951 fi
1952 # end --with-passwd_module
1953
1954 # OpenLDAP --enable-perl
1955         # Check whether --enable-perl or --disable-perl was given.
1956 if test "${enable_perl+set}" = set; then
1957   enableval="$enable_perl"
1958   
1959         ol_arg=invalid
1960         for ol_val in auto yes no ; do
1961                 if test "$enableval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1967         fi
1968         ol_enable_perl="$ol_arg"
1969
1970 else
1971         ol_enable_perl="no"
1972 fi
1973 # end --enable-perl
1974 # OpenLDAP --with-perl_module
1975         # Check whether --with-perl_module or --without-perl_module was given.
1976 if test "${with_perl_module+set}" = set; then
1977   withval="$with_perl_module"
1978   
1979         ol_arg=invalid
1980         for ol_val in static dynamic ; do
1981                 if test "$withval" = "$ol_val" ; then
1982                         ol_arg="$ol_val"
1983                 fi
1984         done
1985         if test "$ol_arg" = "invalid" ; then
1986                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1987         fi
1988         ol_with_perl_module="$ol_arg"
1989
1990 else
1991         ol_with_perl_module="static"
1992 fi
1993 # end --with-perl_module
1994
1995 # OpenLDAP --enable-shell
1996         # Check whether --enable-shell or --disable-shell was given.
1997 if test "${enable_shell+set}" = set; then
1998   enableval="$enable_shell"
1999   
2000         ol_arg=invalid
2001         for ol_val in auto yes no ; do
2002                 if test "$enableval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2008         fi
2009         ol_enable_shell="$ol_arg"
2010
2011 else
2012         ol_enable_shell="no"
2013 fi
2014 # end --enable-shell
2015 # OpenLDAP --with-shell_module
2016         # Check whether --with-shell_module or --without-shell_module was given.
2017 if test "${with_shell_module+set}" = set; then
2018   withval="$with_shell_module"
2019   
2020         ol_arg=invalid
2021         for ol_val in static dynamic ; do
2022                 if test "$withval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2028         fi
2029         ol_with_shell_module="$ol_arg"
2030
2031 else
2032         ol_with_shell_module="static"
2033 fi
2034 # end --with-shell_module
2035
2036 # OpenLDAP --enable-tcl
2037         # Check whether --enable-tcl or --disable-tcl was given.
2038 if test "${enable_tcl+set}" = set; then
2039   enableval="$enable_tcl"
2040   
2041         ol_arg=invalid
2042         for ol_val in auto yes no ; do
2043                 if test "$enableval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2049         fi
2050         ol_enable_tcl="$ol_arg"
2051
2052 else
2053         ol_enable_tcl="no"
2054 fi
2055 # end --enable-tcl
2056 # OpenLDAP --with-tcl_module
2057         # Check whether --with-tcl_module or --without-tcl_module was given.
2058 if test "${with_tcl_module+set}" = set; then
2059   withval="$with_tcl_module"
2060   
2061         ol_arg=invalid
2062         for ol_val in static dynamic ; do
2063                 if test "$withval" = "$ol_val" ; then
2064                         ol_arg="$ol_val"
2065                 fi
2066         done
2067         if test "$ol_arg" = "invalid" ; then
2068                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2069         fi
2070         ol_with_tcl_module="$ol_arg"
2071
2072 else
2073         ol_with_tcl_module="static"
2074 fi
2075 # end --with-tcl_module
2076
2077
2078 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2079 if test "${with_xxslurpdoptions+set}" = set; then
2080   withval="$with_xxslurpdoptions"
2081   :
2082 fi
2083
2084 # OpenLDAP --enable-slurpd
2085         # Check whether --enable-slurpd or --disable-slurpd was given.
2086 if test "${enable_slurpd+set}" = set; then
2087   enableval="$enable_slurpd"
2088   
2089         ol_arg=invalid
2090         for ol_val in auto yes no ; do
2091                 if test "$enableval" = "$ol_val" ; then
2092                         ol_arg="$ol_val"
2093                 fi
2094         done
2095         if test "$ol_arg" = "invalid" ; then
2096                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2097         fi
2098         ol_enable_slurpd="$ol_arg"
2099
2100 else
2101         ol_enable_slurpd="auto"
2102 fi
2103 # end --enable-slurpd
2104
2105 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2106 if test "${with_xxliboptions+set}" = set; then
2107   withval="$with_xxliboptions"
2108   :
2109 fi
2110
2111 # Check whether --enable-static or --disable-static was given.
2112 if test "${enable_static+set}" = set; then
2113   enableval="$enable_static"
2114   p=${PACKAGE-default}
2115 case "$enableval" in
2116 yes) enable_static=yes ;;
2117 no) enable_static=no ;;
2118 *)
2119   enable_static=no
2120   # Look at the argument we got.  We use all the common list separators.
2121   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2122   for pkg in $enableval; do
2123     if test "X$pkg" = "X$p"; then
2124       enable_static=yes
2125     fi
2126   done
2127   IFS="$ac_save_ifs"
2128   ;;
2129 esac
2130 else
2131   enable_static=yes
2132 fi
2133
2134 # Check whether --enable-shared or --disable-shared was given.
2135 if test "${enable_shared+set}" = set; then
2136   enableval="$enable_shared"
2137   p=${PACKAGE-default}
2138 case "$enableval" in
2139 yes) enable_shared=yes ;;
2140 no) enable_shared=no ;;
2141 *)
2142   enable_shared=no
2143   # Look at the argument we got.  We use all the common list separators.
2144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2145   for pkg in $enableval; do
2146     if test "X$pkg" = "X$p"; then
2147       enable_shared=yes
2148     fi
2149   done
2150   IFS="$ac_save_ifs"
2151   ;;
2152 esac
2153 else
2154   enable_shared=yes
2155 fi
2156
2157
2158 # validate options
2159 if test $ol_enable_dns = yes ; then
2160         if test $ol_enable_referrals = no ; then
2161                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2162         fi
2163         if test $ol_enable_referrals = auto ; then
2164                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2165                 ol_enable_referrals=yes
2166         fi
2167 fi
2168
2169 if test $ol_enable_slapd = no ; then
2170                 if test $ol_enable_bdb2 = yes ; then
2171                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2172         fi
2173         if test $ol_enable_ldap = yes ; then
2174                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2175         fi
2176         if test $ol_enable_ldbm = yes ; then
2177                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2178         fi
2179         if test $ol_enable_passwd = yes ; then
2180                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2181         fi
2182         if test $ol_enable_perl = yes ; then
2183                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2184         fi
2185         if test $ol_enable_shell = yes ; then
2186                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2187         fi
2188         if test $ol_enable_tcl = yes ; then
2189                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2190         fi
2191         if test $ol_enable_modules = yes ; then
2192                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2193         fi
2194         if test $ol_enable_multimaster = yes ; then
2195                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2196         fi
2197         if test $ol_enable_wrappers = yes ; then
2198                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2199         fi
2200         if test $ol_enable_phonetic = yes ; then
2201                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2202         fi
2203         if test $ol_enable_quipu = yes ; then
2204                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2205         fi
2206         if test $ol_enable_rlookups = yes ; then
2207                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2208         fi
2209         if test $ol_enable_aci = yes ; then
2210                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2211         fi
2212         if test $ol_enable_discreteaci = yes ; then
2213                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2214         fi
2215         if test $ol_with_ldbm_api != auto ; then
2216                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2217         fi
2218         if test $ol_with_ldbm_type != auto ; then
2219                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2220         fi
2221         if test $ol_with_bdb2_module != static ; then
2222                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2223         fi
2224         if test $ol_with_ldap_module != static ; then
2225                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2226         fi
2227         if test $ol_with_ldbm_module != static ; then
2228                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2229         fi
2230         if test $ol_with_passwd_module != static ; then
2231                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2232         fi
2233         if test $ol_with_perl_module != static ; then
2234                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2235         fi
2236         if test $ol_with_shell_module != static ; then
2237                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2238         fi
2239         if test $ol_with_tcl_module != static ; then
2240                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2241         fi
2242         if test $ol_enable_slurpd = yes ; then
2243                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2244         fi
2245
2246         # force settings to no
2247         ol_enable_bdb2=no
2248         ol_enable_ldap=no
2249         ol_enable_ldbm=no
2250         ol_enable_passwd=no
2251         ol_enable_perl=no
2252         ol_enable_shell=no
2253         ol_enable_tcl=no
2254
2255         ol_enable_modules=no
2256         ol_enable_multimaster=no
2257         ol_enable_phonetic=no
2258         ol_enable_quipu=no
2259         ol_enable_rlookups=no
2260         ol_enable_aci=no
2261         ol_enable_discreteaci=no
2262         ol_enable_wrappers=no
2263
2264         ol_with_ldbm_api=no
2265         ol_with_ldbm_type=no
2266
2267         ol_with_bdb2_module=static
2268         ol_with_ldap_module=static
2269         ol_with_ldbm_module=static
2270         ol_with_passwd_module=static
2271         ol_with_perl_module=static
2272         ol_with_shell_module=static
2273         ol_with_tcl_module=static
2274
2275         ol_enable_slurpd=no
2276
2277 elif test $ol_enable_ldbm = no ; then
2278         
2279         if test $ol_with_ldbm_api != auto ; then
2280                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2281         fi
2282
2283         if test $ol_with_ldbm_type != auto ; then
2284                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2285         fi
2286
2287         if test $ol_with_ldbm_module != static ; then
2288                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2289         fi
2290
2291         if test $ol_enable_bdb2 = yes ; then
2292                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2293         fi
2294
2295         if test $ol_enable_modules != yes -a \
2296                 $ol_enable_ldap = no -a \
2297                 $ol_enable_passwd = no -a \
2298                 $ol_enable_perl = no -a \
2299                 $ol_enable_shell = no -a \
2300                 $ol_enable_tcl = no ; then
2301                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2302         fi
2303
2304         ol_with_ldbm_api=no
2305         ol_with_ldbm_type=no
2306         ol_with_ldbm_module=static
2307
2308 elif test $ol_enable_bdb2 = yes ; then
2309         
2310         if test $ol_with_ldbm_api != auto -a \
2311                 $ol_with_ldbm_api != db2 ; then
2312                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2313         fi
2314
2315         ol_with_ldbm_api=db2
2316
2317 else
2318         
2319         if test $ol_enable_bdb2 != no ; then
2320                 if test $ol_with_ldbm_api != auto -a \
2321                         $ol_with_ldbm_api != db2 ; then
2322                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2323                         ol_enable_bdb2=no
2324                 fi
2325         fi
2326
2327         if test $ol_with_ldbm_api = gdbm -a \
2328                 $ol_with_ldbm_type = btree ; then
2329                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2330         fi
2331         if test $ol_with_ldbm_api = mdbm -a \
2332                 $ol_with_ldbm_type = btree ; then
2333                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2334         fi
2335         if test $ol_with_ldbm_api = ndbm -a \
2336                 $ol_with_ldbm_type = btree ; then
2337                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2338         fi
2339 fi
2340
2341 if test $ol_enable_slurpd = yes ; then
2342                 if test $ol_with_threads = no ; then
2343                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2344         fi
2345 fi
2346
2347 echo "$ac_t""done" 1>&6
2348
2349 ## Initialize vars
2350 LDAP_LIBS=
2351 LDIF_LIBS=
2352 LDBM_LIBS=
2353 LTHREAD_LIBS=
2354 LUTIL_LIBS=
2355
2356 LDAPD_LIBS=
2357 SLAPD_LIBS=
2358 SLURPD_LIBS=
2359
2360 BUILD_LDAPD=no
2361 BUILD_SLAPD=no
2362 BUILD_SLURPD=no
2363
2364 BUILD_BDB2=no
2365 BUILD_LDAP=no
2366 BUILD_LDBM=no
2367 BUILD_PASSWD=no
2368 BUILD_PERL=no
2369 BUILD_QUIPU=no
2370 BUILD_SHELL=no
2371 BUILD_TCL=no
2372 BUILD_THREAD=no
2373
2374 BUILD_BDB2_DYNAMIC=static
2375 BUILD_LDAP_DYNAMIC=static
2376 BUILD_LDBM_DYNAMIC=static
2377 BUILD_PASSWD_DYNAMIC=static
2378 BUILD_PERL_DYNAMIC=static
2379 BUILD_SHELL_DYNAMIC=static
2380 BUILD_TCL_DYNAMIC=static
2381
2382 SLAPD_MODULES_LDFLAGS=
2383 SLAPD_MODULES_CPPFLAGS=
2384 SLAPD_MODULES_LIST=
2385
2386 SLAPD_PERL_LDFLAGS=
2387 SLAPD_PERL_CPPFLAGS=
2388
2389 KRB_LIBS=
2390 READLINE_LIBS=
2391 SASL_LIBS=
2392 TERMCAP_LIBS=
2393 TLS_LIBS=
2394 MODULES_LIBS=
2395
2396
2397
2398 cat >> confdefs.h <<\EOF
2399 #define HAVE_MKVERSION 1
2400 EOF
2401
2402
2403
2404
2405 ol_aix_threads=no
2406 case "$target" in
2407 *-*-aix*)       if test -z "$CC" ; then
2408                 case "$ol_with_threads" in
2409                 auto | yes |  posix) ol_aix_threads=yes ;;
2410                 esac
2411         fi
2412 ;;
2413 esac
2414
2415 if test $ol_aix_threads = yes ; then
2416         if test -z "${CC}" ; then
2417                 for ac_prog in cc_r xlc_r cc
2418 do
2419 # Extract the first word of "$ac_prog", so it can be a program name with args.
2420 set dummy $ac_prog; ac_word=$2
2421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2422 echo "configure:2423: checking for $ac_word" >&5
2423 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2424   echo $ac_n "(cached) $ac_c" 1>&6
2425 else
2426   if test -n "$CC"; then
2427   ac_cv_prog_CC="$CC" # Let the user override the test.
2428 else
2429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2430   ac_dummy="$PATH"
2431   for ac_dir in $ac_dummy; do
2432     test -z "$ac_dir" && ac_dir=.
2433     if test -f $ac_dir/$ac_word; then
2434       ac_cv_prog_CC="$ac_prog"
2435       break
2436     fi
2437   done
2438   IFS="$ac_save_ifs"
2439 fi
2440 fi
2441 CC="$ac_cv_prog_CC"
2442 if test -n "$CC"; then
2443   echo "$ac_t""$CC" 1>&6
2444 else
2445   echo "$ac_t""no" 1>&6
2446 fi
2447
2448 test -n "$CC" && break
2449 done
2450
2451
2452                 if test "$CC" = cc ; then
2453                                                 if test $ol_with_threads != auto ; then
2454                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2455                         else
2456                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2457                         fi
2458                         ol_with_threads=no
2459                 fi
2460         fi
2461
2462         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2463                 ol_with_threads=posix
2464                 ol_cv_pthread_create=yes
2465         fi
2466 fi
2467
2468 if test -z "${CC}"; then
2469         for ac_prog in cc
2470 do
2471 # Extract the first word of "$ac_prog", so it can be a program name with args.
2472 set dummy $ac_prog; ac_word=$2
2473 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2474 echo "configure:2475: checking for $ac_word" >&5
2475 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2476   echo $ac_n "(cached) $ac_c" 1>&6
2477 else
2478   if test -n "$CC"; then
2479   ac_cv_prog_CC="$CC" # Let the user override the test.
2480 else
2481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2482   ac_dummy="$PATH"
2483   for ac_dir in $ac_dummy; do
2484     test -z "$ac_dir" && ac_dir=.
2485     if test -f $ac_dir/$ac_word; then
2486       ac_cv_prog_CC="$ac_prog"
2487       break
2488     fi
2489   done
2490   IFS="$ac_save_ifs"
2491 fi
2492 fi
2493 CC="$ac_cv_prog_CC"
2494 if test -n "$CC"; then
2495   echo "$ac_t""$CC" 1>&6
2496 else
2497   echo "$ac_t""no" 1>&6
2498 fi
2499
2500 test -n "$CC" && break
2501 done
2502
2503 fi
2504
2505
2506
2507 # Check whether --enable-fast-install or --disable-fast-install was given.
2508 if test "${enable_fast_install+set}" = set; then
2509   enableval="$enable_fast_install"
2510   p=${PACKAGE-default}
2511 case "$enableval" in
2512 yes) enable_fast_install=yes ;;
2513 no) enable_fast_install=no ;;
2514 *)
2515   enable_fast_install=no
2516   # Look at the argument we got.  We use all the common list separators.
2517   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2518   for pkg in $enableval; do
2519     if test "X$pkg" = "X$p"; then
2520       enable_fast_install=yes
2521     fi
2522   done
2523   IFS="$ac_save_ifs"
2524   ;;
2525 esac
2526 else
2527   enable_fast_install=yes
2528 fi
2529
2530 # Extract the first word of "ranlib", so it can be a program name with args.
2531 set dummy ranlib; ac_word=$2
2532 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2533 echo "configure:2534: checking for $ac_word" >&5
2534 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2535   echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537   if test -n "$RANLIB"; then
2538   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2539 else
2540   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2541   ac_dummy="$PATH"
2542   for ac_dir in $ac_dummy; do
2543     test -z "$ac_dir" && ac_dir=.
2544     if test -f $ac_dir/$ac_word; then
2545       ac_cv_prog_RANLIB="ranlib"
2546       break
2547     fi
2548   done
2549   IFS="$ac_save_ifs"
2550   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2551 fi
2552 fi
2553 RANLIB="$ac_cv_prog_RANLIB"
2554 if test -n "$RANLIB"; then
2555   echo "$ac_t""$RANLIB" 1>&6
2556 else
2557   echo "$ac_t""no" 1>&6
2558 fi
2559
2560 # Extract the first word of "gcc", so it can be a program name with args.
2561 set dummy gcc; ac_word=$2
2562 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2563 echo "configure:2564: checking for $ac_word" >&5
2564 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2565   echo $ac_n "(cached) $ac_c" 1>&6
2566 else
2567   if test -n "$CC"; then
2568   ac_cv_prog_CC="$CC" # Let the user override the test.
2569 else
2570   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2571   ac_dummy="$PATH"
2572   for ac_dir in $ac_dummy; do
2573     test -z "$ac_dir" && ac_dir=.
2574     if test -f $ac_dir/$ac_word; then
2575       ac_cv_prog_CC="gcc"
2576       break
2577     fi
2578   done
2579   IFS="$ac_save_ifs"
2580 fi
2581 fi
2582 CC="$ac_cv_prog_CC"
2583 if test -n "$CC"; then
2584   echo "$ac_t""$CC" 1>&6
2585 else
2586   echo "$ac_t""no" 1>&6
2587 fi
2588
2589 if test -z "$CC"; then
2590   # Extract the first word of "cc", so it can be a program name with args.
2591 set dummy cc; ac_word=$2
2592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2593 echo "configure:2594: checking for $ac_word" >&5
2594 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2595   echo $ac_n "(cached) $ac_c" 1>&6
2596 else
2597   if test -n "$CC"; then
2598   ac_cv_prog_CC="$CC" # Let the user override the test.
2599 else
2600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2601   ac_prog_rejected=no
2602   ac_dummy="$PATH"
2603   for ac_dir in $ac_dummy; do
2604     test -z "$ac_dir" && ac_dir=.
2605     if test -f $ac_dir/$ac_word; then
2606       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2607         ac_prog_rejected=yes
2608         continue
2609       fi
2610       ac_cv_prog_CC="cc"
2611       break
2612     fi
2613   done
2614   IFS="$ac_save_ifs"
2615 if test $ac_prog_rejected = yes; then
2616   # We found a bogon in the path, so make sure we never use it.
2617   set dummy $ac_cv_prog_CC
2618   shift
2619   if test $# -gt 0; then
2620     # We chose a different compiler from the bogus one.
2621     # However, it has the same basename, so the bogon will be chosen
2622     # first if we set CC to just the basename; use the full file name.
2623     shift
2624     set dummy "$ac_dir/$ac_word" "$@"
2625     shift
2626     ac_cv_prog_CC="$@"
2627   fi
2628 fi
2629 fi
2630 fi
2631 CC="$ac_cv_prog_CC"
2632 if test -n "$CC"; then
2633   echo "$ac_t""$CC" 1>&6
2634 else
2635   echo "$ac_t""no" 1>&6
2636 fi
2637
2638   if test -z "$CC"; then
2639     case "`uname -s`" in
2640     *win32* | *WIN32* | *CYGWIN*)
2641       # Extract the first word of "cl", so it can be a program name with args.
2642 set dummy cl; ac_word=$2
2643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2644 echo "configure:2645: checking for $ac_word" >&5
2645 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   if test -n "$CC"; then
2649   ac_cv_prog_CC="$CC" # Let the user override the test.
2650 else
2651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2652   ac_dummy="$PATH"
2653   for ac_dir in $ac_dummy; do
2654     test -z "$ac_dir" && ac_dir=.
2655     if test -f $ac_dir/$ac_word; then
2656       ac_cv_prog_CC="cl"
2657       break
2658     fi
2659   done
2660   IFS="$ac_save_ifs"
2661 fi
2662 fi
2663 CC="$ac_cv_prog_CC"
2664 if test -n "$CC"; then
2665   echo "$ac_t""$CC" 1>&6
2666 else
2667   echo "$ac_t""no" 1>&6
2668 fi
2669  ;;
2670     esac
2671   fi
2672   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2673 fi
2674
2675 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2676 echo "configure:2677: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2677
2678 ac_ext=c
2679 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2680 ac_cpp='$CPP $CPPFLAGS'
2681 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2682 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2683 cross_compiling=$ac_cv_prog_cc_cross
2684
2685 cat > conftest.$ac_ext << EOF
2686
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689
2690 main(){return(0);}
2691 EOF
2692 if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2693   ac_cv_prog_cc_works=yes
2694   # If we can't run a trivial program, we are probably using a cross compiler.
2695   if (./conftest; exit) 2>/dev/null; then
2696     ac_cv_prog_cc_cross=no
2697   else
2698     ac_cv_prog_cc_cross=yes
2699   fi
2700 else
2701   echo "configure: failed program was:" >&5
2702   cat conftest.$ac_ext >&5
2703   ac_cv_prog_cc_works=no
2704 fi
2705 rm -fr conftest*
2706 ac_ext=c
2707 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2708 ac_cpp='$CPP $CPPFLAGS'
2709 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2710 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2711 cross_compiling=$ac_cv_prog_cc_cross
2712
2713 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2714 if test $ac_cv_prog_cc_works = no; then
2715   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2716 fi
2717 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2718 echo "configure:2719: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2719 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2720 cross_compiling=$ac_cv_prog_cc_cross
2721
2722 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2723 echo "configure:2724: checking whether we are using GNU C" >&5
2724 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2725   echo $ac_n "(cached) $ac_c" 1>&6
2726 else
2727   cat > conftest.c <<EOF
2728 #ifdef __GNUC__
2729   yes;
2730 #endif
2731 EOF
2732 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2733   ac_cv_prog_gcc=yes
2734 else
2735   ac_cv_prog_gcc=no
2736 fi
2737 fi
2738
2739 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2740
2741 if test $ac_cv_prog_gcc = yes; then
2742   GCC=yes
2743 else
2744   GCC=
2745 fi
2746
2747 ac_test_CFLAGS="${CFLAGS+set}"
2748 ac_save_CFLAGS="$CFLAGS"
2749 CFLAGS=
2750 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2751 echo "configure:2752: checking whether ${CC-cc} accepts -g" >&5
2752 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2753   echo $ac_n "(cached) $ac_c" 1>&6
2754 else
2755   echo 'void f(){}' > conftest.c
2756 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2757   ac_cv_prog_cc_g=yes
2758 else
2759   ac_cv_prog_cc_g=no
2760 fi
2761 rm -f conftest*
2762
2763 fi
2764
2765 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2766 if test "$ac_test_CFLAGS" = set; then
2767   CFLAGS="$ac_save_CFLAGS"
2768 elif test $ac_cv_prog_cc_g = yes; then
2769   if test "$GCC" = yes; then
2770     CFLAGS="-g -O2"
2771   else
2772     CFLAGS="-g"
2773   fi
2774 else
2775   if test "$GCC" = yes; then
2776     CFLAGS="-O2"
2777   else
2778     CFLAGS=
2779   fi
2780 fi
2781
2782 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2783 if test "${with_gnu_ld+set}" = set; then
2784   withval="$with_gnu_ld"
2785   test "$withval" = no || with_gnu_ld=yes
2786 else
2787   with_gnu_ld=no
2788 fi
2789
2790 ac_prog=ld
2791 if test "$ac_cv_prog_gcc" = yes; then
2792   # Check if gcc -print-prog-name=ld gives a path.
2793   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2794 echo "configure:2795: checking for ld used by GCC" >&5
2795   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2796   case "$ac_prog" in
2797     # Accept absolute paths.
2798     [\\/]* | [A-Za-z]:[\\/]*)
2799       re_direlt='/[^/][^/]*/\.\./'
2800       # Canonicalize the path of ld
2801       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2802       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2803         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2804       done
2805       test -z "$LD" && LD="$ac_prog"
2806       ;;
2807   "")
2808     # If it fails, then pretend we aren't using GCC.
2809     ac_prog=ld
2810     ;;
2811   *)
2812     # If it is relative, then search for the first ld in PATH.
2813     with_gnu_ld=unknown
2814     ;;
2815   esac
2816 elif test "$with_gnu_ld" = yes; then
2817   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2818 echo "configure:2819: checking for GNU ld" >&5
2819 else
2820   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2821 echo "configure:2822: checking for non-GNU ld" >&5
2822 fi
2823 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2824   echo $ac_n "(cached) $ac_c" 1>&6
2825 else
2826   if test -z "$LD"; then
2827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2828   for ac_dir in $PATH; do
2829     test -z "$ac_dir" && ac_dir=.
2830     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2831       ac_cv_path_LD="$ac_dir/$ac_prog"
2832       # Check to see if the program is GNU ld.  I'd rather use --version,
2833       # but apparently some GNU ld's only accept -v.
2834       # Break only if it was the GNU/non-GNU ld that we prefer.
2835       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2836         test "$with_gnu_ld" != no && break
2837       else
2838         test "$with_gnu_ld" != yes && break
2839       fi
2840     fi
2841   done
2842   IFS="$ac_save_ifs"
2843 else
2844   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2845 fi
2846 fi
2847
2848 LD="$ac_cv_path_LD"
2849 if test -n "$LD"; then
2850   echo "$ac_t""$LD" 1>&6
2851 else
2852   echo "$ac_t""no" 1>&6
2853 fi
2854 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2855
2856 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2857 echo "configure:2858: checking if the linker ($LD) is GNU ld" >&5
2858 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2859   echo $ac_n "(cached) $ac_c" 1>&6
2860 else
2861   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2862 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2863   ac_cv_prog_gnu_ld=yes
2864 else
2865   ac_cv_prog_gnu_ld=no
2866 fi
2867 fi
2868
2869 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2870
2871
2872 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2873 echo "configure:2874: checking for BSD-compatible nm" >&5
2874 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2875   echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877   if test -n "$NM"; then
2878   # Let the user override the test.
2879   ac_cv_path_NM="$NM"
2880 else
2881   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2882   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2883     test -z "$ac_dir" && ac_dir=.
2884     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2885       # Check to see if the nm accepts a BSD-compat flag.
2886       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2887       #   nm: unknown option "B" ignored
2888       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2889         ac_cv_path_NM="$ac_dir/nm -B"
2890         break
2891       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2892         ac_cv_path_NM="$ac_dir/nm -p"
2893         break
2894       else
2895         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2896         continue # so that we can try to find one that supports BSD flags
2897       fi
2898     fi
2899   done
2900   IFS="$ac_save_ifs"
2901   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2902 fi
2903 fi
2904
2905 NM="$ac_cv_path_NM"
2906 echo "$ac_t""$NM" 1>&6
2907
2908
2909 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2910 echo "configure:2911: checking whether ln -s works" >&5
2911 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2912   echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914   rm -f conftestdata
2915 if ln -s X conftestdata 2>/dev/null
2916 then
2917   rm -f conftestdata
2918   ac_cv_prog_LN_S="ln -s"
2919 else
2920   ac_cv_prog_LN_S=ln
2921 fi
2922 fi
2923 LN_S="$ac_cv_prog_LN_S"
2924 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2925   echo "$ac_t""yes" 1>&6
2926 else
2927   echo "$ac_t""no" 1>&6
2928 fi
2929
2930
2931 # Check for any special flags to pass to ltconfig.
2932 libtool_flags="--cache-file=$cache_file"
2933 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2934 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2935 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2936 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2937 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2938 libtool_flags="$libtool_flags --enable-dlopen"
2939
2940 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2941 if test "${enable_libtool_lock+set}" = set; then
2942   enableval="$enable_libtool_lock"
2943   :
2944 fi
2945
2946 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2947 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2948
2949 # Some flags need to be propagated to the compiler or linker for good
2950 # libtool support.
2951 case "$host" in
2952 *-*-irix6*)
2953   # Find out which ABI we are using.
2954   echo '#line 2955 "configure"' > conftest.$ac_ext
2955   if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2956     case "`/usr/bin/file conftest.o`" in
2957     *32-bit*)
2958       LD="${LD-ld} -32"
2959       ;;
2960     *N32*)
2961       LD="${LD-ld} -n32"
2962       ;;
2963     *64-bit*)
2964       LD="${LD-ld} -64"
2965       ;;
2966     esac
2967   fi
2968   rm -rf conftest*
2969   ;;
2970
2971 *-*-sco3.2v5*)
2972   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2973   SAVE_CFLAGS="$CFLAGS"
2974   CFLAGS="$CFLAGS -belf"
2975   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2976 echo "configure:2977: checking whether the C compiler needs -belf" >&5
2977 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   cat > conftest.$ac_ext <<EOF
2981 #line 2982 "configure"
2982 #include "confdefs.h"
2983
2984 int main() {
2985
2986 ; return 0; }
2987 EOF
2988 if { (eval echo configure:2989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2989   rm -rf conftest*
2990   lt_cv_cc_needs_belf=yes
2991 else
2992   echo "configure: failed program was:" >&5
2993   cat conftest.$ac_ext >&5
2994   rm -rf conftest*
2995   lt_cv_cc_needs_belf=no
2996 fi
2997 rm -f conftest*
2998 fi
2999
3000 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3001   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3002     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3003     CFLAGS="$SAVE_CFLAGS"
3004   fi
3005   ;;
3006
3007
3008 esac
3009
3010
3011 # Save cache, so that ltconfig can load it
3012
3013
3014 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3015 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3016 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3017 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3018 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3019 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3020 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3021 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3022
3023 # Reload cache, that may have been modified by ltconfig
3024
3025
3026 # This can be used to rebuild libtool when needed
3027 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3028
3029 # Always use our own libtool.
3030 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3031
3032 # Redirect the config.log output again, so that the ltconfig log is not
3033 # clobbered by the next message.
3034 exec 5>>./config.log
3035
3036
3037 for ac_prog in mawk gawk nawk awk
3038 do
3039 # Extract the first word of "$ac_prog", so it can be a program name with args.
3040 set dummy $ac_prog; ac_word=$2
3041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3042 echo "configure:3043: checking for $ac_word" >&5
3043 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   if test -n "$AWK"; then
3047   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3048 else
3049   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3050   ac_dummy="$PATH"
3051   for ac_dir in $ac_dummy; do
3052     test -z "$ac_dir" && ac_dir=.
3053     if test -f $ac_dir/$ac_word; then
3054       ac_cv_prog_AWK="$ac_prog"
3055       break
3056     fi
3057   done
3058   IFS="$ac_save_ifs"
3059 fi
3060 fi
3061 AWK="$ac_cv_prog_AWK"
3062 if test -n "$AWK"; then
3063   echo "$ac_t""$AWK" 1>&6
3064 else
3065   echo "$ac_t""no" 1>&6
3066 fi
3067
3068 test -n "$AWK" && break
3069 done
3070
3071 # test for ln hardlink support
3072 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3073 echo "configure:3074: checking whether ln works" >&5
3074 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3075   echo $ac_n "(cached) $ac_c" 1>&6
3076 else
3077   rm -f conftest.src conftest.dst
3078 echo "conftest" > conftest.src
3079 if ln conftest.src conftest.dst 2>/dev/null
3080 then
3081   ol_cv_prog_LN_H="ln"
3082 else
3083   ol_cv_prog_LN_H="cp"
3084 fi
3085 rm -f conftest.src conftest.dst
3086
3087 fi
3088 LN_H="$ol_cv_prog_LN_H"
3089 if test "$ol_cv_prog_LN_H" = "ln"; then
3090         echo "$ac_t""yes" 1>&6
3091 else
3092         echo "$ac_t""no" 1>&6
3093 fi
3094
3095 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3096 echo "configure:3097: checking whether ln -s works" >&5
3097 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3098   echo $ac_n "(cached) $ac_c" 1>&6
3099 else
3100   rm -f conftestdata
3101 if ln -s X conftestdata 2>/dev/null
3102 then
3103   rm -f conftestdata
3104   ac_cv_prog_LN_S="ln -s"
3105 else
3106   ac_cv_prog_LN_S=ln
3107 fi
3108 fi
3109 LN_S="$ac_cv_prog_LN_S"
3110 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3111   echo "$ac_t""yes" 1>&6
3112 else
3113   echo "$ac_t""no" 1>&6
3114 fi
3115
3116
3117 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3118         LN_S="$LN_H"
3119 fi
3120
3121 # Extract the first word of "sendmail", so it can be a program name with args.
3122 set dummy sendmail; ac_word=$2
3123 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3124 echo "configure:3125: checking for $ac_word" >&5
3125 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3126   echo $ac_n "(cached) $ac_c" 1>&6
3127 else
3128   case "$SENDMAIL" in
3129   /*)
3130   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3131   ;;
3132   ?:/*)                  
3133   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3134   ;;
3135   *)
3136   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3137   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3138   for ac_dir in $ac_dummy; do 
3139     test -z "$ac_dir" && ac_dir=.
3140     if test -f $ac_dir/$ac_word; then
3141       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3142       break
3143     fi
3144   done
3145   IFS="$ac_save_ifs"
3146   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3147   ;;
3148 esac
3149 fi
3150 SENDMAIL="$ac_cv_path_SENDMAIL"
3151 if test -n "$SENDMAIL"; then
3152   echo "$ac_t""$SENDMAIL" 1>&6
3153 else
3154   echo "$ac_t""no" 1>&6
3155 fi
3156
3157 # Extract the first word of "vi", so it can be a program name with args.
3158 set dummy vi; ac_word=$2
3159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3160 echo "configure:3161: checking for $ac_word" >&5
3161 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3162   echo $ac_n "(cached) $ac_c" 1>&6
3163 else
3164   case "$EDITOR" in
3165   /*)
3166   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3167   ;;
3168   ?:/*)                  
3169   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3170   ;;
3171   *)
3172   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3173   ac_dummy="$PATH:/usr/ucb"
3174   for ac_dir in $ac_dummy; do 
3175     test -z "$ac_dir" && ac_dir=.
3176     if test -f $ac_dir/$ac_word; then
3177       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3178       break
3179     fi
3180   done
3181   IFS="$ac_save_ifs"
3182   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3183   ;;
3184 esac
3185 fi
3186 EDITOR="$ac_cv_path_EDITOR"
3187 if test -n "$EDITOR"; then
3188   echo "$ac_t""$EDITOR" 1>&6
3189 else
3190   echo "$ac_t""no" 1>&6
3191 fi
3192
3193 # Extract the first word of "finger", so it can be a program name with args.
3194 set dummy finger; ac_word=$2
3195 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3196 echo "configure:3197: checking for $ac_word" >&5
3197 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3198   echo $ac_n "(cached) $ac_c" 1>&6
3199 else
3200   case "$FINGER" in
3201   /*)
3202   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3203   ;;
3204   ?:/*)                  
3205   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3206   ;;
3207   *)
3208   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3209   ac_dummy="$PATH:/usr/ucb"
3210   for ac_dir in $ac_dummy; do 
3211     test -z "$ac_dir" && ac_dir=.
3212     if test -f $ac_dir/$ac_word; then
3213       ac_cv_path_FINGER="$ac_dir/$ac_word"
3214       break
3215     fi
3216   done
3217   IFS="$ac_save_ifs"
3218   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3219   ;;
3220 esac
3221 fi
3222 FINGER="$ac_cv_path_FINGER"
3223 if test -n "$FINGER"; then
3224   echo "$ac_t""$FINGER" 1>&6
3225 else
3226   echo "$ac_t""no" 1>&6
3227 fi
3228
3229
3230 ol_link_perl=no
3231 if test $ol_enable_perl != no ; then
3232         # Extract the first word of "perl", so it can be a program name with args.
3233 set dummy perl; ac_word=$2
3234 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3235 echo "configure:3236: checking for $ac_word" >&5
3236 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3237   echo $ac_n "(cached) $ac_c" 1>&6
3238 else
3239   case "$PERLBIN" in
3240   /*)
3241   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3242   ;;
3243   ?:/*)                  
3244   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3245   ;;
3246   *)
3247   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3248   ac_dummy="$PATH"
3249   for ac_dir in $ac_dummy; do 
3250     test -z "$ac_dir" && ac_dir=.
3251     if test -f $ac_dir/$ac_word; then
3252       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3253       break
3254     fi
3255   done
3256   IFS="$ac_save_ifs"
3257   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3258   ;;
3259 esac
3260 fi
3261 PERLBIN="$ac_cv_path_PERLBIN"
3262 if test -n "$PERLBIN"; then
3263   echo "$ac_t""$PERLBIN" 1>&6
3264 else
3265   echo "$ac_t""no" 1>&6
3266 fi
3267
3268
3269         if test "no$PERLBIN" = "no" ; then
3270                 if test $ol_enable_perl = yes ; then
3271                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3272                 fi
3273
3274         else
3275                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3276                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3277
3278                                 ol_link_perl=yes
3279         fi
3280 fi
3281
3282 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3283 echo "configure:3284: checking how to run the C preprocessor" >&5
3284 # On Suns, sometimes $CPP names a directory.
3285 if test -n "$CPP" && test -d "$CPP"; then
3286   CPP=
3287 fi
3288 if test -z "$CPP"; then
3289 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3290   echo $ac_n "(cached) $ac_c" 1>&6
3291 else
3292     # This must be in double quotes, not single quotes, because CPP may get
3293   # substituted into the Makefile and "${CC-cc}" will confuse make.
3294   CPP="${CC-cc} -E"
3295   # On the NeXT, cc -E runs the code through the compiler's parser,
3296   # not just through cpp.
3297   cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300 #include <assert.h>
3301 Syntax Error
3302 EOF
3303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3304 { (eval echo configure:3305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3306 if test -z "$ac_err"; then
3307   :
3308 else
3309   echo "$ac_err" >&5
3310   echo "configure: failed program was:" >&5
3311   cat conftest.$ac_ext >&5
3312   rm -rf conftest*
3313   CPP="${CC-cc} -E -traditional-cpp"
3314   cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 #include <assert.h>
3318 Syntax Error
3319 EOF
3320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3321 { (eval echo configure:3322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3323 if test -z "$ac_err"; then
3324   :
3325 else
3326   echo "$ac_err" >&5
3327   echo "configure: failed program was:" >&5
3328   cat conftest.$ac_ext >&5
3329   rm -rf conftest*
3330   CPP="${CC-cc} -nologo -E"
3331   cat > conftest.$ac_ext <<EOF
3332 #line 3333 "configure"
3333 #include "confdefs.h"
3334 #include <assert.h>
3335 Syntax Error
3336 EOF
3337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3338 { (eval echo configure:3339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3340 if test -z "$ac_err"; then
3341   :
3342 else
3343   echo "$ac_err" >&5
3344   echo "configure: failed program was:" >&5
3345   cat conftest.$ac_ext >&5
3346   rm -rf conftest*
3347   CPP=/lib/cpp
3348 fi
3349 rm -f conftest*
3350 fi
3351 rm -f conftest*
3352 fi
3353 rm -f conftest*
3354   ac_cv_prog_CPP="$CPP"
3355 fi
3356   CPP="$ac_cv_prog_CPP"
3357 else
3358   ac_cv_prog_CPP="$CPP"
3359 fi
3360 echo "$ac_t""$CPP" 1>&6
3361
3362
3363 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3364         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3365
3366 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3367         echo "configure: warning: programs compiled here do run here..." 1>&2
3368         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3369
3370 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3371         echo "configure: warning: programs compiled here do not run here..." 1>&2
3372         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3373 fi
3374
3375 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3376 echo "configure:3377: checking for AIX" >&5
3377 cat > conftest.$ac_ext <<EOF
3378 #line 3379 "configure"
3379 #include "confdefs.h"
3380 #ifdef _AIX
3381   yes
3382 #endif
3383
3384 EOF
3385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3386   egrep "yes" >/dev/null 2>&1; then
3387   rm -rf conftest*
3388   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3389 #define _ALL_SOURCE 1
3390 EOF
3391
3392 else
3393   rm -rf conftest*
3394   echo "$ac_t""no" 1>&6
3395 fi
3396 rm -f conftest*
3397
3398
3399 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3400 echo "configure:3401: checking for POSIXized ISC" >&5
3401 if test -d /etc/conf/kconfig.d &&
3402   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3403 then
3404   echo "$ac_t""yes" 1>&6
3405   ISC=yes # If later tests want to check for ISC.
3406   cat >> confdefs.h <<\EOF
3407 #define _POSIX_SOURCE 1
3408 EOF
3409
3410   if test "$GCC" = yes; then
3411     CC="$CC -posix"
3412   else
3413     CC="$CC -Xp"
3414   fi
3415 else
3416   echo "$ac_t""no" 1>&6
3417   ISC=
3418 fi
3419
3420 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3421 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3422 echo "configure:3423: checking for minix/config.h" >&5
3423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   cat > conftest.$ac_ext <<EOF
3427 #line 3428 "configure"
3428 #include "confdefs.h"
3429 #include <minix/config.h>
3430 EOF
3431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3432 { (eval echo configure:3433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3434 if test -z "$ac_err"; then
3435   rm -rf conftest*
3436   eval "ac_cv_header_$ac_safe=yes"
3437 else
3438   echo "$ac_err" >&5
3439   echo "configure: failed program was:" >&5
3440   cat conftest.$ac_ext >&5
3441   rm -rf conftest*
3442   eval "ac_cv_header_$ac_safe=no"
3443 fi
3444 rm -f conftest*
3445 fi
3446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3447   echo "$ac_t""yes" 1>&6
3448   MINIX=yes
3449 else
3450   echo "$ac_t""no" 1>&6
3451 MINIX=
3452 fi
3453
3454 if test "$MINIX" = yes; then
3455   cat >> confdefs.h <<\EOF
3456 #define _POSIX_SOURCE 1
3457 EOF
3458
3459   cat >> confdefs.h <<\EOF
3460 #define _POSIX_1_SOURCE 2
3461 EOF
3462
3463   cat >> confdefs.h <<\EOF
3464 #define _MINIX 1
3465 EOF
3466
3467 fi
3468
3469
3470 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3471 echo "configure:3472: checking for Cygwin environment" >&5
3472 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3473   echo $ac_n "(cached) $ac_c" 1>&6
3474 else
3475   cat > conftest.$ac_ext <<EOF
3476 #line 3477 "configure"
3477 #include "confdefs.h"
3478
3479 int main() {
3480
3481 #ifndef __CYGWIN__
3482 #define __CYGWIN__ __CYGWIN32__
3483 #endif
3484 return __CYGWIN__;
3485 ; return 0; }
3486 EOF
3487 if { (eval echo configure:3488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3488   rm -rf conftest*
3489   ac_cv_cygwin=yes
3490 else
3491   echo "configure: failed program was:" >&5
3492   cat conftest.$ac_ext >&5
3493   rm -rf conftest*
3494   ac_cv_cygwin=no
3495 fi
3496 rm -f conftest*
3497 fi
3498
3499 echo "$ac_t""$ac_cv_cygwin" 1>&6
3500 CYGWIN=
3501 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3502 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3503 echo "configure:3504: checking for mingw32 environment" >&5
3504 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510
3511 int main() {
3512 return __MINGW32__;
3513 ; return 0; }
3514 EOF
3515 if { (eval echo configure:3516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3516   rm -rf conftest*
3517   ac_cv_mingw32=yes
3518 else
3519   echo "configure: failed program was:" >&5
3520   cat conftest.$ac_ext >&5
3521   rm -rf conftest*
3522   ac_cv_mingw32=no
3523 fi
3524 rm -f conftest*
3525 fi
3526
3527 echo "$ac_t""$ac_cv_mingw32" 1>&6
3528 MINGW32=
3529 test "$ac_cv_mingw32" = yes && MINGW32=yes
3530 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3531 echo "configure:3532: checking for EMX OS/2 environment" >&5
3532 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3533   echo $ac_n "(cached) $ac_c" 1>&6
3534 else
3535   cat > conftest.$ac_ext <<EOF
3536 #line 3537 "configure"
3537 #include "confdefs.h"
3538
3539 int main() {
3540 return __EMX__;
3541 ; return 0; }
3542 EOF
3543 if { (eval echo configure:3544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3544   rm -rf conftest*
3545   ac_cv_emxos2=yes
3546 else
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   ac_cv_emxos2=no
3551 fi
3552 rm -f conftest*
3553 fi
3554
3555 echo "$ac_t""$ac_cv_emxos2" 1>&6
3556 EMXOS2=
3557 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3558
3559
3560
3561 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3562 echo "configure:3563: checking for executable suffix" >&5
3563 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3567   ac_cv_exeext=.exe
3568 else
3569   rm -f conftest*
3570   echo 'int main () { return 0; }' > conftest.$ac_ext
3571   ac_cv_exeext=
3572   if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3573     for file in conftest.*; do
3574       case $file in
3575       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3576       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3577       esac
3578     done
3579   else
3580     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3581   fi
3582   rm -f conftest*
3583   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3584 fi
3585 fi
3586
3587 EXEEXT=""
3588 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3589 echo "$ac_t""${ac_cv_exeext}" 1>&6
3590 ac_exeext=$EXEEXT
3591
3592 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3593 echo "configure:3594: checking for object suffix" >&5
3594 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3595   echo $ac_n "(cached) $ac_c" 1>&6
3596 else
3597   rm -f conftest*
3598 echo 'int i = 1;' > conftest.$ac_ext
3599 if { (eval echo configure:3600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3600   for ac_file in conftest.*; do
3601     case $ac_file in
3602     *.c) ;;
3603     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3604     esac
3605   done
3606 else
3607   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3608 fi
3609 rm -f conftest*
3610 fi
3611
3612 echo "$ac_t""$ac_cv_objext" 1>&6
3613 OBJEXT=$ac_cv_objext
3614 ac_objext=$ac_cv_objext
3615
3616
3617 cat >> confdefs.h <<EOF
3618 #define EXEEXT "${EXEEXT}"
3619 EOF
3620
3621
3622 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3623 echo "configure:3624: checking for be_app in -lbe" >&5
3624 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   ac_save_LIBS="$LIBS"
3629 LIBS="-lbe -lroot -lnet $LIBS"
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 /* Override any gcc2 internal prototype to avoid an error.  */
3634 /* We use char because int might match the return type of a gcc2
3635     builtin and then its argument prototype would still apply.  */
3636 char be_app();
3637
3638 int main() {
3639 be_app()
3640 ; return 0; }
3641 EOF
3642 if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3643   rm -rf conftest*
3644   eval "ac_cv_lib_$ac_lib_var=yes"
3645 else
3646   echo "configure: failed program was:" >&5
3647   cat conftest.$ac_ext >&5
3648   rm -rf conftest*
3649   eval "ac_cv_lib_$ac_lib_var=no"
3650 fi
3651 rm -f conftest*
3652 LIBS="$ac_save_LIBS"
3653
3654 fi
3655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3656   echo "$ac_t""yes" 1>&6
3657   LIBS="$LIBS -lbe -lroot -lnet"
3658 else
3659   echo "$ac_t""no" 1>&6
3660 :
3661 fi
3662
3663
3664
3665
3666
3667 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3668 echo "configure:3669: checking for ${CC-cc} option to accept ANSI C" >&5
3669 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   am_cv_prog_cc_stdc=no
3673 ac_save_CC="$CC"
3674 # Don't try gcc -ansi; that turns off useful extensions and
3675 # breaks some systems' header files.
3676 # AIX                   -qlanglvl=ansi
3677 # Ultrix and OSF/1      -std1
3678 # HP-UX 10.20 and later -Ae
3679 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3680 # SVR4                  -Xc -D__EXTENSIONS__
3681 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3682 do
3683   CC="$ac_save_CC $ac_arg"
3684   cat > conftest.$ac_ext <<EOF
3685 #line 3686 "configure"
3686 #include "confdefs.h"
3687 #include <stdarg.h>
3688 #include <stdio.h>
3689 #include <sys/types.h>
3690 #include <sys/stat.h>
3691 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3692 struct buf { int x; };
3693 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3694 static char *e (p, i)
3695      char **p;
3696      int i;
3697 {
3698   return p[i];
3699 }
3700 static char *f (char * (*g) (char **, int), char **p, ...)
3701 {
3702   char *s;
3703   va_list v;
3704   va_start (v,p);
3705   s = g (p, va_arg (v,int));
3706   va_end (v);
3707   return s;
3708 }
3709 int test (int i, double x);
3710 struct s1 {int (*f) (int a);};
3711 struct s2 {int (*f) (double a);};
3712 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3713 int argc;
3714 char **argv;
3715
3716 int main() {
3717
3718 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3719
3720 ; return 0; }
3721 EOF
3722 if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3723   rm -rf conftest*
3724   am_cv_prog_cc_stdc="$ac_arg"; break
3725 else
3726   echo "configure: failed program was:" >&5
3727   cat conftest.$ac_ext >&5
3728 fi
3729 rm -f conftest*
3730 done
3731 CC="$ac_save_CC"
3732
3733 fi
3734
3735 if test -z "$am_cv_prog_cc_stdc"; then
3736   echo "$ac_t""none needed" 1>&6
3737 else
3738   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3739 fi
3740 case "x$am_cv_prog_cc_stdc" in
3741   x|xno) ;;
3742   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3743 esac
3744
3745 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3746         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3747 fi
3748
3749 # test for make depend flag
3750 OL_MKDEP=
3751 OL_MKDEP_FLAGS=
3752 if test -z "${MKDEP}"; then
3753         OL_MKDEP="${CC-cc}"
3754         if test -z "${MKDEP_FLAGS}"; then
3755                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3756 echo "configure:3757: checking for ${OL_MKDEP} depend flag" >&5
3757 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   
3761                         ol_cv_mkdep=no
3762                         for flag in "-M" "-xM"; do
3763                                 cat > conftest.c <<EOF
3764  noCode;
3765 EOF
3766                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3767                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3768                                 then
3769                                         if test ! -f conftest."${ac_object}" ; then
3770                                                 ol_cv_mkdep=$flag
3771                                                 OL_MKDEP_FLAGS="$flag"
3772                                                 break
3773                                         fi
3774                                 fi
3775                         done
3776                         rm -f conftest*
3777                 
3778 fi
3779
3780 echo "$ac_t""$ol_cv_mkdep" 1>&6
3781         else
3782                 cc_cv_mkdep=yes
3783                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3784         fi
3785 else
3786         cc_cv_mkdep=yes
3787         OL_MKDEP="${MKDEP}"
3788         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3789 fi
3790
3791
3792
3793 if test "${ol_cv_mkdep}" = no ; then
3794         # this will soon become an error
3795         echo "configure: warning: do not know how to generate dependencies" 1>&2
3796 fi
3797
3798 ol_link_modules=no
3799 if test $ol_enable_modules != no ; then
3800         for ac_hdr in ltdl.h
3801 do
3802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3804 echo "configure:3805: checking for $ac_hdr" >&5
3805 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 #include <$ac_hdr>
3812 EOF
3813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3814 { (eval echo configure:3815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3816 if test -z "$ac_err"; then
3817   rm -rf conftest*
3818   eval "ac_cv_header_$ac_safe=yes"
3819 else
3820   echo "$ac_err" >&5
3821   echo "configure: failed program was:" >&5
3822   cat conftest.$ac_ext >&5
3823   rm -rf conftest*
3824   eval "ac_cv_header_$ac_safe=no"
3825 fi
3826 rm -f conftest*
3827 fi
3828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3829   echo "$ac_t""yes" 1>&6
3830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3831   cat >> confdefs.h <<EOF
3832 #define $ac_tr_hdr 1
3833 EOF
3834  
3835 else
3836   echo "$ac_t""no" 1>&6
3837 fi
3838 done
3839
3840
3841         if test $ac_cv_header_ltdl_h = no ; then
3842                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3843
3844         fi
3845
3846         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3847 echo "configure:3848: checking for lt_dlinit in -lltdl" >&5
3848 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3850   echo $ac_n "(cached) $ac_c" 1>&6
3851 else
3852   ac_save_LIBS="$LIBS"
3853 LIBS="-lltdl  $LIBS"
3854 cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3857 /* Override any gcc2 internal prototype to avoid an error.  */
3858 /* We use char because int might match the return type of a gcc2
3859     builtin and then its argument prototype would still apply.  */
3860 char lt_dlinit();
3861
3862 int main() {
3863 lt_dlinit()
3864 ; return 0; }
3865 EOF
3866 if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3867   rm -rf conftest*
3868   eval "ac_cv_lib_$ac_lib_var=yes"
3869 else
3870   echo "configure: failed program was:" >&5
3871   cat conftest.$ac_ext >&5
3872   rm -rf conftest*
3873   eval "ac_cv_lib_$ac_lib_var=no"
3874 fi
3875 rm -f conftest*
3876 LIBS="$ac_save_LIBS"
3877
3878 fi
3879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3880   echo "$ac_t""yes" 1>&6
3881     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3882     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3883   cat >> confdefs.h <<EOF
3884 #define $ac_tr_lib 1
3885 EOF
3886
3887   LIBS="-lltdl $LIBS"
3888
3889 else
3890   echo "$ac_t""no" 1>&6
3891 fi
3892
3893         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3894                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3895         fi
3896         ol_link_modules=yes
3897 else
3898         ol_with_bdb2_module=static
3899         ol_with_ldap_module=static
3900         ol_with_ldbm_module=static
3901         ol_with_passwd_module=static
3902         ol_with_perl_module=static
3903         ol_with_shell_module=static
3904         ol_with_tcl_module=static
3905 fi
3906
3907 # test for EBCDIC
3908 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3909 echo "configure:3910: checking for EBCDIC" >&5
3910 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   
3914         cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917
3918 #if !('M' == 0xd4)
3919 #include <__ASCII__/generate_error.h>
3920 #endif
3921
3922 EOF
3923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3924 { (eval echo configure:3925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3926 if test -z "$ac_err"; then
3927   rm -rf conftest*
3928   ol_cv_cpp_ebcdic=yes
3929 else
3930   echo "$ac_err" >&5
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -rf conftest*
3934   ol_cv_cpp_ebcdic=no
3935 fi
3936 rm -f conftest*
3937 fi
3938
3939 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3940 if test $ol_cv_cpp_ebcdic = yes ; then
3941         cat >> confdefs.h <<\EOF
3942 #define HAVE_EBCDIC 1
3943 EOF
3944
3945 fi
3946
3947 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3948 echo "configure:3949: checking for ANSI C header files" >&5
3949 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 #include <stdlib.h>
3956 #include <stdarg.h>
3957 #include <string.h>
3958 #include <float.h>
3959 EOF
3960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3961 { (eval echo configure:3962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3963 if test -z "$ac_err"; then
3964   rm -rf conftest*
3965   ol_cv_header_stdc=yes
3966 else
3967   echo "$ac_err" >&5
3968   echo "configure: failed program was:" >&5
3969   cat conftest.$ac_ext >&5
3970   rm -rf conftest*
3971   ol_cv_header_stdc=no
3972 fi
3973 rm -f conftest*
3974
3975 if test $ol_cv_header_stdc = yes; then
3976   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3977 cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 #include <string.h>
3981 EOF
3982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3983   egrep "memchr" >/dev/null 2>&1; then
3984   :
3985 else
3986   rm -rf conftest*
3987   ol_cv_header_stdc=no
3988 fi
3989 rm -f conftest*
3990
3991 fi
3992
3993 if test $ol_cv_header_stdc = yes; then
3994   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3995 cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998 #include <stdlib.h>
3999 EOF
4000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4001   egrep "free" >/dev/null 2>&1; then
4002   :
4003 else
4004   rm -rf conftest*
4005   ol_cv_header_stdc=no
4006 fi
4007 rm -f conftest*
4008
4009 fi
4010
4011 if test $ol_cv_header_stdc = yes; then
4012   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4013 if test "$cross_compiling" = yes; then
4014   :
4015 else
4016   cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 #include <ctype.h>
4020 #ifndef HAVE_EBCDIC
4021 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4022 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4023 #else
4024 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4025                 || ('j' <= (c) && (c) <= 'r') \
4026                 || ('s' <= (c) && (c) <= 'z'))
4027 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4028 #endif
4029 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4030 int main () { int i; for (i = 0; i < 256; i++)
4031 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4032 exit (0); }
4033
4034 EOF
4035 if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4036 then
4037   :
4038 else
4039   echo "configure: failed program was:" >&5
4040   cat conftest.$ac_ext >&5
4041   rm -fr conftest*
4042   ol_cv_header_stdc=no
4043 fi
4044 rm -fr conftest*
4045 fi
4046
4047 fi
4048 fi
4049
4050 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4051 if test $ol_cv_header_stdc = yes; then
4052   cat >> confdefs.h <<\EOF
4053 #define STDC_HEADERS 1
4054 EOF
4055
4056 fi
4057 ac_cv_header_stdc=disable
4058
4059
4060 if test $ol_cv_header_stdc != yes; then
4061         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4062 fi
4063
4064 ac_header_dirent=no
4065 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4066 do
4067 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4068 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4069 echo "configure:4070: checking for $ac_hdr that defines DIR" >&5
4070 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4071   echo $ac_n "(cached) $ac_c" 1>&6
4072 else
4073   cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 #include <sys/types.h>
4077 #include <$ac_hdr>
4078 int main() {
4079 DIR *dirp = 0;
4080 ; return 0; }
4081 EOF
4082 if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4083   rm -rf conftest*
4084   eval "ac_cv_header_dirent_$ac_safe=yes"
4085 else
4086   echo "configure: failed program was:" >&5
4087   cat conftest.$ac_ext >&5
4088   rm -rf conftest*
4089   eval "ac_cv_header_dirent_$ac_safe=no"
4090 fi
4091 rm -f conftest*
4092 fi
4093 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4094   echo "$ac_t""yes" 1>&6
4095     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4096   cat >> confdefs.h <<EOF
4097 #define $ac_tr_hdr 1
4098 EOF
4099  ac_header_dirent=$ac_hdr; break
4100 else
4101   echo "$ac_t""no" 1>&6
4102 fi
4103 done
4104 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4105 if test $ac_header_dirent = dirent.h; then
4106 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4107 echo "configure:4108: checking for opendir in -ldir" >&5
4108 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4110   echo $ac_n "(cached) $ac_c" 1>&6
4111 else
4112   ac_save_LIBS="$LIBS"
4113 LIBS="-ldir  $LIBS"
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 /* Override any gcc2 internal prototype to avoid an error.  */
4118 /* We use char because int might match the return type of a gcc2
4119     builtin and then its argument prototype would still apply.  */
4120 char opendir();
4121
4122 int main() {
4123 opendir()
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4127   rm -rf conftest*
4128   eval "ac_cv_lib_$ac_lib_var=yes"
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   eval "ac_cv_lib_$ac_lib_var=no"
4134 fi
4135 rm -f conftest*
4136 LIBS="$ac_save_LIBS"
4137
4138 fi
4139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4140   echo "$ac_t""yes" 1>&6
4141   LIBS="$LIBS -ldir"
4142 else
4143   echo "$ac_t""no" 1>&6
4144 fi
4145
4146 else
4147 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4148 echo "configure:4149: checking for opendir in -lx" >&5
4149 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4151   echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153   ac_save_LIBS="$LIBS"
4154 LIBS="-lx  $LIBS"
4155 cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 /* Override any gcc2 internal prototype to avoid an error.  */
4159 /* We use char because int might match the return type of a gcc2
4160     builtin and then its argument prototype would still apply.  */
4161 char opendir();
4162
4163 int main() {
4164 opendir()
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4168   rm -rf conftest*
4169   eval "ac_cv_lib_$ac_lib_var=yes"
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   eval "ac_cv_lib_$ac_lib_var=no"
4175 fi
4176 rm -f conftest*
4177 LIBS="$ac_save_LIBS"
4178
4179 fi
4180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4181   echo "$ac_t""yes" 1>&6
4182   LIBS="$LIBS -lx"
4183 else
4184   echo "$ac_t""no" 1>&6
4185 fi
4186
4187 fi
4188
4189 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4190 echo "configure:4191: checking for sys/wait.h that is POSIX.1 compatible" >&5
4191 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <sys/types.h>
4198 #include <sys/wait.h>
4199 #ifndef WEXITSTATUS
4200 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4201 #endif
4202 #ifndef WIFEXITED
4203 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4204 #endif
4205 int main() {
4206 int s;
4207 wait (&s);
4208 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4209 ; return 0; }
4210 EOF
4211 if { (eval echo configure:4212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4212   rm -rf conftest*
4213   ac_cv_header_sys_wait_h=yes
4214 else
4215   echo "configure: failed program was:" >&5
4216   cat conftest.$ac_ext >&5
4217   rm -rf conftest*
4218   ac_cv_header_sys_wait_h=no
4219 fi
4220 rm -f conftest*
4221 fi
4222
4223 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4224 if test $ac_cv_header_sys_wait_h = yes; then
4225   cat >> confdefs.h <<\EOF
4226 #define HAVE_SYS_WAIT_H 1
4227 EOF
4228
4229 fi
4230
4231 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4232 echo "configure:4233: checking POSIX termios" >&5
4233 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236   cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 #include <sys/types.h>
4240 #include <unistd.h>
4241 #include <termios.h>
4242 int main() {
4243 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4244    tcgetattr(0, 0);
4245 ; return 0; }
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4248   rm -rf conftest*
4249   am_cv_sys_posix_termios=yes
4250 else
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -rf conftest*
4254   am_cv_sys_posix_termios=no
4255 fi
4256 rm -f conftest*
4257 fi
4258
4259 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4260
4261
4262  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4263 echo "configure:4264: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4264 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4268
4269   gwinsz_in_termios_h=no
4270   if test $am_cv_sys_posix_termios = yes; then
4271     cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274 #include <sys/types.h>
4275 #     include <termios.h>
4276 #     ifdef TIOCGWINSZ
4277         yes
4278 #     endif
4279     
4280 EOF
4281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4282   egrep "yes" >/dev/null 2>&1; then
4283   rm -rf conftest*
4284   gwinsz_in_termios_h=yes
4285 fi
4286 rm -f conftest*
4287
4288   fi
4289
4290   if test $gwinsz_in_termios_h = no; then
4291     cat > conftest.$ac_ext <<EOF
4292 #line 4293 "configure"
4293 #include "confdefs.h"
4294 #include <sys/types.h>
4295 #     include <sys/ioctl.h>
4296 #     ifdef TIOCGWINSZ
4297         yes
4298 #     endif
4299     
4300 EOF
4301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4302   egrep "yes" >/dev/null 2>&1; then
4303   rm -rf conftest*
4304   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4305 fi
4306 rm -f conftest*
4307
4308   fi
4309   
4310 fi
4311
4312 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4313   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4314     cat >> confdefs.h <<\EOF
4315 #define GWINSZ_IN_SYS_IOCTL 1
4316 EOF
4317
4318   fi
4319
4320 if test $am_cv_sys_posix_termios = yes ; then
4321         cat >> confdefs.h <<\EOF
4322 #define HAVE_POSIX_TERMIOS 1
4323 EOF
4324
4325 fi
4326
4327 for ac_hdr in \
4328         arpa/inet.h             \
4329         arpa/nameser.h  \
4330         assert.h                \
4331         crypt.h                 \
4332         errno.h                 \
4333         fcntl.h                 \
4334         filio.h                 \
4335         getopt.h                \
4336         grp.h                   \
4337         libutil.h               \
4338         limits.h                \
4339         locale.h                \
4340         netinet/tcp.h   \
4341         malloc.h                \
4342         memory.h                \
4343         psap.h                  \
4344         pwd.h                   \
4345         resolv.h                \
4346         sgtty.h                 \
4347         shadow.h                \
4348         stddef.h                \
4349         string.h                \
4350         strings.h               \
4351         sysexits.h              \
4352         sys/file.h              \
4353         sys/filio.h             \
4354         sys/errno.h             \
4355         sys/ioctl.h             \
4356         sys/param.h             \
4357         sys/resource.h  \
4358         sys/select.h    \
4359         sys/socket.h    \
4360         sys/syslog.h    \
4361         sys/time.h              \
4362         sys/types.h             \
4363         syslog.h                \
4364         termios.h               \
4365         unistd.h                \
4366
4367 do
4368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4370 echo "configure:4371: checking for $ac_hdr" >&5
4371 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4372   echo $ac_n "(cached) $ac_c" 1>&6
4373 else
4374   cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377 #include <$ac_hdr>
4378 EOF
4379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4380 { (eval echo configure:4381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4382 if test -z "$ac_err"; then
4383   rm -rf conftest*
4384   eval "ac_cv_header_$ac_safe=yes"
4385 else
4386   echo "$ac_err" >&5
4387   echo "configure: failed program was:" >&5
4388   cat conftest.$ac_ext >&5
4389   rm -rf conftest*
4390   eval "ac_cv_header_$ac_safe=no"
4391 fi
4392 rm -f conftest*
4393 fi
4394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4395   echo "$ac_t""yes" 1>&6
4396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4397   cat >> confdefs.h <<EOF
4398 #define $ac_tr_hdr 1
4399 EOF
4400  
4401 else
4402   echo "$ac_t""no" 1>&6
4403 fi
4404 done
4405
4406
4407
4408
4409 echo $ac_n "checking for socket""... $ac_c" 1>&6
4410 echo "configure:4411: checking for socket" >&5
4411 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   cat > conftest.$ac_ext <<EOF
4415 #line 4416 "configure"
4416 #include "confdefs.h"
4417 /* System header to define __stub macros and hopefully few prototypes,
4418     which can conflict with char socket(); below.  */
4419 #include <assert.h>
4420 /* Override any gcc2 internal prototype to avoid an error.  */
4421 /* We use char because int might match the return type of a gcc2
4422     builtin and then its argument prototype would still apply.  */
4423 char socket();
4424 char (*f)();
4425
4426 int main() {
4427
4428 /* The GNU C library defines this for functions which it implements
4429     to always fail with ENOSYS.  Some functions are actually named
4430     something starting with __ and the normal name is an alias.  */
4431 #if defined (__stub_socket) || defined (__stub___socket)
4432 choke me
4433 #else
4434 f = socket;
4435 #endif
4436
4437 ; return 0; }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4440   rm -rf conftest*
4441   eval "ac_cv_func_socket=yes"
4442 else
4443   echo "configure: failed program was:" >&5
4444   cat conftest.$ac_ext >&5
4445   rm -rf conftest*
4446   eval "ac_cv_func_socket=no"
4447 fi
4448 rm -f conftest*
4449 fi
4450
4451 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4452   echo "$ac_t""yes" 1>&6
4453   :
4454 else
4455   echo "$ac_t""no" 1>&6
4456         
4457         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4458 echo "configure:4459: checking for main in -lsocket" >&5
4459 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4460 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   ac_save_LIBS="$LIBS"
4464 LIBS="-lsocket  $LIBS"
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468
4469 int main() {
4470 main()
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   eval "ac_cv_lib_$ac_lib_var=yes"
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   eval "ac_cv_lib_$ac_lib_var=no"
4481 fi
4482 rm -f conftest*
4483 LIBS="$ac_save_LIBS"
4484
4485 fi
4486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4487   echo "$ac_t""yes" 1>&6
4488     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4489     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4490   cat >> confdefs.h <<EOF
4491 #define $ac_tr_lib 1
4492 EOF
4493
4494   LIBS="-lsocket $LIBS"
4495
4496 else
4497   echo "$ac_t""no" 1>&6
4498 fi
4499
4500         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4501 echo "configure:4502: checking for main in -lnet" >&5
4502 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4503 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   ac_save_LIBS="$LIBS"
4507 LIBS="-lnet  $LIBS"
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511
4512 int main() {
4513 main()
4514 ; return 0; }
4515 EOF
4516 if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4517   rm -rf conftest*
4518   eval "ac_cv_lib_$ac_lib_var=yes"
4519 else
4520   echo "configure: failed program was:" >&5
4521   cat conftest.$ac_ext >&5
4522   rm -rf conftest*
4523   eval "ac_cv_lib_$ac_lib_var=no"
4524 fi
4525 rm -f conftest*
4526 LIBS="$ac_save_LIBS"
4527
4528 fi
4529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4530   echo "$ac_t""yes" 1>&6
4531     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4532     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4533   cat >> confdefs.h <<EOF
4534 #define $ac_tr_lib 1
4535 EOF
4536
4537   LIBS="-lnet $LIBS"
4538
4539 else
4540   echo "$ac_t""no" 1>&6
4541 fi
4542
4543         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4544 echo "configure:4545: checking for socket in -lnet" >&5
4545 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4547   echo $ac_n "(cached) $ac_c" 1>&6
4548 else
4549   ac_save_LIBS="$LIBS"
4550 LIBS="-lnet  $LIBS"
4551 cat > conftest.$ac_ext <<EOF
4552 #line 4553 "configure"
4553 #include "confdefs.h"
4554 /* Override any gcc2 internal prototype to avoid an error.  */
4555 /* We use char because int might match the return type of a gcc2
4556     builtin and then its argument prototype would still apply.  */
4557 char socket();
4558
4559 int main() {
4560 socket()
4561 ; return 0; }
4562 EOF
4563 if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4564   rm -rf conftest*
4565   eval "ac_cv_lib_$ac_lib_var=yes"
4566 else
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -rf conftest*
4570   eval "ac_cv_lib_$ac_lib_var=no"
4571 fi
4572 rm -f conftest*
4573 LIBS="$ac_save_LIBS"
4574
4575 fi
4576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4577   echo "$ac_t""yes" 1>&6
4578     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4579     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_lib 1
4582 EOF
4583
4584   LIBS="-lnet $LIBS"
4585
4586 else
4587   echo "$ac_t""no" 1>&6
4588 fi
4589
4590         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4591 echo "configure:4592: checking for main in -lnsl_s" >&5
4592 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   ac_save_LIBS="$LIBS"
4597 LIBS="-lnsl_s  $LIBS"
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601
4602 int main() {
4603 main()
4604 ; return 0; }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4607   rm -rf conftest*
4608   eval "ac_cv_lib_$ac_lib_var=yes"
4609 else
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   eval "ac_cv_lib_$ac_lib_var=no"
4614 fi
4615 rm -f conftest*
4616 LIBS="$ac_save_LIBS"
4617
4618 fi
4619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4620   echo "$ac_t""yes" 1>&6
4621     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4622     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4623   cat >> confdefs.h <<EOF
4624 #define $ac_tr_lib 1
4625 EOF
4626
4627   LIBS="-lnsl_s $LIBS"
4628
4629 else
4630   echo "$ac_t""no" 1>&6
4631 fi
4632
4633         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4634 echo "configure:4635: checking for main in -lnsl" >&5
4635 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4637   echo $ac_n "(cached) $ac_c" 1>&6
4638 else
4639   ac_save_LIBS="$LIBS"
4640 LIBS="-lnsl  $LIBS"
4641 cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4644
4645 int main() {
4646 main()
4647 ; return 0; }
4648 EOF
4649 if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4650   rm -rf conftest*
4651   eval "ac_cv_lib_$ac_lib_var=yes"
4652 else
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   eval "ac_cv_lib_$ac_lib_var=no"
4657 fi
4658 rm -f conftest*
4659 LIBS="$ac_save_LIBS"
4660
4661 fi
4662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4663   echo "$ac_t""yes" 1>&6
4664     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4665     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4666   cat >> confdefs.h <<EOF
4667 #define $ac_tr_lib 1
4668 EOF
4669
4670   LIBS="-lnsl $LIBS"
4671
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675
4676         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4677 echo "configure:4678: checking for socket in -linet" >&5
4678 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4679 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   ac_save_LIBS="$LIBS"
4683 LIBS="-linet  $LIBS"
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 /* Override any gcc2 internal prototype to avoid an error.  */
4688 /* We use char because int might match the return type of a gcc2
4689     builtin and then its argument prototype would still apply.  */
4690 char socket();
4691
4692 int main() {
4693 socket()
4694 ; return 0; }
4695 EOF
4696 if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=yes"
4699 else
4700   echo "configure: failed program was:" >&5
4701   cat conftest.$ac_ext >&5
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=no"
4704 fi
4705 rm -f conftest*
4706 LIBS="$ac_save_LIBS"
4707
4708 fi
4709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4712     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4713   cat >> confdefs.h <<EOF
4714 #define $ac_tr_lib 1
4715 EOF
4716
4717   LIBS="-linet $LIBS"
4718
4719 else
4720   echo "$ac_t""no" 1>&6
4721 fi
4722
4723         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4724 echo "configure:4725: checking for main in -lgen" >&5
4725 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4727   echo $ac_n "(cached) $ac_c" 1>&6
4728 else
4729   ac_save_LIBS="$LIBS"
4730 LIBS="-lgen  $LIBS"
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734
4735 int main() {
4736 main()
4737 ; return 0; }
4738 EOF
4739 if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4740   rm -rf conftest*
4741   eval "ac_cv_lib_$ac_lib_var=yes"
4742 else
4743   echo "configure: failed program was:" >&5
4744   cat conftest.$ac_ext >&5
4745   rm -rf conftest*
4746   eval "ac_cv_lib_$ac_lib_var=no"
4747 fi
4748 rm -f conftest*
4749 LIBS="$ac_save_LIBS"
4750
4751 fi
4752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4753   echo "$ac_t""yes" 1>&6
4754     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4755     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4756   cat >> confdefs.h <<EOF
4757 #define $ac_tr_lib 1
4758 EOF
4759
4760   LIBS="-lgen $LIBS"
4761
4762 else
4763   echo "$ac_t""no" 1>&6
4764 fi
4765
4766
4767 fi
4768
4769
4770 echo $ac_n "checking for select""... $ac_c" 1>&6
4771 echo "configure:4772: checking for select" >&5
4772 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4773   echo $ac_n "(cached) $ac_c" 1>&6
4774 else
4775   cat > conftest.$ac_ext <<EOF
4776 #line 4777 "configure"
4777 #include "confdefs.h"
4778 /* System header to define __stub macros and hopefully few prototypes,
4779     which can conflict with char select(); below.  */
4780 #include <assert.h>
4781 /* Override any gcc2 internal prototype to avoid an error.  */
4782 /* We use char because int might match the return type of a gcc2
4783     builtin and then its argument prototype would still apply.  */
4784 char select();
4785 char (*f)();
4786
4787 int main() {
4788
4789 /* The GNU C library defines this for functions which it implements
4790     to always fail with ENOSYS.  Some functions are actually named
4791     something starting with __ and the normal name is an alias.  */
4792 #if defined (__stub_select) || defined (__stub___select)
4793 choke me
4794 #else
4795 f = select;
4796 #endif
4797
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   eval "ac_cv_func_select=yes"
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   eval "ac_cv_func_select=no"
4808 fi
4809 rm -f conftest*
4810 fi
4811
4812 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4813   echo "$ac_t""yes" 1>&6
4814   :
4815 else
4816   echo "$ac_t""no" 1>&6
4817 { echo "configure: error: select() required." 1>&2; exit 1; }
4818 fi
4819
4820
4821 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4822 echo "configure:4823: checking types of arguments for select()" >&5
4823  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4824   echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4827   echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4833      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4834       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4835        cat > conftest.$ac_ext <<EOF
4836 #line 4837 "configure"
4837 #include "confdefs.h"
4838 #ifdef HAVE_SYS_TYPES_H
4839 #include <sys/types.h>
4840 #endif
4841 #ifdef HAVE_SYS_TIME_H
4842 #include <sys/time.h>
4843 #endif
4844 #ifdef HAVE_SYS_SELECT_H
4845 #include <sys/select.h>
4846 #endif
4847 #ifdef HAVE_SYS_SOCKET_H
4848 #include <sys/socket.h>
4849 #endif
4850 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);
4851 int main() {
4852
4853 ; return 0; }
4854 EOF
4855 if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4856   rm -rf conftest*
4857           ac_not_found=no ; break 3
4858 else
4859   echo "configure: failed program was:" >&5
4860   cat conftest.$ac_ext >&5
4861   rm -rf conftest*
4862   ac_not_found=yes
4863 fi
4864 rm -f conftest*
4865       done
4866      done
4867     done
4868    
4869 fi
4870   
4871 fi
4872  
4873 fi
4874  if test "$ac_not_found" = yes; then
4875   ac_cv_func_select_arg1=int 
4876   ac_cv_func_select_arg234='int *' 
4877   ac_cv_func_select_arg5='struct timeval *'
4878  fi
4879  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4880  cat >> confdefs.h <<EOF
4881 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4882 EOF
4883
4884  cat >> confdefs.h <<EOF
4885 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4886 EOF
4887
4888  cat >> confdefs.h <<EOF
4889 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4890 EOF
4891
4892
4893
4894
4895 for ac_hdr in regex.h 
4896 do
4897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4899 echo "configure:4900: checking for $ac_hdr" >&5
4900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 #include <$ac_hdr>
4907 EOF
4908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4909 { (eval echo configure:4910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4911 if test -z "$ac_err"; then
4912   rm -rf conftest*
4913   eval "ac_cv_header_$ac_safe=yes"
4914 else
4915   echo "$ac_err" >&5
4916   echo "configure: failed program was:" >&5
4917   cat conftest.$ac_ext >&5
4918   rm -rf conftest*
4919   eval "ac_cv_header_$ac_safe=no"
4920 fi
4921 rm -f conftest*
4922 fi
4923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4924   echo "$ac_t""yes" 1>&6
4925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4926   cat >> confdefs.h <<EOF
4927 #define $ac_tr_hdr 1
4928 EOF
4929  
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933 done
4934
4935 if test "$ac_cv_header_regex_h" != yes ; then
4936         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4937 fi
4938 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4939 echo "configure:4940: checking for regfree" >&5
4940 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 /* System header to define __stub macros and hopefully few prototypes,
4947     which can conflict with char regfree(); below.  */
4948 #include <assert.h>
4949 /* Override any gcc2 internal prototype to avoid an error.  */
4950 /* We use char because int might match the return type of a gcc2
4951     builtin and then its argument prototype would still apply.  */
4952 char regfree();
4953 char (*f)();
4954
4955 int main() {
4956
4957 /* The GNU C library defines this for functions which it implements
4958     to always fail with ENOSYS.  Some functions are actually named
4959     something starting with __ and the normal name is an alias.  */
4960 #if defined (__stub_regfree) || defined (__stub___regfree)
4961 choke me
4962 #else
4963 f = regfree;
4964 #endif
4965
4966 ; return 0; }
4967 EOF
4968 if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4969   rm -rf conftest*
4970   eval "ac_cv_func_regfree=yes"
4971 else
4972   echo "configure: failed program was:" >&5
4973   cat conftest.$ac_ext >&5
4974   rm -rf conftest*
4975   eval "ac_cv_func_regfree=no"
4976 fi
4977 rm -f conftest*
4978 fi
4979
4980 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4981   echo "$ac_t""yes" 1>&6
4982   :
4983 else
4984   echo "$ac_t""no" 1>&6
4985 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4986 fi
4987
4988
4989
4990 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4991 echo "configure:4992: checking for compatible POSIX regex" >&5
4992 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4993   echo $ac_n "(cached) $ac_c" 1>&6
4994 else
4995   
4996         if test "$cross_compiling" = yes; then
4997   ol_cv_c_posix_regex=cross
4998 else
4999   cat > conftest.$ac_ext <<EOF
5000 #line 5001 "configure"
5001 #include "confdefs.h"
5002
5003 #include <sys/types.h>
5004 #include <regex.h>
5005 static char *pattern, *string;
5006 main()
5007 {
5008         int rc;
5009         regex_t re;
5010
5011         pattern = "^A";
5012
5013         if(regcomp(&re, pattern, 0)) {
5014                 return -1;
5015         }
5016         
5017         string = "ALL MATCH";
5018         
5019         rc = regexec(&re, string, 0, (void*)0, 0);
5020
5021         regfree(&re);
5022
5023         return rc;
5024 }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5027 then
5028   ol_cv_c_posix_regex=yes
5029 else
5030   echo "configure: failed program was:" >&5
5031   cat conftest.$ac_ext >&5
5032   rm -fr conftest*
5033   ol_cv_c_posix_regex=no
5034 fi
5035 rm -fr conftest*
5036 fi
5037
5038 fi
5039
5040 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5041
5042 if test "$ol_cv_c_posix_regex" = no ; then
5043         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5044 fi
5045
5046 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5047 echo "configure:5048: checking for sigset in -lV3" >&5
5048 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5050   echo $ac_n "(cached) $ac_c" 1>&6
5051 else
5052   ac_save_LIBS="$LIBS"
5053 LIBS="-lV3  $LIBS"
5054 cat > conftest.$ac_ext <<EOF
5055 #line 5056 "configure"
5056 #include "confdefs.h"
5057 /* Override any gcc2 internal prototype to avoid an error.  */
5058 /* We use char because int might match the return type of a gcc2
5059     builtin and then its argument prototype would still apply.  */
5060 char sigset();
5061
5062 int main() {
5063 sigset()
5064 ; return 0; }
5065 EOF
5066 if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5067   rm -rf conftest*
5068   eval "ac_cv_lib_$ac_lib_var=yes"
5069 else
5070   echo "configure: failed program was:" >&5
5071   cat conftest.$ac_ext >&5
5072   rm -rf conftest*
5073   eval "ac_cv_lib_$ac_lib_var=no"
5074 fi
5075 rm -f conftest*
5076 LIBS="$ac_save_LIBS"
5077
5078 fi
5079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5080   echo "$ac_t""yes" 1>&6
5081     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5082     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5083   cat >> confdefs.h <<EOF
5084 #define $ac_tr_lib 1
5085 EOF
5086
5087   LIBS="-lV3 $LIBS"
5088
5089 else
5090   echo "$ac_t""no" 1>&6
5091 fi
5092
5093
5094 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5095 echo "configure:5096: checking for res_search" >&5
5096 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5097   echo $ac_n "(cached) $ac_c" 1>&6
5098 else
5099   cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102 /* System header to define __stub macros and hopefully few prototypes,
5103     which can conflict with char res_search(); below.  */
5104 #include <assert.h>
5105 /* Override any gcc2 internal prototype to avoid an error.  */
5106 /* We use char because int might match the return type of a gcc2
5107     builtin and then its argument prototype would still apply.  */
5108 char res_search();
5109 char (*f)();
5110
5111 int main() {
5112
5113 /* The GNU C library defines this for functions which it implements
5114     to always fail with ENOSYS.  Some functions are actually named
5115     something starting with __ and the normal name is an alias.  */
5116 #if defined (__stub_res_search) || defined (__stub___res_search)
5117 choke me
5118 #else
5119 f = res_search;
5120 #endif
5121
5122 ; return 0; }
5123 EOF
5124 if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5125   rm -rf conftest*
5126   eval "ac_cv_func_res_search=yes"
5127 else
5128   echo "configure: failed program was:" >&5
5129   cat conftest.$ac_ext >&5
5130   rm -rf conftest*
5131   eval "ac_cv_func_res_search=no"
5132 fi
5133 rm -f conftest*
5134 fi
5135
5136 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5137   echo "$ac_t""yes" 1>&6
5138   :
5139 else
5140   echo "$ac_t""no" 1>&6
5141 fi
5142
5143 if test $ac_cv_func_res_search = no ; then 
5144         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5145 echo "configure:5146: checking for res_search in -lbind" >&5
5146 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5147 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5148   echo $ac_n "(cached) $ac_c" 1>&6
5149 else
5150   ac_save_LIBS="$LIBS"
5151 LIBS="-lbind  $LIBS"
5152 cat > conftest.$ac_ext <<EOF
5153 #line 5154 "configure"
5154 #include "confdefs.h"
5155 /* Override any gcc2 internal prototype to avoid an error.  */
5156 /* We use char because int might match the return type of a gcc2
5157     builtin and then its argument prototype would still apply.  */
5158 char res_search();
5159
5160 int main() {
5161 res_search()
5162 ; return 0; }
5163 EOF
5164 if { (eval echo configure:5165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=yes"
5167 else
5168   echo "configure: failed program was:" >&5
5169   cat conftest.$ac_ext >&5
5170   rm -rf conftest*
5171   eval "ac_cv_lib_$ac_lib_var=no"
5172 fi
5173 rm -f conftest*
5174 LIBS="$ac_save_LIBS"
5175
5176 fi
5177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5178   echo "$ac_t""yes" 1>&6
5179     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5180     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5181   cat >> confdefs.h <<EOF
5182 #define $ac_tr_lib 1
5183 EOF
5184
5185   LIBS="-lbind $LIBS"
5186
5187 else
5188   echo "$ac_t""no" 1>&6
5189 fi
5190
5191         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5192 fi
5193
5194 if test $ac_cv_func_res_search = no ; then 
5195         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5196 echo "configure:5197: checking for __res_search in -lbind" >&5
5197 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5198 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5199   echo $ac_n "(cached) $ac_c" 1>&6
5200 else
5201   ac_save_LIBS="$LIBS"
5202 LIBS="-lbind  $LIBS"
5203 cat > conftest.$ac_ext <<EOF
5204 #line 5205 "configure"
5205 #include "confdefs.h"
5206 /* Override any gcc2 internal prototype to avoid an error.  */
5207 /* We use char because int might match the return type of a gcc2
5208     builtin and then its argument prototype would still apply.  */
5209 char __res_search();
5210
5211 int main() {
5212 __res_search()
5213 ; return 0; }
5214 EOF
5215 if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5216   rm -rf conftest*
5217   eval "ac_cv_lib_$ac_lib_var=yes"
5218 else
5219   echo "configure: failed program was:" >&5
5220   cat conftest.$ac_ext >&5
5221   rm -rf conftest*
5222   eval "ac_cv_lib_$ac_lib_var=no"
5223 fi
5224 rm -f conftest*
5225 LIBS="$ac_save_LIBS"
5226
5227 fi
5228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5229   echo "$ac_t""yes" 1>&6
5230     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5231     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5232   cat >> confdefs.h <<EOF
5233 #define $ac_tr_lib 1
5234 EOF
5235
5236   LIBS="-lbind $LIBS"
5237
5238 else
5239   echo "$ac_t""no" 1>&6
5240 fi
5241
5242         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5243 fi
5244
5245 if test $ac_cv_func_res_search = no ; then 
5246         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5247 echo "configure:5248: checking for res_search in -lresolv" >&5
5248 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5249 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5250   echo $ac_n "(cached) $ac_c" 1>&6
5251 else
5252   ac_save_LIBS="$LIBS"
5253 LIBS="-lresolv  $LIBS"
5254 cat > conftest.$ac_ext <<EOF
5255 #line 5256 "configure"
5256 #include "confdefs.h"
5257 /* Override any gcc2 internal prototype to avoid an error.  */
5258 /* We use char because int might match the return type of a gcc2
5259     builtin and then its argument prototype would still apply.  */
5260 char res_search();
5261
5262 int main() {
5263 res_search()
5264 ; return 0; }
5265 EOF
5266 if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5267   rm -rf conftest*
5268   eval "ac_cv_lib_$ac_lib_var=yes"
5269 else
5270   echo "configure: failed program was:" >&5
5271   cat conftest.$ac_ext >&5
5272   rm -rf conftest*
5273   eval "ac_cv_lib_$ac_lib_var=no"
5274 fi
5275 rm -f conftest*
5276 LIBS="$ac_save_LIBS"
5277
5278 fi
5279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5280   echo "$ac_t""yes" 1>&6
5281     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5282     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5283   cat >> confdefs.h <<EOF
5284 #define $ac_tr_lib 1
5285 EOF
5286
5287   LIBS="-lresolv $LIBS"
5288
5289 else
5290   echo "$ac_t""no" 1>&6
5291 fi
5292
5293         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5294 fi
5295
5296 if test "$ac_cv_func_res_search" = yes ; then
5297         cat >> confdefs.h <<\EOF
5298 #define HAVE_RES_SEARCH 1
5299 EOF
5300
5301 elif test $ol_enable_dns = yes ; then
5302         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5303 elif test $ol_enable_dns != no ; then
5304         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5305 fi
5306
5307
5308 # ISODE tests
5309 ol_link_isode=no
5310 if test $ol_enable_ldapd != no ; then
5311         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5312
5313                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5314 echo "configure:5315: checking for main in -lxtpp" >&5
5315 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5317   echo $ac_n "(cached) $ac_c" 1>&6
5318 else
5319   ac_save_LIBS="$LIBS"
5320 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5321 cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324
5325 int main() {
5326 main()
5327 ; return 0; }
5328 EOF
5329 if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5330   rm -rf conftest*
5331   eval "ac_cv_lib_$ac_lib_var=yes"
5332 else
5333   echo "configure: failed program was:" >&5
5334   cat conftest.$ac_ext >&5
5335   rm -rf conftest*
5336   eval "ac_cv_lib_$ac_lib_var=no"
5337 fi
5338 rm -f conftest*
5339 LIBS="$ac_save_LIBS"
5340
5341 fi
5342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5343   echo "$ac_t""yes" 1>&6
5344   
5345                 ol_link_isode=yes
5346                 cat >> confdefs.h <<\EOF
5347 #define HAVE_XTPP 1
5348 EOF
5349
5350                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5351                 
5352 else
5353   echo "$ac_t""no" 1>&6
5354 :
5355 fi
5356
5357         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5358 echo "configure:5359: checking for main in -ldsap" >&5
5359 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   ac_save_LIBS="$LIBS"
5364 LIBS="-ldsap -lisode $LIBS"
5365 cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368
5369 int main() {
5370 main()
5371 ; return 0; }
5372 EOF
5373 if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5374   rm -rf conftest*
5375   eval "ac_cv_lib_$ac_lib_var=yes"
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379   rm -rf conftest*
5380   eval "ac_cv_lib_$ac_lib_var=no"
5381 fi
5382 rm -f conftest*
5383 LIBS="$ac_save_LIBS"
5384
5385 fi
5386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5387   echo "$ac_t""yes" 1>&6
5388   
5389                 ol_link_isode=yes
5390                 cat >> confdefs.h <<\EOF
5391 #define HAVE_DSAP 1
5392 EOF
5393
5394                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5395                 
5396 else
5397   echo "$ac_t""no" 1>&6
5398 :
5399 fi
5400
5401         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5402 echo "configure:5403: checking for main in -lisode" >&5
5403 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5404 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5405   echo $ac_n "(cached) $ac_c" 1>&6
5406 else
5407   ac_save_LIBS="$LIBS"
5408 LIBS="-lisode  $LIBS"
5409 cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412
5413 int main() {
5414 main()
5415 ; return 0; }
5416 EOF
5417 if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5418   rm -rf conftest*
5419   eval "ac_cv_lib_$ac_lib_var=yes"
5420 else
5421   echo "configure: failed program was:" >&5
5422   cat conftest.$ac_ext >&5
5423   rm -rf conftest*
5424   eval "ac_cv_lib_$ac_lib_var=no"
5425 fi
5426 rm -f conftest*
5427 LIBS="$ac_save_LIBS"
5428
5429 fi
5430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5431   echo "$ac_t""yes" 1>&6
5432   
5433                 ol_link_isode=yes
5434                 cat >> confdefs.h <<\EOF
5435 #define HAVE_ISODE 1
5436 EOF
5437
5438                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5439                 
5440 else
5441   echo "$ac_t""no" 1>&6
5442 :
5443 fi
5444
5445 fi
5446
5447 if test $ol_link_isode != no; then
5448         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5449 echo "configure:5450: checking for main in -lpp" >&5
5450 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5451 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5452   echo $ac_n "(cached) $ac_c" 1>&6
5453 else
5454   ac_save_LIBS="$LIBS"
5455 LIBS="-lpp  $LIBS"
5456 cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459
5460 int main() {
5461 main()
5462 ; return 0; }
5463 EOF
5464 if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5465   rm -rf conftest*
5466   eval "ac_cv_lib_$ac_lib_var=yes"
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_lib_$ac_lib_var=no"
5472 fi
5473 rm -f conftest*
5474 LIBS="$ac_save_LIBS"
5475
5476 fi
5477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5478   echo "$ac_t""yes" 1>&6
5479   
5480                 cat >> confdefs.h <<\EOF
5481 #define HAVE_PP 1
5482 EOF
5483
5484                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5485                 
5486 else
5487   echo "$ac_t""no" 1>&6
5488 :
5489 fi
5490
5491
5492         # Extract the first word of "pepsy", so it can be a program name with args.
5493 set dummy pepsy; ac_word=$2
5494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5495 echo "configure:5496: checking for $ac_word" >&5
5496 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5497   echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499   case "$PEPSY" in
5500   /*)
5501   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5502   ;;
5503   ?:/*)                  
5504   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5505   ;;
5506   *)
5507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5508   ac_dummy="$PATH"
5509   for ac_dir in $ac_dummy; do 
5510     test -z "$ac_dir" && ac_dir=.
5511     if test -f $ac_dir/$ac_word; then
5512       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5513       break
5514     fi
5515   done
5516   IFS="$ac_save_ifs"
5517   ;;
5518 esac
5519 fi
5520 PEPSY="$ac_cv_path_PEPSY"
5521 if test -n "$PEPSY"; then
5522   echo "$ac_t""$PEPSY" 1>&6
5523 else
5524   echo "$ac_t""no" 1>&6
5525 fi
5526
5527 fi
5528
5529 if test $ol_enable_quipu != no ; then
5530         for ac_hdr in quipu/commonarg.h
5531 do
5532 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5533 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5534 echo "configure:5535: checking for $ac_hdr" >&5
5535 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5536   echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538   cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 #include <$ac_hdr>
5542 EOF
5543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5544 { (eval echo configure:5545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5546 if test -z "$ac_err"; then
5547   rm -rf conftest*
5548   eval "ac_cv_header_$ac_safe=yes"
5549 else
5550   echo "$ac_err" >&5
5551   echo "configure: failed program was:" >&5
5552   cat conftest.$ac_ext >&5
5553   rm -rf conftest*
5554   eval "ac_cv_header_$ac_safe=no"
5555 fi
5556 rm -f conftest*
5557 fi
5558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5559   echo "$ac_t""yes" 1>&6
5560     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5561   cat >> confdefs.h <<EOF
5562 #define $ac_tr_hdr 1
5563 EOF
5564  
5565 else
5566   echo "$ac_t""no" 1>&6
5567 fi
5568 done
5569
5570
5571         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5572                 BUILD_QUIPU=yes
5573         elif test $ol_enable_quipu = auto ; then
5574                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5575         else
5576                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5577         fi
5578 fi
5579
5580 ol_link_kerberos=no
5581
5582 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5583         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5584 do
5585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5587 echo "configure:5588: checking for $ac_hdr" >&5
5588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5589   echo $ac_n "(cached) $ac_c" 1>&6
5590 else
5591   cat > conftest.$ac_ext <<EOF
5592 #line 5593 "configure"
5593 #include "confdefs.h"
5594 #include <$ac_hdr>
5595 EOF
5596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5597 { (eval echo configure:5598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5599 if test -z "$ac_err"; then
5600   rm -rf conftest*
5601   eval "ac_cv_header_$ac_safe=yes"
5602 else
5603   echo "$ac_err" >&5
5604   echo "configure: failed program was:" >&5
5605   cat conftest.$ac_ext >&5
5606   rm -rf conftest*
5607   eval "ac_cv_header_$ac_safe=no"
5608 fi
5609 rm -f conftest*
5610 fi
5611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5612   echo "$ac_t""yes" 1>&6
5613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5614   cat >> confdefs.h <<EOF
5615 #define $ac_tr_hdr 1
5616 EOF
5617  
5618 else
5619   echo "$ac_t""no" 1>&6
5620 fi
5621 done
5622
5623
5624         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5625                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5626 echo "configure:5627: checking for main in -lkrb4" >&5
5627 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5629   echo $ac_n "(cached) $ac_c" 1>&6
5630 else
5631   ac_save_LIBS="$LIBS"
5632 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5633 cat > conftest.$ac_ext <<EOF
5634 #line 5635 "configure"
5635 #include "confdefs.h"
5636
5637 int main() {
5638 main()
5639 ; return 0; }
5640 EOF
5641 if { (eval echo configure:5642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5642   rm -rf conftest*
5643   eval "ac_cv_lib_$ac_lib_var=yes"
5644 else
5645   echo "configure: failed program was:" >&5
5646   cat conftest.$ac_ext >&5
5647   rm -rf conftest*
5648   eval "ac_cv_lib_$ac_lib_var=no"
5649 fi
5650 rm -f conftest*
5651 LIBS="$ac_save_LIBS"
5652
5653 fi
5654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5655   echo "$ac_t""yes" 1>&6
5656   have_k5=yes
5657 else
5658   echo "$ac_t""no" 1>&6
5659 have_k5=no
5660 fi
5661
5662
5663                 if test $have_k5 = yes ; then
5664                         ol_with_kerberos=found
5665                         ol_link_kerberos=yes
5666
5667                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5668
5669                         LIBS="$KRB_LIBS $LIBS"
5670
5671                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5672 echo "configure:5673: checking for des_debug in Kerberos libraries" >&5
5673 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5674   echo $ac_n "(cached) $ac_c" 1>&6
5675 else
5676   
5677                                                                 save_LIBS="$LIBS"
5678                                 LIBS="$KRB_LIBS $LIBS"
5679                                 cat > conftest.$ac_ext <<EOF
5680 #line 5681 "configure"
5681 #include "confdefs.h"
5682
5683 #include <kerberosIV/krb.h>
5684 #include <kerberosIV/des.h>
5685 extern int des_debug;
5686
5687 int main() {
5688
5689 des_debug = 1;
5690
5691 ; return 0; }
5692 EOF
5693 if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5694   rm -rf conftest*
5695   ol_cv_var_des_debug=yes
5696 else
5697   echo "configure: failed program was:" >&5
5698   cat conftest.$ac_ext >&5
5699   rm -rf conftest*
5700   ol_cv_var_des_debug=no
5701 fi
5702 rm -f conftest*
5703                                                                 LIBS="$save_LIBS"
5704                         
5705 fi
5706
5707 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5708
5709                         if test $ol_cv_var_des_debug = yes ; then
5710                                 cat >> confdefs.h <<\EOF
5711 #define HAVE_DES_DEBUG 1
5712 EOF
5713
5714                         fi
5715
5716                         LIBS="$save_LIBS"
5717                 fi
5718         fi
5719 fi
5720
5721 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5722         for ac_hdr in krb.h des.h
5723 do
5724 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5725 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5726 echo "configure:5727: checking for $ac_hdr" >&5
5727 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5728   echo $ac_n "(cached) $ac_c" 1>&6
5729 else
5730   cat > conftest.$ac_ext <<EOF
5731 #line 5732 "configure"
5732 #include "confdefs.h"
5733 #include <$ac_hdr>
5734 EOF
5735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5736 { (eval echo configure:5737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5738 if test -z "$ac_err"; then
5739   rm -rf conftest*
5740   eval "ac_cv_header_$ac_safe=yes"
5741 else
5742   echo "$ac_err" >&5
5743   echo "configure: failed program was:" >&5
5744   cat conftest.$ac_ext >&5
5745   rm -rf conftest*
5746   eval "ac_cv_header_$ac_safe=no"
5747 fi
5748 rm -f conftest*
5749 fi
5750 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5751   echo "$ac_t""yes" 1>&6
5752     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5753   cat >> confdefs.h <<EOF
5754 #define $ac_tr_hdr 1
5755 EOF
5756  
5757 else
5758   echo "$ac_t""no" 1>&6
5759 fi
5760 done
5761
5762
5763         if test $ac_cv_header_krb_h = yes ; then
5764                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5765 echo "configure:5766: checking for main in -lkrb" >&5
5766 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5768   echo $ac_n "(cached) $ac_c" 1>&6
5769 else
5770   ac_save_LIBS="$LIBS"
5771 LIBS="-lkrb -ldes $LIBS"
5772 cat > conftest.$ac_ext <<EOF
5773 #line 5774 "configure"
5774 #include "confdefs.h"
5775
5776 int main() {
5777 main()
5778 ; return 0; }
5779 EOF
5780 if { (eval echo configure:5781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5781   rm -rf conftest*
5782   eval "ac_cv_lib_$ac_lib_var=yes"
5783 else
5784   echo "configure: failed program was:" >&5
5785   cat conftest.$ac_ext >&5
5786   rm -rf conftest*
5787   eval "ac_cv_lib_$ac_lib_var=no"
5788 fi
5789 rm -f conftest*
5790 LIBS="$ac_save_LIBS"
5791
5792 fi
5793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5794   echo "$ac_t""yes" 1>&6
5795   have_k4=yes
5796 else
5797   echo "$ac_t""no" 1>&6
5798 have_k4=no
5799 fi
5800
5801
5802                 if test $have_k4 = yes ; then
5803                         ol_with_kerberos=found
5804                         ol_link_kerberos=yes
5805
5806                         KRB_LIBS="-lkrb -ldes"
5807                 fi
5808         fi
5809 fi
5810
5811 if test $ol_link_kerberos = yes ; then
5812         cat >> confdefs.h <<\EOF
5813 #define HAVE_KERBEROS 1
5814 EOF
5815
5816 fi
5817
5818 ol_link_tls=no
5819 if test $ol_with_tls != no ; then
5820         
5821         for ac_hdr in openssl/ssl.h ssl.h
5822 do
5823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5825 echo "configure:5826: checking for $ac_hdr" >&5
5826 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5827   echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829   cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832 #include <$ac_hdr>
5833 EOF
5834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5835 { (eval echo configure:5836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5837 if test -z "$ac_err"; then
5838   rm -rf conftest*
5839   eval "ac_cv_header_$ac_safe=yes"
5840 else
5841   echo "$ac_err" >&5
5842   echo "configure: failed program was:" >&5
5843   cat conftest.$ac_ext >&5
5844   rm -rf conftest*
5845   eval "ac_cv_header_$ac_safe=no"
5846 fi
5847 rm -f conftest*
5848 fi
5849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5850   echo "$ac_t""yes" 1>&6
5851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5852   cat >> confdefs.h <<EOF
5853 #define $ac_tr_hdr 1
5854 EOF
5855  
5856 else
5857   echo "$ac_t""no" 1>&6
5858 fi
5859 done
5860
5861         
5862         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5863                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5864 echo "configure:5865: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5865 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5867   echo $ac_n "(cached) $ac_c" 1>&6
5868 else
5869   ac_save_LIBS="$LIBS"
5870 LIBS="-lssl -lcrypto $LIBS"
5871 cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 /* Override any gcc2 internal prototype to avoid an error.  */
5875 /* We use char because int might match the return type of a gcc2
5876     builtin and then its argument prototype would still apply.  */
5877 char SSLeay_add_ssl_algorithms();
5878
5879 int main() {
5880 SSLeay_add_ssl_algorithms()
5881 ; return 0; }
5882 EOF
5883 if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5884   rm -rf conftest*
5885   eval "ac_cv_lib_$ac_lib_var=yes"
5886 else
5887   echo "configure: failed program was:" >&5
5888   cat conftest.$ac_ext >&5
5889   rm -rf conftest*
5890   eval "ac_cv_lib_$ac_lib_var=no"
5891 fi
5892 rm -f conftest*
5893 LIBS="$ac_save_LIBS"
5894
5895 fi
5896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5897   echo "$ac_t""yes" 1>&6
5898   have_ssleay=yes
5899                         need_rsaref=no
5900 else
5901   echo "$ac_t""no" 1>&6
5902 have_ssleay=no
5903 fi
5904
5905                         
5906                 if test $have_ssleay = no ; then
5907                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5908 echo "configure:5909: checking for SSL_library_init in -lssl" >&5
5909 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5910 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5911   echo $ac_n "(cached) $ac_c" 1>&6
5912 else
5913   ac_save_LIBS="$LIBS"
5914 LIBS="-lssl -lcrypto $LIBS"
5915 cat > conftest.$ac_ext <<EOF
5916 #line 5917 "configure"
5917 #include "confdefs.h"
5918 /* Override any gcc2 internal prototype to avoid an error.  */
5919 /* We use char because int might match the return type of a gcc2
5920     builtin and then its argument prototype would still apply.  */
5921 char SSL_library_init();
5922
5923 int main() {
5924 SSL_library_init()
5925 ; return 0; }
5926 EOF
5927 if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5928   rm -rf conftest*
5929   eval "ac_cv_lib_$ac_lib_var=yes"
5930 else
5931   echo "configure: failed program was:" >&5
5932   cat conftest.$ac_ext >&5
5933   rm -rf conftest*
5934   eval "ac_cv_lib_$ac_lib_var=no"
5935 fi
5936 rm -f conftest*
5937 LIBS="$ac_save_LIBS"
5938
5939 fi
5940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5941   echo "$ac_t""yes" 1>&6
5942   have_ssleay=yes
5943                                 need_rsaref=no
5944 else
5945   echo "$ac_t""no" 1>&6
5946 have_ssleay=no
5947 fi
5948
5949                 fi
5950
5951                 if test $have_ssleay = no ; then
5952                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5953 echo "configure:5954: checking for ssl3_accept in -lssl" >&5
5954 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5955 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5956   echo $ac_n "(cached) $ac_c" 1>&6
5957 else
5958   ac_save_LIBS="$LIBS"
5959 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5960 cat > conftest.$ac_ext <<EOF
5961 #line 5962 "configure"
5962 #include "confdefs.h"
5963 /* Override any gcc2 internal prototype to avoid an error.  */
5964 /* We use char because int might match the return type of a gcc2
5965     builtin and then its argument prototype would still apply.  */
5966 char ssl3_accept();
5967
5968 int main() {
5969 ssl3_accept()
5970 ; return 0; }
5971 EOF
5972 if { (eval echo configure:5973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5973   rm -rf conftest*
5974   eval "ac_cv_lib_$ac_lib_var=yes"
5975 else
5976   echo "configure: failed program was:" >&5
5977   cat conftest.$ac_ext >&5
5978   rm -rf conftest*
5979   eval "ac_cv_lib_$ac_lib_var=no"
5980 fi
5981 rm -f conftest*
5982 LIBS="$ac_save_LIBS"
5983
5984 fi
5985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5986   echo "$ac_t""yes" 1>&6
5987   have_ssleay=yes
5988                                 need_rsaref=yes
5989 else
5990   echo "$ac_t""no" 1>&6
5991 have_ssleay=no
5992 fi
5993
5994                 fi
5995
5996                 if test $have_ssleay = yes ; then
5997                         ol_with_tls=found
5998                         ol_link_tls=yes
5999
6000                         cat >> confdefs.h <<\EOF
6001 #define HAVE_SSLEAY 1
6002 EOF
6003
6004
6005                         if test $need_rsaref = yes; then
6006                                 cat >> confdefs.h <<\EOF
6007 #define HAVE_RSAREF 1
6008 EOF
6009
6010
6011                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6012                         else
6013                                 TLS_LIBS="-lssl -lcrypto"
6014                         fi
6015                 fi
6016         fi
6017 fi
6018
6019 if test $ol_link_tls = yes ; then
6020         cat >> confdefs.h <<\EOF
6021 #define HAVE_TLS 1
6022 EOF
6023
6024 fi      
6025
6026 for ac_func in \
6027         ctime_r                 \
6028         gethostbyname_r gethostbyaddr_r \
6029
6030 do
6031 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6032 echo "configure:6033: checking for $ac_func" >&5
6033 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6034   echo $ac_n "(cached) $ac_c" 1>&6
6035 else
6036   cat > conftest.$ac_ext <<EOF
6037 #line 6038 "configure"
6038 #include "confdefs.h"
6039 /* System header to define __stub macros and hopefully few prototypes,
6040     which can conflict with char $ac_func(); below.  */
6041 #include <assert.h>
6042 /* Override any gcc2 internal prototype to avoid an error.  */
6043 /* We use char because int might match the return type of a gcc2
6044     builtin and then its argument prototype would still apply.  */
6045 char $ac_func();
6046 char (*f)();
6047
6048 int main() {
6049
6050 /* The GNU C library defines this for functions which it implements
6051     to always fail with ENOSYS.  Some functions are actually named
6052     something starting with __ and the normal name is an alias.  */
6053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6054 choke me
6055 #else
6056 f = $ac_func;
6057 #endif
6058
6059 ; return 0; }
6060 EOF
6061 if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6062   rm -rf conftest*
6063   eval "ac_cv_func_$ac_func=yes"
6064 else
6065   echo "configure: failed program was:" >&5
6066   cat conftest.$ac_ext >&5
6067   rm -rf conftest*
6068   eval "ac_cv_func_$ac_func=no"
6069 fi
6070 rm -f conftest*
6071 fi
6072
6073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6074   echo "$ac_t""yes" 1>&6
6075     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6076   cat >> confdefs.h <<EOF
6077 #define $ac_tr_func 1
6078 EOF
6079  
6080 else
6081   echo "$ac_t""no" 1>&6
6082 fi
6083 done
6084
6085
6086 if test "$ac_cv_func_ctime_r" = no ; then
6087         ol_cv_func_ctime_r_nargs=0
6088 else
6089         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6090 echo "configure:6091: checking number of arguments of ctime_r" >&5
6091 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6092   echo $ac_n "(cached) $ac_c" 1>&6
6093 else
6094   cat > conftest.$ac_ext <<EOF
6095 #line 6096 "configure"
6096 #include "confdefs.h"
6097 #include <time.h>
6098 int main() {
6099 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6100 ; return 0; }
6101 EOF
6102 if { (eval echo configure:6103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6103   rm -rf conftest*
6104   ol_cv_func_ctime_r_nargs=3
6105 else
6106   echo "configure: failed program was:" >&5
6107   cat conftest.$ac_ext >&5
6108   rm -rf conftest*
6109   cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112 #include <time.h>
6113 int main() {
6114 time_t ti; char *buffer; ctime_r(&ti,buffer);
6115 ; return 0; }
6116 EOF
6117 if { (eval echo configure:6118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6118   rm -rf conftest*
6119   ol_cv_func_ctime_r_nargs=2
6120 else
6121   echo "configure: failed program was:" >&5
6122   cat conftest.$ac_ext >&5
6123   rm -rf conftest*
6124   ol_cv_func_ctime_r_nargs=0
6125 fi
6126 rm -f conftest*
6127 fi
6128 rm -f conftest*
6129 fi
6130
6131 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6132   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6133     cat >> confdefs.h <<EOF
6134 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6135 EOF
6136
6137   fi
6138
6139 fi
6140
6141 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6142         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6143 echo "configure:6144: checking number of arguments of gethostbyname_r" >&5
6144 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6145   echo $ac_n "(cached) $ac_c" 1>&6
6146 else
6147   cat > conftest.$ac_ext <<EOF
6148 #line 6149 "configure"
6149 #include "confdefs.h"
6150 #include <sys/types.h>
6151 #include <sys/socket.h>
6152 #include <netinet/in.h>
6153 #include <netdb.h>
6154 #define BUFSIZE (sizeof(struct hostent)+10)
6155 int main() {
6156 struct hostent hent; char buffer[BUFSIZE];
6157                 int bufsize=BUFSIZE;int h_errno;
6158                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6159                         buffer, bufsize, &h_errno);
6160 ; return 0; }
6161 EOF
6162 if { (eval echo configure:6163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6163   rm -rf conftest*
6164   ol_cv_func_gethostbyname_r_nargs=5
6165 else
6166   echo "configure: failed program was:" >&5
6167   cat conftest.$ac_ext >&5
6168   rm -rf conftest*
6169   cat > conftest.$ac_ext <<EOF
6170 #line 6171 "configure"
6171 #include "confdefs.h"
6172 #include <sys/types.h>
6173 #include <sys/socket.h>
6174 #include <netinet/in.h>
6175 #include <netdb.h>
6176 #define BUFSIZE (sizeof(struct hostent)+10)
6177 int main() {
6178 struct hostent hent;struct hostent *rhent;
6179                         char buffer[BUFSIZE];
6180                         int bufsize=BUFSIZE;int h_errno;
6181                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6182                                 &rhent, &h_errno);
6183 ; return 0; }
6184 EOF
6185 if { (eval echo configure:6186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6186   rm -rf conftest*
6187   ol_cv_func_gethostbyname_r_nargs=6
6188 else
6189   echo "configure: failed program was:" >&5
6190   cat conftest.$ac_ext >&5
6191   rm -rf conftest*
6192   ol_cv_func_gethostbyname_r_nargs=0
6193 fi
6194 rm -f conftest*
6195 fi
6196 rm -f conftest*
6197 fi
6198
6199 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6200   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6201         cat >> confdefs.h <<EOF
6202 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6203 EOF
6204
6205   fi
6206
6207 else
6208         ol_cv_func_gethostbyname_r_nargs=0
6209 fi
6210  
6211 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6212         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6213 echo "configure:6214: checking number of arguments of gethostbyaddr_r" >&5
6214 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6215   echo $ac_n "(cached) $ac_c" 1>&6
6216 else
6217   cat > conftest.$ac_ext <<EOF
6218 #line 6219 "configure"
6219 #include "confdefs.h"
6220 #include <sys/types.h>
6221 #include <sys/socket.h>
6222 #include <netinet/in.h>
6223 #include <netdb.h>
6224 #define BUFSIZE (sizeof(struct hostent)+10)
6225 int main() {
6226 struct hostent hent; char buffer[BUFSIZE]; 
6227             struct in_addr add;
6228             size_t alen=sizeof(struct in_addr);
6229             int bufsize=BUFSIZE;int h_errno;
6230                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6231                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6232 ; return 0; }
6233 EOF
6234 if { (eval echo configure:6235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6235   rm -rf conftest*
6236   ol_cv_func_gethostbyaddr_r_nargs=7
6237 else
6238   echo "configure: failed program was:" >&5
6239   cat conftest.$ac_ext >&5
6240   rm -rf conftest*
6241   cat > conftest.$ac_ext <<EOF
6242 #line 6243 "configure"
6243 #include "confdefs.h"
6244 #include <sys/types.h>
6245 #include <sys/socket.h>
6246 #include <netinet/in.h>
6247 #include <netdb.h>
6248 #define BUFSIZE (sizeof(struct hostent)+10)
6249 int main() {
6250 struct hostent hent;
6251                         struct hostent *rhent; char buffer[BUFSIZE]; 
6252                         struct in_addr add;
6253                         size_t alen=sizeof(struct in_addr);
6254                         int bufsize=BUFSIZE;int h_errno;
6255                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6256                                 alen, AF_INET, &hent, buffer, bufsize, 
6257                                 &rhent, &h_errno);
6258 ; return 0; }
6259 EOF
6260 if { (eval echo configure:6261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6261   rm -rf conftest*
6262   ol_cv_func_gethostbyaddr_r_nargs=8
6263 else
6264   echo "configure: failed program was:" >&5
6265   cat conftest.$ac_ext >&5
6266   rm -rf conftest*
6267   ol_cv_func_gethostbyaddr_r_nargs=0
6268 fi
6269 rm -f conftest*
6270 fi
6271 rm -f conftest*
6272 fi
6273
6274 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6275   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6276     cat >> confdefs.h <<EOF
6277 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6278 EOF
6279
6280   fi
6281
6282 else
6283         ol_cv_func_gethostbyaddr_r_nargs=0
6284 fi
6285
6286 if test "$ac_cv_func_ctime_r" = yes \
6287         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6288         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6289         -a "$ac_cv_func_gethostbyname_r" = yes \
6290         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6291         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6292         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6293         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6294         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6295         ; then
6296  
6297         cat >> confdefs.h <<\EOF
6298 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6299 EOF
6300
6301 fi
6302
6303 ol_link_threads=no
6304 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6305         -o $ol_with_threads = posix ; then
6306
6307         for ac_hdr in pthread.h
6308 do
6309 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6310 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6311 echo "configure:6312: checking for $ac_hdr" >&5
6312 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6313   echo $ac_n "(cached) $ac_c" 1>&6
6314 else
6315   cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6318 #include <$ac_hdr>
6319 EOF
6320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6321 { (eval echo configure:6322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6323 if test -z "$ac_err"; then
6324   rm -rf conftest*
6325   eval "ac_cv_header_$ac_safe=yes"
6326 else
6327   echo "$ac_err" >&5
6328   echo "configure: failed program was:" >&5
6329   cat conftest.$ac_ext >&5
6330   rm -rf conftest*
6331   eval "ac_cv_header_$ac_safe=no"
6332 fi
6333 rm -f conftest*
6334 fi
6335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6336   echo "$ac_t""yes" 1>&6
6337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6338   cat >> confdefs.h <<EOF
6339 #define $ac_tr_hdr 1
6340 EOF
6341  
6342 else
6343   echo "$ac_t""no" 1>&6
6344 fi
6345 done
6346
6347
6348         if test $ac_cv_header_pthread_h = yes ; then
6349                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6350 echo "configure:6351: checking POSIX thread version" >&5
6351 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6352   echo $ac_n "(cached) $ac_c" 1>&6
6353 else
6354   
6355         cat > conftest.$ac_ext <<EOF
6356 #line 6357 "configure"
6357 #include "confdefs.h"
6358
6359 #               include <pthread.h>
6360                 /* this check could be improved */
6361 #               ifdef PTHREAD_ONCE_INIT
6362                         pthread_version_final;
6363 #               endif
6364         
6365 EOF
6366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6367   egrep "pthread_version_final" >/dev/null 2>&1; then
6368   rm -rf conftest*
6369   ol_pthread_final=yes
6370 else
6371   rm -rf conftest*
6372   ol_pthread_final=no
6373 fi
6374 rm -f conftest*
6375
6376
6377         cat > conftest.$ac_ext <<EOF
6378 #line 6379 "configure"
6379 #include "confdefs.h"
6380
6381 #               include <pthread.h>
6382                 /* this check could be improved */
6383 #               ifdef pthread_once_init
6384                         pthread_version_draft4;
6385 #               endif
6386         
6387 EOF
6388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6389   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6390   rm -rf conftest*
6391   ol_pthread_draft4=yes
6392 else
6393   rm -rf conftest*
6394   ol_pthread_draft4=no
6395 fi
6396 rm -f conftest*
6397
6398
6399         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6400                 ol_cv_pthread_version=final
6401         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6402                 ol_cv_pthread_version=draft4
6403         else
6404                 ol_cv_pthread_version=unknown
6405         fi
6406
6407 fi
6408
6409 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6410
6411
6412                 if test $ol_cv_pthread_version = final ; then
6413                         cat >> confdefs.h <<\EOF
6414 #define HAVE_PTHREADS_FINAL 1
6415 EOF
6416
6417                 elif test $ol_cv_pthread_version = draft4 ; then
6418                         cat >> confdefs.h <<\EOF
6419 #define HAVE_PTHREADS_D4 1
6420 EOF
6421
6422                 else
6423                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6424                 fi
6425
6426                 # consider threads found
6427                 ol_with_threads=found
6428
6429                 
6430         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6431 echo "configure:6432: checking for LinuxThreads pthread.h" >&5
6432 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6433   echo $ac_n "(cached) $ac_c" 1>&6
6434 else
6435   cat > conftest.$ac_ext <<EOF
6436 #line 6437 "configure"
6437 #include "confdefs.h"
6438 #include <pthread.h>
6439 EOF
6440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6441   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6442   rm -rf conftest*
6443   ol_cv_header_linux_threads=yes
6444 else
6445   rm -rf conftest*
6446   ol_cv_header_linux_threads=no
6447 fi
6448 rm -f conftest*
6449
6450                 
6451 fi
6452
6453 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6454         if test $ol_cv_header_linux_threads = yes; then
6455                 cat >> confdefs.h <<\EOF
6456 #define HAVE_LINUX_THREADS 1
6457 EOF
6458
6459         fi
6460
6461                 
6462         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6463 echo "configure:6464: checking for GNU Pth pthread.h" >&5
6464 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6465   echo $ac_n "(cached) $ac_c" 1>&6
6466 else
6467   cat > conftest.$ac_ext <<EOF
6468 #line 6469 "configure"
6469 #include "confdefs.h"
6470 #include <pthread.h>
6471 #ifdef _POSIX_THREAD_IS_GNU_PTH
6472         __gnu_pth__;
6473 #endif
6474
6475 EOF
6476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6477   egrep "__gnu_pth__" >/dev/null 2>&1; then
6478   rm -rf conftest*
6479   ol_cv_header_gnu_pth_pthread_h=yes
6480 else
6481   rm -rf conftest*
6482   ol_cv_header_gnu_pth_pthread_h=no
6483 fi
6484 rm -f conftest*
6485
6486                 
6487 fi
6488
6489 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6490
6491
6492                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6493                         for ac_hdr in sched.h
6494 do
6495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6497 echo "configure:6498: checking for $ac_hdr" >&5
6498 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6499   echo $ac_n "(cached) $ac_c" 1>&6
6500 else
6501   cat > conftest.$ac_ext <<EOF
6502 #line 6503 "configure"
6503 #include "confdefs.h"
6504 #include <$ac_hdr>
6505 EOF
6506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6507 { (eval echo configure:6508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6509 if test -z "$ac_err"; then
6510   rm -rf conftest*
6511   eval "ac_cv_header_$ac_safe=yes"
6512 else
6513   echo "$ac_err" >&5
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -rf conftest*
6517   eval "ac_cv_header_$ac_safe=no"
6518 fi
6519 rm -f conftest*
6520 fi
6521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6522   echo "$ac_t""yes" 1>&6
6523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6524   cat >> confdefs.h <<EOF
6525 #define $ac_tr_hdr 1
6526 EOF
6527  
6528 else
6529   echo "$ac_t""no" 1>&6
6530 fi
6531 done
6532
6533                 fi
6534
6535                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6536                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6537 echo "configure:6538: checking for pthread_create in default libraries" >&5
6538 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6539   echo $ac_n "(cached) $ac_c" 1>&6
6540 else
6541   
6542                 if test "$cross_compiling" = yes; then
6543   cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546 /* pthread test headers */
6547 #include <pthread.h>
6548 #ifndef NULL
6549 #define NULL (void*)0
6550 #endif
6551
6552 static void *task(p)
6553         void *p;
6554 {
6555         return (void *) (p == NULL);
6556 }
6557
6558 int main() {
6559
6560         /* pthread test function */
6561         pthread_t t;
6562         int status;
6563
6564         /* make sure pthread_create() isn't just a stub */
6565 #if HAVE_PTHREADS_D4
6566         status = pthread_create(&t, pthread_attr_default, task, NULL);
6567 #else
6568         status = pthread_create(&t, NULL, task, NULL);
6569 #endif
6570
6571         if( status ) exit( status );
6572
6573         /* make sure pthread_detach() isn't just a stub */
6574 #if HAVE_PTHREADS_D4
6575         status = pthread_detach( &t );
6576 #else
6577         status = pthread_detach( t );
6578 #endif
6579
6580 #ifdef HAVE_LINUX_THREADS
6581         pthread_kill_other_threads_np();
6582 #endif
6583
6584         exit( status );
6585
6586 ; return 0; }
6587 EOF
6588 if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6589   rm -rf conftest*
6590   ol_cv_pthread_create=yes
6591 else
6592   echo "configure: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594   rm -rf conftest*
6595   ol_cv_pthread_create=no
6596 fi
6597 rm -f conftest*
6598 else
6599   cat > conftest.$ac_ext <<EOF
6600 #line 6601 "configure"
6601 #include "confdefs.h"
6602 /* pthread test headers */
6603 #include <pthread.h>
6604 #ifndef NULL
6605 #define NULL (void*)0
6606 #endif
6607
6608 static void *task(p)
6609         void *p;
6610 {
6611         return (void *) (p == NULL);
6612 }
6613
6614
6615 int main(argc, argv)
6616         int argc;
6617         char **argv;
6618 {
6619
6620         /* pthread test function */
6621         pthread_t t;
6622         int status;
6623
6624         /* make sure pthread_create() isn't just a stub */
6625 #if HAVE_PTHREADS_D4
6626         status = pthread_create(&t, pthread_attr_default, task, NULL);
6627 #else
6628         status = pthread_create(&t, NULL, task, NULL);
6629 #endif
6630
6631         if( status ) exit( status );
6632
6633         /* make sure pthread_detach() isn't just a stub */
6634 #if HAVE_PTHREADS_D4
6635         status = pthread_detach( &t );
6636 #else
6637         status = pthread_detach( t );
6638 #endif
6639
6640 #ifdef HAVE_LINUX_THREADS
6641         pthread_kill_other_threads_np();
6642 #endif
6643
6644         exit( status );
6645
6646 }
6647
6648 EOF
6649 if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6650 then
6651   ol_cv_pthread_create=yes
6652 else
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -fr conftest*
6656   ol_cv_pthread_create=no
6657 fi
6658 rm -fr conftest*
6659 fi
6660
6661 fi
6662
6663 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6664
6665                 if test $ol_cv_pthread_create != no ; then
6666                         ol_link_threads=posix
6667                         ol_link_pthreads=""
6668                 fi
6669                 
6670                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6671 if test "$ol_link_threads" = no ; then
6672         # try -kthread
6673         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6674 echo "configure:6675: checking for pthread link with -kthread" >&5
6675 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6676   echo $ac_n "(cached) $ac_c" 1>&6
6677 else
6678   
6679                 # save the flags
6680                 ol_LIBS="$LIBS"
6681                 LIBS="-kthread $LIBS"
6682
6683                 if test "$cross_compiling" = yes; then
6684   cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687 /* pthread test headers */
6688 #include <pthread.h>
6689 #ifndef NULL
6690 #define NULL (void*)0
6691 #endif
6692
6693 static void *task(p)
6694         void *p;
6695 {
6696         return (void *) (p == NULL);
6697 }
6698
6699 int main() {
6700
6701         /* pthread test function */
6702         pthread_t t;
6703         int status;
6704
6705         /* make sure pthread_create() isn't just a stub */
6706 #if HAVE_PTHREADS_D4
6707         status = pthread_create(&t, pthread_attr_default, task, NULL);
6708 #else
6709         status = pthread_create(&t, NULL, task, NULL);
6710 #endif
6711
6712         if( status ) exit( status );
6713
6714         /* make sure pthread_detach() isn't just a stub */
6715 #if HAVE_PTHREADS_D4
6716         status = pthread_detach( &t );
6717 #else
6718         status = pthread_detach( t );
6719 #endif
6720
6721 #ifdef HAVE_LINUX_THREADS
6722         pthread_kill_other_threads_np();
6723 #endif
6724
6725         exit( status );
6726
6727 ; return 0; }
6728 EOF
6729 if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6730   rm -rf conftest*
6731   ol_cv_pthread_kthread=yes
6732 else
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   ol_cv_pthread_kthread=no
6737 fi
6738 rm -f conftest*
6739 else
6740   cat > conftest.$ac_ext <<EOF
6741 #line 6742 "configure"
6742 #include "confdefs.h"
6743 /* pthread test headers */
6744 #include <pthread.h>
6745 #ifndef NULL
6746 #define NULL (void*)0
6747 #endif
6748
6749 static void *task(p)
6750         void *p;
6751 {
6752         return (void *) (p == NULL);
6753 }
6754
6755
6756 int main(argc, argv)
6757         int argc;
6758         char **argv;
6759 {
6760
6761         /* pthread test function */
6762         pthread_t t;
6763         int status;
6764
6765         /* make sure pthread_create() isn't just a stub */
6766 #if HAVE_PTHREADS_D4
6767         status = pthread_create(&t, pthread_attr_default, task, NULL);
6768 #else
6769         status = pthread_create(&t, NULL, task, NULL);
6770 #endif
6771
6772         if( status ) exit( status );
6773
6774         /* make sure pthread_detach() isn't just a stub */
6775 #if HAVE_PTHREADS_D4
6776         status = pthread_detach( &t );
6777 #else
6778         status = pthread_detach( t );
6779 #endif
6780
6781 #ifdef HAVE_LINUX_THREADS
6782         pthread_kill_other_threads_np();
6783 #endif
6784
6785         exit( status );
6786
6787 }
6788
6789 EOF
6790 if { (eval echo configure:6791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6791 then
6792   ol_cv_pthread_kthread=yes
6793 else
6794   echo "configure: failed program was:" >&5
6795   cat conftest.$ac_ext >&5
6796   rm -fr conftest*
6797   ol_cv_pthread_kthread=no
6798 fi
6799 rm -fr conftest*
6800 fi
6801
6802
6803                 # restore the LIBS
6804                 LIBS="$ol_LIBS"
6805         
6806 fi
6807
6808 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6809
6810         if test $ol_cv_pthread_kthread = yes ; then
6811                 ol_link_pthreads="-kthread"
6812                 ol_link_threads=posix
6813         fi
6814 fi
6815
6816                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6817 if test "$ol_link_threads" = no ; then
6818         # try -pthread
6819         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6820 echo "configure:6821: checking for pthread link with -pthread" >&5
6821 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   
6825                 # save the flags
6826                 ol_LIBS="$LIBS"
6827                 LIBS="-pthread $LIBS"
6828
6829                 if test "$cross_compiling" = yes; then
6830   cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833 /* pthread test headers */
6834 #include <pthread.h>
6835 #ifndef NULL
6836 #define NULL (void*)0
6837 #endif
6838
6839 static void *task(p)
6840         void *p;
6841 {
6842         return (void *) (p == NULL);
6843 }
6844
6845 int main() {
6846
6847         /* pthread test function */
6848         pthread_t t;
6849         int status;
6850
6851         /* make sure pthread_create() isn't just a stub */
6852 #if HAVE_PTHREADS_D4
6853         status = pthread_create(&t, pthread_attr_default, task, NULL);
6854 #else
6855         status = pthread_create(&t, NULL, task, NULL);
6856 #endif
6857
6858         if( status ) exit( status );
6859
6860         /* make sure pthread_detach() isn't just a stub */
6861 #if HAVE_PTHREADS_D4
6862         status = pthread_detach( &t );
6863 #else
6864         status = pthread_detach( t );
6865 #endif
6866
6867 #ifdef HAVE_LINUX_THREADS
6868         pthread_kill_other_threads_np();
6869 #endif
6870
6871         exit( status );
6872
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6876   rm -rf conftest*
6877   ol_cv_pthread_pthread=yes
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   ol_cv_pthread_pthread=no
6883 fi
6884 rm -f conftest*
6885 else
6886   cat > conftest.$ac_ext <<EOF
6887 #line 6888 "configure"
6888 #include "confdefs.h"
6889 /* pthread test headers */
6890 #include <pthread.h>
6891 #ifndef NULL
6892 #define NULL (void*)0
6893 #endif
6894
6895 static void *task(p)
6896         void *p;
6897 {
6898         return (void *) (p == NULL);
6899 }
6900
6901
6902 int main(argc, argv)
6903         int argc;
6904         char **argv;
6905 {
6906
6907         /* pthread test function */
6908         pthread_t t;
6909         int status;
6910
6911         /* make sure pthread_create() isn't just a stub */
6912 #if HAVE_PTHREADS_D4
6913         status = pthread_create(&t, pthread_attr_default, task, NULL);
6914 #else
6915         status = pthread_create(&t, NULL, task, NULL);
6916 #endif
6917
6918         if( status ) exit( status );
6919
6920         /* make sure pthread_detach() isn't just a stub */
6921 #if HAVE_PTHREADS_D4
6922         status = pthread_detach( &t );
6923 #else
6924         status = pthread_detach( t );
6925 #endif
6926
6927 #ifdef HAVE_LINUX_THREADS
6928         pthread_kill_other_threads_np();
6929 #endif
6930
6931         exit( status );
6932
6933 }
6934
6935 EOF
6936 if { (eval echo configure:6937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6937 then
6938   ol_cv_pthread_pthread=yes
6939 else
6940   echo "configure: failed program was:" >&5
6941   cat conftest.$ac_ext >&5
6942   rm -fr conftest*
6943   ol_cv_pthread_pthread=no
6944 fi
6945 rm -fr conftest*
6946 fi
6947
6948
6949                 # restore the LIBS
6950                 LIBS="$ol_LIBS"
6951         
6952 fi
6953
6954 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6955
6956         if test $ol_cv_pthread_pthread = yes ; then
6957                 ol_link_pthreads="-pthread"
6958                 ol_link_threads=posix
6959         fi
6960 fi
6961
6962                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6963 if test "$ol_link_threads" = no ; then
6964         # try -pthreads
6965         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6966 echo "configure:6967: checking for pthread link with -pthreads" >&5
6967 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6968   echo $ac_n "(cached) $ac_c" 1>&6
6969 else
6970   
6971                 # save the flags
6972                 ol_LIBS="$LIBS"
6973                 LIBS="-pthreads $LIBS"
6974
6975                 if test "$cross_compiling" = yes; then
6976   cat > conftest.$ac_ext <<EOF
6977 #line 6978 "configure"
6978 #include "confdefs.h"
6979 /* pthread test headers */
6980 #include <pthread.h>
6981 #ifndef NULL
6982 #define NULL (void*)0
6983 #endif
6984
6985 static void *task(p)
6986         void *p;
6987 {
6988         return (void *) (p == NULL);
6989 }
6990
6991 int main() {
6992
6993         /* pthread test function */
6994         pthread_t t;
6995         int status;
6996
6997         /* make sure pthread_create() isn't just a stub */
6998 #if HAVE_PTHREADS_D4
6999         status = pthread_create(&t, pthread_attr_default, task, NULL);
7000 #else
7001         status = pthread_create(&t, NULL, task, NULL);
7002 #endif
7003
7004         if( status ) exit( status );
7005
7006         /* make sure pthread_detach() isn't just a stub */
7007 #if HAVE_PTHREADS_D4
7008         status = pthread_detach( &t );
7009 #else
7010         status = pthread_detach( t );
7011 #endif
7012
7013 #ifdef HAVE_LINUX_THREADS
7014         pthread_kill_other_threads_np();
7015 #endif
7016
7017         exit( status );
7018
7019 ; return 0; }
7020 EOF
7021 if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7022   rm -rf conftest*
7023   ol_cv_pthread_pthreads=yes
7024 else
7025   echo "configure: failed program was:" >&5
7026   cat conftest.$ac_ext >&5
7027   rm -rf conftest*
7028   ol_cv_pthread_pthreads=no
7029 fi
7030 rm -f conftest*
7031 else
7032   cat > conftest.$ac_ext <<EOF
7033 #line 7034 "configure"
7034 #include "confdefs.h"
7035 /* pthread test headers */
7036 #include <pthread.h>
7037 #ifndef NULL
7038 #define NULL (void*)0
7039 #endif
7040
7041 static void *task(p)
7042         void *p;
7043 {
7044         return (void *) (p == NULL);
7045 }
7046
7047
7048 int main(argc, argv)
7049         int argc;
7050         char **argv;
7051 {
7052
7053         /* pthread test function */
7054         pthread_t t;
7055         int status;
7056
7057         /* make sure pthread_create() isn't just a stub */
7058 #if HAVE_PTHREADS_D4
7059         status = pthread_create(&t, pthread_attr_default, task, NULL);
7060 #else
7061         status = pthread_create(&t, NULL, task, NULL);
7062 #endif
7063
7064         if( status ) exit( status );
7065
7066         /* make sure pthread_detach() isn't just a stub */
7067 #if HAVE_PTHREADS_D4
7068         status = pthread_detach( &t );
7069 #else
7070         status = pthread_detach( t );
7071 #endif
7072
7073 #ifdef HAVE_LINUX_THREADS
7074         pthread_kill_other_threads_np();
7075 #endif
7076
7077         exit( status );
7078
7079 }
7080
7081 EOF
7082 if { (eval echo configure:7083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7083 then
7084   ol_cv_pthread_pthreads=yes
7085 else
7086   echo "configure: failed program was:" >&5
7087   cat conftest.$ac_ext >&5
7088   rm -fr conftest*
7089   ol_cv_pthread_pthreads=no
7090 fi
7091 rm -fr conftest*
7092 fi
7093
7094
7095                 # restore the LIBS
7096                 LIBS="$ol_LIBS"
7097         
7098 fi
7099
7100 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7101
7102         if test $ol_cv_pthread_pthreads = yes ; then
7103                 ol_link_pthreads="-pthreads"
7104                 ol_link_threads=posix
7105         fi
7106 fi
7107
7108                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7109 if test "$ol_link_threads" = no ; then
7110         # try -mthreads
7111         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7112 echo "configure:7113: checking for pthread link with -mthreads" >&5
7113 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7114   echo $ac_n "(cached) $ac_c" 1>&6
7115 else
7116   
7117                 # save the flags
7118                 ol_LIBS="$LIBS"
7119                 LIBS="-mthreads $LIBS"
7120
7121                 if test "$cross_compiling" = yes; then
7122   cat > conftest.$ac_ext <<EOF
7123 #line 7124 "configure"
7124 #include "confdefs.h"
7125 /* pthread test headers */
7126 #include <pthread.h>
7127 #ifndef NULL
7128 #define NULL (void*)0
7129 #endif
7130
7131 static void *task(p)
7132         void *p;
7133 {
7134         return (void *) (p == NULL);
7135 }
7136
7137 int main() {
7138
7139         /* pthread test function */
7140         pthread_t t;
7141         int status;
7142
7143         /* make sure pthread_create() isn't just a stub */
7144 #if HAVE_PTHREADS_D4
7145         status = pthread_create(&t, pthread_attr_default, task, NULL);
7146 #else
7147         status = pthread_create(&t, NULL, task, NULL);
7148 #endif
7149
7150         if( status ) exit( status );
7151
7152         /* make sure pthread_detach() isn't just a stub */
7153 #if HAVE_PTHREADS_D4
7154         status = pthread_detach( &t );
7155 #else
7156         status = pthread_detach( t );
7157 #endif
7158
7159 #ifdef HAVE_LINUX_THREADS
7160         pthread_kill_other_threads_np();
7161 #endif
7162
7163         exit( status );
7164
7165 ; return 0; }
7166 EOF
7167 if { (eval echo configure:7168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7168   rm -rf conftest*
7169   ol_cv_pthread_mthreads=yes
7170 else
7171   echo "configure: failed program was:" >&5
7172   cat conftest.$ac_ext >&5
7173   rm -rf conftest*
7174   ol_cv_pthread_mthreads=no
7175 fi
7176 rm -f conftest*
7177 else
7178   cat > conftest.$ac_ext <<EOF
7179 #line 7180 "configure"
7180 #include "confdefs.h"
7181 /* pthread test headers */
7182 #include <pthread.h>
7183 #ifndef NULL
7184 #define NULL (void*)0
7185 #endif
7186
7187 static void *task(p)
7188         void *p;
7189 {
7190         return (void *) (p == NULL);
7191 }
7192
7193
7194 int main(argc, argv)
7195         int argc;
7196         char **argv;
7197 {
7198
7199         /* pthread test function */
7200         pthread_t t;
7201         int status;
7202
7203         /* make sure pthread_create() isn't just a stub */
7204 #if HAVE_PTHREADS_D4
7205         status = pthread_create(&t, pthread_attr_default, task, NULL);
7206 #else
7207         status = pthread_create(&t, NULL, task, NULL);
7208 #endif
7209
7210         if( status ) exit( status );
7211
7212         /* make sure pthread_detach() isn't just a stub */
7213 #if HAVE_PTHREADS_D4
7214         status = pthread_detach( &t );
7215 #else
7216         status = pthread_detach( t );
7217 #endif
7218
7219 #ifdef HAVE_LINUX_THREADS
7220         pthread_kill_other_threads_np();
7221 #endif
7222
7223         exit( status );
7224
7225 }
7226
7227 EOF
7228 if { (eval echo configure:7229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7229 then
7230   ol_cv_pthread_mthreads=yes
7231 else
7232   echo "configure: failed program was:" >&5
7233   cat conftest.$ac_ext >&5
7234   rm -fr conftest*
7235   ol_cv_pthread_mthreads=no
7236 fi
7237 rm -fr conftest*
7238 fi
7239
7240
7241                 # restore the LIBS
7242                 LIBS="$ol_LIBS"
7243         
7244 fi
7245
7246 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7247
7248         if test $ol_cv_pthread_mthreads = yes ; then
7249                 ol_link_pthreads="-mthreads"
7250                 ol_link_threads=posix
7251         fi
7252 fi
7253
7254                 # Pthread try link: -thread (ol_cv_pthread_thread)
7255 if test "$ol_link_threads" = no ; then
7256         # try -thread
7257         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7258 echo "configure:7259: checking for pthread link with -thread" >&5
7259 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7260   echo $ac_n "(cached) $ac_c" 1>&6
7261 else
7262   
7263                 # save the flags
7264                 ol_LIBS="$LIBS"
7265                 LIBS="-thread $LIBS"
7266
7267                 if test "$cross_compiling" = yes; then
7268   cat > conftest.$ac_ext <<EOF
7269 #line 7270 "configure"
7270 #include "confdefs.h"
7271 /* pthread test headers */
7272 #include <pthread.h>
7273 #ifndef NULL
7274 #define NULL (void*)0
7275 #endif
7276
7277 static void *task(p)
7278         void *p;
7279 {
7280         return (void *) (p == NULL);
7281 }
7282
7283 int main() {
7284
7285         /* pthread test function */
7286         pthread_t t;
7287         int status;
7288
7289         /* make sure pthread_create() isn't just a stub */
7290 #if HAVE_PTHREADS_D4
7291         status = pthread_create(&t, pthread_attr_default, task, NULL);
7292 #else
7293         status = pthread_create(&t, NULL, task, NULL);
7294 #endif
7295
7296         if( status ) exit( status );
7297
7298         /* make sure pthread_detach() isn't just a stub */
7299 #if HAVE_PTHREADS_D4
7300         status = pthread_detach( &t );
7301 #else
7302         status = pthread_detach( t );
7303 #endif
7304
7305 #ifdef HAVE_LINUX_THREADS
7306         pthread_kill_other_threads_np();
7307 #endif
7308
7309         exit( status );
7310
7311 ; return 0; }
7312 EOF
7313 if { (eval echo configure:7314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7314   rm -rf conftest*
7315   ol_cv_pthread_thread=yes
7316 else
7317   echo "configure: failed program was:" >&5
7318   cat conftest.$ac_ext >&5
7319   rm -rf conftest*
7320   ol_cv_pthread_thread=no
7321 fi
7322 rm -f conftest*
7323 else
7324   cat > conftest.$ac_ext <<EOF
7325 #line 7326 "configure"
7326 #include "confdefs.h"
7327 /* pthread test headers */
7328 #include <pthread.h>
7329 #ifndef NULL
7330 #define NULL (void*)0
7331 #endif
7332
7333 static void *task(p)
7334         void *p;
7335 {
7336         return (void *) (p == NULL);
7337 }
7338
7339
7340 int main(argc, argv)
7341         int argc;
7342         char **argv;
7343 {
7344
7345         /* pthread test function */
7346         pthread_t t;
7347         int status;
7348
7349         /* make sure pthread_create() isn't just a stub */
7350 #if HAVE_PTHREADS_D4
7351         status = pthread_create(&t, pthread_attr_default, task, NULL);
7352 #else
7353         status = pthread_create(&t, NULL, task, NULL);
7354 #endif
7355
7356         if( status ) exit( status );
7357
7358         /* make sure pthread_detach() isn't just a stub */
7359 #if HAVE_PTHREADS_D4
7360         status = pthread_detach( &t );
7361 #else
7362         status = pthread_detach( t );
7363 #endif
7364
7365 #ifdef HAVE_LINUX_THREADS
7366         pthread_kill_other_threads_np();
7367 #endif
7368
7369         exit( status );
7370
7371 }
7372
7373 EOF
7374 if { (eval echo configure:7375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7375 then
7376   ol_cv_pthread_thread=yes
7377 else
7378   echo "configure: failed program was:" >&5
7379   cat conftest.$ac_ext >&5
7380   rm -fr conftest*
7381   ol_cv_pthread_thread=no
7382 fi
7383 rm -fr conftest*
7384 fi
7385
7386
7387                 # restore the LIBS
7388                 LIBS="$ol_LIBS"
7389         
7390 fi
7391
7392 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7393
7394         if test $ol_cv_pthread_thread = yes ; then
7395                 ol_link_pthreads="-thread"
7396                 ol_link_threads=posix
7397         fi
7398 fi
7399
7400
7401                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7402 if test "$ol_link_threads" = no ; then
7403         # try -lpthread -lmach -lexc -lc_r
7404         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7405 echo "configure:7406: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7406 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7407   echo $ac_n "(cached) $ac_c" 1>&6
7408 else
7409   
7410                 # save the flags
7411                 ol_LIBS="$LIBS"
7412                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7413
7414                 if test "$cross_compiling" = yes; then
7415   cat > conftest.$ac_ext <<EOF
7416 #line 7417 "configure"
7417 #include "confdefs.h"
7418 /* pthread test headers */
7419 #include <pthread.h>
7420 #ifndef NULL
7421 #define NULL (void*)0
7422 #endif
7423
7424 static void *task(p)
7425         void *p;
7426 {
7427         return (void *) (p == NULL);
7428 }
7429
7430 int main() {
7431
7432         /* pthread test function */
7433         pthread_t t;
7434         int status;
7435
7436         /* make sure pthread_create() isn't just a stub */
7437 #if HAVE_PTHREADS_D4
7438         status = pthread_create(&t, pthread_attr_default, task, NULL);
7439 #else
7440         status = pthread_create(&t, NULL, task, NULL);
7441 #endif
7442
7443         if( status ) exit( status );
7444
7445         /* make sure pthread_detach() isn't just a stub */
7446 #if HAVE_PTHREADS_D4
7447         status = pthread_detach( &t );
7448 #else
7449         status = pthread_detach( t );
7450 #endif
7451
7452 #ifdef HAVE_LINUX_THREADS
7453         pthread_kill_other_threads_np();
7454 #endif
7455
7456         exit( status );
7457
7458 ; return 0; }
7459 EOF
7460 if { (eval echo configure:7461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7461   rm -rf conftest*
7462   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7463 else
7464   echo "configure: failed program was:" >&5
7465   cat conftest.$ac_ext >&5
7466   rm -rf conftest*
7467   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7468 fi
7469 rm -f conftest*
7470 else
7471   cat > conftest.$ac_ext <<EOF
7472 #line 7473 "configure"
7473 #include "confdefs.h"
7474 /* pthread test headers */
7475 #include <pthread.h>
7476 #ifndef NULL
7477 #define NULL (void*)0
7478 #endif
7479
7480 static void *task(p)
7481         void *p;
7482 {
7483         return (void *) (p == NULL);
7484 }
7485
7486
7487 int main(argc, argv)
7488         int argc;
7489         char **argv;
7490 {
7491
7492         /* pthread test function */
7493         pthread_t t;
7494         int status;
7495
7496         /* make sure pthread_create() isn't just a stub */
7497 #if HAVE_PTHREADS_D4
7498         status = pthread_create(&t, pthread_attr_default, task, NULL);
7499 #else
7500         status = pthread_create(&t, NULL, task, NULL);
7501 #endif
7502
7503         if( status ) exit( status );
7504
7505         /* make sure pthread_detach() isn't just a stub */
7506 #if HAVE_PTHREADS_D4
7507         status = pthread_detach( &t );
7508 #else
7509         status = pthread_detach( t );
7510 #endif
7511
7512 #ifdef HAVE_LINUX_THREADS
7513         pthread_kill_other_threads_np();
7514 #endif
7515
7516         exit( status );
7517
7518 }
7519
7520 EOF
7521 if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7522 then
7523   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -fr conftest*
7528   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7529 fi
7530 rm -fr conftest*
7531 fi
7532
7533
7534                 # restore the LIBS
7535                 LIBS="$ol_LIBS"
7536         
7537 fi
7538
7539 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7540
7541         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7542                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7543                 ol_link_threads=posix
7544         fi
7545 fi
7546
7547                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7548 if test "$ol_link_threads" = no ; then
7549         # try -lpthread -lmach -lexc
7550         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7551 echo "configure:7552: checking for pthread link with -lpthread -lmach -lexc" >&5
7552 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7553   echo $ac_n "(cached) $ac_c" 1>&6
7554 else
7555   
7556                 # save the flags
7557                 ol_LIBS="$LIBS"
7558                 LIBS="-lpthread -lmach -lexc $LIBS"
7559
7560                 if test "$cross_compiling" = yes; then
7561   cat > conftest.$ac_ext <<EOF
7562 #line 7563 "configure"
7563 #include "confdefs.h"
7564 /* pthread test headers */
7565 #include <pthread.h>
7566 #ifndef NULL
7567 #define NULL (void*)0
7568 #endif
7569
7570 static void *task(p)
7571         void *p;
7572 {
7573         return (void *) (p == NULL);
7574 }
7575
7576 int main() {
7577
7578         /* pthread test function */
7579         pthread_t t;
7580         int status;
7581
7582         /* make sure pthread_create() isn't just a stub */
7583 #if HAVE_PTHREADS_D4
7584         status = pthread_create(&t, pthread_attr_default, task, NULL);
7585 #else
7586         status = pthread_create(&t, NULL, task, NULL);
7587 #endif
7588
7589         if( status ) exit( status );
7590
7591         /* make sure pthread_detach() isn't just a stub */
7592 #if HAVE_PTHREADS_D4
7593         status = pthread_detach( &t );
7594 #else
7595         status = pthread_detach( t );
7596 #endif
7597
7598 #ifdef HAVE_LINUX_THREADS
7599         pthread_kill_other_threads_np();
7600 #endif
7601
7602         exit( status );
7603
7604 ; return 0; }
7605 EOF
7606 if { (eval echo configure:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7607   rm -rf conftest*
7608   ol_cv_pthread_lpthread_lmach_lexc=yes
7609 else
7610   echo "configure: failed program was:" >&5
7611   cat conftest.$ac_ext >&5
7612   rm -rf conftest*
7613   ol_cv_pthread_lpthread_lmach_lexc=no
7614 fi
7615 rm -f conftest*
7616 else
7617   cat > conftest.$ac_ext <<EOF
7618 #line 7619 "configure"
7619 #include "confdefs.h"
7620 /* pthread test headers */
7621 #include <pthread.h>
7622 #ifndef NULL
7623 #define NULL (void*)0
7624 #endif
7625
7626 static void *task(p)
7627         void *p;
7628 {
7629         return (void *) (p == NULL);
7630 }
7631
7632
7633 int main(argc, argv)
7634         int argc;
7635         char **argv;
7636 {
7637
7638         /* pthread test function */
7639         pthread_t t;
7640         int status;
7641
7642         /* make sure pthread_create() isn't just a stub */
7643 #if HAVE_PTHREADS_D4
7644         status = pthread_create(&t, pthread_attr_default, task, NULL);
7645 #else
7646         status = pthread_create(&t, NULL, task, NULL);
7647 #endif
7648
7649         if( status ) exit( status );
7650
7651         /* make sure pthread_detach() isn't just a stub */
7652 #if HAVE_PTHREADS_D4
7653         status = pthread_detach( &t );
7654 #else
7655         status = pthread_detach( t );
7656 #endif
7657
7658 #ifdef HAVE_LINUX_THREADS
7659         pthread_kill_other_threads_np();
7660 #endif
7661
7662         exit( status );
7663
7664 }
7665
7666 EOF
7667 if { (eval echo configure:7668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7668 then
7669   ol_cv_pthread_lpthread_lmach_lexc=yes
7670 else
7671   echo "configure: failed program was:" >&5
7672   cat conftest.$ac_ext >&5
7673   rm -fr conftest*
7674   ol_cv_pthread_lpthread_lmach_lexc=no
7675 fi
7676 rm -fr conftest*
7677 fi
7678
7679
7680                 # restore the LIBS
7681                 LIBS="$ol_LIBS"
7682         
7683 fi
7684
7685 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7686
7687         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7688                 ol_link_pthreads="-lpthread -lmach -lexc"
7689                 ol_link_threads=posix
7690         fi
7691 fi
7692
7693
7694                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7695 if test "$ol_link_threads" = no ; then
7696         # try -lpthread -Wl,-woff,85
7697         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7698 echo "configure:7699: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7699 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7700   echo $ac_n "(cached) $ac_c" 1>&6
7701 else
7702   
7703                 # save the flags
7704                 ol_LIBS="$LIBS"
7705                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7706
7707                 if test "$cross_compiling" = yes; then
7708   cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711 /* pthread test headers */
7712 #include <pthread.h>
7713 #ifndef NULL
7714 #define NULL (void*)0
7715 #endif
7716
7717 static void *task(p)
7718         void *p;
7719 {
7720         return (void *) (p == NULL);
7721 }
7722
7723 int main() {
7724
7725         /* pthread test function */
7726         pthread_t t;
7727         int status;
7728
7729         /* make sure pthread_create() isn't just a stub */
7730 #if HAVE_PTHREADS_D4
7731         status = pthread_create(&t, pthread_attr_default, task, NULL);
7732 #else
7733         status = pthread_create(&t, NULL, task, NULL);
7734 #endif
7735
7736         if( status ) exit( status );
7737
7738         /* make sure pthread_detach() isn't just a stub */
7739 #if HAVE_PTHREADS_D4
7740         status = pthread_detach( &t );
7741 #else
7742         status = pthread_detach( t );
7743 #endif
7744
7745 #ifdef HAVE_LINUX_THREADS
7746         pthread_kill_other_threads_np();
7747 #endif
7748
7749         exit( status );
7750
7751 ; return 0; }
7752 EOF
7753 if { (eval echo configure:7754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7754   rm -rf conftest*
7755   ol_cv_pthread_lib_lpthread_woff=yes
7756 else
7757   echo "configure: failed program was:" >&5
7758   cat conftest.$ac_ext >&5
7759   rm -rf conftest*
7760   ol_cv_pthread_lib_lpthread_woff=no
7761 fi
7762 rm -f conftest*
7763 else
7764   cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767 /* pthread test headers */
7768 #include <pthread.h>
7769 #ifndef NULL
7770 #define NULL (void*)0
7771 #endif
7772
7773 static void *task(p)
7774         void *p;
7775 {
7776         return (void *) (p == NULL);
7777 }
7778
7779
7780 int main(argc, argv)
7781         int argc;
7782         char **argv;
7783 {
7784
7785         /* pthread test function */
7786         pthread_t t;
7787         int status;
7788
7789         /* make sure pthread_create() isn't just a stub */
7790 #if HAVE_PTHREADS_D4
7791         status = pthread_create(&t, pthread_attr_default, task, NULL);
7792 #else
7793         status = pthread_create(&t, NULL, task, NULL);
7794 #endif
7795
7796         if( status ) exit( status );
7797
7798         /* make sure pthread_detach() isn't just a stub */
7799 #if HAVE_PTHREADS_D4
7800         status = pthread_detach( &t );
7801 #else
7802         status = pthread_detach( t );
7803 #endif
7804
7805 #ifdef HAVE_LINUX_THREADS
7806         pthread_kill_other_threads_np();
7807 #endif
7808
7809         exit( status );
7810
7811 }
7812
7813 EOF
7814 if { (eval echo configure:7815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7815 then
7816   ol_cv_pthread_lib_lpthread_woff=yes
7817 else
7818   echo "configure: failed program was:" >&5
7819   cat conftest.$ac_ext >&5
7820   rm -fr conftest*
7821   ol_cv_pthread_lib_lpthread_woff=no
7822 fi
7823 rm -fr conftest*
7824 fi
7825
7826
7827                 # restore the LIBS
7828                 LIBS="$ol_LIBS"
7829         
7830 fi
7831
7832 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7833
7834         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7835                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7836                 ol_link_threads=posix
7837         fi
7838 fi
7839
7840
7841                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7842 if test "$ol_link_threads" = no ; then
7843         # try -lpthread
7844         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7845 echo "configure:7846: checking for pthread link with -lpthread" >&5
7846 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7847   echo $ac_n "(cached) $ac_c" 1>&6
7848 else
7849   
7850                 # save the flags
7851                 ol_LIBS="$LIBS"
7852                 LIBS="-lpthread $LIBS"
7853
7854                 if test "$cross_compiling" = yes; then
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 /* pthread test headers */
7859 #include <pthread.h>
7860 #ifndef NULL
7861 #define NULL (void*)0
7862 #endif
7863
7864 static void *task(p)
7865         void *p;
7866 {
7867         return (void *) (p == NULL);
7868 }
7869
7870 int main() {
7871
7872         /* pthread test function */
7873         pthread_t t;
7874         int status;
7875
7876         /* make sure pthread_create() isn't just a stub */
7877 #if HAVE_PTHREADS_D4
7878         status = pthread_create(&t, pthread_attr_default, task, NULL);
7879 #else
7880         status = pthread_create(&t, NULL, task, NULL);
7881 #endif
7882
7883         if( status ) exit( status );
7884
7885         /* make sure pthread_detach() isn't just a stub */
7886 #if HAVE_PTHREADS_D4
7887         status = pthread_detach( &t );
7888 #else
7889         status = pthread_detach( t );
7890 #endif
7891
7892 #ifdef HAVE_LINUX_THREADS
7893         pthread_kill_other_threads_np();
7894 #endif
7895
7896         exit( status );
7897
7898 ; return 0; }
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7901   rm -rf conftest*
7902   ol_cv_pthread_lpthread=yes
7903 else
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   ol_cv_pthread_lpthread=no
7908 fi
7909 rm -f conftest*
7910 else
7911   cat > conftest.$ac_ext <<EOF
7912 #line 7913 "configure"
7913 #include "confdefs.h"
7914 /* pthread test headers */
7915 #include <pthread.h>
7916 #ifndef NULL
7917 #define NULL (void*)0
7918 #endif
7919
7920 static void *task(p)
7921         void *p;
7922 {
7923         return (void *) (p == NULL);
7924 }
7925
7926
7927 int main(argc, argv)
7928         int argc;
7929         char **argv;
7930 {
7931
7932         /* pthread test function */
7933         pthread_t t;
7934         int status;
7935
7936         /* make sure pthread_create() isn't just a stub */
7937 #if HAVE_PTHREADS_D4
7938         status = pthread_create(&t, pthread_attr_default, task, NULL);
7939 #else
7940         status = pthread_create(&t, NULL, task, NULL);
7941 #endif
7942
7943         if( status ) exit( status );
7944
7945         /* make sure pthread_detach() isn't just a stub */
7946 #if HAVE_PTHREADS_D4
7947         status = pthread_detach( &t );
7948 #else
7949         status = pthread_detach( t );
7950 #endif
7951
7952 #ifdef HAVE_LINUX_THREADS
7953         pthread_kill_other_threads_np();
7954 #endif
7955
7956         exit( status );
7957
7958 }
7959
7960 EOF
7961 if { (eval echo configure:7962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7962 then
7963   ol_cv_pthread_lpthread=yes
7964 else
7965   echo "configure: failed program was:" >&5
7966   cat conftest.$ac_ext >&5
7967   rm -fr conftest*
7968   ol_cv_pthread_lpthread=no
7969 fi
7970 rm -fr conftest*
7971 fi
7972
7973
7974                 # restore the LIBS
7975                 LIBS="$ol_LIBS"
7976         
7977 fi
7978
7979 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7980
7981         if test $ol_cv_pthread_lpthread = yes ; then
7982                 ol_link_pthreads="-lpthread"
7983                 ol_link_threads=posix
7984         fi
7985 fi
7986
7987                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7988 if test "$ol_link_threads" = no ; then
7989         # try -lc_r
7990         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7991 echo "configure:7992: checking for pthread link with -lc_r" >&5
7992 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7993   echo $ac_n "(cached) $ac_c" 1>&6
7994 else
7995   
7996                 # save the flags
7997                 ol_LIBS="$LIBS"
7998                 LIBS="-lc_r $LIBS"
7999
8000                 if test "$cross_compiling" = yes; then
8001   cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 /* pthread test headers */
8005 #include <pthread.h>
8006 #ifndef NULL
8007 #define NULL (void*)0
8008 #endif
8009
8010 static void *task(p)
8011         void *p;
8012 {
8013         return (void *) (p == NULL);
8014 }
8015
8016 int main() {
8017
8018         /* pthread test function */
8019         pthread_t t;
8020         int status;
8021
8022         /* make sure pthread_create() isn't just a stub */
8023 #if HAVE_PTHREADS_D4
8024         status = pthread_create(&t, pthread_attr_default, task, NULL);
8025 #else
8026         status = pthread_create(&t, NULL, task, NULL);
8027 #endif
8028
8029         if( status ) exit( status );
8030
8031         /* make sure pthread_detach() isn't just a stub */
8032 #if HAVE_PTHREADS_D4
8033         status = pthread_detach( &t );
8034 #else
8035         status = pthread_detach( t );
8036 #endif
8037
8038 #ifdef HAVE_LINUX_THREADS
8039         pthread_kill_other_threads_np();
8040 #endif
8041
8042         exit( status );
8043
8044 ; return 0; }
8045 EOF
8046 if { (eval echo configure:8047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8047   rm -rf conftest*
8048   ol_cv_pthread_lc_r=yes
8049 else
8050   echo "configure: failed program was:" >&5
8051   cat conftest.$ac_ext >&5
8052   rm -rf conftest*
8053   ol_cv_pthread_lc_r=no
8054 fi
8055 rm -f conftest*
8056 else
8057   cat > conftest.$ac_ext <<EOF
8058 #line 8059 "configure"
8059 #include "confdefs.h"
8060 /* pthread test headers */
8061 #include <pthread.h>
8062 #ifndef NULL
8063 #define NULL (void*)0
8064 #endif
8065
8066 static void *task(p)
8067         void *p;
8068 {
8069         return (void *) (p == NULL);
8070 }
8071
8072
8073 int main(argc, argv)
8074         int argc;
8075         char **argv;
8076 {
8077
8078         /* pthread test function */
8079         pthread_t t;
8080         int status;
8081
8082         /* make sure pthread_create() isn't just a stub */
8083 #if HAVE_PTHREADS_D4
8084         status = pthread_create(&t, pthread_attr_default, task, NULL);
8085 #else
8086         status = pthread_create(&t, NULL, task, NULL);
8087 #endif
8088
8089         if( status ) exit( status );
8090
8091         /* make sure pthread_detach() isn't just a stub */
8092 #if HAVE_PTHREADS_D4
8093         status = pthread_detach( &t );
8094 #else
8095         status = pthread_detach( t );
8096 #endif
8097
8098 #ifdef HAVE_LINUX_THREADS
8099         pthread_kill_other_threads_np();
8100 #endif
8101
8102         exit( status );
8103
8104 }
8105
8106 EOF
8107 if { (eval echo configure:8108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8108 then
8109   ol_cv_pthread_lc_r=yes
8110 else
8111   echo "configure: failed program was:" >&5
8112   cat conftest.$ac_ext >&5
8113   rm -fr conftest*
8114   ol_cv_pthread_lc_r=no
8115 fi
8116 rm -fr conftest*
8117 fi
8118
8119
8120                 # restore the LIBS
8121                 LIBS="$ol_LIBS"
8122         
8123 fi
8124
8125 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8126
8127         if test $ol_cv_pthread_lc_r = yes ; then
8128                 ol_link_pthreads="-lc_r"
8129                 ol_link_threads=posix
8130         fi
8131 fi
8132
8133
8134                 # Pthread try link: -threads (ol_cv_pthread_threads)
8135 if test "$ol_link_threads" = no ; then
8136         # try -threads
8137         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8138 echo "configure:8139: checking for pthread link with -threads" >&5
8139 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8140   echo $ac_n "(cached) $ac_c" 1>&6
8141 else
8142   
8143                 # save the flags
8144                 ol_LIBS="$LIBS"
8145                 LIBS="-threads $LIBS"
8146
8147                 if test "$cross_compiling" = yes; then
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 /* pthread test headers */
8152 #include <pthread.h>
8153 #ifndef NULL
8154 #define NULL (void*)0
8155 #endif
8156
8157 static void *task(p)
8158         void *p;
8159 {
8160         return (void *) (p == NULL);
8161 }
8162
8163 int main() {
8164
8165         /* pthread test function */
8166         pthread_t t;
8167         int status;
8168
8169         /* make sure pthread_create() isn't just a stub */
8170 #if HAVE_PTHREADS_D4
8171         status = pthread_create(&t, pthread_attr_default, task, NULL);
8172 #else
8173         status = pthread_create(&t, NULL, task, NULL);
8174 #endif
8175
8176         if( status ) exit( status );
8177
8178         /* make sure pthread_detach() isn't just a stub */
8179 #if HAVE_PTHREADS_D4
8180         status = pthread_detach( &t );
8181 #else
8182         status = pthread_detach( t );
8183 #endif
8184
8185 #ifdef HAVE_LINUX_THREADS
8186         pthread_kill_other_threads_np();
8187 #endif
8188
8189         exit( status );
8190
8191 ; return 0; }
8192 EOF
8193 if { (eval echo configure:8194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8194   rm -rf conftest*
8195   ol_cv_pthread_threads=yes
8196 else
8197   echo "configure: failed program was:" >&5
8198   cat conftest.$ac_ext >&5
8199   rm -rf conftest*
8200   ol_cv_pthread_threads=no
8201 fi
8202 rm -f conftest*
8203 else
8204   cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 /* pthread test headers */
8208 #include <pthread.h>
8209 #ifndef NULL
8210 #define NULL (void*)0
8211 #endif
8212
8213 static void *task(p)
8214         void *p;
8215 {
8216         return (void *) (p == NULL);
8217 }
8218
8219
8220 int main(argc, argv)
8221         int argc;
8222         char **argv;
8223 {
8224
8225         /* pthread test function */
8226         pthread_t t;
8227         int status;
8228
8229         /* make sure pthread_create() isn't just a stub */
8230 #if HAVE_PTHREADS_D4
8231         status = pthread_create(&t, pthread_attr_default, task, NULL);
8232 #else
8233         status = pthread_create(&t, NULL, task, NULL);
8234 #endif
8235
8236         if( status ) exit( status );
8237
8238         /* make sure pthread_detach() isn't just a stub */
8239 #if HAVE_PTHREADS_D4
8240         status = pthread_detach( &t );
8241 #else
8242         status = pthread_detach( t );
8243 #endif
8244
8245 #ifdef HAVE_LINUX_THREADS
8246         pthread_kill_other_threads_np();
8247 #endif
8248
8249         exit( status );
8250
8251 }
8252
8253 EOF
8254 if { (eval echo configure:8255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8255 then
8256   ol_cv_pthread_threads=yes
8257 else
8258   echo "configure: failed program was:" >&5
8259   cat conftest.$ac_ext >&5
8260   rm -fr conftest*
8261   ol_cv_pthread_threads=no
8262 fi
8263 rm -fr conftest*
8264 fi
8265
8266
8267                 # restore the LIBS
8268                 LIBS="$ol_LIBS"
8269         
8270 fi
8271
8272 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8273
8274         if test $ol_cv_pthread_threads = yes ; then
8275                 ol_link_pthreads="-threads"
8276                 ol_link_threads=posix
8277         fi
8278 fi
8279
8280
8281                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8282 if test "$ol_link_threads" = no ; then
8283         # try -lpthreads -lmach -lexc -lc_r
8284         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8285 echo "configure:8286: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8286 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8287   echo $ac_n "(cached) $ac_c" 1>&6
8288 else
8289   
8290                 # save the flags
8291                 ol_LIBS="$LIBS"
8292                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8293
8294                 if test "$cross_compiling" = yes; then
8295   cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 /* pthread test headers */
8299 #include <pthread.h>
8300 #ifndef NULL
8301 #define NULL (void*)0
8302 #endif
8303
8304 static void *task(p)
8305         void *p;
8306 {
8307         return (void *) (p == NULL);
8308 }
8309
8310 int main() {
8311
8312         /* pthread test function */
8313         pthread_t t;
8314         int status;
8315
8316         /* make sure pthread_create() isn't just a stub */
8317 #if HAVE_PTHREADS_D4
8318         status = pthread_create(&t, pthread_attr_default, task, NULL);
8319 #else
8320         status = pthread_create(&t, NULL, task, NULL);
8321 #endif
8322
8323         if( status ) exit( status );
8324
8325         /* make sure pthread_detach() isn't just a stub */
8326 #if HAVE_PTHREADS_D4
8327         status = pthread_detach( &t );
8328 #else
8329         status = pthread_detach( t );
8330 #endif
8331
8332 #ifdef HAVE_LINUX_THREADS
8333         pthread_kill_other_threads_np();
8334 #endif
8335
8336         exit( status );
8337
8338 ; return 0; }
8339 EOF
8340 if { (eval echo configure:8341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8341   rm -rf conftest*
8342   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8343 else
8344   echo "configure: failed program was:" >&5
8345   cat conftest.$ac_ext >&5
8346   rm -rf conftest*
8347   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8348 fi
8349 rm -f conftest*
8350 else
8351   cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 /* pthread test headers */
8355 #include <pthread.h>
8356 #ifndef NULL
8357 #define NULL (void*)0
8358 #endif
8359
8360 static void *task(p)
8361         void *p;
8362 {
8363         return (void *) (p == NULL);
8364 }
8365
8366
8367 int main(argc, argv)
8368         int argc;
8369         char **argv;
8370 {
8371
8372         /* pthread test function */
8373         pthread_t t;
8374         int status;
8375
8376         /* make sure pthread_create() isn't just a stub */
8377 #if HAVE_PTHREADS_D4
8378         status = pthread_create(&t, pthread_attr_default, task, NULL);
8379 #else
8380         status = pthread_create(&t, NULL, task, NULL);
8381 #endif
8382
8383         if( status ) exit( status );
8384
8385         /* make sure pthread_detach() isn't just a stub */
8386 #if HAVE_PTHREADS_D4
8387         status = pthread_detach( &t );
8388 #else
8389         status = pthread_detach( t );
8390 #endif
8391
8392 #ifdef HAVE_LINUX_THREADS
8393         pthread_kill_other_threads_np();
8394 #endif
8395
8396         exit( status );
8397
8398 }
8399
8400 EOF
8401 if { (eval echo configure:8402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8402 then
8403   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8404 else
8405   echo "configure: failed program was:" >&5
8406   cat conftest.$ac_ext >&5
8407   rm -fr conftest*
8408   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8409 fi
8410 rm -fr conftest*
8411 fi
8412
8413
8414                 # restore the LIBS
8415                 LIBS="$ol_LIBS"
8416         
8417 fi
8418
8419 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8420
8421         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8422                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8423                 ol_link_threads=posix
8424         fi
8425 fi
8426
8427                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8428 if test "$ol_link_threads" = no ; then
8429         # try -lpthreads -lmach -lexc
8430         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8431 echo "configure:8432: checking for pthread link with -lpthreads -lmach -lexc" >&5
8432 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8433   echo $ac_n "(cached) $ac_c" 1>&6
8434 else
8435   
8436                 # save the flags
8437                 ol_LIBS="$LIBS"
8438                 LIBS="-lpthreads -lmach -lexc $LIBS"
8439
8440                 if test "$cross_compiling" = yes; then
8441   cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 /* pthread test headers */
8445 #include <pthread.h>
8446 #ifndef NULL
8447 #define NULL (void*)0
8448 #endif
8449
8450 static void *task(p)
8451         void *p;
8452 {
8453         return (void *) (p == NULL);
8454 }
8455
8456 int main() {
8457
8458         /* pthread test function */
8459         pthread_t t;
8460         int status;
8461
8462         /* make sure pthread_create() isn't just a stub */
8463 #if HAVE_PTHREADS_D4
8464         status = pthread_create(&t, pthread_attr_default, task, NULL);
8465 #else
8466         status = pthread_create(&t, NULL, task, NULL);
8467 #endif
8468
8469         if( status ) exit( status );
8470
8471         /* make sure pthread_detach() isn't just a stub */
8472 #if HAVE_PTHREADS_D4
8473         status = pthread_detach( &t );
8474 #else
8475         status = pthread_detach( t );
8476 #endif
8477
8478 #ifdef HAVE_LINUX_THREADS
8479         pthread_kill_other_threads_np();
8480 #endif
8481
8482         exit( status );
8483
8484 ; return 0; }
8485 EOF
8486 if { (eval echo configure:8487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8487   rm -rf conftest*
8488   ol_cv_pthread_lpthreads_lmach_lexc=yes
8489 else
8490   echo "configure: failed program was:" >&5
8491   cat conftest.$ac_ext >&5
8492   rm -rf conftest*
8493   ol_cv_pthread_lpthreads_lmach_lexc=no
8494 fi
8495 rm -f conftest*
8496 else
8497   cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* pthread test headers */
8501 #include <pthread.h>
8502 #ifndef NULL
8503 #define NULL (void*)0
8504 #endif
8505
8506 static void *task(p)
8507         void *p;
8508 {
8509         return (void *) (p == NULL);
8510 }
8511
8512
8513 int main(argc, argv)
8514         int argc;
8515         char **argv;
8516 {
8517
8518         /* pthread test function */
8519         pthread_t t;
8520         int status;
8521
8522         /* make sure pthread_create() isn't just a stub */
8523 #if HAVE_PTHREADS_D4
8524         status = pthread_create(&t, pthread_attr_default, task, NULL);
8525 #else
8526         status = pthread_create(&t, NULL, task, NULL);
8527 #endif
8528
8529         if( status ) exit( status );
8530
8531         /* make sure pthread_detach() isn't just a stub */
8532 #if HAVE_PTHREADS_D4
8533         status = pthread_detach( &t );
8534 #else
8535         status = pthread_detach( t );
8536 #endif
8537
8538 #ifdef HAVE_LINUX_THREADS
8539         pthread_kill_other_threads_np();
8540 #endif
8541
8542         exit( status );
8543
8544 }
8545
8546 EOF
8547 if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8548 then
8549   ol_cv_pthread_lpthreads_lmach_lexc=yes
8550 else
8551   echo "configure: failed program was:" >&5
8552   cat conftest.$ac_ext >&5
8553   rm -fr conftest*
8554   ol_cv_pthread_lpthreads_lmach_lexc=no
8555 fi
8556 rm -fr conftest*
8557 fi
8558
8559
8560                 # restore the LIBS
8561                 LIBS="$ol_LIBS"
8562         
8563 fi
8564
8565 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8566
8567         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8568                 ol_link_pthreads="-lpthreads -lmach -lexc"
8569                 ol_link_threads=posix
8570         fi
8571 fi
8572
8573                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8574 if test "$ol_link_threads" = no ; then
8575         # try -lpthreads -lexc
8576         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8577 echo "configure:8578: checking for pthread link with -lpthreads -lexc" >&5
8578 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8579   echo $ac_n "(cached) $ac_c" 1>&6
8580 else
8581   
8582                 # save the flags
8583                 ol_LIBS="$LIBS"
8584                 LIBS="-lpthreads -lexc $LIBS"
8585
8586                 if test "$cross_compiling" = yes; then
8587   cat > conftest.$ac_ext <<EOF
8588 #line 8589 "configure"
8589 #include "confdefs.h"
8590 /* pthread test headers */
8591 #include <pthread.h>
8592 #ifndef NULL
8593 #define NULL (void*)0
8594 #endif
8595
8596 static void *task(p)
8597         void *p;
8598 {
8599         return (void *) (p == NULL);
8600 }
8601
8602 int main() {
8603
8604         /* pthread test function */
8605         pthread_t t;
8606         int status;
8607
8608         /* make sure pthread_create() isn't just a stub */
8609 #if HAVE_PTHREADS_D4
8610         status = pthread_create(&t, pthread_attr_default, task, NULL);
8611 #else
8612         status = pthread_create(&t, NULL, task, NULL);
8613 #endif
8614
8615         if( status ) exit( status );
8616
8617         /* make sure pthread_detach() isn't just a stub */
8618 #if HAVE_PTHREADS_D4
8619         status = pthread_detach( &t );
8620 #else
8621         status = pthread_detach( t );
8622 #endif
8623
8624 #ifdef HAVE_LINUX_THREADS
8625         pthread_kill_other_threads_np();
8626 #endif
8627
8628         exit( status );
8629
8630 ; return 0; }
8631 EOF
8632 if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8633   rm -rf conftest*
8634   ol_cv_pthread_lpthreads_lexc=yes
8635 else
8636   echo "configure: failed program was:" >&5
8637   cat conftest.$ac_ext >&5
8638   rm -rf conftest*
8639   ol_cv_pthread_lpthreads_lexc=no
8640 fi
8641 rm -f conftest*
8642 else
8643   cat > conftest.$ac_ext <<EOF
8644 #line 8645 "configure"
8645 #include "confdefs.h"
8646 /* pthread test headers */
8647 #include <pthread.h>
8648 #ifndef NULL
8649 #define NULL (void*)0
8650 #endif
8651
8652 static void *task(p)
8653         void *p;
8654 {
8655         return (void *) (p == NULL);
8656 }
8657
8658
8659 int main(argc, argv)
8660         int argc;
8661         char **argv;
8662 {
8663
8664         /* pthread test function */
8665         pthread_t t;
8666         int status;
8667
8668         /* make sure pthread_create() isn't just a stub */
8669 #if HAVE_PTHREADS_D4
8670         status = pthread_create(&t, pthread_attr_default, task, NULL);
8671 #else
8672         status = pthread_create(&t, NULL, task, NULL);
8673 #endif
8674
8675         if( status ) exit( status );
8676
8677         /* make sure pthread_detach() isn't just a stub */
8678 #if HAVE_PTHREADS_D4
8679         status = pthread_detach( &t );
8680 #else
8681         status = pthread_detach( t );
8682 #endif
8683
8684 #ifdef HAVE_LINUX_THREADS
8685         pthread_kill_other_threads_np();
8686 #endif
8687
8688         exit( status );
8689
8690 }
8691
8692 EOF
8693 if { (eval echo configure:8694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8694 then
8695   ol_cv_pthread_lpthreads_lexc=yes
8696 else
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -fr conftest*
8700   ol_cv_pthread_lpthreads_lexc=no
8701 fi
8702 rm -fr conftest*
8703 fi
8704
8705
8706                 # restore the LIBS
8707                 LIBS="$ol_LIBS"
8708         
8709 fi
8710
8711 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8712
8713         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8714                 ol_link_pthreads="-lpthreads -lexc"
8715                 ol_link_threads=posix
8716         fi
8717 fi
8718
8719
8720                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8721 if test "$ol_link_threads" = no ; then
8722         # try -lpthreads
8723         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8724 echo "configure:8725: checking for pthread link with -lpthreads" >&5
8725 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8726   echo $ac_n "(cached) $ac_c" 1>&6
8727 else
8728   
8729                 # save the flags
8730                 ol_LIBS="$LIBS"
8731                 LIBS="-lpthreads $LIBS"
8732
8733                 if test "$cross_compiling" = yes; then
8734   cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8737 /* pthread test headers */
8738 #include <pthread.h>
8739 #ifndef NULL
8740 #define NULL (void*)0
8741 #endif
8742
8743 static void *task(p)
8744         void *p;
8745 {
8746         return (void *) (p == NULL);
8747 }
8748
8749 int main() {
8750
8751         /* pthread test function */
8752         pthread_t t;
8753         int status;
8754
8755         /* make sure pthread_create() isn't just a stub */
8756 #if HAVE_PTHREADS_D4
8757         status = pthread_create(&t, pthread_attr_default, task, NULL);
8758 #else
8759         status = pthread_create(&t, NULL, task, NULL);
8760 #endif
8761
8762         if( status ) exit( status );
8763
8764         /* make sure pthread_detach() isn't just a stub */
8765 #if HAVE_PTHREADS_D4
8766         status = pthread_detach( &t );
8767 #else
8768         status = pthread_detach( t );
8769 #endif
8770
8771 #ifdef HAVE_LINUX_THREADS
8772         pthread_kill_other_threads_np();
8773 #endif
8774
8775         exit( status );
8776
8777 ; return 0; }
8778 EOF
8779 if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8780   rm -rf conftest*
8781   ol_cv_pthread_lib_lpthreads=yes
8782 else
8783   echo "configure: failed program was:" >&5
8784   cat conftest.$ac_ext >&5
8785   rm -rf conftest*
8786   ol_cv_pthread_lib_lpthreads=no
8787 fi
8788 rm -f conftest*
8789 else
8790   cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 /* pthread test headers */
8794 #include <pthread.h>
8795 #ifndef NULL
8796 #define NULL (void*)0
8797 #endif
8798
8799 static void *task(p)
8800         void *p;
8801 {
8802         return (void *) (p == NULL);
8803 }
8804
8805
8806 int main(argc, argv)
8807         int argc;
8808         char **argv;
8809 {
8810
8811         /* pthread test function */
8812         pthread_t t;
8813         int status;
8814
8815         /* make sure pthread_create() isn't just a stub */
8816 #if HAVE_PTHREADS_D4
8817         status = pthread_create(&t, pthread_attr_default, task, NULL);
8818 #else
8819         status = pthread_create(&t, NULL, task, NULL);
8820 #endif
8821
8822         if( status ) exit( status );
8823
8824         /* make sure pthread_detach() isn't just a stub */
8825 #if HAVE_PTHREADS_D4
8826         status = pthread_detach( &t );
8827 #else
8828         status = pthread_detach( t );
8829 #endif
8830
8831 #ifdef HAVE_LINUX_THREADS
8832         pthread_kill_other_threads_np();
8833 #endif
8834
8835         exit( status );
8836
8837 }
8838
8839 EOF
8840 if { (eval echo configure:8841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8841 then
8842   ol_cv_pthread_lib_lpthreads=yes
8843 else
8844   echo "configure: failed program was:" >&5
8845   cat conftest.$ac_ext >&5
8846   rm -fr conftest*
8847   ol_cv_pthread_lib_lpthreads=no
8848 fi
8849 rm -fr conftest*
8850 fi
8851
8852
8853                 # restore the LIBS
8854                 LIBS="$ol_LIBS"
8855         
8856 fi
8857
8858 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8859
8860         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8861                 ol_link_pthreads="-lpthreads"
8862                 ol_link_threads=posix
8863         fi
8864 fi
8865
8866
8867                 if test $ol_link_threads != no ; then
8868                         cat >> confdefs.h <<\EOF
8869 #define HAVE_PTHREADS 1
8870 EOF
8871
8872
8873                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8874
8875                                                 save_CPPFLAGS="$CPPFLAGS"
8876                         save_LIBS="$LIBS"
8877                         LIBS="$LTHREAD_LIBS $LIBS"
8878
8879                                                                                                 for ac_func in sched_yield pthread_yield
8880 do
8881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8882 echo "configure:8883: checking for $ac_func" >&5
8883 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8884   echo $ac_n "(cached) $ac_c" 1>&6
8885 else
8886   cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 /* System header to define __stub macros and hopefully few prototypes,
8890     which can conflict with char $ac_func(); below.  */
8891 #include <assert.h>
8892 /* Override any gcc2 internal prototype to avoid an error.  */
8893 /* We use char because int might match the return type of a gcc2
8894     builtin and then its argument prototype would still apply.  */
8895 char $ac_func();
8896 char (*f)();
8897
8898 int main() {
8899
8900 /* The GNU C library defines this for functions which it implements
8901     to always fail with ENOSYS.  Some functions are actually named
8902     something starting with __ and the normal name is an alias.  */
8903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8904 choke me
8905 #else
8906 f = $ac_func;
8907 #endif
8908
8909 ; return 0; }
8910 EOF
8911 if { (eval echo configure:8912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8912   rm -rf conftest*
8913   eval "ac_cv_func_$ac_func=yes"
8914 else
8915   echo "configure: failed program was:" >&5
8916   cat conftest.$ac_ext >&5
8917   rm -rf conftest*
8918   eval "ac_cv_func_$ac_func=no"
8919 fi
8920 rm -f conftest*
8921 fi
8922
8923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8924   echo "$ac_t""yes" 1>&6
8925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8926   cat >> confdefs.h <<EOF
8927 #define $ac_tr_func 1
8928 EOF
8929  
8930 else
8931   echo "$ac_t""no" 1>&6
8932 fi
8933 done
8934
8935
8936                         if test $ac_cv_func_sched_yield = no -a \
8937                                 $ac_cv_func_pthread_yield = no ; then
8938                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8939 echo "configure:8940: checking for sched_yield in -lrt" >&5
8940 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8941 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   ac_save_LIBS="$LIBS"
8945 LIBS="-lrt  $LIBS"
8946 cat > conftest.$ac_ext <<EOF
8947 #line 8948 "configure"
8948 #include "confdefs.h"
8949 /* Override any gcc2 internal prototype to avoid an error.  */
8950 /* We use char because int might match the return type of a gcc2
8951     builtin and then its argument prototype would still apply.  */
8952 char sched_yield();
8953
8954 int main() {
8955 sched_yield()
8956 ; return 0; }
8957 EOF
8958 if { (eval echo configure:8959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8959   rm -rf conftest*
8960   eval "ac_cv_lib_$ac_lib_var=yes"
8961 else
8962   echo "configure: failed program was:" >&5
8963   cat conftest.$ac_ext >&5
8964   rm -rf conftest*
8965   eval "ac_cv_lib_$ac_lib_var=no"
8966 fi
8967 rm -f conftest*
8968 LIBS="$ac_save_LIBS"
8969
8970 fi
8971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8972   echo "$ac_t""yes" 1>&6
8973   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8974                                         cat >> confdefs.h <<\EOF
8975 #define HAVE_SCHED_YIELD 1
8976 EOF
8977
8978                                         ac_cv_func_sched_yield=yes
8979 else
8980   echo "$ac_t""no" 1>&6
8981 ac_cv_func_sched_yield=no
8982 fi
8983
8984                         fi
8985                         if test $ac_cv_func_sched_yield = no -a \
8986                                 $ac_cv_func_pthread_yield = no ; then
8987                                                                                                 for ac_func in thr_yield
8988 do
8989 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8990 echo "configure:8991: checking for $ac_func" >&5
8991 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8992   echo $ac_n "(cached) $ac_c" 1>&6
8993 else
8994   cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997 /* System header to define __stub macros and hopefully few prototypes,
8998     which can conflict with char $ac_func(); below.  */
8999 #include <assert.h>
9000 /* Override any gcc2 internal prototype to avoid an error.  */
9001 /* We use char because int might match the return type of a gcc2
9002     builtin and then its argument prototype would still apply.  */
9003 char $ac_func();
9004 char (*f)();
9005
9006 int main() {
9007
9008 /* The GNU C library defines this for functions which it implements
9009     to always fail with ENOSYS.  Some functions are actually named
9010     something starting with __ and the normal name is an alias.  */
9011 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9012 choke me
9013 #else
9014 f = $ac_func;
9015 #endif
9016
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_func_$ac_func=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_func_$ac_func=no"
9027 fi
9028 rm -f conftest*
9029 fi
9030
9031 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9032   echo "$ac_t""yes" 1>&6
9033     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9034   cat >> confdefs.h <<EOF
9035 #define $ac_tr_func 1
9036 EOF
9037  
9038 else
9039   echo "$ac_t""no" 1>&6
9040 fi
9041 done
9042
9043                         fi
9044                         if test $ac_cv_func_sched_yield = no -a \
9045                                 $ac_cv_func_pthread_yield = no -a \
9046                                 "$ac_cv_func_thr_yield" = no ; then
9047                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9048                         fi
9049
9050                                                 for ac_func in pthread_kill
9051 do
9052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9053 echo "configure:9054: checking for $ac_func" >&5
9054 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9055   echo $ac_n "(cached) $ac_c" 1>&6
9056 else
9057   cat > conftest.$ac_ext <<EOF
9058 #line 9059 "configure"
9059 #include "confdefs.h"
9060 /* System header to define __stub macros and hopefully few prototypes,
9061     which can conflict with char $ac_func(); below.  */
9062 #include <assert.h>
9063 /* Override any gcc2 internal prototype to avoid an error.  */
9064 /* We use char because int might match the return type of a gcc2
9065     builtin and then its argument prototype would still apply.  */
9066 char $ac_func();
9067 char (*f)();
9068
9069 int main() {
9070
9071 /* The GNU C library defines this for functions which it implements
9072     to always fail with ENOSYS.  Some functions are actually named
9073     something starting with __ and the normal name is an alias.  */
9074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9075 choke me
9076 #else
9077 f = $ac_func;
9078 #endif
9079
9080 ; return 0; }
9081 EOF
9082 if { (eval echo configure:9083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9083   rm -rf conftest*
9084   eval "ac_cv_func_$ac_func=yes"
9085 else
9086   echo "configure: failed program was:" >&5
9087   cat conftest.$ac_ext >&5
9088   rm -rf conftest*
9089   eval "ac_cv_func_$ac_func=no"
9090 fi
9091 rm -f conftest*
9092 fi
9093
9094 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9095   echo "$ac_t""yes" 1>&6
9096     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9097   cat >> confdefs.h <<EOF
9098 #define $ac_tr_func 1
9099 EOF
9100  
9101 else
9102   echo "$ac_t""no" 1>&6
9103 fi
9104 done
9105
9106
9107                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9108 echo "configure:9109: checking for pthread_detach with <pthread.h>" >&5
9109 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9110   echo $ac_n "(cached) $ac_c" 1>&6
9111 else
9112   
9113                                                                 cat > conftest.$ac_ext <<EOF
9114 #line 9115 "configure"
9115 #include "confdefs.h"
9116
9117 #include <pthread.h>
9118 #ifndef NULL
9119 #define NULL (void*)0
9120 #endif
9121
9122 int main() {
9123 pthread_detach(NULL);
9124 ; return 0; }
9125 EOF
9126 if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9127   rm -rf conftest*
9128   ol_cv_func_pthread_detach=yes
9129 else
9130   echo "configure: failed program was:" >&5
9131   cat conftest.$ac_ext >&5
9132   rm -rf conftest*
9133   ol_cv_func_pthread_detach=no
9134 fi
9135 rm -f conftest*
9136                         
9137 fi
9138
9139 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9140
9141                         if test $ol_cv_func_pthread_detach = no ; then
9142                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9143                         fi
9144
9145                         cat >> confdefs.h <<\EOF
9146 #define HAVE_PTHREAD_DETACH 1
9147 EOF
9148
9149
9150                                                 for ac_func in \
9151                                 pthread_setconcurrency \
9152                                 pthread_getconcurrency \
9153                                 thr_setconcurrency \
9154                                 thr_getconcurrency \
9155                         
9156 do
9157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9158 echo "configure:9159: checking for $ac_func" >&5
9159 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9160   echo $ac_n "(cached) $ac_c" 1>&6
9161 else
9162   cat > conftest.$ac_ext <<EOF
9163 #line 9164 "configure"
9164 #include "confdefs.h"
9165 /* System header to define __stub macros and hopefully few prototypes,
9166     which can conflict with char $ac_func(); below.  */
9167 #include <assert.h>
9168 /* Override any gcc2 internal prototype to avoid an error.  */
9169 /* We use char because int might match the return type of a gcc2
9170     builtin and then its argument prototype would still apply.  */
9171 char $ac_func();
9172 char (*f)();
9173
9174 int main() {
9175
9176 /* The GNU C library defines this for functions which it implements
9177     to always fail with ENOSYS.  Some functions are actually named
9178     something starting with __ and the normal name is an alias.  */
9179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9180 choke me
9181 #else
9182 f = $ac_func;
9183 #endif
9184
9185 ; return 0; }
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9188   rm -rf conftest*
9189   eval "ac_cv_func_$ac_func=yes"
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   eval "ac_cv_func_$ac_func=no"
9195 fi
9196 rm -f conftest*
9197 fi
9198
9199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9200   echo "$ac_t""yes" 1>&6
9201     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9202   cat >> confdefs.h <<EOF
9203 #define $ac_tr_func 1
9204 EOF
9205  
9206 else
9207   echo "$ac_t""no" 1>&6
9208 fi
9209 done
9210
9211
9212                         
9213         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9214 echo "configure:9215: checking for pthread_kill_other_threads_np" >&5
9215 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9216   echo $ac_n "(cached) $ac_c" 1>&6
9217 else
9218   cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221 /* System header to define __stub macros and hopefully few prototypes,
9222     which can conflict with char pthread_kill_other_threads_np(); below.  */
9223 #include <assert.h>
9224 /* Override any gcc2 internal prototype to avoid an error.  */
9225 /* We use char because int might match the return type of a gcc2
9226     builtin and then its argument prototype would still apply.  */
9227 char pthread_kill_other_threads_np();
9228 char (*f)();
9229
9230 int main() {
9231
9232 /* The GNU C library defines this for functions which it implements
9233     to always fail with ENOSYS.  Some functions are actually named
9234     something starting with __ and the normal name is an alias.  */
9235 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9236 choke me
9237 #else
9238 f = pthread_kill_other_threads_np;
9239 #endif
9240
9241 ; return 0; }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9244   rm -rf conftest*
9245   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -rf conftest*
9250   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9251 fi
9252 rm -f conftest*
9253 fi
9254
9255 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9256   echo "$ac_t""yes" 1>&6
9257   :
9258 else
9259   echo "$ac_t""no" 1>&6
9260 fi
9261
9262         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9263 echo "configure:9264: checking for LinuxThreads implementation" >&5
9264 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9265   echo $ac_n "(cached) $ac_c" 1>&6
9266 else
9267   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9268 fi
9269
9270 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9271
9272                         
9273         
9274         
9275         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9276 echo "configure:9277: checking for LinuxThreads consistency" >&5
9277 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9278   echo $ac_n "(cached) $ac_c" 1>&6
9279 else
9280   
9281                 if test $ol_cv_header_linux_threads = yes -a \
9282                         $ol_cv_sys_linux_threads = yes; then
9283                         ol_cv_linux_threads=yes
9284                 elif test $ol_cv_header_linux_threads = no -a \
9285                         $ol_cv_sys_linux_threads = no; then
9286                         ol_cv_linux_threads=no
9287                 else
9288                         ol_cv_linux_threads=error
9289                 fi
9290         
9291 fi
9292
9293 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9294
9295
9296                         if test $ol_cv_linux_threads = error; then
9297                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9298                         fi
9299
9300                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9301 echo "configure:9302: checking if pthread_create() works" >&5
9302 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9303   echo $ac_n "(cached) $ac_c" 1>&6
9304 else
9305   
9306                         if test "$cross_compiling" = yes; then
9307                                 ol_cv_pthread_create_works=yes
9308 else
9309   cat > conftest.$ac_ext <<EOF
9310 #line 9311 "configure"
9311 #include "confdefs.h"
9312 /* pthread test headers */
9313 #include <pthread.h>
9314 #ifndef NULL
9315 #define NULL (void*)0
9316 #endif
9317
9318 static void *task(p)
9319         void *p;
9320 {
9321         return (void *) (p == NULL);
9322 }
9323
9324
9325 int main(argc, argv)
9326         int argc;
9327         char **argv;
9328 {
9329
9330         /* pthread test function */
9331         pthread_t t;
9332         int status;
9333
9334         /* make sure pthread_create() isn't just a stub */
9335 #if HAVE_PTHREADS_D4
9336         status = pthread_create(&t, pthread_attr_default, task, NULL);
9337 #else
9338         status = pthread_create(&t, NULL, task, NULL);
9339 #endif
9340
9341         if( status ) exit( status );
9342
9343         /* make sure pthread_detach() isn't just a stub */
9344 #if HAVE_PTHREADS_D4
9345         status = pthread_detach( &t );
9346 #else
9347         status = pthread_detach( t );
9348 #endif
9349
9350 #ifdef HAVE_LINUX_THREADS
9351         pthread_kill_other_threads_np();
9352 #endif
9353
9354         exit( status );
9355
9356 }
9357
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9360 then
9361   ol_cv_pthread_create_works=yes
9362 else
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -fr conftest*
9366   ol_cv_pthread_create_works=no
9367 fi
9368 rm -fr conftest*
9369 fi
9370
9371 fi
9372
9373 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9374
9375                         if test $ol_cv_pthread_create_works = no ; then
9376                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9377                         fi
9378
9379                                                 if test $ol_with_yielding_select = auto ; then
9380                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9381 echo "configure:9382: checking if select yields when using pthreads" >&5
9382 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9383   echo $ac_n "(cached) $ac_c" 1>&6
9384 else
9385   
9386                                 if test "$cross_compiling" = yes; then
9387   ol_cv_pthread_select_yields=cross
9388 else
9389   cat > conftest.$ac_ext <<EOF
9390 #line 9391 "configure"
9391 #include "confdefs.h"
9392
9393 #include <sys/types.h>
9394 #include <sys/time.h>
9395 #include <unistd.h>
9396 #include <pthread.h>
9397 #ifndef NULL
9398 #define NULL (void*) 0
9399 #endif
9400
9401 static int fildes[2];
9402
9403 static void *task(p)
9404         void *p;
9405 {
9406         int i;
9407         struct timeval tv;
9408
9409         fd_set rfds;
9410
9411         tv.tv_sec=10;
9412         tv.tv_usec=0;
9413
9414         FD_ZERO(&rfds);
9415         FD_SET(fildes[0], &rfds);
9416
9417         /* we're not interested in any fds */
9418         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9419
9420         if(i < 0) {
9421                 perror("select");
9422                 exit(10);
9423         }
9424
9425         exit(0); /* if we exit here, the select blocked the whole process */
9426 }
9427
9428 int main(argc, argv)
9429         int argc;
9430         char **argv;
9431 {
9432         pthread_t t;
9433
9434         /* create a pipe to select */
9435         if(pipe(&fildes[0])) {
9436                 perror("select");
9437                 exit(1);
9438         }
9439
9440 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9441         (void) pthread_setconcurrency(2);
9442 #else
9443 #ifdef HAVE_THR_SETCONCURRENCY
9444         /* Set Solaris LWP concurrency to 2 */
9445         thr_setconcurrency(2);
9446 #endif
9447 #endif
9448
9449 #if HAVE_PTHREADS_D4
9450         pthread_create(&t, pthread_attr_default, task, NULL);
9451 #else
9452         pthread_create(&t, NULL, task, NULL);
9453 #endif
9454
9455 #if HAVE_SCHED_YIELD
9456         sched_yield();  /* make sure task runs first */
9457 #else
9458 #ifdef HAVE_PTHREAD_YIELD
9459         pthread_yield();        /* make sure task runs first */
9460 #endif
9461 #endif
9462
9463         exit(2);
9464 }
9465 EOF
9466 if { (eval echo configure:9467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9467 then
9468   ol_cv_pthread_select_yields=no
9469 else
9470   echo "configure: failed program was:" >&5
9471   cat conftest.$ac_ext >&5
9472   rm -fr conftest*
9473   ol_cv_pthread_select_yields=yes
9474 fi
9475 rm -fr conftest*
9476 fi
9477
9478 fi
9479
9480 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9481
9482                                 if test $ol_cv_pthread_select_yields = cross ; then
9483                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9484                                 fi
9485
9486                                 if test $ol_cv_pthread_select_yields = yes ; then
9487                                         ol_with_yielding_select=yes
9488                                 fi
9489                         fi
9490
9491                                                 CPPFLAGS="$save_CPPFLAGS"
9492                         LIBS="$save_LIBS"
9493                 else
9494                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9495                 fi
9496         fi
9497
9498         if test $ol_with_threads = posix ; then
9499                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9500         fi
9501 fi
9502
9503 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9504         -o $ol_with_threads = mach ; then
9505
9506                 for ac_hdr in mach/cthreads.h
9507 do
9508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9510 echo "configure:9511: checking for $ac_hdr" >&5
9511 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9512   echo $ac_n "(cached) $ac_c" 1>&6
9513 else
9514   cat > conftest.$ac_ext <<EOF
9515 #line 9516 "configure"
9516 #include "confdefs.h"
9517 #include <$ac_hdr>
9518 EOF
9519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9520 { (eval echo configure:9521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9522 if test -z "$ac_err"; then
9523   rm -rf conftest*
9524   eval "ac_cv_header_$ac_safe=yes"
9525 else
9526   echo "$ac_err" >&5
9527   echo "configure: failed program was:" >&5
9528   cat conftest.$ac_ext >&5
9529   rm -rf conftest*
9530   eval "ac_cv_header_$ac_safe=no"
9531 fi
9532 rm -f conftest*
9533 fi
9534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9535   echo "$ac_t""yes" 1>&6
9536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9537   cat >> confdefs.h <<EOF
9538 #define $ac_tr_hdr 1
9539 EOF
9540  
9541 else
9542   echo "$ac_t""no" 1>&6
9543 fi
9544 done
9545
9546         if test $ac_cv_header_mach_cthreads_h = yes ; then
9547                 ol_with_threads=found
9548
9549                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9550 echo "configure:9551: checking for cthread_fork" >&5
9551 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9552   echo $ac_n "(cached) $ac_c" 1>&6
9553 else
9554   cat > conftest.$ac_ext <<EOF
9555 #line 9556 "configure"
9556 #include "confdefs.h"
9557 /* System header to define __stub macros and hopefully few prototypes,
9558     which can conflict with char cthread_fork(); below.  */
9559 #include <assert.h>
9560 /* Override any gcc2 internal prototype to avoid an error.  */
9561 /* We use char because int might match the return type of a gcc2
9562     builtin and then its argument prototype would still apply.  */
9563 char cthread_fork();
9564 char (*f)();
9565
9566 int main() {
9567
9568 /* The GNU C library defines this for functions which it implements
9569     to always fail with ENOSYS.  Some functions are actually named
9570     something starting with __ and the normal name is an alias.  */
9571 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9572 choke me
9573 #else
9574 f = cthread_fork;
9575 #endif
9576
9577 ; return 0; }
9578 EOF
9579 if { (eval echo configure:9580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9580   rm -rf conftest*
9581   eval "ac_cv_func_cthread_fork=yes"
9582 else
9583   echo "configure: failed program was:" >&5
9584   cat conftest.$ac_ext >&5
9585   rm -rf conftest*
9586   eval "ac_cv_func_cthread_fork=no"
9587 fi
9588 rm -f conftest*
9589 fi
9590
9591 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9592   echo "$ac_t""yes" 1>&6
9593   ol_link_threads=yes
9594 else
9595   echo "$ac_t""no" 1>&6
9596 fi
9597
9598
9599                 if test $ol_link_threads = no ; then
9600                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9601 echo "configure:9602: checking for cthread_fork with -all_load" >&5
9602 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9603   echo $ac_n "(cached) $ac_c" 1>&6
9604 else
9605   
9606                                                                 save_LIBS="$LIBS"
9607                                 LIBS="-all_load $LIBS"
9608                                 cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 #include <mach/cthreads.h>
9612 int main() {
9613
9614                                         cthread_fork((void *)0, (void *)0);
9615                                         
9616 ; return 0; }
9617 EOF
9618 if { (eval echo configure:9619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9619   rm -rf conftest*
9620   ol_cv_cthread_all_load=yes
9621 else
9622   echo "configure: failed program was:" >&5
9623   cat conftest.$ac_ext >&5
9624   rm -rf conftest*
9625   ol_cv_cthread_all_load=no
9626 fi
9627 rm -f conftest*
9628                                                                 LIBS="$save_LIBS"
9629                         
9630 fi
9631
9632 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9633
9634                         if test $ol_cv_cthread_all_load = yes ; then
9635                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9636                                 ol_link_threads=mach
9637                         fi
9638                 fi
9639
9640                 if test $ol_link_threads != no ; then
9641                         : check for cthread specific functionality here
9642                         cat >> confdefs.h <<\EOF
9643 #define HAVE_MACH_CTHREADS 1
9644 EOF
9645
9646                 else
9647                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9648                 fi
9649         fi
9650
9651         if test $ol_with_threads = mach ; then
9652                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9653         fi
9654 fi
9655
9656 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9657         -o $ol_with_threads = pth ; then
9658
9659         for ac_hdr in pth.h
9660 do
9661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9663 echo "configure:9664: checking for $ac_hdr" >&5
9664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9665   echo $ac_n "(cached) $ac_c" 1>&6
9666 else
9667   cat > conftest.$ac_ext <<EOF
9668 #line 9669 "configure"
9669 #include "confdefs.h"
9670 #include <$ac_hdr>
9671 EOF
9672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9673 { (eval echo configure:9674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9675 if test -z "$ac_err"; then
9676   rm -rf conftest*
9677   eval "ac_cv_header_$ac_safe=yes"
9678 else
9679   echo "$ac_err" >&5
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   eval "ac_cv_header_$ac_safe=no"
9684 fi
9685 rm -f conftest*
9686 fi
9687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9688   echo "$ac_t""yes" 1>&6
9689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9690   cat >> confdefs.h <<EOF
9691 #define $ac_tr_hdr 1
9692 EOF
9693  
9694 else
9695   echo "$ac_t""no" 1>&6
9696 fi
9697 done
9698
9699
9700         if test $ac_cv_header_pth_h = yes ; then
9701                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9702 echo "configure:9703: checking for pth_version in -lpth" >&5
9703 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   ac_save_LIBS="$LIBS"
9708 LIBS="-lpth  $LIBS"
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* Override any gcc2 internal prototype to avoid an error.  */
9713 /* We use char because int might match the return type of a gcc2
9714     builtin and then its argument prototype would still apply.  */
9715 char pth_version();
9716
9717 int main() {
9718 pth_version()
9719 ; return 0; }
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9722   rm -rf conftest*
9723   eval "ac_cv_lib_$ac_lib_var=yes"
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -rf conftest*
9728   eval "ac_cv_lib_$ac_lib_var=no"
9729 fi
9730 rm -f conftest*
9731 LIBS="$ac_save_LIBS"
9732
9733 fi
9734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9735   echo "$ac_t""yes" 1>&6
9736   have_pth=yes
9737 else
9738   echo "$ac_t""no" 1>&6
9739 have_pth=no
9740 fi
9741
9742
9743                 if test $have_pth = yes ; then
9744                         cat >> confdefs.h <<\EOF
9745 #define HAVE_GNU_PTH 1
9746 EOF
9747
9748                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9749                         ol_link_threads=pth
9750
9751                         if test $ol_with_yielding_select = auto ; then
9752                                 ol_with_yielding_select=yes
9753                         fi
9754                 fi
9755         fi
9756 fi
9757
9758 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9759         -o $ol_with_threads = lwp ; then
9760
9761                 for ac_hdr in thread.h synch.h
9762 do
9763 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9764 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9765 echo "configure:9766: checking for $ac_hdr" >&5
9766 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9767   echo $ac_n "(cached) $ac_c" 1>&6
9768 else
9769   cat > conftest.$ac_ext <<EOF
9770 #line 9771 "configure"
9771 #include "confdefs.h"
9772 #include <$ac_hdr>
9773 EOF
9774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9775 { (eval echo configure:9776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9777 if test -z "$ac_err"; then
9778   rm -rf conftest*
9779   eval "ac_cv_header_$ac_safe=yes"
9780 else
9781   echo "$ac_err" >&5
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -rf conftest*
9785   eval "ac_cv_header_$ac_safe=no"
9786 fi
9787 rm -f conftest*
9788 fi
9789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9790   echo "$ac_t""yes" 1>&6
9791     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9792   cat >> confdefs.h <<EOF
9793 #define $ac_tr_hdr 1
9794 EOF
9795  
9796 else
9797   echo "$ac_t""no" 1>&6
9798 fi
9799 done
9800
9801         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9802                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9803 echo "configure:9804: checking for thr_create in -lthread" >&5
9804 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9806   echo $ac_n "(cached) $ac_c" 1>&6
9807 else
9808   ac_save_LIBS="$LIBS"
9809 LIBS="-lthread  $LIBS"
9810 cat > conftest.$ac_ext <<EOF
9811 #line 9812 "configure"
9812 #include "confdefs.h"
9813 /* Override any gcc2 internal prototype to avoid an error.  */
9814 /* We use char because int might match the return type of a gcc2
9815     builtin and then its argument prototype would still apply.  */
9816 char thr_create();
9817
9818 int main() {
9819 thr_create()
9820 ; return 0; }
9821 EOF
9822 if { (eval echo configure:9823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9823   rm -rf conftest*
9824   eval "ac_cv_lib_$ac_lib_var=yes"
9825 else
9826   echo "configure: failed program was:" >&5
9827   cat conftest.$ac_ext >&5
9828   rm -rf conftest*
9829   eval "ac_cv_lib_$ac_lib_var=no"
9830 fi
9831 rm -f conftest*
9832 LIBS="$ac_save_LIBS"
9833
9834 fi
9835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9836   echo "$ac_t""yes" 1>&6
9837   have_thr=yes
9838 else
9839   echo "$ac_t""no" 1>&6
9840 have_thr=no
9841 fi
9842
9843
9844                 if test $have_thr = yes ; then
9845                         cat >> confdefs.h <<\EOF
9846 #define HAVE_THR 1
9847 EOF
9848
9849                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9850                         ol_link_threads=thr
9851
9852                         if test $ol_with_yielding_select = auto ; then
9853                                 ol_with_yielding_select=yes
9854                         fi
9855
9856                                                 for ac_func in \
9857                                 thr_setconcurrency \
9858                                 thr_getconcurrency \
9859                         
9860 do
9861 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9862 echo "configure:9863: checking for $ac_func" >&5
9863 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9864   echo $ac_n "(cached) $ac_c" 1>&6
9865 else
9866   cat > conftest.$ac_ext <<EOF
9867 #line 9868 "configure"
9868 #include "confdefs.h"
9869 /* System header to define __stub macros and hopefully few prototypes,
9870     which can conflict with char $ac_func(); below.  */
9871 #include <assert.h>
9872 /* Override any gcc2 internal prototype to avoid an error.  */
9873 /* We use char because int might match the return type of a gcc2
9874     builtin and then its argument prototype would still apply.  */
9875 char $ac_func();
9876 char (*f)();
9877
9878 int main() {
9879
9880 /* The GNU C library defines this for functions which it implements
9881     to always fail with ENOSYS.  Some functions are actually named
9882     something starting with __ and the normal name is an alias.  */
9883 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9884 choke me
9885 #else
9886 f = $ac_func;
9887 #endif
9888
9889 ; return 0; }
9890 EOF
9891 if { (eval echo configure:9892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9892   rm -rf conftest*
9893   eval "ac_cv_func_$ac_func=yes"
9894 else
9895   echo "configure: failed program was:" >&5
9896   cat conftest.$ac_ext >&5
9897   rm -rf conftest*
9898   eval "ac_cv_func_$ac_func=no"
9899 fi
9900 rm -f conftest*
9901 fi
9902
9903 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9904   echo "$ac_t""yes" 1>&6
9905     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9906   cat >> confdefs.h <<EOF
9907 #define $ac_tr_func 1
9908 EOF
9909  
9910 else
9911   echo "$ac_t""no" 1>&6
9912 fi
9913 done
9914
9915                 fi
9916         fi
9917
9918                 for ac_hdr in lwp/lwp.h
9919 do
9920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9922 echo "configure:9923: checking for $ac_hdr" >&5
9923 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9924   echo $ac_n "(cached) $ac_c" 1>&6
9925 else
9926   cat > conftest.$ac_ext <<EOF
9927 #line 9928 "configure"
9928 #include "confdefs.h"
9929 #include <$ac_hdr>
9930 EOF
9931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9932 { (eval echo configure:9933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9934 if test -z "$ac_err"; then
9935   rm -rf conftest*
9936   eval "ac_cv_header_$ac_safe=yes"
9937 else
9938   echo "$ac_err" >&5
9939   echo "configure: failed program was:" >&5
9940   cat conftest.$ac_ext >&5
9941   rm -rf conftest*
9942   eval "ac_cv_header_$ac_safe=no"
9943 fi
9944 rm -f conftest*
9945 fi
9946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9947   echo "$ac_t""yes" 1>&6
9948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9949   cat >> confdefs.h <<EOF
9950 #define $ac_tr_hdr 1
9951 EOF
9952  
9953 else
9954   echo "$ac_t""no" 1>&6
9955 fi
9956 done
9957
9958         if test $ac_cv_header_lwp_lwp_h = yes ; then
9959                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9960 echo "configure:9961: checking for lwp_create in -llwp" >&5
9961 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9963   echo $ac_n "(cached) $ac_c" 1>&6
9964 else
9965   ac_save_LIBS="$LIBS"
9966 LIBS="-llwp  $LIBS"
9967 cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 /* Override any gcc2 internal prototype to avoid an error.  */
9971 /* We use char because int might match the return type of a gcc2
9972     builtin and then its argument prototype would still apply.  */
9973 char lwp_create();
9974
9975 int main() {
9976 lwp_create()
9977 ; return 0; }
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9980   rm -rf conftest*
9981   eval "ac_cv_lib_$ac_lib_var=yes"
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -rf conftest*
9986   eval "ac_cv_lib_$ac_lib_var=no"
9987 fi
9988 rm -f conftest*
9989 LIBS="$ac_save_LIBS"
9990
9991 fi
9992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9993   echo "$ac_t""yes" 1>&6
9994   have_lwp=yes
9995 else
9996   echo "$ac_t""no" 1>&6
9997 have_lwp=no
9998 fi
9999
10000
10001                 if test $have_lwp = yes ; then
10002                         cat >> confdefs.h <<\EOF
10003 #define HAVE_LWP 1
10004 EOF
10005
10006                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10007                         ol_link_threads=lwp
10008
10009                         if test $ol_with_yielding_select = auto ; then
10010                                 ol_with_yielding_select=no
10011                         fi
10012                 fi
10013         fi
10014 fi
10015
10016 if test $ol_with_yielding_select = yes ; then
10017         cat >> confdefs.h <<\EOF
10018 #define HAVE_YIELDING_SELECT 1
10019 EOF
10020
10021 fi
10022
10023 if test $ol_with_threads = manual ; then
10024                 ol_link_threads=yes
10025
10026         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10027
10028         for ac_hdr in pthread.h sched.h
10029 do
10030 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10031 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10032 echo "configure:10033: checking for $ac_hdr" >&5
10033 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10034   echo $ac_n "(cached) $ac_c" 1>&6
10035 else
10036   cat > conftest.$ac_ext <<EOF
10037 #line 10038 "configure"
10038 #include "confdefs.h"
10039 #include <$ac_hdr>
10040 EOF
10041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10042 { (eval echo configure:10043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10044 if test -z "$ac_err"; then
10045   rm -rf conftest*
10046   eval "ac_cv_header_$ac_safe=yes"
10047 else
10048   echo "$ac_err" >&5
10049   echo "configure: failed program was:" >&5
10050   cat conftest.$ac_ext >&5
10051   rm -rf conftest*
10052   eval "ac_cv_header_$ac_safe=no"
10053 fi
10054 rm -f conftest*
10055 fi
10056 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10057   echo "$ac_t""yes" 1>&6
10058     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10059   cat >> confdefs.h <<EOF
10060 #define $ac_tr_hdr 1
10061 EOF
10062  
10063 else
10064   echo "$ac_t""no" 1>&6
10065 fi
10066 done
10067
10068         for ac_func in sched_yield pthread_yield
10069 do
10070 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10071 echo "configure:10072: checking for $ac_func" >&5
10072 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10073   echo $ac_n "(cached) $ac_c" 1>&6
10074 else
10075   cat > conftest.$ac_ext <<EOF
10076 #line 10077 "configure"
10077 #include "confdefs.h"
10078 /* System header to define __stub macros and hopefully few prototypes,
10079     which can conflict with char $ac_func(); below.  */
10080 #include <assert.h>
10081 /* Override any gcc2 internal prototype to avoid an error.  */
10082 /* We use char because int might match the return type of a gcc2
10083     builtin and then its argument prototype would still apply.  */
10084 char $ac_func();
10085 char (*f)();
10086
10087 int main() {
10088
10089 /* The GNU C library defines this for functions which it implements
10090     to always fail with ENOSYS.  Some functions are actually named
10091     something starting with __ and the normal name is an alias.  */
10092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10093 choke me
10094 #else
10095 f = $ac_func;
10096 #endif
10097
10098 ; return 0; }
10099 EOF
10100 if { (eval echo configure:10101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10101   rm -rf conftest*
10102   eval "ac_cv_func_$ac_func=yes"
10103 else
10104   echo "configure: failed program was:" >&5
10105   cat conftest.$ac_ext >&5
10106   rm -rf conftest*
10107   eval "ac_cv_func_$ac_func=no"
10108 fi
10109 rm -f conftest*
10110 fi
10111
10112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10113   echo "$ac_t""yes" 1>&6
10114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10115   cat >> confdefs.h <<EOF
10116 #define $ac_tr_func 1
10117 EOF
10118  
10119 else
10120   echo "$ac_t""no" 1>&6
10121 fi
10122 done
10123
10124         
10125         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10126 echo "configure:10127: checking for LinuxThreads pthread.h" >&5
10127 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10128   echo $ac_n "(cached) $ac_c" 1>&6
10129 else
10130   cat > conftest.$ac_ext <<EOF
10131 #line 10132 "configure"
10132 #include "confdefs.h"
10133 #include <pthread.h>
10134 EOF
10135 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10136   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10137   rm -rf conftest*
10138   ol_cv_header_linux_threads=yes
10139 else
10140   rm -rf conftest*
10141   ol_cv_header_linux_threads=no
10142 fi
10143 rm -f conftest*
10144
10145                 
10146 fi
10147
10148 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10149         if test $ol_cv_header_linux_threads = yes; then
10150                 cat >> confdefs.h <<\EOF
10151 #define HAVE_LINUX_THREADS 1
10152 EOF
10153
10154         fi
10155
10156
10157         for ac_hdr in mach/cthreads.h
10158 do
10159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10161 echo "configure:10162: checking for $ac_hdr" >&5
10162 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10163   echo $ac_n "(cached) $ac_c" 1>&6
10164 else
10165   cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 #include <$ac_hdr>
10169 EOF
10170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10171 { (eval echo configure:10172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10173 if test -z "$ac_err"; then
10174   rm -rf conftest*
10175   eval "ac_cv_header_$ac_safe=yes"
10176 else
10177   echo "$ac_err" >&5
10178   echo "configure: failed program was:" >&5
10179   cat conftest.$ac_ext >&5
10180   rm -rf conftest*
10181   eval "ac_cv_header_$ac_safe=no"
10182 fi
10183 rm -f conftest*
10184 fi
10185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10186   echo "$ac_t""yes" 1>&6
10187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10188   cat >> confdefs.h <<EOF
10189 #define $ac_tr_hdr 1
10190 EOF
10191  
10192 else
10193   echo "$ac_t""no" 1>&6
10194 fi
10195 done
10196
10197         for ac_hdr in lwp/lwp.h
10198 do
10199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10201 echo "configure:10202: checking for $ac_hdr" >&5
10202 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10203   echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205   cat > conftest.$ac_ext <<EOF
10206 #line 10207 "configure"
10207 #include "confdefs.h"
10208 #include <$ac_hdr>
10209 EOF
10210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10211 { (eval echo configure:10212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10213 if test -z "$ac_err"; then
10214   rm -rf conftest*
10215   eval "ac_cv_header_$ac_safe=yes"
10216 else
10217   echo "$ac_err" >&5
10218   echo "configure: failed program was:" >&5
10219   cat conftest.$ac_ext >&5
10220   rm -rf conftest*
10221   eval "ac_cv_header_$ac_safe=no"
10222 fi
10223 rm -f conftest*
10224 fi
10225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10228   cat >> confdefs.h <<EOF
10229 #define $ac_tr_hdr 1
10230 EOF
10231  
10232 else
10233   echo "$ac_t""no" 1>&6
10234 fi
10235 done
10236
10237         for ac_hdr in thread.h synch.h
10238 do
10239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10241 echo "configure:10242: checking for $ac_hdr" >&5
10242 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10243   echo $ac_n "(cached) $ac_c" 1>&6
10244 else
10245   cat > conftest.$ac_ext <<EOF
10246 #line 10247 "configure"
10247 #include "confdefs.h"
10248 #include <$ac_hdr>
10249 EOF
10250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10251 { (eval echo configure:10252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10253 if test -z "$ac_err"; then
10254   rm -rf conftest*
10255   eval "ac_cv_header_$ac_safe=yes"
10256 else
10257   echo "$ac_err" >&5
10258   echo "configure: failed program was:" >&5
10259   cat conftest.$ac_ext >&5
10260   rm -rf conftest*
10261   eval "ac_cv_header_$ac_safe=no"
10262 fi
10263 rm -f conftest*
10264 fi
10265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10266   echo "$ac_t""yes" 1>&6
10267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10268   cat >> confdefs.h <<EOF
10269 #define $ac_tr_hdr 1
10270 EOF
10271  
10272 else
10273   echo "$ac_t""no" 1>&6
10274 fi
10275 done
10276
10277 fi
10278
10279 if test $ol_link_threads != no ; then  
10280                         cat >> confdefs.h <<\EOF
10281 #define REENTRANT 1
10282 EOF
10283
10284         cat >> confdefs.h <<\EOF
10285 #define _REENTRANT 1
10286 EOF
10287
10288         cat >> confdefs.h <<\EOF
10289 #define THREAD_SAFE 1
10290 EOF
10291
10292         cat >> confdefs.h <<\EOF
10293 #define _THREAD_SAFE 1
10294 EOF
10295
10296         cat >> confdefs.h <<\EOF
10297 #define THREADSAFE 1
10298 EOF
10299
10300         cat >> confdefs.h <<\EOF
10301 #define _THREADSAFE 1
10302 EOF
10303
10304         cat >> confdefs.h <<\EOF
10305 #define _SGI_MP_SOURCE 1
10306 EOF
10307
10308
10309                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10310 echo "configure:10311: checking for thread specific errno" >&5
10311 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10312   echo $ac_n "(cached) $ac_c" 1>&6
10313 else
10314   
10315                 cat > conftest.$ac_ext <<EOF
10316 #line 10317 "configure"
10317 #include "confdefs.h"
10318 #include <errno.h>
10319 int main() {
10320 errno = 0;
10321 ; return 0; }
10322 EOF
10323 if { (eval echo configure:10324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10324   rm -rf conftest*
10325   ol_cv_errno_thread_specific=yes
10326 else
10327   echo "configure: failed program was:" >&5
10328   cat conftest.$ac_ext >&5
10329   rm -rf conftest*
10330   ol_cv_errno_thread_specific=no
10331 fi
10332 rm -f conftest*
10333         
10334 fi
10335
10336 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10337
10338                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10339 echo "configure:10340: checking for thread specific h_errno" >&5
10340 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10341   echo $ac_n "(cached) $ac_c" 1>&6
10342 else
10343   
10344                 cat > conftest.$ac_ext <<EOF
10345 #line 10346 "configure"
10346 #include "confdefs.h"
10347 #include <netdb.h>
10348 int main() {
10349 h_errno = 0;
10350 ; return 0; }
10351 EOF
10352 if { (eval echo configure:10353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10353   rm -rf conftest*
10354   ol_cv_h_errno_thread_specific=yes
10355 else
10356   echo "configure: failed program was:" >&5
10357   cat conftest.$ac_ext >&5
10358   rm -rf conftest*
10359   ol_cv_h_errno_thread_specific=no
10360 fi
10361 rm -f conftest*
10362         
10363 fi
10364
10365 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10366
10367         if test $ol_cv_errno_thread_specific != yes \
10368                 -o $ol_cv_h_errno_thread_specific != yes ; then
10369                 LIBS="$LTHREAD_LIBS $LIBS"
10370                 LTHREAD_LIBS=""
10371         fi
10372
10373 fi  
10374
10375 if test $ol_link_threads = no ; then
10376         if test $ol_with_threads = yes ; then
10377                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10378         fi
10379
10380         if test $ol_with_threads = auto ; then
10381                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10382                 ol_with_threads=no
10383         fi
10384
10385         cat >> confdefs.h <<\EOF
10386 #define NO_THREADS 1
10387 EOF
10388
10389         LTHREAD_LIBS=""
10390 fi
10391
10392 if test $ol_link_threads != no ; then
10393         cat >> confdefs.h <<\EOF
10394 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10395 EOF
10396
10397 fi
10398
10399
10400 ol_link_ldbm=no 
10401 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10402         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10403 echo "configure:10404: checking for DB2 library" >&5
10404 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10405   echo $ac_n "(cached) $ac_c" 1>&6
10406 else
10407         ol_LIBS="$LIBS"
10408         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10409 echo "configure:10410: checking for db_open in -ldb" >&5
10410 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10411 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10412   echo $ac_n "(cached) $ac_c" 1>&6
10413 else
10414   ac_save_LIBS="$LIBS"
10415 LIBS="-ldb  $LIBS"
10416 cat > conftest.$ac_ext <<EOF
10417 #line 10418 "configure"
10418 #include "confdefs.h"
10419 /* Override any gcc2 internal prototype to avoid an error.  */
10420 /* We use char because int might match the return type of a gcc2
10421     builtin and then its argument prototype would still apply.  */
10422 char db_open();
10423
10424 int main() {
10425 db_open()
10426 ; return 0; }
10427 EOF
10428 if { (eval echo configure:10429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10429   rm -rf conftest*
10430   eval "ac_cv_lib_$ac_lib_var=yes"
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   eval "ac_cv_lib_$ac_lib_var=no"
10436 fi
10437 rm -f conftest*
10438 LIBS="$ac_save_LIBS"
10439
10440 fi
10441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10442   echo "$ac_t""yes" 1>&6
10443   ol_cv_lib_db2=-ldb
10444 else
10445   echo "$ac_t""no" 1>&6
10446 ol_cv_lib_db2=no
10447 fi
10448
10449         LIBS="$ol_LIBS"
10450
10451 fi
10452
10453 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10454
10455 for ac_hdr in db.h
10456 do
10457 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10458 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10459 echo "configure:10460: checking for $ac_hdr" >&5
10460 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10461   echo $ac_n "(cached) $ac_c" 1>&6
10462 else
10463   cat > conftest.$ac_ext <<EOF
10464 #line 10465 "configure"
10465 #include "confdefs.h"
10466 #include <$ac_hdr>
10467 EOF
10468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10469 { (eval echo configure:10470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10471 if test -z "$ac_err"; then
10472   rm -rf conftest*
10473   eval "ac_cv_header_$ac_safe=yes"
10474 else
10475   echo "$ac_err" >&5
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_header_$ac_safe=no"
10480 fi
10481 rm -f conftest*
10482 fi
10483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10484   echo "$ac_t""yes" 1>&6
10485     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10486   cat >> confdefs.h <<EOF
10487 #define $ac_tr_hdr 1
10488 EOF
10489  
10490 else
10491   echo "$ac_t""no" 1>&6
10492 fi
10493 done
10494
10495 if test $ac_cv_header_db_h = yes ; then
10496         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10497 echo "configure:10498: checking if db.h is DB2" >&5
10498 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10499   echo $ac_n "(cached) $ac_c" 1>&6
10500 else
10501   
10502                 cat > conftest.$ac_ext <<EOF
10503 #line 10504 "configure"
10504 #include "confdefs.h"
10505
10506 #                       include <db.h>
10507                         /* this check could be improved */
10508 #                       ifdef DB_VERSION_MAJOR
10509 #                               if DB_VERSION_MAJOR == 2
10510                                         __db_version_2;
10511 #                               endif
10512 #                       endif
10513                 
10514 EOF
10515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10516   egrep "__db_version_2" >/dev/null 2>&1; then
10517   rm -rf conftest*
10518   ol_cv_header_db2=yes
10519 else
10520   rm -rf conftest*
10521   ol_cv_header_db2=no
10522 fi
10523 rm -f conftest*
10524
10525 fi
10526
10527 echo "$ac_t""$ol_cv_header_db2" 1>&6
10528 else
10529         ol_cv_header_db2=no
10530 fi
10531
10532
10533  
10534  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10535 echo "configure:10536: checking for Berkeley DB2" >&5
10536 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10537   echo $ac_n "(cached) $ac_c" 1>&6
10538 else
10539   
10540         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10541                 ol_cv_berkeley_db2=no
10542         else
10543                 ol_cv_berkeley_db2=yes
10544         fi
10545
10546 fi
10547
10548 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10549  if test $ol_cv_berkeley_db2 = yes ; then
10550         cat >> confdefs.h <<\EOF
10551 #define HAVE_BERKELEY_DB2 1
10552 EOF
10553
10554  fi
10555
10556
10557         if test $ol_cv_berkeley_db2 = yes ; then
10558                 ol_link_ldbm=db2
10559                 ol_with_ldbm_api=db2
10560
10561                 if test $ol_with_ldbm_type = hash ; then
10562                         cat >> confdefs.h <<\EOF
10563 #define LDBM_USE_DBHASH 1
10564 EOF
10565
10566                 else
10567                         cat >> confdefs.h <<\EOF
10568 #define LDBM_USE_DBBTREE 1
10569 EOF
10570
10571                 fi
10572
10573                                                 if test $ol_cv_lib_db2 != yes ; then
10574                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10575                 fi
10576         fi
10577 fi
10578
10579 ol_link_bdb2=no
10580 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10581         ol_link_bdb2=yes
10582 fi
10583
10584 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10585         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10586 echo "configure:10587: checking for Berkeley DB library" >&5
10587 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10588   echo $ac_n "(cached) $ac_c" 1>&6
10589 else
10590   
10591         for ac_hdr in db1/db.h
10592 do
10593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10595 echo "configure:10596: checking for $ac_hdr" >&5
10596 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10597   echo $ac_n "(cached) $ac_c" 1>&6
10598 else
10599   cat > conftest.$ac_ext <<EOF
10600 #line 10601 "configure"
10601 #include "confdefs.h"
10602 #include <$ac_hdr>
10603 EOF
10604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10605 { (eval echo configure:10606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10607 if test -z "$ac_err"; then
10608   rm -rf conftest*
10609   eval "ac_cv_header_$ac_safe=yes"
10610 else
10611   echo "$ac_err" >&5
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   eval "ac_cv_header_$ac_safe=no"
10616 fi
10617 rm -f conftest*
10618 fi
10619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10620   echo "$ac_t""yes" 1>&6
10621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10622   cat >> confdefs.h <<EOF
10623 #define $ac_tr_hdr 1
10624 EOF
10625  
10626 else
10627   echo "$ac_t""no" 1>&6
10628 fi
10629 done
10630
10631         ol_LIBS="$LIBS"
10632         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10633 echo "configure:10634: checking for dbopen" >&5
10634 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10635   echo $ac_n "(cached) $ac_c" 1>&6
10636 else
10637   cat > conftest.$ac_ext <<EOF
10638 #line 10639 "configure"
10639 #include "confdefs.h"
10640 /* System header to define __stub macros and hopefully few prototypes,
10641     which can conflict with char dbopen(); below.  */
10642 #include <assert.h>
10643 /* Override any gcc2 internal prototype to avoid an error.  */
10644 /* We use char because int might match the return type of a gcc2
10645     builtin and then its argument prototype would still apply.  */
10646 char dbopen();
10647 char (*f)();
10648
10649 int main() {
10650
10651 /* The GNU C library defines this for functions which it implements
10652     to always fail with ENOSYS.  Some functions are actually named
10653     something starting with __ and the normal name is an alias.  */
10654 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10655 choke me
10656 #else
10657 f = dbopen;
10658 #endif
10659
10660 ; return 0; }
10661 EOF
10662 if { (eval echo configure:10663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10663   rm -rf conftest*
10664   eval "ac_cv_func_dbopen=yes"
10665 else
10666   echo "configure: failed program was:" >&5
10667   cat conftest.$ac_ext >&5
10668   rm -rf conftest*
10669   eval "ac_cv_func_dbopen=no"
10670 fi
10671 rm -f conftest*
10672 fi
10673
10674 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10675   echo "$ac_t""yes" 1>&6
10676   ol_cv_lib_db=yes
10677 else
10678   echo "$ac_t""no" 1>&6
10679
10680                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10681 echo "configure:10682: checking for dbopen in -ldb1" >&5
10682 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10683 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10684   echo $ac_n "(cached) $ac_c" 1>&6
10685 else
10686   ac_save_LIBS="$LIBS"
10687 LIBS="-ldb1  $LIBS"
10688 cat > conftest.$ac_ext <<EOF
10689 #line 10690 "configure"
10690 #include "confdefs.h"
10691 /* Override any gcc2 internal prototype to avoid an error.  */
10692 /* We use char because int might match the return type of a gcc2
10693     builtin and then its argument prototype would still apply.  */
10694 char dbopen();
10695
10696 int main() {
10697 dbopen()
10698 ; return 0; }
10699 EOF
10700 if { (eval echo configure:10701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10701   rm -rf conftest*
10702   eval "ac_cv_lib_$ac_lib_var=yes"
10703 else
10704   echo "configure: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   rm -rf conftest*
10707   eval "ac_cv_lib_$ac_lib_var=no"
10708 fi
10709 rm -f conftest*
10710 LIBS="$ac_save_LIBS"
10711
10712 fi
10713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10714   echo "$ac_t""yes" 1>&6
10715   ol_cv_lib_db=-ldb1
10716 else
10717   echo "$ac_t""no" 1>&6
10718
10719                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10720 echo "configure:10721: checking for dbopen in -ldb" >&5
10721 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10722 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10723   echo $ac_n "(cached) $ac_c" 1>&6
10724 else
10725   ac_save_LIBS="$LIBS"
10726 LIBS="-ldb  $LIBS"
10727 cat > conftest.$ac_ext <<EOF
10728 #line 10729 "configure"
10729 #include "confdefs.h"
10730 /* Override any gcc2 internal prototype to avoid an error.  */
10731 /* We use char because int might match the return type of a gcc2
10732     builtin and then its argument prototype would still apply.  */
10733 char dbopen();
10734
10735 int main() {
10736 dbopen()
10737 ; return 0; }
10738 EOF
10739 if { (eval echo configure:10740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10740   rm -rf conftest*
10741   eval "ac_cv_lib_$ac_lib_var=yes"
10742 else
10743   echo "configure: failed program was:" >&5
10744   cat conftest.$ac_ext >&5
10745   rm -rf conftest*
10746   eval "ac_cv_lib_$ac_lib_var=no"
10747 fi
10748 rm -f conftest*
10749 LIBS="$ac_save_LIBS"
10750
10751 fi
10752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10753   echo "$ac_t""yes" 1>&6
10754   ol_cv_lib_db=-ldb
10755 else
10756   echo "$ac_t""no" 1>&6
10757 ol_cv_lib_db=no
10758 fi
10759
10760                 
10761 fi
10762
10763         
10764 fi
10765
10766         LIBS="$ol_LIBS"
10767
10768 fi
10769
10770 echo "$ac_t""$ol_cv_lib_db" 1>&6
10771
10772
10773 for ac_hdr in db_185.h
10774 do
10775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10777 echo "configure:10778: checking for $ac_hdr" >&5
10778 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10779   echo $ac_n "(cached) $ac_c" 1>&6
10780 else
10781   cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784 #include <$ac_hdr>
10785 EOF
10786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10787 { (eval echo configure:10788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10789 if test -z "$ac_err"; then
10790   rm -rf conftest*
10791   eval "ac_cv_header_$ac_safe=yes"
10792 else
10793   echo "$ac_err" >&5
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_header_$ac_safe=no"
10798 fi
10799 rm -f conftest*
10800 fi
10801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10802   echo "$ac_t""yes" 1>&6
10803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10804   cat >> confdefs.h <<EOF
10805 #define $ac_tr_hdr 1
10806 EOF
10807  
10808 else
10809   echo "$ac_t""no" 1>&6
10810 fi
10811 done
10812
10813 if test "$ol_cv_header_db2" = yes ; then
10814         
10815         ol_cv_header_db=$ac_cv_header_db_185_h
10816 else
10817         ol_cv_header_db=$ac_cv_header_db_h
10818 fi
10819
10820
10821  
10822  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10823 echo "configure:10824: checking for Berkeley DB" >&5
10824 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10825   echo $ac_n "(cached) $ac_c" 1>&6
10826 else
10827   
10828         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10829                 ol_cv_berkeley_db=no
10830         else
10831                 ol_cv_berkeley_db=yes
10832         fi
10833
10834 fi
10835
10836 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10837  if test $ol_cv_berkeley_db = yes ; then
10838         cat >> confdefs.h <<\EOF
10839 #define HAVE_BERKELEY_DB 1
10840 EOF
10841
10842  fi
10843
10844
10845         if test $ol_cv_berkeley_db = yes ; then
10846                 ol_link_ldbm=db
10847                 ol_with_ldbm_api=db
10848
10849                 if test $ol_with_ldbm_type = hash ; then
10850                         cat >> confdefs.h <<\EOF
10851 #define LDBM_USE_DBHASH 1
10852 EOF
10853
10854                 else
10855                         cat >> confdefs.h <<\EOF
10856 #define LDBM_USE_DBBTREE 1
10857 EOF
10858
10859                 fi
10860
10861                                                 if test $ol_cv_lib_db != yes ; then
10862                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10863                 fi
10864         fi
10865 fi
10866
10867 if test $ol_with_ldbm_api = manual ; then
10868                 ol_link_ldbm=yes
10869
10870         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10871
10872         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10873 do
10874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10876 echo "configure:10877: checking for $ac_hdr" >&5
10877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 #include <$ac_hdr>
10884 EOF
10885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10886 { (eval echo configure:10887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10888 if test -z "$ac_err"; then
10889   rm -rf conftest*
10890   eval "ac_cv_header_$ac_safe=yes"
10891 else
10892   echo "$ac_err" >&5
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   eval "ac_cv_header_$ac_safe=no"
10897 fi
10898 rm -f conftest*
10899 fi
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10903   cat >> confdefs.h <<EOF
10904 #define $ac_tr_hdr 1
10905 EOF
10906  
10907 else
10908   echo "$ac_t""no" 1>&6
10909 fi
10910 done
10911
10912 fi
10913
10914 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10915         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10916         ol_with_ldbm_api=none
10917 fi
10918
10919 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10920         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10921 echo "configure:10922: checking for MDBM library" >&5
10922 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10923   echo $ac_n "(cached) $ac_c" 1>&6
10924 else
10925         ol_LIBS="$LIBS"
10926         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10927 echo "configure:10928: checking for mdbm_set_chain" >&5
10928 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 /* System header to define __stub macros and hopefully few prototypes,
10935     which can conflict with char mdbm_set_chain(); below.  */
10936 #include <assert.h>
10937 /* Override any gcc2 internal prototype to avoid an error.  */
10938 /* We use char because int might match the return type of a gcc2
10939     builtin and then its argument prototype would still apply.  */
10940 char mdbm_set_chain();
10941 char (*f)();
10942
10943 int main() {
10944
10945 /* The GNU C library defines this for functions which it implements
10946     to always fail with ENOSYS.  Some functions are actually named
10947     something starting with __ and the normal name is an alias.  */
10948 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10949 choke me
10950 #else
10951 f = mdbm_set_chain;
10952 #endif
10953
10954 ; return 0; }
10955 EOF
10956 if { (eval echo configure:10957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10957   rm -rf conftest*
10958   eval "ac_cv_func_mdbm_set_chain=yes"
10959 else
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -rf conftest*
10963   eval "ac_cv_func_mdbm_set_chain=no"
10964 fi
10965 rm -f conftest*
10966 fi
10967
10968 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10969   echo "$ac_t""yes" 1>&6
10970   ol_cv_lib_mdbm=yes
10971 else
10972   echo "$ac_t""no" 1>&6
10973
10974                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10975 echo "configure:10976: checking for mdbm_set_chain in -lmdbm" >&5
10976 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   ac_save_LIBS="$LIBS"
10981 LIBS="-lmdbm  $LIBS"
10982 cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985 /* Override any gcc2 internal prototype to avoid an error.  */
10986 /* We use char because int might match the return type of a gcc2
10987     builtin and then its argument prototype would still apply.  */
10988 char mdbm_set_chain();
10989
10990 int main() {
10991 mdbm_set_chain()
10992 ; return 0; }
10993 EOF
10994 if { (eval echo configure:10995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10995   rm -rf conftest*
10996   eval "ac_cv_lib_$ac_lib_var=yes"
10997 else
10998   echo "configure: failed program was:" >&5
10999   cat conftest.$ac_ext >&5
11000   rm -rf conftest*
11001   eval "ac_cv_lib_$ac_lib_var=no"
11002 fi
11003 rm -f conftest*
11004 LIBS="$ac_save_LIBS"
11005
11006 fi
11007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11008   echo "$ac_t""yes" 1>&6
11009   ol_cv_lib_mdbm=-lmdbm
11010 else
11011   echo "$ac_t""no" 1>&6
11012 ol_cv_lib_mdbm=no
11013 fi
11014
11015         
11016 fi
11017
11018         LIBS="$ol_LIBS"
11019
11020 fi
11021
11022 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11023
11024
11025  for ac_hdr in mdbm.h
11026 do
11027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11029 echo "configure:11030: checking for $ac_hdr" >&5
11030 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11031   echo $ac_n "(cached) $ac_c" 1>&6
11032 else
11033   cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036 #include <$ac_hdr>
11037 EOF
11038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11039 { (eval echo configure:11040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11041 if test -z "$ac_err"; then
11042   rm -rf conftest*
11043   eval "ac_cv_header_$ac_safe=yes"
11044 else
11045   echo "$ac_err" >&5
11046   echo "configure: failed program was:" >&5
11047   cat conftest.$ac_ext >&5
11048   rm -rf conftest*
11049   eval "ac_cv_header_$ac_safe=no"
11050 fi
11051 rm -f conftest*
11052 fi
11053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11054   echo "$ac_t""yes" 1>&6
11055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11056   cat >> confdefs.h <<EOF
11057 #define $ac_tr_hdr 1
11058 EOF
11059  
11060 else
11061   echo "$ac_t""no" 1>&6
11062 fi
11063 done
11064
11065  echo $ac_n "checking for db""... $ac_c" 1>&6
11066 echo "configure:11067: checking for db" >&5
11067 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   
11071         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11072                 ol_cv_mdbm=no
11073         else
11074                 ol_cv_mdbm=yes
11075         fi
11076
11077 fi
11078
11079 echo "$ac_t""$ol_cv_mdbm" 1>&6
11080  if test $ol_cv_mdbm = yes ; then
11081         cat >> confdefs.h <<\EOF
11082 #define HAVE_MDBM 1
11083 EOF
11084
11085  fi
11086
11087
11088         if test $ol_cv_mdbm = yes ; then
11089                 ol_link_ldbm=mdbm
11090                 ol_with_ldbm_api=mdbm
11091                 if test $ol_cv_lib_mdbm != yes ; then
11092                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11093                 fi
11094         fi
11095 fi
11096
11097 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11098         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11099 echo "configure:11100: checking for GDBM library" >&5
11100 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11101   echo $ac_n "(cached) $ac_c" 1>&6
11102 else
11103         ol_LIBS="$LIBS"
11104         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11105 echo "configure:11106: checking for gdbm_open" >&5
11106 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112 /* System header to define __stub macros and hopefully few prototypes,
11113     which can conflict with char gdbm_open(); below.  */
11114 #include <assert.h>
11115 /* Override any gcc2 internal prototype to avoid an error.  */
11116 /* We use char because int might match the return type of a gcc2
11117     builtin and then its argument prototype would still apply.  */
11118 char gdbm_open();
11119 char (*f)();
11120
11121 int main() {
11122
11123 /* The GNU C library defines this for functions which it implements
11124     to always fail with ENOSYS.  Some functions are actually named
11125     something starting with __ and the normal name is an alias.  */
11126 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11127 choke me
11128 #else
11129 f = gdbm_open;
11130 #endif
11131
11132 ; return 0; }
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11135   rm -rf conftest*
11136   eval "ac_cv_func_gdbm_open=yes"
11137 else
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   eval "ac_cv_func_gdbm_open=no"
11142 fi
11143 rm -f conftest*
11144 fi
11145
11146 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148   ol_cv_lib_gdbm=yes
11149 else
11150   echo "$ac_t""no" 1>&6
11151
11152                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11153 echo "configure:11154: checking for gdbm_open in -lgdbm" >&5
11154 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   ac_save_LIBS="$LIBS"
11159 LIBS="-lgdbm  $LIBS"
11160 cat > conftest.$ac_ext <<EOF
11161 #line 11162 "configure"
11162 #include "confdefs.h"
11163 /* Override any gcc2 internal prototype to avoid an error.  */
11164 /* We use char because int might match the return type of a gcc2
11165     builtin and then its argument prototype would still apply.  */
11166 char gdbm_open();
11167
11168 int main() {
11169 gdbm_open()
11170 ; return 0; }
11171 EOF
11172 if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=yes"
11175 else
11176   echo "configure: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   rm -rf conftest*
11179   eval "ac_cv_lib_$ac_lib_var=no"
11180 fi
11181 rm -f conftest*
11182 LIBS="$ac_save_LIBS"
11183
11184 fi
11185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11186   echo "$ac_t""yes" 1>&6
11187   ol_cv_lib_gdbm=-lgdbm
11188 else
11189   echo "$ac_t""no" 1>&6
11190 ol_cv_lib_gdbm=no
11191 fi
11192
11193         
11194 fi
11195
11196         LIBS="$ol_LIBS"
11197
11198 fi
11199
11200 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11201
11202
11203  for ac_hdr in gdbm.h
11204 do
11205 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11206 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11207 echo "configure:11208: checking for $ac_hdr" >&5
11208 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   cat > conftest.$ac_ext <<EOF
11212 #line 11213 "configure"
11213 #include "confdefs.h"
11214 #include <$ac_hdr>
11215 EOF
11216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11217 { (eval echo configure:11218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11219 if test -z "$ac_err"; then
11220   rm -rf conftest*
11221   eval "ac_cv_header_$ac_safe=yes"
11222 else
11223   echo "$ac_err" >&5
11224   echo "configure: failed program was:" >&5
11225   cat conftest.$ac_ext >&5
11226   rm -rf conftest*
11227   eval "ac_cv_header_$ac_safe=no"
11228 fi
11229 rm -f conftest*
11230 fi
11231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11232   echo "$ac_t""yes" 1>&6
11233     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11234   cat >> confdefs.h <<EOF
11235 #define $ac_tr_hdr 1
11236 EOF
11237  
11238 else
11239   echo "$ac_t""no" 1>&6
11240 fi
11241 done
11242
11243  echo $ac_n "checking for db""... $ac_c" 1>&6
11244 echo "configure:11245: checking for db" >&5
11245 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11246   echo $ac_n "(cached) $ac_c" 1>&6
11247 else
11248   
11249         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11250                 ol_cv_gdbm=no
11251         else
11252                 ol_cv_gdbm=yes
11253         fi
11254
11255 fi
11256
11257 echo "$ac_t""$ol_cv_gdbm" 1>&6
11258  if test $ol_cv_gdbm = yes ; then
11259         cat >> confdefs.h <<\EOF
11260 #define HAVE_GDBM 1
11261 EOF
11262
11263  fi
11264
11265
11266         if test $ol_cv_gdbm = yes ; then
11267                 ol_link_ldbm=gdbm
11268                 ol_with_ldbm_api=gdbm
11269
11270                 if test $ol_cv_lib_gdbm != yes ; then
11271                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11272                 fi
11273         fi
11274 fi
11275
11276 if test $ol_with_ldbm_api = auto ; then
11277         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11278 elif test $ol_with_ldbm_api = ndbm ; then
11279         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11280 echo "configure:11281: checking for NDBM library" >&5
11281 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11282   echo $ac_n "(cached) $ac_c" 1>&6
11283 else
11284         ol_LIBS="$LIBS"
11285         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11286 echo "configure:11287: checking for dbm_open" >&5
11287 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11288   echo $ac_n "(cached) $ac_c" 1>&6
11289 else
11290   cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 /* System header to define __stub macros and hopefully few prototypes,
11294     which can conflict with char dbm_open(); below.  */
11295 #include <assert.h>
11296 /* Override any gcc2 internal prototype to avoid an error.  */
11297 /* We use char because int might match the return type of a gcc2
11298     builtin and then its argument prototype would still apply.  */
11299 char dbm_open();
11300 char (*f)();
11301
11302 int main() {
11303
11304 /* The GNU C library defines this for functions which it implements
11305     to always fail with ENOSYS.  Some functions are actually named
11306     something starting with __ and the normal name is an alias.  */
11307 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11308 choke me
11309 #else
11310 f = dbm_open;
11311 #endif
11312
11313 ; return 0; }
11314 EOF
11315 if { (eval echo configure:11316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11316   rm -rf conftest*
11317   eval "ac_cv_func_dbm_open=yes"
11318 else
11319   echo "configure: failed program was:" >&5
11320   cat conftest.$ac_ext >&5
11321   rm -rf conftest*
11322   eval "ac_cv_func_dbm_open=no"
11323 fi
11324 rm -f conftest*
11325 fi
11326
11327 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11328   echo "$ac_t""yes" 1>&6
11329   ol_cv_lib_ndbm=yes
11330 else
11331   echo "$ac_t""no" 1>&6
11332
11333                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11334 echo "configure:11335: checking for dbm_open in -lndbm" >&5
11335 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11336 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11337   echo $ac_n "(cached) $ac_c" 1>&6
11338 else
11339   ac_save_LIBS="$LIBS"
11340 LIBS="-lndbm  $LIBS"
11341 cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344 /* Override any gcc2 internal prototype to avoid an error.  */
11345 /* We use char because int might match the return type of a gcc2
11346     builtin and then its argument prototype would still apply.  */
11347 char dbm_open();
11348
11349 int main() {
11350 dbm_open()
11351 ; return 0; }
11352 EOF
11353 if { (eval echo configure:11354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11354   rm -rf conftest*
11355   eval "ac_cv_lib_$ac_lib_var=yes"
11356 else
11357   echo "configure: failed program was:" >&5
11358   cat conftest.$ac_ext >&5
11359   rm -rf conftest*
11360   eval "ac_cv_lib_$ac_lib_var=no"
11361 fi
11362 rm -f conftest*
11363 LIBS="$ac_save_LIBS"
11364
11365 fi
11366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11367   echo "$ac_t""yes" 1>&6
11368   ol_cv_lib_ndbm=-lndbm
11369 else
11370   echo "$ac_t""no" 1>&6
11371
11372                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11373 echo "configure:11374: checking for dbm_open in -ldbm" >&5
11374 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11376   echo $ac_n "(cached) $ac_c" 1>&6
11377 else
11378   ac_save_LIBS="$LIBS"
11379 LIBS="-ldbm  $LIBS"
11380 cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383 /* Override any gcc2 internal prototype to avoid an error.  */
11384 /* We use char because int might match the return type of a gcc2
11385     builtin and then its argument prototype would still apply.  */
11386 char dbm_open();
11387
11388 int main() {
11389 dbm_open()
11390 ; return 0; }
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11393   rm -rf conftest*
11394   eval "ac_cv_lib_$ac_lib_var=yes"
11395 else
11396   echo "configure: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   rm -rf conftest*
11399   eval "ac_cv_lib_$ac_lib_var=no"
11400 fi
11401 rm -f conftest*
11402 LIBS="$ac_save_LIBS"
11403
11404 fi
11405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11406   echo "$ac_t""yes" 1>&6
11407   ol_cv_lib_ndbm=-ldbm
11408 else
11409   echo "$ac_t""no" 1>&6
11410 ol_cv_lib_ndbm=no
11411 fi
11412                 
11413 fi
11414
11415         
11416 fi
11417
11418         LIBS="$ol_LIBS"
11419
11420 fi
11421
11422 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11423
11424
11425  for ac_hdr in ndbm.h
11426 do
11427 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11428 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11429 echo "configure:11430: checking for $ac_hdr" >&5
11430 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   cat > conftest.$ac_ext <<EOF
11434 #line 11435 "configure"
11435 #include "confdefs.h"
11436 #include <$ac_hdr>
11437 EOF
11438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11439 { (eval echo configure:11440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11441 if test -z "$ac_err"; then
11442   rm -rf conftest*
11443   eval "ac_cv_header_$ac_safe=yes"
11444 else
11445   echo "$ac_err" >&5
11446   echo "configure: failed program was:" >&5
11447   cat conftest.$ac_ext >&5
11448   rm -rf conftest*
11449   eval "ac_cv_header_$ac_safe=no"
11450 fi
11451 rm -f conftest*
11452 fi
11453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11454   echo "$ac_t""yes" 1>&6
11455     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11456   cat >> confdefs.h <<EOF
11457 #define $ac_tr_hdr 1
11458 EOF
11459  
11460 else
11461   echo "$ac_t""no" 1>&6
11462 fi
11463 done
11464
11465  echo $ac_n "checking for db""... $ac_c" 1>&6
11466 echo "configure:11467: checking for db" >&5
11467 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11468   echo $ac_n "(cached) $ac_c" 1>&6
11469 else
11470   
11471         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11472                 ol_cv_ndbm=no
11473         else
11474                 ol_cv_ndbm=yes
11475         fi
11476
11477 fi
11478
11479 echo "$ac_t""$ol_cv_ndbm" 1>&6
11480  if test $ol_cv_ndbm = yes ; then
11481         cat >> confdefs.h <<\EOF
11482 #define HAVE_NDBM 1
11483 EOF
11484
11485  fi
11486
11487
11488         if test $ol_cv_ndbm = yes ; then
11489                 ol_link_ldbm=ndbm
11490                 ol_with_ldbm_api=ndbm
11491
11492                 if test $ol_cv_lib_ndbm != yes ; then
11493                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11494                 fi
11495         fi
11496 fi
11497
11498 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11499         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11500         if test $ol_enable_ldbm = yes ; then
11501                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11502         fi
11503
11504         echo "configure: warning: disabling LDBM" 1>&2
11505         ol_enable_ldbm=no
11506 fi
11507
11508 if test $ol_enable_wrappers != no ; then
11509         for ac_hdr in tcpd.h
11510 do
11511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11513 echo "configure:11514: checking for $ac_hdr" >&5
11514 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11515   echo $ac_n "(cached) $ac_c" 1>&6
11516 else
11517   cat > conftest.$ac_ext <<EOF
11518 #line 11519 "configure"
11519 #include "confdefs.h"
11520 #include <$ac_hdr>
11521 EOF
11522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11523 { (eval echo configure:11524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11525 if test -z "$ac_err"; then
11526   rm -rf conftest*
11527   eval "ac_cv_header_$ac_safe=yes"
11528 else
11529   echo "$ac_err" >&5
11530   echo "configure: failed program was:" >&5
11531   cat conftest.$ac_ext >&5
11532   rm -rf conftest*
11533   eval "ac_cv_header_$ac_safe=no"
11534 fi
11535 rm -f conftest*
11536 fi
11537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11538   echo "$ac_t""yes" 1>&6
11539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11540   cat >> confdefs.h <<EOF
11541 #define $ac_tr_hdr 1
11542 EOF
11543  
11544 else
11545   echo "$ac_t""no" 1>&6
11546 fi
11547 done
11548
11549
11550         if test $ac_cv_header_tcpd_h != yes ; then
11551                 have_wrappers=no
11552         else
11553                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11554 echo "configure:11555: checking for main in -lwrap" >&5
11555 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11557   echo $ac_n "(cached) $ac_c" 1>&6
11558 else
11559   ac_save_LIBS="$LIBS"
11560 LIBS="-lwrap  $LIBS"
11561 cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564
11565 int main() {
11566 main()
11567 ; return 0; }
11568 EOF
11569 if { (eval echo configure:11570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11570   rm -rf conftest*
11571   eval "ac_cv_lib_$ac_lib_var=yes"
11572 else
11573   echo "configure: failed program was:" >&5
11574   cat conftest.$ac_ext >&5
11575   rm -rf conftest*
11576   eval "ac_cv_lib_$ac_lib_var=no"
11577 fi
11578 rm -f conftest*
11579 LIBS="$ac_save_LIBS"
11580
11581 fi
11582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11583   echo "$ac_t""yes" 1>&6
11584   have_wrappers=yes
11585 else
11586   echo "$ac_t""no" 1>&6
11587 have_wrappers=no
11588 fi
11589
11590         fi
11591
11592         if test $have_wrappers = yes ; then
11593                 cat >> confdefs.h <<\EOF
11594 #define HAVE_TCPD 1
11595 EOF
11596
11597                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11598
11599                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11600 echo "configure:11601: checking for main in -lnsl" >&5
11601 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11602 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   ac_save_LIBS="$LIBS"
11606 LIBS="-lnsl  $LIBS"
11607 cat > conftest.$ac_ext <<EOF
11608 #line 11609 "configure"
11609 #include "confdefs.h"
11610
11611 int main() {
11612 main()
11613 ; return 0; }
11614 EOF
11615 if { (eval echo configure:11616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11616   rm -rf conftest*
11617   eval "ac_cv_lib_$ac_lib_var=yes"
11618 else
11619   echo "configure: failed program was:" >&5
11620   cat conftest.$ac_ext >&5
11621   rm -rf conftest*
11622   eval "ac_cv_lib_$ac_lib_var=no"
11623 fi
11624 rm -f conftest*
11625 LIBS="$ac_save_LIBS"
11626
11627 fi
11628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11629   echo "$ac_t""yes" 1>&6
11630     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11631     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11632   cat >> confdefs.h <<EOF
11633 #define $ac_tr_lib 1
11634 EOF
11635
11636   LIBS="-lnsl $LIBS"
11637
11638 else
11639   echo "$ac_t""no" 1>&6
11640 fi
11641
11642         else
11643                 echo "configure: warning: could not find -lwrap" 1>&2
11644                 if test $ol_enable_wrappers = yes ; then
11645                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11646                 fi
11647
11648                 echo "configure: warning: disabling wrappers support" 1>&2
11649                 ol_enable_wrappers=no
11650         fi
11651 fi
11652
11653 if test $ol_enable_syslog != no ; then
11654         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11655 echo "configure:11656: checking for openlog" >&5
11656 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11657   echo $ac_n "(cached) $ac_c" 1>&6
11658 else
11659   cat > conftest.$ac_ext <<EOF
11660 #line 11661 "configure"
11661 #include "confdefs.h"
11662 /* System header to define __stub macros and hopefully few prototypes,
11663     which can conflict with char openlog(); below.  */
11664 #include <assert.h>
11665 /* Override any gcc2 internal prototype to avoid an error.  */
11666 /* We use char because int might match the return type of a gcc2
11667     builtin and then its argument prototype would still apply.  */
11668 char openlog();
11669 char (*f)();
11670
11671 int main() {
11672
11673 /* The GNU C library defines this for functions which it implements
11674     to always fail with ENOSYS.  Some functions are actually named
11675     something starting with __ and the normal name is an alias.  */
11676 #if defined (__stub_openlog) || defined (__stub___openlog)
11677 choke me
11678 #else
11679 f = openlog;
11680 #endif
11681
11682 ; return 0; }
11683 EOF
11684 if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11685   rm -rf conftest*
11686   eval "ac_cv_func_openlog=yes"
11687 else
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   eval "ac_cv_func_openlog=no"
11692 fi
11693 rm -f conftest*
11694 fi
11695
11696 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11697   echo "$ac_t""yes" 1>&6
11698   :
11699 else
11700   echo "$ac_t""no" 1>&6
11701 fi
11702
11703         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11704                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11705         fi
11706         ol_enable_syslog=$ac_cv_func_openlog
11707 fi
11708
11709 if test $ol_enable_dmalloc != no ; then
11710         for ac_hdr in dmalloc.h
11711 do
11712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11714 echo "configure:11715: checking for $ac_hdr" >&5
11715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11716   echo $ac_n "(cached) $ac_c" 1>&6
11717 else
11718   cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11721 #include <$ac_hdr>
11722 EOF
11723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11724 { (eval echo configure:11725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11726 if test -z "$ac_err"; then
11727   rm -rf conftest*
11728   eval "ac_cv_header_$ac_safe=yes"
11729 else
11730   echo "$ac_err" >&5
11731   echo "configure: failed program was:" >&5
11732   cat conftest.$ac_ext >&5
11733   rm -rf conftest*
11734   eval "ac_cv_header_$ac_safe=no"
11735 fi
11736 rm -f conftest*
11737 fi
11738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11739   echo "$ac_t""yes" 1>&6
11740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11741   cat >> confdefs.h <<EOF
11742 #define $ac_tr_hdr 1
11743 EOF
11744  
11745 else
11746   echo "$ac_t""no" 1>&6
11747 fi
11748 done
11749
11750         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11751 echo "configure:11752: checking for dmalloc_shutdown in -ldmalloc" >&5
11752 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11753 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11754   echo $ac_n "(cached) $ac_c" 1>&6
11755 else
11756   ac_save_LIBS="$LIBS"
11757 LIBS="-ldmalloc  $LIBS"
11758 cat > conftest.$ac_ext <<EOF
11759 #line 11760 "configure"
11760 #include "confdefs.h"
11761 /* Override any gcc2 internal prototype to avoid an error.  */
11762 /* We use char because int might match the return type of a gcc2
11763     builtin and then its argument prototype would still apply.  */
11764 char dmalloc_shutdown();
11765
11766 int main() {
11767 dmalloc_shutdown()
11768 ; return 0; }
11769 EOF
11770 if { (eval echo configure:11771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11771   rm -rf conftest*
11772   eval "ac_cv_lib_$ac_lib_var=yes"
11773 else
11774   echo "configure: failed program was:" >&5
11775   cat conftest.$ac_ext >&5
11776   rm -rf conftest*
11777   eval "ac_cv_lib_$ac_lib_var=no"
11778 fi
11779 rm -f conftest*
11780 LIBS="$ac_save_LIBS"
11781
11782 fi
11783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11784   echo "$ac_t""yes" 1>&6
11785     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11786     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11787   cat >> confdefs.h <<EOF
11788 #define $ac_tr_lib 1
11789 EOF
11790
11791   LIBS="-ldmalloc $LIBS"
11792
11793 else
11794   echo "$ac_t""no" 1>&6
11795 fi
11796
11797 fi
11798
11799 if test $ol_enable_tcl != no ; then
11800         for ac_hdr in tcl.h
11801 do
11802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11804 echo "configure:11805: checking for $ac_hdr" >&5
11805 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   cat > conftest.$ac_ext <<EOF
11809 #line 11810 "configure"
11810 #include "confdefs.h"
11811 #include <$ac_hdr>
11812 EOF
11813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11814 { (eval echo configure:11815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11816 if test -z "$ac_err"; then
11817   rm -rf conftest*
11818   eval "ac_cv_header_$ac_safe=yes"
11819 else
11820   echo "$ac_err" >&5
11821   echo "configure: failed program was:" >&5
11822   cat conftest.$ac_ext >&5
11823   rm -rf conftest*
11824   eval "ac_cv_header_$ac_safe=no"
11825 fi
11826 rm -f conftest*
11827 fi
11828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11829   echo "$ac_t""yes" 1>&6
11830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11831   cat >> confdefs.h <<EOF
11832 #define $ac_tr_hdr 1
11833 EOF
11834  
11835 else
11836   echo "$ac_t""no" 1>&6
11837 fi
11838 done
11839
11840
11841         if test $ac_cv_header_tcl_h != yes ; then
11842                 have_tcl=no
11843         else
11844                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11845 echo "configure:11846: checking for main in -ltcl" >&5
11846 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11848   echo $ac_n "(cached) $ac_c" 1>&6
11849 else
11850   ac_save_LIBS="$LIBS"
11851 LIBS="-ltcl  $LIBS"
11852 cat > conftest.$ac_ext <<EOF
11853 #line 11854 "configure"
11854 #include "confdefs.h"
11855
11856 int main() {
11857 main()
11858 ; return 0; }
11859 EOF
11860 if { (eval echo configure:11861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11861   rm -rf conftest*
11862   eval "ac_cv_lib_$ac_lib_var=yes"
11863 else
11864   echo "configure: failed program was:" >&5
11865   cat conftest.$ac_ext >&5
11866   rm -rf conftest*
11867   eval "ac_cv_lib_$ac_lib_var=no"
11868 fi
11869 rm -f conftest*
11870 LIBS="$ac_save_LIBS"
11871
11872 fi
11873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11874   echo "$ac_t""yes" 1>&6
11875   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11876 else
11877   echo "$ac_t""no" 1>&6
11878 have_tcl=no
11879 fi
11880
11881
11882                 if test $have_tcl != yes; then
11883                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11884 echo "configure:11885: checking for main in -ltcl7.6" >&5
11885 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11887   echo $ac_n "(cached) $ac_c" 1>&6
11888 else
11889   ac_save_LIBS="$LIBS"
11890 LIBS="-ltcl7.6  $LIBS"
11891 cat > conftest.$ac_ext <<EOF
11892 #line 11893 "configure"
11893 #include "confdefs.h"
11894
11895 int main() {
11896 main()
11897 ; return 0; }
11898 EOF
11899 if { (eval echo configure:11900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11900   rm -rf conftest*
11901   eval "ac_cv_lib_$ac_lib_var=yes"
11902 else
11903   echo "configure: failed program was:" >&5
11904   cat conftest.$ac_ext >&5
11905   rm -rf conftest*
11906   eval "ac_cv_lib_$ac_lib_var=no"
11907 fi
11908 rm -f conftest*
11909 LIBS="$ac_save_LIBS"
11910
11911 fi
11912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11913   echo "$ac_t""yes" 1>&6
11914   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11915 else
11916   echo "$ac_t""no" 1>&6
11917 have_tcl=no
11918 fi
11919
11920                 fi
11921
11922                 if test $have_tcl != yes; then
11923                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11924 echo "configure:11925: checking for main in -ltcl8.0" >&5
11925 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11926 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11927   echo $ac_n "(cached) $ac_c" 1>&6
11928 else
11929   ac_save_LIBS="$LIBS"
11930 LIBS="-ltcl8.0  $LIBS"
11931 cat > conftest.$ac_ext <<EOF
11932 #line 11933 "configure"
11933 #include "confdefs.h"
11934
11935 int main() {
11936 main()
11937 ; return 0; }
11938 EOF
11939 if { (eval echo configure:11940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11940   rm -rf conftest*
11941   eval "ac_cv_lib_$ac_lib_var=yes"
11942 else
11943   echo "configure: failed program was:" >&5
11944   cat conftest.$ac_ext >&5
11945   rm -rf conftest*
11946   eval "ac_cv_lib_$ac_lib_var=no"
11947 fi
11948 rm -f conftest*
11949 LIBS="$ac_save_LIBS"
11950
11951 fi
11952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11953   echo "$ac_t""yes" 1>&6
11954   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11955 else
11956   echo "$ac_t""no" 1>&6
11957 have_tcl=no
11958 fi
11959
11960                 fi
11961         fi
11962
11963         if test $have_tcl != yes ; then
11964                 echo "configure: warning: could not find -ltcl" 1>&2
11965                 if test $ol_enable_tcl = yes ; then
11966                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11967                 fi
11968
11969                 ol_enable_tcl=no
11970         fi
11971 fi
11972
11973 # ud needs termcap (should insert check here)
11974 ol_link_termcap=no
11975 for ac_hdr in termcap.h ncurses.h
11976 do
11977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11979 echo "configure:11980: checking for $ac_hdr" >&5
11980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11981   echo $ac_n "(cached) $ac_c" 1>&6
11982 else
11983   cat > conftest.$ac_ext <<EOF
11984 #line 11985 "configure"
11985 #include "confdefs.h"
11986 #include <$ac_hdr>
11987 EOF
11988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11989 { (eval echo configure:11990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11991 if test -z "$ac_err"; then
11992   rm -rf conftest*
11993   eval "ac_cv_header_$ac_safe=yes"
11994 else
11995   echo "$ac_err" >&5
11996   echo "configure: failed program was:" >&5
11997   cat conftest.$ac_ext >&5
11998   rm -rf conftest*
11999   eval "ac_cv_header_$ac_safe=no"
12000 fi
12001 rm -f conftest*
12002 fi
12003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12004   echo "$ac_t""yes" 1>&6
12005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12006   cat >> confdefs.h <<EOF
12007 #define $ac_tr_hdr 1
12008 EOF
12009  
12010 else
12011   echo "$ac_t""no" 1>&6
12012 fi
12013 done
12014
12015
12016 if test $ol_link_termcap = no ; then
12017         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12018 echo "configure:12019: checking for tputs in -ltermcap" >&5
12019 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12020 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12021   echo $ac_n "(cached) $ac_c" 1>&6
12022 else
12023   ac_save_LIBS="$LIBS"
12024 LIBS="-ltermcap  $LIBS"
12025 cat > conftest.$ac_ext <<EOF
12026 #line 12027 "configure"
12027 #include "confdefs.h"
12028 /* Override any gcc2 internal prototype to avoid an error.  */
12029 /* We use char because int might match the return type of a gcc2
12030     builtin and then its argument prototype would still apply.  */
12031 char tputs();
12032
12033 int main() {
12034 tputs()
12035 ; return 0; }
12036 EOF
12037 if { (eval echo configure:12038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12038   rm -rf conftest*
12039   eval "ac_cv_lib_$ac_lib_var=yes"
12040 else
12041   echo "configure: failed program was:" >&5
12042   cat conftest.$ac_ext >&5
12043   rm -rf conftest*
12044   eval "ac_cv_lib_$ac_lib_var=no"
12045 fi
12046 rm -f conftest*
12047 LIBS="$ac_save_LIBS"
12048
12049 fi
12050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12051   echo "$ac_t""yes" 1>&6
12052   have_termcap=yes
12053 else
12054   echo "$ac_t""no" 1>&6
12055 have_termcap=no
12056 fi
12057
12058         if test $have_termcap = yes ; then
12059                 cat >> confdefs.h <<\EOF
12060 #define HAVE_TERMCAP 1
12061 EOF
12062
12063                 ol_link_termcap=yes
12064                 TERMCAP_LIBS=-ltermcap
12065         fi
12066 fi
12067
12068 if test $ol_link_termcap = no ; then
12069         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12070 echo "configure:12071: checking for initscr in -lncurses" >&5
12071 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12073   echo $ac_n "(cached) $ac_c" 1>&6
12074 else
12075   ac_save_LIBS="$LIBS"
12076 LIBS="-lncurses  $LIBS"
12077 cat > conftest.$ac_ext <<EOF
12078 #line 12079 "configure"
12079 #include "confdefs.h"
12080 /* Override any gcc2 internal prototype to avoid an error.  */
12081 /* We use char because int might match the return type of a gcc2
12082     builtin and then its argument prototype would still apply.  */
12083 char initscr();
12084
12085 int main() {
12086 initscr()
12087 ; return 0; }
12088 EOF
12089 if { (eval echo configure:12090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12090   rm -rf conftest*
12091   eval "ac_cv_lib_$ac_lib_var=yes"
12092 else
12093   echo "configure: failed program was:" >&5
12094   cat conftest.$ac_ext >&5
12095   rm -rf conftest*
12096   eval "ac_cv_lib_$ac_lib_var=no"
12097 fi
12098 rm -f conftest*
12099 LIBS="$ac_save_LIBS"
12100
12101 fi
12102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12103   echo "$ac_t""yes" 1>&6
12104   have_ncurses=yes
12105 else
12106   echo "$ac_t""no" 1>&6
12107 have_ncurses=no
12108 fi
12109
12110         if test $have_ncurses = yes ; then
12111                 cat >> confdefs.h <<\EOF
12112 #define HAVE_NCURSES 1
12113 EOF
12114
12115                 ol_link_termcap=yes
12116                 TERMCAP_LIBS=-lncurses
12117         fi
12118 fi
12119
12120 if test $ol_link_termcap = no ; then
12121         cat >> confdefs.h <<\EOF
12122 #define NO_TERMCAP 1
12123 EOF
12124
12125         TERMCAP_LIBS=
12126 fi
12127
12128 ol_link_sasl=no
12129 if test $ol_with_cyrus_sasl != no ; then
12130         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12131 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12132 echo "configure:12133: checking for sasl.h" >&5
12133 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12134   echo $ac_n "(cached) $ac_c" 1>&6
12135 else
12136   cat > conftest.$ac_ext <<EOF
12137 #line 12138 "configure"
12138 #include "confdefs.h"
12139 #include <sasl.h>
12140 EOF
12141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12142 { (eval echo configure:12143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12144 if test -z "$ac_err"; then
12145   rm -rf conftest*
12146   eval "ac_cv_header_$ac_safe=yes"
12147 else
12148   echo "$ac_err" >&5
12149   echo "configure: failed program was:" >&5
12150   cat conftest.$ac_ext >&5
12151   rm -rf conftest*
12152   eval "ac_cv_header_$ac_safe=no"
12153 fi
12154 rm -f conftest*
12155 fi
12156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12157   echo "$ac_t""yes" 1>&6
12158   :
12159 else
12160   echo "$ac_t""no" 1>&6
12161 fi
12162
12163
12164         if test $ac_cv_header_sasl_h = yes ; then
12165                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12166 echo "configure:12167: checking for sasl_client_init in -lsasl" >&5
12167 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12168 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12169   echo $ac_n "(cached) $ac_c" 1>&6
12170 else
12171   ac_save_LIBS="$LIBS"
12172 LIBS="-lsasl  $LIBS"
12173 cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176 /* Override any gcc2 internal prototype to avoid an error.  */
12177 /* We use char because int might match the return type of a gcc2
12178     builtin and then its argument prototype would still apply.  */
12179 char sasl_client_init();
12180
12181 int main() {
12182 sasl_client_init()
12183 ; return 0; }
12184 EOF
12185 if { (eval echo configure:12186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12186   rm -rf conftest*
12187   eval "ac_cv_lib_$ac_lib_var=yes"
12188 else
12189   echo "configure: failed program was:" >&5
12190   cat conftest.$ac_ext >&5
12191   rm -rf conftest*
12192   eval "ac_cv_lib_$ac_lib_var=no"
12193 fi
12194 rm -f conftest*
12195 LIBS="$ac_save_LIBS"
12196
12197 fi
12198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12199   echo "$ac_t""yes" 1>&6
12200   have_cyrus_sasl=yes
12201 else
12202   echo "$ac_t""no" 1>&6
12203 have_cyrus_sasl=no
12204 fi
12205
12206
12207                 if test $have_cyrus_sasl != no ; then
12208                         SASL_LIBS="-lsasl"
12209                         cat >> confdefs.h <<\EOF
12210 #define HAVE_CYRUS_SASL 1
12211 EOF
12212
12213                         ol_link_sasl=yes
12214                 fi
12215         fi
12216
12217         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12218                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12219         fi
12220 fi
12221
12222 ol_link_fetch=no
12223 if test $ol_with_fetch != no ; then
12224         ol=$LIBS
12225 LIBS="-lfetch -lcom_err $LIBS"
12226 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12227 echo "configure:12228: checking fetch(3) library" >&5
12228 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12229   echo $ac_n "(cached) $ac_c" 1>&6
12230 else
12231   
12232         cat > conftest.$ac_ext <<EOF
12233 #line 12234 "configure"
12234 #include "confdefs.h"
12235
12236 #include <sys/param.h>
12237 #include <stdio.h>
12238 #include <fetch.h>
12239 int main() {
12240 struct url *u = fetchParseURL("file:///"); 
12241 ; return 0; }
12242 EOF
12243 if { (eval echo configure:12244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12244   rm -rf conftest*
12245   ol_cv_lib_fetch=yes
12246 else
12247   echo "configure: failed program was:" >&5
12248   cat conftest.$ac_ext >&5
12249   rm -rf conftest*
12250   ol_cv_lib_fetch=no
12251 fi
12252 rm -f conftest*
12253 fi
12254
12255 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12256 LIBS=$ol_LIBS
12257 if test $ol_cv_lib_fetch != no ; then
12258         ol_link_fetch="-lfetch -lcom_err"
12259         cat >> confdefs.h <<\EOF
12260 #define HAVE_FETCH 1
12261 EOF
12262
12263 fi
12264
12265
12266         if test $ol_cv_lib_fetch != no ; then
12267                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12268                 ol_link_fetch=freebsd
12269
12270         elif test $ol_with_fetch != auto ; then
12271                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12272         fi 
12273 fi
12274
12275 ol_link_readline=no
12276 if test $ol_with_readline != no ; then
12277         for ac_hdr in readline/readline.h readline/history.h
12278 do
12279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12281 echo "configure:12282: checking for $ac_hdr" >&5
12282 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12283   echo $ac_n "(cached) $ac_c" 1>&6
12284 else
12285   cat > conftest.$ac_ext <<EOF
12286 #line 12287 "configure"
12287 #include "confdefs.h"
12288 #include <$ac_hdr>
12289 EOF
12290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12291 { (eval echo configure:12292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12293 if test -z "$ac_err"; then
12294   rm -rf conftest*
12295   eval "ac_cv_header_$ac_safe=yes"
12296 else
12297   echo "$ac_err" >&5
12298   echo "configure: failed program was:" >&5
12299   cat conftest.$ac_ext >&5
12300   rm -rf conftest*
12301   eval "ac_cv_header_$ac_safe=no"
12302 fi
12303 rm -f conftest*
12304 fi
12305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12306   echo "$ac_t""yes" 1>&6
12307     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12308   cat >> confdefs.h <<EOF
12309 #define $ac_tr_hdr 1
12310 EOF
12311  
12312 else
12313   echo "$ac_t""no" 1>&6
12314 fi
12315 done
12316
12317
12318         if test $ac_cv_header_readline_readline_h = yes ; then
12319                 save_LIBS="$LIBS"
12320                 LIBS="$TERMCAP_LIBS $LIBS"
12321                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12322 echo "configure:12323: checking for readline in -lreadline" >&5
12323 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12324 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12325   echo $ac_n "(cached) $ac_c" 1>&6
12326 else
12327   ac_save_LIBS="$LIBS"
12328 LIBS="-lreadline  $LIBS"
12329 cat > conftest.$ac_ext <<EOF
12330 #line 12331 "configure"
12331 #include "confdefs.h"
12332 /* Override any gcc2 internal prototype to avoid an error.  */
12333 /* We use char because int might match the return type of a gcc2
12334     builtin and then its argument prototype would still apply.  */
12335 char readline();
12336
12337 int main() {
12338 readline()
12339 ; return 0; }
12340 EOF
12341 if { (eval echo configure:12342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12342   rm -rf conftest*
12343   eval "ac_cv_lib_$ac_lib_var=yes"
12344 else
12345   echo "configure: failed program was:" >&5
12346   cat conftest.$ac_ext >&5
12347   rm -rf conftest*
12348   eval "ac_cv_lib_$ac_lib_var=no"
12349 fi
12350 rm -f conftest*
12351 LIBS="$ac_save_LIBS"
12352
12353 fi
12354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12355   echo "$ac_t""yes" 1>&6
12356   have_readline=yes
12357 else
12358   echo "$ac_t""no" 1>&6
12359 have_readline=no
12360 fi
12361
12362                 LIBS="$save_LIBS"
12363                         
12364                 if test $have_readline = yes ; then
12365                         ol_with_readline=found
12366                         ol_link_readline=yes
12367
12368                         READLINE_LIBS="-lreadline"
12369                 fi
12370         fi
12371 fi
12372
12373 if test $ol_link_readline = yes ; then
12374         cat >> confdefs.h <<\EOF
12375 #define HAVE_READLINE 1
12376 EOF
12377
12378 fi
12379
12380
12381 # FreeBSD (and others) have crypt(3) in -lcrypt
12382 if test $ol_enable_crypt != no ; then
12383         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12384 echo "configure:12385: checking for crypt" >&5
12385 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12386   echo $ac_n "(cached) $ac_c" 1>&6
12387 else
12388   cat > conftest.$ac_ext <<EOF
12389 #line 12390 "configure"
12390 #include "confdefs.h"
12391 /* System header to define __stub macros and hopefully few prototypes,
12392     which can conflict with char crypt(); below.  */
12393 #include <assert.h>
12394 /* Override any gcc2 internal prototype to avoid an error.  */
12395 /* We use char because int might match the return type of a gcc2
12396     builtin and then its argument prototype would still apply.  */
12397 char crypt();
12398 char (*f)();
12399
12400 int main() {
12401
12402 /* The GNU C library defines this for functions which it implements
12403     to always fail with ENOSYS.  Some functions are actually named
12404     something starting with __ and the normal name is an alias.  */
12405 #if defined (__stub_crypt) || defined (__stub___crypt)
12406 choke me
12407 #else
12408 f = crypt;
12409 #endif
12410
12411 ; return 0; }
12412 EOF
12413 if { (eval echo configure:12414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12414   rm -rf conftest*
12415   eval "ac_cv_func_crypt=yes"
12416 else
12417   echo "configure: failed program was:" >&5
12418   cat conftest.$ac_ext >&5
12419   rm -rf conftest*
12420   eval "ac_cv_func_crypt=no"
12421 fi
12422 rm -f conftest*
12423 fi
12424
12425 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12426   echo "$ac_t""yes" 1>&6
12427   have_crypt=yes
12428 else
12429   echo "$ac_t""no" 1>&6
12430
12431                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12432 echo "configure:12433: checking for crypt in -lcrypt" >&5
12433 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12434 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12435   echo $ac_n "(cached) $ac_c" 1>&6
12436 else
12437   ac_save_LIBS="$LIBS"
12438 LIBS="-lcrypt  $LIBS"
12439 cat > conftest.$ac_ext <<EOF
12440 #line 12441 "configure"
12441 #include "confdefs.h"
12442 /* Override any gcc2 internal prototype to avoid an error.  */
12443 /* We use char because int might match the return type of a gcc2
12444     builtin and then its argument prototype would still apply.  */
12445 char crypt();
12446
12447 int main() {
12448 crypt()
12449 ; return 0; }
12450 EOF
12451 if { (eval echo configure:12452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12452   rm -rf conftest*
12453   eval "ac_cv_lib_$ac_lib_var=yes"
12454 else
12455   echo "configure: failed program was:" >&5
12456   cat conftest.$ac_ext >&5
12457   rm -rf conftest*
12458   eval "ac_cv_lib_$ac_lib_var=no"
12459 fi
12460 rm -f conftest*
12461 LIBS="$ac_save_LIBS"
12462
12463 fi
12464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12465   echo "$ac_t""yes" 1>&6
12466   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12467                         have_crypt=yes
12468 else
12469   echo "$ac_t""no" 1>&6
12470 have_crypt=no
12471 fi
12472
12473 fi
12474
12475
12476         if test $have_crypt = yes ; then
12477                 cat >> confdefs.h <<\EOF
12478 #define HAVE_CRYPT 1
12479 EOF
12480
12481         else
12482                 echo "configure: warning: could not find crypt" 1>&2
12483                 if test $ol_enable_crypt = yes ; then
12484                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12485                 fi
12486
12487                 echo "configure: warning: disabling crypt support" 1>&2
12488                 ol_enable_crypt=no
12489         fi
12490 fi
12491
12492 # FreeBSD (and others) have setproctitle(3) in -lutil
12493 if test $ol_enable_proctitle != no ; then
12494         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12495 echo "configure:12496: checking for setproctitle" >&5
12496 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12497   echo $ac_n "(cached) $ac_c" 1>&6
12498 else
12499   cat > conftest.$ac_ext <<EOF
12500 #line 12501 "configure"
12501 #include "confdefs.h"
12502 /* System header to define __stub macros and hopefully few prototypes,
12503     which can conflict with char setproctitle(); below.  */
12504 #include <assert.h>
12505 /* Override any gcc2 internal prototype to avoid an error.  */
12506 /* We use char because int might match the return type of a gcc2
12507     builtin and then its argument prototype would still apply.  */
12508 char setproctitle();
12509 char (*f)();
12510
12511 int main() {
12512
12513 /* The GNU C library defines this for functions which it implements
12514     to always fail with ENOSYS.  Some functions are actually named
12515     something starting with __ and the normal name is an alias.  */
12516 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12517 choke me
12518 #else
12519 f = setproctitle;
12520 #endif
12521
12522 ; return 0; }
12523 EOF
12524 if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12525   rm -rf conftest*
12526   eval "ac_cv_func_setproctitle=yes"
12527 else
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -rf conftest*
12531   eval "ac_cv_func_setproctitle=no"
12532 fi
12533 rm -f conftest*
12534 fi
12535
12536 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12537   echo "$ac_t""yes" 1>&6
12538   have_setproctitle=yes
12539 else
12540   echo "$ac_t""no" 1>&6
12541
12542                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12543 echo "configure:12544: checking for setproctitle in -lutil" >&5
12544 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12546   echo $ac_n "(cached) $ac_c" 1>&6
12547 else
12548   ac_save_LIBS="$LIBS"
12549 LIBS="-lutil  $LIBS"
12550 cat > conftest.$ac_ext <<EOF
12551 #line 12552 "configure"
12552 #include "confdefs.h"
12553 /* Override any gcc2 internal prototype to avoid an error.  */
12554 /* We use char because int might match the return type of a gcc2
12555     builtin and then its argument prototype would still apply.  */
12556 char setproctitle();
12557
12558 int main() {
12559 setproctitle()
12560 ; return 0; }
12561 EOF
12562 if { (eval echo configure:12563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12563   rm -rf conftest*
12564   eval "ac_cv_lib_$ac_lib_var=yes"
12565 else
12566   echo "configure: failed program was:" >&5
12567   cat conftest.$ac_ext >&5
12568   rm -rf conftest*
12569   eval "ac_cv_lib_$ac_lib_var=no"
12570 fi
12571 rm -f conftest*
12572 LIBS="$ac_save_LIBS"
12573
12574 fi
12575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12576   echo "$ac_t""yes" 1>&6
12577   have_setproctitle=yes
12578                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12579 else
12580   echo "$ac_t""no" 1>&6
12581 have_setproctitle=no
12582                         LIBOBJS="$LIBOBJS setproctitle.o"
12583 fi
12584
12585 fi
12586
12587
12588         if test $have_setproctitle = yes ; then
12589                 cat >> confdefs.h <<\EOF
12590 #define HAVE_SETPROCTITLE 1
12591 EOF
12592
12593         fi
12594 fi
12595
12596 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12597 echo "configure:12598: checking for uid_t in sys/types.h" >&5
12598 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12599   echo $ac_n "(cached) $ac_c" 1>&6
12600 else
12601   cat > conftest.$ac_ext <<EOF
12602 #line 12603 "configure"
12603 #include "confdefs.h"
12604 #include <sys/types.h>
12605 EOF
12606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12607   egrep "uid_t" >/dev/null 2>&1; then
12608   rm -rf conftest*
12609   ac_cv_type_uid_t=yes
12610 else
12611   rm -rf conftest*
12612   ac_cv_type_uid_t=no
12613 fi
12614 rm -f conftest*
12615
12616 fi
12617
12618 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12619 if test $ac_cv_type_uid_t = no; then
12620   cat >> confdefs.h <<\EOF
12621 #define uid_t int
12622 EOF
12623
12624   cat >> confdefs.h <<\EOF
12625 #define gid_t int
12626 EOF
12627
12628 fi
12629
12630 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12631 echo "configure:12632: checking type of array argument to getgroups" >&5
12632 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12633   echo $ac_n "(cached) $ac_c" 1>&6
12634 else
12635   if test "$cross_compiling" = yes; then
12636   ac_cv_type_getgroups=cross
12637 else
12638   cat > conftest.$ac_ext <<EOF
12639 #line 12640 "configure"
12640 #include "confdefs.h"
12641
12642 /* Thanks to Mike Rendell for this test.  */
12643 #include <sys/types.h>
12644 #define NGID 256
12645 #undef MAX
12646 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12647 main()
12648 {
12649   gid_t gidset[NGID];
12650   int i, n;
12651   union { gid_t gval; long lval; }  val;
12652
12653   val.lval = -1;
12654   for (i = 0; i < NGID; i++)
12655     gidset[i] = val.gval;
12656   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12657                  gidset);
12658   /* Exit non-zero if getgroups seems to require an array of ints.  This
12659      happens when gid_t is short but getgroups modifies an array of ints.  */
12660   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12661 }
12662
12663 EOF
12664 if { (eval echo configure:12665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12665 then
12666     ac_cv_type_getgroups=gid_t
12667 else
12668   echo "configure: failed program was:" >&5
12669   cat conftest.$ac_ext >&5
12670   rm -fr conftest*
12671   ac_cv_type_getgroups=int
12672 fi
12673 rm -fr conftest*
12674 fi
12675
12676 if test $ac_cv_type_getgroups = cross; then
12677         cat > conftest.$ac_ext <<EOF
12678 #line 12679 "configure"
12679 #include "confdefs.h"
12680 #include <unistd.h>
12681 EOF
12682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12683   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12684   rm -rf conftest*
12685   ac_cv_type_getgroups=gid_t
12686 else
12687   rm -rf conftest*
12688   ac_cv_type_getgroups=int
12689 fi
12690 rm -f conftest*
12691
12692 fi
12693 fi
12694
12695 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12696 cat >> confdefs.h <<EOF
12697 #define GETGROUPS_T $ac_cv_type_getgroups
12698 EOF
12699
12700  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12701 echo "configure:12702: checking for ANSI C header files" >&5
12702 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12703   echo $ac_n "(cached) $ac_c" 1>&6
12704 else
12705   cat > conftest.$ac_ext <<EOF
12706 #line 12707 "configure"
12707 #include "confdefs.h"
12708 #include <stdlib.h>
12709 #include <stdarg.h>
12710 #include <string.h>
12711 #include <float.h>
12712 EOF
12713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12714 { (eval echo configure:12715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12716 if test -z "$ac_err"; then
12717   rm -rf conftest*
12718   ac_cv_header_stdc=yes
12719 else
12720   echo "$ac_err" >&5
12721   echo "configure: failed program was:" >&5
12722   cat conftest.$ac_ext >&5
12723   rm -rf conftest*
12724   ac_cv_header_stdc=no
12725 fi
12726 rm -f conftest*
12727
12728 if test $ac_cv_header_stdc = yes; then
12729   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12730 cat > conftest.$ac_ext <<EOF
12731 #line 12732 "configure"
12732 #include "confdefs.h"
12733 #include <string.h>
12734 EOF
12735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12736   egrep "memchr" >/dev/null 2>&1; then
12737   :
12738 else
12739   rm -rf conftest*
12740   ac_cv_header_stdc=no
12741 fi
12742 rm -f conftest*
12743
12744 fi
12745
12746 if test $ac_cv_header_stdc = yes; then
12747   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12748 cat > conftest.$ac_ext <<EOF
12749 #line 12750 "configure"
12750 #include "confdefs.h"
12751 #include <stdlib.h>
12752 EOF
12753 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12754   egrep "free" >/dev/null 2>&1; then
12755   :
12756 else
12757   rm -rf conftest*
12758   ac_cv_header_stdc=no
12759 fi
12760 rm -f conftest*
12761
12762 fi
12763
12764 if test $ac_cv_header_stdc = yes; then
12765   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12766 if test "$cross_compiling" = yes; then
12767   :
12768 else
12769   cat > conftest.$ac_ext <<EOF
12770 #line 12771 "configure"
12771 #include "confdefs.h"
12772 #include <ctype.h>
12773 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12774 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12775 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12776 int main () { int i; for (i = 0; i < 256; i++)
12777 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12778 exit (0); }
12779
12780 EOF
12781 if { (eval echo configure:12782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12782 then
12783   :
12784 else
12785   echo "configure: failed program was:" >&5
12786   cat conftest.$ac_ext >&5
12787   rm -fr conftest*
12788   ac_cv_header_stdc=no
12789 fi
12790 rm -fr conftest*
12791 fi
12792
12793 fi
12794 fi
12795
12796 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12797 if test $ac_cv_header_stdc = yes; then
12798   cat >> confdefs.h <<\EOF
12799 #define STDC_HEADERS 1
12800 EOF
12801
12802 fi
12803
12804 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12805 echo "configure:12806: checking for mode_t" >&5
12806 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12807   echo $ac_n "(cached) $ac_c" 1>&6
12808 else
12809   cat > conftest.$ac_ext <<EOF
12810 #line 12811 "configure"
12811 #include "confdefs.h"
12812 #include <sys/types.h>
12813 #if STDC_HEADERS
12814 #include <stdlib.h>
12815 #include <stddef.h>
12816 #endif
12817 EOF
12818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12819   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12820   rm -rf conftest*
12821   eval "ac_cv_type_mode_t=yes"
12822 else
12823   rm -rf conftest*
12824   eval "ac_cv_type_mode_t=no"
12825 fi
12826 rm -f conftest*
12827
12828 fi
12829 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12830   echo "$ac_t""yes" 1>&6
12831 else
12832   echo "$ac_t""no" 1>&6
12833   cat >> confdefs.h <<EOF
12834 #define mode_t int
12835 EOF
12836
12837 fi
12838
12839 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12840 echo "configure:12841: checking for off_t" >&5
12841 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12842   echo $ac_n "(cached) $ac_c" 1>&6
12843 else
12844   cat > conftest.$ac_ext <<EOF
12845 #line 12846 "configure"
12846 #include "confdefs.h"
12847 #include <sys/types.h>
12848 #if STDC_HEADERS
12849 #include <stdlib.h>
12850 #include <stddef.h>
12851 #endif
12852 EOF
12853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12854   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12855   rm -rf conftest*
12856   eval "ac_cv_type_off_t=yes"
12857 else
12858   rm -rf conftest*
12859   eval "ac_cv_type_off_t=no"
12860 fi
12861 rm -f conftest*
12862
12863 fi
12864 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12865   echo "$ac_t""yes" 1>&6
12866 else
12867   echo "$ac_t""no" 1>&6
12868   cat >> confdefs.h <<EOF
12869 #define off_t long
12870 EOF
12871
12872 fi
12873
12874 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12875 echo "configure:12876: checking for pid_t" >&5
12876 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12877   echo $ac_n "(cached) $ac_c" 1>&6
12878 else
12879   cat > conftest.$ac_ext <<EOF
12880 #line 12881 "configure"
12881 #include "confdefs.h"
12882 #include <sys/types.h>
12883 #if STDC_HEADERS
12884 #include <stdlib.h>
12885 #include <stddef.h>
12886 #endif
12887 EOF
12888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12889   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12890   rm -rf conftest*
12891   eval "ac_cv_type_pid_t=yes"
12892 else
12893   rm -rf conftest*
12894   eval "ac_cv_type_pid_t=no"
12895 fi
12896 rm -f conftest*
12897
12898 fi
12899 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12900   echo "$ac_t""yes" 1>&6
12901 else
12902   echo "$ac_t""no" 1>&6
12903   cat >> confdefs.h <<EOF
12904 #define pid_t int
12905 EOF
12906
12907 fi
12908
12909 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12910 echo "configure:12911: checking for ptrdiff_t" >&5
12911 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12912   echo $ac_n "(cached) $ac_c" 1>&6
12913 else
12914   cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 #include <stddef.h>
12918 int main() {
12919 ptrdiff_t p
12920 ; return 0; }
12921 EOF
12922 if { (eval echo configure:12923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12923   rm -rf conftest*
12924   am_cv_type_ptrdiff_t=yes
12925 else
12926   echo "configure: failed program was:" >&5
12927   cat conftest.$ac_ext >&5
12928   rm -rf conftest*
12929   am_cv_type_ptrdiff_t=no
12930 fi
12931 rm -f conftest*
12932 fi
12933
12934 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12935    if test $am_cv_type_ptrdiff_t = yes; then
12936      cat >> confdefs.h <<\EOF
12937 #define HAVE_PTRDIFF_T 1
12938 EOF
12939
12940    fi
12941
12942 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12943 echo "configure:12944: checking return type of signal handlers" >&5
12944 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12945   echo $ac_n "(cached) $ac_c" 1>&6
12946 else
12947   cat > conftest.$ac_ext <<EOF
12948 #line 12949 "configure"
12949 #include "confdefs.h"
12950 #include <sys/types.h>
12951 #include <signal.h>
12952 #ifdef signal
12953 #undef signal
12954 #endif
12955 #ifdef __cplusplus
12956 extern "C" void (*signal (int, void (*)(int)))(int);
12957 #else
12958 void (*signal ()) ();
12959 #endif
12960
12961 int main() {
12962 int i;
12963 ; return 0; }
12964 EOF
12965 if { (eval echo configure:12966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12966   rm -rf conftest*
12967   ac_cv_type_signal=void
12968 else
12969   echo "configure: failed program was:" >&5
12970   cat conftest.$ac_ext >&5
12971   rm -rf conftest*
12972   ac_cv_type_signal=int
12973 fi
12974 rm -f conftest*
12975 fi
12976
12977 echo "$ac_t""$ac_cv_type_signal" 1>&6
12978 cat >> confdefs.h <<EOF
12979 #define RETSIGTYPE $ac_cv_type_signal
12980 EOF
12981
12982
12983 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12984 echo "configure:12985: checking for sig_atomic_t" >&5
12985 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12986   echo $ac_n "(cached) $ac_c" 1>&6
12987 else
12988   cat > conftest.$ac_ext <<EOF
12989 #line 12990 "configure"
12990 #include "confdefs.h"
12991 #include <signal.h>
12992 int main() {
12993 sig_atomic_t atomic;
12994 ; return 0; }
12995 EOF
12996 if { (eval echo configure:12997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12997   rm -rf conftest*
12998   ol_cv_type_sig_atomic_t=yes
12999 else
13000   echo "configure: failed program was:" >&5
13001   cat conftest.$ac_ext >&5
13002   rm -rf conftest*
13003   ol_cv_type_sig_atomic_t=no
13004 fi
13005 rm -f conftest*
13006 fi
13007
13008 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13009   if test $ol_cv_type_sig_atomic_t = no; then
13010     cat >> confdefs.h <<\EOF
13011 #define sig_atomic_t int
13012 EOF
13013
13014   fi
13015  
13016 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13017 echo "configure:13018: checking for size_t" >&5
13018 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13019   echo $ac_n "(cached) $ac_c" 1>&6
13020 else
13021   cat > conftest.$ac_ext <<EOF
13022 #line 13023 "configure"
13023 #include "confdefs.h"
13024 #include <sys/types.h>
13025 #if STDC_HEADERS
13026 #include <stdlib.h>
13027 #include <stddef.h>
13028 #endif
13029 EOF
13030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13031   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13032   rm -rf conftest*
13033   eval "ac_cv_type_size_t=yes"
13034 else
13035   rm -rf conftest*
13036   eval "ac_cv_type_size_t=no"
13037 fi
13038 rm -f conftest*
13039
13040 fi
13041 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13042   echo "$ac_t""yes" 1>&6
13043 else
13044   echo "$ac_t""no" 1>&6
13045   cat >> confdefs.h <<EOF
13046 #define size_t unsigned
13047 EOF
13048
13049 fi
13050
13051 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13052 echo "configure:13053: checking for socklen_t" >&5
13053 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13054   echo $ac_n "(cached) $ac_c" 1>&6
13055 else
13056   cat > conftest.$ac_ext <<EOF
13057 #line 13058 "configure"
13058 #include "confdefs.h"
13059
13060 #ifdef HAVE_SYS_TYPES_H
13061 #include <sys/types.h>
13062 #endif
13063 #ifdef HAVE_SYS_SOCKET_H
13064 #include <sys/socket.h>
13065 #endif
13066
13067 int main() {
13068 socklen_t len;
13069 ; return 0; }
13070 EOF
13071 if { (eval echo configure:13072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13072   rm -rf conftest*
13073   ol_cv_type_socklen_t=yes
13074 else
13075   echo "configure: failed program was:" >&5
13076   cat conftest.$ac_ext >&5
13077   rm -rf conftest*
13078   ol_cv_type_socklen_t=no
13079 fi
13080 rm -f conftest*
13081 fi
13082
13083 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13084   if test $ol_cv_type_socklen_t = no; then
13085     cat >> confdefs.h <<\EOF
13086 #define socklen_t int
13087 EOF
13088
13089   fi
13090  
13091 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13092 echo "configure:13093: checking for member st_blksize in aggregate type struct stat" >&5
13093 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13094   echo $ac_n "(cached) $ac_c" 1>&6
13095 else
13096   cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 #include <sys/types.h>
13100 #include <sys/stat.h>
13101 int main() {
13102 struct stat foo; foo.st_blksize;
13103 ; return 0; }
13104 EOF
13105 if { (eval echo configure:13106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13106   rm -rf conftest*
13107   ac_cv_c_struct_member_st_blksize=yes
13108 else
13109   echo "configure: failed program was:" >&5
13110   cat conftest.$ac_ext >&5
13111   rm -rf conftest*
13112   ac_cv_c_struct_member_st_blksize=no
13113 fi
13114 rm -f conftest*
13115 fi
13116
13117 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13118 st_blksize="$ac_cv_c_struct_member_st_blksize"
13119 if test $ac_cv_c_struct_member_st_blksize = yes; then
13120   cat >> confdefs.h <<\EOF
13121 #define HAVE_ST_BLKSIZE 1
13122 EOF
13123
13124 fi
13125
13126 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13127 echo "configure:13128: checking whether time.h and sys/time.h may both be included" >&5
13128 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13129   echo $ac_n "(cached) $ac_c" 1>&6
13130 else
13131   cat > conftest.$ac_ext <<EOF
13132 #line 13133 "configure"
13133 #include "confdefs.h"
13134 #include <sys/types.h>
13135 #include <sys/time.h>
13136 #include <time.h>
13137 int main() {
13138 struct tm *tp;
13139 ; return 0; }
13140 EOF
13141 if { (eval echo configure:13142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13142   rm -rf conftest*
13143   ac_cv_header_time=yes
13144 else
13145   echo "configure: failed program was:" >&5
13146   cat conftest.$ac_ext >&5
13147   rm -rf conftest*
13148   ac_cv_header_time=no
13149 fi
13150 rm -f conftest*
13151 fi
13152
13153 echo "$ac_t""$ac_cv_header_time" 1>&6
13154 if test $ac_cv_header_time = yes; then
13155   cat >> confdefs.h <<\EOF
13156 #define TIME_WITH_SYS_TIME 1
13157 EOF
13158
13159 fi
13160
13161 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13162 echo "configure:13163: checking whether struct tm is in sys/time.h or time.h" >&5
13163 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13164   echo $ac_n "(cached) $ac_c" 1>&6
13165 else
13166   cat > conftest.$ac_ext <<EOF
13167 #line 13168 "configure"
13168 #include "confdefs.h"
13169 #include <sys/types.h>
13170 #include <time.h>
13171 int main() {
13172 struct tm *tp; tp->tm_sec;
13173 ; return 0; }
13174 EOF
13175 if { (eval echo configure:13176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13176   rm -rf conftest*
13177   ac_cv_struct_tm=time.h
13178 else
13179   echo "configure: failed program was:" >&5
13180   cat conftest.$ac_ext >&5
13181   rm -rf conftest*
13182   ac_cv_struct_tm=sys/time.h
13183 fi
13184 rm -f conftest*
13185 fi
13186
13187 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13188 if test $ac_cv_struct_tm = sys/time.h; then
13189   cat >> confdefs.h <<\EOF
13190 #define TM_IN_SYS_TIME 1
13191 EOF
13192
13193 fi
13194
13195 # test for pw_gecos in struct passwd
13196 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13197 echo "configure:13198: checking struct passwd for pw_gecos" >&5
13198 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13199   echo $ac_n "(cached) $ac_c" 1>&6
13200 else
13201   
13202         cat > conftest.$ac_ext <<EOF
13203 #line 13204 "configure"
13204 #include "confdefs.h"
13205 #include <pwd.h>
13206 int main() {
13207
13208         struct passwd pwd;
13209         pwd.pw_gecos = pwd.pw_name;
13210
13211 ; return 0; }
13212 EOF
13213 if { (eval echo configure:13214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13214   rm -rf conftest*
13215   ol_cv_struct_passwd_pw_gecos=yes
13216 else
13217   echo "configure: failed program was:" >&5
13218   cat conftest.$ac_ext >&5
13219   rm -rf conftest*
13220   ol_cv_struct_passwd_pw_gecos=no
13221 fi
13222 rm -f conftest*
13223 fi
13224
13225 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13226 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13227         cat >> confdefs.h <<\EOF
13228 #define HAVE_PW_GECOS 1
13229 EOF
13230
13231 fi
13232
13233 # test for pw_passwd in struct passwd
13234 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13235 echo "configure:13236: checking struct passwd for pw_passwd" >&5
13236 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13237   echo $ac_n "(cached) $ac_c" 1>&6
13238 else
13239   
13240         cat > conftest.$ac_ext <<EOF
13241 #line 13242 "configure"
13242 #include "confdefs.h"
13243 #include <pwd.h>
13244 int main() {
13245
13246         struct passwd pwd;
13247         pwd.pw_passwd = pwd.pw_name;
13248
13249 ; return 0; }
13250 EOF
13251 if { (eval echo configure:13252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13252   rm -rf conftest*
13253   ol_cv_struct_passwd_pw_passwd=yes
13254 else
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -rf conftest*
13258   ol_cv_struct_passwd_pw_passwd=no
13259 fi
13260 rm -f conftest*
13261 fi
13262
13263 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13264 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13265         cat >> confdefs.h <<\EOF
13266 #define HAVE_PW_PASSWD 1
13267 EOF
13268
13269 fi
13270
13271
13272 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13273 echo "configure:13274: checking if toupper() requires islower()" >&5
13274 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13275   echo $ac_n "(cached) $ac_c" 1>&6
13276 else
13277   
13278         if test "$cross_compiling" = yes; then
13279   ol_cv_c_upper_lower=safe
13280 else
13281   cat > conftest.$ac_ext <<EOF
13282 #line 13283 "configure"
13283 #include "confdefs.h"
13284
13285 #include <ctype.h>
13286 main()
13287 {
13288         if ('C' == toupper('C'))
13289                 exit(0);
13290         else
13291                 exit(1);
13292 }
13293 EOF
13294 if { (eval echo configure:13295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13295 then
13296   ol_cv_c_upper_lower=no
13297 else
13298   echo "configure: failed program was:" >&5
13299   cat conftest.$ac_ext >&5
13300   rm -fr conftest*
13301   ol_cv_c_upper_lower=yes
13302 fi
13303 rm -fr conftest*
13304 fi
13305
13306 fi
13307
13308 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13309 if test $ol_cv_c_upper_lower != no ; then
13310         cat >> confdefs.h <<\EOF
13311 #define C_UPPER_LOWER 1
13312 EOF
13313
13314 fi
13315
13316 echo $ac_n "checking for working const""... $ac_c" 1>&6
13317 echo "configure:13318: checking for working const" >&5
13318 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13319   echo $ac_n "(cached) $ac_c" 1>&6
13320 else
13321   cat > conftest.$ac_ext <<EOF
13322 #line 13323 "configure"
13323 #include "confdefs.h"
13324
13325 int main() {
13326
13327 /* Ultrix mips cc rejects this.  */
13328 typedef int charset[2]; const charset x;
13329 /* SunOS 4.1.1 cc rejects this.  */
13330 char const *const *ccp;
13331 char **p;
13332 /* NEC SVR4.0.2 mips cc rejects this.  */
13333 struct point {int x, y;};
13334 static struct point const zero = {0,0};
13335 /* AIX XL C 1.02.0.0 rejects this.
13336    It does not let you subtract one const X* pointer from another in an arm
13337    of an if-expression whose if-part is not a constant expression */
13338 const char *g = "string";
13339 ccp = &g + (g ? g-g : 0);
13340 /* HPUX 7.0 cc rejects these. */
13341 ++ccp;
13342 p = (char**) ccp;
13343 ccp = (char const *const *) p;
13344 { /* SCO 3.2v4 cc rejects this.  */
13345   char *t;
13346   char const *s = 0 ? (char *) 0 : (char const *) 0;
13347
13348   *t++ = 0;
13349 }
13350 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13351   int x[] = {25, 17};
13352   const int *foo = &x[0];
13353   ++foo;
13354 }
13355 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13356   typedef const int *iptr;
13357   iptr p = 0;
13358   ++p;
13359 }
13360 { /* AIX XL C 1.02.0.0 rejects this saying
13361      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13362   struct s { int j; const int *ap[3]; };
13363   struct s *b; b->j = 5;
13364 }
13365 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13366   const int foo = 10;
13367 }
13368
13369 ; return 0; }
13370 EOF
13371 if { (eval echo configure:13372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13372   rm -rf conftest*
13373   ac_cv_c_const=yes
13374 else
13375   echo "configure: failed program was:" >&5
13376   cat conftest.$ac_ext >&5
13377   rm -rf conftest*
13378   ac_cv_c_const=no
13379 fi
13380 rm -f conftest*
13381 fi
13382
13383 echo "$ac_t""$ac_cv_c_const" 1>&6
13384 if test $ac_cv_c_const = no; then
13385   cat >> confdefs.h <<\EOF
13386 #define const 
13387 EOF
13388
13389 fi
13390
13391 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13392 echo "configure:13393: checking if compiler understands volatile" >&5
13393 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13394   echo $ac_n "(cached) $ac_c" 1>&6
13395 else
13396   cat > conftest.$ac_ext <<EOF
13397 #line 13398 "configure"
13398 #include "confdefs.h"
13399 int x, y, z;
13400 int main() {
13401 volatile int a; int * volatile b = x ? &y : &z;
13402       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13403       *b = 0;
13404 ; return 0; }
13405 EOF
13406 if { (eval echo configure:13407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13407   rm -rf conftest*
13408   ol_cv_c_volatile=yes
13409 else
13410   echo "configure: failed program was:" >&5
13411   cat conftest.$ac_ext >&5
13412   rm -rf conftest*
13413   ol_cv_c_volatile=no
13414 fi
13415 rm -f conftest*
13416 fi
13417
13418 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13419   if test $ol_cv_c_volatile = yes; then
13420     : 
13421   else
13422     cat >> confdefs.h <<\EOF
13423 #define volatile 
13424 EOF
13425
13426   fi
13427  
13428
13429 if test $cross_compiling = yes ; then
13430         cat >> confdefs.h <<\EOF
13431 #define CROSS_COMPILING 1
13432 EOF
13433
13434
13435         cat >> confdefs.h <<\EOF
13436 #define LBER_INT_T long
13437 EOF
13438
13439         cat >> confdefs.h <<\EOF
13440 #define LBER_TAG_T long
13441 EOF
13442
13443         cat >> confdefs.h <<\EOF
13444 #define LBER_SOCKET_T int
13445 EOF
13446
13447
13448 else
13449         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13450 echo "configure:13451: checking whether byte ordering is bigendian" >&5
13451 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13452   echo $ac_n "(cached) $ac_c" 1>&6
13453 else
13454   ac_cv_c_bigendian=unknown
13455 # See if sys/param.h defines the BYTE_ORDER macro.
13456 cat > conftest.$ac_ext <<EOF
13457 #line 13458 "configure"
13458 #include "confdefs.h"
13459 #include <sys/types.h>
13460 #include <sys/param.h>
13461 int main() {
13462
13463 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13464  bogus endian macros
13465 #endif
13466 ; return 0; }
13467 EOF
13468 if { (eval echo configure:13469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13469   rm -rf conftest*
13470   # It does; now see whether it defined to BIG_ENDIAN or not.
13471 cat > conftest.$ac_ext <<EOF
13472 #line 13473 "configure"
13473 #include "confdefs.h"
13474 #include <sys/types.h>
13475 #include <sys/param.h>
13476 int main() {
13477
13478 #if BYTE_ORDER != BIG_ENDIAN
13479  not big endian
13480 #endif
13481 ; return 0; }
13482 EOF
13483 if { (eval echo configure:13484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13484   rm -rf conftest*
13485   ac_cv_c_bigendian=yes
13486 else
13487   echo "configure: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   rm -rf conftest*
13490   ac_cv_c_bigendian=no
13491 fi
13492 rm -f conftest*
13493 else
13494   echo "configure: failed program was:" >&5
13495   cat conftest.$ac_ext >&5
13496 fi
13497 rm -f conftest*
13498 if test $ac_cv_c_bigendian = unknown; then
13499 if test "$cross_compiling" = yes; then
13500     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13501 else
13502   cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 main () {
13506   /* Are we little or big endian?  From Harbison&Steele.  */
13507   union
13508   {
13509     long l;
13510     char c[sizeof (long)];
13511   } u;
13512   u.l = 1;
13513   exit (u.c[sizeof (long) - 1] == 1);
13514 }
13515 EOF
13516 if { (eval echo configure:13517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13517 then
13518   ac_cv_c_bigendian=no
13519 else
13520   echo "configure: failed program was:" >&5
13521   cat conftest.$ac_ext >&5
13522   rm -fr conftest*
13523   ac_cv_c_bigendian=yes
13524 fi
13525 rm -fr conftest*
13526 fi
13527
13528 fi
13529 fi
13530
13531 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13532 if test $ac_cv_c_bigendian = yes; then
13533   cat >> confdefs.h <<\EOF
13534 #define WORDS_BIGENDIAN 1
13535 EOF
13536
13537 fi
13538
13539         echo $ac_n "checking size of short""... $ac_c" 1>&6
13540 echo "configure:13541: checking size of short" >&5
13541 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13542   echo $ac_n "(cached) $ac_c" 1>&6
13543 else
13544   if test "$cross_compiling" = yes; then
13545     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13546 else
13547   cat > conftest.$ac_ext <<EOF
13548 #line 13549 "configure"
13549 #include "confdefs.h"
13550 #include <stdio.h>
13551 main()
13552 {
13553   FILE *f=fopen("conftestval", "w");
13554   if (!f) exit(1);
13555   fprintf(f, "%d\n", sizeof(short));
13556   exit(0);
13557 }
13558 EOF
13559 if { (eval echo configure:13560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13560 then
13561   ac_cv_sizeof_short=`cat conftestval`
13562 else
13563   echo "configure: failed program was:" >&5
13564   cat conftest.$ac_ext >&5
13565   rm -fr conftest*
13566   ac_cv_sizeof_short=0
13567 fi
13568 rm -fr conftest*
13569 fi
13570
13571 fi
13572 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13573 cat >> confdefs.h <<EOF
13574 #define SIZEOF_SHORT $ac_cv_sizeof_short
13575 EOF
13576
13577  
13578         echo $ac_n "checking size of int""... $ac_c" 1>&6
13579 echo "configure:13580: checking size of int" >&5
13580 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13581   echo $ac_n "(cached) $ac_c" 1>&6
13582 else
13583   if test "$cross_compiling" = yes; then
13584     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13585 else
13586   cat > conftest.$ac_ext <<EOF
13587 #line 13588 "configure"
13588 #include "confdefs.h"
13589 #include <stdio.h>
13590 main()
13591 {
13592   FILE *f=fopen("conftestval", "w");
13593   if (!f) exit(1);
13594   fprintf(f, "%d\n", sizeof(int));
13595   exit(0);
13596 }
13597 EOF
13598 if { (eval echo configure:13599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13599 then
13600   ac_cv_sizeof_int=`cat conftestval`
13601 else
13602   echo "configure: failed program was:" >&5
13603   cat conftest.$ac_ext >&5
13604   rm -fr conftest*
13605   ac_cv_sizeof_int=0
13606 fi
13607 rm -fr conftest*
13608 fi
13609
13610 fi
13611 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13612 cat >> confdefs.h <<EOF
13613 #define SIZEOF_INT $ac_cv_sizeof_int
13614 EOF
13615
13616  
13617         echo $ac_n "checking size of long""... $ac_c" 1>&6
13618 echo "configure:13619: checking size of long" >&5
13619 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13620   echo $ac_n "(cached) $ac_c" 1>&6
13621 else
13622   if test "$cross_compiling" = yes; then
13623     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13624 else
13625   cat > conftest.$ac_ext <<EOF
13626 #line 13627 "configure"
13627 #include "confdefs.h"
13628 #include <stdio.h>
13629 main()
13630 {
13631   FILE *f=fopen("conftestval", "w");
13632   if (!f) exit(1);
13633   fprintf(f, "%d\n", sizeof(long));
13634   exit(0);
13635 }
13636 EOF
13637 if { (eval echo configure:13638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13638 then
13639   ac_cv_sizeof_long=`cat conftestval`
13640 else
13641   echo "configure: failed program was:" >&5
13642   cat conftest.$ac_ext >&5
13643   rm -fr conftest*
13644   ac_cv_sizeof_long=0
13645 fi
13646 rm -fr conftest*
13647 fi
13648
13649 fi
13650 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13651 cat >> confdefs.h <<EOF
13652 #define SIZEOF_LONG $ac_cv_sizeof_long
13653 EOF
13654
13655
13656
13657         if test "$ac_cv_sizeof_int" -lt 4 ; then
13658                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13659
13660                 cat >> confdefs.h <<\EOF
13661 #define LBER_INT_T long
13662 EOF
13663
13664                 cat >> confdefs.h <<\EOF
13665 #define LBER_TAG_T long
13666 EOF
13667
13668                 cat >> confdefs.h <<\EOF
13669 #define LBER_SOCKET_T int
13670 EOF
13671
13672         else
13673                 cat >> confdefs.h <<\EOF
13674 #define LBER_INT_T int
13675 EOF
13676
13677                 cat >> confdefs.h <<\EOF
13678 #define LBER_TAG_T long
13679 EOF
13680
13681                 cat >> confdefs.h <<\EOF
13682 #define LBER_SOCKET_T int
13683 EOF
13684
13685         fi
13686 fi
13687
13688 cat >> confdefs.h <<\EOF
13689 #define LBER_LEN_T long
13690 EOF
13691
13692
13693 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13694 echo "configure:13695: checking for 8-bit clean memcmp" >&5
13695 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13696   echo $ac_n "(cached) $ac_c" 1>&6
13697 else
13698   if test "$cross_compiling" = yes; then
13699   ac_cv_func_memcmp_clean=no
13700 else
13701   cat > conftest.$ac_ext <<EOF
13702 #line 13703 "configure"
13703 #include "confdefs.h"
13704
13705 main()
13706 {
13707   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13708   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13709 }
13710
13711 EOF
13712 if { (eval echo configure:13713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13713 then
13714   ac_cv_func_memcmp_clean=yes
13715 else
13716   echo "configure: failed program was:" >&5
13717   cat conftest.$ac_ext >&5
13718   rm -fr conftest*
13719   ac_cv_func_memcmp_clean=no
13720 fi
13721 rm -fr conftest*
13722 fi
13723
13724 fi
13725
13726 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13727 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13728
13729 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13730 echo "configure:13731: checking for strftime" >&5
13731 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13732   echo $ac_n "(cached) $ac_c" 1>&6
13733 else
13734   cat > conftest.$ac_ext <<EOF
13735 #line 13736 "configure"
13736 #include "confdefs.h"
13737 /* System header to define __stub macros and hopefully few prototypes,
13738     which can conflict with char strftime(); below.  */
13739 #include <assert.h>
13740 /* Override any gcc2 internal prototype to avoid an error.  */
13741 /* We use char because int might match the return type of a gcc2
13742     builtin and then its argument prototype would still apply.  */
13743 char strftime();
13744 char (*f)();
13745
13746 int main() {
13747
13748 /* The GNU C library defines this for functions which it implements
13749     to always fail with ENOSYS.  Some functions are actually named
13750     something starting with __ and the normal name is an alias.  */
13751 #if defined (__stub_strftime) || defined (__stub___strftime)
13752 choke me
13753 #else
13754 f = strftime;
13755 #endif
13756
13757 ; return 0; }
13758 EOF
13759 if { (eval echo configure:13760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13760   rm -rf conftest*
13761   eval "ac_cv_func_strftime=yes"
13762 else
13763   echo "configure: failed program was:" >&5
13764   cat conftest.$ac_ext >&5
13765   rm -rf conftest*
13766   eval "ac_cv_func_strftime=no"
13767 fi
13768 rm -f conftest*
13769 fi
13770
13771 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13772   echo "$ac_t""yes" 1>&6
13773   cat >> confdefs.h <<\EOF
13774 #define HAVE_STRFTIME 1
13775 EOF
13776
13777 else
13778   echo "$ac_t""no" 1>&6
13779 # strftime is in -lintl on SCO UNIX.
13780 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13781 echo "configure:13782: checking for strftime in -lintl" >&5
13782 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13783 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13784   echo $ac_n "(cached) $ac_c" 1>&6
13785 else
13786   ac_save_LIBS="$LIBS"
13787 LIBS="-lintl  $LIBS"
13788 cat > conftest.$ac_ext <<EOF
13789 #line 13790 "configure"
13790 #include "confdefs.h"
13791 /* Override any gcc2 internal prototype to avoid an error.  */
13792 /* We use char because int might match the return type of a gcc2
13793     builtin and then its argument prototype would still apply.  */
13794 char strftime();
13795
13796 int main() {
13797 strftime()
13798 ; return 0; }
13799 EOF
13800 if { (eval echo configure:13801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13801   rm -rf conftest*
13802   eval "ac_cv_lib_$ac_lib_var=yes"
13803 else
13804   echo "configure: failed program was:" >&5
13805   cat conftest.$ac_ext >&5
13806   rm -rf conftest*
13807   eval "ac_cv_lib_$ac_lib_var=no"
13808 fi
13809 rm -f conftest*
13810 LIBS="$ac_save_LIBS"
13811
13812 fi
13813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13814   echo "$ac_t""yes" 1>&6
13815   cat >> confdefs.h <<\EOF
13816 #define HAVE_STRFTIME 1
13817 EOF
13818
13819 LIBS="-lintl $LIBS"
13820 else
13821   echo "$ac_t""no" 1>&6
13822 fi
13823
13824 fi
13825
13826
13827 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13828 echo "configure:13829: checking for inet_aton()" >&5
13829 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13830   echo $ac_n "(cached) $ac_c" 1>&6
13831 else
13832   cat > conftest.$ac_ext <<EOF
13833 #line 13834 "configure"
13834 #include "confdefs.h"
13835
13836 #ifdef HAVE_SYS_TYPES_H
13837 #       include <sys/types.h>
13838 #endif
13839 #ifdef HAVE_SYS_SOCKET_H
13840 #       include <sys/socket.h>
13841 #       ifdef HAVE_SYS_SELECT_H
13842 #               include <sys/select.h>
13843 #       endif
13844 #       include <netinet/in.h>
13845 #       ifdef HAVE_ARPA_INET_H
13846 #               include <arpa/inet.h>
13847 #       endif
13848 #endif
13849
13850 int main() {
13851 struct in_addr in;
13852 int rc = inet_aton( "255.255.255.255", &in );
13853 ; return 0; }
13854 EOF
13855 if { (eval echo configure:13856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13856   rm -rf conftest*
13857   ol_cv_func_inet_aton=yes
13858 else
13859   echo "configure: failed program was:" >&5
13860   cat conftest.$ac_ext >&5
13861   rm -rf conftest*
13862   ol_cv_func_inet_aton=no
13863 fi
13864 rm -f conftest*
13865 fi
13866
13867 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13868   if test $ol_cv_func_inet_aton != no; then
13869     cat >> confdefs.h <<\EOF
13870 #define HAVE_INET_ATON 1
13871 EOF
13872
13873   fi
13874  
13875
13876 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13877 echo "configure:13878: checking for vprintf" >&5
13878 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13879   echo $ac_n "(cached) $ac_c" 1>&6
13880 else
13881   cat > conftest.$ac_ext <<EOF
13882 #line 13883 "configure"
13883 #include "confdefs.h"
13884 /* System header to define __stub macros and hopefully few prototypes,
13885     which can conflict with char vprintf(); below.  */
13886 #include <assert.h>
13887 /* Override any gcc2 internal prototype to avoid an error.  */
13888 /* We use char because int might match the return type of a gcc2
13889     builtin and then its argument prototype would still apply.  */
13890 char vprintf();
13891 char (*f)();
13892
13893 int main() {
13894
13895 /* The GNU C library defines this for functions which it implements
13896     to always fail with ENOSYS.  Some functions are actually named
13897     something starting with __ and the normal name is an alias.  */
13898 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13899 choke me
13900 #else
13901 f = vprintf;
13902 #endif
13903
13904 ; return 0; }
13905 EOF
13906 if { (eval echo configure:13907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13907   rm -rf conftest*
13908   eval "ac_cv_func_vprintf=yes"
13909 else
13910   echo "configure: failed program was:" >&5
13911   cat conftest.$ac_ext >&5
13912   rm -rf conftest*
13913   eval "ac_cv_func_vprintf=no"
13914 fi
13915 rm -f conftest*
13916 fi
13917
13918 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13919   echo "$ac_t""yes" 1>&6
13920   cat >> confdefs.h <<\EOF
13921 #define HAVE_VPRINTF 1
13922 EOF
13923
13924 else
13925   echo "$ac_t""no" 1>&6
13926 fi
13927
13928 if test "$ac_cv_func_vprintf" != yes; then
13929 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13930 echo "configure:13931: checking for _doprnt" >&5
13931 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13932   echo $ac_n "(cached) $ac_c" 1>&6
13933 else
13934   cat > conftest.$ac_ext <<EOF
13935 #line 13936 "configure"
13936 #include "confdefs.h"
13937 /* System header to define __stub macros and hopefully few prototypes,
13938     which can conflict with char _doprnt(); below.  */
13939 #include <assert.h>
13940 /* Override any gcc2 internal prototype to avoid an error.  */
13941 /* We use char because int might match the return type of a gcc2
13942     builtin and then its argument prototype would still apply.  */
13943 char _doprnt();
13944 char (*f)();
13945
13946 int main() {
13947
13948 /* The GNU C library defines this for functions which it implements
13949     to always fail with ENOSYS.  Some functions are actually named
13950     something starting with __ and the normal name is an alias.  */
13951 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13952 choke me
13953 #else
13954 f = _doprnt;
13955 #endif
13956
13957 ; return 0; }
13958 EOF
13959 if { (eval echo configure:13960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13960   rm -rf conftest*
13961   eval "ac_cv_func__doprnt=yes"
13962 else
13963   echo "configure: failed program was:" >&5
13964   cat conftest.$ac_ext >&5
13965   rm -rf conftest*
13966   eval "ac_cv_func__doprnt=no"
13967 fi
13968 rm -f conftest*
13969 fi
13970
13971 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13972   echo "$ac_t""yes" 1>&6
13973   cat >> confdefs.h <<\EOF
13974 #define HAVE_DOPRNT 1
13975 EOF
13976
13977 else
13978   echo "$ac_t""no" 1>&6
13979 fi
13980
13981 fi
13982
13983
13984 if test $ac_cv_func_vprintf = yes ; then
13985                 for ac_func in vsnprintf vsprintf
13986 do
13987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13988 echo "configure:13989: checking for $ac_func" >&5
13989 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13990   echo $ac_n "(cached) $ac_c" 1>&6
13991 else
13992   cat > conftest.$ac_ext <<EOF
13993 #line 13994 "configure"
13994 #include "confdefs.h"
13995 /* System header to define __stub macros and hopefully few prototypes,
13996     which can conflict with char $ac_func(); below.  */
13997 #include <assert.h>
13998 /* Override any gcc2 internal prototype to avoid an error.  */
13999 /* We use char because int might match the return type of a gcc2
14000     builtin and then its argument prototype would still apply.  */
14001 char $ac_func();
14002 char (*f)();
14003
14004 int main() {
14005
14006 /* The GNU C library defines this for functions which it implements
14007     to always fail with ENOSYS.  Some functions are actually named
14008     something starting with __ and the normal name is an alias.  */
14009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14010 choke me
14011 #else
14012 f = $ac_func;
14013 #endif
14014
14015 ; return 0; }
14016 EOF
14017 if { (eval echo configure:14018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14018   rm -rf conftest*
14019   eval "ac_cv_func_$ac_func=yes"
14020 else
14021   echo "configure: failed program was:" >&5
14022   cat conftest.$ac_ext >&5
14023   rm -rf conftest*
14024   eval "ac_cv_func_$ac_func=no"
14025 fi
14026 rm -f conftest*
14027 fi
14028
14029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14030   echo "$ac_t""yes" 1>&6
14031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14032   cat >> confdefs.h <<EOF
14033 #define $ac_tr_func 1
14034 EOF
14035  
14036 else
14037   echo "$ac_t""no" 1>&6
14038 fi
14039 done
14040
14041 fi
14042
14043 for ac_func in \
14044         bcopy                   \
14045         closesocket             \
14046         endgrent                \
14047         endpwent                \
14048         flock                   \
14049         getdtablesize   \
14050         getgrgid                \
14051         gethostname             \
14052         getpass                 \
14053         getpwuid                \
14054         getpwnam                \
14055         getspnam                \
14056         gettimeofday    \
14057         initgroups              \
14058         lockf                   \
14059         memcpy                  \
14060         memmove                 \
14061         mkstemp                 \
14062         pipe                    \
14063         read                    \
14064         recv                    \
14065         recvfrom                \
14066         setpwfile               \
14067         setgid                  \
14068         setegid                 \
14069         setsid                  \
14070         setuid                  \
14071         seteuid                 \
14072         sigaction               \
14073         signal                  \
14074         sigset                  \
14075         snprintf                \
14076         strdup                  \
14077         strerror                \
14078         strpbrk                 \
14079         strrchr                 \
14080         strsep                  \
14081         strstr                  \
14082         strtol                  \
14083         strtoul                 \
14084         strspn                  \
14085         sysconf                 \
14086         waitpid                 \
14087         wait4                   \
14088         write                   \
14089         send                    \
14090         sendto                  \
14091
14092 do
14093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14094 echo "configure:14095: checking for $ac_func" >&5
14095 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14096   echo $ac_n "(cached) $ac_c" 1>&6
14097 else
14098   cat > conftest.$ac_ext <<EOF
14099 #line 14100 "configure"
14100 #include "confdefs.h"
14101 /* System header to define __stub macros and hopefully few prototypes,
14102     which can conflict with char $ac_func(); below.  */
14103 #include <assert.h>
14104 /* Override any gcc2 internal prototype to avoid an error.  */
14105 /* We use char because int might match the return type of a gcc2
14106     builtin and then its argument prototype would still apply.  */
14107 char $ac_func();
14108 char (*f)();
14109
14110 int main() {
14111
14112 /* The GNU C library defines this for functions which it implements
14113     to always fail with ENOSYS.  Some functions are actually named
14114     something starting with __ and the normal name is an alias.  */
14115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14116 choke me
14117 #else
14118 f = $ac_func;
14119 #endif
14120
14121 ; return 0; }
14122 EOF
14123 if { (eval echo configure:14124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14124   rm -rf conftest*
14125   eval "ac_cv_func_$ac_func=yes"
14126 else
14127   echo "configure: failed program was:" >&5
14128   cat conftest.$ac_ext >&5
14129   rm -rf conftest*
14130   eval "ac_cv_func_$ac_func=no"
14131 fi
14132 rm -f conftest*
14133 fi
14134
14135 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14136   echo "$ac_t""yes" 1>&6
14137     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14138   cat >> confdefs.h <<EOF
14139 #define $ac_tr_func 1
14140 EOF
14141  
14142 else
14143   echo "$ac_t""no" 1>&6
14144 fi
14145 done
14146
14147
14148 for ac_func in getopt tempnam
14149 do
14150 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14151 echo "configure:14152: checking for $ac_func" >&5
14152 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14153   echo $ac_n "(cached) $ac_c" 1>&6
14154 else
14155   cat > conftest.$ac_ext <<EOF
14156 #line 14157 "configure"
14157 #include "confdefs.h"
14158 /* System header to define __stub macros and hopefully few prototypes,
14159     which can conflict with char $ac_func(); below.  */
14160 #include <assert.h>
14161 /* Override any gcc2 internal prototype to avoid an error.  */
14162 /* We use char because int might match the return type of a gcc2
14163     builtin and then its argument prototype would still apply.  */
14164 char $ac_func();
14165 char (*f)();
14166
14167 int main() {
14168
14169 /* The GNU C library defines this for functions which it implements
14170     to always fail with ENOSYS.  Some functions are actually named
14171     something starting with __ and the normal name is an alias.  */
14172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14173 choke me
14174 #else
14175 f = $ac_func;
14176 #endif
14177
14178 ; return 0; }
14179 EOF
14180 if { (eval echo configure:14181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14181   rm -rf conftest*
14182   eval "ac_cv_func_$ac_func=yes"
14183 else
14184   echo "configure: failed program was:" >&5
14185   cat conftest.$ac_ext >&5
14186   rm -rf conftest*
14187   eval "ac_cv_func_$ac_func=no"
14188 fi
14189 rm -f conftest*
14190 fi
14191
14192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14193   echo "$ac_t""yes" 1>&6
14194     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14195   cat >> confdefs.h <<EOF
14196 #define $ac_tr_func 1
14197 EOF
14198  
14199 else
14200   echo "$ac_t""no" 1>&6
14201 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14202 fi
14203 done
14204
14205
14206
14207 # Check Configuration
14208 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14209 echo "configure:14210: checking declaration of sys_errlist" >&5
14210 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14211   echo $ac_n "(cached) $ac_c" 1>&6
14212 else
14213   
14214         cat > conftest.$ac_ext <<EOF
14215 #line 14216 "configure"
14216 #include "confdefs.h"
14217
14218 #include <stdio.h>
14219 #include <sys/types.h>
14220 #include <errno.h> 
14221 int main() {
14222 char *c = (char *) *sys_errlist
14223 ; return 0; }
14224 EOF
14225 if { (eval echo configure:14226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14226   rm -rf conftest*
14227   ol_cv_dcl_sys_errlist=yes
14228         ol_cv_have_sys_errlist=yes
14229 else
14230   echo "configure: failed program was:" >&5
14231   cat conftest.$ac_ext >&5
14232   rm -rf conftest*
14233   ol_cv_dcl_sys_errlist=no
14234 fi
14235 rm -f conftest*
14236 fi
14237
14238 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14239 #
14240 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14241 if test $ol_cv_dcl_sys_errlist = no ; then
14242         cat >> confdefs.h <<\EOF
14243 #define DECL_SYS_ERRLIST 1
14244 EOF
14245
14246
14247         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14248 echo "configure:14249: checking existence of sys_errlist" >&5
14249 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14250   echo $ac_n "(cached) $ac_c" 1>&6
14251 else
14252   
14253                 cat > conftest.$ac_ext <<EOF
14254 #line 14255 "configure"
14255 #include "confdefs.h"
14256 #include <errno.h>
14257 int main() {
14258 char *c = (char *) *sys_errlist
14259 ; return 0; }
14260 EOF
14261 if { (eval echo configure:14262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14262   rm -rf conftest*
14263   ol_cv_have_sys_errlist=yes
14264 else
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267   rm -rf conftest*
14268   ol_cv_have_sys_errlist=no
14269 fi
14270 rm -f conftest*
14271 fi
14272
14273 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14274 fi
14275 if test $ol_cv_have_sys_errlist = yes ; then
14276         cat >> confdefs.h <<\EOF
14277 #define HAVE_SYS_ERRLIST 1
14278 EOF
14279
14280 fi
14281
14282
14283
14284 if test "$ol_enable_debug" != no ; then
14285         cat >> confdefs.h <<\EOF
14286 #define LDAP_DEBUG 1
14287 EOF
14288
14289 fi
14290 if test "$ol_enable_syslog" = yes ; then
14291         cat >> confdefs.h <<\EOF
14292 #define LDAP_SYSLOG 1
14293 EOF
14294
14295 fi
14296 if test "$ol_enable_libui" = yes ; then
14297         cat >> confdefs.h <<\EOF
14298 #define LDAP_LIBUI 1
14299 EOF
14300
14301 fi
14302 if test "$ol_enable_cache" = no ; then
14303         cat >> confdefs.h <<\EOF
14304 #define LDAP_NOCACHE 1
14305 EOF
14306
14307 fi
14308 if test "$ol_enable_dns" != no ; then
14309         cat >> confdefs.h <<\EOF
14310 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14311 EOF
14312
14313 fi
14314 if test "$ol_enable_proctitle" != no ; then
14315         cat >> confdefs.h <<\EOF
14316 #define LDAP_PROCTITLE 1
14317 EOF
14318
14319 fi
14320 if test "$ol_enable_referrals" != no ; then
14321         cat >> confdefs.h <<\EOF
14322 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14323 EOF
14324
14325 fi
14326 if test "$ol_enable_cldap" != no ; then
14327         cat >> confdefs.h <<\EOF
14328 #define LDAP_CONNECTIONLESS 1
14329 EOF
14330
14331 fi
14332
14333 if test "$ol_enable_crypt" != no ; then
14334         cat >> confdefs.h <<\EOF
14335 #define SLAPD_CRYPT 1
14336 EOF
14337
14338 fi
14339 if test "$ol_enable_cleartext" != no ; then
14340         cat >> confdefs.h <<\EOF
14341 #define SLAPD_CLEARTEXT 1
14342 EOF
14343
14344 fi
14345 if test "$ol_enable_multimaster" != no ; then
14346         cat >> confdefs.h <<\EOF
14347 #define SLAPD_MULTIMASTER 1
14348 EOF
14349
14350 fi
14351 if test "$ol_enable_phonetic" != no ; then
14352         cat >> confdefs.h <<\EOF
14353 #define SLAPD_PHONETIC 1
14354 EOF
14355
14356 fi
14357 if test "$ol_enable_rlookups" != no ; then
14358         cat >> confdefs.h <<\EOF
14359 #define SLAPD_RLOOKUPS 1
14360 EOF
14361
14362 fi
14363 if test "$ol_enable_aci" != no ; then
14364         cat >> confdefs.h <<\EOF
14365 #define SLAPD_ACI_ENABLED 1
14366 EOF
14367
14368 fi
14369 if test "$ol_enable_discreteaci" != no ; then
14370         cat >> confdefs.h <<\EOF
14371 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14372 EOF
14373
14374 fi
14375
14376 if test "$ol_link_modules" != no ; then
14377         cat >> confdefs.h <<\EOF
14378 #define SLAPD_MODULES 1
14379 EOF
14380
14381         BUILD_SLAPD=yes
14382         MODULES_LIBS=-lltdl
14383         SLAPD_MODULES_LDFLAGS="-dlopen self"
14384 fi
14385
14386 if test "$ol_link_bdb2" != no ; then
14387         cat >> confdefs.h <<\EOF
14388 #define SLAPD_BDB2 1
14389 EOF
14390
14391         BUILD_SLAPD=yes
14392         BUILD_BDB2=yes
14393         if test "$ol_with_bdb2_module" != static ; then
14394                 cat >> confdefs.h <<\EOF
14395 #define SLAPD_BDB2_DYNAMIC 1
14396 EOF
14397
14398                 BUILD_BDB2=mod
14399                 BUILD_BDB2_DYNAMIC=shared
14400                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14401         fi
14402 fi
14403
14404 if test "$ol_enable_ldap" != no ; then
14405         cat >> confdefs.h <<\EOF
14406 #define SLAPD_LDAP 1
14407 EOF
14408
14409         BUILD_SLAPD=yes
14410         BUILD_LDAP=yes
14411         if test "$ol_with_ldap_module" != static ; then
14412                 cat >> confdefs.h <<\EOF
14413 #define SLAPD_LDAP_DYNAMIC 1
14414 EOF
14415
14416                 BUILD_LDAP=mod
14417                 BUILD_LDAP_DYNAMIC=shared
14418                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14419         fi
14420 fi
14421
14422 if test "$ol_link_ldbm" != no ; then
14423         cat >> confdefs.h <<\EOF
14424 #define SLAPD_LDBM 1
14425 EOF
14426
14427         BUILD_SLAPD=yes
14428         BUILD_LDBM=yes
14429         if test "$ol_with_ldbm_module" != static ; then
14430                 cat >> confdefs.h <<\EOF
14431 #define SLAPD_LDBM_DYNAMIC 1
14432 EOF
14433
14434                 BUILD_LDBM=mod
14435                 BUILD_LDBM_DYNAMIC=shared
14436                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14437         fi
14438 fi
14439
14440 if test "$ol_enable_passwd" != no ; then
14441         cat >> confdefs.h <<\EOF
14442 #define SLAPD_PASSWD 1
14443 EOF
14444
14445         BUILD_SLAPD=yes
14446         BUILD_PASSWD=yes
14447         if test "$ol_with_passwd_module" != static ; then
14448                 cat >> confdefs.h <<\EOF
14449 #define SLAPD_PASSWD_DYNAMIC 1
14450 EOF
14451
14452                 BUILD_PASSWD=mod
14453                 BUILD_PASSWD_DYNAMIC=shared
14454                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14455         fi
14456 fi
14457
14458 if test "$ol_link_perl" != no ; then
14459         cat >> confdefs.h <<\EOF
14460 #define SLAPD_PERL 1
14461 EOF
14462
14463         BUILD_SLAPD=yes
14464         BUILD_PERL=yes
14465         if test "$ol_with_perl_module" != static ; then
14466                 cat >> confdefs.h <<\EOF
14467 #define SLAPD_PERL_DYNAMIC 1
14468 EOF
14469
14470                 BUILD_PERL=mod
14471                 BUILD_PERL_DYNAMIC=shared
14472                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14473         fi
14474 fi
14475
14476 if test "$ol_enable_shell" != no ; then
14477         cat >> confdefs.h <<\EOF
14478 #define SLAPD_SHELL 1
14479 EOF
14480
14481         BUILD_SLAPD=yes
14482         BUILD_SHELL=yes
14483         if test "$ol_with_shell_module" != static ; then
14484                 cat >> confdefs.h <<\EOF
14485 #define SLAPD_SHELL_DYNAMIC 1
14486 EOF
14487
14488                 BUILD_SHELL=mod
14489                 BUILD_SHELL_DYNAMIC=shared
14490                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14491         fi
14492 fi
14493
14494 if test "$ol_enable_tcl" != no ; then
14495         cat >> confdefs.h <<\EOF
14496 #define SLAPD_TCL 1
14497 EOF
14498
14499         BUILD_SLAPD=yes
14500         BUILD_TCL=yes
14501         if test "$ol_with_tcl_module" != static; then
14502                 cat >> confdefs.h <<\EOF
14503 #define SLAPD_TCL_DYNAMIC 1
14504 EOF
14505
14506                 BUILD_TCL=mod
14507                 BUILD_TCL_DYNAMIC=shared
14508                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14509         fi
14510 fi
14511
14512 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14513         $BUILD_SLAPD = yes ; then
14514         BUILD_SLURPD=yes
14515 fi
14516
14517 if test "$ol_link_isode" != no ; then
14518         BUILD_LDAPD=yes
14519 fi
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
14561
14562
14563
14564
14565 trap '' 1 2 15
14566
14567 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14568
14569 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14570 # Let make expand exec_prefix.
14571 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14572
14573 # Any assignment to VPATH causes Sun make to only execute
14574 # the first set of double-colon rules, so remove it if not needed.
14575 # If there is a colon in the path, we need to keep it.
14576 if test "x$srcdir" = x.; then
14577   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14578 fi
14579
14580 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14581
14582 DEFS=-DHAVE_CONFIG_H
14583
14584 # Without the "./", some shells look in PATH for config.status.
14585 : ${CONFIG_STATUS=./config.status}
14586
14587 echo creating $CONFIG_STATUS
14588 rm -f $CONFIG_STATUS
14589 cat > $CONFIG_STATUS <<EOF
14590 #! /bin/sh
14591 # Generated automatically by configure.
14592 # Run this file to recreate the current configuration.
14593 # This directory was configured as follows,
14594 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14595 #
14596 # $0 $ac_configure_args
14597 #
14598 # Compiler output produced by configure, useful for debugging
14599 # configure, is in ./config.log if it exists.
14600
14601 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14602 for ac_option
14603 do
14604   case "\$ac_option" in
14605   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14606     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14607     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14608   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14609     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14610     exit 0 ;;
14611   -help | --help | --hel | --he | --h)
14612     echo "\$ac_cs_usage"; exit 0 ;;
14613   *) echo "\$ac_cs_usage"; exit 1 ;;
14614   esac
14615 done
14616
14617 ac_given_srcdir=$srcdir
14618 ac_given_INSTALL="$INSTALL"
14619
14620 trap 'rm -fr `echo "\
14621 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14622 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14623 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14624 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14625 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14626 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14627 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14628 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14629 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14630 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14631 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14632 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14633 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14634 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14635 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14636 include/Makefile:build/top.mk:include/Makefile.in \
14637 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14638 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14639 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14640 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14641 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14642 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14643 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14644 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14645 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14646 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14647 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14648 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14649 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14650 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14651 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14652 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14653 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14654 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14655 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14656 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14657 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14658 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14659 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14660 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14661 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14662 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14663  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14664 EOF
14665 cat >> $CONFIG_STATUS <<EOF
14666
14667 # Protect against being on the right side of a sed subst in config.status.
14668 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14669  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14670 $ac_vpsub
14671 $extrasub
14672 s%@SHELL@%$SHELL%g
14673 s%@CFLAGS@%$CFLAGS%g
14674 s%@CPPFLAGS@%$CPPFLAGS%g
14675 s%@CXXFLAGS@%$CXXFLAGS%g
14676 s%@FFLAGS@%$FFLAGS%g
14677 s%@DEFS@%$DEFS%g
14678 s%@LDFLAGS@%$LDFLAGS%g
14679 s%@LIBS@%$LIBS%g
14680 s%@exec_prefix@%$exec_prefix%g
14681 s%@prefix@%$prefix%g
14682 s%@program_transform_name@%$program_transform_name%g
14683 s%@bindir@%$bindir%g
14684 s%@sbindir@%$sbindir%g
14685 s%@libexecdir@%$libexecdir%g
14686 s%@datadir@%$datadir%g
14687 s%@sysconfdir@%$sysconfdir%g
14688 s%@sharedstatedir@%$sharedstatedir%g
14689 s%@localstatedir@%$localstatedir%g
14690 s%@libdir@%$libdir%g
14691 s%@includedir@%$includedir%g
14692 s%@oldincludedir@%$oldincludedir%g
14693 s%@infodir@%$infodir%g
14694 s%@mandir@%$mandir%g
14695 s%@host@%$host%g
14696 s%@host_alias@%$host_alias%g
14697 s%@host_cpu@%$host_cpu%g
14698 s%@host_vendor@%$host_vendor%g
14699 s%@host_os@%$host_os%g
14700 s%@target@%$target%g
14701 s%@target_alias@%$target_alias%g
14702 s%@target_cpu@%$target_cpu%g
14703 s%@target_vendor@%$target_vendor%g
14704 s%@target_os@%$target_os%g
14705 s%@build@%$build%g
14706 s%@build_alias@%$build_alias%g
14707 s%@build_cpu@%$build_cpu%g
14708 s%@build_vendor@%$build_vendor%g
14709 s%@build_os@%$build_os%g
14710 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14711 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14712 s%@INSTALL_DATA@%$INSTALL_DATA%g
14713 s%@PACKAGE@%$PACKAGE%g
14714 s%@VERSION@%$VERSION%g
14715 s%@ACLOCAL@%$ACLOCAL%g
14716 s%@AUTOCONF@%$AUTOCONF%g
14717 s%@AUTOMAKE@%$AUTOMAKE%g
14718 s%@AUTOHEADER@%$AUTOHEADER%g
14719 s%@MAKEINFO@%$MAKEINFO%g
14720 s%@install_sh@%$install_sh%g
14721 s%@AMTAR@%$AMTAR%g
14722 s%@AWK@%$AWK%g
14723 s%@AMTARFLAGS@%$AMTARFLAGS%g
14724 s%@SET_MAKE@%$SET_MAKE%g
14725 s%@top_builddir@%$top_builddir%g
14726 s%@ldap_subdir@%$ldap_subdir%g
14727 s%@CC@%$CC%g
14728 s%@RANLIB@%$RANLIB%g
14729 s%@LD@%$LD%g
14730 s%@NM@%$NM%g
14731 s%@LN_S@%$LN_S%g
14732 s%@LIBTOOL@%$LIBTOOL%g
14733 s%@LN_H@%$LN_H%g
14734 s%@SENDMAIL@%$SENDMAIL%g
14735 s%@EDITOR@%$EDITOR%g
14736 s%@FINGER@%$FINGER%g
14737 s%@PERLBIN@%$PERLBIN%g
14738 s%@CPP@%$CPP%g
14739 s%@EXEEXT@%$EXEEXT%g
14740 s%@OBJEXT@%$OBJEXT%g
14741 s%@OL_MKDEP@%$OL_MKDEP%g
14742 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14743 s%@PEPSY@%$PEPSY%g
14744 s%@LIBOBJS@%$LIBOBJS%g
14745 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14746 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14747 s%@BUILD_BDB2@%$BUILD_BDB2%g
14748 s%@BUILD_LDAP@%$BUILD_LDAP%g
14749 s%@BUILD_LDBM@%$BUILD_LDBM%g
14750 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14751 s%@BUILD_PERL@%$BUILD_PERL%g
14752 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14753 s%@BUILD_SHELL@%$BUILD_SHELL%g
14754 s%@BUILD_TCL@%$BUILD_TCL%g
14755 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14756 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14757 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14758 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14759 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14760 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14761 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14762 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14763 s%@LDAP_LIBS@%$LDAP_LIBS%g
14764 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14765 s%@LDIF_LIBS@%$LDIF_LIBS%g
14766 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14767 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14768 s%@LDBM_LIBS@%$LDBM_LIBS%g
14769 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14770 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14771 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14772 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14773 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14774 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14775 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14776 s%@KRB_LIBS@%$KRB_LIBS%g
14777 s%@READLINE_LIBS@%$READLINE_LIBS%g
14778 s%@SASL_LIBS@%$SASL_LIBS%g
14779 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14780 s%@TLS_LIBS@%$TLS_LIBS%g
14781 s%@MODULES_LIBS@%$MODULES_LIBS%g
14782
14783 CEOF
14784 EOF
14785
14786 cat >> $CONFIG_STATUS <<\EOF
14787
14788 # Split the substitutions into bite-sized pieces for seds with
14789 # small command number limits, like on Digital OSF/1 and HP-UX.
14790 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14791 ac_file=1 # Number of current file.
14792 ac_beg=1 # First line for current file.
14793 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14794 ac_more_lines=:
14795 ac_sed_cmds=""
14796 while $ac_more_lines; do
14797   if test $ac_beg -gt 1; then
14798     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14799   else
14800     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14801   fi
14802   if test ! -s conftest.s$ac_file; then
14803     ac_more_lines=false
14804     rm -f conftest.s$ac_file
14805   else
14806     if test -z "$ac_sed_cmds"; then
14807       ac_sed_cmds="sed -f conftest.s$ac_file"
14808     else
14809       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14810     fi
14811     ac_file=`expr $ac_file + 1`
14812     ac_beg=$ac_end
14813     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14814   fi
14815 done
14816 if test -z "$ac_sed_cmds"; then
14817   ac_sed_cmds=cat
14818 fi
14819 EOF
14820
14821 cat >> $CONFIG_STATUS <<EOF
14822
14823 CONFIG_FILES=\${CONFIG_FILES-"\
14824 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14825 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14826 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14827 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14828 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14829 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14830 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14831 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14832 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14833 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14834 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14835 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14836 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14837 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14838 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14839 include/Makefile:build/top.mk:include/Makefile.in \
14840 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14841 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14842 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14843 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14844 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14845 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14846 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14847 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14848 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14849 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14850 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14851 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14852 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14853 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14854 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14855 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14856 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14857 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14858 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14859 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14860 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14861 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14862 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14863 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14864 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14865 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14866 "}
14867 EOF
14868 cat >> $CONFIG_STATUS <<\EOF
14869 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14870   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14871   case "$ac_file" in
14872   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14873        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14874   *) ac_file_in="${ac_file}.in" ;;
14875   esac
14876
14877   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14878
14879   # Remove last slash and all that follows it.  Not all systems have dirname.
14880   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14881   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14882     # The file is in a subdirectory.
14883     test ! -d "$ac_dir" && mkdir "$ac_dir"
14884     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14885     # A "../" for each directory in $ac_dir_suffix.
14886     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14887   else
14888     ac_dir_suffix= ac_dots=
14889   fi
14890
14891   case "$ac_given_srcdir" in
14892   .)  srcdir=.
14893       if test -z "$ac_dots"; then top_srcdir=.
14894       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14895   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14896   *) # Relative path.
14897     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14898     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14899   esac
14900
14901   case "$ac_given_INSTALL" in
14902   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14903   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14904   esac
14905
14906   echo creating "$ac_file"
14907   rm -f "$ac_file"
14908   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14909   case "$ac_file" in
14910   *Makefile*) ac_comsub="1i\\
14911 # $configure_input" ;;
14912   *) ac_comsub= ;;
14913   esac
14914
14915   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14916   sed -e "$ac_comsub
14917 s%@configure_input@%$configure_input%g
14918 s%@srcdir@%$srcdir%g
14919 s%@top_srcdir@%$top_srcdir%g
14920 s%@INSTALL@%$INSTALL%g
14921 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14922 fi; done
14923 rm -f conftest.s*
14924
14925 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14926 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14927 #
14928 # ac_d sets the value in "#define NAME VALUE" lines.
14929 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14930 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14931 ac_dC='\3'
14932 ac_dD='%g'
14933 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14934 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14935 ac_uB='\([      ]\)%\1#\2define\3'
14936 ac_uC=' '
14937 ac_uD='\4%g'
14938 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14939 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14940 ac_eB='$%\1#\2define\3'
14941 ac_eC=' '
14942 ac_eD='%g'
14943
14944 if test "${CONFIG_HEADERS+set}" != set; then
14945 EOF
14946 cat >> $CONFIG_STATUS <<EOF
14947   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14948 EOF
14949 cat >> $CONFIG_STATUS <<\EOF
14950 fi
14951 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14952   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14953   case "$ac_file" in
14954   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14955        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14956   *) ac_file_in="${ac_file}.in" ;;
14957   esac
14958
14959   echo creating $ac_file
14960
14961   rm -f conftest.frag conftest.in conftest.out
14962   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14963   cat $ac_file_inputs > conftest.in
14964
14965 EOF
14966
14967 # Transform confdefs.h into a sed script conftest.vals that substitutes
14968 # the proper values into config.h.in to produce config.h.  And first:
14969 # Protect against being on the right side of a sed subst in config.status.
14970 # Protect against being in an unquoted here document in config.status.
14971 rm -f conftest.vals
14972 cat > conftest.hdr <<\EOF
14973 s/[\\&%]/\\&/g
14974 s%[\\$`]%\\&%g
14975 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14976 s%ac_d%ac_u%gp
14977 s%ac_u%ac_e%gp
14978 EOF
14979 sed -n -f conftest.hdr confdefs.h > conftest.vals
14980 rm -f conftest.hdr
14981
14982 # This sed command replaces #undef with comments.  This is necessary, for
14983 # example, in the case of _POSIX_SOURCE, which is predefined and required
14984 # on some systems where configure will not decide to define it.
14985 cat >> conftest.vals <<\EOF
14986 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14987 EOF
14988
14989 # Break up conftest.vals because some shells have a limit on
14990 # the size of here documents, and old seds have small limits too.
14991
14992 rm -f conftest.tail
14993 while :
14994 do
14995   ac_lines=`grep -c . conftest.vals`
14996   # grep -c gives empty output for an empty file on some AIX systems.
14997   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14998   # Write a limited-size here document to conftest.frag.
14999   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15000   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15001   echo 'CEOF
15002   sed -f conftest.frag conftest.in > conftest.out
15003   rm -f conftest.in
15004   mv conftest.out conftest.in
15005 ' >> $CONFIG_STATUS
15006   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15007   rm -f conftest.vals
15008   mv conftest.tail conftest.vals
15009 done
15010 rm -f conftest.vals
15011
15012 cat >> $CONFIG_STATUS <<\EOF
15013   rm -f conftest.frag conftest.h
15014   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15015   cat conftest.in >> conftest.h
15016   rm -f conftest.in
15017   if cmp -s $ac_file conftest.h 2>/dev/null; then
15018     echo "$ac_file is unchanged"
15019     rm -f conftest.h
15020   else
15021     # Remove last slash and all that follows it.  Not all systems have dirname.
15022       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15023       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15024       # The file is in a subdirectory.
15025       test ! -d "$ac_dir" && mkdir "$ac_dir"
15026     fi
15027     rm -f $ac_file
15028     mv conftest.h $ac_file
15029   fi
15030 fi; done
15031
15032 EOF
15033 cat >> $CONFIG_STATUS <<EOF
15034
15035 EOF
15036 cat >> $CONFIG_STATUS <<\EOF
15037
15038 date > stamp-h
15039 echo Please \"make depend\" to build dependencies
15040
15041 exit 0
15042 EOF
15043 chmod +x $CONFIG_STATUS
15044 rm -fr confdefs* $ac_clean_files
15045 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15046